diff -ruN groff-1.22.2/aclocal.m4 groff-1.22.3/aclocal.m4 --- groff-1.22.2/aclocal.m4 2013-02-07 13:06:24.000000000 +0100 +++ groff-1.22.3/aclocal.m4 2014-11-04 09:39:10.174087080 +0100 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.12.5 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,9 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_include([m4/ax_compare_version.m4]) +m4_include([m4/ax_prog_perl_version.m4]) m4_include([m4/codeset.m4]) m4_include([m4/fcntl-o.m4]) m4_include([m4/glibc21.m4]) diff -ruN groff-1.22.2/arch/djgpp/config.bat groff-1.22.3/arch/djgpp/config.bat --- groff-1.22.2/arch/djgpp/config.bat 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/arch/djgpp/config.bat 2014-11-04 09:38:35.572519659 +0100 @@ -1,4 +1,4 @@ -Rem Copyright (C) 2000, 2009 Free Software Foundation, Inc. +Rem Copyright (C) 2000-2014 Free Software Foundation, Inc. Rem Rem This configure script is free software; the Free Software Foundation Rem gives unlimited permission to copy, distribute and modify it. diff -ruN groff-1.22.2/arch/djgpp/config.sed groff-1.22.3/arch/djgpp/config.sed --- groff-1.22.2/arch/djgpp/config.sed 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/arch/djgpp/config.sed 2014-11-04 09:38:35.572519659 +0100 @@ -1,4 +1,4 @@ -# Copyright (C) 2000, 2009 Free Software Foundation, Inc. +# Copyright (C) 2000-2014 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. diff -ruN groff-1.22.2/arch/djgpp/config.site groff-1.22.3/arch/djgpp/config.site --- groff-1.22.2/arch/djgpp/config.site 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/arch/djgpp/config.site 2014-11-04 09:38:35.572519659 +0100 @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2000, 2009 Free Software Foundation, Inc. +# Copyright (C) 2000-2014 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -32,7 +32,7 @@ RANLIB=${RANLIB='ranlib'} LPR=${LPR='cat >>PRN'} DVIPRINT=${DVIPRINT='dvilj4 - >>PRN'} -PERLPATH=${PERLPATH='/usr/bin/perl'} +PERL=${PERL='/usr/bin/perl'} # Force `cp' to be used instead of "ln -s". ac_cv_prog_LN_S="cp -p" diff -ruN groff-1.22.2/arch/djgpp/README groff-1.22.3/arch/djgpp/README --- groff-1.22.2/arch/djgpp/README 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/arch/djgpp/README 2014-11-04 09:38:35.572519659 +0100 @@ -1,5 +1,4 @@ - Copyright (C) 2000, 2009 - Free Software Foundation, Inc. + Copyright (C) 2000-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -351,3 +350,9 @@ 8. You can safely delete the directories under share/groff//font whose names begin with "devX": these are needed on X-Windows which is not supported by this port. + + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/arch/djgpp/t-groff.bat groff-1.22.3/arch/djgpp/t-groff.bat --- groff-1.22.2/arch/djgpp/t-groff.bat 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/arch/djgpp/t-groff.bat 2014-11-04 09:38:35.573519646 +0100 @@ -1,4 +1,4 @@ -Rem Copyright (C) 2000, 2009 Free Software Foundation, Inc. +Rem Copyright (C) 2000-2014 Free Software Foundation, Inc. Rem Rem This file is part of groff. Rem diff -ruN groff-1.22.2/arch/mingw/afmtodit.cmd groff-1.22.3/arch/mingw/afmtodit.cmd --- groff-1.22.2/arch/mingw/afmtodit.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/afmtodit.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl -w %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/chem.cmd groff-1.22.3/arch/mingw/chem.cmd --- groff-1.22.2/arch/mingw/chem.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/chem.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/gperl.cmd groff-1.22.3/arch/mingw/gperl.cmd --- groff-1.22.2/arch/mingw/gperl.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/gperl.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/gpinyin.cmd groff-1.22.3/arch/mingw/gpinyin.cmd --- groff-1.22.2/arch/mingw/gpinyin.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/gpinyin.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/grap2graph.cmd groff-1.22.3/arch/mingw/grap2graph.cmd --- groff-1.22.2/arch/mingw/grap2graph.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/grap2graph.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,86 @@ +@echo off +REM grap2graph -- compile graph description descriptions to bitmap images +REM +REM by Eli Zaretskii , translation of a Unix shell +REM script written by Eric S. Raymond , May 2003 +REM +REM In Unixland, the magic is in knowing what to string together... +REM +REM Take grap description on stdin, emit cropped bitmap on stdout. +REM The pic markup should *not* be wrapped in .G1/.G2, this script will do that. +REM A -U option on the command line enables gpic/groff "unsafe" mode. +REM A -format FOO option changes the image output format to any format +REM supported by convert(1). All other options are passed to convert(1). +REM The default format is PNG. +REM +REM +REM Requires the groff suite and the ImageMagick tools. Both are open source. +REM This code is released to the public domain. +REM +REM Here are the assumptions behind the option processing: +REM +REM 1. None of the options of grap(1) are relevant. +REM +REM 2. Only the -U option of groff(1) is relevant. +REM +REM 3. Many options of convert(1) are potentially relevant, (especially +REM -density, -interlace, -transparency, -border, and -comment). +REM +REM Thus, we pass -U to groff(1), and everything else to convert(1). +REM +setlocal +set groff_opts= +set convert_opts= +set format=png + +:loop +if "%1" == "" goto body +if "%1" == "-v" goto version +if "%1" == "--version" goto version +if "%1" == "--help" goto usage +if not "%1%" == "-unsafe" goto format +set groff_opts=-U +shift +goto loop +:format +if not "%1" == "-format" goto convert +set format=%2 +shift +shift +goto loop +:convert +set convert_opts=%convert_opts% %1 +shift +goto loop + +:body +REM echo %groff_opts% %convert_opts% %format% + +set rnd1=%RANDOM% +set rnd2=%RANDOM% +if "%GROFF_TMPDIR%" == "" goto deftmp +set tdir=%GROFF_TMPDIR%\grap2graph-%rnd1% +goto runpipe +:deftmp +sei tdir=%TEMP%\grap2graph-%rnd1% + +:runpipe +mkdir %tdir% +echo .G1 > %tdir%\wrap +cat >> %tdir%\wrap +echo .G2 >> %tdir%\wrap +grap %tdir%\wrap | groff -p %groff_opts% -Tps -P-pletter | convert -trim -crop 0x0 %convert_opts% - %tdir%/grap2graph.%format% +cat %tdir%/grap2graph.%format% +rm -rf %tdir% +goto end + +:version +echo GNU grap2graph (groff) version 1.22.3 +goto end + +:usage +echo usage: grap2graph ^[ option ...^] ^< in ^> out +echo. + +:end +endlocal diff -ruN groff-1.22.2/arch/mingw/groffer.cmd groff-1.22.3/arch/mingw/groffer.cmd --- groff-1.22.2/arch/mingw/groffer.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/groffer.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/grog.cmd groff-1.22.3/arch/mingw/grog.cmd --- groff-1.22.2/arch/mingw/grog.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/grog.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/gropdf.cmd groff-1.22.3/arch/mingw/gropdf.cmd --- groff-1.22.2/arch/mingw/gropdf.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/gropdf.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl -w %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/Makefile.sub groff-1.22.3/arch/mingw/Makefile.sub --- groff-1.22.2/arch/mingw/Makefile.sub 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/Makefile.sub 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,66 @@ +# Copyright (C) 2014 +# 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 +# +WINSCRIPTS=\ + afmtodit.cmd \ + chem.cmd \ + gperl.cmd \ + gpinyin.cmd \ + grap2graph.cmd \ + groffer.cmd \ + grog.cmd \ + gropdf.cmd \ + mmroff.cmd \ + neqn.cmd \ + pdfmom.cmd \ + roff2dvi.cmd \ + roff2html.cmd \ + roff2pdf.cmd \ + roff2ps.cmd \ + roff2text.cmd \ + roff2x.cmd + +RM=rm -f + +all: $(make_winscripts) +install_data: $(make_install_winscripts) +uninstall_sub: $(make_uninstall_winscripts) + +winscripts: $(WINSCRIPTS) + +install_winscripts: $(WINSCRIPTS) + -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) + for f in $(WINSCRIPTS); do \ + $(RM) $(DESTDIR)$(bindir)/$$f; \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(bindir)/$$f; \ + done + +uninstall_winscripts: + -for f in $(WINSCRIPTS); do \ + $(RM) $(DESTDIR)$(bindir)/$$f; \ + done + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/arch/mingw/mmroff.cmd groff-1.22.3/arch/mingw/mmroff.cmd --- groff-1.22.2/arch/mingw/mmroff.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/mmroff.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/neqn.cmd groff-1.22.3/arch/mingw/neqn.cmd --- groff-1.22.2/arch/mingw/neqn.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/neqn.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,6 @@ +@echo off +setlocal +set Path=%~dp0;%Path% +if not "%GROFF_BIN_PATH%" == "" set Path=%GROFF_BIN_PATH%;%Path% +eqn -Tascii %* +endlocal diff -ruN groff-1.22.2/arch/mingw/pdfmom.cmd groff-1.22.3/arch/mingw/pdfmom.cmd --- groff-1.22.2/arch/mingw/pdfmom.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/pdfmom.cmd 2014-11-04 09:38:35.432521409 +0100 @@ -0,0 +1,2 @@ +@echo off +perl -w %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2dvi.cmd groff-1.22.3/arch/mingw/roff2dvi.cmd --- groff-1.22.2/arch/mingw/roff2dvi.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2dvi.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2html.cmd groff-1.22.3/arch/mingw/roff2html.cmd --- groff-1.22.2/arch/mingw/roff2html.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2html.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2pdf.cmd groff-1.22.3/arch/mingw/roff2pdf.cmd --- groff-1.22.2/arch/mingw/roff2pdf.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2pdf.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2ps.cmd groff-1.22.3/arch/mingw/roff2ps.cmd --- groff-1.22.2/arch/mingw/roff2ps.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2ps.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2text.cmd groff-1.22.3/arch/mingw/roff2text.cmd --- groff-1.22.2/arch/mingw/roff2text.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2text.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/mingw/roff2x.cmd groff-1.22.3/arch/mingw/roff2x.cmd --- groff-1.22.2/arch/mingw/roff2x.cmd 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/arch/mingw/roff2x.cmd 2014-11-04 09:38:35.433521397 +0100 @@ -0,0 +1,2 @@ +@echo off +perl %~dpn0 %* diff -ruN groff-1.22.2/arch/misc/Makefile.sub groff-1.22.3/arch/misc/Makefile.sub --- groff-1.22.2/arch/misc/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/arch/misc/Makefile.sub 2014-11-04 09:38:35.191524422 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 2004, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 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 . @@ -23,4 +23,10 @@ shdeps.sed: $(srcdir)/shdeps.sh $(SHELL) $(srcdir)/shdeps.sh "$(RT_SEP)" "$(SH_SEP)" "$(bindir)" > $@ -# eof +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/arch/misc/shdeps.sh groff-1.22.3/arch/misc/shdeps.sh --- groff-1.22.2/arch/misc/shdeps.sh 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/arch/misc/shdeps.sh 2014-11-04 09:38:35.191524422 +0100 @@ -1,7 +1,7 @@ #! /bin/sh # shdeps.sh: Generate OS dependency fixups, for `groff' shell scripts # -# Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Written by Keith Marshall (keith.d.marshall@ntlworld.com) # # Invoked only by `make', as: diff -ruN groff-1.22.2/BUG-REPORT groff-1.22.3/BUG-REPORT --- groff-1.22.2/BUG-REPORT 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/BUG-REPORT 2014-11-04 09:38:35.138525085 +0100 @@ -1,3 +1,22 @@ +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + + Groff Bug Report Please read the PROBLEMS file before sending in a bug report. @@ -53,3 +72,8 @@ [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.] + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/ChangeLog groff-1.22.3/ChangeLog --- groff-1.22.2/ChangeLog 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog 2014-11-04 09:38:35.138525085 +0100 @@ -1,3 +1,1820 @@ +2014-11-04 Werner LEMBERG + + * src/libs/gnulib/*: Regenerate autotool files. + +2014-11-04 Werner LEMBERG + +Version 1.22.3 released +======================= + + * NEWS, README, doc/webpage.ms: Updated. + + * doc/texinfo.tex: Updated from `texinfo' repository. + +2014-10-29 Bertrand Garrigues + + * Makefile.in (OTHERDIRS): Mention `afmtodit' first. + + Otherwise, some fonts in `devpdf' (`U-*') are not built. + +2014-10-26 Eli Zaretskii + Werner LEMBERG + + Add Windows `.cmd' wrapper files. + + * arch/mingw/*: New files, provided by Eli. + + * Makefile.in (make_winscripts, make_install_winscripts, + make_uninstall_winscripts): New target variables. + (MDEFINES): Add them. + (OTHERDIRS): Add `arch/mingw'. + + * m4/groff.m4 (GROFF_CMD_FILES): New macro + * configure.ac: Call it. + * configure: Regenerated. + +2014-10-23 Bertrand Garrigues + + Fix `install' and `uninstall' issues. + + * contrib/chem/Makefile.sub (install_data): Fix build with option + --with-doc=no passed to configure (target `install_examples' + should not be executed). + + * contrib/chem/Makefile.sub (uninstall_sub): `uninstall' failed + if directories to be removed were not present. + + * contrib/gpinyin/Makefile.sub (uninstall_sub): Ditto. + + * contrib/hdtbl/Makefile.sub (GENFILES): generated files should + depend on the creation of the `examples' directory. + +2014-10-23 Daiki Ueno + + * m4/iconv.m4: Really avoid false detection of non-working iconv. + +2014-10-21 Daiki Ueno + + iconv: avoid false detection of non-working iconv + + The INBUF/OUTBUF arguments of iconv can be either 'const char **' + or 'char **'. If CC is g++, the difference causes a compile error + and thus leads to a false detection of non-working iconv. + Reported by Eli Zaretskii and Werner LEMBERG in: + . + + * m4/iconv.m4 (AM_ICONV_LINK): Try all possible argument types of + iconv. Bump serial number. + +2014-10-20 Werner LEMBERG + + * src/libs/gnulib/lib/wctype.in.h: Include `config.h'. + + Problem reported by Eli Zaretskii . + + This is a temporary hack to make groff compile with MinGW. After + the switch to an automake infrastructure, together with proper use + of `gnulib', we can safely replace the patched file with a standard + version. + +2014-10-19 Doug McIlroy + + Fix Savannah bug #42151. + + * src/preproc/eqn/lex.cpp (file_input::read_line): Handle CR/LF. + * src/preproc/pic/pic.cpp (file_input::read_line): Ditto. + +2014-10-18 Werner LEMBERG + + [mdoc] Add Darwin version string for OS X 10.10. + + * tmac/doc-common (doc-operating-system-Darwin-14.0.0): New string. + + * tmac/groff_mdoc.man: Updated. + +2014-10-15 Werner LEMBERG + + * doc/webpage.ms: Remove obsolete references to tarballs and diffs. + + Reported by Dave Kemper . + +2014-10-15 Colin Watson + + Always distribute the parts of groff that require X11. + + * Makefile.in (ALLLIBDIRS): Clone from `LIBDIRS', but include + src/devices/libxutil unconditionally. + (ALLPROGDIRS): Clone from `PROGDIRS', but include + src/devices/xditview and src/utils/xtotroff unconditionally. + (DISTDIRS): Use `ALLLIBDIRS' and `ALLPROGDIRS' rather than `LIBDIRS' + and `PROGDIRS'. + +2014-10-14 Keith Marshall + + Minor update to NEWS for pdfroff. + + * NEWS (pdfroff): Note use of PHASE register, and not pdf:href.map, + to choose when to emit toc_relocation control record. + +2014-10-13 Keith Marshall + + For pdfroff, deduce "--no-toc-relocation" from input stream. + + * NEWS: Add notification; document the effect of changes, as recorded + in contrib/pdfmark/ChangeLog. + +2014-10-12 Ingo Schwarze + + [mdoc] Support `Mdocdate' CVS keyword substitution. + This fixes Savannah bug #42968. + + This feature is used for OpenBSD manuals. + + * tmac/doc-common (Dd): Handle `$Mdocdate:' argument. + + * tmac/groff_mdoc.man: Document it. + +2014-10-12 Ingo Schwarze + + [mdoc] Add `.At III' and `.St -iso8601'. + This fixes Savannah bug #42971. + + * tmac/doc-syms: Add corresponding version strings. + + * tmac/groff_mdoc.man: Synchronize. + +2014-10-12 Ingo Schwarze + + [mdoc] Update operating system release numbers. + This fixes Savannah bug #42969. + + * tmac/doc-common: Update NetBSD, OpenBSD, FreeBSD, and DragonFly + version strings. + + * tmac/groff_mdoc.man: Synchronize. + +2014-10-12 Werner LEMBERG + + * doc/Makefile.in: Use `LC_ALL' in addition to `LANG'. + Suggested by Steffen. + +2014-10-12 Werner LEMBERG + + * doc/groff.texinfo: Make PDF version compilable with makeinfo 5.x. + + makeinfo 5.x handles macro expansion better, which changes the way + how an \LE macro (for a less-than sign) has to be defined. However, + since we can't be sure that the latest version of `texinfo.tex' gets + used with makeinfo 5.x only, we would have to support both 4.x and + 5.x. No idea whether this is possible at all... For this reason, + we now simply use @value directly instead of wrapping it into a + macro, avoiding any issues. + +2014-10-12 Werner LEMBERG + + [doc] Protect against picky `sed' programs. + Problem reported by Axel Kielhorn . + + * doc/Makefile.in (GROFF_BIN_PATH, GROFF): Add `LANG=' to avoid + interpretation of non-ASCII characters by sed. + +2014-10-12 Michail Vidiassov + + * tmac/doc-common: Add new Darwin versions. + +2014-10-12 Werner LEMBERG + + * doc/groff.texinfo: s/which/that/ where apropriate. + +2014-10-12 Werner LEMBERG + + * doc/groff.texinfo: Various minor fixes. + + Most of those glitches have been found by comparing the info output + from makeinfo 4.13 and the current SVN development version (of + makeinfo). + +2014-10-12 Werner LEMBERG + + * doc/groff.texinfo: Improve indexing. + + Change @DefXXXItem and @DefXXXListEnd macros to not insert an index + entry. New macro variants with a trailing `x' (like `@DefreqItemx') + can override this. + + Update macro calls where necessary. + +2014-10-12 Werner LEMBERG + + [doc] Improve call to generation of `groff.pdf'. + Problem reported by Axel Kielhorn . + + Since `groff.texinfo' contains latin-1 characters, some sed + implementations (like the one used on Mac OS 10.8) fail if called + with the wrong locale. Basically, this is a `texi2dvi' bug, but we + can set `LANG' by ourselves to improve the situation. + + * doc/Makefile.in (.texinfo.dvi, .texinfo.pdf): Set `LANG' + environment variable to empty string. + +2014-10-12 Werner LEMBERG + + [doc] Correctly handle `MAKEINFO' environment variable. + Bug introduced in commit from 2014-03-29. + + * m4/groff.m4 (GROFF_MAKEINFO): Don't set MAKEINFO to empty string + before actually testing it. + + * configure: Regenerated. + +2014-10-11 Bertrand Garrigues + + Fix an issue on `make dist'. + + In order to make the tarball, `make dist' copies src/libs/gnulib + directories into the `tmp' directory without the `.deps' + directories, causing the failure of `make distclean' in + tmp/src/libs/gnulib. Forcing a call to `config.status' recreates + the `.deps' directories. + + * Makefile.in (dist): For gnulib, call `config.status' before `make + distclean'. + +2014-10-11 Bernd Warken + + * src/roff/grog/*.pl: Remove call from `IPC', use normal system + `instead'. + +2014-10-11 Guillem Jover + + Add support for various BSD versions. + + * tmac/doc-common: Add new FreeBSD and DragonFly versions. + +2014-10-11 Keith Marshall + + Refactor .psbb request handling code. + + * src/roff/troff/input.cpp (do_ps_file): Reimplement it, using... + (psbb_locator): ...this new locally declared and implemented class; + its constructor replaces all `do_ps_file()' capability, delegating + to other class methods, as appropriate. + (assign_registers): Encapsulate it, as a `psbb_locator' method. + (ps_get_line): Likewise, also renaming it to become... + (get_line): ...this class method; its internally defined `lastc' + static variable also becomes a non-static class member variable. + (PSBB_RANGE_IS_BAD, PSBB_RANGE_IS_SET, PSBB_RANGE_AT_END): New + manifest constants; define them. They are now used by... + (parse_bounding_box): ...this function, now also encapsulated as + a `psbb_locator' class method, to convey parsing status. + (bounding_box): Struct obsoleted by `psbb_locator'; delete it. + (ps_bbox_request): Delegate to `psbb_locator'. + +2014-10-11 Werner LEMBERG + + Various clean-ups. + + * NEWS: More updates. + + * REVISION: Set to 3. + + * doc/groff.texinfo: Update version and year. + + * configure: Regenerated. + + * src/roff/groff/groff.cpp (main) <'v'>: Update copyright year. + +2014-10-11 Werner LEMBERG + + Update generic GNU files to recent versions. + + * INSTALL.gen, config.guess, config.rpath, config.sub, + contrib/groff_filenames/Makefile.sub, doc/fdl.texi, doc/texinfo.tex, + doc/txi-en.tex, install-sh, m4/ax_prog_perl_version.m4, + m4/codeset.m4, m4/fcntl-o.m4, m4/glibc21.m4, m4/iconv.m4, + m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/localcharset.m4, + src/include/localcharset.h, src/libs/gnulib/Makefile.in, + src/libs/gnulib/aclocal.m4, src/libs/gnulib/build-aux/compile, + src/libs/gnulib/build-aux/config.guess, + src/libs/gnulib/build-aux/config.sub, + src/libs/gnulib/build-aux/depcomp, + src/libs/gnulib/build-aux/install-sh, + src/libs/gnulib/build-aux/snippet/arg-nonnull.h, + src/libs/gnulib/build-aux/snippet/c++defs.h, + src/libs/gnulib/build-aux/snippet/warn-on-use.h, + src/libs/gnulib/configure, src/libs/gnulib/lib/Makefile.in, + src/libs/gnulib/lib/config.charset, src/libs/gnulib/lib/intprops.h, + src/libs/gnulib/lib/localcharset.c, + src/libs/gnulib/lib/localcharset.h, src/libs/gnulib/lib/ref-add.sin, + src/libs/gnulib/lib/ref-del.sin, src/libs/gnulib/lib/stdbool.in.h, + src/libs/gnulib/lib/stddef.in.h, src/libs/gnulib/lib/streq.h, + src/libs/gnulib/lib/unitypes.in.h, + src/libs/gnulib/lib/uniwidth.in.h, + src/libs/gnulib/lib/uniwidth/cjk.h, + src/libs/gnulib/lib/uniwidth/width.c, src/libs/gnulib/lib/verify.h, + src/libs/gnulib/lib/wchar.in.h, src/libs/gnulib/lib/wctype-h.c, + src/libs/gnulib/lib/wctype.in.h, src/libs/gnulib/lib/wcwidth.c, + src/libs/gnulib/m4/00gnulib.m4, src/libs/gnulib/m4/Makefile.in, + src/libs/gnulib/m4/codeset.m4, src/libs/gnulib/m4/configmake.m4, + src/libs/gnulib/m4/extensions.m4, src/libs/gnulib/m4/fcntl-o.m4, + src/libs/gnulib/m4/glibc21.m4, src/libs/gnulib/m4/gnulib-tool.m4, + src/libs/gnulib/m4/inttypes-pri.m4, + src/libs/gnulib/m4/localcharset.m4, src/libs/gnulib/m4/longlong.m4, + src/libs/gnulib/m4/onceonly.m4, src/libs/gnulib/m4/wchar_t.m4, + src/libs/gnulib/m4/wint_t.m4, src/libs/libgroff/config.charset, + src/libs/libgroff/localcharset.c, src/libs/libgroff/ref-add.sin, + src/libs/libgroff/ref-del.sin, src/preproc/refer/refer.man: Do it. + +2014-10-11 Werner LEMBERG + + * NEWS, MANIFEST: Updated. + +2014-10-11 Werner LEMBERG + + * Makefile.in (OTHERDIRS, NOMAKEDIRS): Remove `ideal' references. + +2014-10-10 Bernd Warken + + * contrib/gideal: Temporarily remove this directory, because the + documentation and the preprocessor are not yet finished for + groff-1.2.23. + +2014-10-10 Werner LEMBERG + + * Makefile.in (dist): Clean up `src/libs/gnulib'. + +2014-10-10 Werner LEMBERG + + * doc/webpage.ms: Updates. + + The README and NEWS sections are not yet synchronized, though. + +2014-10-09 Ingo Schwarze + + * Makefile.in: Let `clean' and `distclean' descend into gnulib. + + This fixes Savannah bug #42970. + +2014-10-02 Bertrand Garrigues + + Set default X11 resources dir to `$prefix/lib/X11/app-defaults'. + + Previously, X11 resources for gxditview were installed in + `/usr/X11/lib/X11/app-defaults', no matter which prefix was set. + + Now, gxditview resources are installed in + `appresdir=$prefix/lib/X11/app-defaults'. If `appresdir' is not a + standard X11 resource directory, the environment variable + `XFILESEARCHPATH' should be set to this path. + + The behaviour of `--with-appresdir' is unchanged: This option can + still be used to set `appresdir', and its value will not be modified + by the prefix. + + * m4/groff.m4 (GROFF_APPRESDIR_DEFAULT): Implement new behaviour. + Fix detection app-defaults location on the system. + (GROFF_APPRESDIR_CHECK): Updated. + + * configure.ac: Improve output of configuration. + * configure: Regenerated. + + * NEWS: Mention it. + +2014-09-27 Werner LEMBERG + + Set `transparent' flag for `\[cq]. + Problem reported by Dave Kemper . + + * src/roff/troff/input.cpp (init_charset_table): Do it. + + * doc/groff.texinfo (Sentences, Using Symbols), man/groff_diff.man: + Document it. + +2014-09-25 Bernd Warken + + * src/roff/grog/*.pl: Program more reasonable subs (functions). + Repair details in many places. + +2014-09-24 Keith Marshall + + Refactor psbb line input function; avoid a buffer overrun. + + * src/roff/troff/input.cpp (ps_get_line): Declare it as `static'. + Refactor, to avoid the overhead of character look-ahead and push-back + on CR stream input. Add new `dscopt' parameter, in place of internal + `err' variable; update all call references, passing value of... + (DSC_LINE_MAX_ENFORCE): ...this new manifest constant; define it. + (DSC_LINE_MAX_IGNORED): Likewise; currently unused, but intended for + future use as an alternative to `DSC_LINE_MAX_ENFORCE'. + (DSC_LINE_MAX_CHECKED): New manifest constant; used internally only. + (PS_LINE_MAX): Manifest constant, renamed for notional consistency... + (DSC_LINE_MAX): ...to this; defined value remains as 255. + (do_ps_file): Increase stack allocation for `buf' char array; former + allocation of PS_LINE_MAX (now DSC_LINE_MAX) bytes exposed a potential + buffer overrun, after reading DSC_LINE_MAX bytes; two additional bytes + are required, to accommodate a terminating LF and NUL. Add `dscopt' + parameter, with value `DSC_LINE_MAX_ENFORCE', in each of three calls + to `ps_get_line()'. + +2014-09-20 Bernd Warken + + * src/roff/groff/Makefile.sub: Remove too much deleting while + running `make'. + +2014-09-20 Bernd Warken + + * `Makefile.sub' in the whole groff source tree: Add $(RM) and + change all `rm -f'. Add directory test before `rmdir'. + +2014-09-20 Bernd Warken + + * Man-pages (*.man) in the whole groff source tree: Improve + documents by adding \[co], \[cq], \[aq] instead of ` or ' and use + also \[co] as long as it makes sense. Remove \[en] in the years + date in order to allow the automatic license year increasing. + +2014-09-18 Bernd Warken + + * /*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * tmac/*: Improve the license information and Emacs setup. + +2014-09-18 Bernd Warken + + * src/utils/xtotroff/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/tfmtodit/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/pfbtops/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/lookbib/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/lkbib/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/indxbib/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/hpftodit/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/afmtodit/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/utils/addftinfo/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/roff/troff/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/roff/nroff/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/roff/grog/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/roff/groff/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/preproc/tbl/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/preproc/soelim/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/preproc/refer/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/preproc/preconv/*: Improve the license information and Emacs + setup. + +2014-09-18 Bernd Warken + + * src/preproc/pic/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/preproc/html/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/preproc/grn/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/preproc/eqn/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/libs/libxutil/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/libs/libgroff/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/libs/libdriver/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/libs/libbib/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/libs/gnulib/*: Improve the license information and Emacs + setup. The former run of that was not yet complete. + +2014-09-17 Bernd Warken + + * src/libs/gnulib/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/include/*: Improve the license information and Emacs setup. + +2014-09-17 Bernd Warken + + * src/devices/grotty/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/grops/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/gropdf/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/grolj4/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/grolbp/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/grohtml/*: Improve the license information and Emacs + setup. + +2014-09-17 Bernd Warken + + * src/devices/grodvi/*: Improve the license information and Emacs + setup. + +2014-09-15 Bernd Warken + + * man/*.man: Improve the license information (definiton of .co and + .au). + +2014-09-15 Bernd Warken + + * m4/*.m4: Improve the license information without changing the + related information. + +2014-09-06 Werner LEMBERG + + Fix build issues. + + * m4/groff.m4: Fix typo. + s/refer_dir/referdir/ for consistency. + + * configure: Regenerated. + + * Makefile.in: s/refer_dir/referdir/ for consistency. + + * src/preproc/refer/Makefile.sub (install_data, uninstall_sub): + Don't handle binaries or manpages; this is handled elsewhere + already. Right now, only install and uninstall the `refer' data + directory. + +2014-09-04 Bernd Warken + + * configure: When I change the `configure' file manually, the + refer data dir is created. But when running aclocal/autoreconf, + the dir is again not created. + +2014-09-04 Bernd Warken + + * m4/groff.m4, configure.ac, Makefile.in, + src/preproc/refer/Makefile.sub: Add information to create a refer + data directory by installing. That dir is not yet generated + anyway. + +2014-09-05 Werner LEMBERG + + Regenerate configure files with correct parameters. + + * configure.ac: Comment out m4 macros still missing. + + * aclocal.m4, config.hin, configure: Regenerated. + +2014-09-04 Bernd Warken + + * some files in doc: Change the copying years to package form. + But many files have strange or no copying information. + +2014-09-04 Bernd Warken + + * contrib/pic2graph/Makefile.sub: Change the copying years to + package form. + +2014-09-04 Bernd Warken + + * FDL: Replace the changed actual file by the original `fdl.txt' + from . + +2014-09-03 Bernd Warken + + * contrib/grap2graph/Makefile.sub: Remove `Last updates' from all + files. Add and repair copyright. Write Emacs setup. + +2014-09-03 Bernd Warken + + * src/preproc/refer/refer.man: Include more distances for better + reading of the source file. Add `%' for documentation of + bibliographic database lines. + +2014-09-03 Bernd Warken + + * tree contrib/eqn2graph: Remove `Last updates' from all files. + Add and repair copyright. Write Emacs setup. + +2014-09-03 Bernd Warken + + * tree `arch': Remove `Last updates' from all files. Add + and repair copyright. Write Emacs seetup. + +2014-09-03 Bernd Warken + + * : Remove `Last updates' from all + files. Only `timestamp' values are left. + +2014-09-03 Bernd Warken + + * : Repair copyright years from + starting year to actual year for almost all files. + +2014-09-03 Bernd Warken + + * autom4te.cache: Remove that tree after running + `autoconf' or `autoreconf'. + + * .gitignore: Add all files within `autom4te.cache' to get rid of + them automatically. Not sure so far, if this works. + +2014-09-03 Bernd Warken + + * BUG-REPORT, FDL, INSTALL*, MANIFEST, MORE.STUFF, NEWS, PROBLEMS, + PROJECTS, README*: Remove Emacs settings for coding style. Change + copyright years from 1989-2014 and 1993-2014 into 2014 only. + +2014-09-03 Bernd Warken + + * configure.ac, Makefile.in: Try to use /usr/local/share directory + for `refer'. Does not work so far. + +2014-09-02 Bernd Warken + + * All Makefile*: Add Emacs settings and lacking licenses. + +2014-09-02 Bernd Warken + + * BUG-REPORT, FDL, INSTALL*, MANIFEST, MORE.STUFF, NEWS, PROBLEMS, + PROJECTS, README*: Add Emacs settings. + +2014-09-02 Bernd Warken + + * PROJECTS: Add TODO for `refer'. + +2014-08-31 Bernd Warken + + * man/roff.man (roff.7): Replace Heirloom links to more actual + places. Create macro definitions for authors (.au) and copying + (.co). + +2014-08-30 Bernd Warken + + * man/groff_font.man (groff_font.7): Restructure + file format, but keep content. + +2014-08-30 Bernd Warken + + * src/utils/addftinfo/addftinfo.man (addftinfo.1): Restructure + file format, but keep content. + +2014-08-30 Bernd Warken + + * man/roff.man (roff.7): Repair documentation of heirloom. + +2014-08-28 Bernd Warken + + * src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add `gpinyin'. + + * src/roff/grog/grog.man: Restructure `SEE ALSO'. + +2014-08-28 Bernd Warken + + * contrib/gpinyin: Make it runnable, version 1.0.0. + +2014-08-20 Bernd Warken + + * groff.7 (man/groff.man): Add further preprocessor regions. + Repair documentation for Unicode. + +2014-08-08 Bernd Warken + + * configure.ac, configure, Makefile.in, m4/groff.m4: Install paths + for implementing contrib/gpinyin's sub.pl. + +2014-08-06 Bernd Warken + + * man/groff_char.man: Add description for displaying `uxxxx' as + `\[uxxxx]'. + +2014-08-05 Bernd Warken + + * man/groff.man (groff.7): Replace \[rs] to \e as far as useful. + +2014-08-05 Bernd Warken + + * man/groff.man (groff.7): Add documentation for the Unicode + escapes \[u....] and \[u.....]. + +2014-08-02 Bernd Warken + + * src/roff/groff/groff.man: Improve documentation for `utf8'. + +2014-08-01 Bernd Warken + + * contrib/gpinyin: New preprocessor for having the European-style + writing `pinyin' for the Chinese language. + +2014-07-22 Bernd Warken + + * groff.7 (man/groff.man): Add some useful special characters. + +2014-07-21 Bernd Warken + + * tbl.1 (src/preproc/tbl/tbl.man): Add simple examples. + +2014-07-12 Bernd Warken + + * groff.7 (man/groff.man): Add section about underlining. + +2014-07-07 Bernd Warken + + * man/groff.man (groff.7): Add some basic special characters + `\(xy'. + +2014-07-06 Bernd Warken + + * grog, groffer: Minor repairing. + +2014-07-06 Bernd Warken + + * src/roff/grog/subs.pl: Repair ligatures handling. + +2014-07-06 Bernd Warken + + * src/roff/grog/subs.pl: Correct handling of standard input. + +2014-07-06 Bernd Warken + + * src/roff/groff/groff.man: Minor correction. + +2014-07-06 Bernd Warken + + * src/roff/grog/*: Minor corrections. + +2014-07-05 Bernd Warken + + * src/roff/groff/groff.cpp: In `usage()' and `help()' order + alphabetically. + +2014-07-05 Bernd Warken + + * grog.pl, subs.pl: Heavily improve argument handling and `groff' + command line creation. + +2014-07-05 Bernd Warken + + * grog.man: Make file runnable for `doclifter'. + +2014-07-05 Bernd Warken + + * grog.man: Replace all .de by copying. Restrict all .char names + to lenght 2 only. + +2014-07-04 Bernd Warken + + * grog.man: Minor optimization. + +2014-07-04 Bernd Warken + + * grog.man: Transform in classical man-page style. + +2014-07-04 Bernd Warken + + * grog.pl, subs.pl: Add option `--warnings'. Rename + `--with_ligatures' to `--ligatures', but keep `--with_ligatures' + for compatibility. + +2014-07-03 Bernd Warken + + * Makefile.in: Remove directories `groffer/perl' and + `groffer.shell', which don't exist any more. + +2014-07-03 Bernd Warken + + * PROJECTS: Mention the start of the `ideal' project. + +2014-06-21 Ingo Schwarze + + * Makefile.in: Unbreak make install: + Add missing gideal dirs to the dist tarball. + +2014-06-19 Bernd Warken + + * src/roff/groff/groff.man: Correct the collection of the + installation directories. + +2014-06-19 Bernd Warken + + * src/roff/groff/groff.man: Add the installation file and + directory positions of the whole package with @...@. + +2014-06-19 Bernd Warken + + * man/groff.man, src/roff/groff/groff.man: Add file position + before and after installation and the latest update. + +2014-06-18 Bernd Warken + + * src/roff/grog/grog.pl: Corrections about `require' and `our' + definitions. + + * src/roff/grog/subs.pl: In the `groff' output command line, split + the single character options collections into different + 1-character options, each with a leading minus `-'.. +2014-06-20 Bernd Warken + + * src/roff/grog/subs.pl: Repair call of `push'. + +2014-06-18 Bernd Warken + + * src/roff/grog/subs.pl: Minor correction at `do_first_line'. + +2014-06-18 Bernd Warken + + * src/roff/grog/subs.pl: Adjust for first lines with non-preproc + and not-tmac names to be ignored. + +2014-06-18 Bernd Warken + + * src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add new first line + of roff files with the names of the needed preprocessors and the + actual tmac, see 2014-06-17 Ulrich Lauther. Replace the + word `ideal' by `gideal', when the preprocessor is meant. + +2014-06-18 Bernd Warken + + * src/roff/grog/Makefile.sub: Add $(RM). + + * src/roff/grog/grog.pl: Remove call to perl_test.pl. `require + 5.6;' is enough as Perl test. + + * src/roff/grog/perl_test.pl: Remove this file. + +2014-06-18 Bernd Warken + + * ChangeLog: Add Emacs-mode and a separator for the license. + +2014-06-17 Ulrich Lauther + + * grog: Invent new first comment line of roff files with long + names of needed preprocessors and the tmac. + +2014-06-17 Bernd Warken + + * src/roff/grog/subs.pl: Correct handling of option `-J' for + ideal. + +2014-06-17 Bernd Warken + + * src/roff/groff/groff.cpp, src/roff/groff/pipeline.h, + * src/roff/grog/subs.pl: Add `groff' option `-J' for `gideal'. + +2014-06-16 Bernd Warken + + * src/roff/grog/subs.pl: Remove too early listing of 3 `groff' + preprocessors options: gideal, glilypond, gperl. + +2014-06-16 Bernd Warken + + * contrib/gideal: New project for installing `ideal' for `groff'. + + * Makefile.in: Add `gideal' for `OTHERDIRS'. + +2014-06-15 Bernd Warken + + * src/roff/grog/grog.pl, src/roff/grog/subs.pl: Repair argument + handling for output `groff' line. + +2014-06-15 Bernd Warken + + * src/roff/grog/grog.pl, src/roff/grog/grog.man: Correct and add + the documentation for filespec options. + +2014-06-14 Bernd Warken + + * src/roff/grog/subs.pl: Activate handling of `--run', such that + now the generated `groff' command line can run. + +2014-06-14 Bernd Warken + + * src/roff/grog/subs.pl: Repair handling of filespec arguments. + +2014-06-12 Bernd Warken + + * src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add testing + methods of Ralph Corderoy's `grog.sh' of 2006. Add primary usage + of file name extensions. + +2014-06-10 Bernd Warken + + * src/roff/grog/grog.pl: Totally rewrite the `grog' version, + starting at the last stable version. Write many parts as `sub' + functions. + + * src/roff/grog/subs.pl: New file by splitting the src file + `grog.pl', such that all functions get into the new file + `subs.pl'. + + * src/roff/grog/Makefile.sub: Add file `subs.pl', which goes into + the `grog' libdir. + +2014-06-03 James Cloos + + * src/roff/grog/grog.pl: The errors with `ligatures' come also + from `TeX GYRE' fonts. Print this information, when `grog' should + work with the `pdf' device. + +2014-06-02 Bernd Warken + + * src/roff/grog/grog.pl: The `grog' version of yesterday has many + bugs. So reinstall an old version of `grog'. + +2014-06-01 Bernd Warken + + * src/roff/grog/Makefile.sub: Remove changing of first line + `#! ...'. + +2014-06-01 Bernd Warken + + * src/roff/grog/grog.pl: Remove `$Sp' mostly. Reorder script. + Check and repair requests. Add final character `$' to many + checked requests. + +2014-06-01 Bernd Warken + + * man/roff.man: Move .TH at the beginning. + +2014-05-29 Bernd Warken + + * man/groff.man: In special characters, add the mentioning of the + `groff' writing `\[xy]'. + +2014-05-27 Bernd Warken + + * man/groff_char.man: Finish notes in all tables. + +2014-05-26 Bernd Warken + + * man/groff_char.man: Add notes in some tables, more will come. + +2014-05-26 Bernd Warken + + * src/roff/grog/grog.pl: Add further first line characters for + single character `groff' options. + + * src/roff/grog/grog.man: make generated options more readable. + +2014-05-26 Bernd Warken + + * src/roff/grog/grog.pl: Add detection of `.\" [eprt]' as first + line to `grog'. Change usage of `$Sp' to reasonable efforts in + `groff'. + + * src/roff/grog/grog.man, man/groff_char.man: Add website for + license text, not only the postal address. + +2014-04-03 Steffen Nurpmeso + + * */Makefile.*: Path quoting fixes, whitespace, formatting. + + Remove many quotes (and introduce a few as additional guards) + since groff's build system is generally not set up to properly + handle paths that need quoting. + +2014-04-03 Steffen Nurpmeso + + * Makefile.comm (extraclean): Don't delete `old'. + + The rule calling `rm -f' was originally thought to remove private, + temporary files. However, we now have a subdirectory called `old' + in `fonts/devps' that may not be removed, and trying so now causes + an error because we no longer ignore the returned error code of + `rm'. + +2014-04-03 Steffen Nurpmeso + + * Makefile.in (OTHERDIRS): Fix directory order. + + This has been accidentally broken in commit 51476bee from + 2014-02-25. + +2014-04-03 Steffen Nurpmeso + + * src/devices/gropdf/pdfmom.pl: Fix perl(1) warning. + +2014-03-30 Werner LEMBERG + + * configure: Regenerated. + +2014-03-30 Steffen Nurpmeso + + * */Makefile.*: Put straight error-prevention prefixes for `rm'. + +2014-03-30 Steffen Nurpmeso + + `uninstall' target: Avoid spurious and misleading error messages. + + * Makefile.comm (uninstall_dev): Improve. + + * font/devpdf/Makefile.sub (install_data): Remove superfluous `rm'. + (uninstall_sub): Improve. + + * src/roff/groff/Makefile.sub (uninstall_sub): Fix. + +2014-03-30 Steffen Nurpmeso + + Fixes for `uninstall' target. + + * Makefile.in (uninstall_dirs): Use `DESTDIR'. + + * src/libs/libgroff/Makefile.sub (uninstall_charset_data): Typo. + + * src/roff/groff/Makefile.sub (uninstall_sub): Typo. + + * src/roff/grog/Makefile.sub (uninstall_sub): Minor. + +2014-03-30 Steffen Nurpmeso + + * src/roff/grog/Makefile.sub (install_data): Typo. + +2014-03-29 Steffen Nurpmeso + + Add fine-tuning of doc generation to `configure'. + + * m4/groff.m4 (GROFF_DOC_CHECK): New macro, handling option + `--with-doc' and its new arguments. It sets + `docadd_{html,info,other,pdf,examples}' and exports + `make{_,_install_,_uninstall_}{otherdoc,examples}'. + (GROFF_MAKEINFO): Extended to export + `make{_,_install_,_uninstall_}infodoc'. + (GROFF_HTML_PROGRAMS): Extended to export + `make{_,_install_,_uninstall_}{htmldoc,htmlexamples}'. + (GROFF_PDFDOC_PROGRAMS): Extended to export + `make{_,_install_,_uninstall_}{pdfdoc,pdfexamples}'. + (GROFF_INSTALL_INFO): Guard test with `docadd_info'. + + * configure.ac: Use GROFF_DOC_CHECK. + * Makefile.in: Updated. + + * doc/Makefile.sub: Handle examples separately, controlled by + $(make{_,_install_,_uninstall_}examples). + +2014-03-27 Bjarni Ingi Gislason + + * tmac/www.tmac (TAG): Define register `PN'. + +2014-03-27 Bjarni Ingi Gislason + + * tmac/an-ext.tmac (EX, EE): Preserve font family. + +2014-03-17 Werner LEMBERG + + * src/preproc/eqn/box.cpp (set_script_size): Fix minimum test. + + Problem reported by Ted Harding in a + thread starting with + + http://lists.gnu.org/archive/html/groff/2014-03/msg00181.html + +2014-03-16 Werner LEMBERG + + Fix previous commit. + + Problem reported (with a patch) by Ingo Schwarze + . + + * doc/Makefile.sub (groff_bin_dirs): Add `preconv'. + + * doc/Makefile.in (groff_bin_dirs): Add `preconv'. + (.me.txt): Call preconv. Use UTF8 as output encoding. + (.me.ps): Call preconv. + +2014-03-14 Werner LEMBERG + + [me] Add translation of `meintro.me' to French. + + Contributed by Grégoire Babey . + + * doc/meintro_fr.me: New file. + * LICENSES, doc/Makefile.sub: Updated. + +2014-03-13 Ingo Schwarze (tiny change) + + man: Correctly reset margins. + + See + + http://lists.gnu.org/archive/html/groff/2013-11/msg00026.html + + for more. + + * tmac/an-old.tmac (set-an-margin): Whenever (re)setting + `\n[an-level]' to 1 (which happens when encountering `.TH', `.SH', + and `.SS') make sure to also (re)set `\n[an-saved-margin1]' and + `\n[an-saved-prevailing-indent1]' to a sane value such that an + immediate `.RE' cannot wreak havoc. + (TH, SH, SS): Updated. + +2014-03-11 Ingo Schwarze (tiny change) + + * Makefile.in: Do not forget to install gropdf manuals. + + This got broken in 290eaaac6cfc33856cd683838accc72ccf3e5a84: + src/devices/gropdf was split out of OTHERDIRS into SHPROGDIRS, and + consequently, Makefile.man was no longer used there. Note that + Makefile.dev is *not* needed, even though it's below /devices/. + +2014-03-11 Ingo Schwarze (tiny change) + + * src/roff/groff/Makefile.sub: POSIX conformance. + + - POSIX says that the meaning of the make(1) `$<' macro shall be + unspecified except in inference rules. Consequently, use `$?' + for portability. + + That's safe because the rules have only one prerequisite and + are not `.PHONY', so `$?' will always expand to one item. + + - While here, clean up two instances of superfluous use of cat(1). + +2014-03-11 Ingo Schwarze (tiny change) + + * Makefile.in (dist): Improve. + + - Bugfix: Do not error out if one of the DISTDIRS + contains a subdirectory. + - Make debugging easier by splitting the huge "cd tmp; ...; ..." + command sequence into several independent shell commands, + such that one can see which command actually fails. + +2014-03-06 Deri James + + Missing RE escape in grep. + + * src/devices/gropdf/pdfmom.pl: Escape '\' dot in grep RE. + +2014-02-26 Bernd Warken + + * src/roff/grog/grog.pl: Add detection of `gperl' to `grog'. + +2014-02-25 Bernd Warken + + * contrib/gperl: New preprocessor for Perl parts in groff files. + +2014-02-15 Ingo Schwarze + + * tmac/groff_mdoc.man: Improve the manual page template. + + - Add the EXIT STATUS section. It is widely used in at least + NetBSD, FreeBSD, OpenBSD, and DragonFly manuals. + - Recommend the DIAGNOSTICS section for section 4 manuals. Such + usage is very widespread, in particular for kernel printf + messages emitted by device drivers. + - Do not recommend the DIAGNOSTICS section for command return + values to the shell any longer. While such usage historically + existed, it does not seem common nowadays, and in any case, using + the now well-established EXIT STATUS section seems preferable to + me. + - Mention the possibility to use ERRORS for section 4 manuals. + While most section 4 manuals have a DIAGNOSTICS section, only + some will need an ERRORS section, but these cases aren't exactly + rare, either. Quite some device driver manuals explain how to + use the device using system calls like ioctl(2), open(2), read(2) + or write(2), in which case the ERRORS section is the natural + place to explain which errno values the driver may set during + such system calls. + - Mentioning signal handling as a content of the ERRORS section + seems redundant, it is already covered by talking about the + errno. The case of errno == EINTR should be handled just like + all other errno cases. For an example showing that there is no + need to single out error handling in any way, please look at a + typical read(2) manual page. + - Mention the CAVEATS section. It first appeared in the 4.2BSD + execve(2) manual in 1983, was already used by several manuals by + the time of 4.4BSD-Lite2 in 1995, and is in whidespread use + today, not just in BSD base system manuals, but for example in + Perl manuals as well. + +2014-02-14 Bernd Warken + + * src/roff/grog/grog.pl: Add detection of glilypond-parts in groff + files. For example `grog example.groff' from the glilypond source + gets `glilypond example.groff | groff'. + +2014-02-12 Bernd Warken + + * src/roff/grog/grog.pl: With the former bugfix of 2014-02-12, + it's now possible to run `grog meref.me' etc., which wasn't + possible before. That addition of the macro handling was + necessary for the automatic for `groffer'. + +2014-02-12 Bernd Warken + + * src/roff/grog/grog.pl: Add handling of macro definition and fix + problems with @VERSION@. + +2014-02-12 Rich Burridge + + [grn] Prevent crash if more than 50 command line arguments. + + * src/preproc/grn/main.cpp (INIT_FILE_SIZE, FILE_SIZE_INCR): New + macros. + (add_file): New function. + (main): Use it to add file arguments. + +2014-01-29 Ulrich Spörlein + + * tmac/doc-common: Add even more DragonFlyBSD releases. + +2014-01-28 Ulrich Spörlein + + * tmac/doc-common: Add some new *BSD version strings. + +2014-01-06 Bernd Warken + + * man/roff.man: Add information of new archives for RUNOFF and + roff_classical. + + * Makefile.in: Replace `contrib/RUNOFF' by + `contrib/groff_filenames'. + +2014-01-05 Bernd Warken + Werner LEMBERG + + * groff/tmac/groff_man.man: Minor typos, formatting, reordering. + +2014-01-05 Werner LEMBERG + + Revert recent changes to `an-ext.tmac' and `groff_man.man'. + + * groff/tmac/an-ext.tmac (.FONT): Remove. This doesn't belong into + this file. + + * groff/tmac/groff_man.man: Reset to state previous to 2014-01-04. + Useful changes will be re-committed in smaller, logical chunks. + +2014-01-05 Bernd Warken + + * groff/tmac/an-ext.tmac: in .FONT change variable name `result' + to `an_ext_FONT_result'. + +2014-01-04 Bernd Warken + + * groff/tmac/an-ext.tmac: add new request .FONT for using + different font names on a single line. + + * groff/tmac/groff_man.man: put under GPL2, reordered and enhanced. + +2014-01-02 Deri James + + * src/devices/gropdf/gropdf.pl: gropdf use to fail when handling + output from preconv, now works. + + * src/devices/gropdf/pdfmom.pl: can now be used as a pipeline, and + improvements made to its switch handling and use with preconv. + + * tmac/pdf.tmac: changes to support preconv. + +2014-01-02 Colin Watson + + * font/devascii/Makefile.sub ($(FONTS)): Convert extended regex + syntax to basic for sed. + * font/devcp1047/Makefile.sub ($(FONTS)): Likewise. + * font/devhtml/Makefile.sub ($(FONTS)): Likewise. + * font/devlatin1/Makefile.sub ($(FONTS)): Likewise. + * font/devutf8/Makefile.sub ($(FONTS)): Likewise. + +2013-12-23 Bernd Warken + + * groff/src/roff/groff/groff.cpp: add groff option `-G' to the + documentation in `synopsis()'. + +2013-12-06 Mike Frysinger + + Fix parallel build with gropdf and mom examples. + + The `contrib/mom/examples/' directory uses the helper script from + `src/devices/gropdf/'. Currently though, parallel builds might fail + like so: + + ... + make[2]: Entering directory `.../groff-1.22.2/contrib/mom' + examples/letter.mom >examples/letter.pdf + examples/mom-pdf.mom >examples/mom-pdf.pdf + /bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory + make[2]: *** [examples/letter.pdf] Error 127 + /bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory + make[2]: *** [examples/mom-pdf.pdf] Error 127 + make[2]: Leaving directory `.../groff-1.22.2/contrib/mom' + make[1]: *** [contrib/mom] Error 2 + ... + make[2]: Entering directory `.../groff-1.22.2/src/devices/gropdf' + sed -f .../groff-1.22.2/arch/misc/shdeps.sed \ + -e "s|@VERSION@|1.22.2|" \ + -e "s|@PERLPATH@|/usr/bin/perl|" ./pdfmom.pl >pdfmom + + The top level makefile tries to account for this in general with + OTHERDIRS, but looks like `src/devices/gropdf/' was added to this + variable (which holds `contrib/mom/' too) because gropdf installs a + shell script, and the other prog vars require it to be a dir of + things to compile. + + URL: http://crbug.com/324116 + URL: https://bugs.gentoo.org/487276 + + * Makefile.in (SHPROGDIRS): Declare. + (PROGDIRS): Add $(SHPROGDIRS). + (OTHERDIRS): Delete src/devices/gropdf. + ($(SHPROGDIRS):): Add to existing rule. + ($(OTHERDIRS):): Depend on $(SHPROGDIRS). + +2013-12-08 Eric S. Raymond + + Repository fully converted to git. + +2013-11-21 Werner LEMBERG + + * config.guess, config.sub: Updated from `config' repository. + +2013-11-06 Werner LEMBERG + + * src/libs/libgroff/tmpname.cpp (gen_tempname): Use O_BINARY. + + Problem reported by Charlie Van Dien ; see + + http://lists.gnu.org/archive/html/groff/2013-10/msg00006.html + +2013-11-06 Werner LEMBERG + + * Makefile.comm (.man.n): Use C locale. + + Problem reported by Petr Man ; fix suggested by + Ralph Corderoy . + +2013-07-24 Ingo Schwarze + + [mdoc] Implement `.%C'. + + * tmac/doc.tmac, tmac/doc-common: Do it. + * tmac/groff_mdoc.man: Updated. + +2013-07-31 Deri James + + Fix overprinting issue with Acrobat reader. + + Problem reported by Heinz-Jürgen Oertel . + + * src/devices/gropdf/gropdf.pl (do_t, FindChar): Use ascii octal + notation (i.e., \015) when outputting characters with value < 32. + This fixes a bug which affected acroread when control-M (cr) was + embedded in a text string. + +2013-07-16 Werner LEMBERG + + * tmac/fallbacks.tmac: Make it work in compatibility mode. + + Problem reported by Y T . + +2013-07-16 Werner LEMBERG + + * src/roff/grog/Makefile.sub (install_data, uninstall_sub): Typos. + +2013-07-16 Werner LEMBERG + + * Makefile.in (GREP, MDEFINES): Define and use plain grep. + + Necessary for Bernd's code to extract groff options. + +2013-07-16 Ingo Schwarze + + * tmac/an-old.tmac (TP): Do not clobber line length after double + call to `.TP'. + +2013-07-02 Colin Watson + + * doc/groff.texinfo: Fix syntax error in documentation of `\z'. + +2013-07-02 Colin Watson + + * src/devices/grolbp/lbp.cpp (main): Don't write trailer if no + printer was created. + +2013-06-19 Eric S. Raymond + + * src/utils/lkbib/lbib.man: Move running text out of synopsis. + +2013-05-06 Bernd Warken + + * src/roff/groff/Makefile.sub: Replace `cpp' by `groff.cpp'. + +2013-05-06 Bernd Warken + + * Makefile.in: Add new `contrib' directory `RUNOFF'. + +2013-05-01 Bernd Warken + + * src/roff/groff/Makefile.sub: Remove all `.PHONY:' lines. + +2013-04-30 Bernd Warken + + * src/roff/groff/Makefile.sub: Replace `egrep' by `$(GREP)'. + commands. Don't use $(CCSRCS) any more. + +2013-04-30 Bernd Warken + + * Makefile.in, m4/groff.m4: Add `@libprogramdir@' and + `$libprogramdir' (usually `/usr/local/lib/groff'). Change + `$libdir/groff' into $libprogramdir for several `groff' programs. + Run `autoreconf -I m4'. + + * src/roff/groff/MAkefile.sub: Add $(DESTDIR) and $(srcdir) in + order to support installation outside of source code. + + * contrib/glilypond/Makefile.sub, contrib/glilypond/glilypond.pl: + Correct the install directories. + +2013-04-29 Bernd Warken + + * src/roff/groff/Makefile.sub: Replace some variables by shell + commands. Improve the output for the `make' runs. + +2013-04-28 Bernd Warken + + * src/roff/groff/Makefile.sub: Make this Makefile compatible. + +2013-04-28 Bernd Warken +2013-04-28 Werner LEMBERG + + * src/roff/groff/Makefile.sub: Use `make' variables to get + `groff' options from `getopt' in `groff.cpp'. Create 2 files + `groff_opts_no_arg.txt' and `groff_opts_with_arg.txt'. + +2013-04-26 Bernd Warken + + * src/roff/groff/read_groff_options.pl: Remove this file. It's + no longer needed. + + * src/roff/groff/Makefile.sub: Get the `groff' options from the + use of `getopt...' in `groff.cpp' using `$(EGREP)' and `sed'. + Store this information in a new file `groff_options.txt', which + is copied to `groff libdir' during the installation. + +2013-04-26 Werner LEMBERG + + Various minor fixes. + + * INSTALL.gen: Take the newest version from the `gnulib' + repository. + + * configure: Regenerated. + +2013-04-26 Bernd Warken + + * INSTALL.gen: Restore an older version from `2006' in + `groff-1.21'. + + * FOR-RELEASE: New file which describes how to prepare `groff' + for a new release. + +2013-04-26 Bernd Warken + + * src/roff/groff/read_groff_options.pl: Reads `groff' options + from `groff.cpp' and writes them into the file `groff_options.info'. + + * src/roff/groff/Makefile.sub: Have the generated file + `groff_options.info' be installed into the `groff libdir'. + +2013-04-16 Bernd Warken + + * INSTALL.gen: Replace this file by the daily `git' version of + `automake' `INSTALL' file. + + * INSTALL.autotools: Remove file. + + * INSTALL.CVS: New file, moved from `INSTALL.autotools'. + + * m4/ax_prog_perl_version.m4: New file, taken from package + `autoconf-archive-2013.04.06'. + + * m4/groff.m4: Remove unnecessary blank line. + + * Makefile.in: Add `$(PERLVERSION)'. + + * aclocal.m4: Run `autoreconf -I m4' (this includes + `aclocal -I m4'). This creates a suitable `aclocal.m4'. Remove + generated subdirectory `autom4te.cache'. + + * src/roff/grog/Makefile.sub: Correct `sed' command. Use `tabs' + that are needed by `GNU make'. + +2013-04-16 Bernd Warken + + * Makefile.sub: Add `m4/ax_compare_version.m4'. + + * aclocal.m4: Run the latest `aclocal -I m4' which generates a + suitable content in that file. + + * INSTALL.autotools: Information of the usage of `GNU autotools' + with `groff'. + + * INSTALL.gen: Move `autotool' parts to file `INSTALL.autotools'. + +2013-04-15 Bernd Warken + + * m4/groff.m4: Replace tabs by spaces. Use a double line between + AC_DEFUNs. + +2013-04-15 Bernd Warken + + In the whole `groff' system, rename autoconf variable `$PERLPATH' + to `$PERL', which has the same content. But `$PERL' suits to + `AX_PROG_PERL_VERSION' in m4 macro `GROFF_PERL' in `m4/groff.m4'. + + * src/utils/afmtodit/Makefile.sub, + * src/devices/gropdf/gropdf.pl, + * src/devices/gropdf/Makefile.sub, + * src/devices/gropdf/pdfmom.pl, + * arch/djgpp/config.site, + * font/devpdf/Makefile.sub, + * contrib/mm/Makefile.sub, + * m4/groff.m4, + * Makefile.in: Replace `$PERLPATH' by `$PERL'. + + * m4/ax_compare_version.m4: New file, copied from daily version of + `GNU autoconf-archive'. + + `autoconf' was not yet run, a newer version is needed. + +2013-04-15 Bernd Warken + + * README, INSTALL, INSTALL.gen, MANIFEST: Add documentation in the + top directory about some parts of `autotools' and `glilypond'. + +2013-04-15 Bernd Warken + + * configure.ac: Add information of the macro `GROFF_PERL'. + + * Makefile.in: Add definitions of the macro variables and their + `@...@' counterparts. + + Run `autoreconf -I m4'. + +2013-04-15 Bernd Warken +2013-04-15 Werner LEMBERG +2013-04-15 Ralph Carderoy + + Add Perl test to configuration. During the run of `configure' the + program is broken with error when there is no `Perl' or the `perl' + program is too old. + + * m4/groff.m4: Add macro `GROFF_PERL' that tests the availability + of the `perl' program and tests wether this has a version of at + most `v5.6.1'. Define variables $PERL and $PERLPATH for the full + name of the `perl' program and $PERLVERSION as the lest version. + +2013-04-13 Keith Marshall + + Avoid consideration of autotool cache for CVS inclusion. + + * .cvsignore (autom4te.cache): Add reference. + +2013-04-13 Bernd Warken + + * `autotools': During the run of `autoconf' and `autoreconf' a + subdirectory `autom4te.cache' was created. I first added this to + groff CVS and removed it again after an email-discussion. + +2013-04-12 Bernd Warken + + * `grog': Remove the shell version of `grog'. Now there is only + Perl version. + + * src/roff/grog/perl.sh: Remove this file. + + * src/roff/grog/Makefile.sub: This file handles the removement of + the shell version. + + * src/roff/grog/perl_test.pl: New file for testing the available + Perl version in the system to be installed into. This file will + be installed into the grog lib-directory. + +2013-04-12 Bernd Warken + + * `grog': In the following, the file `grog.pl' will be split. For + the coming files, a lib-directory is needed for storage. + + * m4/groff.m4, configure.ac: Add libdir information for `grog'. + + * Makefile.in: Add @grog_dir@. + + Run `autoconf'. + + `grog' has now a lib-directory at `$prefix/lib/groff/grog'. + +2013-04-11 Bernd Warken + + * contrib/groffer/: There is a free `git' package containing all + old `groffer' versions `v0.*' and `v1.*'. The new versions + `groffer 2.*' will actually not be included. This package can be + got at: + + $ git clone git@github.com:RUNOFF/groffer.git + +2013-04-11 Bernd Warken + + * contrib/glilypond/: There is a free `git' package containing all + old versions of the former name `groff_lilypond v0.*'. They work + with `lilypond' parts in `roff' files, but were not installed. + This package can be got at: + + $ git clone git@github.com:RUNOFF/groff_lilypond.git + + The new versions `glilypond v1.*' are not included there. + +2013-04-11 Bernd Warken + + * man/roff.man: For roff(7), add information about the free git + package RUNOFF.git with documentation about historical RUNOFF and + the available files written in the classical RUNOFF language.. + +2013-03-29 Bernd Warken + + Rename `groff_lilypond' to `glilypond'. So remove the former + source directory `/contrib/lilypond' and newly + install `/contrib/glilypond', which now has many + files. The new version starts at `v1.0'. + + * m4/groff.m4, configure.ac: Add libdir information for + `glilypond'. + + * Makefile.in: Add `/contrib/glilypond'. + + Run `autoconf'. + + `glilypond' can now be installed to the system. + +2013-03-17 Ingo Schwarze + + * font/devpdf/Makefile.sub: Build system fixes. + + (GROFF_FONT_FILES): Avoid installing Makefile.sub.orig when it's + around. + (install): Create $(DESTDIR)$(fontsubdir)/util when missing. + +2013-03-05 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of `\s'. + + Reported by Jim Avera . + +2013-02-16 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of `.substring'. + + Reported by Jim Avera . + +2013-02-13 Werner LEMBERG + + * doc/groff.texinfo: Fix if-else example. + + Reported by Jim Avera . + +2013-02-10 Werner LEMBERG + + [grops] Make binary `%%BeginData' work; support `fontset' resource. + + * src/devices/grops/psrm.cpp (resource_table): Add `fontset'. + + (resource_manager::read_resource_arg): Do a case insensitive + comparison. The PostScript Reference Manual gives the following + example for a CFF resource (example 5.7): + + %!PS-Adobe-3.0 Resource-FontSet + %%DocumentNeedResources: ProcSet (FontSetInit) + %%Title: (FontSet/CFFRoman27) + %%Version: 1.000 + %%EndComments + %%IncludeResource: ProcSet (FontSetInit) + %%BeginResource: FontSet (CFFRoman27) + /FontSetInit /ProcSet findresource begin + %%BeginData: 622532 Binary Bytes + /CFFRoman27 622503 StartData + ... 622,503 bytes of binary data ... + %%EndData + %%EndResource + %%EOF + + Note the `ProcSet' and `FontSet' keywords. While the old DSC + (Document Structure Convention) documentation doesn't cover + `FontSet' at all (the DSC documentation predates the invention of + CFF), it describes only `procset' (all letters downcase), and it + also says that the DSC parser works in a case sensitive manner. + + In other words, `ProcSet' is not valid according to the DSC + documentation, only `procset' is. So much about today's validity + of DSC... This patch adapts grops's code to the PostScript + reality. + + (resource_manager::do_begin_data): Fix typo (present since the + beginning) which prevented correct handling of binary data. + + * src/devices/grops/ps.h (resource_type): Add RESOURCE_FONTSET. + +2013-02-10 Bernd Warken + + * contrib/lilypond: New files for adding lilypond parts into groff + files. + 2013-02-07 Werner LEMBERG Version 1.22.2 released @@ -67,26 +1884,26 @@ * src/devices/gropdf/gropdf.man: Document the handling of linecaps and linejoins. - + * tmac/pdf.tmac (pdfbookmark): Fix bug where the current PDFOUTLINE.FOLDLEVEL may not be honoured if warnings of the type - macro warning: adjusted level n bookmark; should be <= n + macro warning: adjusted level n bookmark; should be <= n - Added copyright and mention debt owed to Keith Marshall for original - `pdfmark.tmac', upon which `pdf.tmac' is largely based. + Added copyright and mention debt owed to Keith Marshall for + original `pdfmark.tmac', upon which `pdf.tmac' is largely based. * font/devpdf/Foundry.in, font/devpdf/util/BuildFoundries.pl (LocateFile): The font for EURO had the wrong entry in the `download' file (it pointed to The font in the build directory, which is wrong). It has always been permissable to include a path - along with the font name in the Foundry file, but until now the font - had to exist to be valid. It is now permitted to start the path - with an asterisk which tells BuildFoundry to use the path/filename - in the download file without checking if the font exists. This - allows the font to be found in `../devps' even though it is not - there during the build (if source and build are different), but will - be there after the install. + along with the font name in the Foundry file, but until now the + font had to exist to be valid. It is now permitted to start the + path with an asterisk which tells BuildFoundry to use the + path/filename in the download file without checking if the font + exists. This allows the font to be found in `../devps' even + though it is not there during the build (if source and build are + different), but will be there after the install. 2013-01-13 Werner LEMBERG @@ -103,23 +1920,24 @@ 2013-01-07 Deri James - * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Improve warning. + * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Improve + warning. 2013-01-07 Werner LEMBERG [tbl] Allow characters #, `, and ' as eqn delimiters. While problems ` and ' have been unintentionally introduced rather - recently, the limitation regarding # was there from the beginning. + recently, the limitation regarding # was there from the beginning. At the same time, fix a small bug causing `.lf' requests not starting a line. - * src/preproc/tbl/table.cpp (table::init_output, - table::compute_expand_width, table::compute_separation_factor, - table::define_bottom_macro, table::do_bottom): Temporarily switch - off eqn delimiters, wrapping the code into a `.ig' block. This uses - the new functionality just added to eqn. + * src/preproc/tbl/table.cpp (table::init_output) + (table::compute_expand_width, table::compute_separation_factor) + (table::define_bottom_macro, table::do_bottom): Temporarily switch + off eqn delimiters, wrapping the code into a `.ig' block. This + uses the new functionality just added to eqn. * src/preproc/eqn/eqn.man, src/preproc/tbl/tbl.man: Updated. @@ -127,8 +1945,8 @@ [eqn] Add `delim on'. - * src/preproc/eqn/lex.cpp (start_delim_saved, end_delim_saved): New - global variables. + * src/preproc/eqn/lex.cpp (start_delim_saved, end_delim_saved): + New global variables. (do_delim): Handle `delim on' to restore previous start and end delimiters. @@ -140,7 +1958,7 @@ * src/devices/gropdf/gropdf (do_x) <'X'> <'pdfpic'>: Using - \X'pdf: pdfpic' + \X'pdf: pdfpic' with a zero width now works correctly. @@ -154,8 +1972,8 @@ Version 1.22.1 released ======================= - Due to CVE-2012-3386, ftp.gnu.org rejected uploading of version 1.22 - -- in other words, 1.22 has never been released. + Due to CVE-2012-3386, ftp.gnu.org rejected uploading of version + 1.22 -- in other words, 1.22 has never been released. * NEWS, REVISION, doc/groff.texinfo, doc/webpage.ms: Updated. @@ -178,15 +1996,15 @@ wcwidth . Manually move directories `src/libs/gnulib/gl{lib,m4}' to - `src/libs/gnulib/{lib,m4}', and do `s/gllib/lib/' and `s/glm4/m4/' - in all files to `convert' the gnulib testbed to a standard gnulib - configuration as maintained by gnulib-tool. Additionally, remove - the directory `src/libs/gnulib/gltests' and the references to - `gltests' in all files. - - (All of this could be done with a script, but I hope that this is - eventually replaced with migrating groff as a whole to gnulib and - its setup). + `src/libs/gnulib/{lib,m4}', and do `s/gllib/lib/' and `s/glm4/m4/' + in all files to `convert' the gnulib testbed to a standard gnulib + configuration as maintained by gnulib-tool. Additionally, remove + the directory `src/libs/gnulib/gltests' and the references to + `gltests' in all files. + + (All of this could be done with a script, but I hope that this is + eventually replaced with migrating groff as a whole to gnulib and + its setup). . Call @@ -194,10 +2012,10 @@ --dir=src/libs/gnulib \ wcwidth - to update everything. + to update everything. . Merge the changed, new, and deleted files into `gnulib.old', - delete `gnulib', rename `gnulib.old' to `gnulib', then commit. + delete `gnulib', rename `gnulib.old' to `gnulib', then commit. 2012-12-28 Werner LEMBERG @@ -256,8 +2074,8 @@ * src/devices/gropdf/gropdf.pl (do_D): The command \D't N' moves horizontal position by 'N'. gropdf now obeys this rule. - (do_t): Fixed kerning issue where width of non-kerned text could be - wrongly calculated using previous kern factor. + (do_t): Fixed kerning issue where width of non-kerned text could + be wrongly calculated using previous kern factor. 2012-09-21 Werner LEMBERG @@ -279,20 +2097,20 @@ [gropdf] Various minor fixes. - * font/devpdf/Foundry.in: Add font path to debian `gsfonts' package. + * font/devpdf/Foundry.in: Add font path to debian `gsfonts' + package. - * font/devpdf/util/BuildFoundries.pl: Handle missing fonts in a more - sane way, do NOT abort the complete make run! + * font/devpdf/util/BuildFoundries.pl: Handle missing fonts in a + more sane way, do NOT abort the complete make run! * src/devices/gropdf/gropdf: Accept papersize names (i.e. A4) as - either upper or lower case. - The -p (papersize) option should be length,width (currently reversed - - width,length) + either upper or lower case. The -p (papersize) option should be + length,width (currently reversed - width,length) * src/devices/gropdf/pdfmom.pl: Support use of GROFF_BIN_PATH. -2012-09-11 Ralph Corderoy - Werner LEMBERG +2012-09-11 Ralph Corderoy + Werner LEMBERG * src/preproc/tbl/tbl.man: Better document `d' column specifier. @@ -305,10 +2123,10 @@ * src/devices/gropdf/gropdf.pl: Various fixes: - . Correct image scaling issue. - . Handle relative horizontal movement 'h' followed by absolute - vertical movement 'V'. - . Correct handling of track kerning. + . Correct image scaling issue. + . Handle relative horizontal movement 'h' followed by absolute + vertical movement 'V'. + . Correct handling of track kerning. * src/devices/gropdf/pdfmom.pl: New wrapper for mom (pdfmom) using gropdf or grops driver. @@ -322,10 +2140,10 @@ * src/devices/gropdf/gropdf.pl: Various fixes: - . Correct image scaling issue. - . Handle relative horizontal movement 'h' followed by absolute + . Correct image scaling issue. + . Handle relative horizontal movement 'h' followed by absolute vertical movement 'V'. - . Correct handling of track kerning. + . Correct handling of track kerning. * src/devices/gropdf/pdfmom.pl: New wrapper for mom (pdfmom) using gropdf or grops driver. @@ -338,14 +2156,14 @@ See - http://lists.gnu.org/archive/html/bug-groff/2012-08/msg00009.html + http://lists.gnu.org/archive/html/bug-groff/2012-08/msg00009.html for the full report. 2012-08-08 Eric S. Raymond TBLization, as discussed on the list. There's a rewrite of - this file in panning, but this gets the content clean for now. + this file in planning, but this gets the content clean for now. * tmac/groff_mdoc.man: In this file. @@ -406,8 +2224,8 @@ Remove running text in the synopses of various manual pages, as it badly screws up attempts to mechanically parse them. - * contrib/mom/groff_mom.man: Use .URL rather than .UR/.UE, as this is - now preferred for manual pages. + * contrib/mom/groff_mom.man: Use .URL rather than .UR/.UE, as this + is now preferred for manual pages. 2012-07-03 Werner LEMBERG @@ -416,7 +2234,7 @@ Problem reported by Alkis Georgopoulos ; see - https://bugs.launchpad.net/ubuntu/+source/groff/+bug/1008115 + https://bugs.launchpad.net/ubuntu/+source/groff/+bug/1008115 * src/libs/libgroff/uniglyph.cpp (unicode_to_glyph_list): Flip values of U+03C6 and U+03D5. @@ -439,7 +2257,7 @@ See - http://lists.gnu.org/archive/html/bug-groff/2012-05/msg00000.html + http://lists.gnu.org/archive/html/bug-groff/2012-05/msg00000.html for the report and the bug fix. @@ -456,29 +2274,34 @@ * doc/groff.texinfo: Add extra info about `.asciify'. Document new gropdf options -u and -s. - * src/devices/gropdf/gropdf.man: Remove references to Type 42 fonts, - they do not work in PDFs. + * src/devices/gropdf/gropdf.man: Remove references to Type 42 + fonts, they do not work in PDFs. + Document new option -s which adds `statistics' line to end of PDF - file showing number of pages in document. This has always been the - default behaviour (to add this line), all other software seems to - ignore it as intended, but `gs' sometimes complains, so the default - is now to omit the statistics. - Document new option -u[cmapfilename] to allow a user ToUnicode CMap - instead of gropdf's default. If no `cmapfilename' given then do not - include any ToUnicode CMap. + file showing number of pages in document. This has always been + the default behaviour (to add this line), all other software seems + to ignore it as intended, but `gs' sometimes complains, so the + default is now to omit the statistics. + + Document new option -u[cmapfilename] to allow a user ToUnicode + CMap instead of gropdf's default. If no `cmapfilename' given then + do not include any ToUnicode CMap. * src/devices/gropdf/gropdf.pl : Allow `bundled' flags on command line (i.e. -de = -d -e). - Use $RT_SEP as multi path separator, not hard coded `:'. Update all - users. - New flags -u and -s. - Once a custom papersize has been set as \X'papersize x,y' make it - sticky so all following pages use custom size. - When importing pdf with \X'pdf: pdfpic ...' do not compress objects - which are already compressed! This caused problems with PDFs - created with ImageMagick, now fixed. - (IsText, PutLine, do_t): The troff `u' command can contain a kerning - adjustment number, this was not being handled, now fixed. + + Use $RT_SEP as multi path separator, not hard coded `:'. Update + all users. + + New flags -u and -s. Once a custom papersize has been set as + \X'papersize x,y' make it sticky so all following pages use custom + size. When importing pdf with \X'pdf: pdfpic ...' do not compress + objects which are already compressed! This caused problems with + PDFs created with ImageMagick, now fixed. + + (IsText, PutLine, do_t): The troff `u' command can contain a + kerning adjustment number, this was not being handled, now fixed. + (do_c): The troff `c' command was not being handled correctly, now fixed. (FindChar, RemapChr, do_N): Handle fonts with more than 255 glyphs. @@ -500,8 +2323,10 @@ strings. (pdfbookmark): Correct handling of bookmark levels. Convert \[em] to hyphen in bookmarks - Rather use -N than -T for "named" bookmarks (-T already used for "tag" - in pdfmark.tmac) + + Rather use -N than -T for "named" bookmarks (-T already used for + "tag" in pdfmark.tmac) + (.pdfclean): New macro which attempts to asciify bookmark text. (.pdfpagename): New wrapper macro for \X'pdf: pagename'. (.pdfswitchtopage): New wrapper macro for \X'pdf: switchtopage'. @@ -517,8 +2342,8 @@ * src/roff/troff/number.cpp (parse_expr) : Add cast. - * src/devices/xditview/Makefile.sub (EXTRA_CFLAGS): Add `-Dlint' so - that unused static ID arrays don't cause a warning. + * src/devices/xditview/Makefile.sub (EXTRA_CFLAGS): Add `-Dlint' + so that unused static ID arrays don't cause a warning. (Some) problems reported by Bjarni Ingi Gislason . @@ -539,14 +2364,15 @@ Update configuration files from `gnulib' and `config' repositories. - This also fixes a problem with `iconv' on Solaris 10, as reported in + This also fixes a problem with `iconv' on Solaris 10, as reported + in - http://lists.gnu.org/archive/html/bug-groff/2012-02/msg00007.html + http://lists.gnu.org/archive/html/bug-groff/2012-02/msg00007.html * configure.ac: Call `gl_LOCALCHARSET. Call `AM_ICONV' as C++. - * config.guess, config.rpath, config.sub, install-sh, mkinstalldirs: + * config.guess, config.rpath, config.sub, install-sh, mkinstalldir: Updated. * m4/codeset.m4, m4/glib21.m4, m4/iconv.m4, m4/lib-ld.m4, @@ -566,7 +2392,7 @@ The invocation was - gnulib-tool --add-import \ + gnulib-tool --add-import \ --dir=src/libs/gnulib \ wcwidth @@ -579,8 +2405,9 @@ [gropdf] Fixes and omissions. - * src/devices/gropdf/gropdf.pl (, do_u): Add facility to handle - track kerning (.tkf). + * src/devices/gropdf/gropdf.pl (, do_u): Add facility to + handle track kerning (.tkf). + (do_x, do_p, do_t): If pages are reordered using `pagename' and `switchtopage' keep track of outline bookmarks. (do_x): Handle multiple files on gropdf command line, stitch @@ -589,8 +2416,9 @@ processed in order. What prevented it working properly before is the way an `x i' (initialize) record has been handled. It now processes the initialization code only in the first file. - (PutHotSpot): Allow user to control size of hotspot bounding box on - clickable links by setting PDFHREF.LEADING + + (PutHotSpot): Allow user to control size of hotspot bounding box + on clickable links by setting PDFHREF.LEADING * tmac/pdf.tmac (PDFHREF.LEADING): Adjust value. (pdf*href): Pass value of PDFHREF.LEADING to gropdf. @@ -618,8 +2446,8 @@ See threads starting with - http://lists.gnu.org/archive/html/groff/2011-12/msg00055.html - http://lists.gnu.org/archive/html/groff/2012-01/msg00000.html + http://lists.gnu.org/archive/html/groff/2011-12/msg00055.html + http://lists.gnu.org/archive/html/groff/2012-01/msg00000.html 2012-01-10 Bruno Haible @@ -628,7 +2456,7 @@ * Makefile.in (MAKE_K_FLAGS): Improved definition, as explained and discussed in - http://lists.gnu.org/archive/html/groff/2012-01/msg00039.html + http://lists.gnu.org/archive/html/groff/2012-01/msg00039.html 2012-01-03 Ingo Schwarze @@ -636,14 +2464,15 @@ Some hdtbl and mom examples want PostScript formatting which requires the `DESC' file to be ready; however, the top-level - `Makefile.in' doesn't currently enforce the proper order of building - of `font/dev' before `contrib/hdtbl', `contrib/mom', and so on. + `Makefile.in' doesn't currently enforce the proper order of + building of `font/dev' before `contrib/hdtbl', `contrib/mom', and + so on. Given that `font/dev' and the contrib examples are in different child processes of the recursive make system, it doesn't seem possible to solve this using clean Makefile dependencies. We now - enforce the order by splitting the shell command invoking recursive - make in the top level `Makefile.in'. + enforce the order by splitting the shell command invoking + recursive make in the top level `Makefile.in'. * Makefile.in (ALLDIRS): Remove `OTHERDIRS'. (dodirs): Updated. @@ -671,7 +2500,7 @@ [me] Fix behaviour of centered block. Problem and possible fix reported in thread starting at - http://lists.gnu.org/archive/html/groff/2011-11/msg00002.html + http://lists.gnu.org/archive/html/groff/2011-11/msg00002.html * tmac/e.tmac (`(c'): Always start with a new line. @@ -693,7 +2522,8 @@ 2011-11-14 Werner LEMBERG - * src/preproc/tbl/tbl.man: Improve documentation of `_' and friends. + * src/preproc/tbl/tbl.man: Improve documentation of `_' and + friends. 2011-10-31 Werner LEMBERG @@ -706,8 +2536,9 @@ * src/utils/tfmtodit/tfmtodit.cpp (char_info_word): Use `unsigned char' for all members. - * src/devices/grohtml/html-text.cpp (html_text::remove_def): Remove - unused variable `q'. + * src/devices/grohtml/html-text.cpp (html_text::remove_def): + Remove unused variable `q'. + * src/devices/grohtml/post-html.cpp (html_printer::lookahead_for_tables): Remove unused variable `left' and `seen_text'. @@ -717,13 +2548,13 @@ [mdoc] Synchronize string tables with the mandoc(1) utility. * tmac/doc-common: Add many architecture names used in NetBSD and - OpenBSD (and "arm" from FreeBSD) and remove the duplicate OS version - entry for Darwin-10.6.0. + OpenBSD (and "arm" from FreeBSD) and remove the duplicate OS + version entry for Darwin-10.6.0. * tmac/doc-syms: Add many library names used in NetBSD and FreeBSD. - * tmac/groff_mdoc.man: Document all supported architecture names, OS - versions, and library names. + * tmac/groff_mdoc.man: Document all supported architecture names) + (OS versions, and library names. 2011-09-11 Joseph Koshy @@ -747,8 +2578,9 @@ [gropdf] Minor updates and fixes. - * src/devices/gropdf/gropdf.pl: Change command line option `-fy' to - `-y' for consistency. + * src/devices/gropdf/gropdf.pl: Change command line option `-fy' + to `-y' for consistency. + Better support for Windows platform. (do_x): Handle keywords `pagename' and `switchtopage'. @@ -774,8 +2606,8 @@ 2011-07-29 Daiki Ueno - Fix cross building. - Problem reported by Christophe Jarry . + Fix cross building. Problem reported by Christophe Jarry + . * Makefile.in ($GNULIBDIRS): Pass original config arguments to src/libs/gnulib/configure. @@ -817,9 +2649,10 @@ (@h, @n, @o, @t, @k, )b, (c, (q, )q, (l, )l, (f, @q, PE): Updated. * doc/meref.me: Document changes. - * src/preproc/tbl/table.cpp (ROW_START_LINE_REG, ROW_SAVE_LINE_REG, - ROW_MAX_LINE_REG, REPEATED_NM_SET_MACRO, REPEATED_NM_SUS_MACRO): New - macros. + * src/preproc/tbl/table.cpp (ROW_START_LINE_REG) + (ROW_SAVE_LINE_REG, ROW_MAX_LINE_REG, REPEATED_NM_SET_MACRO) + (REPEATED_NM_SUS_MACRO): New macros. + (table::init_output): Define REPEATED_NM_SET_MACRO and REPEATED_NM_SUS_MACRO. (table::print_single_hline, table::print_double_hline, @@ -829,7 +2662,7 @@ * doc/webpage.ms: Updated. 2011-07-12 Ted Harding - Werner LEMBERG + Werner LEMBERG * src/preproc/tbl/tbl.man: Mention trick to get abutting rules. @@ -875,18 +2708,19 @@ * Makefile.in ($TARGETS): We must not pass `$MDEFINES' recursively down to the sub-makes started in src/libs/gnulib, because that - directory has its own values for `$top_srcdir' etc., and overriding - those from the command line will cause the build to fail. - Currently, `$MAKEOVERRIDES' will prevent the recursive passing of - those overrides with GNU make, but not with other make(1) - implementations. It looks like all targets that require `$MDEFINES' - set them explicitly anyway, so we shouldn't need to set `$MDEFINES' - on the top level. + directory has its own values for `$top_srcdir' etc., and + overriding those from the command line will cause the build to + fail. Currently, `$MAKEOVERRIDES' will prevent the recursive + passing of those overrides with GNU make, but not with other + make(1) implementations. It looks like all targets that require + `$MDEFINES' set them explicitly anyway, so we shouldn't need to + set `$MDEFINES' on the top level. -2011-03-21 Jan Vcelak +2011-03-21 Jan Vcelak Bernd Warken - [groffer] Remove hardcoded path to 'libdir/groff/groffer' directory. + [groffer] Remove hardcoded path to 'libdir/groff/groffer' + directory. * configure.ac: add GROFFERDIR variables. @@ -898,16 +2732,16 @@ [troff] Improve error message. - * src/roff/troff/input.cc (token::delimiter): Improve error message. - Suggested by Doug McIlroy . + * src/roff/troff/input.cc (token::delimiter): Improve error + message. Suggested by Doug McIlroy . 2011-03-04 Werner LEMBERG [mdoc] Within .An, .Aq, .Ao, and .Ac now use `<' and `>'. Problem reported by Ulrich Spörlein - * tmac/doc.tmac (Aq, Ao, Ac): Implement it to follow RFC 822 and RFC - 2822. + * tmac/doc.tmac (Aq, Ao, Ac): Implement it to follow RFC 822 and + RFC 2822. 2011-02-14 Werner LEMBERG @@ -927,8 +2761,9 @@ Fix Savannah bug #32301. - * src/roff/groff/Makefile.sub (XLIBS), src/preproc/grn/Makefile.sub, - src/preproc/html/Makefile.sub: Add $(LIBGNU). + * src/roff/groff/Makefile.sub (XLIBS), + src/preproc/grn/Makefile.sub, src/preproc/html/Makefile.sub: Add + $(LIBGNU). 2011-01-29 Krzysztof Å»elechowski @@ -1006,8 +2841,8 @@ Fix handling of wide characters in no-SGR mode. * src/devices/grotty/tty.cpp (tty_printer::make_underline): Only - emit a single backspace in no-SGR mode. less (at least) backspaces - over a character at a time. + emit a single backspace in no-SGR mode. less (at least) + backspaces over a character at a time. (tty_printer::make_bold): Likewise. 2011-01-19 Werner LEMBERG @@ -1029,14 +2864,20 @@ * doc/webpage.ms: Fix rendering of title image. -Copyright 2011-2013 - Free Software Foundation, Inc. + +________________________________________________________________________ + +##### License + +Copyright 2011-2014 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. + +##### Emacs settings Local Variables: +mode: change-log version-control: never -coding: utf-8 End: diff -ruN groff-1.22.2/ChangeLog.115 groff-1.22.3/ChangeLog.115 --- groff-1.22.2/ChangeLog.115 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.115 2014-11-04 09:38:35.138525085 +0100 @@ -6134,15 +6134,14 @@ * 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. +Copyright 1990-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 diff -ruN groff-1.22.2/ChangeLog.116 groff-1.22.3/ChangeLog.116 --- groff-1.22.2/ChangeLog.116 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.116 2014-11-04 09:38:35.138525085 +0100 @@ -1382,8 +1382,7 @@ * tmac/tmac.arkup: Added fixes so that .FTP and .MAILTO works better resp. correctly with non-HTML devices. -Copyright 1999, 2000 - Free Software Foundation, Inc. +Copyright 1999-2000 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/ChangeLog.117 groff-1.22.3/ChangeLog.117 --- groff-1.22.2/ChangeLog.117 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.117 2014-11-04 09:38:35.139525072 +0100 @@ -2184,8 +2184,7 @@ * src/roff/troff/troff.man: Fixing typos. -Copyright 2000, 2001 - Free Software Foundation, Inc. +Copyright 2000-2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/ChangeLog.118 groff-1.22.3/ChangeLog.118 --- groff-1.22.2/ChangeLog.118 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.118 2014-11-04 09:38:35.139525072 +0100 @@ -3788,8 +3788,7 @@ * REVISION: Increased to 3. -Copyright 2001, 2002 - Free Software Foundation, Inc. +Copyright 2001-2002 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/ChangeLog.119 groff-1.22.3/ChangeLog.119 --- groff-1.22.2/ChangeLog.119 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.119 2014-11-04 09:38:35.139525072 +0100 @@ -5225,8 +5225,7 @@ * REVISION: Increased to 2. -Copyright 2002-2005 - Free Software Foundation, Inc. +Copyright 2002-2005 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/ChangeLog.120 groff-1.22.3/ChangeLog.120 --- groff-1.22.2/ChangeLog.120 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.120 2014-11-04 09:38:35.140525060 +0100 @@ -3038,8 +3038,7 @@ * tmac/hyphenex.us: New version (`ushyphex.tex' from ftp.dante.de). -Copyright 2005-2009 - Free Software Foundation, Inc. +Copyright 2005-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 diff -ruN groff-1.22.2/ChangeLog.121 groff-1.22.3/ChangeLog.121 --- groff-1.22.2/ChangeLog.121 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/ChangeLog.121 2014-11-04 09:38:35.140525060 +0100 @@ -773,8 +773,7 @@ before doing a PS special and flush buffer. Update called functions. -Copyright 2009-2010 - Free Software Foundation, Inc. +Copyright 2009-2010 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/config.guess groff-1.22.3/config.guess --- groff-1.22.2/config.guess 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/config.guess 2014-11-04 09:38:35.140525060 +0100 @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# 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. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2012-12-23' +timestamp='2014-03-23' # 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 +# 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 @@ -22,19 +20,17 @@ # 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. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -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. +Copyright 1992-2014 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." @@ -138,6 +132,27 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -811,7 +826,7 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -859,21 +874,21 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -886,59 +901,54 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -957,54 +967,63 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1237,19 +1256,31 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1340,154 +1371,6 @@ exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <, 1996 # @@ -367,11 +367,7 @@ dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -548,13 +544,11 @@ dgux*) library_names_spec='$libname$shrext' ;; + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' + ;; freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac + library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' diff -ruN groff-1.22.2/config.sub groff-1.22.3/config.sub --- groff-1.22.2/config.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/config.sub 2014-11-04 09:38:35.141525047 +0100 @@ -1,24 +1,18 @@ #! /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 +# Copyright 1992-2014 Free Software Foundation, Inc. + +timestamp='2014-09-26' + +# 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 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. +# 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 . @@ -26,11 +20,12 @@ # 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. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ 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. +Copyright 1992-2014 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." @@ -259,12 +252,12 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc \ + | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -272,6 +265,7 @@ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -289,23 +283,26 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | 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 \ @@ -330,7 +327,10 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -372,13 +372,13 @@ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -387,6 +387,7 @@ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -406,18 +407,22 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -772,6 +777,9 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -799,7 +807,7 @@ os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -827,6 +835,10 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -835,7 +847,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1357,7 +1369,7 @@ -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* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1372,14 +1384,14 @@ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -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*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1503,9 +1515,6 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1554,6 +1563,9 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff -ruN groff-1.22.2/configure groff-1.22.3/configure --- groff-1.22.2/configure 2013-02-07 13:06:26.000000000 +0100 +++ groff-1.22.3/configure 2014-11-04 09:39:11.525070190 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for groff 1.22.2. +# Generated by GNU Autoconf 2.69 for groff 1.22.3. # # Report bugs to . # @@ -579,9 +579,9 @@ # 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_TARNAME='groff-1.22.3' +PACKAGE_VERSION='1.22.3' +PACKAGE_STRING='groff 1.22.3' PACKAGE_BUGREPORT='bug-groff@gnu.org' PACKAGE_URL='' @@ -627,13 +627,20 @@ ac_subst_vars='LTLIBOBJS GLIBC21 pnmtops_nosetpage +make_uninstall_pdfexamples +make_install_pdfexamples +make_pdfexamples +make_uninstall_pdfdoc make_install_pdfdoc make_pdfdoc ac_ct_AWK -AWK ALT_AWK_PROGS -make_install_html -make_html +make_uninstall_htmlexamples +make_install_htmlexamples +make_htmlexamples +make_uninstall_htmldoc +make_install_htmldoc +make_htmldoc pnmtops psselect pnmtopng @@ -670,14 +677,29 @@ INSTALL_PROGRAM INSTALL_INFO RANLIB +make_uninstall_infodoc +make_install_infodoc +make_infodoc MAKEINFO +make_uninstall_examples +make_install_examples +make_examples +make_uninstall_otherdoc +make_install_otherdoc +make_otherdoc +make_uninstall_shipped_htmldoc +make_install_shipped_htmldoc +doc_dist_target_ok YACC -PERLPATH DVIPRINT PSPRINT LPQ LP LPR +AWK +PERL_VERSION +SED +PERL groffer_dir appresdir XLIBDIRS @@ -688,6 +710,9 @@ X_PRE_LIBS X_CFLAGS XMKMF +make_uninstall_winscripts +make_install_winscripts +make_winscripts OTHERDEVDIRS TTYDEVDIRS ac_ct_CXX @@ -740,13 +765,19 @@ PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +referdir +grog_dir +gpinyin_dir +glilypond_dir +libprogramdir' ac_subst_files='' ac_user_opts=' enable_option_checking with_x with_appresdir with_grofferdir +with_doc with_gnu_ld enable_rpath with_libiconv_prefix @@ -1309,7 +1340,7 @@ # 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. +\`configure' configures groff 1.22.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1357,7 +1388,7 @@ --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] + --docdir=DIR documentation root [DATAROOTDIR/doc/groff-1.22.3] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1378,7 +1409,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of groff 1.22.2:";; + short | recursive ) echo "Configuration of groff 1.22.3:";; esac cat <<\_ACEOF @@ -1394,7 +1425,12 @@ --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-doc[=TYPE] choose which manuals (beside man pages) are + desirable. TYPE can be `yes' or `no', or a + comma-separated list of one or multiple of `html', + `info', `other', `pdf', and `examples', to restrict + what is produced + --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 @@ -1482,7 +1518,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -groff configure 1.22.2 +groff configure 1.22.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2060,7 +2096,7 @@ 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 +It was created by groff $as_me 1.22.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4646,6 +4682,25 @@ $as_echo "no" >&6; } ;; esac fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install .cmd wrapper scripts for Windows" >&5 +$as_echo_n "checking whether to install .cmd wrapper scripts for Windows... " >&6; } + case "$host_os" in + *mingw*) + make_winscripts=winscripts + make_install_winscripts=install_winscripts + make_uninstall_winscripts=uninstall_winscripts + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; + *) + make_winscripts= + make_install_winscripts= + make_uninstall_winscripts= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } @@ -5427,94 +5482,19 @@ 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 + if test "x$prefix" = "xNONE"; then + appresdir=$ac_default_prefix/lib/X11/app-defaults + else + appresdir=$prefix/lib/X11/app-defaults + fi else appresdir=$with_appresdir fi fi +libprogramdir=$libdir/groff + # Check whether --with-grofferdir was given. if test "${with_grofferdir+set}" = set; then : @@ -5522,11 +5502,249 @@ fi if test "x$with_grofferdir" = "x"; then - groffer_dir=$libdir/groff/groffer + groffer_dir=$libprogramdir/groffer else groffer_dir=$with_grofferdir fi +glilypond_dir=$libprogramdir/glilypond + +gpinyin_dir=$libprogramdir/gpinyin + +grog_dir=$libprogramdir/grog + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_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 +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_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_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +for ac_prog in gawk mawk nawk awk +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_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_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 + +PERLVERSION=v5.6.1 + # 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_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # 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_PERL="$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_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$PERL" = "xno"; then + as_fn_error 1 "perl binary not found" "$LINENO" 5 + fi + + + + + if test -n "$PERL"; then : + + ax_perl_version="$PERLVERSION" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl version" >&5 +$as_echo_n "checking for perl version... " >&6; } + + perl_version=`$PERL --version 2>&1 \ + | $SED -n -e '/This is perl/b inspect +b +: inspect +s/.* (\{0,1\}v\([0-9]*\.[0-9]*\.[0-9]*\))\{0,1\} .*/\1/;p'` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_version" >&5 +$as_echo "$perl_version" >&6; } + + PERL_VERSION=$perl_version + + + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$ax_perl_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "$perl_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + : + true + + else + : + \ + as_fn_error 1 "perl version is too old" "$LINENO" 5 + + fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find the perl interpreter" >&5 +$as_echo "$as_me: WARNING: could not find the perl interpreter" >&2;} + \ + as_fn_error 1 "perl version is too old" "$LINENO" 5 + +fi + if test -z "$PSPRINT"; then for ac_prog in lpr do @@ -5685,6 +5903,9 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPRINT" >&5 $as_echo "$DVIPRINT" >&6; } +# GROFF_REFER +referdir=$libprogramdir/refer + { $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 : @@ -5752,47 +5973,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. @@ -5836,8 +6016,82 @@ done test -n "$YACC" || YACC="yacc" -missing= - # Extract the first word of "makeinfo", so it can be a program name with args. + +# Check whether --with-doc was given. +if test "${with_doc+set}" = set; then : + withval=$with_doc; doc="$withval" +else + doc=yes +fi + + test "x$doc" = xno && doc='' + if test "x$doc" = xyes; then + doc_dist_target_ok=yes + docadd_html=yes + docadd_info=yes + docadd_other=yes + docadd_pdf=yes + docadd_examples=yes + else + # Don't use case/esac, verify input. + doc_dist_target_ok=no + docadd_html=no + docadd_info=no + docadd_other=no + docadd_pdf=no + docadd_examples=no + OFS=$IFS + IFS=',' + set -- $doc + IFS=$OFS + for i + do + test "x$i" = xhtml && { docadd_html=yes; continue; } + test "x$i" = xinfo && { docadd_info=yes; continue; } + test "x$i" = xother && { docadd_other=yes; continue; } + test "x$i" = xpdf && { docadd_pdf=yes; continue; } + test "x$i" = xexamples && { docadd_examples=yes; continue; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Invalid \`--with-doc' argument: $i" >&5 +$as_echo "$as_me: WARNING: Invalid \`--with-doc' argument: $i" >&2;} + done + fi + if test $docadd_html = yes; then + make_install_shipped_htmldoc=install_shipped_htmldoc + make_uninstall_shipped_htmldoc=uninstall_shipped_htmldoc + else + make_install_shipped_htmldoc= + make_uninstall_shipped_htmldoc= + fi + if test $docadd_other = yes; then + make_otherdoc=otherdoc + make_install_otherdoc=install_otherdoc + make_uninstall_otherdoc=uninstall_otherdoc + else + make_otherdoc= + make_install_otherdoc= + make_uninstall_otherdoc= + fi + if test $docadd_examples = yes; then + make_examples=examples + make_install_examples=install_examples + make_uninstall_examples=uninstall_examples + else + make_examples= + make_install_examples= + make_uninstall_examples= + fi + + + + + + + + + +if test $docadd_info = yes; then + 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; } @@ -5874,43 +6128,56 @@ fi - if test -z "$MAKEINFO"; then - missing="\`makeinfo' is missing." - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makeinfo version" >&5 + 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 + # 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." + # 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 - fi - if test -n "$missing"; then - infofile=doc/groff.info - test -f ${infofile} || infofile=${srcdir}/${infofile} - if test ! -f ${infofile} \ + 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 + 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 + 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 + + make_infodoc=infodoc + make_install_infodoc=install_infodoc + make_uninstall_infodoc=uninstall_infodoc + else + make_infodoc= + make_install_infodoc= + make_uninstall_infodoc= + MAKEINFO= 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 @@ -6035,7 +6302,8 @@ ac_dir=`cd $ac_aux_dir; pwd` ac_install_sh="$ac_dir/install-sh -c" -for ac_prog in install-info +if test $docadd_info = yes; then + 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 @@ -6078,6 +6346,7 @@ done test -n "$INSTALL_INFO" || INSTALL_INFO=":" + fi # 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: @@ -8022,6 +8291,7 @@ 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 @@ -8041,11 +8311,12 @@ || 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -8055,11 +8326,11 @@ 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 + # Canonicalize the pathname 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" @@ -8084,23 +8355,26 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$acl_save_ifs" 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. + # but apparently some variants of GNU ld 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 + case `"$acl_cv_path_LD" -v 2>&1 &6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 @@ -8931,36 +9207,42 @@ 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 - + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + 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 () + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () { - int result = 0; +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 */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; @@ -8973,14 +9255,14 @@ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; @@ -8992,14 +9274,14 @@ 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 ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; @@ -9012,14 +9294,14 @@ 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"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; @@ -9039,17 +9321,20 @@ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; + + ; + return 0; } _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 + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" fi @@ -10037,9 +10322,13 @@ fi test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing +make_htmldoc= + make_install_htmldoc= + make_uninstall_htmldoc= + make_htmlexamples= + make_install_htmlexamples= + make_uninstall_htmlexamples= - make_html=html - make_install_html=install_html missing= # Extract the first word of "pnmcut", so it can be a program name with args. @@ -10246,7 +10535,18 @@ test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" - if test -n "$missing"; then + if test -z "$missing"; then + if test $docadd_html = yes; then + make_htmldoc=htmldoc + make_install_htmldoc=install_htmldoc + make_uninstall_htmldoc=uninstall_htmldoc + if test $docadd_examples = yes; then + make_htmlexamples=html_examples + make_install_htmlexamples=install_htmlexamples + make_uninstall_htmlexamples=uninstall_htmlexamples + fi + fi + else plural=`set $missing; test $# -gt 1 && echo s` missing=`set $missing missing="" @@ -10261,32 +10561,34 @@ done echo $missing` - make_html= - make_install_html= + docnote=. + test $docadd_html = yes && docnote='; + therefore, it will neither be possible to prepare, nor to install, + documentation in HTML format.' { $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. + Consequently, groff's HTML backend (grohtml) will not work properly$docnote " >&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. + Consequently, groff's HTML backend (grohtml) will not work properly$docnote " >&2;} + doc_dist_target_ok=no fi + + + # Check whether --with-alt-awk was given. if test "${with_alt_awk+set}" = set; then : withval=$with_alt_awk; ALT_AWK_PROGS="$withval" @@ -10404,42 +10706,58 @@ fi test "$AWK" = "no" && AWK=missing +make_pdfdoc= + make_install_pdfdoc= + make_uninstall_pdfdoc= + make_pdfexamples= + make_install_pdfexamples= + make_uninstall_pdfexamples= - 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 + if test -z "$missing"; then + if test $docadd_pdf = yes; then + make_pdfdoc=pdfdoc + make_install_pdfdoc=install_pdfdoc + make_uninstall_pdfdoc=uninstall_pdfdoc + if test $docadd_examples = yes; then + make_pdfexamples=pdfexamples + make_install_pdfexamples=install_pdfexamples + make_uninstall_pdfexamples=uninstall_pdfexamples + fi + fi + else 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= + docnote=. + test $docadd_pdf = yes && docnote='; + therefore, it will neither be possible to prepare, nor to install, + documentation and most of the examples in PDF format.' { $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. + Consequently, groff's PDF formatter (pdfroff) will not work properly$docnote " >&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. + Consequently, groff's PDF formatter (pdfroff) will not work properly$docnote " >&2;} + doc_dist_target_ok=no 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 @@ -10551,7 +10869,18 @@ #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) result |= 2; else { @@ -11176,7 +11505,7 @@ # 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 +This file was extended by groff $as_me 1.22.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11238,7 +11567,7 @@ 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 +groff config.status 1.22.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -11249,6 +11578,7 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -11961,49 +12291,76 @@ fi +echo " +${PACKAGE_NAME} version ${PACKAGE_VERSION} +---------------------------------------------------------------------- + Prefix : ${prefix} + Compiler : ${CC} ${CFLAGS} ${CPPFLAGS}" +if test "x$groff_no_x" = "xyes"; then +echo "\ + X11 support : no" +else +echo "\ + X11 support : yes + X11 resources dir : $appresdir" +fi +if test "x$doc" = x; then +echo "\ + Doc build : no" +else +echo "\ + Doc build : ${doc} " +fi +echo "\ +----------------------------------------------------------------------" + 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 (GXditview and + GXditview-color) will be installed in: - The application resource files for gxditview will be installed as - - $appresdir/GXditview - - and - - $appresdir/GXditview-color + $appresdir (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. + To install them into a different directory, say, + \`/etc/X11/app-defaults', add + \`--with-appresdir=/etc/X11/app-defaults' to the configure script + command line options and rerun it (\`prefix' value has no effect on + a --with-appresdir option). + + If the gxditview resources are installed in a directory that is not + one of the default X11 resources directories (common default + directories are /usr/lib/X11/app-defaults, + /usr/share/X11/app-defaults and /etc/X11/app-defaults), you will + have to set the environment variable XFILESEARCHPATH to this + path. More details can be found in the X(7) manual page, or in \"X + Toolkit Intrinsics - C Language Interface manual\" " >&5 $as_echo "$as_me: + The application resource files for gxditview (GXditview and + GXditview-color) will be installed in: - The application resource files for gxditview will be installed as - - $appresdir/GXditview - - and - - $appresdir/GXditview-color + $appresdir (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. + To install them into a different directory, say, + \`/etc/X11/app-defaults', add + \`--with-appresdir=/etc/X11/app-defaults' to the configure script + command line options and rerun it (\`prefix' value has no effect on + a --with-appresdir option). + + If the gxditview resources are installed in a directory that is not + one of the default X11 resources directories (common default + directories are /usr/lib/X11/app-defaults, + /usr/share/X11/app-defaults and /etc/X11/app-defaults), you will + have to set the environment variable XFILESEARCHPATH to this + path. More details can be found in the X(7) manual page, or in \"X + Toolkit Intrinsics - C Language Interface manual\" " >&6;} fi fi diff -ruN groff-1.22.2/configure.ac groff-1.22.3/configure.ac --- groff-1.22.2/configure.ac 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/configure.ac 2014-11-04 09:38:35.143525022 +0100 @@ -1,6 +1,5 @@ # Autoconf configuration file for groff. -# Copyright (C) 1989-1995, 2001-2007, 2009, 2011-2012 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # # This file is part of groff. # @@ -55,15 +54,23 @@ GROFF_CXX_CHECK GROFF_EBCDIC GROFF_OS390 +GROFF_CMD_FILES GROFF_X11 GROFF_APPRESDIR_OPTION GROFF_APPRESDIR_DEFAULT +GROFF_LIBPROGRAMDIR_DEFAULT GROFF_GROFFERDIR_OPTION GROFF_GROFFERDIR_DEFAULT +GROFF_GLILYPONDDIR_DEFAULT +GROFF_GPINYINDIR_DEFAULT +GROFF_GROGDIR_DEFAULT +GROFF_PERL GROFF_PRINT +# GROFF_REFER +GROFF_REFERDIR_DEFAULT AC_PROG_EGREP -AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl]) GROFF_PROG_YACC +GROFF_DOC_CHECK GROFF_MAKEINFO AC_PROG_RANLIB GROFF_INSTALL_SH @@ -163,4 +170,27 @@ AC_CONFIG_FILES([test-groff], [chmod +x test-groff]) AC_OUTPUT +echo " +${PACKAGE_NAME} version ${PACKAGE_VERSION} +---------------------------------------------------------------------- + Prefix : ${prefix} + Compiler : ${CC} ${CFLAGS} ${CPPFLAGS}" +if test "x$groff_no_x" = "xyes"; then +echo "\ + X11 support : no" +else +echo "\ + X11 support : yes + X11 resources dir : $appresdir" +fi +if test "x$doc" = x; then +echo "\ + Doc build : no" +else +echo "\ + Doc build : ${doc} " +fi +echo "\ +----------------------------------------------------------------------" + GROFF_APPRESDIR_CHECK diff -ruN groff-1.22.2/contrib/chem/ChangeLog groff-1.22.3/contrib/chem/ChangeLog --- groff-1.22.2/contrib/chem/ChangeLog 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/ChangeLog 2014-11-04 09:38:35.438521334 +0100 @@ -1,3 +1,72 @@ +2014-09-25 Bernd Warken + + * chem.pl: New chem version 1.0.5. + + * Makefile.sub: Add .PHONY. Restructure install and uninstall. + +2014-09-03 Bernd Warken + + * chem.pl: New chem version 1.0.4. Change version(). + + * all `chem' source files: Add and improve the copying + information. Remove last update. Add Emacs setting if necessary. + +2014-07-05 Bernd Warken + ________________________________________________________________ + * chem.pl: New chem version 1.0.3 + + * chem.man: Make file doclifter compatible. + +2014-07-04 Bernd Warken + ________________________________________________________________ + * release of chem 1.0.2 + + * chem.man: Remove definition of `.FONT'. + +2014-07-04 Bernd Warken + + * chem.man: Transform into classical man-page style. + +2014-07-04 Bernd Warken + + * chem.man: Remove definition of .Env-var. + +2014-07-03 Bernd Warken + ________________________________________________________________ + * release of chem 1.0.1 + + * chem.man: Add `.mso' for `groffer.man'. + +2014-06-17 Bernd Warken + ________________________________________________________________ + * release of chem 1.0.0 + + * Makefile.sub: Add Emacs final part. + + * ChangeLog: Correct the space characters in this file as Emacs + style. + +2014-03-29 Steffen Nurpmeso + + * Makefile.sub (uninstall_examples): Remove superfluous `rmdir'. + +2014-03-29 Steffen Nurpmeso + + * Makefile.sub (install_examples): Use `find', not shell globs. + + Instead of using rm(1) two times with shell globs the expansion of + which will include subdirectories (thus resulting in error + messages), use find(1) and its `-exec' operand. + +2014-03-29 Steffen Nurpmeso + + * Makefile.sub: Handle examples separately, controlled by + $(make{_,_install_,_uninstall_}examples). + +2013-01-29 Bernd Warken + + * all: Change license into GPL2. + 2013-01-29 Werner LEMBERG * Makefile.sub (MOSTLYCLEANADD): Fix typo. @@ -28,10 +97,10 @@ 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. + * 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 @@ -43,27 +112,27 @@ portability. Conversion checked using the protocol described in tmac/TESTING-HINTS. -2006-11-10 Bernd Warken - ________________________________________________________________ - * release of chem 0.3.1 +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 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. @@ -77,11 +146,11 @@ 2006-11-09 Werner LEMBERG - * chem.man: Revised. + * chem.man: Revised. -2006-11-08 Bernd Warken - ________________________________________________________________ - * release of chem 0.2.0 +2006-11-08 Bernd Warken + ________________________________________________________________ + * release of chem 0.2.0 * pic.tmac: Remove this file. Use instead the installed pic.tmac in $(tmacdir). @@ -95,15 +164,15 @@ * 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 +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. @@ -132,7 +201,7 @@ 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. @@ -147,22 +216,22 @@ constructs during `chem'. Use the elements in `%Define' as `chem' commands. -2006-10-27 Bernd Warken - ________________________________________________________________ - * release of chem 0.1.1 +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 + +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 @@ -188,7 +257,7 @@ * 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. @@ -196,37 +265,36 @@ * 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 +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 . +2006-10-15 Bernd Warken +________________________________________________________________ +License + +Copyright (C) 2006-2014 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. +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. +This file is part of `chem', which is part of the `groff' project. - ####### Emacs settings - Local Variables: - mode: change-log - End: +####### Emacs settings +Local Variables: +mode: change-log +End: diff -ruN groff-1.22.2/contrib/chem/chem.man groff-1.22.3/contrib/chem/chem.man --- groff-1.22.2/contrib/chem/chem.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/chem.man 2014-11-04 09:38:35.438521334 +0100 @@ -1,113 +1,106 @@ -.ig -@g@chem.1 - man page for @g@chem (section 1). +.TH @G@CHEM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@chem \- groff preprocessor for producing chemical structure diagrams +. +.\" @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 +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2006-2014 Free Software Foundation, Inc. + +This file is part of chem, which is part of groff, a free software +project. -Source file position: /contrib/chem/chem.man -Installed position: $prefix/share/man/man1/@g@chem.1 +You can redistribute it and/or modify it under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free +Software Foundation. -Last update: 05 Jan 2009 +The license text for GPL2 is available in the internet at +.UR http://www.gnu.org/licenses/gpl-2.0.html +.UE . .. . -. .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 . + +It is based on the documentation of Brian Kernighan's original awk +version of chem at +.UR http://cm.bell-labs.com/cm/cs/who/bwk/index.html +.UE . .. . +.\" -------------------------------------------------------------------- +.\" Setup +.\" -------------------------------------------------------------------- . -.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. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- . -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. +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL . -. -.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 -.. +.\" Bullet +.ie t .ds BU \[bu] +.el .ds BU * +.\" used in `.IP \*(BU 2m' (former .Topic) . . .\" -------------------------------------------------------------------- -.\" Local macro definitions +.\" Macro definitions . -.ds El \&.\|.\|.\& -. -.\" .File_name () +.\" -------------------------------------------------------------------- +.\" .FONT ( [ ...]) .\" -.\" Display a file or directory name in CB font. +.\" in different fonts: R, I, B, CR, CI, CB .\" -.de FN -. CB \\$@ +.de FONT +. if (\\n[.$] = 0) \{\ +. \" compatibility to .ft +. nop \&\f[P]\& +. return +. \} +. ds result \& +. while (\\n[.$] >= 2) \{\ +. as result \,\f[\\$1]\\$2 +. if !"\\$1"P" .as result \f[P] +. \" the double-quote " after P above is now ignored in Emacs +. shift 2 +. \} +. if (\\n[.$] = 1) .as result \,\f[\\$1] +.\" nh +. nop \\*[result]\& +.\" hy +. rm result .. . -.\" .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" +.SH "SYNOPSIS" .\" -------------------------------------------------------------------- . .SY @g@chem -.RI [ "\%option" \*(El] +.OP \fI\%option \*(EL\fP .OP \-\- -.RI [ "\%filespec" \*(El] +.OP \fI\%filespec \*(EL\fP +.YS . .SY @g@chem .B \-h | .B \-\-help +.YS . .SY @g@chem .B \-v @@ -120,7 +113,6 @@ .SH OPTION USAGE .\" -------------------------------------------------------------------- . -.P There are no other options than .BR \-h , .BR \-\-help , @@ -175,16 +167,17 @@ The program .B @g@chem originates from the Perl source file -.FN chem.pl . +.BR chem.pl . +. It tells .B @g@pic to include a copy of the macro file -.FN chem.pic . +.BR chem.pic . . Moreover the .I groff source file -.FN pic.tmac +.B pic.tmac is loaded. . . @@ -271,7 +264,7 @@ .BR groffer : . .IP -.B "@g@chem [file\*(El] | groffer" +.B @g@chem [file \*(EL] | groffer . .P If you want to create just @@ -285,7 +278,7 @@ for the activation of .BR @g@pic : .IP -.B "@g@chem [file\*(El] | groff -p \*(El" +.B @g@chem [file \*(EL] | groff \-p \*(EL . . .\" -------------------------------------------------------------------- @@ -299,7 +292,7 @@ moieties (e.g., .BR C , .BR NH3 , -\*(El), and strings. +\*(EL, and strings. . . .\" -------------------------------------------------------------------- @@ -455,18 +448,18 @@ .SY ring .RB [ \%pointing\ ( up | right | left | down )] .RB [ \%aromatic ] -.RB [ put\ Mol\ at\ \fIn\fP ] +.RB [ put\ Mol\ at\ \fIn\/\fP ] .RB [ \%double\ \c .IR i , j\ \c .IR k , l\ \c -\*(El] +\*(EL .RI [ picstuff ] .YS .RE . . .P -The vertices of a ring are numbered 1, 2, \*(El from the +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 @@ -487,7 +480,7 @@ .P The ring vertices are named .BR .V1 , -\*(El, +\*(EL, .BI .V n\fR,\fP with .B .V1 @@ -527,7 +520,7 @@ . .P Interior double bonds are specified as -.BI \%double\ n1 , n2\ n3 , n4\ \fR\*(El;\fP +.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 @@ -664,7 +657,7 @@ . It represents a string that should be printed (without the quotes). . -Text within quotes \(dq\*(El\(dq is treated more or less +Text within quotes \(dq\*(EL\(dq is treated more or less like a moiety except that no changes are made to the quoted part. . . @@ -684,7 +677,7 @@ . .IP .IB Name : -\*(El +\*(EL . . .P @@ -713,7 +706,7 @@ The specific construction .RS .TP -.BR bond\ \*(El " ; moiety" +.BR bond\ \*(EL " ; moiety" .RE .P is equivalent to @@ -865,7 +858,7 @@ . . .P -There is no in-line chemistry yet (e.g., analogous to the $\*(El$ +There is no in-line chemistry yet (e.g., analogous to the $\*(EL$ construct of eqn). . . @@ -899,14 +892,14 @@ .\" -------------------------------------------------------------------- . .TP -.FN @DATASUBDIR@/pic/chem.pic +.B @DATASUBDIR@/pic/chem.pic A collection of .I pic macros needed by .BR @g@chem . . .TP -.FN @MACRODIR@/pic.tmac +.B @MACRODIR@/pic.tmac A macro file which redefines .B .PS and @@ -916,12 +909,12 @@ diagrams. . .TP -.FN @DOCDIR@/examples/chem/*.chem +.B @DOCDIR@/examples/chem/*.chem Example files for .IR chem . . .TP -.FN @DOCDIR@/examples/chem/122/*.chem +.B @DOCDIR@/examples/chem/122/*.chem Example files from the classical .I chem book @@ -945,7 +938,7 @@ you are using. . You can get both version numbers by calling -.BR "@g@chem --version" . +.BR "@g@chem \-\-version" . . . .P @@ -983,7 +976,7 @@ .UE . . Its -.FN README +.B README file was used for this manual page. . . @@ -997,15 +990,13 @@ . . .\" -------------------------------------------------------------------- -.SH "AUTHOR" -.\" -------------------------------------------------------------------- -.au -. -. -.\" -------------------------------------------------------------------- .SH "COPYING" .\" -------------------------------------------------------------------- .co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au . . .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/contrib/chem/chem.pic groff-1.22.3/contrib/chem/chem.pic --- groff-1.22.2/contrib/chem/chem.pic 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/chem.pic 2014-11-04 09:38:35.438521334 +0100 @@ -3,24 +3,23 @@ # Source file position: /contrib/chem/chem.pic # Installed position: /share/groff//pic -# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `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 . +# The license text for GPL2 is available in the internet at +# . ######################################################################## diff -ruN groff-1.22.2/contrib/chem/chem.pl groff-1.22.3/contrib/chem/chem.pl --- groff-1.22.2/contrib/chem/chem.pl 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/chem.pl 2014-11-04 09:38:35.438521334 +0100 @@ -5,30 +5,28 @@ # Source file position: /contrib/chem/chem.pl # Installed position: /bin/chem -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +my $Copyright = 'Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `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 . +# The GPL2 license text is available in the internet at +# . ######################################################################## # settings ######################################################################## -my $Program_Version = '0.3.1'; -my $Last_Update = '03 Jan 2009'; +my $Program_Version = '1.0.5'; # this setting of the groff version is only used before make is run, # otherwise @VERSION@ will set it. @@ -1255,12 +1253,10 @@ # sub version { $Groff_Version = $Groff_Version_Preset unless $Groff_Version; - my $year = $Last_Update; - $year =~ s/^.* //; print <. -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## CH3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch2b_benzene.chem groff-1.22.3/contrib/chem/examples/122/ch2b_benzene.chem --- groff-1.22.2/contrib/chem/examples/122/ch2b_benzene.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch2b_benzene.chem 2014-11-04 09:38:35.585519496 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## benzene diff -ruN groff-1.22.2/contrib/chem/examples/122/ch2c_benzene_right.chem groff-1.22.3/contrib/chem/examples/122/ch2c_benzene_right.chem --- groff-1.22.2/contrib/chem/examples/122/ch2c_benzene_right.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch2c_benzene_right.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,11 @@ # 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'. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # `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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +23,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## benzene pointing right # a rotated benzene ring diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4a_stick.chem groff-1.22.3/contrib/chem/examples/122/ch4a_stick.chem --- groff-1.22.2/contrib/chem/examples/122/ch4a_stick.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4a_stick.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond right diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4b_methyl_acetate.chem groff-1.22.3/contrib/chem/examples/122/ch4b_methyl_acetate.chem --- groff-1.22.2/contrib/chem/examples/122/ch4b_methyl_acetate.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4b_methyl_acetate.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## CH3 # the 3 is automatically turned into a subscript diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4c_colon.chem groff-1.22.3/contrib/chem/examples/122/ch4c_colon.chem --- groff-1.22.2/contrib/chem/examples/122/ch4c_colon.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4c_colon.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## CH3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4d_HCl.H2O.chem groff-1.22.3/contrib/chem/examples/122/ch4d_HCl.H2O.chem --- groff-1.22.2/contrib/chem/examples/122/ch4d_HCl.H2O.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4d_HCl.H2O.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## HCl.H2O diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem groff-1.22.3/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem --- groff-1.22.2/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## CaSO4.2H2O diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4f_C.chem groff-1.22.3/contrib/chem/examples/122/ch4f_C.chem --- groff-1.22.2/contrib/chem/examples/122/ch4f_C.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4f_C.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond ; C # 1st definition of C diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4g_BP.chem groff-1.22.3/contrib/chem/examples/122/ch4g_BP.chem --- groff-1.22.2/contrib/chem/examples/122/ch4g_BP.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4g_BP.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## # this is the isopropyl group diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4h_methacrylate.chem groff-1.22.3/contrib/chem/examples/122/ch4h_methacrylate.chem --- groff-1.22.2/contrib/chem/examples/122/ch4h_methacrylate.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4h_methacrylate.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond dotted diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4i_cyclo.chem groff-1.22.3/contrib/chem/examples/122/ch4i_cyclo.chem --- groff-1.22.2/contrib/chem/examples/122/ch4i_cyclo.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4i_cyclo.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R3: ring3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4j_ring4.chem groff-1.22.3/contrib/chem/examples/122/ch4j_ring4.chem --- groff-1.22.2/contrib/chem/examples/122/ch4j_ring4.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4j_ring4.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## ring4 pointing 45 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4k_ring3.chem groff-1.22.3/contrib/chem/examples/122/ch4k_ring3.chem --- groff-1.22.2/contrib/chem/examples/122/ch4k_ring3.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4k_ring3.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R: ring3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4l_vertex.chem groff-1.22.3/contrib/chem/examples/122/ch4l_vertex.chem --- groff-1.22.2/contrib/chem/examples/122/ch4l_vertex.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4l_vertex.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R: benzene pointing right diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4m_double.chem groff-1.22.3/contrib/chem/examples/122/ch4m_double.chem --- groff-1.22.2/contrib/chem/examples/122/ch4m_double.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4m_double.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## ring double 1,2 3,4 5,6 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4n_triple.chem groff-1.22.3/contrib/chem/examples/122/ch4n_triple.chem --- groff-1.22.2/contrib/chem/examples/122/ch4n_triple.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4n_triple.chem 2014-11-04 09:38:35.586519484 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## ring8 triple 3,4 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4o_aromatic.chem groff-1.22.3/contrib/chem/examples/122/ch4o_aromatic.chem --- groff-1.22.2/contrib/chem/examples/122/ch4o_aromatic.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4o_aromatic.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,11 @@ # 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'. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # `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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +23,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R: aromatic ring7 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4p_cholestanol.chem groff-1.22.3/contrib/chem/examples/122/ch4p_cholestanol.chem --- groff-1.22.2/contrib/chem/examples/122/ch4p_cholestanol.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4p_cholestanol.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: ring6 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4q_rings.chem groff-1.22.3/contrib/chem/examples/122/ch4q_rings.chem --- groff-1.22.2/contrib/chem/examples/122/ch4q_rings.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4q_rings.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R3: ring3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4r_spiro.chem groff-1.22.3/contrib/chem/examples/122/ch4r_spiro.chem --- groff-1.22.2/contrib/chem/examples/122/ch4r_spiro.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4r_spiro.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: ring6 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4s_heteroatoms.chem groff-1.22.3/contrib/chem/examples/122/ch4s_heteroatoms.chem --- groff-1.22.2/contrib/chem/examples/122/ch4s_heteroatoms.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4s_heteroatoms.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## ring put N at 2 put S at 4 double 2,3 4,5 6,1 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4t_polycyclic.chem groff-1.22.3/contrib/chem/examples/122/ch4t_polycyclic.chem --- groff-1.22.2/contrib/chem/examples/122/ch4t_polycyclic.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4t_polycyclic.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: benzene pointing right diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4u_nicotine.chem groff-1.22.3/contrib/chem/examples/122/ch4u_nicotine.chem --- groff-1.22.2/contrib/chem/examples/122/ch4u_nicotine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4u_nicotine.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## benzene put N at 4 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4v_histidine.chem groff-1.22.3/contrib/chem/examples/122/ch4v_histidine.chem --- groff-1.22.2/contrib/chem/examples/122/ch4v_histidine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4v_histidine.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: flatring pointing down put N at 2 put N at 5 double 1,2 3,4 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4w_lsd.chem groff-1.22.3/contrib/chem/examples/122/ch4w_lsd.chem --- groff-1.22.2/contrib/chem/examples/122/ch4w_lsd.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4w_lsd.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## B: benzene pointing right diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4x_anisole.chem groff-1.22.3/contrib/chem/examples/122/ch4x_anisole.chem --- groff-1.22.2/contrib/chem/examples/122/ch4x_anisole.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4x_anisole.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: benzene diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4y_reserpine.chem groff-1.22.3/contrib/chem/examples/122/ch4y_reserpine.chem --- groff-1.22.2/contrib/chem/examples/122/ch4y_reserpine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4y_reserpine.chem 2014-11-04 09:38:35.587519471 +0100 @@ -10,16 +10,13 @@ # . # Some corrections were added. -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,6 +26,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## CH3O diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem groff-1.22.3/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem --- groff-1.22.2/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem 2014-11-04 09:38:35.587519471 +0100 @@ -13,16 +13,13 @@ # . # Some corrections were added. -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,6 +29,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## # a left bracket diff -ruN groff-1.22.2/contrib/chem/examples/122/ch4z2_text.chem groff-1.22.3/contrib/chem/examples/122/ch4z2_text.chem --- groff-1.22.2/contrib/chem/examples/122/ch4z2_text.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch4z2_text.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond 120 dotted diff -ruN groff-1.22.2/contrib/chem/examples/122/ch5a_size.chem groff-1.22.3/contrib/chem/examples/122/ch5a_size.chem --- groff-1.22.2/contrib/chem/examples/122/ch5a_size.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch5a_size.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## .ps 14 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch6a_pic.chem groff-1.22.3/contrib/chem/examples/122/ch6a_pic.chem --- groff-1.22.2/contrib/chem/examples/122/ch6a_pic.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch6a_pic.chem 2014-11-04 09:38:35.587519471 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R: ring double 2,3 diff -ruN groff-1.22.2/contrib/chem/examples/122/ch6b_dna.chem groff-1.22.3/contrib/chem/examples/122/ch6b_dna.chem --- groff-1.22.2/contrib/chem/examples/122/ch6b_dna.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/ch6b_dna.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## P: [ diff -ruN groff-1.22.2/contrib/chem/examples/122/chAa_polymer.chem groff-1.22.3/contrib/chem/examples/122/chAa_polymer.chem --- groff-1.22.2/contrib/chem/examples/122/chAa_polymer.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAa_polymer.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## # epoxy based on the m-phenyldiamine cured bisphenol-A diff -ruN groff-1.22.2/contrib/chem/examples/122/chAb_vinyl_chloro.chem groff-1.22.3/contrib/chem/examples/122/chAb_vinyl_chloro.chem --- groff-1.22.2/contrib/chem/examples/122/chAb_vinyl_chloro.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAb_vinyl_chloro.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## Cl diff -ruN groff-1.22.2/contrib/chem/examples/122/chAc_morphine.chem groff-1.22.3/contrib/chem/examples/122/chAc_morphine.chem --- groff-1.22.2/contrib/chem/examples/122/chAc_morphine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAc_morphine.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: ring6 double 1,2 diff -ruN groff-1.22.2/contrib/chem/examples/122/chAd_chlorophyll.chem groff-1.22.3/contrib/chem/examples/122/chAd_chlorophyll.chem --- groff-1.22.2/contrib/chem/examples/122/chAd_chlorophyll.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAd_chlorophyll.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## Mg diff -ruN groff-1.22.2/contrib/chem/examples/122/chAe_chair.chem groff-1.22.3/contrib/chem/examples/122/chAe_chair.chem --- groff-1.22.2/contrib/chem/examples/122/chAe_chair.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAe_chair.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## pic define chair { [ diff -ruN groff-1.22.2/contrib/chem/examples/122/chAf_arrow.chem groff-1.22.3/contrib/chem/examples/122/chAf_arrow.chem --- groff-1.22.2/contrib/chem/examples/122/chAf_arrow.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAf_arrow.chem 2014-11-04 09:38:35.588519459 +0100 @@ -12,16 +12,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,6 +28,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond length .1 ; BP diff -ruN groff-1.22.2/contrib/chem/examples/122/chAg_circle.chem groff-1.22.3/contrib/chem/examples/122/chAg_circle.chem --- groff-1.22.2/contrib/chem/examples/122/chAg_circle.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAg_circle.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## bond 120 ; C diff -ruN groff-1.22.2/contrib/chem/examples/122/chAh_brackets.chem groff-1.22.3/contrib/chem/examples/122/chAh_brackets.chem --- groff-1.22.2/contrib/chem/examples/122/chAh_brackets.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAh_brackets.chem 2014-11-04 09:38:35.588519459 +0100 @@ -12,16 +12,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,6 +28,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## [ diff -ruN groff-1.22.2/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem groff-1.22.3/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem --- groff-1.22.2/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem 2014-11-04 09:38:35.588519459 +0100 @@ -10,16 +10,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,6 +26,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## db = .12 diff -ruN groff-1.22.2/contrib/chem/examples/122/chBa_jump.chem groff-1.22.3/contrib/chem/examples/122/chBa_jump.chem --- groff-1.22.2/contrib/chem/examples/122/chBa_jump.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chBa_jump.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## SiO2 # name = SiO2 diff -ruN groff-1.22.2/contrib/chem/examples/122/chBb_bonds.chem groff-1.22.3/contrib/chem/examples/122/chBb_bonds.chem --- groff-1.22.2/contrib/chem/examples/122/chBb_bonds.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chBb_bonds.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## C diff -ruN groff-1.22.2/contrib/chem/examples/122/chBc_rings.chem groff-1.22.3/contrib/chem/examples/122/chBc_rings.chem --- groff-1.22.2/contrib/chem/examples/122/chBc_rings.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/chBc_rings.chem 2014-11-04 09:38:35.588519459 +0100 @@ -9,16 +9,13 @@ # by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan # . -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + ######################################################################## R1: benzene diff -ruN groff-1.22.2/contrib/chem/examples/122/README.txt groff-1.22.3/contrib/chem/examples/122/README.txt --- groff-1.22.2/contrib/chem/examples/122/README.txt 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/122/README.txt 2014-11-04 09:38:35.588519459 +0100 @@ -46,17 +46,14 @@ ####### License -Last update: 5 Jan 2009 - -Copyright (C) 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2006-2014 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. +under the terms of the GNU General Public License (GPL) version 2 as +published by the Free Software Foundation. `groff' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -66,6 +63,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . +The GPL2 license text is available in the internet at +. + ####### Emacs settings diff -ruN groff-1.22.2/contrib/chem/examples/atp.chem groff-1.22.3/contrib/chem/examples/atp.chem --- groff-1.22.2/contrib/chem/examples/atp.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/atp.chem 2014-11-04 09:38:35.580519559 +0100 @@ -11,25 +11,22 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `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 . +# The GPL2 license text is available in the internet at +# . 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 diff -ruN groff-1.22.2/contrib/chem/examples/cholesterin.chem groff-1.22.3/contrib/chem/examples/cholesterin.chem --- groff-1.22.2/contrib/chem/examples/cholesterin.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/cholesterin.chem 2014-11-04 09:38:35.580519559 +0100 @@ -9,17 +9,14 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of diff -ruN groff-1.22.2/contrib/chem/examples/ethamivan.chem groff-1.22.3/contrib/chem/examples/ethamivan.chem --- groff-1.22.2/contrib/chem/examples/ethamivan.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/ethamivan.chem 2014-11-04 09:38:35.580519559 +0100 @@ -8,25 +8,22 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `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 . +# The GPL2 license text is available in the internet at +# . R: ring pointing left double 2,3 4,5 6,1 bond left from R.V1 ; O diff -ruN groff-1.22.2/contrib/chem/examples/lsd.chem groff-1.22.3/contrib/chem/examples/lsd.chem --- groff-1.22.2/contrib/chem/examples/lsd.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/lsd.chem 2014-11-04 09:38:35.580519559 +0100 @@ -8,17 +8,14 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of diff -ruN groff-1.22.2/contrib/chem/examples/morphine.chem groff-1.22.3/contrib/chem/examples/morphine.chem --- groff-1.22.2/contrib/chem/examples/morphine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/morphine.chem 2014-11-04 09:38:35.580519559 +0100 @@ -10,17 +10,14 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,6 +27,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + 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 diff -ruN groff-1.22.2/contrib/chem/examples/penicillin.chem groff-1.22.3/contrib/chem/examples/penicillin.chem --- groff-1.22.2/contrib/chem/examples/penicillin.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/penicillin.chem 2014-11-04 09:38:35.580519559 +0100 @@ -11,17 +11,14 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -31,6 +28,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + R1: flatring5 pointing up put S at 1 put N at 4 bond 45 at R1.V2 bond 135 at R1.V2 diff -ruN groff-1.22.2/contrib/chem/examples/README.txt groff-1.22.3/contrib/chem/examples/README.txt --- groff-1.22.2/contrib/chem/examples/README.txt 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/README.txt 2014-11-04 09:38:35.580519559 +0100 @@ -37,9 +37,7 @@ ####### License -Last update: 5 Jan 2009 - -Copyright (C) 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2006-2014 Free Software Foundation, Inc. Written by Bernd Warken . This file is part of `chem', which is part of `groff'. @@ -54,12 +52,11 @@ 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 . +The GPL2 license text is available in the internet at +. ####### Emacs settings - Local Variables: mode: text End: diff -ruN groff-1.22.2/contrib/chem/examples/reserpine.chem groff-1.22.3/contrib/chem/examples/reserpine.chem --- groff-1.22.2/contrib/chem/examples/reserpine.chem 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/chem/examples/reserpine.chem 2014-11-04 09:38:35.580519559 +0100 @@ -8,17 +8,14 @@ # 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. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `groff' is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +25,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# The GPL2 license text is available in the internet at +# . + R1: benzene pointing up bond -120 from R1.V5 ; O bond left diff -ruN groff-1.22.2/contrib/chem/Makefile.sub groff-1.22.3/contrib/chem/Makefile.sub --- groff-1.22.2/contrib/chem/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/Makefile.sub 2014-11-04 09:38:35.438521334 +0100 @@ -1,26 +1,23 @@ -# Makefile.sub for `chem' (integration into the `groff' source tree) +# Makefile.sub for `chem' # File position: /contrib/chem/Makefile.sub -# Copyright (C) 2006, 2009, 2010, 2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 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. +# under the terms of the GNU General Public License (GPL) version 2 as +# published by the Free Software Foundation. # `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 . +# The GPL2 license text is available in the internet at +# . ######################################################################## @@ -32,76 +29,91 @@ examples/README \ examples/122/README -# not all make programs have $(RM) predefined. RM=rm -f -all: README examples/README examples/122/README \ - chem \ - $(MAN1) +all: README chem $(MAN1) $(make_examples) README: $(srcdir)/README.txt sed -e "s|@g@|$(g)|g" $? >$@ +.PHONY: examples +examples: examples/README examples/122/README + examples/README: $(srcdir)/examples/README.txt - -test -d examples || $(mkinstalldirs) examples + 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" $? >$@ + 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) + $(RM) $@; 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 + -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 $@; + +.PHONY: install_always +install_always: chem README $(srcdir)/chem.pic + 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 + $(DESTDIR)$(datasubdir)/pic/chem.pic; + +.PHONY: install_examples +install_examples: + test -d $(DESTDIR)$(exampledir)/chem \ + || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem; + test -d $(DESTDIR)$(exampledir)/chem/122 \ + || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem/122; + find $(DESTDIR)$(exampledir)/chem -type f -exec rm -f '{}' ';' + $(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/* + n=`echo $$i | sed 's|$(srcdir)/examples/||g'`; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/$$n; \ + done; $(INSTALL_DATA) examples/122/README \ - $(DESTDIR)$(exampledir)/chem/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) + n=`echo $$i | sed 's|$(srcdir)/examples/122/||g'`; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/122/$$n; \ + done + +.PHONY: install_data + +install_data: install_always $(make_install_examples) + +# uninstall_sub: uninstall_always $(make_uninstall_examples) + +.PHONY: uninstall_always +uninstall_always: + $(RM) $(DESTDIR)$(bindir)/chem; + $(RM) $(DESTDIR)$(datasubdir)/pic/chem.pic; + -test -d $(DESTDIR)$(datasubdir)/pic && \ + rmdir $(DESTDIR)$(datasubdir)/pic; + +.PHONY: uninstall_examples +uninstall_examples: + $(RM) $(DESTDIR)$(exampledir)/chem/122/*; + -test -d $(DESTDIR)$(exampledir)/chem/122 && \ + rmdir $(DESTDIR)$(exampledir)/chem/122; + $(RM) $(DESTDIR)$(exampledir)/chem/*; + -test -d $(DESTDIR)$(exampledir)/chem && \ + rmdir $(DESTDIR)$(exampledir)/chem; + +.PHONY: uninstall_sub +uninstall_sub: uninstall_always uninstall_examples ######################################################################## # Emacs settings diff -ruN groff-1.22.2/contrib/chem/README.txt groff-1.22.3/contrib/chem/README.txt --- groff-1.22.2/contrib/chem/README.txt 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/chem/README.txt 2014-11-04 09:38:35.438521334 +0100 @@ -24,29 +24,25 @@ ####### License -Last update: 5 Jan 2009 - -Copyright (C) 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2006-2014 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. +under the terms of the GNU General Public License (GPL) vbersion 2 as +published by the Free Software Foundation. `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 . +The GPL2 license text is available in the internet at +. ####### Emacs settings - Local Variables: mode: text End: diff -ruN groff-1.22.2/contrib/eqn2graph/eqn2graph.man groff-1.22.3/contrib/eqn2graph/eqn2graph.man --- groff-1.22.2/contrib/eqn2graph/eqn2graph.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/eqn2graph/eqn2graph.man 2014-11-04 09:38:35.442521284 +0100 @@ -1,4 +1,8 @@ -.\" $Id: eqn2graph.man,v 1.6 2008/09/29 21:55:07 wl Exp $ +.TH EQN2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +eqn2graph \- convert an EQN equation into a cropped image +. +. .\" This documentation is released to the public domain. . . @@ -9,14 +13,10 @@ .el .TP "\\$1" .. . -. -.TH EQN2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.IX eqn2graph -.SH NAME -eqn2graph \- convert an EQN equation into a cropped image -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B eqn2graph [ .B \-unsafe @@ -26,74 +26,100 @@ ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. Reads an EQN equation (one line) as input; produces an image file (by default in Portable Network Graphics format) suitable for the Web as output. +. +. .P Your input EQN code should .I not -have the \&.EQ/.EN preamble that -that normally precedes it within -.BR groff (@MAN1EXT@) +have the \&.EQ/.EN preamble that normally precedes it within +.BR groff (@MAN1EXT@) macros; nor do you need to have dollar-sign or other delimiters around the equation. +. +. .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 +. +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 +This program uses .BR @g@eqn (@MAN1EXT@), .BR groff (@MAN1EXT@), -and the ImageMagick +and the ImageMagick .BR convert (1) program. +. These programs must be installed on your system and accessible on your $PATH for .B eqn2graph to work. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .B \-unsafe -Run +Run .BR groff (@MAN1EXT@) in the `unsafe' mode enabling the PIC macro .B sh to execute arbitrary commands. +. The default is to forbid this. +. .TP .BI \-format\ fmt Specify an output format; the default is PNG (Portable Network Graphics). +. Any format that .BR convert (1) can emit is supported. +. +. .PP Command-line switches and arguments not listed above are passed to .BR convert (1). . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'\fB@MACRODIR@/eqnrc'u+2n .B @MACRODIR@/eqnrc -The +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 eqn2graph searches the environment variables @@ -102,33 +128,42 @@ 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 eqn2graph -and +and .BR convert (1) versions may produce zero-sized or untrimmed output images. -For this version of +. +For this version of .B eqn2graph you will need a version of .BR convert (1) that supports the .B \-trim -option; older versions of +option; older versions of .B eqn2graph used .BR \-crop\~0x0 , which no longer has trimming behavior. . . +.\" -------------------------------------------------------------------- +.ad l .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR pic2graph (@MAN1EXT@), .BR grap2graph (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), @@ -137,8 +172,11 @@ .BR convert (1). . . -.SH AUTHOR -Eric S. Raymond . +.SH AUTHORS +Eric S.\& Raymond . +. +This documentation is released to the public domain. +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/contrib/eqn2graph/eqn2graph.sh groff-1.22.3/contrib/eqn2graph/eqn2graph.sh --- groff-1.22.2/contrib/eqn2graph/eqn2graph.sh 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/eqn2graph/eqn2graph.sh 2014-11-04 09:38:35.442521284 +0100 @@ -32,8 +32,6 @@ # # Thus, we pass -U to groff(1), and everything else to convert(1). # -# $Id: eqn2graph.sh,v 1.7 2010/02/25 20:17:13 wl Exp $ -# groff_opts="" convert_opts="" format="png" diff -ruN groff-1.22.2/contrib/eqn2graph/Makefile.sub groff-1.22.3/contrib/eqn2graph/Makefile.sub --- groff-1.22.2/contrib/eqn2graph/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/eqn2graph/Makefile.sub 2014-11-04 09:38:35.442521284 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 2002, 2006, 2009 +# Copyright (C) 2002-2014 # 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 . # @@ -20,20 +20,28 @@ # MAN1=eqn2graph.n MOSTLYCLEANADD=eqn2graph +RM=rm -f all: eqn2graph eqn2graph: eqn2graph.sh - rm -f $@; \ sed -e "s|@g@|$(g)|g" \ -e "s|@VERSION@|$(version)$(revision)|" \ - -e $(SH_SCRIPT_SED_CMD) $(srcdir)/eqn2graph.sh >$@; \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/eqn2graph.sh >$@ chmod +x $@ install_data: eqn2graph -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/eqn2graph + $(RM) $(DESTDIR)$(bindir)/eqn2graph $(INSTALL_SCRIPT) eqn2graph $(DESTDIR)$(bindir)/eqn2graph uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/eqn2graph + $(RM) $(DESTDIR)$(bindir)/eqn2graph + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/gdiffmk/ChangeLog groff-1.22.3/contrib/gdiffmk/ChangeLog --- groff-1.22.2/contrib/gdiffmk/ChangeLog 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/ChangeLog 2014-11-04 09:38:35.446521234 +0100 @@ -1,6 +1,15 @@ +2014-09-03 Bernd Warken + + * all `gdiffmk' source files: Add and improve the copying + information. Remove last update. Add Emacs setting if necessary. + +2014-03-30 Steffen Nurpmeso + + * Makefile.sub: Put straight error-prevention prefixes for `rm'. + 2009-09-22 Colin Watson - * contrib/gdiffmk/gdiffmk.sh: Don't use bash specific syntax. + * gdiffmk.sh: Don't use bash specific syntax. 2008-01-04 Werner LEMBERG @@ -22,9 +31,9 @@ 2005-05-16 Keith Marshall - * contrib/gdiffmk/gdiffmk.sh: Add space in shebang, conforming + * gdiffmk.sh: Add space in shebang, conforming to portability recommendation in autoconf docs. - * contrib/gdiffmk/tests/runtests.in: Likewise. + * tests/runtests.in: Likewise. 2005-01-16 Mike Bianchi @@ -90,7 +99,7 @@ First import of gdiffmk files. -Copyright 2004, 2005, 2006, 2007, 2008, 2009 +Copyright 2004-2009, 2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff -ruN groff-1.22.2/contrib/gdiffmk/gdiffmk.man groff-1.22.3/contrib/gdiffmk/gdiffmk.man --- groff-1.22.2/contrib/gdiffmk/gdiffmk.man 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/gdiffmk.man 2014-11-04 09:38:35.446521234 +0100 @@ -1,38 +1,50 @@ -.ig \"-*- nroff -*- -Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc. +.\"-*- nroff -*- +.TH GDIFFMK @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +. +.\" gdiffmk \- mark differences between groff/nroff/troff files +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2004-2014 Free Software Foundation, Inc. -This file is part of the gdiffmk utility, which is part of groff. -Written by Mike Bianchi > +This file is part of the gdiffmk utility, which is part of groff, a +free software project. -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. +You can redistribute and/or modify gdiffmk 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. -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. +gdiffmk is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. -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. +You should have received a copy of the GNU General Public License +along with this program. If not, see . .. . -.TH GDIFFMK @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -gdiffmk \- mark differences between groff/nroff/troff files -. +.de au +This document was written and is maintained by +.MT MBianchi@Foveal.com +Mike Bianchi +.MT . +.. . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i .in +\w'\fBgdiffmk 'u -.ti \niu +.ti \niu .B gdiffmk .de OP . ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" @@ -59,7 +71,10 @@ .ad \na . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B gdiffmk compares two .BR groff (1), @@ -74,15 +89,18 @@ .I file2 with added `margin character' (.mc) commands that indicate the differences. . +. .LP If the .I output filename is present, the output is written there. +. If it is .B \- or absent the output is written to the standard output. . +. .LP If the .I file1 @@ -91,18 +109,24 @@ argument is .B \- the standard input is read for that input. +. Clearly both cannot be .BR \- . . +. .LP Note that the output is not necessarily compatible with all macro packages and all preprocessors. +. See the .B BUGS section below. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .BI \-a addmark Use the @@ -111,6 +135,7 @@ .I file1 but present in .IR file2 . +. Default: .BR + . . @@ -122,10 +147,12 @@ with an added troff break command, .BR .br , to ensure that the deletions are marked properly. +. This is the only way to guarantee that deletions and small changes get flagged. -This option directs the program not to insert these breaks; it makes no -sense to use it without +. +This option directs the program not to insert these breaks; it makes +no sense to use it without .BR \-D . . .TP @@ -133,6 +160,7 @@ Use the .I changemark for changed source lines. +. Default: .BR | . . @@ -141,20 +169,23 @@ Use the .I deletemark for deleted source lines. +. Default: .BR * . . .TP .B \-D Show the deleted portions from changed and deleted text. +. Default delimiting marks: -.BR "[[" " .\&.\&.\&. " "]]" . +.BR "[[" " \&.\|.\|.\& " "]]" . . .TP .BI \-M "mark1 mark2" Change the delimiting marks for the .B \-D option. +. It makes no sense to use this option without .BR \-D . . @@ -166,12 +197,14 @@ .I file1 and .IR file2 . +. In particular, .I diffcmd should accept the GNU .B diff .BI \-D name option. +. Default: .BR diff (1). . @@ -190,14 +223,19 @@ Print version information on the standard output and exit. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. The output is not necessarily compatible with all macro packages and all preprocessors. -A workaround that is often successful against preprocessor problems -is to run +. +A workaround that is often successful against preprocessor problems is +to run .B gdiffmk on the output of all the preprocessors instead of the input source. . +. .LP .B gdiffmk relies on the @@ -205,72 +243,41 @@ option of GNU .BR diff (1) to make a merged `#ifdef' output format. +. It hasn't been tested whether other versions of .BR diff (1) do support this option. +. See also the .BI \-x diffcmd option. . +. .LP -Report bugs to bug-groff@gnu.org. +Report bugs to +.MT bug-groff@gnu.org +.ME . +. Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of .B gdiffmk you are using. . . -.SH AUTHORS -This document was written and is maintained by -.MT MBianchi@Foveal.com -Mike Bianchi -.ME . -. -.LP -This document is distributed under the terms of the FDL (GNU Free -Documentation License) version 1.1 or later. -You should have received a copy of the FDL on your system, it is also -available on-line at the -.UR http://\:www.gnu.org/\:copyleft/\:fdl.html -GNU copyleft site -.UE . -. -.LP -.B gdiffmk -is part of the -.I groff -GNU free software project. -All parts of the -.I groff package -are protected by GNU copyleft licenses. -The software files are distributed under the terms of the GNU General -Public License (GPL), while the documentation files mostly use the GNU -Free Documentation License (FDL). -. -. +.\" -------------------------------------------------------------------- .SH COPYRIGHT -Copyright \(co 2004, 2005, 2008 Free Software Foundation, Inc. -. -.LP -.B gdiffmk -is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation, either version 3 of the License, or -(at your option) any later version. -. -.LP -.B gdiffmk -is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. -. -.LP -You should have received a copy of the GNU General Public License -along with this program. If not, see . +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@), .BR nroff (@MAN1EXT@), .BR gtroff (@MAN1EXT@), diff -ruN groff-1.22.2/contrib/gdiffmk/gdiffmk.sh groff-1.22.3/contrib/gdiffmk/gdiffmk.sh --- groff-1.22.2/contrib/gdiffmk/gdiffmk.sh 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/gdiffmk.sh 2014-11-04 09:38:35.446521234 +0100 @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Written by Mike Bianchi > # This file is part of the gdiffmk utility, which is part of groff. @@ -342,3 +342,11 @@ sed -n "${sed_script}" # EOF + + +######################################################################## +# Emacs settings +# +# Local Variables: +# mode: text +# End: diff -ruN groff-1.22.2/contrib/gdiffmk/Makefile.sub groff-1.22.3/contrib/gdiffmk/Makefile.sub --- groff-1.22.2/contrib/gdiffmk/Makefile.sub 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/Makefile.sub 2014-11-04 09:38:35.446521234 +0100 @@ -2,9 +2,7 @@ # File position: /contrib/gdiffmk/Makefile.sub -# Last update: 5 Jan 2009 - -# Copyright (C) 2004, 2006, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Written by Mike Bianchi > # This file is part of the gdiffmk utility, which is part of groff. @@ -26,20 +24,28 @@ MAN1=gdiffmk.n MOSTLYCLEANADD=gdiffmk tests/runtests +RM=rm -f all: gdiffmk gdiffmk: gdiffmk.sh - rm -f $@; \ - sed -e "s|@BINDIR@|$(bindir)|g" \ - -e "s|@VERSION@|$(version)$(revision)|g" \ - -e $(SH_SCRIPT_SED_CMD) $(srcdir)/gdiffmk.sh >$@; \ + sed -e "s|@BINDIR@|$(bindir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/gdiffmk.sh >$@ chmod +x $@ install_data: gdiffmk - -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/gdiffmk + -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(bindir)/gdiffmk $(INSTALL_SCRIPT) gdiffmk $(DESTDIR)$(bindir)/gdiffmk uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/gdiffmk + $(RM) $(DESTDIR)$(bindir)/gdiffmk + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/gdiffmk/README groff-1.22.3/contrib/gdiffmk/README --- groff-1.22.2/contrib/gdiffmk/README 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/README 2014-11-04 09:38:35.447521222 +0100 @@ -25,7 +25,7 @@ ---------------------------------------------------------------------------- -Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. +Copyright (C) 2004-2014 Free Software Foundation, Inc. Written by Mike Bianchi > This file is part of the gdiffmk utility, which is part of groff. @@ -44,3 +44,8 @@ along with groff; see the files COPYING and LICENSE in the top directory of the groff source. If not, write to the Free Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. + +# Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/contrib/gdiffmk/tests/baseline groff-1.22.3/contrib/gdiffmk/tests/baseline --- groff-1.22.2/contrib/gdiffmk/tests/baseline 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/tests/baseline 2014-11-04 09:38:35.620519059 +0100 @@ -1,3 +1,24 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004-2014 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. .ll 25 .pl 20 .nf @@ -15,3 +36,8 @@ .mc file1 and file2 #4 file1 and file2 #5 +. +.\" Emacs setup +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/gdiffmk/tests/baseline.10 groff-1.22.3/contrib/gdiffmk/tests/baseline.10 --- groff-1.22.2/contrib/gdiffmk/tests/baseline.10 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/tests/baseline.10 2014-11-04 09:38:35.620519059 +0100 @@ -1,3 +1,24 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004-2014 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. .ll 25 .pl 20 .nf @@ -24,3 +45,8 @@ .mc file1 and file2 #4 file1 and file2 #5 +. +.\" Emacs setup +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/gdiffmk/tests/baseline.6 groff-1.22.3/contrib/gdiffmk/tests/baseline.6 --- groff-1.22.2/contrib/gdiffmk/tests/baseline.6 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/tests/baseline.6 2014-11-04 09:38:35.620519059 +0100 @@ -1,3 +1,24 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004-2014 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. .ll 25 .pl 20 .nf @@ -15,3 +36,8 @@ .mc file1 and file2 #4 file1 and file2 #5 +. +.\" Emacs setup +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/gdiffmk/tests/baseline.8 groff-1.22.3/contrib/gdiffmk/tests/baseline.8 --- groff-1.22.2/contrib/gdiffmk/tests/baseline.8 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/tests/baseline.8 2014-11-04 09:38:35.621519046 +0100 @@ -1,3 +1,24 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004-2014 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. .ll 25 .pl 20 .nf @@ -24,3 +45,8 @@ .mc file1 and file2 #4 file1 and file2 #5 +. +.\" Emacs setup +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/gdiffmk/tests/baseline.9 groff-1.22.3/contrib/gdiffmk/tests/baseline.9 --- groff-1.22.2/contrib/gdiffmk/tests/baseline.9 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/gdiffmk/tests/baseline.9 2014-11-04 09:38:35.621519046 +0100 @@ -1,3 +1,24 @@ +.ig \"-*- nroff -*- +Copyright (C) 2004-2014 Free Software Foundation, Inc. + +This file is part of the gdiffmk utility, which is part of groff. +Written by Mike Bianchi > + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. +.. .ll 25 .pl 20 .nf @@ -24,3 +45,8 @@ .mc file1 and file2 #4 file1 and file2 #5 +. +.\" Emacs setup +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/glilypond/args.pl groff-1.22.3/contrib/glilypond/args.pl --- groff-1.22.2/contrib/glilypond/args.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/args.pl 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,502 @@ +######################################################################## +# Legalese +######################################################################## + +my $License = q* +groff_lilypond - integrate `lilypond' into `groff' files + +Source file position: `/contrib/glilypond/args.pl' +Installed position: `/lib/groff/glilypond' + +Copyright (C) 2013-2014 Free Software Foundation, Inc. + Written by Bernd Warken + +This file is part of `GNU groff'. + + `GNU 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. + + `GNU groff' is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU +General Public License' for more details. + + You should have received a copy of the 'GNU General Public License` +along with `groff', see the files `COPYING' and `LICENSE' in the top +directory of the `groff' source package. If not, see +. +*; + +##### end legalese + + +# use strict; +# use warnings; +# use diagnostics; + +use integer; + +our ( $Globals, $Args, $stderr, $v, $out ); + +# ---------- +# subs for second run, for remaining long options after splitting and +# transfer +# ---------- + +my %opts_with_arg = + ( + + '--eps_dir' => sub { + $Args->{'eps_dir'} = shift; + }, + + '--output' => sub { + $Args->{'output'} = shift; + }, + + '--prefix' => sub { + $Args->{'prefix'} = shift; + }, + + '--temp_dir' => sub { + $Args->{'temp_dir'} = shift; + }, + + ); # end of %opts_with_arg + + +my %opts_noarg = + ( + + '--help' => sub { + &usage; + exit; + }, + + '--keep_all' => sub { + $Args->{'keep_all'} = TRUE; + }, + + '--license' => sub { + &license; + exit; + }, + + '--ly2eps' => sub { + $Args->{'eps_func'} = 'ly'; + }, + + '--pdf2eps' => sub { + $Args->{'eps_func'} = 'pdf'; + }, + + '--verbose' => sub { + $Args->{'verbose'} = TRUE; + }, + + '--version' => sub { + &version; + exit; + }, + + ); # end of %opts_noarg + + +# used variables in both runs + +my @files = EMPTYARRAY; + + +#---------- +# first run for command line arguments +#---------- + +# global variables for first run + +my @splitted_args; +my $double_minus = FALSE; +my $arg = EMPTYSTRING; +my $has_arg = FALSE; + + +# Split short option collections and transfer these to suitable long +# options from above. Note that `-v' now means `--verbose' in version +# `v1.1', earlier versions had `--version' for `-v'. + +my %short_opts = + ( + '?' => '--help', + 'e' => '--eps_dir', + 'h' => '--help', + 'l' => '--license', + 'k' => '--keep_all', + 'o' => '--output', + 'p' => '--prefix', + 't' => '--temp_dir', + 'v' => '--verbose', + 'V' => '--verbose', + ); + + +# transfer long option abbreviations to the long options from above + +my @long_opts; + +$long_opts[3] = + { # option abbreviations of 3 characters + '--e' => '--eps_dir', + '--f' => '--prefix', # --f for --file_prefix + '--h' => '--help', + '--k' => '--keep_all', # and --keep_files + '--o' => '--output', + '--p' => '--prefix', # and --file_prefix + '--t' => '--temp_dir', + '--u' => '--help', # '--usage' is mapped to `--help' + }; + +$long_opts[4] = + { # option abbreviations of 4 characters + '--li' => '--license', + '--ly' => '--ly2eps', + '--pd' => '--pdf2eps', + '--pr' => '--prefix', + }; + +$long_opts[6] = + { # option abbreviations of 6 characters + '--verb' => '--verbose', + '--vers' => '--version', + }; + + +# subs for short splitting and replacing long abbreviations + +my $split_short = sub { + + my @chars = split //, $1; # omit leading dash + + # if result is TRUE: run `next SPLIT' afterwards + + CHARS: while ( @chars ) { + my $c = shift @chars; + + unless ( exists $short_opts{$c} ) { + $stderr->print( "Unknown short option `-$c'." ); + next CHARS; + } + + # short option exists + + # map or transfer to special long option from above + my $transopt = $short_opts{$c}; + + if ( exists $opts_noarg{$transopt} ) { + push @splitted_args, $transopt; + $Args->{'verbose'} = TRUE if ( $transopt eq '--verbose' ); + next CHARS; + } + + if ( exists $opts_with_arg{$transopt} ) { + push @splitted_args, $transopt; + + if ( @chars ) { + # if @chars is not empty, option $transopt has argument + # in this arg, the rest of characters in @chars + push @splitted_args, join "", @chars; + @chars = EMPTYARRAY; + return TRUE; # use `next SPLIT' afterwards + } + + # optarg is the next argument + $has_arg = $transopt; + return TRUE; # use `next SPLIT' afterwards + } # end of if %opts_with_arg + } # end of while CHARS + return FALSE; # do not do anything +}; # end of sub for short_opt_collection + + +my $split_long = sub { + my $from_arg = shift; + $from_arg =~ /^([^=]+)/; + my $opt_part = lc($1); + my $optarg = undef; + if ( $from_arg =~ /=(.*)$/ ) { + $optarg = $1; + } + + N: for my $n ( qw/6 4 3/ ) { + $opt_part =~ / # match $n characters + ^ + ( + .{$n} + ) + /x; + my $argn = $1; # get the first $n characters + + # no match, so luck for fewer number of chars + next N unless ( $argn ); + + next N unless ( exists $long_opts[$n]->{$argn} ); + # not in $n hash, so go on to next loop for $n + + # now $n-hash has arg + + # map or transfer to special long opt from above + my $transopt = $long_opts[$n]->{$argn}; + + # test on option without arg + if ( exists $opts_noarg{$transopt} ) { # opt has no arg + $stderr->print( 'Option ' . $transopt . 'has no argument: ' . + $from_arg . '.' ) if ( defined($optarg) ); + push @splitted_args, $transopt; + $Args->{'verbose'} = TRUE if ( $transopt eq '--verbose' ); + return TRUE; # use `next SPLIT' afterwards + } # end of if %opts_noarg + + # test on option with arg + if ( exists $opts_with_arg{$transopt} ) { # opt has arg + push @splitted_args, $transopt; + + # test on optarg in arg + if ( defined($optarg) ) { + push @splitted_args, $1; + return TRUE; # use `next SPLIT' afterwards + } # end of if optarg in arg + + # has optarg in next arg + $has_arg = $transopt; + return TRUE; # use `next SPLIT' afterwards + } # end of if %opts_with_arg + + # not with and without option, so is not permitted + $stderr->print( "`" . $transopt . + "' is unknown long option from `" . $from_arg . "'" ); + return TRUE; # use `next SPLIT' afterwards + } # end of for N + return FALSE; # do nothing +}; # end of split_long() + + +#---------- +# do split and transfer arguments +#---------- +sub run_first { + + SPLIT: foreach (@ARGV) { + # Transform long and short options into some given long options. + # Split long opts with arg into 2 args (no `='). + # Transform short option collections into given long options. + chomp; + + if ( $has_arg ) { + push @splitted_args, $_; + $has_arg = EMPTYSTRING; + next SPLIT; + } + + if ( $double_minus ) { + push @files, $_; + next SPLIT; + } + + if ( $_ eq '-' ) { # file arg `-' + push @files, $_; + next SPLIT; + } + + if ( $_ eq '--' ) { # POSIX arg `--' + push @splitted_args, $_; + $double_minus = TRUE; + next SPLIT; + } + + if ( / # short option or collection of short options + ^ + - + ( + [^-] + .* + ) + $ + /x ) { + $split_short->($1); + next SPLIT; + } # end of short option + + if ( /^--/ ) { # starts with 2 dashes, a long option + $split_long->($_); + next SPLIT; + } # end of long option + + # unknown option without leading dash is a file name + push @files, $_; + next SPLIT; + } # end of foreach SPLIT + + # all args are considered + $stderr->print( "Option `$has_arg' needs an argument." ) + if ( $has_arg ); + + + push @files, '-' unless ( @files ); + @ARGV = @splitted_args; + +}; # end of first run, splitting with map or transfer + + +#---------- +# open or ignore verbose output +#---------- +sub install_verbose { + if ( $Args->{'verbose'} ) { # `--verbose' was used + # make verbose output into $v + my $s = $v->get(); # get content of string so far as array ref, close + + $v = new FH_STDERR(); # make verbose output into STDERR + if ( $s ) { + for ( @$s ) { + # print the file content into new verbose output + $v->print($_); + } + } + # verbose output is now active (into STDERR) + $v->print( "Option `-v' means `--verbose'." ); + $v->print( "Version information is printed by option `--version'." ); + $v->print( "#" x 72 ); + + } else { # `--verbose' was not used + # do not be verbose, make verbose invisible + + $v->close(); # close and ignore the string content + + $v = new FH_NULL(); + # this is either into /dev/null or in an ignored string + + } # end if-else about verbose + # `$v->print' works now in any case + + $v->print( "Verbose output was chosen." ); + + my $s = $Globals->{'prog_is_installed'} ? '' : ' not'; + $v->print( $Globals->{'prog'} . " is" . $s . + " installed." ); + + $v->print( 'The command line options are:' ); + + $s = " options:"; + $s .= " `" . $_ . "'" for ( @ARGV ); + $v->print( $s ); + + $s = " file names:"; + $s .= " `" . $_ . "'\n" for ( @files ); + $v->print( $s ); +} # end install_verbose() + + +#---------- +# second run of command line arguments +#---------- +sub run_second { + # Second run of args with new @ARGV from the former splitting. + # Arguments are now splitted and transformed into special long options. + + my $double_minus = FALSE; + my $has_arg = FALSE; + + ARGS: for my $arg ( @ARGV ) { + + # ignore `--', file names are handled later on + last ARGS if ( $arg eq '--' ); + + if ( $has_arg ) { + unless ( exists $opts_with_arg{$has_arg} ) { + $stderr->print( "`\%opts_with_args' does not have key `" . + $has_arg . "'." ); + next ARGS; + } + + $opts_with_arg{$has_arg}->($arg); + $has_arg = FALSE; + next ARGS; + } # end of $has_arg + + if ( exists $opts_with_arg{$arg} ) { + $has_arg = $arg; + next ARGS; + } + + if ( exists $opts_noarg{$arg} ) { + $opts_noarg{$arg}->(); + next ARGS; + } + + # not a suitable option + $stderr->print( "Wrong option `" . $arg . "'." ); + next ARGS; + + } # end of for ARGS: + + + if ( $has_arg ) { # after last argument + die "Option `$has_arg' needs an argument."; + } + + }; # end of second run + + +sub handle_args { + # handling the output of args + + if ( $Args->{'output'} ) { # `--output' was set in the arguments + my $out_path = &path2abs($Args->{'output'}); + die "Output file name $Args->{'output'} cannot be used." + unless ( $out_path ); + + my ( $file, $dir ); + ( $file, $dir ) = File::Basename::fileparse($out_path) + or die "Could not handle output file path `" . $out_path . "': " . + "directory name `" . $dir . "' and file name `" . $file . "'."; + + die "Could not find output directory for `" . $Args->{'output'} . "'" + unless ( $dir ); + die "Could not find output file: `" . $Args->{'output'} . + "'" unless ( $file ); + + if ( -d $dir ) { + die "Could not write to output directory `" . $dir . "'." + unless ( -w $dir ); + } else { + $dir = &make_dir($dir); + die "Could not create output directory in: `" . $out_path . "'." + unless ( $dir ); + } + + # now $dir is a writable directory + + if ( -e $out_path ) { + die "Could not write to output file `" . $out_path . "'." + unless ( -w $out_path ); + } + + $out = new FH_FILE( $out_path ); + $v->print( "Output goes to file `" . $out_path . "'." ); + } else { # `--output' was not set + $out = new FH_STDOUT(); + } + # no $out is the right behavior for standard output + +# $Args->{'prefix'} .= '_' . $Args->{'eps_func'} . '2eps'; + + @ARGV = @files; +} + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/glilypond/ChangeLog groff-1.22.3/contrib/glilypond/ChangeLog --- groff-1.22.2/contrib/glilypond/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/ChangeLog 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,187 @@ +2014-09-03 Bernd Warken + + * glilypond.pl: New version 1.3.1 + + * all `glilypond' files: Copying and Emacs setting. + +2014-07-06 Bernd Warken + + * glilypond.pl: New version 1.3 + + * glilypond.man: Make man-page compatible with doclifter. + +2014-07-04 Bernd Warken + + * glilypond.man: Transform to classical man-page style. + +2014-07-03 Bernd Warken + + * glilypond.man: Improve definitions. + +2014-03-30 Steffen Nurpmeso + + * Makefile.sub: Put straight error-prevention prefixes for `rm'. + +2014-03-30 Steffen Nurpmeso + + * Makefile.sub (uninstall_sub): Typo. + +2014-03-11 Ingo Schwarze (tiny change) + + * Makefile.sub (install_data): POSIX conformance. + + Do not use $< outside inference rules, and even less when there + are multiple targets. + +2014-02-14 Bernd Warken + + * examples/example.groff: Add this directory and this file. + +2014-01-06 Bernd Warken + + Remove archive git@github.com:RUNOFF/groff_lilypond.git + +2013-10-30 Bernd Warken + + * glilypond.man: Correct writing. + +2013-05-10 Bernd Warken + + * glilypond.pl: Correct position information. Add debug code. + + * args.pl, oop_fh.pl, subs.pl: Correct position information. + +2013-04-25 Bernd Warken + + * Makefile.sub: minor corrections. + +2013-04-24 Bernd Warken + + Public `glilypond' version `v1.1'. + + * args.pl, sub.pl, glilypond.man: Change option `-v' to mean + `--verbose' instead of former `--version' such as many GNU + programs do. Correct sub `&usage()' and man-page. + + * args.pl, glilypond.pl, oop_fh.pl, subs.pl: Remove spaces in + ` -> ', some `( ... )', and some `{ ... }' places for better + readability of the Perl source code. + +2013-04-24 Bernd Warken + + * args.pl, oop_fh.pl: Remove 1st line calling `perl'. + + * subs.pl: Remove 1st line calling `perl'. Remove sub + `&perl_version()'. Adjust sub `&usage()'. + + * glilypond.pl: Keep 1st line, which will be reset by running + `make'. Remove all parts of Perl testing. + + * perl_test.pl: Remove this file. + + * README.txt: Add information about needed Perl version. + + * Makefile.sub: Corrections for removing Perl test. Use `$<'. + +2013-04-24 Bernd Warken + + * Makefile.sub: Remove Perl test. + +2013-04-12 Bernd Warken + + * glilypond.pl: Fix END for early exit of `--version'. + +2013-04-12 Bernd Warken + + * subs.pl: Replace `state' by global variable. So the Perl + version can be older. + + * perl_test.pl: Replace the Perl version by `v5.6', analogously to + `groffer'. + +2013-04-11 Bernd Warken + + * Makefile.sub: Corrections for Emacs. + +2013-04-11 Bernd Warken + + * old groff_lilypond: There is now a free `git' package containing + all old versions of the former name `groff_lilypond v0.*'. They + work with `lilypond' parts in `roff' files, but were not + installed. This package can be got at: + + $ git clone git@github.com:RUNOFF/groff_lilypond.git + + The new versions `glilypond 1.*' are not included there. + +2013-03-29 Bernd Warken + + Published version is `v1.0'. + + Run `autoconf' again. + +2013-03-29 Bernd Warken + + * /m4/groff.m4, /configure.ac: Add + libdir information for `glilypond'. + + * /Makefile.in: Add + `/contrib/glilypond'. + + Run `autoconf'. + + `glilypond' can now be installed to the system. + +2013-03-29 Bernd Warken + + Rename `groff_lilypond' to `glilypond'. So remove the former + source directory `/contrib/lilypond' and newly + install `/contrib/glilypond', which now has many + files. The new version starts at `v1.0'. + + Version will now be v1.*. All former files of versions v0.* + vanished or were renamed. This is not yet an information about + publishing. + + * ChangeLog.0x: old `ChangeLog' file for the old `groff_lilypond' + versions v0.*. In the future, this file won't be changed any + more. + + * ChangeLog: New file. It is this file. It displays the history + of `glilypond' versions v1.* or later. + + * glilypond.pl: New main Perl file written from + `groff_lilypond.pl' in a totally different way. It is split now + into 4 Perl files. + + * args.pl: New Perl file. It handles the command line options for + a run of `glilypond.pl'. + + * oop_fh.pl: New Perl file. OOP handling of file handles. + + * perl_test.pl: Test whether the actual Perl program has a + suitable versions. For `Makefile.sub' and `glilypond.pl'. + + * subs.pl: New Perl file. Defines the global subs for + `glilypond.pl'. + + * Makefile.sub: Newly written `Makefile' for this subdirectory of + `groff'. `glilypond' should be able to be installed by `make' + with this file. + + * glilypond.man: Newly written man-page for `glilypond'. + + * README.txt: New file about the installation. + +######################################################################## + +Copyright 2013-2014 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: utf-8 +End: diff -ruN groff-1.22.2/contrib/glilypond/ChangeLog.0x groff-1.22.3/contrib/glilypond/ChangeLog.0x --- groff-1.22.2/contrib/glilypond/ChangeLog.0x 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/ChangeLog.0x 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,102 @@ +2013-04-11 Bernd Warken + + * old groff_lilypond: There is now a free `git' package containing + all old versions of the former name `groff_lilypond v0.*'. They + work with `lilypond' parts in `roff' files, but were not + installed. This package can be got at: + + $ git clone git@github.com:RUNOFF/groff_lilypond.git + + The new versions `glilypond 1.*' are not included there. + +2013-03-28 Bernd Warken + + Rename `groff_lilypond' to `glilypond' for *.pl and *.man files. + Split the single Perl script into several minor *.pl files. + Construct `Makefile.sub' in order to have installed `glilypond'. + Public versions will be v1.x. + Rename `ChangeLog' to `ChangeLog.0x' for the old versions of + `groff_lilypond' v0.*. New `ChangeLog' for the new versions + `glilypond' 1.*. + + * groff_lilypond.pl: Vanished. Renamed to `glilypond.pl'. + * groff_lilypond.man: Vanished. Renamed to `glilypond.man'. + * ChangeLog.0x: Moved from `ChangeLog'. It is this file. It + describes only the old `groff_lilypond' versions v0.*. See file + `ChangeLog' for the files of the new `glilypond' v1.*. + +2013-03-11 Bernd Warken + + * groff_lilypond.pl: Publishing groff_lilypond version v0.6. + New options: -e|--eps_dir, -l|--license, -k|--keep_files, + -p|--prefix=..., -t|--temp_dir=... + Install --eps_dir as directory for the useful EPS files. + * groff_lilypond.man: Include the new options. Add section + SEE ALSO. + +2013-03-03 Bernd Warken + + * groff_lilypond.pl: New code with Perl references. + Publishing groff_lilypond version v0.5. + New options: --usage, -V|--Verbose|--verbose, --file_prefix=..., + -o|--output=..., --temp_dir=... + Perl >=5.10.0 needed. + * groff_lilypond.man: Include the new options. + +2013-02-23 Bernd Warken + + * groff_lilypond_pl: Remove `.lilypond include' for lilypond + regions. Within `groff' mode. it is still allowed. + * groff_lilypond.man: Update `.lilypond include'. + +2013-02-23 Bernd Warken + + New version v0.4 of groff_lilypond. + * groff_lilypond_pl: Major rewrite. + New options: --file_prefix, --temp_dir, and --license. + * groff_lilypond.man: documents the new features. + +2013-02-16 Bernd Warken + + * groff_lilypond.man: Minor corrections. + +2013-02-12 Bernd Warken + + * groff_lilypond.pl: Add deletion of unused temporary files. + +2013-02-12 Bernd Warken + + * contrib/lilypond: Version v0.3 for groff_lilypond + * groff_lilypond.pl: A new request was added for importing + lilypond files: + .lilypond include ... + The argument handling was improved. + +2013-02-11 Bernd Warken + + * contrib/lilypond: Version v0.2 for groff_lilypond + * groff_lilypond.pl: Now there are 2 modes for generationg the EPS + files: --ly2eps (the default) and --pdf2eps (that's the old mode + from version v0.1 with pdf to ps to eps). With ly2eps mode, + lilypond generates the EPS files itself, for each page one EPS + file. + * groff_lilypond.man: Corresponding updated man-page + +2013-02-10 Bernd Warken + + * contrib/lilypond: New files for adding lilypond parts into groff + files. These files will not yet be installed. + * groff_lilypond.pl: Program written in Perl, version v0.1 + * groff_lilypond.man: Corresponding man-page + +Copyright 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. + +Local Variables: +version-control: never +mode: change-log-mode +coding: utf-8 +End: diff -ruN groff-1.22.2/contrib/glilypond/glilypond.man groff-1.22.3/contrib/glilypond/glilypond.man --- groff-1.22.2/contrib/glilypond/glilypond.man 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/glilypond.man 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,869 @@ +.TH glilypond @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +glilypond \(em integrate lilypond parts into groff +. +.\" This .SH was moved to this place in order to appease `apropos'. +. +.\" glilypond - integrate `lilypond' parts into `groff' files +.\" Source file position: /contrib/glilypond.man +.\" Installed position: /share/man/man1/glilypond.1 +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2013-2014 Free Software Foundation, Inc. + +This file is part of glilypond, which is part of GNU groff, a free +software project. + +You can redistribute it and/or modify it under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free +Software Foundation. + +The license text is available in the internet at +.UR http://\%www.gnu.org/\%licenses/\%gpl-2.0.html +.UE . +.. +. +.de au +This document was written by +.MT groff\-bernd.warken\-72@web.de +Bernd Warken +.ME . +.. +. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- +. +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL +. +.ad l +. +. +.\" -------------------------------------------------------------------- +.SH SYNOPSIS +.\" -------------------------------------------------------------------- +. +.SY glilypond +.OP \& options +.OP \- +.OP \-\- +.OP \& "\%filespec \*(EL" +.YS +. +. +.\" -------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------- +. +.B glilypond +transforms sheet music written in the +.I lilypond +language into the +.BR groff (@MAN7EXT@) +language using the +.B .PSPIC +request, such that +.BR groff (@MAN1EXT@) +can transform it into a format that can be displayed directly. +. +. +.P +Files in +.I groff +language and +.I "standard input" +can be provided as arguments. +. +. +.\" -------------------------------------------------------------------- +.SH "OPTION OVERVIEW" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Breaking Options" +.\" -------------------------------------------------------------------- +. +.nh +.nf +.TP +.BR \-? | \-h | \-\-help | \-\-usage +Print help or usage information, then leave the program. +. +.TP +.B \-\-version +Print version information. +. +.TP +.BR \-l | \-\-license +Print license information. +.fi +.hy +. +. +.\" -------------------------------------------------------------------- +.SS "Options for building EPS Files" +.\" -------------------------------------------------------------------- +. +.TP +.OP \-\-ly2eps +Here the +.B lilypond +program creates +.I eps +files directly. +. +This is the default. +. +. +.TP +.OP \-\-pdf2eps +The program +.B glilypond +generates a +.I pdf +file using +.BR lilypond . +. +Then the +.I eps +file is generated by +.B pdf2ps +and +.BR ps2eps R . +. +. +.\" -------------------------------------------------------------------- +.SS "Directories and Files" +.\" -------------------------------------------------------------------- +. +.TP +.BR \-e | \-\-eps_dir "\fI directory_name\fP" +Normally all +.I EPS +files are sent to the temporary directory. +. +With this option, you can generate your own directory, in which all useful +.I EPS +files are send. +. +So at last, the temporary directory can be removed. +. +. +.TP +.BR -p | --prefix "\fI begin_of_name\fP" +Normally all temporary files get names that start with the +.BI ly \*(EL +prefix. +. +With this option, you can freely change this prefix. +. +. +.TP +.BR -k | --keep_all +Normally all temporary files without the +.I eps +files are deleted. +. +With this option, all generated files either by the +.B lilypond +program or other format transposers are kept. +. +. +.TP +.BR -t | --temp_dir "\fI dir\fP" +With this option, you call a directory that is the base for the +temporary directory. +. +This directory name is used as is without any extensions. +. +If this directory does not exist it is be created. +. +The temporary directory is created by Perl's security operations +directly under this directory. +. +In this temporary directory, the temporary files are stored. +. +. +.\" -------------------------------------------------------------------- +.SS "Output" +.\" -------------------------------------------------------------------- +. +.TP +.BR -o | --output "\fI file_name\fP" +Normally all +.I groff +output of this program is sent to +.BR STDOUT R . +. +With this option, that can be changed, such that the output is stored +into a file named in the option argument +.IR file_name . +. +. +.TP +.BR -v | -V | --verbose +A lot more of information is sent to STDERR. +. +. +.\" -------------------------------------------------------------------- +.SS "Short Option Collections" +.\" -------------------------------------------------------------------- +. +The argument handling of options +. +. +.P +.I "Short options" +are arguments that start with a single dash +.BR \- . +. +Such an argument can consist of arbitrary many options without option +argument, composed as a collection of option characters following the +single dash. +. +. +.P +Such a collection can be terminated by an option character that +expects an option argument. +. +If this option character is not the last character of the argument, +the following final part of the argument is the option argument. +. +If it is the last character of the argument, the next argument is +taken as the option argument. +. +. +.P +This is the standard for +.I POSIX +and +.I GNU +option management. +. +. +.P +For example, +. +.TP +.BI \-kVe " some_dir" +is a collection of the short options +.B \-k +and +.B \-V +without option argument, followed by the short option +.B \-e +with option argument that is the following part of the argument +.IR some_dir . +. +So this argument could also be written as several arguments +.B \-k \-V \-e +.IR some_dir . +. +. +.\" -------------------------------------------------------------------- +.SS "Handling of Long Options" +.\" -------------------------------------------------------------------- +. +Arguments that start with a double dash +.B \-\- +are so-called +.I "long options" R . +. +Each double dash argument can only have a single long option. +. +. +.P +.I "Long options" +have or have not an option argument. +. +An option argument can be the next argument or can be appended with an +equal sign +.B = +to the same argument as the long option. +. +. +.TP +.B \-\-help +is a long option without an option argument. +. +.TP +.BI \-\-eps_dir " some_dir" +.TQ +.BI \-\-eps_dir= some_dir +is the long option +.B \-\-eps_dir +with the option argument +.IR some_dir . +. +. +.P +Moreover the program allows abbreviations of long options, as much as +possible. +. +. +.P +The +.I "long option" +.B \-\-keep_all +can be abbreviated from +.B \-\-keep_al +up to +.B \-\-k +because the program does not have another +.I "long option" +whose name starts with the character +.BR k . +. +. +.P +On the other hand, the option +.B \-\-version +cannot be abbreviated further than +.B \-\-vers +because there is also the +.I long option +.B \-\-verbose +that can be abbreviated up to +.BR \-\-verb . +. +. +.P +An option argument can also be appended to an abbreviation. +. +So is +.BI \-\-e= some_dir +the same as +.B \-\-eps_dir +.IR some_dir . +. +. +.P +Moreover the program allows an arbitrary usage of upper and lower case +in the option name. +. +This is +.I Perl +style. +. +. +.P +For example, the +.I "long option" +.B \-\-keep_all +can as well be written as +.B \-\-Keep_All +or even as an abbreviation like +.BR \-\-KeE . +. +. +.\" -------------------------------------------------------------------- +.SH FILESPEC ARGUMENTS +.\" -------------------------------------------------------------------- +. +An argument that is not an option or an option argument is called a +.I filespec +argument. +. +. +.P +Without any +.I filespec +argument, +.I "standard input" +is read. +. +. +.P +Each +.I filespec +argument must either be the name of a readable file or a dash +.B \- +for +.IR "standard input" . +. +Each input must be written in the +.I roff +or +.I groff +language and can include +.I lilypond +parts. +. +. +.P +Normally arguments starting with a dash +.B \- +are interpreted as an option. +. +But if you use an argument that consists only of a doubled dash +.B \-\- R , +all following arguments are taken as +.I filespec +argument, even if such an argument starts with a dash. +. +This is handled according to the +.I GNU +standard. +. +. +.\" -------------------------------------------------------------------- +.SH "THE LILYPOND PARTS IN ROFF INPUT" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Integrated Lilypond Codes" +.\" -------------------------------------------------------------------- +. +A +.I lilypond +part within a structure written in the +.I groff +language is the whole part between the marks +.RS +.EX +.B ".lilypond start" +.EE +.RE +and +.RS +.EX +.B ".lilypond end" +.EE +.RE +. +. +.P +A +.I groff +input can have several of these +.I lilypond +parts. +. +. +.P +When processing such a +.I lilypond +part between +.B ".lilypond start" +and +.B ".lilypond end" +we say that the +.B glilypond +program is in +.IR "lilypond mode" . +. +. +.P +These +.I lilypond +parts are sent into temporary +.I lilypond +files with the file name extension +.BR .ly . +. +These files are transformed later on into +.I EPS +files. +. +. +.\" -------------------------------------------------------------------- +.SS "Inclusion of ly-Files" +.\" -------------------------------------------------------------------- +. +An additional command line for file inclusion of +.I lilypond +files is given by +.EX +.BI ".lilypond include" " file_name" +.EE +in +.I groff +input. +. +For each such +.I include +command, one file of +.I lilypond +code can be included into the +.I groff +code. +. +Arbitrarily many of these commands can be included in the +.I groff +input. +. +. +.P +These include commands can only be used outside the +.I lilypond +parts. +. +Within the +.IR "lilypond mode" , +this inclusion is not possible. +. +So +.B ".lilypond include" +may not be used in +.IR "lilypond mode" , +i.e.\& between +.B ".lilypond start" +and +.BR ".lilypond end" . +. +. +These included +.IR ly -files +are also transformed into +.I EPS +files. +. +. +.\" -------------------------------------------------------------------- +.SH "GENERATED FILES" +.\" -------------------------------------------------------------------- +. +By the transformation process of +.I lilypond +parts into +.I EPS +files, there are many files generated. +. +By default, these files are regarded as temporary files and as such +stored in a temporary directory. +. +. +.P +This process can be changed by command line options. +. +. +.\" -------------------------------------------------------------------- +.SS "Command Line Options for Directories" +.\" -------------------------------------------------------------------- +. +The temporary directory for this program is either created +automatically or can be named by the option +.BR -t | --temp_dir +.IR dir . +. +. +.P +Moreover, the +.I EPS +files that are later on referred by +.B .PSPIC +command in the final +.I groff +output can be stored in a different directory that can be set by the +command line option +.BR -e | --eps_dir +.IR directory_name . +. +With this option, the temporary directory can be removed completely at +the end of the program. +. +. +.P +The beginning of the names of the temporary files can be set by the +command line option +.OP -p | --prefix +.IR begin_of_name . +. +. +.P +All of the temporary files except the +.I EPS +files are deleted finally. +. +This can be changed by setting the command line option +.OP -k | --keep_files . +. +With this, all temporary files and directories are kept, not deleted. +. +. +.P +These +.I EPS +files are stored in a temporary or +.I EPS +directory. +. +But they cannot be deleted by the transformation process because they +are needed for the display which can take a long time. +. +. +.\" -------------------------------------------------------------------- +.SH "TRANSFORMATION PROCESSES FOR GENERATING EPS FILES" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Mode ly2eps" +.\" -------------------------------------------------------------------- +. +This mode is the default. +. +It can also be chosen by the option +.BR --ly2eps . +. +. +.P +In this mode, the +.B .ly +files are transformed by the +.B lilypond +program into many files of different formats, including +.I eps +files, using +.RS +.EX +.BI "$ lilypond \-\-ps \-dbackend=eps \-dgs\-load\-fonts \-\-output=" file\-name +.EE +.RE +for each +.B .ly +file. +. +The output +.I file\-name +must be provided without an extension, its directory is temporary. +. +. +.P +There are many +.I EPS +files created. +. +One having the complete transformed +.B ly +file, named +.IB file\-name .eps \fR.\fP +. +. +.P +Moreover there are +.I EPS +files for each page, named +.IB file\-name \- digit .eps \fR.\fP +. +. +.P +The last step to be done is replacing all +.I lilypond +parts by the collection of the corresponding +.I EPS +page files. +. +This is done by +.I groff +commands +.EX +.BI ".PSPIC " file-name \- digit .eps +.EE +. +. +.\" -------------------------------------------------------------------- +.SS "Mode pdf2eps" +.\" -------------------------------------------------------------------- +. +This mode can be chosen by the option +.BR --pdf2eps . +. +. +.P +In this mode, the +.B .ly +files are transformed by the +.BR lilypond (1) +program into +.I pdf +files, using +.RS +.EX +.BI "lilypond \-\-pdf \-\-output=" file-name +.EE +.RE +for each +.B .ly +file. +. +The +.I file-name +must be provided without the extension +.BR .pdf . +. +By this process, a file +.IB file-name .pdf +is generated. +. +. +.P +The next step is to transform these +.I PDF +files into a +.I PS +file. +. +This is done by the +.BR pdf2ps (1) +program using +.RS +.EX +\fR$ \fP \fBpdf2ps\fP \fIfile-name\fP \fB.pdf\fP \fIfile-name\fP \fB.ps\fP +.EE +.RE +. +. +The next step creates an +.I EPS +file from the +.I PS +file. +. +This is done by the +.BR ps2eps (1) +program using +.RS +.EX +.RB "$ " "ps2eps " \fIfile-name\fP ".ps" +.EE +.RE +. +. +.P +By that, a file +.IB file-name .eps +is created for each +.I lilypond +part in the +.I groff +file or standard input. +. +. +.P +The last step to be done is replacing all +.I lilypond +parts by the +.I groff +command +.RS +.EX +.BI ".PSPIC " file-name .eps +.EE +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "THE GENERATED NEW ROFF STRUCTURE" +.\" -------------------------------------------------------------------- +. +The new +.BR groff (@MAN7EXT@) +structure generated by +.B glilypond +is either +. +.TP +1) +sent to standard output and can there be saved into a file or piped into +.BR groff (@MAN1EXT@) +or +.BR groffer (@MAN1EXT@) +or +. +.TP +2) +stored into a file by given the option +.BR \-o\ \~| \~\-\-output +.I file_name +. +. +.\" -------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.TP +.BR groff (@MAN1EXT@) +the usage of the groff program and pointers to the documentation and +availability of the +.I groff +system. +. +The main source of information for the +.I groff +system is the +.I groff +.BR info (1) +file. +. +. +.TP +.BR groff (@MAN7EXT@) +documents the +.I groff +language. +. +. +.TP +.BR groff_tmac (@MAN5EXT@) +contains documentation of the +.B .PSPIC +request. +. +. +.TP +.BR lilypond (1) +The documentation of the +.B lilypond +program. +. +The main source of information for the +.I lilypond +language is the +.I lilypond +.BR info (1) +file. +. +. +.TP +.BR pdf2ps (1) +transform a +.I PDF +file into a +.I Postscript +format. +. +. +.TP +.BR ps2eps (1) +transform a +.I PS +file into an +.I EPS +format. +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/glilypond/glilypond.pl groff-1.22.3/contrib/glilypond/glilypond.pl --- groff-1.22.2/contrib/glilypond/glilypond.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/glilypond.pl 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,761 @@ +#! /usr/bin/env perl + +package main; + +######################################################################## +# debugging +######################################################################## + +# See `Mastering Perl', chapter 4. + +# use strict; +# use warnings; +# use diagnostics; + +use Carp; +$SIG[__DIE__] = sub { &Carp::croak; }; + +use Data::Dumper; + +######################################################################## +# Legalese +######################################################################## + +our $Legalese; + +{ + use constant VERSION => 'v1.3.1'; # version of glilypond + +### This constant `LICENSE' is the license for this file `GPL' >= 2 + use constant LICENSE => q* +glilypond - integrate `lilypond' into `groff' files + +Source file position: `/contrib/glilypond/glilypond.pl' +Installed position: `/bin/glilypond' + +Copyright (C) 2013-2014 Free Software Foundation, Inc. + Written by Bernd Warken + +This file is part of `GNU groff'. + + `GNU groff' is free software: you can redistribute it and/or modify it +under the terms of the `GNU General Public License' as published by the +`Free Software Foundation', either version 2 of the License, or (at your +option) any later version. + + `GNU groff' is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU +General Public License' for more details. + + You should have received a copy of the 'GNU General Public License` +along with `groff', see the files `COPYING' and `LICENSE' in the top +directory of the `groff' source package. If not, see +. +*; + + + $Legalese = + { + 'version' => VERSION, + 'license' => LICENSE, + } + +} + +##### end legalese + + +######################################################################## +# global variables and BEGIN +######################################################################## + +use integer; +use utf8; + +use Cwd qw[]; +use File::Basename qw[]; +use File::Copy qw[]; +use File::HomeDir qw[]; +use File::Spec qw[]; +use File::Path qw[]; +use File::Temp qw[]; +use FindBin qw[]; +use POSIX qw[]; + + +BEGIN { + + use constant FALSE => 0; + use constant TRUE => 1; + use constant EMPTYSTRING => ''; + use constant EMPTYARRAY => (); + use constant EMPTYHASH => (); + + our $Globals = + { + 'before_make' => FALSE, + 'groff_version' => EMPTYSTRING, + 'prog' => EMPTYSTRING, + }; + + { + ( my $volume, my $directory, $Globals->{'prog'} ) = + File::Spec->splitpath($0); + # $Globals->{'prog'} is `glilypond' when installed, + # `glilypond.pl' when not + } + + + $\ = "\n"; # adds newline at each print + $/ = "\n"; # newline separates input + $| = 1; # flush after each print or write command + + + { + { + # script before run of `make' + my $at = '@'; + $Globals->{'before_make'} = TRUE if '@VERSION@' eq "${at}VERSION${at}"; + } + + my $file_test_pl; + my $glilypond_libdir; + + if ( $Globals->{'before_make'} ) { # in source, not yet installed + my $glilypond_dir = $FindBin::Bin; + $glilypond_dir = Cwd::realpath($glilypond_dir); + $glilypond_libdir = $glilypond_dir; + + } else { # already installed + $Globals->{'groff_version'} = '@VERSION@'; + $glilypond_libdir = '@glilypond_dir@'; + } + + unshift(@INC, $glilypond_libdir); + + umask 0077; # octal output: `printf "%03o", umask;' + } + + require 'subs.pl'; +} + +#die "test: "; +######################################################################## +# OOP declarations for some file handles +######################################################################## + +require 'oop_fh.pl'; + +our $stdout = new FH_STDOUT(); +our $stderr = new FH_STDERR(); + +# verbose printing, not clear wether this will be set by `--verbose', +# so store this now into a string, which can be gotten later on, when +# it will become either STDERR or /dev/null +our $v = new FH_STRING(); + +# for standard output, either STDOUT or output file +our $out; + +# end of FH + + +######################################################################## +# Args: command line arguments +######################################################################## + +# command line arguments are handled in 2 runs: +# 1) split short option collections, `=' optargs, and transfer abbrevs +# 2) handle the transferred options with subs + +our $Args = + { + 'eps_dir' => EMPTYSTRING, # can be overwritten by `--eps_dir' + + # `eps-func' has 2 possible values: + # 1) `ly' from `--ly2eps' (default) + # 2) `pdf' `--pdf2eps' + 'eps_func' => 'ly', + + # files names of temporary files start with this string, + # can be overwritten by `--prefix' + 'prefix' => 'ly', + + # delete or do not delete temporary files + 'keep_all' => FALSE, + + # the roff output goes normally to STDOUT, can be a file with `--output' + 'output' => EMPTYSTRING, + + # temporary directory, can be overwritten by `--temp_dir', + # empty for default of the program + 'temp_dir' => EMPTYSTRING, + + # regulates verbose output (on STDERR), overwritten by `--verbose' + 'verbose' => FALSE, + }; + +{ # `Args' + require 'args.pl'; + &run_first(); + &install_verbose(); + &run_second(); + &handle_args(); +} + +# end `Args' + + +######################################################################## +# temporary directory .../tmp/groff/USER/lilypond/TIME +######################################################################## + +our $Temp = + { + # store the current directory + 'cwd' => Cwd::getcwd(), + + # directory for EPS files + 'eps_dir' => EMPTYSTRING, + + # temporary directory + 'temp_dir' => EMPTYSTRING, + }; + +{ # `Temp' + + if ( $Args->{'temp_dir'} ) { + + #---------- + # temporary directory was set by `--temp_dir' + #---------- + + my $dir = $Args->{'temp_dir'}; + + $dir = &path2abs($dir); + $dir = &make_dir($dir) or + die "The directory `$dir' cannot be used temporarily: $!"; + + + # now `$dir' is a writable directory + + opendir( my $dh, $dir ) or + die "Could not open temporary directory `$dir': $!"; + my $file_name; + my $found = FALSE; + my $prefix = $Args->{'prefix'}; + my $re = qr< + ^ + $prefix + _ + >x; + + READDIR: while ( defined($file_name = readdir($dh)) ) { + chomp $file_name; + if ( $file_name =~ /$re/ ) { # file name starts with $prefix_ + $found = TRUE; + last READDIR; + } + next; + } + + $Temp->{'temp_dir'} = $dir; + my $n = 0; + while ( $found ) { + $dir = File::Spec->catdir( $Temp->{'temp_dir'}, ++$n ); + next if ( -e $dir ); + + $dir = &make_dir($dir) or next; + + $found = FALSE; + last; + } + + $Temp->{'temp_dir'} = $dir; + + + } else { # $Args->{'temp_dir'} not given by `--temp_dir' + + #---------- + # temporary directory was not set + #---------- + + { # search for or create a temporary directory + + my @tempdirs = EMPTYARRAY; + { + my $tmpdir = File::Spec->tmpdir(); + push @tempdirs, $tmpdir if ( $tmpdir && -d $tmpdir && -w $tmpdir ); + + my $root_dir = File::Spec->rootdir(); # `/' in Unix + my $root_tmp = File::Spec->catdir($root_dir, 'tmp'); + push @tempdirs, $root_tmp + if ( $root_tmp ne $tmpdir && -d $root_tmp && -w $root_tmp ); + + # home directory of the actual user + my $home = File::HomeDir->my_home; + my $home_tmp = File::Spec->catdir($home, 'tmp'); + push @tempdirs, $home_tmp if ( -d $home_tmp && -w $home_tmp ); + + # `/var/tmp' in Unix + my $var_tmp = File::Spec->catdir('', 'var', 'tmp'); + push @tempdirs, $var_tmp if ( -d $var_tmp && -w $var_tmp ); + } + + + my @path_extension = qw( groff ); # TEMPDIR/groff/USER/lilypond/ + { + # `$<' is UID of actual user, + # `getpwuid' gets user name in scalar context + my $user = getpwuid($<); + push @path_extension, $user if ( $user ); + + push @path_extension, qw( lilypond ); + } + + + TEMPS: foreach ( @tempdirs ) { + + my $dir; # final directory name in `while' loop + $dir = &path2abs($_); + next TEMPS unless ( $dir ); + + # beginning of directory name + my @dir_begin = + ( File::Spec->splitdir($dir), @path_extension ); + + + my $n = 0; + my $dir_blocked = TRUE; + BLOCK: while ( $dir_blocked ) { + # should become the final dir name + $dir = File::Spec->catdir(@dir_begin, ++$n); + next BLOCK if ( -d $dir ); + + # dir name is now free, create it, and end the blocking + my $res = &make_dir( $dir ); + die "Could not create directory: $dir" unless ( $res ); + + $dir = $res; + $dir_blocked = FALSE; + } + + next TEMPS unless ( -d $dir && -w $dir ); + + # $dir is now a writable directory + $Temp->{'temp_dir'} = $dir; # tmp/groff/USER/lilypond/TIME + last TEMPS; + } # end foreach tmp directories + } # end to create a temporary directory + + die "Could not find a temporary directory" unless + ( $Temp->{'temp_dir'} && -d $Temp->{'temp_dir'} && + -w $Temp->{'temp_dir'} ); + + } # end temporary directory + + $v->print( "Temporary directory: `" . $Temp->{'temp_dir'} . "'\n" ); + $v->print( "file_prefix: `" . $Args->{'prefix'} . "'" ); + + + #---------- + # EPS directory + #---------- + + my $make_dir = FALSE; + if ( $Args->{'eps_dir'} ) { # set by `--eps_dir' + my $dir = $Args->{'eps_dir'}; + + $dir = &path2abs($dir); + + if ( -e $dir ) { + goto EMPTY unless ( -w $dir ); + + # `$dir' is writable + if ( -d $dir ) { + my $upper_dir = $dir; + + my $found = FALSE; + opendir( my $dh, $upper_dir ) or $found = TRUE; + my $prefix = $Args->{'prefix'}; + my $re = qr< + ^ + $prefix + _ + >x; + while ( not $found ) { + my $file_name = readdir($dh); + if ( $file_name =~ /$re/ ) { # file name starts with $prefix_ + $found = TRUE; + last; + } + next; + } + + my $n = 0; + while ( $found ) { + $dir = File::Spec->catdir($upper_dir, ++$n); + next if ( -d $dir ); + $found = FALSE; + } + $make_dir = TRUE; + $Temp->{'eps_dir'} = $dir; + } else { # `$dir' is not a dir, so unlink it to create it as dir + if ( unlink $dir ) { # could remove `$dir' + $Temp->{'eps_dir'} = $dir; + $make_dir = TRUE; + } else { # could not remove + stderr->print( "Could not use EPS dir `" . $dir . + "', use temp dir." ); + } # end of unlink + } # end test of -d $dir + } else { + $make_dir = TRUE; + } # end of if -e $dir + + + if ( $make_dir ) { # make directory `$dir' + my $made = FALSE; + $dir = &make_dir($dir) and $made = TRUE; + + if ( $made ) { + $Temp->{'eps_dir'} = $dir; + $v->print( "Directory for useful EPS files is `" . $dir . "'." ); + } else { + $v->print( "The EPS directory `" . $dir . "' cannot be used: $!" ); + } + } else { # `--eps_dir' was not set, so take the temporary directory + $Temp->{'eps_dir'} = $Args->{'temp_dir'}; + } # end of make dir + } + + EMPTY: unless ( $Temp->{'eps_dir'} ) { + # EPS-dir not set or available, use temp dir, + # but leave $Temp->{'}eps_dir'} empty + $v->print( "Directory for useful EPS files is the " . + "temporary directory `" . $Temp->{'temp_dir'} . "'." ); + } + +} # end `Temp' + + +######################################################################## +# Read: read files or stdin +######################################################################## + +our $Read = + { + 'file_numbered' => EMPTYSTRING, + 'file_ly' => EMPTYSTRING, # `$file_numbered.ly' + }; + +{ # read files or stdin + + my $ly_number = 0; # number of lilypond file + + # `$Args->{'prefix'}_[0-9]' + + my $lilypond_mode = FALSE; + + my $arg1; # first argument for `.lilypond' + my $arg2; # argument for `.lilypond include' + + my $path_ly; # path of ly-file + + + my $check_file = sub { # for argument of `.lilypond include' + my $file = shift; # argument is a file name + $file = &path2abs($file); + unless ( $file ) { + die "Line `.lilypond include' without argument"; + return ''; + } + unless ( -f $file && -r $file ) { + die "Argument `$file' in `.lilypond include' is not a readable file"; + } + + return $file; + }; # end sub &$check_file() + + + my $increase_ly_number = sub { + ++$ly_number; + $Read->{'file_numbered'} = $Args->{'prefix'} . '_' . $ly_number; + $Read->{'file_ly'} = $Read->{'file_numbered'} . '.ly'; + $path_ly = File::Spec->catdir($Temp->{'temp_dir'}, $Read->{'file_ly'} ); + }; + + + my %eps_subs = + ( + 'ly' => \&create_ly2eps, # lilypond creates EPS files + 'pdf' => \&create_pdf2eps, # lilypond creates PDF file + ); + + # about lines starting with `.lilypond' + + my $ly; + my $fh_include_file; + my %lilypond_args = + ( + + 'start' => sub { + $v->print( "\nline: `.lilypond start'" ); + die "Line `.lilypond stop' expected." if ( $lilypond_mode ); + + $lilypond_mode = TRUE; + &$increase_ly_number; + + $v->print( "ly-file: `" . $path_ly . "'" ); + + $ly = new FH_FILE($path_ly); + }, + + + 'end' => sub { + $v->print( "line: `.lilypond end'\n" ); + die "Expected line `.lilypond start'." unless ( $lilypond_mode ); + + $lilypond_mode = FALSE; + $ly->close(); + + if ( exists $eps_subs{ $Args->{'eps_func'} } ) { + $eps_subs{ $Args->{'eps_func'} }->(); + } else { + die "Wrong argument for \%eps_subs: " . $Args->{'eps_func'} . "'"; + } + }, + + + 'include' => sub { # `.lilypond include file...' + + # this may not be used within lilypond mode + next LILYPOND if ( $lilypond_mode ); + + my $file_arg = shift; + + my $file = &$check_file($file_arg); + next LILYPOND unless ( $file ); + # file can be read now + + + # `$fh_write_ly' must be opened + &$increase_ly_number; + + $ly = new FH_FILE($path_ly); + + my $include = new FH_READ_FILE($file); + my $res = $include->read-all(); # is a refernce to an array + foreach ( @$res ) { + chomp; + $ly->print($_); + } + $ly->close(); + + if ( exists $eps_subs{ $Args->{'eps_func'} } ) { + $eps_subs{ $Args->{'eps_func'} }->(); + } else { + die "Wrong argument for \$eps_subs: `" . $Args->{'eps_func'} . "'"; + } + }, # end `.lilypond include' + + ); # end definition %lilypond_args + + + LILYPOND: foreach (<>) { + chomp; + my $line = $_; + + + # now the lines with '.lilypond ...' + + if ( / + ^ + [.'] + \s* + lilypond + ( + .* + ) + $ + /x ) { # .lilypond ... + my $args = $1; + $args =~ s/ + ^ + \s* + //x; + $args =~ s/ + \s* + $ + //x; + $args =~ s/ + ^ + ( + \S* + ) + \s* + //x; + my $arg1 = $1; # `start', `end' or `include' + $args =~ s/["'`]//g; + my $arg2 = $args; # file argument for `.lilypond include' + + if ( exists $lilypond_args{$arg1} ) { + $lilypond_args{$arg1}->($arg2); + next; + } else { + # not a suitable argument of `.lilypond' + $stderr->print( "Unknown command: `$arg1' `$arg2': `$line'" ); + } + + next LILYPOND; + } # end if for .lilypond + + + if ( $lilypond_mode ) { # do lilypond-mode + # see `.lilypond start' + $ly->print( $line ); + next LILYPOND; + } # do lilypond-mode + + # unknown line without lilypond + unless ( / + ^ + [.'] + \s* + lilypond + /x ) { # not a `.lilypond' line + $out->print($line); + next LILYPOND; + } + + } # end foreach <> +} # end Read + + +######################################################################## +# clean up +######################################################################## + +END { + + exit unless ( defined($Temp->{'temp_dir'}) ); + + if ( $Args->{'keep_all'} ) { + # With --keep_all, no temporary files are removed. + $v->print( "keep_all: `TRUE'" ); + $v->print( "No temporary files will be deleted:" ); + + opendir my $dh_temp, $Temp->{'temp_dir'} or + die "Cannot open " . $Temp->{'temp_dir'} . ": $!"; + for ( sort readdir $dh_temp ) { + next if ( / # omit files starting with a dot + ^ + \. + /x ); + if ( / + ^ + $Args->{'prefix'} + _ + /x ) { + my $file = File::Spec->catfile( $Temp->{'temp_dir'}, $_ ); + $v->print( "- " . $file ); + next; + } + next; + } # end for sort readdir + closedir $dh_temp; + + } else { # keep_all is not set + # Remove all temporary files except the eps files. + + $v->print( "keep_all: `FALSE'" ); + $v->print( "All temporary files except *.eps will be deleted" ); + + + if ( $Temp->{'eps_dir'} ) { + # EPS files are in another dir, remove temp dir + + if ( &is_subdir( $Temp->{'eps_dir'}, $Temp->{'temp_dir'} ) ) { + $v->print( "EPS dir is subdir of temp dir, so keep both." ); + } else { # remove temp dir + $v->print( "Try to remove temporary directory `" . + $Temp->{'temp_dir'} ."':" ); + if ( File::Path::remove_tree($Temp->{'temp_dir'}) ) { + # remove succeeds + $v->print( "...done." ); + } else { # did not remove + $v->print( "Failure to remove temporary directory." ); + } # end test on remove + } # end is subdir + + } else { # no EPS dir, so keep EPS files + + opendir my $dh_temp, $Temp->{'temp_dir'} or + die "Cannot open " . $Temp->{'temp_dir'} . ": $!"; + for ( sort readdir $dh_temp ) { + next if ( / # omit files starting with a dot + ^ + \. + /x ); + next if ( / # omit EPS-files + \.eps + $ + /x ); + if ( / + ^ + $Args->{'prefix'} + _ + /x ) { # this includes `PREFIX_temp*' + my $file = File::Spec->catfile( $Temp->{'temp_dir'}, $_ ); + $v->print( "Remove `" . $file . "'" ); + unlink $file or $stderr->print( "Could not remove `$file': $!" ); + next; + } # end if prefix + next; + } # end for readdir temp dir + closedir $dh_temp; + } # end if-else EPS files + } # end if-else keep files + + + if ( $Temp->{'eps_dir'} ) { + # EPS files in $Temp->{'eps_dir'} are always kept + $v->print( "As EPS directrory is set as `" . + $Temp->{'eps_dir'} . "', no EPS files there will be deleted." ); + + opendir my $dh_temp, $Temp->{'eps_dir'} or + die "Cannot open `" . $Temp->{'eps_dir'} . ": $!"; + for ( sort readdir $dh_temp ) { + next if ( / # omit files starting with a dot + ^ + \. + /x ); + if ( / + ^ + $Args->{'prefix'} + _ + .* + \.eps + $ + /x ) { + my $file = File::Spec->catfile( $Temp->{'eps_dir'}, $_ ); + $v->print( "- " . $file ); + next; + } # end if *.eps + next; + } # end for sort readdir + closedir $dh_temp; + + } + + 1; +} # end package Clean + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/glilypond/Makefile.sub groff-1.22.3/contrib/glilypond/Makefile.sub --- groff-1.22.2/contrib/glilypond/Makefile.sub 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/Makefile.sub 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,81 @@ +# Makefile.sub for `glilypond' + +# File position: /contrib/lilypond/Makefile.sub + +# Copyright (C) 2013-2014 Free Software Foundation, Inc. +# Written by Werner Lemberg and +# Bernd Warken . + +# This file is part of `glilypond' 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=glilypond.n + +MOSTLYCLEANADD=glilypond $(MAN1) + +all: glilypond + +# files going to lib directory `$(glilypond_dir)' + +GLILYPOND_LIB=\ + $(srcdir)/subs.pl \ + $(srcdir)/oop_fh.pl \ + $(srcdir)/args.pl + +GLILYPOND_LIB_=`echo $(GLILYPOND_LIB) | sed 's|$(srcdir)/||g'` + +RM=rm -f + +# create perl executable `glilypond', being stored into `bindir' + +glilypond: $(srcdir)/glilypond.pl + $(RM) $@ + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ + -e "s|@glilypond_dir@|$(DESTDIR)$(glilypond_dir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + $(srcdir)/glilypond.pl >$@ + chmod +x $@ + +install_data: glilypond $(GLILYPOND_LIB) + -test -d $(DESTDIR)$(bindir) \ + || $(mkinstalldirs) $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(bindir)/glilypond + $(INSTALL_SCRIPT) glilypond $(DESTDIR)$(bindir)/glilypond + -test -d $(DESTDIR)$(glilypond_dir) \ + || $(mkinstalldirs) $(DESTDIR)$(glilypond_dir) + for f in $(GLILYPOND_LIB_); do \ + $(RM) $(DESTDIR)$(glilypond_dir)/$$f; \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(glilypond_dir)/$$f; \ + done + +uninstall_sub: + $(RM) $(DESTDIR)$(bindir)/glilypond + -for f in $(GLILYPOND_LIB_); do \ + $(RM) $(DESTDIR)$(glilypond_dir)/$$f; \ + done + -test -d $(DESTDIR)$(glilypond_dir) && \ + rmdir $(DESTDIR)$(glilypond_dir) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/glilypond/oop_fh.pl groff-1.22.3/contrib/glilypond/oop_fh.pl --- groff-1.22.2/contrib/glilypond/oop_fh.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/oop_fh.pl 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,309 @@ +my $License = q* +######################################################################## +# Legalese +######################################################################## + +Source file position: `/contrib/glilypond/oop_fh.pl' +Installed position: `/lib/groff/glilypond/oop_fh.pl' + +Copyright (C) 2013-2013 Free Software Foundation, Inc. + Written by Bernd Warken + +This file is part of `glilypond', which is part of `GNU groff'. + +glilypond - integrate `lilypond' into `groff' files + + `GNU 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. + + `GNU groff' is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU +General Public License' for more details. + + You should have received a copy of the 'GNU General Public License` +along with `groff', see the files `COPYING' and `LICENSE' in the top +directory of the `groff' source package. If not, see +. +*; + +##### end legalese + + +# use strict; +# use warnings; +# use diagnostics; + +use integer; + +######################################################################## +# OOP for writing file handles that are open by default, like STD* +######################################################################## + +# -------------------------- _FH_WRITE_OPENED -------------------------- + +{ # FH_OPENED: base class for all opened file handles, like $TD* + + package _FH_WRITE_OPENED; + use strict; + + sub new { + my ( $pkg, $std ) = @_; + bless { + 'fh' => $std, + } + } + + sub open { + } + + sub close { + } + + sub print { + my $self = shift; + for ( @_ ) { + print { $self->{'fh'} } $_; + } + } + +} + + +# ------------------------------ FH_STDOUT ---------------------------- + +{ # FH_STDOUT: print to noral output STDOUT + + package FH_STDOUT; + use strict; + @FH_STDOUT::ISA = qw( _FH_WRITE_OPENED ); + + sub new { + &_FH_WRITE_OPENED::new( '_FH_WRITE_OPENED', *STDOUT ); + } + +} # end FH_STDOUT + + +# ------------------------------ FH_STDERR ----------------------------- + +{ # FH_STDERR: print to STDERR + + package FH_STDERR; + use strict; + @FH_STDERR::ISA = qw( _FH_WRITE_OPENED ); + + sub new { + &_FH_WRITE_OPENED::new( 'FH_OPENED', *STDERR ); + } + +} # end FH_STDERR + + +######################################################################## +# OOP for file handles that write into a file or string +######################################################################## + +# ------------------------------- FH_FILE ------------------------------ + +{ # FH_FILE: base class for writing into a file or string + + package FH_FILE; + use strict; + + sub new { + my ( $pkg, $file ) = @_; + bless { + 'fh' => undef, + 'file' => $file, + 'opened' => main::FALSE, + } + } + + sub DESTROY { + my $self = shift; + $self->close(); + } + + sub open { + my $self = shift; + my $file = $self->{'file'}; + if ( $file && -e $file ) { + die "file $file is not writable" unless ( -w $file ); + die "$file is a directory" if ( -d $file ); + } + open $self->{'fh'}, ">", $self->{'file'} + or die "could not open file `$file' for writing: $!"; + $self->{'opened'} = main::TRUE; + } + + sub close { + my $self = shift; + close $self->{'fh'} if ( $self->{'opened'} ); + $self->{'opened'} = main::FALSE; + } + + sub print { + my $self = shift; + $self->open() unless ( $self->{'opened'} ); + for ( @_ ) { + print { $self->{'fh'} } $_; + } + } + +} # end FH_FILE + + +# ------------------------------ FH_STRING ----------------------------- + +{ # FH_STRING: write into a string + + package FH_STRING; # write to \string + use strict; + @FH_STRING::ISA = qw( FH_FILE ); + + sub new { + my $pkg = shift; # string is a reference to scalar + bless + { + 'fh' => undef, + 'string' => '', + 'opened' => main::FALSE, + } + } + + sub open { + my $self = shift; + open $self->{'fh'}, ">", \ $self->{'string'} + or die "could not open string for writing: $!"; + $self->{'opened'} = main::TRUE; + } + + sub get { # get string, move to array ref, close, and return array ref + my $self = shift; + return '' unless ( $self->{'opened'} ); + my $a = &string2array( $self->{'string'} ); + $self->close(); + return $a; + } + +} # end FH_STRING + + +# -------------------------------- FH_NULL ----------------------------- + +{ # FH_NULL: write to null device + + package FH_NULL; + use strict; + @FH_NULL::ISA = qw( FH_FILE FH_STRING ); + + use File::Spec; + + my $devnull = File::Spec->devnull(); + $devnull = '' unless ( -e $devnull && -w $devnull ); + + sub new { + my $pkg = shift; + if ( $devnull ) { + &FH_FILE::new( $pkg, $devnull ); + } else { + &FH_STRING::new( $pkg ); + } + } # end new() + +} # end FH_NULL + + +######################################################################## +# OOP for reading file handles +######################################################################## + +# ---------------------------- FH_READ_FILE ---------------------------- + +{ # FH_READ_FILE: read a file + + package FH_READ_FILE; + use strict; + + sub new { + my ( $pkg, $file ) = @_; + die "File `$file' cannot be read." unless ( -f $file && -r $file ); + bless { + 'fh' => undef, + 'file' => $file, + 'opened' => main::FALSE, + } + } + + sub DESTROY { + my $self = shift; + $self->close(); + } + + sub open { + my $self = shift; + my $file = $self->{'file'}; + if ( $file && -e $file ) { + die "file $file is not writable" unless ( -r $file ); + die "$file is a directory" if ( -d $file ); + } + open $self->{'fh'}, "<", $self->{'file'} + or die "could not read file `$file': $!"; + $self->{'opened'} = main::TRUE; + } + + sub close { + my $self = shift; + close $self->{'fh'} if ( $self->{'opened'} ); + $self->{'opened'} = main::FALSE; + } + + sub read_line { + # Read 1 line of the file into a chomped string. + # Do not close the read handle at the end. + my $self = shift; + $self->open() unless ( $self->{'opened'} ); + + my $res; + if ( defined($res = CORE::readline($self->{'fh'}) ) ) { + chomp $res; + return $res; + } else { + $self->close(); + return undef; + } + } + + sub read_all { + # Read the complete file into an array reference. + # Close the read handle at the end. + # Return array reference. + my $self = shift; + $self->open() unless ( $self->{'opened'} ); + + my $res = []; + my $line; + while ( defined ( $line = CORE::readline $self->{'fh'} ) ) { + chomp $line; + push @$res, $line; + } + $self->close(); + $self->{'opened'} = main::FALSE; + return $res; + } + +} + +# end of OOP definitions + +package main; + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/glilypond/README.txt groff-1.22.3/contrib/glilypond/README.txt --- groff-1.22.2/contrib/glilypond/README.txt 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/README.txt 2014-11-04 09:38:35.452521159 +0100 @@ -0,0 +1,43 @@ + Copyright (C) 2013-2014 Free Software Foundation, Inc. + + Written by Bernd Warken + + 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 is part of `glilypond', which is part of `groff'. + + +######################################################################## + +In order to run `glilypond', your system must have installed Perl of at +least version `v5.6'. + + +######################################################################## + +In order to have this program installed by `make', the creation of a +libdir (library directory) must be programmed in some system files. +The following actions must be taken: + +1) /m4/groff.m4: +Add `AC_DEFUN([GROFF_GROFFERDIR_DEFAULT])'. + +2) /configure.ac: +Add `GROFF_GROFFERDIR_DEFAULT'. + +3) /Makefile.in: +Add several informations of `glilypond_dir' + +With that, the program `autoconf' can be run in order to update the +configure files and Makefile's. + +Now `$glilypond_dir' can be used as libdir. + + +######################################################################## +### Emacs settings +# Local Variables: +# mode: text +# End: diff -ruN groff-1.22.2/contrib/glilypond/subs.pl groff-1.22.3/contrib/glilypond/subs.pl --- groff-1.22.2/contrib/glilypond/subs.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/glilypond/subs.pl 2014-11-04 09:38:35.453521147 +0100 @@ -0,0 +1,466 @@ +my $License = q* +######################################################################## +# Legalese +######################################################################## + +Subroutines for `glilypond'. + +Source file position: `/contrib/glilypond/subs.pl' +Installed position: `/lib/groff/glilypond/subs.pl' + +Copyright (C) 2013-2014 Free Software Foundation, Inc. + Written by Bernd Warken + +This file is part of `glilypond', which is part of `GNU groff'. + + `GNU 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. + + `GNU groff' is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU +General Public License' for more details. + + You should have received a copy of the 'GNU General Public License` +along with `groff', see the files `COPYING' and `LICENSE' in the top +directory of the `groff' source package. If not, see +. +*; + +##### end legalese + + +# use strict; +# use warnings; +# use diagnostics; + +use integer; +use utf8; +use feature 'state'; + + +######################################################################## +# subs for using several times +######################################################################## + +sub create_ly2eps { # `--ly2eps' default + our ( $out, $Read, $Temp ); + + my $prefix = $Read->{'file_numbered'}; # with dir change to temp dir + + # `$ lilypond --ps -dbackend=eps -dgs-load-fonts \ + # output=file_without_extension file.ly' + # extensions are added automatically + my $opts = '--ps -dbackend=eps -dinclude-eps-fonts -dgs-load-fonts ' . + "--output=$prefix $prefix"; + &run_lilypond("$opts"); + + Cwd::chdir $Temp->{'cwd'} or + die "Could not change to former directory `" . + $Temp->{'cwd'} . "': $!"; + + my $eps_dir = $Temp->{'eps_dir'}; + my $dir = $Temp->{'temp_dir'}; + opendir( my $dh, $dir ) or + die "could not open temporary directory `$dir': $!"; + + my $re = qr< + ^ + $prefix + - + .* + \.eps + $ + >x; + my $file; + while ( readdir( $dh ) ) { + chomp; + $file = $_; + if ( /$re/ ) { + my $file_path = File::Spec->catfile($dir, $file); + if ( $eps_dir ) { + my $could_copy = FALSE; + File::Copy::copy($file_path, $eps_dir) + and $could_copy = TRUE; + if ( $could_copy ) { + unlink $file_path; + $file_path = File::Spec->catfile($eps_dir, $_); + } + } + $out->print( '.PSPIC ' . $file_path ); + } + } # end while readdir + closedir( $dh ); +} # end sub create_ly2eps() + + +sub create_pdf2eps { # `--pdf2eps' + our ( $v, $stdout, $stderr, $out, $Read, $Temp ); + + my $prefix = $Read->{'file_numbered'}; # with dir change to temp dir + + &run_lilypond("--pdf --output=$prefix $prefix"); + + my $file_pdf = $prefix . '.pdf'; + my $file_ps = $prefix . '.ps'; + + # pdf2ps in temp dir + my $temp_file = &next_temp_file; + $v->print( "\n##### run of `pdf2ps'" ); + # `$ pdf2ps file.pdf file.ps' + my $output = `pdf2ps $file_pdf $file_ps 2> $temp_file`; + die 'Program pdf2ps does not work.' if ( $? ); + &shell_handling($output, $temp_file); + $v->print( "##### end run of `pdf2ps'\n" ); + + # ps2eps in temp dir + $temp_file = &next_temp_file; + $v->print( "\n##### run of `ps2eps'" ); + # `$ ps2eps file.ps' + $output = `ps2eps $file_ps 2> $temp_file`; + die 'Program ps2eps does not work.' if ( $? ); + &shell_handling($output, $temp_file); + $v->print( "##### end run of `ps2eps'\n" ); + + # change back to former dir + Cwd::chdir $Temp->{'cwd'} or + die "Could not change to former directory `" . + $Temp->{'cwd'} . "': $!"; + + # handling of .eps file + my $file_eps = $prefix . '.eps'; + my $eps_path = File::Spec->catfile($Temp->{'temp_dir'}, $file_eps); + if ( $Temp->{'eps_dir'} ) { + my $has_copied = FALSE; + File::Copy::copy( $eps_path, $Temp->{'eps_dir'} ) + and $has_copied = TRUE; + if ( $has_copied ) { + unlink $eps_path; + $eps_path = File::Spec->catfile( $Temp->{'eps_dir'}, $file_eps ); + } else { + $stderr->print( "Could not use EPS-directory." ); + } # end Temp->{'eps_dir'} + } + # print into groff output + $out->print( '.PSPIC ' . $eps_path ); +} # end sub create_pdf2eps() + + +sub is_subdir { # arg1 is subdir of arg2 (is longer) + my ( $dir1, $dir2 ) = @_; + $dir1 = &path2abs( $dir1 );; + $dir2 = &path2abs( $dir2 );; + my @split1 = File::Spec->splitdir($dir1); + my @split2 = File::Spec->splitdir($dir2); + for ( @split2 ) { + next if ( $_ eq shift @split1 ); + return FALSE; + } + return TRUE; +} + + +sub license { + our ( $Legalese, $stdout ); + &version; + $stdout->print( $Legalese->{'license'} ); +} # end sub license() + + +sub make_dir { # make directory or check if it exists + our ( $v, $Args ); + + my $dir_arg = shift; + chomp $dir_arg; + $dir_arg =~ s/^\s*(.*)\s*$/$1/; + + unless ( $dir_arg ) { + $v->print( "make_dir(): empty argument" ); + return FALSE; + } + + unless ( File::Spec->file_name_is_absolute($dir_arg) ) { + my $res = Cwd::realpath($dir_arg); + $res = File::Spec->canonpath($dir_arg) unless ( $res ); + $dir_arg = $res if ( $res ); + } + + return $dir_arg if ( -d $dir_arg && -w $dir_arg ); + + + # search thru the dir parts + my @dir_parts = File::Spec->splitdir($dir_arg); + my @dir_grow; + my $dir_grow; + my $can_create = FALSE; # dir could be created if TRUE + + DIRPARTS: for ( @dir_parts ) { + push @dir_grow, $_; + next DIRPARTS unless ( $_ ); # empty string for root directory + + # from array to path dir string + $dir_grow = File::Spec->catdir(@dir_grow); + + next DIRPARTS if ( -d $dir_grow ); + + if ( -e $dir_grow ) { # exists, but not a dir, so must be removed + die "Couldn't create dir `$dir_arg', it is blocked by `$dir_grow'." + unless ( -w $dir_grow ); + + # now it's writable, but not a dir, so it can be removed + unlink ( $dir_grow ) or + die "Couldn't remove `$dir_grow', " . + "so I cannot create dir `$dir_arg': $!"; + } + + # $dir_grow does no longer exist, so the former dir must be writable + # in order to create the directory + pop @dir_grow; + $dir_grow = File::Spec->catdir(@dir_grow); + + die "`$dir_grow' is not writable, " . + "so directory `$dir_arg' can't be createdd." + unless ( -w $dir_grow ); + + # former directory is writable, so `$dir_arg' can be created + + File::Path::make_path( $dir_arg, + { + mask => oct('0700'), + verbose => $Args->{'verbose'}, + } + ) # `mkdir -P' + or die "Could not create directory `$dir_arg': $!"; + + last DIRPARTS; + } + + die "`$dir_arg' is not a writable directory" + unless ( -d $dir_arg && -w $dir_arg ); + + return $dir_arg; + +} # end sub make_dir() + + +my $number = 0; +sub next_temp_file { + our ( $Temp, $v, $Args ); + ++$number; + my $temp_basename = $Args->{'prefix'} . '_temp_' . $number; + my $temp_file = File::Spec->catfile( $Temp->{'temp_dir'} , + $temp_basename ); + $v->print( "next temporary file: `$temp_file'" ); + return $temp_file; +} # end sub next_temp_file() + + +sub path2abs { + our ( $Temp, $Args ); + + my $path = shift; + $path =~ s/ + ^ + \s* + ( + .* + ) + \s* + $ + /$1/x; + + die "path2abs(): argument is empty." unless ( $path ); + + # Perl does not support shell `~' for home dir + if ( $path =~ / + ^ + ~ + /x ) { + if ( $path eq '~' ) { # only own home + $path = File::HomeDir->my_home; + } elsif ( $path =~ m< + ^ + ~ / + ( + .* + ) + $ + >x ) { # subdir of own home + $path = File::Spec->catdir( $Temp->{'cwd'}, $1 ); + } elsif ( $path =~ m< + ^ + ~ + ( + [^/]+ + ) + $ + >x ) { # home of other user + $path = File::HomeDir->users_home($1); + } elsif ( $path =~ m< + ^ + ~ + ( + [^/]+ + ) + /+ + ( + .* + ) + $ + >x ) { # subdir of other home + $path = File::Spec-> + catdir( File::HomeDir->users_home($1), $2 ); + } + } + + $path = File::Spec->rel2abs($path); + + # now $path is absolute + return $path; +} # end sub path2abs() + + +sub run_lilypond { + # arg is the options collection for `lilypond' to run + # either from ly or pdf + + our ( $Temp, $v ); + + my $opts = shift; + chomp $opts; + + my $temp_file = &next_temp_file; + my $output = EMPTYSTRING; + + # change to temp dir + Cwd::chdir $Temp->{'temp_dir'} or + die "Could not change to temporary directory `" . + $Temp->{'temp_dir'} . "': $!"; + + $v->print( "\n##### run of `lilypond " . $opts . "'" ); + $output = `lilypond $opts 2>$temp_file`; + die "Program lilypond does not work, see `$temp_file': $?" + if ( $? ); + chomp $output; + &shell_handling($output, $temp_file); + $v->print( "##### end run of `lilypond'\n" ); + + # stay in temp dir +} # end sub run_lilypond() + + +sub shell_handling { + # Handle ``-shell-command output in a string (arg1). + # stderr goes to temporary file $TempFile. + + our ( $out, $v, $Args ); + + my $out_string = shift; + my $temp_file = shift; + + my $a = &string2array($out_string); # array ref + for ( @$a ) { + $out->print( $_ ); + } + + $temp_file && -f $temp_file && -r $temp_file || + die "shell_handling(): $temp_file is not a readable file."; + my $temp = new FH_READ_FILE($temp_file); + my $res = $temp->read_all(); + for ( @$res ) { + chomp; + $v->print($_); + } + + unlink $temp_file unless ( $Args->{'keep_all'} ); +} # end sub shell_handling() + + +sub string2array { + my $s = shift; + my @a = (); + for ( split "\n", $s ) { + chomp; + push @a, $_; + } + return \@a; +} # end string2array() + + +sub usage { # for `--help' + our ( $Globals, $Args ); + + my $p = $Globals->{'prog'}; + my $usage = EMPTYSTRING; + $usage = '###### usage:' . "\n" if ( $Args->{'verbose'} ); + $usage .= qq*Options for $p: +Read a `roff' file or standard input and transform `lilypond' parts +(everything between `.lilypond start' and `.lilypond end') into +`EPS'-files that can be read by groff using `.PSPIC'. + +There is also a command `.lilypond include ' that can +include a complete `lilypond' file into the `groff' document. + + +# Breaking options: +$p -?|-h|--help|--usage # usage +$p --version # version information +$p --license # the license is GPL >= 3 + + +# Normal options: +$p [options] [--] [filename ...] + +There are 2 options for influencing the way how the `EPS' files for the +`roff' display are generated: +--ly2eps `lilypond' generates `EPS' files directly (default) +--pdf2eps `lilypond' generates a `PDF' file that is transformed + +-k|--keep_all do not delete any temporary files +-v|--verbose print much information to STDERR + +Options with an argument: +-e|--eps_dir=... use a directory for the EPS files +-o|--output=... sent output in the groff language into file ... +-p|--prefix=... start for the names of temporary files +-t|--temp_dir=... provide the directory for temporary files. + +The directories set are created when they do not exist. +*; + + # old options: + # --keep_files -k: do not delete any temporary files + # --file_prefix=... -p: start for the names of temporary files + + $main::stdout->print( $usage ); +} # end sub usage() + + +sub version { # for `--version' + our ( $Globals, $Legalese, $stdout, $Args ); + my $end; + if ( $Globals->{'groff_version'} ) { + $end = " version $Globals->{'groff_version'}"; + } else { + $end = '.'; + } + + my $output = EMPTYSTRING; + $output = "###### version:\n" if ( $Args->{'verbose'} ); + $output .= "`" . $Globals->{'prog'} . "' version `" . + $Legalese->{'version'} . "' is part of `GNU groff'" . $end; + + $stdout->print($output); +} # end sub version() + + +# end of subs + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/gperl/ChangeLog groff-1.22.3/contrib/gperl/ChangeLog --- groff-1.22.2/contrib/gperl/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gperl/ChangeLog 2014-11-04 09:38:35.457521097 +0100 @@ -0,0 +1,84 @@ +2014-10-11 Bernd Warken + + * gperl.pl: Version 1.2.6 + Replace `capturex' with backtics, so `use IPC::System::Simple' + can be removed. + +2014-09-03 Bernd Warken + + * gperl.pl: Version 1.2.5 + + * all files in `gperl': Copying and Emacs setting. + +2014-07-06 Bernd Warken + + * gperl.pl: Version 1.2.4 + Improve handling of `.Perl' lines. + +2014-07-06 Bernd Warken + + * gperl.pl: Version 1.2.3 + + * gperl.man: Compatioble to `doclifter'. + +2014-07-04 Bernd Warken + + * gperl.pl: Version 1.2.2 + + * gperl.man: Transform to classical man-page style. + +2014-07-03 Bernd Warken + + * gperl.pl: Improve definitions. + +2014-06-15 Bernd Warken + + * gperl.pl: Version 1.2.1. + + * gperl.man: Correct the Legalese and documentation of options. + +2014-06-15 Bernd Warken + + * gperl.pl: Version 1.2. Getting several storage variables from + printing in `Perl' with several lines. Accept string and number + register variable names for `.ds' and `.nr'. + + * gperl.man: Rewrite with the actual additions. + +2014-06-14 Bernd Warken + + * gperl.pl: Version 1.1. New structure without subs. Restrict + storage to only strings by creating only `.ds'. + + * gperl.man: Major rewrite. Omit `.nr'. + +2014-02-27 Bernd Warken + + * gperl.pl: Admit file name arguments. Handle correct temporary + file. + +2014-02-25 Bernd Warken + + * gperl.pl, gperl.man, ChangeLog, Makefile.sub: + first version 1.0 + +2014-02-25 Bernd Warken +________________________________________________________________________ +License + +Copyright (C) 2014 + 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 `gperl', which is part of the `groff' +project. + +####### Emacs settings + +Local Variables: +mode: change-log +End: diff -ruN groff-1.22.2/contrib/gperl/gperl.man groff-1.22.3/contrib/gperl/gperl.man --- groff-1.22.2/contrib/gperl/gperl.man 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gperl/gperl.man 2014-11-04 09:38:35.457521097 +0100 @@ -0,0 +1,523 @@ +.TH GPERL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +gperl \- groff preprocessor for Perl parts in roff files +. +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de au +This file was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . +.. +. +.de co +Copyright \[co] 2014 Free Software Foundation, Inc. +. +.P +This file is part of +.IR \%gperl , +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 +version\~2. +. +.P +The license text is available in the internet at +.UR http://www.gnu.org/licenses/gpl-2.0.html +.UE . +.. +. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- +. +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL +. +.\" Bullet +.ie t .ds BU \[bu] +.el .ds BU * +.\" used in `.IP \*(BU 2m' (former .Topic) +. +. +.\" -------------------------------------------------------------------- +.SH "SYNOPSIS" +.\" -------------------------------------------------------------------- +. +.SY gperl +.OP \- +.OP \-\- +.OP \& "\%filespec \*(EL" +.YS +. +.BR "gperl -h" | --help +.br +.BR "gperl -v" | --version +. +. +.\" -------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------- +. +This is a preprocesor for +.BR \%groff (@MAN1EXT@). +. +It allows to add +.BR perl (7) +code into +.BR groff (7) +files. +. +The result of a +.I Perl part +can be stored in groff +.I strings +or +.I numerical registers +based on the arguments at a final line of a +.IR "Perl part" . +. +. +.\" -------------------------------------------------------------------- +.SH "OPTIONS" +.\" -------------------------------------------------------------------- +. +So far, there are only +.I filespec +or +.I breaking +options. +. +. +.P +.I filespec +are file names or the minus character +.B \- +character for standard input. +. +As usual, the argument +.B \-\- +can be used in order to let all fowllowing arguments mean file names, +even if the names begin with a minus character +.BR \- . +. +. +.P +An option is +.IR breaking , +when the program just writes the information that was asked for and +then stops. +. +All other arguments will be ignored by that. +. +These +.I breaking +options are heree +. +.TP +.B -h\~\fR|\fB\~--help +Print help information with a short explanation of options to +standard output. +. +. +.TP +.B -v\~\fR|\fB\~--version +Print version information to standard output. +. +. +.\" -------------------------------------------------------------------- +.SH "PERL PARTS" +.\" -------------------------------------------------------------------- +. +.I Perl +parts in +.I groff files +are enclosed by two +.B .Perl +requests with different arguments, a +.I starting +and an +.I ending +command. +. +. +.\" -------------------------------------------------------------------- +.SS "Starting Perl Mode" +.\" -------------------------------------------------------------------- +. +The starting +.I Perl request +can either be without arguments, or by a request that has the term +.B start +as its only argument. +.RS +.IP \*(BU 2m +.B \&.Perl +.IP \*(BU 2m +.B \&.Perl start +.RE +. +. +.\" -------------------------------------------------------------------- +.SS "Ending Perl Mode without Storage" +.\" -------------------------------------------------------------------- +. +A +.B .Perl +command line with an argument different from +.B start +finishes a running +.IR "Perl part" . +. +Of course, it would be reasonable to add the argument +.BR stop ; +that's possible, but not necessary. +. +.RS +.IP \*(BU 2m +.B \&.Perl stop +.IP \*(BU 2m +.BI \&.Perl " other_than_start" +.RE +. +The argument +.I other_than_start +can additionally be used as a +.I groff +string variable name for storage \[em] see next section. +. +. +.\" -------------------------------------------------------------------- +.SS "Ending Perl Mode with Storage" +.\" -------------------------------------------------------------------- +. +A useful feature of +.B gperl +is to store one or more results from the +.IR "Perl mode" . +. +. +.P +The output of a +.I Perl part +can be got with backticks +.BR `...` . +. +. +.P +This program collects all printing to STDOUT (normal standard output) +by the Perl +.B print +program. +. +This pseudo-printing output can have several lines, due to printed +line breaks with +.BR \[rs]n . +. +By that, the output of a Perl run should be stored into a Perl array, +with a single line for each array member. +. +. +.P +This Perl array output can be stored by +.B gperl +in either +.TP +.I groff strings +by creating a groff command +.B .ds +. +.TP +.I groff number register +by creating a groff command +.B .rn +. +. +.P +The storage modes can be determined by arguments of a final stopping +.B .Perl +command. +. +Each argument +.B .ds +changes the mode into +.I groff string +and +.B .nr +changes the mode into +.I groff number register +for all following output parts. +. +. +.P +By default, all output is saved as strings, so +.B .ds +is not really needed before the first +.B .nr +command. +. +That suits to +.BR \%groff (@MAN7EXT@), +because every output can be saved as +.I groff +string, but the number registers can be very restrictive. +. +. +.P +In +.IR "string mode" , +.B gperl +generates a +.I groff string +storage line +.RS +.EX +\&\fB.ds \fIvar_name content +.EE +.RE +. +In +.I number register mode +the following groff command is generated +.RS +.EX +\&\fB.nr \fIvar_name content +.EE +.RE +. +. +.P +We present argument collections in the following. +. +You can add as first argument for all +.BR stop . +. +We omit this additional element. +. +. +.P +.TP +.BI ".Perl .ds " var_name +This will store 1 output line into the groff string named +.I var_name +by the automatically created command +.RS +.RS +.EX +.BI .ds " var_name output" +.EE +.RE +.RE +. +. +.TP +.BI .Perl " var_name" +If +.I var_name +is different from +.B start +this is equivalent to the former command, because the string mode is +string with +.B .ds +command. +default. +. +. +.TP +.BI .Perl " var_name1 var_name2" +This will store 2 output lines into groff string names +.I var_name1 +and +.IR var_name2 , +because the default mode +.B .ds +is active, such that no +.B .ds +argument is needed. +. +Of course, this is equivalent to +.RS +.RS +.EX +.BI ".Perl .ds " "var_name1 var_name2" +.EE +.RE +and +.RS +.EX +.BI ".Perl .ds " "var_name1 " ".ds" " var_name2" +.EE +.RE +.RE +. +. +.TP +.BI ".Perl .nr" " var_name1 varname2" +stores both variables as number register variables. +. +.B gperl +generates +.RS +.EX +.BI .nr " var_name1 output_line1" +.BI .nr " var_name2 output_line2" +.EE +.RE +. +. +.TP +.BI ".Perl .nr " var_name1 " .ds " var_name2 +stores the 1st argument as +.I number register +and the second as +.I string +by +.RS +.EX +.BI .nr " var_name1 output_line1" +.BI .ds " var_name2 output_line2" +.EE +.RE +. +. +.\" -------------------------------------------------------------------- +.SS "Printing towards STDERR is without Storage" +.\" -------------------------------------------------------------------- +. +The printing towards +.IR STDERR , +(standard error) works as usual. +. +All error information goes to the real normal +.IR "standard error" , +without other automatical storage. +. +. +.\" -------------------------------------------------------------------- +.SH "EXAMPLES" +.\" -------------------------------------------------------------------- +. +A possible +.I Perl part +in a +.I roff file +could look like that: +.RS +.EX +before +\&.Perl start +my $result = 'some data'; +print $result; +\&.Perl stop .ds string_var +after +.EE +.RE +. +. +.P +This stores the result +.B \[rq]some data\[rq] +into the +.I roff string +called +.BR string_var , +such that the following line is printed: +.RS +.EX +\&.ds string_var some data +.EE +.RE +by +.B gperl +as food for the coming +.B groff +run. +. +. +.P +A +.I Perl part +with several outputs is: +.RS +.EX +\&.Perl start +print \[rq]first\[rs]n\[rq]; +print \[rq]second line\[rs]n\[rq]; +print \[rq]3\[rs]n\[rq]; +\&.Perl var1 var2 .nr var3 +.EE +.RE +. +This stores 3 printed lines into 3 +.I groff +strings. +.BR var1 , var2 , var3 . +. +So the following +.I groff +command lines are created: +.RS +.EX +\&.ds var1 first +\&.ds var2 second line +\&.nr var3 3 +.EE +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.P +Man\-pages related to +.I groff +are +.BR \%groff (@MAN1EXT@), +.BR \%groff (@MAN7EXT@), +.BR \%grog (@MAN1EXT@), +and +.BR \%groffer (@MAN1EXT@). +. +. +.P +Documents related to +.I Perl +are +.BR \%perl (@MAN1EXT@), +.BR \%perl (@MAN7EXT@). +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/gperl/gperl.pl groff-1.22.3/contrib/gperl/gperl.pl --- groff-1.22.2/contrib/gperl/gperl.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gperl/gperl.pl 2014-11-04 09:38:35.457521097 +0100 @@ -0,0 +1,252 @@ +#! /usr/bin/env perl + +# gperl - add Perl part to groff files, this is the preprocessor for that + +# Source file position: /contrib/gperl/gperl.pl +# Installed position: /bin/gperl + +# Copyright (C) 2014 Free Software Foundation, Inc. + +# Written by Bernd Warken . + +my $version = '1.2.6'; + +# This file is part of `gperl', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 can find a copy of the GNU General Public License in the internet +# at . + +######################################################################## + +use strict; +use warnings; +#use diagnostics; + +# temporary dir and files +use File::Temp qw/ tempfile tempdir /; + +# needed for temporary dir +use File::Spec; + +# for `copy' and `move' +use File::Copy; + +# for fileparse, dirname and basename +use File::Basename; + +# current working directory +use Cwd; + +# $Bin is the directory where this script is located +use FindBin; + + +######################################################################## +# system variables and exported variables +######################################################################## + +$\ = "\n"; # final part for print command + +######################################################################## +# read-only variables with double-@ construct +######################################################################## + +our $File_split_env_sh; +our $File_version_sh; +our $Groff_Version; + +my $before_make; # script before run of `make' +{ + my $at = '@'; + $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; +} + +my %at_at; +my $file_perl_test_pl; +my $groffer_libdir; + +if ($before_make) { + my $gperl_source_dir = $FindBin::Bin; + $at_at{'BINDIR'} = $gperl_source_dir; + $at_at{'G'} = ''; +} else { + $at_at{'BINDIR'} = '@BINDIR@'; + $at_at{'G'} = '@g@'; +} + + +######################################################################## +# options +######################################################################## + +foreach (@ARGV) { + if ( /^(-h|--h|--he|--hel|--help)$/ ) { + print q(Usage for the `gperl' program:); + print 'gperl [-] [--] [filespec...] normal file name arguments'; + print 'gperl [-h|--help] gives usage information'; + print 'gperl [-v|--version] displays the version number'; + print q(This program is a `groff' preprocessor that handles Perl ) . + q(parts in `roff' files.); + exit; + } elsif ( /^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/ ) { + print q(`gperl' version ) . $version; + exit; + } +} + + +####################################################################### +# temporary file +####################################################################### + +my $out_file; +{ + my $template = 'gperl_' . "$$" . '_XXXX'; + my $tmpdir; + foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'}, + $ENV{'TEMPDIR'}, 'tmp', $ENV{'HOME'}, + File::Spec->catfile($ENV{'HOME'}, 'tmp')) { + if ($_ && -d $_ && -w $_) { + eval { $tmpdir = tempdir( $template, + CLEANUP => 1, DIR => "$_" ); }; + last if $tmpdir; + } + } + $out_file = File::Spec->catfile($tmpdir, $template); +} + + +######################################################################## +# input +######################################################################## + +my $perl_mode = 0; + +foreach (<>) { + chomp; + s/\s+$//; + my $line = $_; + my $is_dot_Perl = $line =~ /^[.']\s*Perl(|\s+.*)$/; + + unless ( $is_dot_Perl ) { # not a `.Perl' line + if ( $perl_mode ) { # is running in Perl mode + print OUT $line; + } else { # normal line, not Perl-related + print $line; + } + next; + } + + + ########## + # now the line is a `.Perl' line + + my $args = $line; + $args =~ s/\s+$//; # remove final spaces + $args =~ s/^[.']\s*Perl\s*//; # omit .Perl part, leave the arguments + + my @args = split /\s+/, $args; + + ########## + # start Perl mode + if ( @args == 0 || @args == 1 && $args[0] eq 'start' ) { + # For `.Perl' no args or first arg `start' means opening `Perl' mode. + # Everything else means an ending command. + if ( $perl_mode ) { + # `.Perl' was started twice, ignore + print STDERR q(`.Perl' starter was run several times); + next; + } else { # new Perl start + $perl_mode = 1; + open OUT, '>', $out_file; + next; + } + } + + ########## + # now the line must be a Perl ending line (stop) + + unless ( $perl_mode ) { + print STDERR 'gperl: there was a Perl ending without being in ' . + 'Perl mode:'; + print STDERR ' ' . $line; + next; + } + + $perl_mode = 0; # `Perl' stop calling is correct + close OUT; # close the storing of `Perl' commands + + ########## + # run this `Perl' part, later on about storage of the result + # array stores prints with \n + my @print_res = `perl $out_file`; + + # remove `stop' arg if exists + shift @args if ( $args[0] eq 'stop' ); + + if ( @args == 0 ) { + # no args for saving, so @print_res doesn't matter + next; + } + + my @var_names = (); + my @mode_names = (); + + my $mode = '.ds'; + for ( @args ) { + if ( /^\.?ds$/ ) { + $mode = '.ds'; + next; + } + if ( /^\.?nr$/ ) { + $mode = '.nr'; + next; + } + push @mode_names, $mode; + push @var_names, $_; + } + + my $n_res = @print_res; + my $n_vars = @var_names; + + if ( $n_vars < $n_res ) { + print STDERR 'gperl: not enough variables for Perl part: ' . + $n_vars . ' variables for ' . $n_res . ' output lines.'; + } elsif ( $n_vars > $n_res ) { + print STDERR 'gperl: too many variablenames for Perl part: ' . + $n_vars . ' variables for ' . $n_res . ' output lines.'; + } + if ( $n_vars < $n_res ) { + print STDERR 'gperl: not enough variables for Perl part: ' . + $n_vars . ' variables for ' . $n_res . ' output lines.'; + } + + my $n_min = $n_res; + $n_min = $n_vars if ( $n_vars < $n_res ); + exit unless ( $n_min ); + $n_min -= 1; # for starting with 0 + + for my $i ( 0..$n_min ) { + my $value = $print_res[$i]; + chomp $value; + print $mode_names[$i] . ' ' . $var_names[$i] . ' ' . $value; + } +} + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/gperl/Makefile.sub groff-1.22.3/contrib/gperl/Makefile.sub --- groff-1.22.2/contrib/gperl/Makefile.sub 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gperl/Makefile.sub 2014-11-04 09:38:35.457521097 +0100 @@ -0,0 +1,61 @@ +# Makefile.sub for `gperl' (preprocessor for added Perl parts) + +# File position: /contrib/gperl/Makefile.sub + +# Copyright (C) 2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `gperl' which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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=gperl.n + +MOSTLYCLEANADD=gperl $(MAN1) + +# not all make programs have $(RM) predefined. +RM=rm -f + +all: gperl + +gperl: gperl.pl + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e "$(SH_SCRIPT_SED_CMD)" \ + $(srcdir)/gperl.pl >$@; \ + chmod +x $@ + +.PHONY: install_data +install_data: gperl + -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(bindir)/gperl + $(INSTALL_SCRIPT) gperl $(DESTDIR)$(bindir)/gperl + +.PHONY: uninstall_sub +uninstall_sub: + $(RM) $(DESTDIR)$(bindir)/gperl + + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/gpinyin/ChangeLog groff-1.22.3/contrib/gpinyin/ChangeLog --- groff-1.22.2/contrib/gpinyin/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gpinyin/ChangeLog 2014-11-04 09:38:35.462521034 +0100 @@ -0,0 +1,73 @@ +2014-10-11 Werner LEMBERG + + * Makefile.sub (gpinyin): Handle `gpinyin_dir'. + +2014-10-11 Bernd Warken + + * gpinyin.pl: Version 1.0.4 + Remove `use IPC::System::Simple'. + +2014-10-10 Bernd Warken + + * gpinyin.pl: Version 1.0.3 + Remove beginning empty line for `pinyin' parts. + +2014-09-25 Bernd Warken + + * gpinyin.pl: Version 1.0.2 + + * Makefile.sub: Add .PHONY. Restructure install and uninstall. + +2014-09-03 Bernd Warken + + Version 1.0.1 + + * all `gpinyin' files: Copying and Emacs settings. + +2014-08-27 Bernd Warken + + Version 1.0.0 + + * gpinyin.pl, subs.pl, gpinyin.man: Make `gpinyin' runnable. + +2014-08-08 Bernd Warken + + * gpinyin.pl: Version 0.9.2 + + * subs.pl: Rename `sub.pl'. + + * Makefile.sub: Change `sub.pl' to `subs.pl'. + +2014-08-08 Bernd Warken + + * gpinyin.pl: Version 0.9.1 + + * sub.pl: New file for storing subs later on. + + * Makefile.sub: Add new gpinyin path for sub.pl. + +2014-08-01 Bernd Warken + + * gpinyin.pl, gpinyin.man, ChangeLog, Makefile.sub: + First version 0.9.0 of gpinyin + +2014-08-01 Bernd Warken +________________________________________________________________________ +License + +Copyright (C) 2014 + 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 `gpinyin', which is part of the `groff' +project. + +####### Emacs settings + +Local Variables: +mode: change-log +End: diff -ruN groff-1.22.2/contrib/gpinyin/gpinyin.man groff-1.22.3/contrib/gpinyin/gpinyin.man --- groff-1.22.2/contrib/gpinyin/gpinyin.man 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gpinyin/gpinyin.man 2014-11-04 09:38:35.462521034 +0100 @@ -0,0 +1,414 @@ +.TH GPINYIN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +gpinyin \- Chinese European-like writing within groff +. +.SH "SYNOPSIS" +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2014 Free Software Foundation, Inc. + +This file is part of gpinyin, which is part of groff, a free software +project. + +You can redistribute it and/or modify it under the terms of the GNU +General Public License version 2 as published by the Free Software +Foundation. + +The license text is available in the internet at +.UR http://www.gnu.org/licenses/gpl-2.0.html +.UE . +.. +. +.de au +This file was written by Bernd Warken . +.. +. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- +. +.ie t .ds EL \f[S]\N'188'\f[P] +.el .ds EL \&.\|.\|.\&\ +.\" ie t .char \[Ellipsis] \f[S]\N'188'\f[P] +.\" el .char \[Ellipsis] \&.\|.\|.\&\ +.\" called with \[Ellipsis] +. +. +.\" -------------------------------------------------------------------- +.\" SH "SYNOPSIS" +.\" -------------------------------------------------------------------- +. +.SY gpinyin +.OP \- +.OP \-\- +.OP \& "\%filespec \*(EL" +.YS +. +.BR "gpinyin -h" | --help +.br +.BR "gpinyin -v" | --version +. +. +.\" -------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------- +. +This is a preprocesor for +.BR \%groff (@MAN1EXT@). +. +It allows to add the Chinese European-like language +.I Pinyin +into +.BR groff (7) +files. +. +. +.\" -------------------------------------------------------------------- +.SH "OPTIONS" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Breaking Options" +.\" -------------------------------------------------------------------- +. +An option is +.IR breaking , +when the program just writes the information that was asked for and +then stops. +. +All other arguments will be ignored by that. +. +The +.I breaking +options are here +. +.TP +.B -h\~\fR|\fB\~--help +Print help information with a short explanation of options to standard +output. +. +. +.TP +.B -v\~\fR|\fB\~--version +Print version information to standard output. +. +. +.\" -------------------------------------------------------------------- +.SS "Filespec Options" +.\" -------------------------------------------------------------------- +. +So far, there are only +.I filespec +and +.I breaking +options. +. +. +.P +.I filespec +arguments are file names or the minus sign +.B \- +for standard input. +. +As usual, the argument +.B \-\- +can be used in order to let all following arguments mean file names, +even if the names begin with a minus character +.BR \- . +. +. +.\" -------------------------------------------------------------------- +.SH "PINYIN PARTS" +.\" -------------------------------------------------------------------- +. +.I Pinyin +parts in +.I groff files +are enclosed by two +.B .pinyin +requests with different arguments. +. +The starting request is +.RS +.EX +\e.pinyin start +.EE +.RE +or +.RS +.EX +\e.pinyin begin +.EE +.RE +and the ending request is +.RS +.EX +\e.pinyin stop +.EE +.RE +or +.RS +.EX +\e.pinyin end +.EE +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "PINYIN DETAILS" +.\" -------------------------------------------------------------------- +. +.I Pinyin +is used for writing the Chinese language in a European-like +(romanization) way. +. +The Chinese language consists of more than 400 syllables, each with +one of 5 different tones. +. +In +.IR Pinyin , +such toned syllables can be appended to word-like connections. +. +. +.\" -------------------------------------------------------------------- +.SS "Syllables" +.\" -------------------------------------------------------------------- +. +The Chinese language is based on about 411 defined +.IR syllables , +see +.UR http://en.wikipedia.org/wiki/Pinyin_table +.UE . +. +. +.P +In +.IR Pinyin , +each syllable consists of 1 to 6 European-like letters, the normal +ASCII characters in upper and lower case, the only unusual characters +are the +.BR "U dieresis " ( umlaut ) +in both cases, i.e. +.BR [a-zA-ZüÜ] . +. +. +.P +In the +.B groff gpinyin +input, +all ASCII letters are written as usual. +. +But the +.BR u / U +.B dieresis +can be written as either as +.B \e[\[aq]u] or +.B ue +in lower case or +.BR \e[\[aq]U] , +.BR Ue , +.B UE +in upper case. +. +. +.\" -------------------------------------------------------------------- +.SS "Tones" +.\" -------------------------------------------------------------------- +. +Each syllable has exactly one of 5 defined +.IR tones . +. +The 5th tone is not written at all, but each tone 1 to 4 is written +as an accent above a defined vowel within the syllable. +. +. +.P +In the source file, these tones are written by adding a number 0 to 5 +after the syllable name. +. +. +.P +In each writing, the tone numbers 1 to 4 are transformed into accents +above vowels. +. +. +.P +The 1st tone is the horizontal macron +.BR \e[a\-] +.B \[a-] , +similar to a minus or sub character, but on top of the vowel. +. +In each source file, write the 1st tone as +.IB "syllable" 1\fR. +. +. +.P +The 2nd tone is the accute accent +.B \e[aa] +.BR \[aa] . +. +In each source file, write the 2nd tone as +.IB "syllable" 2\fR. +. +. +.P +The 3rd tone is the caron sign, +.BR \e[ah] +.B \[ah] , +which looks a bit like a small +.B v +above the vowel. +. +In each source file, write the 3rd tone as +.IB "syllable" 3\fR. +. +. +.P +The 4th tone is the grave accent +.B \e[ga] +.BR \[ga] . +. +In each source file, write the 4th tone as +.IB "syllable" 4\fR. +. +. +.P +The 5th tone is the no-tone. +. +The numbers 0 and 5 can be used for the +.BR ( no-tone ). +. +The +.B no-tone +number can be omitted, when the syllable is the end of some word. +. +But within a word of syllables, one of the +.B no-tone +numbers 0 or 5 must be written. +. +. +.\" -------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.TP +.BR \%groff (@MAN1EXT@) +.TQ +.BR \%grog (@MAN1EXT@) +.TQ +.BR \%groffer (@MAN1EXT@) +Man\-pages with section +.B 1 +related to +.IR groff . +. +They can be called with either +.RS +.RS +.EX +.BI man " name" +.BI groffer "name" +.EE +.RE +.RE +. +. +.TP +.BR \%groff (@MAN7EXT@) +.TQ +.BR \%groff_char (@MAN7EXT@) +Man\-pages with section +.B 7 +related to +.IR groff . +. +They can be called with either +.RS +.RS +.EX +.BI "man 7" " name" +.BI "groffer 7" " name" +.EE +.RE +.RE +. +. +.P +Internet documents related to +.I pinyin +are +.RS +.br +.UR http://\:en.wikipedia.org/\:wiki/\:Pinyin +.I Wikipedia pinyin +.UE , +. +.br +.UR http://\:en.wikipedia.org/\:wiki/\:Pinyin_table +.I Pinyin Table +.UE , +. +.br +.UR http://\;www.sino.uni-heidelberg.de/\:course_resources/\:s02/\:\ +py-vowels.htm +.I Unicode vowels for Pinyin +.UE , +. +.br +.UR http://\:www.foolsworkshop.com/\:ptou/\:index.html +.IR pinyin to Unicode +.UE , +. +.br +.UR http://\:www.mandarintools.com/ +.I Online Chinese Tools +.UE , +. +.br +.UR http://\:www.pinyin.info/\:index.html +.I Main pinyin website +.UE , +. +.br +.UR http://\:www.pinyin.info/\:rules/\:where.html +.I Where do the tone marks go? +.UE , +. +.br +.UR http://\:git.savannah.gnu.org/\:gitweb/\:\ +?p=cjk.git;a=blob_plain;f=doc/\:pinyin.txt;hb=HEAD +.I Pinyin for TeX 1 +.UE , +. +.br +.UR http://\:git.savannah.gnu.org/\:gitweb/\:\ +?p=cjk.git;a=blob_plain;f=texinput/p\:inyin.sty;hb=HEAD +.I Pinyin for TeX 2 +.UE . +. +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" coding: latin-1 +.\" End: diff -ruN groff-1.22.2/contrib/gpinyin/gpinyin.pl groff-1.22.3/contrib/gpinyin/gpinyin.pl --- groff-1.22.2/contrib/gpinyin/gpinyin.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gpinyin/gpinyin.pl 2014-11-04 09:38:35.462521034 +0100 @@ -0,0 +1,192 @@ +#! /usr/bin/env perl + +# gpinyin - European-like Chinese writing `pinyin' into `groff' + +# Source file position: /contrib/gpinyin/gpinyin.pl +# Installed position: /bin/gpinyin + +# Copyright (C) 2014 Free Software Foundation, Inc. + +# Written by Bernd Warken . + +my $version = '1.0.4'; + +# This file is part of `gpinyin', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 can find a copy of the GNU General Public License in the internet +# at . + +######################################################################## + +use strict; +use warnings; +#use diagnostics; + +# temporary dir and files +use File::Temp qw/ tempfile tempdir /; + +# needed for temporary dir +use File::Spec; + +# for `copy' and `move' +use File::Copy; + +# for fileparse, dirname and basename +use File::Basename; + +# current working directory +use Cwd; + +# $Bin is the directory where this script is located +use FindBin; + + +######################################################################## +# system variables and exported variables +######################################################################## + +$\ = "\n"; # final part for print command + +######################################################################## +# read-only variables with double-@ construct +######################################################################## + +our $File_split_env_sh; +our $File_version_sh; +our $Groff_Version; + +my $before_make; # script before run of `make' +{ + my $at = '@'; + $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; +} + +my %at_at; +my $file_gpinyin_test_pl; +my $gpinyin_libdir; + +if ($before_make) { + my $gpinyin_source_dir = $FindBin::Bin; + $at_at{'BINDIR'} = $gpinyin_source_dir; + $at_at{'G'} = ''; + $gpinyin_libdir = '@gpinyin_dir@'; +} else { + $at_at{'BINDIR'} = '@BINDIR@'; + $at_at{'G'} = '@g@'; + $gpinyin_libdir = '@gpinyin_dir@'; + unshift(@INC, $gpinyin_libdir); +} + +require 'subs.pl'; + + +######################################################################## +# options +######################################################################## + +foreach (@ARGV) { + if ( /^(-h|--h|--he|--hel|--help)$/ ) { + print q(Usage for the `gpinyin' program:); + print 'gpinyin [-] [--] [filespec...] normal file name arguments'; + print 'gpinyin [-h|--help] gives usage information'; + print 'gpinyin [-v|--version] displays the version number'; + print q(This program is a `groff' preprocessor that handles ) . + q(pinyin parts in `roff' files.); + exit; + } elsif (/^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/) { + print q(`gpinyin' version ) . $version; + exit; + } +} + + +######################################################################## +# input +######################################################################## + +my $pinyin_mode = 0; # not in Pinyin mode + +my @output_n = # nroff + ( + '.ie n \\{\\', + ); + +my @output_t = # troff + ( + '.el \\{\\', + ); + +foreach (<>) { # get line from input + chomp; + s/\s+$//; # remove final spaces +# &err('gpinyin: ' . $_); + + my $line = $_; # with starting blanks + + # .pinyin start or begin line + if ( $line =~ /^[.']\s*pinyin\s+(start|begin)$/ ) { + if ( $pinyin_mode ) { + # `.pinyin' was started twice, ignore + &err( q[`.pinyin' starter was run several times] ); + } else { # new pinyin start + $pinyin_mode = 1; + } + next; + } + + # .pinyin stop or end line + if ( $line =~ /^[.']\s*pinyin\s+(stop|end)$/ ) { + if ( $pinyin_mode ) { # normal stop + $pinyin_mode = 0; + &finish_pinyin_mode( \@output_n, \@output_t ); + } else { # ignore + &err( 'gpinyin: there was a .pinyin stop without ' . + 'being in pinyin mode' ); + } + next; + } + + # now not a .pinyin line + + + if ( $pinyin_mode ) { # within Pinyin + my $starting_blanks = ''; + $starting_blanks = $1 if ( s/^(s+)// ); # handle starting spaces + + my %outline = &handle_line($starting_blanks, $line); +#&err('gpinyin outline n: ' . $outline{'n'} ); +#&err('gpinyin outline t: ' . $outline{'t'} ); + push @output_n, $outline{'n'}; + push @output_t, $outline{'t'}; + } else { # normal roff line, not within Pinyin + print $line; + } + next; +} # end of input line + + +######################################################################## +# end of file without stopping `pinyin' mode +if ( $pinyin_mode ) { + &finish_pinyin_mode( \@output_n, \@output_t ); +} + +######################################################################## + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/gpinyin/Makefile.sub groff-1.22.3/contrib/gpinyin/Makefile.sub --- groff-1.22.2/contrib/gpinyin/Makefile.sub 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gpinyin/Makefile.sub 2014-11-04 09:38:35.462521034 +0100 @@ -0,0 +1,71 @@ +# Makefile.sub for `gpinyin' (preprocessor for added Perl parts) + +# File position: /contrib/gpinyin/Makefile.sub + +# Copyright (C) 2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `gpinyin' which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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=gpinyin.n + +MOSTLYCLEANADD=gpinyin $(MAN1) + +# not all make programs have $(RM) predefined. +RM=rm -f + +all: gpinyin + +gpinyin: gpinyin.pl + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ + -e "s|@gpinyin_dir@|$(DESTIR)$(gpinyin_dir)|" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e "$(SH_SCRIPT_SED_CMD)" \ + $(srcdir)/gpinyin.pl >$@; \ + chmod +x $@ + +.PHONY: install_data +install_data: gpinyin subs.pl + test -d $(DESTDIR)$(bindir) || \ + $(mkinstalldirs) $(DESTDIR)$(bindir); \ + $(RM) $(DESTDIR)$(bindir)/gpinyin; \ + $(INSTALL_SCRIPT) gpinyin $(DESTDIR)$(bindir)/gpinyin; \ + test -d $(DESTDIR)$(gpinyin_dir) || \ + $(mkinstalldirs) $(DESTDIR)$(gpinyin_dir); \ + $(RM) $(DESTDIR)$(gpinyin_dir)/subs.pl; \ + $(INSTALL_SCRIPT) $(srcdir)/subs.pl \ + $(DESTDIR)$(gpinyin_dir)/subs.pl + +.PHONY: uninstall_sub +uninstall_sub: + $(RM) $(DESTDIR)$(bindir)/gpinyin; \ + $(RM) $(DESTDIR)$(gpinyin_dir)/subs.pl; + -test -d $(DESTDIR)$(gpinyin_dir) && \ + rmdir $(DESTDIR)$(gpinyin_dir) + + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/gpinyin/subs.pl groff-1.22.3/contrib/gpinyin/subs.pl --- groff-1.22.2/contrib/gpinyin/subs.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/gpinyin/subs.pl 2014-11-04 09:38:35.462521034 +0100 @@ -0,0 +1,576 @@ +#! /usr/bin/env perl + +# gpinyin - European-like Chinese writing `pinyin' into `groff' + +# Source file position: /contrib/gpinyin/gpinyin.pl +# Installed position: /bin/gpinyin + +# Copyright (C) 2014 Free Software Foundation, Inc. + +# Written by Bernd Warken . + +# This file is part of `gpinyin', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 can find a copy of the GNU General Public License in the internet +# at . + +######################################################################## + +######################################################################## +# All Pinyin syllables from wikipedia +######################################################################## + +my %syllables = + ( + 'a' => 1, 'ai' => 1, 'an' => 1, 'ang' => 1, 'ao' => 1, + 'ba' => 1, 'bai' => 1, 'ban' => 1, 'bang' => 1, 'bao' => 1, + 'bei' => 1, 'ben' => 1, 'beng' => 1, + 'bi' => 1, 'bian' => 1, 'biao' => 1, 'bie' => 1, 'bin' => 1, + 'bing' => 1, 'bo' => 1, 'bu' => 1, + 'ca' => 1, 'cai' => 1, 'can' => 1, 'cang' => 1, 'cao' => 1, + 'ce' => 1, 'cen' => 1, 'ceng' => 1, + 'cha' => 1, 'chai' => 1, 'chan' => 1, 'chang' => 1, 'chao' => 1, + 'che' => 1, 'chen' => 1, 'cheng' => 1, 'chi' => 1, + 'chong' => 1, 'chou' => 1, 'chu' => 1, + 'chua' => 1, 'chuai' => 1, 'chuan' => 1, 'chuang' => 1, + 'chui' => 1, 'chun' => 1, 'chuo' => 1, + 'ci' => 1, 'cong' => 1, 'cou' => 1, + 'cu' => 1, 'cuan' => 1, 'cui' => 1, 'cun' => 1, 'cuo' => 1, + 'da' => 1, 'dai' => 1, 'dan' => 1, 'dang' => 1, 'dao' => 1, + 'de' => 1, 'dei' => 1, 'den' => 1, 'deng' => 1, + 'di' => 1, 'dian' => 1, 'diao' => 1, 'die' => 1, + 'ding' => 1, 'diu' => 1, 'dong' => 1, 'dou' => 1, + 'du' => 1, 'duan' => 1, 'dui' => 1, 'dun' => 1, 'duo' => 1, + 'e' => 1, 'ei' => 1, 'en' => 1, 'eng' => 1, 'er' => 1, + 'fa' => 1, 'fan' => 1, 'fang' => 1, + 'fei' => 1, 'fen' => 1, 'feng' => 1, 'fiao' => 1, + 'fo' => 1, 'fou' => 1, 'fu' => 1, + 'ga' => 1, 'gai' => 1, 'gan' => 1, 'gang' => 1, 'gao' => 1, + 'ge' => 1, 'gei' => 1, 'gen' => 1, 'geng' => 1, + 'gong' => 1, 'gou' => 1, 'gu' => 1, + 'gua' => 1, 'guai' => 1, 'guan' => 1, 'guang' => 1, 'gui' => 1, + 'gun' => 1, 'guo' => 1, + 'ha' => 1, 'hai' => 1, 'han' => 1, 'hang' => 1, 'hao' => 1, + 'he' => 1, 'hei' => 1, 'hen' => 1, 'heng' => 1, + 'hong' => 1, 'hou' => 1, + 'hu' => 1, 'hua' => 1, 'huai' => 1, 'huan' => 1, 'huang' => 1, + 'hui' => 1, 'hun' => 1, 'huo' => 1, + 'ji' => 1, 'jia' => 1, 'jian' => 1, 'jiang' => 1, 'jiao' => 1, + 'jie' => 1, 'jin' => 1, 'jing' => 1, 'jiong' => 1, 'jiu' => 1, + 'ju' => 1, 'juan' => 1, 'jue' => 1, 'jun' => 1, + 'ka' => 1, 'kai' => 1, 'kan' => 1, 'kang' => 1, 'kao' => 1, + 'ke' => 1, 'kei' => 1, 'ken' => 1, 'keng' => 1, + 'kong' => 1, 'kou' => 1, 'ku' => 1, 'kua' => 1, 'kuai' => 1, + 'kuan' => 1, 'kuang' => 1, 'kui' => 1, 'kun' => 1, 'kuo' => 1, + 'la' => 1, 'lai' => 1, 'lan' => 1, 'lang' => 1, 'lao' => 1, + 'le' => 1, 'lei' => 1, 'leng' => 1, + 'li' => 1, 'lia' => 1, 'lian' => 1, 'liang' => 1, 'liao' => 1, + 'lie' => 1, 'lin' => 1, 'ling' => 1, 'liu' => 1, + 'lo' => 1, 'long' => 1, 'lou' => 1, + 'lu' => 1, 'luan' => 1, 'lun' => 1, 'luo' => 1, + 'lü' => 1, 'lüe' => 1, + 'ma' => 1, 'mai' => 1, 'man' => 1, 'mang' => 1, 'mao' => 1, + 'me' => 1, 'mei' => 1, 'men' => 1, 'meng' => 1, + 'mi' => 1, 'mian' => 1, 'miao' => 1, 'mie' => 1, + 'min' => 1, 'ming' => 1, 'miu' => 1, + 'mo' => 1, 'mou' => 1, 'mu' => 1, + 'na' => 1, 'nai' => 1, 'nan' => 1, 'nang' => 1, 'nao' => 1, + 'ne' => 1, 'nei' => 1, 'nen' => 1, 'neng' => 1, + 'ni' => 1, 'nian' => 1, 'niang' => 1, 'niao' => 1, 'nie' => 1, + 'nin' => 1, 'ning' => 1, 'niu' => 1, 'nong' => 1, 'nou' => 1, + 'nu' => 1, 'nuan' => 1, 'nun' => 1, 'nuo' => 1, + 'nü' => 1, 'nüe' => 1, + 'o' => 1, 'ong' => 1, 'ou' => 1, + 'pa' => 1, 'pai' => 1, 'pan' => 1, 'pang' => 1, 'pao' => 1, + 'pei' => 1, 'pen' => 1, 'peng' => 1, + 'pi' => 1, 'pian' => 1, 'piao' => 1, 'pie' => 1, 'pin' => 1, + 'ping' => 1, 'po' => 1, 'pou' => 1, 'pu' => 1, + 'qi' => 1, 'qia' => 1, 'qian' => 1, 'qiang' => 1, 'qiao' => 1, 'qie' => 1, + 'qin' => 1, 'qing' => 1, 'qiong' => 1, 'qiu' => 1, + 'qu' => 1, 'quan' => 1, 'que' => 1, 'qun' => 1, + 'ran' => 1, 'rang' => 1, 'rao' => 1, 're' => 1, 'ren' => 1, + 'ri' => 1, 'rong' => 1, 'rou' => 1, + 'ru' => 1, 'ruan' => 1, 'rui' => 1, 'run' => 1, 'ruo' => 1, + 'sa' => 1, 'sai' => 1, 'san' => 1, 'sang' => 1, 'sao' => 1, + 'se' => 1, 'sen' => 1, 'seng' => 1, + 'sha' => 1, 'shai' => 1, 'shan' => 1, 'shang' => 1, 'shao' => 1, + 'she' => 1, 'shei' => 1, 'shen' => 1, 'sheng' => 1, 'shi' => 1, + 'shou' => 1, 'shu' => 1, 'shua' => 1, 'shuai' => 1, 'shuan' => 1, + 'shuang' => 1, 'shui' => 1, 'shun' => 1, 'shuo' => 1, + 'si' => 1, 'song' => 1, 'sou' => 1, 'su' => 1, 'suan' => 1, 'sui' => 1, + 'sun' => 1, 'suo' => 1, + 'ta' => 1, 'tai' => 1, 'tan' => 1, 'tang' => 1, 'tao' => 1, + 'te' => 1, 'teng' => 1, + 'ti' => 1, 'tian' => 1, 'tiao' => 1, 'tie' => 1, 'ting' => 1, + 'tong' => 1, 'tou' => 1, + 'tu' => 1, 'tuan' => 1, 'tui' => 1, 'tun' => 1, 'tuo' => 1, + 'wa' => 1, 'wai' => 1, 'wan' => 1, 'wang' => 1, + 'wei' => 1, 'wen' => 1, 'weng' => 1, 'wo' => 1, 'wu' => 1, + 'xi' => 1, 'xia' => 1, 'xian' => 1, 'xiang' => 1, 'xiao' => 1, + 'xie' => 1, 'xin' => 1, 'xing' => 1, 'xiong' => 1, 'xiu' => 1, + 'xu' => 1, 'xuan' => 1, 'xue' => 1, 'xun' => 1, + 'ya' => 1, 'yai' => 1, 'yan' => 1, 'yang' => 1, 'yao' => 1, + 'ye' => 1, 'yi' => 1, 'yin' => 1, 'ying' => 1, + 'yo' => 1, 'yong' => 1, 'you' => 1, + 'yu' => 1, 'yuan' => 1, 'yue' => 1, 'yun' => 1, + 'za' => 1, 'zai' => 1, 'zan' => 1, 'zang' => 1, 'zao' => 1, + 'ze' => 1, 'zei' => 1, 'zen' => 1, 'zeng' => 1, + 'zha' => 1, 'zhai' => 1, 'zhan' => 1, 'zhang' => 1, 'zhao' => 1, + 'zhe' => 1, 'zhei' => 1, 'zhen' => 1, 'zheng' => 1, 'zhi' => 1, + 'zhong' => 1, 'zhou' => 1, 'zhu' => 1, 'zhua' => 1, 'zhuai' => 1, + 'zhuan' => 1, 'zhuang' => 1, 'zhui' => 1, 'zhun' => 1, 'zhuo' => 1, + 'zi' => 1, 'zong' => 1, 'zou' => 1, 'zu' => 1, 'zuan' => 1, + 'zui' => 1, 'zun' => 1, 'zuo' => 1, + ); + +######################################################################## +# Unicode variables for utf8 tty (nroff) +######################################################################## + +my %tones1_Unicode = + ( + 'A' => q(\\[u0100]), + 'E' => q(\\[u0112]), + 'I' => q(\\[u012A]), + 'O' => q(\\[u014C]), + 'U' => q(\\[u016A]), + 'Ãœ' => q(\\[u016A]), + 'a' => q(\\[u0101]), + 'e' => q(\\[u0113]), + 'i' => q(\\[u012B]), + 'o' => q(\\[u014D]), + 'u' => q(\\[u016B]), + 'ü' => q(\\[u01D6]), + ); + +my %tones2_Unicode = + ( + 'A' => q(\\[u00C1]), + 'E' => q(\\[u00C9]), + 'I' => q(\\[u00CD]), + 'O' => q(\\[u00D3]), + 'U' => q(\\[u00DA]), + 'Ãœ' => q(\\[u01D7]), + 'a' => q(\\[u00E1]), + 'e' => q(\\[u00E9]), + 'i' => q(\\[u00ED]), + 'o' => q(\\[u00F3]), + 'u' => q(\\[u00FA]), + 'ü' => q(\\[u01D8]), + ); + +my %tones3_Unicode = + ( + 'A' => q(\\[u01CD]), + 'E' => q(\\[u011A]), + 'I' => q(\\[u01CF]), + 'O' => q(\\[u01D1]), + 'U' => q(\\[u01D3]), + 'Ãœ' => q(\\[u01D9]), + 'a' => q(\\[u01CE]), + 'e' => q(\\[u011B]), + 'i' => q(\\[u01D0]), + 'o' => q(\\[u01D2]), + 'u' => q(\\[u01D4]), + 'ü' => q(\\[u01DA]), + ); + +my %tones4_Unicode = + ( + 'A' => q(\\[u00C0]), + 'E' => q(\\[u00C8]), + 'I' => q(\\[u00CC]), + 'O' => q(\\[u00D2]), + 'U' => q(\\[u00D9]), + 'Ãœ' => q(\\[u01DB]), + 'a' => q(\\[u00E0]), + 'e' => q(\\[u00E8]), + 'i' => q(\\[u00EC]), + 'o' => q(\\[u00F2]), + 'u' => q(\\[u00F9]), + 'ü' => q(\\[u01DC]), + ); + + +######################################################################## +# glyph variables for troff +######################################################################## + +#my $tone1_macron = '\\[a-]'; +#my $tone2_acute = '\\[aa]'; +#my $tone3_caron = '\\[ah]'; +#my $tone4_grave = '\\[ga]'; +my @accents = ( '', '\\[a-]', '\\[aa]', '\\[ah]', '\\[ga]', ); + +my %tones2_glyphs = + ( + 'A' => q(\\['A]), + 'E' => q(\\['E]), + 'I' => q(\\['I]), + 'O' => q(\\['O]), + 'U' => q(\\['U]), + 'a' => q(\\['a]), + 'e' => q(\\['e]), + 'i' => q(\\['i]), + 'o' => q(\\['o]), + 'u' => q(\\['u]), + ); + +my %tones4_glyphs = + ( + 'A' => q(\\[`A]), + 'E' => q(\\[`E]), + 'I' => q(\\[`I]), + 'O' => q(\\[`O]), + 'U' => q(\\[`U]), + 'a' => q(\\[`a]), + 'e' => q(\\[`e]), + 'i' => q(\\[`i]), + 'o' => q(\\[`o]), + 'u' => q(\\[`u]), + ); + + + +######################################################################## +# subs +######################################################################## + +# Pinyin consists of syllables with a final number to be translated +# into an accent. Such numbered syllables are combined into words. +# Such words can have a final punctuation. A line is a collection of +# such words. + +my @roffs = ( 'n', + 't', + ); + +######################################################################## +sub err { + my $s = shift; + print STDERR $s; + 1; +} # err() + + +######################################################################## +sub handle_line { + my $starting_blanks = shift; + my $line = shift; + +#&err('handle_line start: ' . $line); + + my %outline = ( 'n' => $starting_blanks, 't' => $starting_blanks, ); + + # transform to Ãœ only for inside of Perl + $line =~ s/\\ + \(:U + /Ãœ/gx; + $line =~ s/\\ + \[:U\] + /Ãœ/gx; + +# handle_line() + + # transform to ü only for inside of Perl + $line =~ s/\\ + \(:u + /ü/gx; + $line =~ s/\\ + \[:u\] + /ü/gx; + + $line =~ s/U[eE]/Ãœ/g; + $line =~ s/u[eE]/ü/g; + + $line =~ s/\\\(aq/'/g; # \(aq is an apostrophe + $line =~ s/\\\[aq\]/'/g; # \[aq] is an apostrophe + $line =~ s/^[']//; # remove leading apostrophe + $line =~ s/[']$//; # remove final apostrophe + $line =~ s/['][']+/'/g; # combine apostrophe groups + $line =~ s/([0-4])'/$1/; + $line =~ s/([^0-4])'/${1}0/; + + my @words = split /\s+/, $line; + + +# handle_line() + for my $word ( @words ) { +#&err('handle_line word: ' . $word); + + next unless ( $word ); + + # this is a word, maybe composed of several syllables + my $punctuation = $1 if ( $word =~ s/([,.?!:;]*)$// ); + # `$word' is now without punctuation + + my %outword = &handle_word($word); + next unless ( %outword ); + + for my $roff ( @roffs ) { +#&err('handle_line roff ' . $roff . ': ' . $outword{$roff}); + + # combine words to line + next unless ( $outword{$roff} ); + + # non-initial space + $outline{$roff} .= ' ' if ( $outline{$roff} ); + + $outline{$roff} .= $outword{$roff}; + $outline{$roff} .= $punctuation; + } + } +#for my $roff ( @roffs ) { +#&err('handle_line end ' . $roff . ': ' . $outline{$roff}); +#} + return %outline; +} # handle_line() + + +######################################################################## +sub handle_word { + my $word = shift; +#&err('handle_word start: ' . $word); + + $word =~ s/5/0/g; # transform 5 to 0 + $word =~ s/([^0-4])$/${1}0/; # add lacking final no-tone + + # remove apostrophes with tone + $word =~ s/ + ([0-4]) + ['] + /$1/gx; + # replace apostrophes without tone by 0 + $word =~ s/ + ([^0-4]) + ['] + /${1}0/gx; + +# handle_word() + # detect wrong tone numbers + if ( $word =~ s/[5-9]/0/g ) { + &err('word ' . $word . ': wrong tone number ' . $1); + return {}; + } + + $word =~ s/[']//g; # remove apostrophes + + # remove starting apostrophe or number + $word =~ s/^(['0-4])+//; + + # add 0 for final no-tone + $word .= '0' if ( $word =~ /[^0-4]$/ ); + + if ( $word =~ /^[0-9]/ ) { # word starts with number + print 'word: ' . $word . ' starts with tone number'; + $word =~ s/^[0-9]+//; + } +#&err('handle_word 0: ' . $word); + +# handle_word() + + my %outword = ( 'n' => '', 't' => '', ); + + # split word into syllables + while ( $word =~ /^[a-zA-ZüÜ']/ ) { + $word =~ s/^([a-zA-ZüÜ']+)([0-4])//; + my $syll = $1; + my $tone = $2; +#err('handle_word split: ' . $syll . ' ' . $tone); + my %outsyll = &handle_syll( $syll, $tone ); + next unless ( %outsyll ); + for my $roff ( @roffs ) { + my $out = $outsyll{$roff}; + $out = '\\[aq]' . $out if ( $out && $out =~ /^[aeo]/ ); + $outword{$roff} .= $out; +#&err('handle_word ' . $roff . ': ' . $outword{$roff}); + } + } + return %outword; +} # handle_word() + + +######################################################################## +sub handle_syll { + my $syll = shift; + my $tone = shift; +#&err( 'handle_syll start: ' . $syll . ' ' . $tone); + + my $lower_case = lc($syll); + $lower_case =~ s/Ãœ/ü/g; + unless ( exists($syllables{$lower_case}) ) { + err('The syllable ' . $syll . ' is not a Chinese syllable.'); + return {}; + } + + my %outsyll = ( 'n' => '', 't' => '', ); + + if ( $tone == 0 ) { # no accent + # use u umlaut without accent + $syll =~ s/Ãœ/\\[:U]/g; + $syll =~ s/ü/\\[:u]/g; + + for my $roff ( @roffs ) { + $outsyll{$roff} = $syll; +#&err('handle_syll 0 outsyll ' . $roff . ': ' . $outsyll{$roff}); + } + return %outsyll; + } # end of tone 0 + +# handle_syll() + + # split syllable + $syll =~ + /^ + ([a-zA-Z]*) + ([aeiouAEIOUüÜ]+) + ([a-zA-Z]*) + $/x; + my $initial = $1; + my $vowels = $2; + my $final = $3; + unless ( $vowels ) { + &err( 'Syllable ' . $syll . ' does not have vowels' ); + return {}; + } + + # split vowels + my $vowels_before = ''; + my $vowel = ''; + my $vowels_after = ''; + +# handle_syll() + + # find vowel for accent + if ( $vowels =~ /^[aeiouAEIOU]$/ ) { # only 1 vowel +#&err('handle_syll single vowel ' . $vowels); + $vowel = $vowels; + } elsif ( $vowels eq 'ü' ) { + $vowel = $vowels; + } elsif ( $vowels eq 'Ãœ' ) { + $vowel = $vowels; + } elsif ( $vowels =~ /^([^aeAE]*)([aeAE])(.*)$/ ) { # a, A, e or E + $vowels_before = $1; + $vowel = $2; + $vowels_after = $3; + } elsif ( $vowels =~ /^([^oO]*)(oO)(.*)$/ ) { # o or O + $vowels_before = $1; + $vowel = $2; + $vowels_after = $3; + } elsif ( $vowels =~ /^(\w)(\w)(.*)$/ ) { # take 2nd vowel + $vowels_before = $1; + $vowel = $2; + $vowels_after = $3; + } else { + &err( 'Unknown vowels: ' . $vowels . ' in syllable: ' . $syll ); + return {}; + } + +# unless ( $vowel =~ /^[aeiouAEIOU]$/ ) { +# print STDERR q(The argument `) . $vowel . q(' is not a vowel!); +# return {}; +# } + +# handle_syll() + + $outsyll{'n'} = &vowel_n($vowel, $tone); + $outsyll{'t'} = &vowel_t($vowel, $tone); + + for my $roff ( @roffs ) { + $outsyll{$roff} = $initial . $vowels_before . + $outsyll{$roff} . $vowels_after . $final; +#&err('handle_syll out ' . $roff . ': ' . $outsyll{$roff}); + } + + return %outsyll; +} # handle_syll() + + +######################################################################## +sub vowel_n { # Unicode for nroff + my $vowel = shift; + my $tone = shift; +#&err('vowel_n: ' . $vowel . ' ' . $tone); + + return '' unless ( $vowel ); + + if ( $tone == 1 ) { # macron + $vowel = $tones1_Unicode{$vowel}; + } elsif ( $tone == 2 ) { # acute + $vowel = $tones2_Unicode{$vowel}; + } elsif ( $tone == 3 ) { # caron + $vowel = $tones3_Unicode{$vowel}; + } elsif ( $tone == 4 ) { # grave + $vowel = $tones4_Unicode{$vowel}; + } + return $vowel; +} # vowel_nr() + + +######################################################################## +sub vowel_t { # named glyphs for troff + my $vowel = shift; + my $tone = shift; +#&err( 'vowel_t: ' . $vowel . ' ' . $tone); + + return '' unless ( $vowel ); + + # \o'\s-2\[:u]\s0\[a-]' + if ( $vowel =~ /[üÜ]/ ) { + my $smaller = 2; + $vowel = q(\\o'\\s-) . $smaller . q(\\[:u]\\s0) . + $accents[$tone] . q('); + return $vowel; + } + + $vowel = q(\\[.i]) if ( $vowel eq 'i' ); + + if ( $tone == 1 ) { # macron + $vowel = q(\\o') . $vowel . $accents[$tone] . q('); + } elsif ( $tone == 2 ) { # acute + $vowel = $tones2_glyphs{$vowel}; + } elsif ( $tone == 3 ) { # caron + $vowel = q(\\o') . $vowel . $accents[$tone] . q('); + } elsif ( $tone == 4 ) { # grave + $vowel = $tones4_glyphs{$vowel}; + } + return $vowel; +} # vowel_t() + + +######################################################################## +sub finish_pinyin_mode { +#&err( 'finish' ); + my $n = shift; + my $t = shift; + push @$n, '\\}'; + push @$t, '\\}'; + + for ( @$n ) { # Unicode for nroff + print; + } + + for ( @$t ) { # glyphs for troff + print; + } + + 1; +} # finish_pinyin_mode() + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/grap2graph/grap2graph.man groff-1.22.3/contrib/grap2graph/grap2graph.man --- groff-1.22.2/contrib/grap2graph/grap2graph.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/grap2graph/grap2graph.man 2014-11-04 09:38:35.466520984 +0100 @@ -1,81 +1,103 @@ -.\" $Id: grap2graph.man,v 1.3 2003/10/28 07:46:23 wlemb Exp $ -.\" This documentation is released to the public domain. -. -. .TH GRAP2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.IX grap2graph .SH NAME grap2graph \- convert a grap diagram into a cropped bitmap image . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B grap2graph [ .B \-unsafe ] [ -.BI \-resolution\ M\fR|\fPMxN +.BI \-resolution\ M\fR\^|\^\fPMxN ] [ .BI \-format\ fmt ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. Reads a grap program as input; produces an image file (by default in Portable Network Graphics format) suitable for the Web as output. +. For a description of the grap language, see .BR grap (1). +. +. .P Your graph specification should \fInot\fR be wrapped with the \&.G1 and \&.G2 macros that normally guard it within .BR groff (@MAN1EXT@) macros. +. +. .P The output image will be a black-on-white graphic clipped to the smallest possible bounding box that contains all the black pixels. -By specifying command-line options to be passed to +. +By specifying command-line options to be passed to .BR convert (1) you can give it a border, set the background transparent, set the image's pixel density, or perform other useful transformations. +. +. .P -This program uses +This program uses .BR grap (1), .BR @g@pic (@MAN1EXT@), .BR groff (@MAN1EXT@), -and the ImageMagick +and the ImageMagick .BR convert (1) program. +. These programs must be installed on your system and accessible on your $PATH for \fBgrap2graph\fR to work. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .B \-unsafe -Run +Run .BR @g@pic (@MAN1EXT@) and .BR groff (@MAN1EXT@) in the `unsafe' mode enabling the PIC macro .B sh to execute arbitrary commands. +. The default is to forbid this. +. .TP .BI \-format\ fmt Specify an output format; the default is PNG (Portable Network Graphics). +. Any format that .BR convert (1) can emit is supported. +. +. .PP Command-line switches and arguments not listed above are passed to .BR convert (1). . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .B GROFF_TMPDIR The directory in which temporary files will be created. +. If this is not set .B grap2graph searches the environment variables @@ -84,11 +106,16 @@ and .B TEMP (in that order). +. Otherwise, temporary files will be created in .BR /tmp . . . +.\" -------------------------------------------------------------------- +.na .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR pic2graph (@MAN1EXT@), .BR eqn2graph (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), @@ -97,8 +124,21 @@ .BR convert (1). . . -.SH AUTHOR -Eric S. Raymond +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +. +This documentation is released to the public domain. +. +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +. +This document was written by +.MT esr@thyrsus.com +Eric S.\& Raymond +.ME . +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/contrib/grap2graph/grap2graph.sh groff-1.22.3/contrib/grap2graph/grap2graph.sh --- groff-1.22.2/contrib/grap2graph/grap2graph.sh 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/grap2graph/grap2graph.sh 2014-11-04 09:38:35.466520984 +0100 @@ -28,8 +28,6 @@ # # Thus, we pass -U to groff(1), and everything else to convert(1). # -# $Id: grap2graph.sh,v 1.5 2010/02/25 20:17:13 wl Exp $ -# groff_opts="" convert_opts="" format="png" diff -ruN groff-1.22.2/contrib/grap2graph/Makefile.sub groff-1.22.3/contrib/grap2graph/Makefile.sub --- groff-1.22.2/contrib/grap2graph/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/grap2graph/Makefile.sub 2014-11-04 09:38:35.466520984 +0100 @@ -1,18 +1,17 @@ -# Copyright (C) 2003, 2006, 2009 -# Free Software Foundation, Inc. -# +# Copyright (C) 2003-2014 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 . # @@ -20,20 +19,28 @@ # MAN1=grap2graph.n MOSTLYCLEANADD=grap2graph +RM=rm -f all: grap2graph grap2graph: grap2graph.sh - rm -f $@; \ sed -e "s|@g@|$(g)|g" \ -e "s|@VERSION@|$(version)$(revision)|" \ - -e $(SH_SCRIPT_SED_CMD) $(srcdir)/grap2graph.sh >$@; \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/grap2graph.sh >$@ chmod +x $@ install_data: grap2graph -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/grap2graph + $(RM) $(DESTDIR)$(bindir)/grap2graph $(INSTALL_SCRIPT) grap2graph $(DESTDIR)$(bindir)/grap2graph uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/grap2graph + $(RM) $(DESTDIR)$(bindir)/grap2graph + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/groffer/ChangeLog groff-1.22.3/contrib/groffer/ChangeLog --- groff-1.22.2/contrib/groffer/ChangeLog 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/groffer/ChangeLog 2014-11-04 09:38:35.477520847 +0100 @@ -1,3 +1,218 @@ +2014-11-04 Werner LEMBERG + + * version.sh (_GROFF_VERSION_PRESET): Set to 1.22.3. + +2014-09-03 Bernd Warken + + * version.sh: Version 2.2.5 + + * all groffer files: Copying and Emacs setup. + +2014-08-02 Bernd Warken + + * version.sh: Version 2.2.4 + + * groffer.pl: Change default `tty' to `utf8'. + +2014-08-02 Bernd Warken + + Version 2.2.3 + +2014-07-06 Bernd Warken + + * subs.pl: Correct call for `grog'. + +2014-07-06 Bernd Warken + + * groffer.man, roff2.man: Make compatible with `doclifter'. + +2014-07-05 Bernd Warken + + * main_subs.pl: Add newer `groff' options `j' and `J'. + +2014-07-04 Bernd Warken + + * groffer.man, roff2.man: Transform to classical man-page style. + +2014-07-04 Bernd Warken + + * version.sh: New version 2.2.2 + + * groffer.man: Rename `.Env_var' to `.Small_CB'. + +2014-07-03 Bernd Warken + + * roff2.man: Move `.TH', etc. to the beginning of the file. + + * groffer.man: Improve definition of char `Ellipsis'. + +2014-07-03 Bernd Warken + + * groffer.tmac: Remove this file. + + * Makefile.sub: Remove parts related to `groffer.tmac'. + + * groffer.man: Instead of `.mso' for `groffer.tmac' copy former + `groffer.tmac' at the head of the man-page. + +2014-06-18 Bernd Warken + + * Makefile.sub: Let `groffer.tmac' be removed in uninstalling + `tmacdir'. + + * groffer.man: Use `.mso' for `groffer.tmac'. Remove definitions + for macros, etc. + +2014-06-18 Bernd Warken + + * version.sh: New version 2.2.1. + + * groffer.tmac: Collection of strings and macros for `groffer.man' + and other man-pages. + + * Makefile.sub: Add `groffer.tmac'. + +2014-06-18 Bernd Warken + + * version.sh: Upgrade to version 2.1.3. + + * perl_test.pl: Remove this file. + + * Makefile.sub: Remove HAS_PERL. + + * groffer.pl: Add `require' for Perl version. + +2014-06-11 Bernd Warken + + * func.pl, subs.pl: Rename `func.pl' to `subs.pl'. + + * groffer.pl, main_subs.pl: Move all subs in `groffer.pl' to + `main_subs.pl'. + + * version.sh: Upgrade to version 2.1.2. + +2014-06-01 Bernd Warken + + * groffer.pl: Fix ligature error `fi', etc. in pdf-mode by + appending `-P-y -PU' to `grog' call. pfd2-mode works, but still + has the ligature error. + + * func.pl: Reorder. + + * version.sh: Upgrade to version 2.1.1. + +2014-06-01 Deri James + + * Proposal to use `-P-y -PU' arguments for `groff' in `-Tpdf'. + +2014-05-31 Bernd Warken + + * groffer.pl, func.pl, groffer.man: Change all existing viewer + options into a single one `--viewer'. + + * version.sh: Upgrade to version 2.1.0. + +2014-03-30 Steffen Nurpmeso + + * Makefile.sub: Put straight error-prevention prefixes for `rm'. + +2014-03-30 Steffen Nurpmeso + + * Makefile.sub (uninstall_sub): Typo. + +2014-03-27 Werner LEMBERG + + Fix `make install'. + + * Makefile.sub (GROFFER_PERL, GROFFER_REST): Don't use $(srcdir). + +2014-03-11 Ingo Schwarze (tiny change) + + * Makefile.sub (clean): Don't remove checked-in file `groffer.man'. + + This got broken in fabbbb0e335801bc20f5c25fb0c448e23673721d when + `groffer.man' was moved from the former `perl' subdir and the cp(1) + call was removed that used to copy it around. + +2014-02-26 Bernd Warken + + * Makefile.sub: fix + +2014-02-26 Bernd Warken + + * groffer.pl: Fix modes pdf and pdf2. + +2014-02-25 Bernd Warken + + * groffer.pl: fix source location, when run before `make' + +2014-02-25 Bernd Warken + + * groffer.man: replace .copyleft by .co + +2014-02-25 Bernd Warken + + * all former Perl files: Correct source file position. + +2014-02-25 Bernd Warken + + * all: Add links for license text. + +2014-02-25 Bernd Warken + + * version.sh: new version groffer 2.0.2 + * perl/: Move all files to top directory and remove this + directory. + * Makefile.sub: Handle the deletion of perl/. + * groffer.pl: Rename traditional pdf mode with ps2pdf into pdf2. + Create a new mode pdf using groff -Tpdf. New options: --pdf2, + --mode=pdf2. + * groffer.man: Document the renamed and new options. + * README, README_PERL: rewrite + +2013-12-23 Bernd Warken + + New version groffer-2.0.1 + - with Perl + - without Shell version + + Remove + * shell/ChangeLog.0 + * shell/README_SH + * shell/groffer.man + * shell/groffer.sh + * shell/groffer2.sh + * shell/roff2.sh + * shell/ + + * README: remove hints to the shell version + * Makefile.sub: remove hints to the shell version + * version.sh: change version number to `2.0.1' + * .cvsignore, .gitignore: rename `.cvsignore' to `.gitignore' + +2013-12-22 Bernd Warken + + * git@github.com:RUNOFF/groffer.git: remove this archive + +2013-04-11 Bernd Warken + + * contrib/groffer: There is now a free `git' package containing + all old `groffer' versions `v0.*' and `v1.*'. The new versions + `groffer 2.*' will actually not be included. This package can be + got at: + + $ git clone git@github.com:RUNOFF/groffer.git + +2013-03-29 Bernd Warken + + * perl/groffer.pl: Change viewers for `PS'. + +2013-03-29 Bernd Warken + + * perl/groffer.pl: Change viewers for `PS' and `PDF'. + + * version.sh: New version is `1.1.3'. + 2012-08-09 Werner LEMBERG Synchronize man pages. @@ -6,8 +221,8 @@ 2012-08-07 Eric S. Raymond - Yet more elimination of low-level troff hackery in the documentation - so it can be lifted to structural markup. + Yet more elimination of low-level troff hackery in the + documentation so it can be lifted to structural markup. * perl/groffer.man: Use .IP rather than .TP in .Topic; this make structural parsing work. Also remove a @@ -25,13 +240,13 @@ it's just copying files around locally, within in the build directories. -2011-03-21 Jan Vcelak +2011-03-21 Jan Vcelak Bernd Warken Remove hardcoded path to 'libdir/groff/groffer' directory. - + * Makefile.sub: use @groffer_dir@ - + * groffer.pl: use @groffer_dir@ 2011-01-27 James Budiono @@ -46,7 +261,7 @@ (Viewer_X): Add `okular' viewer. * perl/man.pl (manpath_set_from_path): Handle `@main::Path)' correctly. - + * version.sh: Updated. 2009-01-03 Werner LEMBERG @@ -90,18 +305,18 @@ Don't call `chmod' for $(ROFF2PROGS). (roff2.man): Typographical fixes. -2006-11-11 Bernd Warken - ________________________________________________________________ - * release of groffer 1.1.1 +2006-11-11 Bernd Warken + ________________________________________________________________ + * release of groffer 1.1.1 * perl/roff2.pl, shell/roff2.sh: Create a new working mode without `groffer' for `roff2*'. * perl/groffer.pl: Fix test of temporary directory. -2006-11-09 Bernd Warken - ________________________________________________________________ - * release of groffer 1.1.0 +2006-11-09 Bernd Warken + ________________________________________________________________ + * release of groffer 1.1.0 * perl/groffer.pl, perl/func.pl, perl/groffer.man, \ shell/groffer2.sh, shell/groffer.man: Add `--debug-grog' to @@ -115,9 +330,9 @@ * Makefile.sub: Add roff2* and some minor fixes. -2006-11-04 Bernd Warken - ________________________________________________________________ - * release of groffer 1.0.3 +2006-11-04 Bernd Warken + ________________________________________________________________ + * release of groffer 1.0.3 * Makefile.sub: - Delete removing of $(CLEANADD) in `groffer'. @@ -127,9 +342,9 @@ - Add `groff' option with argument `-K'. - Redesign the changed `grog'. -2006-10-23 Bernd Warken - ________________________________________________________________ - * release of groffer 1.0.2 +2006-10-23 Bernd Warken + ________________________________________________________________ + * release of groffer 1.0.2 * perl/groffer.pl: - Move all variable declarations out of BEGIN. @@ -162,29 +377,29 @@ 2006-10-23 Werner Lemberg - * perl_test.pl: Moved to... - * perl/perl_test.pl: Here. + * perl_test.pl: Moved to... + * perl/perl_test.pl: Here. - * Makefile.sub: Rewritten. Change PERL to HAVE_PERL and SHELL to + * Makefile.sub: Rewritten. Change PERL to HAVE_PERL and SHELL to HAVE_SHELL. -2006-10-14 Bernd Warken - ________________________________________________________________ - * release of groffer 1.0.1 +2006-10-14 Bernd Warken + ________________________________________________________________ + * release of groffer 1.0.1 * perl/groffer.pl: Change $perl_test_pl to $file_perl_test_pl. * perl/groffer.pl, perl/func.pl: Remove `\n' in `die' calls. -2006-10-12 Bernd Warken - ________________________________________________________________ - * release of groffer 1.0.0 +2006-10-12 Bernd Warken + ________________________________________________________________ + * release of groffer 1.0.0 Changements of the shell version since 0.9.31 * shell/groffer.sh: Use version.sh in the upper directory. -2006-10-02 Bernd Warken +2006-10-02 Bernd Warken The groffer versions 1.* have two kinds of program, a shell version and a Perl version. @@ -204,8 +419,8 @@ * ChangeLog: This file. It contains information for `groffer' versions >= 1.0.0 with shell and Perl kinds. For older `groffer' - versions, see `shell/ChangeLog.0' which contains information for the - shell only versions of groffer 0.*. + versions, see `shell/ChangeLog.0' which contains information for + the shell only versions of groffer 0.*. * Makefile.sub: The old `Makefile.sub' was extended to support the shell and the Perl version of `groffer' at the same time. If the @@ -273,23 +488,23 @@ The former part of the ChangeLog file is in `shell/ChangeLog.0'. -2006-10-01 Bernd Warken - ________________________________________________________________ - License +2006-10-01 Bernd Warken +________________________________________________________________ +License - Copyright (C) 2006-2009, 2011 +Copyright (C) 2006-2009, 2011-2014 Free Software Foundation, Inc. - Written by Bernd Warken . +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. +Copying and distribution of this file, with or without +modification, are permitted provided the copyright notice and this +notice are preserved. - This file is part of `groffer', which is part of the `groff' - project. +This file is part of `groffer', which is part of the `groff' +project. - ####### Emacs settings +####### Emacs settings - Local Variables: - mode: change-log - End: +Local Variables: +mode: change-log +End: diff -ruN groff-1.22.2/contrib/groffer/groffer.man groff-1.22.3/contrib/groffer/groffer.man --- groff-1.22.2/contrib/groffer/groffer.man 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/groffer.man 2014-11-04 09:38:35.477520847 +0100 @@ -0,0 +1,3910 @@ +.TH GROFFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groffer \- display groff files and man\~pages on X and tty +. +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2001-2014 Free Software Foundation, Inc. + +This file is part of groffer, which is part of groff, a free software +project. + +You can redistribute it and/or modify it under the terms of the GNU +General Public License version 2 as published by the Free Software +Foundation. + +The license text is available in the internet at +.UR http://www.gnu.org/licenses/gpl-2.0.html +.UE . +.. +. +.de au +This file was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . +.. +. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- +. +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL +. +.\" Bullet +.ie t .ds BU \[bu] +.el .ds BU * +.\" used in `.IP \*(BU 2m' (former .Topic) +. +. +.\" -------------------------------------------------------------------- +.SH "SYNOPSIS" +.\" -------------------------------------------------------------------- +. +.SY groffer +.OP \-\- +.OP \%filespec \*(EL +.YS +. +.SY groffer +.OP mode-option \*(EL +.OP groff-options \*(EL +.OP man-options \*(EL +.OP X-options \*(EL +.OP \-\- +.OP \%filespec \*(EL +.YS +. +.SY groffer +.BR \-h " | " \-\-help +.YS +. +.SY groffer +.BR \-v " | " \-\-version +.YS +. +. +.\" -------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program is the easiest way to use +.BR \%groff (@MAN1EXT@). +It can display arbitrary documents written in the +.I \%groff +language, see +.BR \%groff (@MAN7EXT@), +or other +.I \%roff +languages, see +.BR \%roff (@MAN7EXT@), +that are compatible to the original +.I \%troff +language. +. +It finds and runs all necessary +.I groff +preprocessors, such as +.BR @g@chem . +. +. +.P +The +.B \%groffer +program also includes many of the features for finding and displaying +the \%\f[CR]Unix\f[] manual pages +.nh +.RI ( man\~pages ), +.hy +such that it can be used as a replacement for a +.BR \%man (1) +program. +. +Moreover, compressed files that can be handled by +.BR \%gzip (1) +or +.BR \%bzip2 (1) +are decompressed on-the-fly. +. +. +.P +The normal usage is quite simple by supplying a file name or name of a +.I \%man\~page +without further options. +. +But the option handling has many possibilities for creating special +behaviors. +. +This can be done either in configuration files, with the shell +environment variable +.SM +.BR \%$GROFFER_OPT , +or on the command line. +. +. +.P +The output can be generated and viewed in several different ways +available for +.IR \%groff . +. +This includes the +.I \%groff +native \%\f[CR]X\~Window\f[] viewer +.BR \%gxditview (@MAN1EXT@), +each +.IR \%Postcript , +.IR \%pdf , +or +.I \%dvi +display program, a web browser by generating +.I \%html +in +.IR \%www\~mode , +or several +.I \%text\~modes +in text terminals. +. +. +.P +Most of the options that must be named when running +.B \%groff +directly are determined automatically for +.BR \%groffer , +due to the internal usage of the +.BR \%grog (@MAN1EXT@) +program. +. +But all parts can also be controlled manually by arguments. +. +. +.P +Several file names can be specified on the command line arguments. +. +They are transformed into a single document in the normal way of +.BR \%groff . +. +. +.P +Option handling is done in \f[CR]GNU\f[] style. +. +Options and file names can be mixed freely. +. +The option +.RB ` \-\- ' +closes the option handling, all following arguments are treated as +file names. +. +Long options can be abbreviated in several ways. +. +. +.\" -------------------------------------------------------------------- +.SH "OPTION OVERVIEW" +.\" -------------------------------------------------------------------- +. +.TP +.I breaking options +.RS +.P +.SY +.OP \-h\~\fR|\fB\~\-\-help +.OP \-v\~\fR|\fB\~\-\-version +.YS +.RE +. +. +.TP +.I \%groffer mode options +.RS +.P +.SY +.OP \-\-auto +.OP \-\-default +.OP \-\-default\-modes mode1,mode2,\*(EL +.OP \-\-dvi +.OP \-\-groff +.OP \-\-html +.OP \-\-latin1 +.OP \-\-mode display_mode +.OP \-\-pdf +.OP \-\-pdf2 +.OP \-\-ps +.OP \-\-source +.OP \-\-text +.OP \-\-to\-stdout +.OP \-\-tty +.OP \-\-utf8 +.OP \-\-viewer prog +.OP \-\-www +.OP \-\-x\~\fR|\fB\~\-\-X +.YS +.RE +. +. +.ig +Replace these options by --viewer +.OP \-\-dvi\-viewer prog +.OP \-\-html\-viewer prog +.OP \-\-pdf\-viewer prog +.OP \-\-ps\-viewer prog +.OP \-\-tty\-viewer prog +.OP \-\-www\-viewer prog +.OP \-\-x\-viewer\~\fR|\fB\~\-\-X\-viewer prog +.. +. +. +.TP +.I options related to \%groff +.RS +.P +.SY +.OP \-T\~\fR|\fB\~\-\-device device +.OP \-Z\~\fR|\fB\~\-\-intermediate\-output\~\fR|\fB\~\-\-ditroff +.YS +.P +All further +.B \%groff +short options are accepted. +.RE +. +. +.TP +.I options for man\~pages +.RS +.P +.SY +.OP \-\-apropos +.OP \-\-apropos\-data +.OP \-\-apropos\-devel +.OP \-\-apropos\-progs +.OP \-\-man +.OP \-\-no\-man +.OP \-\-no\-special +.OP \-\-whatis +.YS +.RE +. +. +.TP +.I long options taken over from GNU man +.RS +.P +.SY +.OP \-\-all +.OP \-\-ascii +.OP \-\-ditroff +.OP \-\-extension suffix +.OP \-\-locale language +.OP \-\-local\-file +.OP \-\-location\~\fR|\fB\~\-\-where +.OP \-\-manpath dir1:dir2:\*(EL +.OP \-\-no\-location +.OP \-\-pager program +.OP \-\-sections sec1:sec2:\*(EL +.OP \-\-systems sys1,sys2,\*(EL +.OP \-\-troff\-device device +.YS +.P +Further long options of \f[CR]GNU\f[] +.B man +are accepted as well. +.RE +. +. +.TP +.I X Window Toolkit options +.RS +.P +.SY +.OP \-\-bd\~\fR|\fB\~\-\-bordercolor pixels +.OP \-\-bg\~\fR|\fB\~\-\-background color +.OP \-\-bw\~\fR|\fB\~\-\-borderwidth pixels +.OP \-\-display X-display +.OP \-\-fg\~\fR|\fB\~\-\-foreground color +.OP \-\-fn\~\fR|\fB\~\-\-ft\~\fR|\fB\~\-\-font font_name +.OP \-\-geometry size_pos +.OP \-\-resolution value +.OP \-\-rv +.OP \-\-title string +.OP \-\-xrm X\-resource +.YS +.RE +. +. +.TP +.I options for development +.RS +.P +.SY +.OP \-\-debug +.OP \-\-debug\-filenames +.OP \-\-debug\-grog +.OP \-\-debug\-keep +.OP \-\-debug\-params +.OP \-\-debug\-tmpdir +.OP \-\-do\-nothing +.OP \-\-print text +.OP \-V +.YS +.RE +. +. +.TP +.I \%filespec arguments +.RS +.P +The +.I \%filespec +parameters are all arguments that are neither an option nor an option +argument. +. +They usually mean a file name or a +.I man page +searching scheme. +. +. +.P +In the following, the term +.I section_extension +is used. +. +It means a word that consists of a +.I man section +that is optionally followed by an +.IR extension . +. +The name of a +.I man section +is a single character from +.BR \%[1\[en]9on] , +the +.I extension +is some word. +. +The +.I extension +is mostly lacking. +. +. +.P +No +.I \%filespec +parameters means standard input. +. +. +.TP 10m +.B \- +stands for standard input (can occur several times). +. +. +.TP +.I filename +the path name of an existing file. +. +. +.TP +.BI man: name ( section_extension ) +.TQ +.BI man: name . section_extension +.TQ +.IB name ( section_extension ) +.TQ +.IB name . section_extension +.TQ +.I "section_extension name" +search the \%man\~page +.I \%name +in the section with optional extension +.IR section_extension . +. +. +.TP +.BI man: name +\%man\~page in the lowest +.I \%man\~section +that has +.IR \%name . +. +. +.TP +.I name +if +.I \%name +is not an existing file search for the man\~page +.I \%name +in the lowest man\~section. +. +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "OPTION DETAILS" +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program can usually be run with very few options. +. +But for special purposes, it supports many options. +. +These can be classified in 5 option classes. +. +. +.P +All short options of +.B \%groffer +are compatible with the short options of +.BR \%groff (@MAN1EXT@). +. +All long options of +.B \%groffer +are compatible with the long options of +.BR \%man (1). +. +. +.P +Arguments for long option names can be abbreviated in several ways. +. +First, the argument is checked whether it can be prolonged as is. +. +Furthermore, each minus sign +.B \- +is considered as a starting point for a new abbreviation. +. +This leads to a set of multiple abbreviations for a single argument. +. +For example, +.B \-\-de\-n\-f +can be used as an abbreviation for +.BR \-\-debug\-not\-func , +but +.B \-\-de\-n +works as well. +. +If the abbreviation of the argument leads to several resulting options +an error is raised. +. +. +.P +These abbreviations are only allowed in the environment variable +.SM +.BR \%$GROFFER_OPT , +but not in the configuration files. +. +In configuration, all long options must be exact. +. +. +.\" -------------------------------------------------------------------- +.SS "groffer breaking Options" +.\" -------------------------------------------------------------------- +. +As soon as one of these options is found on the command line it is +executed, printed to standard output, and the running +.B \%groffer +is terminated thereafter. +. +All other arguments are ignored. +. +. +.TP +.B \-h\~\fR|\fB\~\-\-help +Print help information with a short explanation of options to +standard output. +. +. +.TP +.B \-v\~\fR|\fB\~\-\-version +Print version information to standard output. +. +. +.\" -------------------------------------------------------------------- +.SS "groffer Mode Options" +.\" -------------------------------------------------------------------- +. +The display mode and the viewer programs are determined by these +options. +. +If none of these mode and viewer options is specified +.B \%groffer +tries to find a suitable display mode automatically. +. +The default modes are +.IR "mode pdf" , +.IR "mode ps" , +.IR "mode html" , +.IR "mode x" , +and +.I "mode dvi" +in \%\f[CR]X\~Window\f[] with different viewers and +.I mode tty +with device +.I utf8 +under +.B less +on a terminal; other modes are tested if the programs for the main +default mode do not exist. +. +. +.P +In \%\f[CR]X\~Window\f[], many programs create their own window when +called. +. +.B \%groffer +can run these viewers as an independent program in the background. +. +As this does not work in text mode on a terminal (tty) there must be a +way to know which viewers are \%\f[CR]X\~Window\f[] graphical +programs. +. +The +.B \%groffer +script has a small set of information on some viewer names. +. +If a viewer argument of the command\-line chooses an element that is +kept as \%\f[CR]X\~Window\f[] program in this list it is treated as a +viewer that can run in the background. +. +All other, unknown viewer calls are not run in the background. +. +. +.P +For each mode, you are free to choose whatever viewer you want. +. +That need not be some graphical viewer suitable for this mode. +. +There is a chance to view the output source; for example, the +combination of the options +.B \-\-mode=ps +and +.B \-\-viewer=less +shows the content of the +.I Postscript +output, the source code, with the pager +.BR less . +. +. +.TP +.B \-\-auto +Equivalent to +.BR \-\-mode=auto . +. +. +.TP +.B \-\-default +Reset all configuration from previously processed command line options +to the default values. +. +This is useful to wipe out all former options of the configuration, in +.SM +.BR \%$GROFFER_OPT , +and restart option processing using only the rest of the command line. +. +. +.TP +.BI \-\-default\-modes \ mode1,mode2,\*(EL +Set the sequence of modes for +.I \%auto\~mode +to the comma separated list given in the argument. +. +See +.B \-\-mode +for details on modes. Display in the default manner; actually, this +means to try the modes +.IR x , +.IR ps , +and +.I \%tty +in this sequence. +. +. +. +.TP +.B \-\-dvi +Equivalent to +.BR \-\-mode=\%dvi . +.TQ +.BI \-\-viewer \ prog +Choose a viewer program for +.IR \%dvi\~mode . +. +This can be a file name or a program to be searched in +.SM +.BR $PATH . +. +Known \%\f[CR]X\~Window\f[] +.I \%dvi +viewers include +.BR \%xdvi (1) +and +.BR \%dvilx (1). +. +In each case, arguments can be provided additionally. +. +. +.TP +.B \-\-groff +Equivalent to +.BR \-\-mode=groff . +. +. +.TP +.B \-\-html +Equivalent to +.BR \-\-mode=html . +.TQ +.B \-\-viewer +Choose a web browser program for viewing in +.IR \%html\~mode . +. +It can be the path name of an executable file or a program in +.BR $PATH . +. +In each case, arguments can be provided additionally. +. +. +.TP +.BI \-\-mode \ value +. +Set the display mode. +. +The following mode values are recognized: +. +.RS +. +.TP +.B auto +Select the automatic determination of the display mode. +. +The sequence of modes that are tried can be set with the +.B \-\-default\-modes +option. +. +Useful for restoring the +.I \%default\~mode +when a different mode was specified before. +. +. +.TP +.B dvi +Display formatted input in a +.I \%dvi +viewer program. +. +By default, the formatted input is displayed with the +.BR \%xdvi (1) +program. +. +. +.TP +.B groff +After the file determination, switch +.B \%groffer +to process the input like +.BR \%groff (@MAN1EXT@) +would do. +. +This disables the +.I \%groffer +viewing features. +. +. +.TP +.B html +Translate the input into html format and display the result in a web +browser program. +. +By default, the existence of a sequence of standard web browsers is +tested, starting with +.BR \%konqueror (1) +and +.BR \%mozilla (1). +The text html viewer is +.BR \%lynx (1). +. +. +.TP +.B pdf +Transform +.I roff input files +into a +.I PDF file +by using the +.B groff (@MAN1EXT@) +device +.BR -Tpdf . +. +This is the default +.B PDF +generator. +. +The generated +.I PDF file +is displayed with suitable viewer programs, such as +.BR okular (1). +. +. +.TP +.B pdf2 +This is the traditional +.IR "pdf mode" . +. +Sometimes this mode produces more correct output than the default +.BR "PDF mode" . +. +By default, the input is formatted by +.B \%groff +using the Postscript device, then it is transformed into the PDF file +format using +.BR \%gs (1), +or +.BR ps2pdf (1). +. +If that's not possible, the +.I Postscript mode (ps) +is used instead. +. +Finally it is displayed using different viewer programs. +. +. +.TP +.B ps +Display formatted input in a Postscript viewer program. +. +By default, the formatted input is displayed in one of many viewer +programs. +. +. +.TP +.B text +Format in a +.I \%groff\~text\~mode +and write the result to standard output without a pager or viewer +program. +. +The text device, +.I \%latin1 +by default, can be chosen with option +.BR \-T . +. +. +.TP +.B tty +Format in a +.I \%groff\~text\~mode +and write the result to standard output using a text pager program, +even when in \%\f[CR]X\~Window\f[]. +. +. +.TP +.B www +Equivalent to +.BR \-\-mode=html . +. +. +.TP +.B x +Display the formatted input in a native +.I roff +viewer. +. +By default, the formatted input is displayed with the +.BR \%gxditview (@MAN1EXT@) +program being distributed together with +.BR \%groff . +But the standard \%\f[CR]X\~Window\f[] tool +.BR \%xditview (1) +can also be chosen with the option +.BR \-\-viewer . +The default resolution is +.BR 75dpi , +but +.B 100dpi +are also possible. +. +The default +.I groff +device +for the resolution of +.B 75dpi +is +.BR X75\-12 , +for +.B 100dpi +it is +.BR X100 . +. +The corresponding +.I "groff intermediate output" +for the actual device is generated and the result is displayed. +. +For a resolution of +.BR 100dpi , +the default width of the geometry of the display program is chosen to +.BR 850dpi . +. +. +.TP +.B X +Equivalent to +.BR \-\-mode=x . +. +. +.P +The following modes do not use the +.I \%groffer +viewing features. +. +They are only interesting for advanced applications. +. +. +.TP +.B groff +Generate device output with plain +.I \%groff +without using the special viewing features of +.IR \%groffer . +If no device was specified by option +.B \-T +the +.I \%groff +default +.B \%ps +is assumed. +. +. +.TP +.B source +Output the roff source code of the input files without further +processing. +. +. +.RE +. +. +.TP +.B \-\-pdf +Equivalent to +.BR \-\-mode=pdf . +.TQ +.B \-\-pdf2 +Equivalent to +.BR \-\-mode=pdf2 . +.TQ +.BI \-\-viewer \ prog +Choose a viewer program for +.IR \%pdf\~mode . +. +This can be a file name or a program to be searched in +.SM +.BR $PATH ; +arguments can be provided additionally. +. +. +.TP +.B \-\-ps +Equivalent to +.BR \-\-mode=ps . +.TQ +.BI \-\-viewer \ prog +Choose a viewer program for +.IR \%ps\~mode . +. +This can be a file name or a program to be searched in +.SM +.BR $PATH . +. +Common Postscript viewers include +.BR \%okular (1), +.BR \%evince (1), +.BR \%gv (1), +.BR \%ghostview (1), +and +.BR \%gs (1), +. +In each case, arguments can be provided additionally. +. +. +.TP +.B \-\-source +Equivalent to +.BR \-\-mode=source . +. +. +.TP +.B \-\-text +Equivalent to +.BR \-\-mode=text . +. +. +.TP +.B \-\-to\-stdout +The file for the chosen mode is generated and its content is printed +to standard output. +. +It will not be displayed in graphical mode. +. +. +.TP +.B \-\-tty +Equivalent to +.BR \-\-mode=tty . +.TQ +.BI \-\-viewer \ prog +Choose a text pager for mode +.IR tty . +The standard pager is +.BR less (1). +This option is equivalent to +.I man +option +.BR \-\-pager=\,\fIprog\fP . +The option argument can be a file name or a program to be searched in +.SM +.BR $PATH ; +arguments can be provided additionally. +. +. +.TP +.B \-\-www +Equivalent to +.BR \-\-mode=html . +.TQ +.B \-\-viewer +.IR prog . +. +. +.TP +.B \-\-X\~\fR|\fB\~\-\-x +Equivalent to +.BR \-\-mode=x . +.TQ +.BI \-\-viewer " prog" +Choose a viewer program for +.IR \%x\~mode . +Suitable viewer programs are +.BR \%gxditview (@MAN1EXT@) +which is the default and +.BR \%xditview (1). +The argument can be any executable file or a program in +.SM +.BR $PATH ; +arguments can be provided additionally. +. +. +.TP +.B \-\- +Signals the end of option processing; all remaining arguments are +interpreted as +.I \%filespec +parameters. +. +. +.P +Besides these, +.B \%groffer +accepts all short options that are valid for the +.BR \%groff (@MAN1EXT@) +program. +. +All +.RB \%non- groffer +options are sent unmodified via +.B \%grog +to +.BR \%groff . +. +So postprocessors, macro packages, compatibility with +.I classical +.IR \%troff , +and much more can be manually specified. +. +. +.\" -------------------------------------------------------------------- +.SS "Options related to groff" +.\" -------------------------------------------------------------------- +. +All short options of +.B \%groffer +are compatible with the short options of +.BR \%groff (@MAN1EXT@). +. +The following of +.B \%groff +options have either an additional special meaning within +.B \%groffer +or make sense for normal usage. +. +. +.P +Because of the special outputting behavior of the +.B \%groff +option +.B \-Z +.B \%groffer +was designed to be switched into +.IR \%groff\~mode ; +the +.I \%groffer +viewing features are disabled there. +. +The other +.B \%groff +options do not switch the mode, but allow to customize the formatting +process. +. +. +.TP +.B \-\-a +This generates an ascii approximation of output in the +.IR \%text\~modes . +. +That could be important when the text pager has problems with control +sequences in +.IR "tty mode" . +. +. +.TP +.BI \-\-m \ file +Add +.I \%file +as a +.I \%groff +macro file. +. +This is useful in case it cannot be recognized automatically. +. +. +.TP +.BI \-\-P \ opt_or_arg +Send the argument +.I \%opt_or_arg +as an option or option argument to the actual +.B \%groff +postprocessor. +. +. +.TP +.B \-\-T \fIdevname\fR\~\fR|\fB\~\-\-device \fIdevname\fR +. +This option determines +.BR \%groff 's +output device. +. +The most important devices are the text output devices for referring +to the different character sets, such as +.BR \%ascii , +.BR \%utf8 , +.BR \%latin1 , +.BR \%utf8 , +and others. +. +Each of these arguments switches +.B \%groffer +into a +.I \%text\~mode +using this device, to +.I \%mode\~tty +if the actual mode is not a +.IR \%text\~mode . +. +The following +.I \%devname +arguments are mapped to the corresponding +.B \%groffer +.B \-\-mode=\,\fIdevname\fR +option: +.BR \%dvi , +.BR \%html , +and +.BR \%ps . +All +.B \%X* +arguments are mapped to +.IR \%mode\~x . +Each other +.I \%devname +argument switches to +.I \%mode\~groff +using this device. +. +. +.TP +.B \-\-X +is equivalent to +.BR "groff \-X" . +It displays the +.I groff intermediate output +with +.BR gxditview . +As the quality is relatively bad this option is deprecated; use +.B \-\-X +instead because the +.I \%x\~mode +uses an +.IR X * +device for a better display. +. +. +.TP +.B \-Z\~\fR|\fB\~\-\-intermediate-output\~\fR|\fB\~\-\-ditroff +Switch into +.I \%groff\~mode +and format the input with the +.I \%groff intermediate output +without postprocessing; see +.BR \%groff_out (@MAN5EXT@). +This is equivalent to option +.B \-\-ditroff +of +.IR \%man , +which can be used as well. +. +. +.P +All other +.B \%groff +options are supported by +.BR \%groffer , +but they are just transparently transferred to +.B \%groff +without any intervention. +. +The options that are not explicitly handled by +.B \%groffer +are transparently passed to +.BR \%groff . +. +Therefore these transparent options are not documented here, but in +.BR \%groff (@MAN1EXT@). +Due to the automatism in +.BR \%groffer , +none of these +.B \%groff +options should be needed, except for advanced usage. +. +. +.\" -------------------------------------------------------------------- +.SS "Options for man\~pages" +.\" -------------------------------------------------------------------- +. +.TP +.B \-\-apropos +Start the +.BR \%apropos (1) +command or facility of +.BR \%man (1) +for searching the +.I \%filespec +arguments within all +.I \%man\~page +descriptions. +. +Each +.I \%filespec +argument is taken for search as it is; +.I section +specific parts are not handled, such that +.B 7 groff +searches for the two arguments +.B 7 +and +.BR groff , +with a large result; for the +.I \%filespec +.B groff.7 +nothing will be found. +. +The +.I language +locale is handled only when the called programs do support this; the +GNU +.B apropos +and +.B man \-k +do not. +. +The display differs from the +.B \%apropos +program by the following concepts: +.RS +.IP \*(BU 2m +Construct a +.I \%groff +frame similar to a +.I \%man\~page +to the output of +.BR \%apropos , +.IP \*(BU 2m +each +.I \%filespec +argument is searched on its own. +.IP \*(BU 2m +The restriction by +.B \-\-sections +is handled as well, +.IP \*(BU 2m +wildcard characters are allowed and handled without a further option. +.RE +. +. +.TP +.B \-\-apropos\-data +Show only the +.B \%apropos +descriptions for data documents, these are the +.BR \%man (7) +.IR sections\~4 ", " 5 ", and " 7 . +. +Direct +.I section +declarations are ignored, wildcards are accepted. +. +. +.TP +.B \-\-apropos\-devel +Show only the +.B \%apropos +descriptions for development documents, these are the +.BR man (7) +.IR sections\~2 ", " 3 ", and " 9 . +. +Direct +.I section +declarations are ignored, wildcards are accepted. +. +. +.TP +.B \-\-apropos\-progs +Show only the +.B \%apropos +descriptions for documents on programs, these are the +.BR \%man (7) +.IR sections\~1 ", " 6 ", and " 8 . +. +Direct +.I section +declarations are ignored, wildcards are accepted. +. +. +.TP +.B \-\-whatis +For each +.I \%filespec +argument search all +.I \%man\~pages +and display their description \[em] or say that it is not a +.IR \%man\~page . +This is written from anew, so it differs from +.IR man 's +.B whatis +output by the following concepts +.RS +.IP \*(BU 2m +each retrieved file name is added, +.IP \*(BU 2m +local files are handled as well, +.IP \*(BU 2m +the \fIlanguage\fP and \fIsystem\fP locale is supported, +.IP \*(BU 2m +the display is framed by a +.I groff +output format similar to a +.IR \%man\~page , +.IP \*(BU 2m +wildcard characters are allowed without a further option. +.RE +. +. +.P +The following options were added to +.B \%groffer +for choosing whether the file name arguments are interpreted as names +for local files or as a search pattern for +.IR \%man\~pages . +. +The default is looking up for local files. +. +. +.TP +.B \-\-man +Check the non-option command line arguments +.nh +.RI ( filespecs ) +.hy +first on being +.IR \%man\~pages , +then whether they represent an existing file. +. +By default, a +.I \%filespec +is first tested whether it is an existing file. +. +. +.TP +.B \-\-no-man\~\fR|\fB\~\-\-local-file +Do not check for +.IR \%man\~pages . +. +.B \-\-local-file +is the corresponding +.B man +option. +. +. +.TP +.B \-\-no-special +Disable former calls of +.BR \-\-all , +.BR \-\-apropos* , +and +.BR \-\-whatis . +. +. +.\" -------------------------------------------------------------------- +.SS "Long options taken over from GNU man" +.\" -------------------------------------------------------------------- +. +The long options of +.B \%groffer +were synchronized with the long options of \f[CR]GNU\f[] +.BR man . +. +All long options of \f[CR]GNU\f[] +.B man +are recognized, but not all of these options are important to +.BR \%groffer , +so most of them are just ignored. +. +These ignored +.B man +options are +.BR \-\-catman , +.BR \-\-troff , +and +.BR \-\-update . +. +. +.P +In the following, the +.B man +options that have a special meaning for +.B \%groffer +are documented. +. +. +.P +If your system has \f[CR]GNU\f[] +.B man +installed the full set of long and short options of the \f[CR]GNU\f[] +.B man +program can be passed via the environment variable +.SM +.BR \%$MANOPT ; +see +.BR \%man (1). +. +. +.TP +.B \-\-all +In searching +.IR \%man\~pages , +retrieve all suitable documents instead of only one. +. +. +.TP +.B \-7\~\fR|\fB\~\-\-ascii +In +.IR \%text\~modes , +display ASCII translation of special characters for critical environment. +. +This is equivalent to +.BR "groff \%\-mtty_char" ; +see +.BR groff_tmac (@MAN5EXT@). +. +. +.TP +.B \-\-ditroff +Produce +.IR "groff intermediate output" . +This is equivalent to +.B \%groffer +.BR \-Z . +. +. +.TP +.BI \-\-extension \ suffix +Restrict +.I \%man\~page +search to file names that have +.I \%suffix +appended to their section element. +. +For example, in the file name +.I \%/usr/share/man/man3/terminfo.3ncurses.gz +the +.I \%man\~page +extension is +.IR \%ncurses . +. +. +.TP +.BI \-\-locale \ language +. +Set the language for +.IR \%man\~pages . +. +This has the same effect, but overwrites +.SM +.BR $LANG . +. +. +.TP +.B \-\-location +Print the location of the retrieved files to standard error. +. +. +.TP +.B \-\-no-location +Do not display the location of retrieved files; this resets a former +call to +.BR \-\-location . +. +This was added by +.BR \%groffer . +. +. +.TP +.BI \-\-manpath \ 'dir1:dir2:\*(EL' +Use the specified search path for retrieving +.I \%man\~pages +instead of the program defaults. +. +If the argument is set to the empty string "" the search for +.I \%man\~page +is disabled. +. +. +.TP +.B \-\-pager +Set the pager program in +.IR \%tty\~mode ; +default is +.BR \%less . +. +This can be set with +.BR \-\-viewer . +. +. +.TP +.BI \-\-sections \ sec1:sec2:\*(EL +Restrict searching for +.I \%man\~pages +to the given +.IR sections , +a colon-separated list. +. +. +.TP +.BI \-\-systems \ sys1,sys2,\*(EL +Search for +.I \%man\~pages +for the given operating systems; the argument +.I \%systems +is a comma-separated list. +. +. +.TP +.B \-\-where +Equivalent to +.BR \-\-location . +. +. +.\" -------------------------------------------------------------------- +.SS "X\~\%Window\~\%Toolkit Options" +.\" -------------------------------------------------------------------- +. +The following long options were adapted from the corresponding +\%\f[CR]X\~Window\~Toolkit\f[] options. +. +.B \%groffer +will pass them to the actual viewer program if it is an +\%\f[CR]X\~Window\f[] program. +. +Otherwise these options are ignored. +. +. +.P +Unfortunately these options use the old style of a single minus for +long options. +. +For +.B \%groffer +that was changed to the standard with using a double minus for long +options, for example, +.B \%groffer +uses the option +.B \-\-font +for the \%\f[CR]X\~Window\f[] option +.BR \-font . +. +. +.P +See +.BR X (7) +and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options +for more details on these options and their arguments. +. +. +.TP +.BI \-\-background \ color +Set the background color of the viewer window. +. +. +.TP +.BI \-\-bd \ pixels +This is equivalent to +.BR \-\-bordercolor . +. +. +.TP +.BI \-\-bg \ color +This is equivalent to +.BR \-\-background . +. +. +.TP +.BI \-\-bw \ pixels +This is equivalent to +.BR \-\-borderwidth . +. +. +.TP +.BI \-\-bordercolor \ pixels +Specifies the color of the border surrounding the viewer window. +. +. +.TP +.BI \-\-borderwidth \ pixels +Specifies the width in pixels of the border surrounding the viewer +window. +. +. +.TP +.BI \-\-display \ X-display +Set the \%\f[CR]X\~Window\f[] display on which the viewer program +shall be started, see the \%\f[CR]X\~Window\f[] documentation for the +syntax of the argument. +. +. +.TP +.BI \-\-foreground \ color +Set the foreground color of the viewer window. +. +. +.TP +.BI \-\-fg \ color +This is equivalent to +.BR \-\-foreground . +. +. +.TP +.BI \-\-fn \ font_name +This is equivalent to +.BR \-\-font . +. +. +.TP +.BI \-\-font \ font_name +Set the font used by the viewer window. +. +The argument is an \%\f[CR]X\~Window\f[] font name. +. +. +.TP +.BI \-\-ft \ font_name +This is equivalent to +.BR \-\-font . +. +. +.TP +.BI \-\-geometry \ size_pos +Set the geometry of the display window, that means its size and its +starting position. +. +See +.BR \%X (7) +for the syntax of the argument. +. +. +.TP +.BI \-\-resolution \ value +Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some +viewer programs. +. +The only supported dpi values are +.B 75 +and +.BR 100 . +. +Actually, the default resolution for +.B \%groffer +is set to +.BR 75dpi . +The resolution also sets the default device in +.IR "mode x" . +. +. +.TP +.B \-\-rv +Reverse foreground and background color of the viewer window. +. +. +.TP +.BI \-\-title "\ 'some text'" +Set the title for the viewer window. +. +. +.TP +.BI \-\-xrm \ 'resource' +Set \f[CR]\%X\~Window\f[] resource. +. +. +.\" -------------------------------------------------------------------- +.SS "Options for Development" +.\" -------------------------------------------------------------------- +. +.TP +.B \-\-debug +Enable all debugging options +.BR \-\-debug\-\,\fItype\fP . +. +The temporary files are kept and not deleted, the +.B grog +output is printed, the name of the temporary directory is printed, the +displayed file names are printed, and the parameters are printed. +. +. +.TP +.B \-\-debug\-filenames +Print the names of the files and +.I \%man\~pages +that are displayed by +.BR \&groffer . +. +. +.TP +.B \-\-debug\-grog +Print the output of all +.B grog +commands. +. +. +.TP +.B \-\-debug\-keep +Enable two debugging informations. +. +Print the name of the temporary directory and keep the temporary +files, do not delete them during the run of +.BR \%groffer . +. +. +.TP +.B \-\-debug\-params +Print the parameters, as obtained from the configuration files, from +.SM +.BR \%GROFFER_OPT , +and the command line arguments. +. +. +.TP +.B \-\-debug\-tmpdir +Print the name of the temporary directory. +. +. +.TP +.B \-\-do-nothing +This is like +.BR \-\-version , +but without the output; no viewer is started. +. +This makes only sense in development. +. +. +.TP +.B \-\-print=\,\fItext\fR +Just print the argument to standard error. +. +This is good for parameter check. +. +. +.TP +.B \-V +This is an advanced option for debugging only. +. +Instead of displaying the formatted input, a lot of +.I \%groffer +specific information is printed to standard output: +. +.RS +.IP \*(BU 2m +the output file name in the temporary directory, +. +.IP \*(BU 2m +the display mode of the actual +.B \%groffer +run, +. +.IP \*(BU 2m +the display program for viewing the output with its arguments, +. +.IP \*(BU 2m +the active parameters from the config files, the arguments in +.SM +.BR \%$GROFFER_OPT , +and the arguments of the command line, +. +.IP \*(BU 2m +the pipeline that would be run by the +.B \%groff +program, but without executing it. +.RE +. +. +.P +Other useful debugging options are the +.B \%groff +option +.B \-Z +and +.BR \-\-mode=groff . +. +. +.\" -------------------------------------------------------------------- +.SS "Filespec Arguments" +.\" -------------------------------------------------------------------- +. +A +.I \%filespec +parameter is an argument that is not an option or option argument. +. +In +.BR \%groffer , +.I \%filespec +parameters are a file name or a template for searching +.IR \%man\~pages . +. +These input sources are collected and composed into a single output +file such as +.B \%groff +does. +. +. +.P +The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind +the first non-option argument as +.I \%filespec +arguments is ignored. +. +The \f[CR]GNU\f[] behavior to recognize options even when mixed with +.I \%filespec +arguments is used throughout. +. +But, as usual, the double minus argument +.B \-\- +ends the option handling and interprets all following arguments as +.I \%filespec +arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted. +. +. +.P +The options +.B \-\-apropos* +have a special handling of +.I filespec +arguments. +. +Each argument is taken as a search scheme of its own. +. +Also a regexp (regular expression) can be used in the filespec. +. +For example, +.B groffer \-\-apropos '^gro.f$' +searches +.B groff +in the +.I man\~page +name, while +.B groffer \-\-apropos groff +searches +.B groff +somewhere in the name or description of the +.IR man\~pages . +. +. +.P +All other parts of +.IR groffer , +such as the normal display or the output with +.B \-\-whatis +have a different scheme for +.IR filespecs . +No regular expressions are used for the arguments. +. +The +.I filespec +arguments are handled by the following scheme. +. +. +.P +It is necessary to know that on each system the +.I \%man\~pages +are sorted according to their content into several sections. +. +The +.I classical man sections +have a single-character name, either a digit from +.B 1 +to +.B 9 +or one of the characters +.B n +or +.BR o . +. +. +.P +This can optionally be followed by a string, the so-called +.IR extension . +The +.I extension +allows to store several +.I man\~pages +with the same name in the same +.IR section . +But the +.I extension +is only rarely used, usually it is omitted. +. +Then the +.I extensions +are searched automatically by alphabet. +. +. +.P +In the following, we use the name +.I section_extension +for a word that consists of a single character +.I section +name or a +.I section +character that is followed by an +.IR extension . +. +Each +.I \%filespec +parameter can have one of the following forms in decreasing sequence. +. +. +.IP \*(BU 2m +No +.I \%filespec +parameters means that +.B \%groffer +waits for standard input. +. +The minus option +.B \- +always stands for standard input; it can occur several times. +. +If you want to look up a +.I \%man\~page +called +.B \- +use the argument +.BR man:\- . +. +. +.IP \*(BU 2m +Next a +.I \%filespec +is tested whether it is the path name of an existing file. +. +Otherwise it is assumed to be a searching pattern for a +.IR \%man\~page . +. +. +.IP \*(BU 2m +.BI \%man: name ( section_extension ) , +.BI \%man: name . section_extension, +.IB \%name ( section_extension ) , +or +.IB \%name . section_extension +search the \%man\~page +.I \%name +in \%man\~section and possibly extension of +.IR \%section_extension . +. +. +.IP \*(BU 2m +Now +.BI \%man: name +searches for a +.I \%man\~page +in the lowest +.I \%man\~section +that has a document called +.IR \%name . +. +. +.IP \*(BU 2m +.I \%section_extension\~name +is a pattern of 2 arguments that originates from a strange argument +parsing of the +.B man +program. +. +Again, this searches the man page +.I name +with +.IR \%section_extension , +a combination of a +.I section +character optionally followed by an +.IR extension . +. +. +.IP \*(BU 2m +We are left with the argument +.I \%name +which is not an existing file. +. +So this searches for the +.I \%man\~page +called +.I \%name +in the lowest +.I \%man\~section +that has a document for this name. +. +. +.P +Several file name arguments can be supplied. +. +They are mixed by +.B \%groff +into a single document. +. +Note that the set of option arguments must fit to all of these file +arguments. +. +So they should have at least the same style of the +.I \%groff +language. +. +. +.\" -------------------------------------------------------------------- +.SH "OUTPUT MODES" +.\" -------------------------------------------------------------------- +. +By default, the +.B \%groffer +program collects all input into a single file, formats it with the +.B \%groff +program for a certain device, and then chooses a suitable viewer +program. +. +The device and viewer process in +.B \%groffer +is called a +.IR \%mode . +. +The mode and viewer of a running +.B \%groffer +program is selected automatically, but the user can also choose it +with options. +. +. +The modes are selected by option the arguments of +.BR \-\-mode=\,\fIanymode . +Additionally, each of this argument can be specified as an option of +its own, such as +.BR anymode . +Most of these modes have a viewer program, which can be chosen by the +option +.BR \-\-viewer . +. +. +.P +Several different modes are offered, graphical modes for +\f[CR]\%X\~Window\f[], +.IR \%text\~modes , +and some direct +.I \%groff\~modes +for debugging and development. +. +. +.P +By default, +.B \%groffer +first tries whether +.I \%x\~mode +is possible, then +.IR \%ps\~mode , +and finally +.IR \%tty\~mode . +. +This mode testing sequence for +.I \%auto\~mode +can be changed by specifying a comma separated list of modes with the +option +.B \-\-default\-modes. +. +. +.P +The searching for +.I \%man\~pages +and the decompression of the input are active in every mode. +. +. +.\" -------------------------------------------------------------------- +.SS "Graphical Display Modes" +.\" -------------------------------------------------------------------- +. +The graphical display modes work mostly in the \%\f[CR]X\~Window\f[] +environment (or similar implementations within other windowing +environments). +. +The environment variable +.SM +.B \%$DISPLAY +and the option +.B \-\-display +are used for specifying the \%\f[CR]X\~Window\f[] display to be used. +. +If this environment variable is empty +.B \%groffer +assumes that no \%\f[CR]X\~Window\f[] is running and changes to a +.IR \%text\~mode . +. +You can change this automatic behavior by the option +.BR \-\-default\-modes . +. +. +.P +Known viewers for the graphical display modes and their standard +\%\f[CR]X\~Window\f[] viewer programs are +. +.IP \*(BU 2m +in a PDF viewer +.nh +.RI ( \%pdf\~mode ) +.hy +. +.IP \*(BU 2m +in a web browser +.nh +.RI ( html +or +.IR \%www\~mode ) +.hy +.RE +. +.IP \*(BU 2m +in a Postscript viewer +.nh +.RI ( \%ps\~mode ) +.hy +. +.IP \*(BU 2m +\%\f[CR]X\~Window\f[] +.I roff +viewers such as +.BR \%gxditview (@MAN1EXT@) +or +.BR \%xditview (1) +(in +.IR \%x\~mode ) +. +.IP \*(BU 2m +in a dvi viewer program +.nh +.RI ( \%dvi\~mode ) +.hy +. +. +.P +The +.I \%pdf\~mode +has a major advantage \[em] it is the only graphical display mode that +allows to search for text within the viewer; this can be a really +important feature. +. +Unfortunately, it takes some time to transform the input into the PDF +format, so it was not chosen as the major mode. +. +. +.P +These graphical viewers can be customized by options of the +\%\f[CR]X\~Window\~Toolkit\f[]. +. +But the +.B \%groffer +options use a leading double minus instead of the single minus used by +the \%\f[CR]X\~Window\~Toolkit\f[]. +. +. +.\" -------------------------------------------------------------------- +.SS "Text modes" +.\" -------------------------------------------------------------------- +. +There are two modes for text output, +.I \%mode\~text +for plain output without a pager and +.I \%mode\~tty +for a text output on a text terminal using some pager program. +. +. +.P +If the variable +.SM +.B \%$DISPLAY +is not set or empty, +.B \%groffer +assumes that it should use +.IR \%tty\~\%mode . +. +. +.P +In the actual implementation, the +.I groff +output device +.I \%latin1 +is chosen for +.IR \%text\~modes . +. +This can be changed by specifying option +.B \-T +or +.BR \%\-\-device . +. +. +.P +The pager to be used can be specified by one of the options +.B \-\-pager +and +.BR \-\-viewer , +or by the environment variable +.BR \%$PAGER . +If all of this is not used the +.BR \%less (1) +program with the option +.B \-r +for correctly displaying control sequences is used as the default +pager. +. +. +.\" -------------------------------------------------------------------- +.SS "Special Modes for Debugging and Development" +.\" -------------------------------------------------------------------- +. +These modes use the +.I \%groffer +file determination and decompression. +. +This is combined into a single input file that is fed directly into +.B \%groff +with different strategy without the +.I \%groffer +viewing facilities. +. +These modes are regarded as advanced, they are useful for debugging +and development purposes. +. +. +.P +The +.I \%source\~mode +with option +.B \-\-source +just displays the decompressed input. +. +. +.P +Option +.B \-\-to\-stdout +does not display in a graphical mode. +. +It just generates the file for the chosen mode and then prints its +content to standard output. +. +. +.P +The +.I \%groff\~mode +passes the input to +.B \%groff +using only some suitable options provided to +.BR \%groffer . +. +This enables the user to save the generated output into a file or pipe +it into another program. +. +. +.P +In +.IR \%groff\~\%mode , +the option +.B \-Z +disables post-processing, thus producing the +.nh +.I groff intermediate +.IR output . +.hy +. +In this mode, the input is formatted, but not postprocessed; see +.BR \%groff_out (@MAN5EXT@) +for details. +. +. +.P +All +.B \%groff +short options are supported by +.BR \%groffer . +. +. +.\" -------------------------------------------------------------------- +.SH "MAN PAGE SEARCHING" +.\" -------------------------------------------------------------------- +. +The default behavior of +.B \%groffer +is to first test whether a file parameter represents a local file; if +it is not an existing file name, it is assumed to represent the name +of a +.IR \%man\~page . +The following options can be used to determine whether the arguments +should be handled as file name or +.I \%man\~page +arguments. +. +.TP +.B \-\-man +forces to interpret all file parameters as +.I \%filespecs +for searching +.IR \%man\~pages . +. +.TP +.B \-\-no\-man +.TQ +.B \-\-local\-file +disable the +.I man +searching; so only local files are displayed. +. +. +.P +If neither a local file nor a +.I \%man\~page +was retrieved for some file parameter a warning is issued on standard +error, but processing is continued. +. +. +.\" -------------------------------------------------------------------- +.SS "Search Algorithm" +.\" -------------------------------------------------------------------- +. +Let us now assume that a +.I \%man\~page +should be searched. +. +The +.B \%groffer +program provides a search facility for +.IR \%man\~pages . +. +All long options, all environment variables, and most of the +functionality of the \f[CR]GNU\fP +.BR \%man (1) +program were implemented. +. +The search algorithm shall determine which file is displayed for a given +.IR \%man\~page . +The process can be modified by options and environment variables. +. +. +.P +The only +.I man +action that is omitted in +.B \%groffer +are the preformatted +.IR \%man\~pages , +also called +.IR cat\~pages . +. +With the excellent performance of the actual computers, the +preformatted +.I \%man\~pages +aren't necessary any longer. +. +Additionally, +.B \%groffer +is a +.I roff +program; it wants to read +.I roff +source files and format them itself. +. +. +.P +The algorithm for retrieving the file for a +.I \%man\~page +needs first a set of directories. +. +This set starts with the so-called +.I man\~path +that is modified later on by adding names of +.I operating system +and +.IR language . +. +This arising set is used for adding the section directories which +contain the +.I \%man\~page +files. +. +. +.P +The +.I man\~path +is a list of directories that are separated by colon. +. +It is generated by the following methods. +. +.IP \*(BU 2m +The environment variable +.SM +.B \%$MANPATH +can be set. +. +.IP \*(BU 2m +It can be read from the arguments of the environment variable +.SM +.BR \%$MANOPT . +. +.IP \*(BU 2m +The +.I man\~path +can be manually specified by using the option +.BR \-\-manpath . +An empty argument disables the +.I \%man\~page +searching. +. +.IP \*(BU 2m +When no +.I man\~path +was set the +.BR \%manpath (1) +program is tried to determine one. +. +.IP \*(BU 2m +If this does not work a reasonable default path from +.SM +.B $PATH +is determined. +. +. +.P +We now have a starting set of directories. +. +The first way to change this set is by adding names of +.I operating +.IR systems . +. +This assumes that +.I \%man\~pages +for several +.I operating systems +are installed. +. +This is not always true. +. +The names of such +.I operating systems +can be provided by 3 methods. +. +.IP \*(BU 2m +The environment variable +.SM +.B \%$SYSTEM +has the lowest precedence. +. +.IP \*(BU 2m +This can be overridden by an option in +.SM +.BR \%$MANOPT . +. +.IP \*(BU 2m +This again is overridden by the command line option +.BR \-\-systems . +. +. +.P +Several names of +.I operating systems +can be given by appending their names, separated by a comma. +. +. +.P +The +.I man\~path +is changed by appending each +.I system +name as subdirectory at the end of each directory of the set. +. +No directory of the +.I man\~path +set is kept. +. +But if no +.I system +name is specified the +.I man\~path +is left unchanged. +. +. +.P +After this, the actual set of directories can be changed by +.I language +information. +. +This assumes that there exist +.I man\~pages +in different languages. +. +The wanted +.I language +can be chosen by several methods. +. +.IP \*(BU 2m +Environment variable +.SM +.BR $LANG . +. +.IP \*(BU 2m +This is overridden by +.SM +.BR \%$LC_MESSAGES . +. +.IP \*(BU 2m +This is overridden by +.SM +.BR $LC_ALL . +. +.IP \*(BU 2m +This can be overridden by providing an option in +.SM +.BR \%$MANOPT . +. +.IP \*(BU 2m +All these environment variables are overridden by the command line +option +.BR \-\-locale . +. +. +.P +The +.I default language +can be specified by specifying one of the pseudo-language parameters +\f[CR]C\fP or \f[CR]\%POSIX\fP. +. +This is like deleting a formerly given +.I language +information. +. +The +.I \%man\~pages +in the +.I default language +are usually in English. +. +. +.P +Of course, the +.I language +name is determined by +.BR man . +In \f[CR]GNU\fP +.BR man , +it is specified in the \%\f[CR]POSIX\~1003.1\fP based format: +.P +.nh +\f[I]\/\f[][\f[CB]_\f[]\,\f[I]\/\f[][\f[CB].\fP\ +\f[I]\/\f[][\f[CB],\fP\,\f[I]\/\fP]]], +.hy +.P +but the two-letter code in +.nh +.I +.hy +is sufficient for most purposes. +. +If for a complicated +.I language +formulation no +.I \%man\~pages +are found +.B \%groffer +searches the country part consisting of these first two characters as +well. +. +. +.P +The actual directory set is copied thrice. +. +The +.I language +name is appended as subdirectory to each directory in the first copy +of the actual directory set (this is only done when a language +information is given). +. +Then the 2-letter abbreviation of the +.I language +name is appended as subdirectories to the second copy of the directory +set (this is only done when the given language name has more than 2 +letters). +. +The third copy of the directory set is kept unchanged (if no +.I language +information is given this is the kept directory set). +. +These maximally 3 copies are appended to get the new directory set. +. +. +.P +We now have a complete set of directories to work with. +. +In each of these directories, the +.I man +files are separated in +.IR sections . +. +The name of a +.I section +is represented by a single character, a digit between +.I 1 +and +.IR 9 , +or the character +.I o +or +.IR n , +in this order. +. +. +.P +For each available +.IR section , +a subdirectory +.BI man
+exists containing all +.I man +files for this +.IR section , +where +.I
+is a single character as described before. +. +Each +.I man +file in a +.I section +directory has the form +.IR \%\f[CB]man\fP
\f[CB]/\fP\f[CB].\fP
\ +[][\f[CB].\fP] , +where +.I \% +and +.I \% +are optional. +. +.I \% +is the name of the +.I \%man\~page +that is also specified as filespec argument on the command line. +. +. +.P +The +.I extension +is an addition to the section. +. +This postfix acts like a subsection. +. +An +.I extension +occurs only in the file name, not in name of the +.I section +subdirectory. +. +It can be specified on the command line. +. +. +.P +On the other hand, the +.I compression +is just an information on how the file is compressed. +. +This is not important for the user, such that it cannot be specified +on the command line. +. +. +.P +There are 4 methods to specify a +.I section +on the command line: +. +.IP \*(BU 2m +Environment variable +.SM +.B \%$MANSECT +. +.IP \*(BU 2m +Command line option +.B \-\-sections +. +.IP \*(BU 2m +Appendix to the +.I name +argument in the form +.I .
+. +.IP \*(BU 2m +Preargument before the +.I name +argument in the form +.I
+. +. +.P +It is also possible to specify several +.I sections +by appending the single characters separated by colons. +. +One can imagine that this means to restrict the +.I \%man\~page +search to only some +.IR sections . +. +The multiple +.I sections +are only possible for +.SM +.B \%$MANSECT +and +.BR \-\-sections . +. +. +.P +If no +.I section +is specified all +.I sections +are searched one after the other in the given order, starting with +.IR section\~1 , +until a suitable file is found. +. +. +.P +There are 4 methods to specify an +.I extension +on the command line. +. +But it is not necessary to provide the whole extension name, some +abbreviation is good enough in most cases. +. +.IP \*(BU 2m +Environment variable +.SM +.B \%$EXTENSION +. +.IP \*(BU 2m +Command line option +.B \-\-extension +. +.IP \*(BU 2m +Appendix to the +.I .
+argument in the form +.I .
+. +.IP \*(BU 2m +Preargument before the +.I name +argument in the form +.I
+. +. +.P +For further details on +.I \%man\~page +searching, see +.BR \%man (1). +. +. +.\" -------------------------------------------------------------------- +.SS "Examples of man files" +.\" -------------------------------------------------------------------- +. +.TP +.B /usr/share/man/man1/groff.1 +This is an uncompressed file for the +.I \%man\~page +\f[CR]groff\fP in +.IR section\~1 . +. +It can be called by +.EX +\fIsh#\fR groffer\~groff +.EE +No +.I section +is specified here, so all +.I sections +should be searched, but as +.I section\~1 +is searched first this file will be found first. +. +The file name is composed of the following components. +.B /usr/share/man/ +must be part of the +.IR \%man\~path ; +the subdirectory +.B man1/ +and the part +.B .1 +stand for the +.IR section ; +.B groff +is the name of the +.IR \%man\~page . +. +. +.TP +.B /usr/local/share/man/man7/groff.7.gz +The file name is composed of the following components. +.B /usr/local/share/man +must be part of the +.IR \%man\~path ; +the subdirectory +.B man7/ +and the part +.B .7 +stand for the +.IR section ; +.B groff +is the name of the +.IR \%man\~page ; +the final part +.B .gz +stands for a compression with +.BR gzip (1). +As the +.I section +is not the first one it must be specified as well. +. +This can be done by one of the following commands. +.EX +\fIsh#\fR\~groffer\~groff.7 +\fIsh#\fR\~groffer\~7\~groff +\fIsh#\fR\~groffer\~\-\-sections=7\~groff +.EE +. +.TP +.B /usr/local/man/man1/ctags.1emacs21.bz2 +Here +.B /usr/local/man +must be in +.IR \%man\~path ; +the subdirectory +.B man1/ +and the file name part +.B .1 +stand for +.IR section\~1 ; +the name of the +.I \%man\~page +is +.BR ctags ; +the section has an extension +.BR emacs21 ; +and the file is compressed as +.B .bz2 +with +.BR bzip2 (1). +The file can be viewed with one of the following commands +.EX +\fIsh#\fR\~groffer\~ctags.1e +\fIsh#\fR\~groffer\~1e\~ctags +\fIsh#\fR\~groffer\~\-\-extension=e\~\-\-sections=1\~ctags +.EE +where \f[CR]e\fP works as an abbreviation for the extension +\f[CR]emacs21\fP. +. +. +.TP +.B /usr/man/linux/de/man7/man.7.Z +The directory +.B /usr/man +is now part of the +.IR \%man\~path ; +then there is a subdirectory for an +.I operating system +name +.BR linux/ ; +next comes a subdirectory +.B de/ +for the German +.IR language ; +the +.I section +names +.B man7 +and +.B .7 +are known so far; +.B man +is the name of the +.IR \%man\~page ; +and +.B .Z +signifies the compression that can be handled by +.BR gzip (1). +We want now show how to provide several values for some options. +. +That is possible for +.I sections +and +.I operating system +names. +. +So we use as +.I sections\~5 +and +.I 7 +and as +.I system +names +.I linux +and +.IR aix . +The command is then +.sp +.EX +\fIsh#\fR groffer\~\-\-locale=de\~\-\-sections=5:7\~\-\-systems=linux,aix\~man +\fIsh#\fR LANG=de\~MANSECT=5:7\~SYSTEM=linux,aix\~groffer\~man +.EE +. +. +.\" -------------------------------------------------------------------- +.SH DECOMPRESSION +.\" -------------------------------------------------------------------- +. +The program has a decompression facility. +. +If standard input or a file that was retrieved from the command line +parameters is compressed with a format that is supported by either +.BR \%gzip (1) +or +.BR \%bzip2 (1) +it is decompressed on-the-fly. +. +This includes the \f[CR]GNU\fP +.BR \%.gz , +.BR \%.bz2 , +and the traditional +.B \%.Z +compression. +. +The program displays the concatenation of all decompressed input in +the sequence that was specified on the command line. +. +. +.\" -------------------------------------------------------------------- +.SH "ENVIRONMENT" +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program supports many system variables, most of them by courtesy of +other programs. +. +All environment variables of +.BR \%groff (@MAN1EXT@) +and \f[CR]GNU\fP +.BR \%man (1) +and some standard system variables are honored. +. +. +.\" -------------------------------------------------------------------- +.SS "Native groffer Variables" +.\" -------------------------------------------------------------------- +. +.TP +.SM +.B \%$GROFFER_OPT +Store options for a run of +.BR \%groffer . +. +The options specified in this variable are overridden by the options +given on the command line. +. +The content of this variable is run through the shell builtin `eval'; +so arguments containing white-space or special shell characters should +be quoted. +. +Do not forget to export this variable, otherwise it does not exist +during the run of +.BR groffer . +. +. +.\" -------------------------------------------------------------------- +.SS "System Variables" +.\" -------------------------------------------------------------------- +. +The following variables have a special meaning for +.BR \%groffer . +. +. +.TP +.SM +.B \%$DISPLAY +If this variable is set this indicates that the \%\f[CR]X\~Window\fP +system is running. +. +Testing this variable decides on whether graphical or text output is +generated. +. +This variable should not be changed by the user carelessly, but it can +be used to start the graphical +.B \%groffer +on a remote \%\f[CR]X\~Window\fP terminal. +. +For example, depending on your system, +.B \%groffer +can be started on the second monitor by the command +.sp +.EX +\fIsh#\fR DISPLAY=:0.1\~groffer\~what.ever & +.EE +. +. +.TP +.SM +.B \%$LC_ALL +.TQ +.SM +.B \%$LC_MESSAGES +.TQ +.SM +.B $LANG +If one of these variables is set (in the above sequence), its content +is interpreted as the locale, the language to be used, especially when +retrieving +.IR \%man\~pages . +. +A locale name is typically of the form +.nh +.IR language [\c +.B _\c +.IR territory [\c +.B .\c +.IR codeset [\c +.B @\c +.IR modifier ]]], +.hy +where +.I \%language +is an ISO 639 language code, +.I \%territory +is an ISO 3166 country code, and +.I \%codeset +is a character set or encoding identifier like ISO-8859-1 or UTF-8; +see +.BR \%setlocale (3). +. +The locale values \f[CR]C\fP and \%\f[CR]POSIX\fP +stand for the default, i.e.\& the +.I \%man\~page +directories without a language prefix. +. +This is the same behavior as when all 3\~variables are unset. +. +. +.TP +.SM +.B \%$PAGER +This variable can be used to set the pager for the tty output. +. +For example, to disable the use of a pager completely set this +variable to the +.BR \%cat (1) +program +.sp +.EX +\fIsh#\fR PAGER=cat\~groffer\~anything +.EE +.sp +. +.TP +.SM +.B $PATH +All programs within the +.B \%groffer +script are called without a fixed path. +. +Thus this environment variable determines the set of programs used +within the run of +.BR \%groffer . +. +. +.\" -------------------------------------------------------------------- +.SS "Groff Variables" +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program internally calls +.BR \%groff , +so all environment variables documented in +.BR \%groff (@MAN1EXT@) +are internally used within +.B \%groffer +as well. +. +The following variable has a direct meaning for the +.B \%groffer +program. +. +.TP +.SM +.B \%$GROFF_TMPDIR +If the value of this variable is an existing, writable directory, +.B \%groffer +uses it for storing its temporary files, just as +.B groff +does. +. +See the +.BR \%groff (@MAN1EXT@) +man page for more details on the location of temporary files. +. +. +.\" -------------------------------------------------------------------- +.SS "Man Variables" +.\" -------------------------------------------------------------------- +. +Parts of the functionality of the +.B man +program were implemented in +.BR \%groffer ; +support for all environment variables documented in +.BR \%man (1) +was added to +.BR \%groffer , +but the meaning was slightly modified due to the different approach in +.BR \%groffer ; +but the user interface is the same. +. +The +.B man +environment variables can be overwritten by options provided with +.SM +.BR \%$MANOPT , +which in turn is overwritten by the command line. +. +. +.TP +.SM +.B \%$EXTENSION +Restrict the search for +.I \%man\~pages +to files having this extension. +. +This is overridden by option +.BR \-\-extension ; +see there for details. +. +. +.TP +.SM +.B \%$MANOPT +This variable contains options as a preset for +.BR \%man (1). +As not all of these are relevant for +.B \%groffer +only the essential parts of its value are extracted. +. +The options specified in this variable overwrite the values of the +other environment variables that are specific to +.IR man . +. +All options specified in this variable are overridden by the options +given on the command line. +. +. +.TP +.SM +.B \%$MANPATH +If set, this variable contains the directories in which the +.I \%man\~page +trees are stored. +. +This is overridden by option +.BR \%\-\-manpath . +. +. +.TP +.SM +.B \%$MANSECT +If this is a colon separated list of section names, the search for +.I \%man\~pages +is restricted to those manual sections in that order. +. +This is overridden by option +.BR \-\-sections . +. +. +.TP +.SM +.B \%$SYSTEM +If this is set to a comma separated list of names these are interpreted +as +.I \%man\~page +trees for different operating systems. +. +This variable can be overwritten by option +.BR \-\-systems ; +see there for details. +. +. +.P +The environment variable +.SM +.B \%$MANROFFSEQ +is ignored by +.B \%groffer +because the necessary preprocessors are determined automatically. +. +. +.\" -------------------------------------------------------------------- +.SH "CONFIGURATION FILES" +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program can be preconfigured by two configuration files. +. +. +.TP +.B \%/etc/groff/groffer.conf +System-wide configuration file for +.BR \%groffer . +. +. +.TP +.B \%$HOME/.groff/groffer.conf +User-specific configuration file for +.BR \%groffer , +where +.SM +.B \%$HOME +denotes the user's home directory. +. +This file is called after the system-wide configuration file to enable +overriding by the user. +. +. +.P +Both files are handled for the configuration, but the configuration +file in +.B /etc +comes first; it is overwritten by the configuration file in the home +directory; both configuration files are overwritten by the environment +variable +.SM +.BR \%$GROFFER_OPT ; +everything is overwritten by the command line arguments. +. +. +.P +The configuration files contain options that should be called as +default for every +.B \%groffer +run. +. +These options are written in lines such that each contains either a +long option, a short option, or a short option cluster; each with or +without an argument. +. +So each line with configuration information starts with a minus +character +.RB ` \- '; +a line with a long option starts with two minus characters +.RB ` \-\- ', +a line with a short option or short option cluster starts with a +single minus +.RB ` \- '. +. +. +.P +The option names in the configuration files may not be abbreviated, +they must be exact. +. +. +.P +The argument for a long option can be separated from the option name +either by an equal sign +.RB ` = ' +or by whitespace, i.e.\& one or several space or tab characters. +. +An argument for a short option or short option cluster can be directly +appended to the option name or separated by whitespace. +. +The end of an argument is the end of the line. +. +It is not allowed to use a shell environment variable in an option +name or argument. +. +. +.P +It is not necessary to use quotes in an option or argument, except for +empty arguments. +. +An empty argument can be provided by appending a pair of quotes to the +separating equal sign or whitespace; with a short option, the +separator can be omitted as well. +. +For a long option with a separating equal sign +.RB ` = ', +the pair of quotes can be omitted, thus ending the line with the +separating equal sign. +. +All other quote characters are cancelled internally. +. +. +.P +In the configuration files, arbitrary whitespace is allowed at the +beginning of each line, it is just ignored. +. +Each whitespace within a line is replaced by a single space character +` ' internally. +. +. +.P +All lines of the configuration lines that do not start +with a minus character are ignored, such that comments starting with +.RB ` # ' +are possible. +. +So there are no shell commands in the configuration files. +. +. +.P +As an example, consider the following configuration file that can be +used either in +.B \%/etc/groff/groffer.conf +or +.B \%\s+2~\s0/.groff/groffer.conf . +. +. +.P +.ft CR +.nh +.nf +# groffer configuration file +# +# groffer options that are used in each call of groffer +\-\-foreground=DarkBlue +\-\-resolution=100 +\-\-viewer=gxditview \-geometry 900x1200 +\-\-viewer xpdf \-Z 150 +.fi +.hy +.ft +. +. +.P +The lines starting with +.B # +are just ignored, so they act as command lines. +. +This configuration sets four +.B \%groffer +options (the lines starting with +.RB ` \- '). +This has the following effects: +. +. +.IP \*(BU 2m +Use a text color of +.B \%DarkBlue +in all viewers that support this, such as +.BR \%gxditview . +. +. +.IP \*(BU 2m +Use a resolution of +.B 100dpi +in all viewers that support this, such as +.BR \%gxditview . +. +By this, the default device in +.I x mode +is set to +.BR X100 . +. +. +.IP \*(BU 2m +Force +.BR \%gxditview (@MAN1EXT@) +as the +.I \%x-mode +viewer using the geometry option for setting the width to +.B 900px +and the height to +.BR 1200px . +This geometry is suitable for a resolution of +.BR 100dpi . +. +. +.IP \*(BU 2m +Use +.BR \%xpdf (1) +as the +.I \%pdf-mode +viewer with the argument +.B \-Z +.BR 150 . +. +. +.\" -------------------------------------------------------------------- +.SH "EXAMPLES" +.\" -------------------------------------------------------------------- +. +The usage of +.B \%groffer +is very easy. +. +Usually, it is just called with a file name or +.IR \%man\~page . +. +The following examples, however, show that +.B \%groffer +has much more fancy capabilities. +. +.sp +.EX +\fIsh#\fR\~groffer\~/usr/local/share/doc/groff/meintro.ms.gz +.EE +.sp +Decompress, format and display the compressed file +.B meintro.ms.gz +in the directory +.BR /usr/local/share/doc/groff , +using the standard viewer +.B \%gxditview +as graphical viewer when in \%\f[CR]X\~Window\fP, or the +.BR \%less (1) +pager program when not in \%\f[CR]X\~Window\fP. +. +.sp +.EX +\fIsh#\fR\~groffer\~groff +.EE +.sp +If the file +.B \%./groff +exists use it as input. +. +Otherwise interpret the argument as a search for the +.I \%man\~page +named +.B \%groff +in the smallest possible +.IR \%man\~section , +being section 1 in this case. +. +.sp +.EX +\fIsh#\fR\~groffer\~man:groff +.EE +.sp +search for the +.I \%man\~page +of +.B \%groff +even when the file +.B ./groff +exists. +. +.sp +.EX +\fIsh#\fR\~groffer\~groff.7 +\fIsh#\fR\~groffer\~7\~groff +.EE +.sp +search the +.I \%man\~page +of +.B \%groff +in +.I \%man\~section +.BR 7 . +This section search works only for a digit or a single character from +a small set. +. +.sp +.EX +\fIsh#\fR\~groffer\~fb.modes +.EE +.sp +If the file +.B ./fb.modes +does not exist interpret this as a search for the +.I \%man\~page +of +.BR fb.modes . +As the extension +.I \%modes +is not a single character in classical section style the argument is +not split to a search for +.BR fb . +. +.sp +.EX +\fIsh#\fR\~groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff +.EE +.sp +The arguments that are not existing files are looked-up as the +following +.IR \%man\~pages : +.B \%groff +(automatic search, should be found in \fIman\fP\~section\~1), +.B \%troff +(in section\~1), +and +.B \%roff +(in the section with the lowest number, being\~7 in this case). +. +The quotes around +.nh +.I \[cq]troff(1)\[cq] +.hy +are necessary because the parentheses are special shell characters; +escaping them with a backslash character +.I \[rs]( +and +.I \[rs]) +would be possible, too. +. +The formatted files are concatenated and displayed in one piece. +. +.sp +.EX +\fIsh#\fR\~LANG=de\~groffer\~\-\-man\~\-\-viewer=galeon\~ls +.EE +.sp +Retrieve the German +.I \%man\~page +(language +.IR de ) +for the +.B ls +program, decompress it, format it to +.I \%html +format +.nh +.RI ( \%www\~mode ) +.hy +and view the result in the web browser +.BR \%galeon . +The option +.B \-\-man +guarantees that the +.I \%man\~page +is retrieved, even when a local file +.B \%ls +exists in the actual directory. +. +. +.sp +.EX +\fIsh#\fR\~groffer\~\-\-source\~'man:roff(7)' +.EE +.sp +Get the +.I \%man\~page +called +.I \%roff +in \fIman\fP\~section 7, decompress it, and print its unformatted +content, its source code. +. +. +.sp +.EX +\fIsh#\fR\~groffer\~\-\-de-p\~\-\-in\~\-\-ap +.EE +.sp +This is a set of abbreviated arguments, it is determined as +.br +.sp +.EX +\fIsh#\fR\~groffer\~\-\-debug-params\~\-\-intermediate-output\~\-\-apropos +.EE +.sp +. +.sp +.EX +\fIsh#\fR\~cat\~file.gz\~|\~groffer\~-Z\~-mfoo +.EE +.sp +. +The file +.B file.gz +is sent to standard input, this is decompressed, and then this is +transported to the +.I \%groff intermediate output mode +without post-processing +.RB ( groff +option +.BR \-Z ), +using macro package +.I \%foo +.RB ( groff +option +.BR \-m ). +. +. +.sp +.EX +\fIsh#\fR\~echo\~'\[rs]f[CB]WOW!'\~| +> groffer \-\-x \-\-bg red \-\-fg yellow \-\-geometry 200x100 \- +.EE +.sp +. +Display the word \f[CB]WOW!\fP in a small window in constant-width +bold font, using color yellow on red background. +. +. +.\" -------------------------------------------------------------------- +.SH "COMPATIBILITY" +.\" -------------------------------------------------------------------- +. +The +.B \%groffer +program is written in Perl, the Perl version during writing was v5.8.8. +. +. +.P +.B \%groffer +provides its own parser for command line arguments that is compatible +to both \%\f[CR]POSIX\fP +.BR \%getopts (1) +and \%\f[CR]GNU\fP +.BR \%getopt (1). +It can handle option arguments and file names containing white space +and a large set of special characters. +. +The following standard types of options are supported. +. +. +.IP \*(BU 2m +The option consisting of a single minus +.B \- +refers to standard input. +. +. +.IP \*(BU 2m +A single minus followed by characters refers to a single character +option or a combination thereof; for example, the +.B \%groffer +short option combination +.B \-Qmfoo +is equivalent to +.BR \-Q\~\-m\~foo . +. +. +.IP \*(BU 2m +Long options are options with names longer than one character; they +are always preceded by a double minus. +. +An option argument can either go to the next command line argument or +be appended with an equal sign to the argument; for example, +.B \-\-long=arg +is equivalent to +.BR \-\-long\~arg . +. +. +.IP \*(BU 2m +An argument of +.B \-\- +ends option parsing; all further command line arguments are +interpreted as +.I \%filespec +parameters, i.e.\& file names or constructs for searching +.IR \%man\~pages ). +. +. +.IP \*(BU 2m +All command line arguments that are neither options nor option +arguments are interpreted as +.I \%filespec +parameters and stored until option parsing has finished. +. +For example, the command line +.sp +.EX +\fIsh#\fR\~groffer file1 \-a \-o arg file2 +.EE +.sp +is equivalent to +.sp +.EX +\fIsh#\fR\~groffer \-a \-o arg \-\- file1 file2 +.EE +.sp +. +.P +The free mixing of options and +.I \%filespec +parameters follows the GNU principle. +. +That does not fulfill the strange option behavior of \%\f[CR]POSIX\fP +that ends option processing as soon as the first non-option argument +has been reached. +. +The end of option processing can be forced by the option +.RB ` \-\- ' +anyway. +. +. +.\" -------------------------------------------------------------------- +.SH "BUGS" +.\" -------------------------------------------------------------------- +. +Report bugs to the +.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 +.B \%groffer +you are using. +. +. +.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" +.\" -------------------------------------------------------------------- +. +.P +.BR \%groff (@MAN1EXT@), +.BR \%@g@troff (@MAN1EXT@) +.RS +Details on the options and environment variables available in +.BR \%groff ; +all of them can be used with +.BR \%groffer . +.RE +. +. +.TP +.BR \%grog (@MAN1EXT@) +This program tries to guess the necessary +.B \%groff +command line options from the input and the +.B groffer +options. +. +. +.TP +.BR \%groff (@MAN7EXT@) +Documentation of the +.I \%groff +language. +. +. +.TP +.BR groff_char (@MAN7EXT@) +Documentation on the +.I \%groff +characters, special characters, and glyphs.. +. +. +.TP +.BR groff_tmac (@MAN5EXT@) +Documentation on the +.I \%groff +macro files. +. +. +.TP +.BR groff_out (@MAN5EXT@) +Documentation on the +.I \%groff intermediate output +before the run of a +.IR postprocessor . +.nh +.RI ( ditroff +output). +.hy +. +This can be run by the +.B groff +or +.B groffer +option +.BR -Z . +. +. +.TP +.BR \%man (1) +The standard program to display +.IR \%man\~pages . +. +The information there is only useful if it is the +.I \%man\~page +for GNU +.BR man . +Then it documents the options and environment variables that are +supported by +.BR \%groffer . +. +. +.TP +.BR \%gxditview (@MAN1EXT@) +.TQ +.BR \%xditview (1x) +.RS +Viewers for +.BR \%groffer 's +.IR \%x\~mode . +.RE +. +. +.TP +.BR \%kpdf (1) +.TQ +.BR \%kghostview (1) +.TQ +.BR \%evince (1) +.TQ +.BR \%ggv (1) +.TQ +.BR \%gv (1) +.TQ +.BR \%ghostview (1) +.TQ +.BR \%gs (1) +Viewers for +.BR \%groffer 's +.IR \%ps\~mode . +. +. +.TP +.BR \%kpdf (1) +.TQ +.BR \%acroread (1) +.TQ +.BR \%evince (1) +.TQ +.BR \%xpdf (1) +.TQ +.BR \%gpdf (1) +.TQ +.BR \%kghostview (1) +.TQ +.BR \%ggv (1) +Viewers for +.BR \%groffer 's +.IR \%pdf\~mode . +. +. +.P +.BR \%kdvi (1), +.BR \%xdvi (1), +.BR \%dvilx (1) +.RS +Viewers for +.BR \%groffer 's +.IR \%dvi\~mode . +.RE +. +. +.TP +.BR \%konqueror (1) +.TQ +.BR \%epiphany (1) +.TQ +.BR \%firefox (1) +.TQ +.BR \%mozilla (1) +.TQ +.BR \%netscape (1) +.TQ +.BR \%lynx (1) +Web-browsers for +.BR \%groffer 's +.I \%html +or +.IR \%www\~mode . +. +. +.TP +.BR \%less (1) +.TQ +.BR more (1) +Standard pager program for the +.IR \%tty\~mode . +. +. +.TP +.BR \%gzip (1) +.TQ +.BR \%bzip2 (1) +.TQ +.BR \%xz (1) +The decompression programs supported by +.BR \%groffer . +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/groffer/groffer.pl groff-1.22.3/contrib/groffer/groffer.pl --- groff-1.22.2/contrib/groffer/groffer.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/groffer.pl 2014-11-04 09:38:35.477520847 +0100 @@ -0,0 +1,326 @@ +#! /usr/bin/env perl + +# groffer - display groff files + +# Source file position: /contrib/groffer/groffer.pl +# Installed position: /bin/groffer + +# Copyright (C) 2006-2014 +# Free Software Foundation, Inc. + +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + +######################################################################## + +use strict; +use warnings; +#use diagnostics; + +# temporary dir and files +use File::Temp qw/ tempfile tempdir /; + +# needed for temporary dir +use File::Spec; + +# for `copy' and `move' +use File::Copy; + +# for fileparse, dirname and basename +use File::Basename; + +# current working directory +use Cwd; + +# $Bin is the directory where this script is located +use FindBin; + + +######################################################################## +# system variables and exported variables +######################################################################## + +require 5.6.1; + +our $Dev_Null; +our $Umask; +our @Path; +our $Start_Dir; + +our $tmpdir = ''; +our ($fh_cat, $tmp_cat); +our ($fh_stdin, $tmp_stdin); + +our @Addopts_Groff; +our %Debug; +our %Opt; + +our $Has_Compression; +our $Has_bzip; + +our $Output_File_Name; + +our $Apropos_Prog; +our $Filespec_Arg; +our $Filespec_Is_Man; +our $Macro_Pkg; +our $Manspec; +our $No_Filespecs; +our $Special_Filespec; +our $Special_Setup; + +our %Man; + +BEGIN { + $Dev_Null = File::Spec->devnull(); + + $Umask = umask 077; + + $Start_Dir = getcwd; + + # flush after each print or write command + $| = 1; +} + + +######################################################################## +# read-only variables with double-@ construct +######################################################################## + +our $File_split_env_sh; +our $File_version_sh; +our $Groff_Version; + +my $before_make; # script before run of `make' +{ + my $at = '@'; + $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; +} + +my %at_at; +my $groffer_libdir; + +if ($before_make) { + my $groffer_source_dir = $FindBin::Bin; + $at_at{'BINDIR'} = $groffer_source_dir; + $at_at{'G'} = ''; + $at_at{'LIBDIR'} = ''; + $groffer_libdir = $groffer_source_dir; + $File_version_sh = File::Spec->catfile($groffer_source_dir, 'version.sh'); + $Groff_Version = ''; +} else { + $Groff_Version = '@VERSION@'; + $at_at{'BINDIR'} = '@BINDIR@'; + $at_at{'G'} = '@g@'; + $at_at{'LIBDIR'} = '@libdir@'; + $groffer_libdir = '@groffer_dir@'; + $File_version_sh = File::Spec->catfile($groffer_libdir, 'version.sh'); +} + +die "$groffer_libdir is not an existing directory;" + unless -d $groffer_libdir; + +unshift(@INC, $groffer_libdir); + +$File_split_env_sh = File::Spec->catfile($groffer_libdir, 'split_env.sh'); +die "$File_split_env_sh does not exist;" unless -f "$File_split_env_sh"; + +require 'subs.pl'; +require 'main_subs.pl'; +require 'man.pl'; + +@Path = &path_uniq( File::Spec->path() ); + +if ( &where_is_prog('gzip') ) { + $Has_Compression = 1; + $Has_bzip = 1 if &where_is_prog('bzip2'); +} + + +######################################################################## +# modes, viewers, man sections, and defaults +######################################################################## + +# configuration files +our @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(), + 'etc', 'groff', 'groffer.conf'), + File::Spec->catfile("$ENV{'HOME'}", '.groff', + 'groffer.conf') + ); + +our @Default_Modes = ('pdf', 'pdf2', 'html', 'ps', 'x', 'dvi', 'tty'); +our $Default_Resolution = 100; +our $Default_tty_Device = 'utf8'; + +our @Macro_Packages = ('-man', '-mdoc', '-me', '-mm', '-mom', '-ms'); + +our %Viewer_tty = ('DVI' => [], + 'HTML' => ['lynx', 'w3m'], + 'PDF' => [], + 'PS' => [], + 'TTY' => ['less -r -R', 'more', 'pager'], + 'X' => [], + ); + +our %Viewer_X = ('DVI' => ['kdvi', 'xdvi', 'dvilx'], + 'HTML' => ['konqueror', 'epiphany'. 'mozilla-firefox', + 'firefox', 'mozilla', 'netscape', 'galeon', + 'opera', 'amaya','arena', 'mosaic'], + 'PDF' => ['okular', 'kpdf', 'acroread', 'evince', + 'xpdf -z 150', 'gpdf', 'xpdf', 'zathura'. + 'epdfview', 'qpdfview', 'apvlv', 'qpdfview', + 'kghostview --scale 1.45', 'gv', 'ggv'], + 'PS' => ['okular', 'evince', 'gv', + 'gs', 'gs_x11', 'ghostscript', 'ghostview', + 'kghostview --scale 1.45', 'ggv', 'kpdf'], + 'TTY' => ['xless'], + 'X' => ['gxditview', 'xditview'], + ); + +%Man = ('ALL' => 0, + 'AUTO_SEC' => ['1', '2', '3', '4', '5', '6', '7', '8', '9', + 'n', 'o'], + 'ENABLE' => 1, + 'EXT' => '', + 'FORCE' => 0, + 'IS_SETUP' => 0, + 'MANSPEC' => {}, + 'LANG' => '', + 'LANG2' => '', + 'PATH' => [], + 'SEC' => [], + 'SEC_CHARS' => '', + 'SYS' => [], + ); +$Man{'AUTO_SEC_CHARS'} = join('', @{$Man{'AUTO_SEC'}}); + + +######################################################################## +# given options +######################################################################## + +our %Opts_Cmdline_Short; +our %Opts_Cmdline_Long; +our $Opts_Cmdline_Long_Str; +our %Opts_Cmdline_Double; +our %Opts_Groff_Short; + +&main_set_options(); + + +######################################################################## +# $MANOPT +######################################################################## + +# handle environment variable $MANOPT +our @Manopt; + +&main_parse_MANOPT(); + + +######################################################################## +# configuration files, $GROFFER_OPT, and command line, main_config_params() +######################################################################## + +our @Options; +our @Filespecs; +our @Starting_Conf; +our @Starting_ARGV = @ARGV; + +&main_config_params(); + +if (0) { + print STDERR "<$_>\n" foreach @ARGV; +} + + +######################################################################## +# main_parse_params() +######################################################################## + +$Opt{'XRM'} = []; + +our $i = 0; +our $n = $#Options; + +&main_parse_params(); + + +######################################################################## +# main_set_mode() +######################################################################## + +our $Viewer_Background; +our $PDF_Did_Not_Work; +our $PDF_Has_gs; +our $PDF_Has_ps2pdf; +our %Display = ('MODE' => '', + 'PROG' => '', + 'ARGS' => '' + ); + +&main_set_mode(); + + +######################################################################## +# groffer temporary directory, main_temp() +######################################################################## + +&main_temp(); + + +######################################################################## +# tmp functions and compression +######################################################################## + +######################################################################## +# main_do_fileargs() and related subs +######################################################################## + +our @REG_TITLE = (); + +&main_do_fileargs(); + + + +######################################################################## +# main_set_resources() +######################################################################## + +&main_set_resources(); + + +######################################################################## +# set resources +######################################################################## + +our $groggy; +our $modefile; +our $addopts; + +&main_display(); + +&clean_up(); + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/groffer/main_subs.pl groff-1.22.3/contrib/groffer/main_subs.pl --- groff-1.22.2/contrib/groffer/main_subs.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/main_subs.pl 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,2112 @@ +#! /usr/bin/env perl + +# groffer - display groff files + +# Source file position: /contrib/groffer/subs.pl +# Installed position: /lib/groff/groffer/subs.pl + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 file contains the main functions formerly in `groff.pl' + +use strict; +use warnings; + + +######################################################################## +# main_set_options() +######################################################################## + +sub main_set_options { + our %Opts_Cmdline_Short; + our %Opts_Cmdline_Long; + our $Opts_Cmdline_Long_Str; + our %Opts_Cmdline_Double; + our %Opts_Groff_Short; + + # the following options are ignored in groffer.pl, but are kept from + # groffer.sh: --shell arg, --debug-shell + + my @opts_ignored_short_na = (); + my @opts_ignored_short_arg = (); + + my @opts_ignored_long_na = ('debug-shell'); + + my @opts_ignored_long_arg = ('shell'); + + + ###### groffer native options + + my @opts_groffer_short_na = ('h', 'Q', 'v', 'V', 'X', 'Z'); + my @opts_groffer_short_arg = ('T'); + + my @opts_groffer_long_na = ('auto', 'apropos', 'apropos-data', + 'apropos-devel', 'apropos-progs', 'debug', 'debug-all', + 'debug-filenames', 'debug-func', 'debug-grog', 'debug-not-func', + 'debug-keep', 'debug-lm', 'debug-params', 'debug-stacks', + 'debug-tmpdir', 'debug-user', 'default', 'do-nothing', 'dvi', + 'groff', 'help', 'intermediate-output', 'html', 'latin1', 'man', + 'no-location', 'no-man', 'no-special', 'pdf', 'pdf2', 'ps', 'rv', + 'source', 'text', 'to-stdout', 'text-device', 'tty', 'tty-device', + 'utf8', 'version', 'whatis', 'where', 'www', 'x', 'X'); + +### main_set_options() + my @opts_groffer_long_arg = + ('default-modes', 'device', 'extension', 'fg', 'fn', 'font', + 'foreground', 'mode', 'print', 'title', 'viewer', + # tty viewers are ignored + 'dvi-viewer-tty', 'html-viewer-tty', 'pdf-viewer-tty', + 'ps-viewer-tty', 'tty-viewer-tty', 'www-viewer-tty', + 'X-viewer-tty', 'x-viewer-tty', + # viewers for modes are ignored + 'dvi-viewer', 'html-viewer', 'pdf-viewer', 'ps-viewer', 'tty-viewer', + 'www-viewer', 'X-viewer', 'x-viewer', + ); + + ##### groffer options inhereted from groff + + my @opts_groff_short_na = ('a', 'b', 'c', 'C', 'e', 'E', 'g', 'G', + 'i', 'j', 'J', 'k', 'l', 'N', 'p', 'R', 's', 'S', 't', 'U', 'z'); + + my @opts_groff_short_arg = ('d', 'f', 'F', 'I', 'K', 'L', 'm', 'M', 'n', + 'o', 'P', 'r', 'w', 'W'); + + my @opts_groff_long_na = (); + my @opts_groff_long_arg = (); + + ##### groffer options inhereted from the X Window toolkit + + my @opts_x_short_na = (); + my @opts_x_short_arg = (); + + my @opts_x_long_na = ('iconic', 'rv'); + + my @opts_x_long_arg = ('background', 'bd', 'bg', 'bordercolor', + 'borderwidth', 'bw', 'display', 'fg', 'fn', 'font', 'foreground', + 'ft', 'geometry', 'resolution', 'title', 'xrm'); + +### main_set_options() + ###### groffer options inherited from man + + my @opts_man_short_na = (); + my @opts_man_short_arg = (); + + my @opts_man_long_na = ('all', 'ascii', 'catman', 'ditroff', + 'local-file', 'location', 'troff', 'update'); + + my @opts_man_long_arg = ('locale', 'manpath', 'pager', + 'preprocessor', 'prompt', 'sections', 'systems', 'troff-device'); + + ###### additional options for parsing evironment variable $MANOPT only + + my @opts_manopt_short_na = ('7', 'a', 'c', 'd', 'D', 'f', 'h', 'k', + 'l', 't', 'u', 'V', 'w', 'Z'); + + my @opts_manopt_short_arg = ('e', 'L', 'm', 'M', 'p', 'P', 'r', 'S', + 'T'); + + my @opts_manopt_long_na = (@opts_man_long_na, 'apropos', 'debug', + 'default', 'help', 'html', 'ignore-case', 'location-cat', + 'match-case', 'troff', 'update', 'version', 'whatis', 'where', + 'where-cat'); + + my @opts_manopt_long_arg = (@opts_man_long_na, 'config_file', + 'encoding', 'extension', 'locale'); + +### main_set_options() + ###### collections of command line options + + # There are two hashes that control the whole of the command line + # options, one for short and one for long options. Options without + # and with arguments are mixed by advicing a value of 0 for an option + # without argument and a value of 1 for an option with argument. + # The options are with leading minus. + + foreach (@opts_groffer_short_na, @opts_groff_short_na, + @opts_x_short_na, @opts_man_short_na, @opts_ignored_short_na) { + $Opts_Cmdline_Short{"-$_"} = 0 if $_; + } + foreach (@opts_groffer_short_arg, @opts_groff_short_arg, + @opts_x_short_arg, @opts_man_short_arg, @opts_ignored_short_arg) { + $Opts_Cmdline_Short{"-$_"} = 1 if $_; + } + + foreach (@opts_groffer_long_na, @opts_groff_long_na, + @opts_x_long_na, @opts_man_long_na, @opts_ignored_long_na) { + $Opts_Cmdline_Long{"--$_"} = 0 if $_; + } + foreach (@opts_groffer_long_arg, @opts_groff_long_arg, + @opts_x_long_arg, @opts_man_long_arg, @opts_ignored_long_arg) { + $Opts_Cmdline_Long{"--$_"} = 1 if $_; + } + + # For determining abbreviations of an option take two spaces as join + # for better check. + # The options are without leading minus. + $Opts_Cmdline_Long_Str = join ' ', keys %Opts_Cmdline_Long; + if ($Opts_Cmdline_Long_Str) { + $Opts_Cmdline_Long_Str = " $Opts_Cmdline_Long_Str "; + $Opts_Cmdline_Long_Str =~ s/--//g; + } + +### main_set_options() + # options with equal meaning are mapped to a single option name + # all of these have leading minus characters + %Opts_Cmdline_Double = ('-h' => '--help', + '-Q' => '--source', + '-T' => '--device', + '-v' => '--version', + '-Z' => '--intermediate-output', + '--bd' => '--bordercolor', + '--bg' => '--background', + '--bw' => '--borderwidth', + '--debug-all' => '--debug', + '--ditroff' => '--intermediate-output', + '--fg' => '--foreground', + '--fn' => '--font', + '--ft' => '--font', + '--latin1' => '--tty', + '--troff-device' => '--device', + '--tty-device' => '--text-device', + '--viewer' => '--viewer', + '--where' => '--location', + '--www' => '--html', + '--X' => '--x', + # '--dvi-viewer' => '--viewer', + '--dvi-viewer-tty' => '--viewer', + '--html-viewer-tty' => '--viewer', + '--pdf-viewer-tty' => '--viewer', + '--ps-viewer-tty' => '--viewer', + '--tty-viewer' => '--pager', + '--tty-viewer-tty' => '--pager', + '--www-viewer' => '--viewer', + '--www-viewer-tty' => '--pager', + '--X-viewer' => '--viewer', '--X-viewer-tty' + => '--pager', '--x-viewer' => '--viewer', + '--x-viewer-tty' => '--pager', ); + + # groff short options with leading minus + foreach (@opts_groff_short_na) { + $Opts_Groff_Short{"-$_"} = 0; + } + foreach (@opts_groff_short_arg) { + $Opts_Groff_Short{"-$_"} = 1; + } + +} # main_set_options() + + +######################################################################## +# main_parse_MANOPT +######################################################################## + +sub main_parse_MANOPT { + our @Manopt; + our $File_split_env_sh; + + if ( $ENV{'MANOPT'} ) { + @Manopt = `sh $File_split_env_sh MANOPT`; + chomp @Manopt; + + my @manopt; + # %opts stores options that are used by groffer for $MANOPT + # All options not in %opts are ignored. + # Check options used with %Opts_Cmdline_Double. + # 0: option used ('' for ignore), 1: has argument or not + ### main_parse_MANOPT() + my %opts = ('-7' => ['--ascii', 0], + '-L' => ['--locale', 1], + '-M' => ['--manpath', 1], + '-P' => ['--pager', 1], + '-S' => ['--sections', 1], + '-T' => ['-T', 1], + '-w' => ['--location', 0], + '-a' => ['--all', 0], + '-c' => ['', 1], + '-e' => ['--extension', 1], + '-f' => ['--whatis', 1], + '-m' => ['--systems', 1], + '-p' => ['', 1], + '-r' => ['', 1], + '-manpath' => ['--manpath', 1], + '-pager' => ['--pager', 1], + '-prompt' => ['', 1], + '-sections' => ['--sections', 1], + '--all' => ['--all', 0], + '--ascii' => ['--ascii', 0], + '--catman' => ['', 1], + '--device' => ['-T', 1], + '--extension' => ['--extension', 1], + '--locale' => ['--locale', 1], + '--location' => ['--location', 0], + '--manpath' => ['--manpath', 1], + '--preprocessor' => ['', 1], + '--systems' => ['--systems', 1], + '--whatis' => ['--whatis', 1], + '--where' => ['--location', 0], + ); + +### main_parse_MANOPT() + my ($opt, $has_arg); + my $i = 0; + my $n = $#Manopt; + while ($i <= $n) { + my $o = $Manopt[$i]; + ++$i; + # ignore, when not in %opts + next unless (exists $opts{$o}); + if (($o eq '-D') or ($o eq '--default')) { + @manopt = (); + next; + } + $opt = $opts{$o}[0]; + $has_arg = $opts{$o}[1]; + # ignore, when empty in %opts + unless ($opt) { + # ignore without argument + next unless ($has_arg); + # ignore the argument as well + ++$i; + next; + } + if ($has_arg) { + last if ($i > $n); + push @manopt, $opt, $Manopt[$i]; + ++$i; + next; + } else { + push @manopt, $opt; + next; + } + } + @Manopt = @manopt; + } +} # main_parse_MANOPT() + + +######################################################################## +# configuration files, $GROFFER_OPT, and command line, main_config_params() +######################################################################## + +sub main_config_params { # handle configuration files + our @Options; + our @Filespecs; + our @Starting_Conf; + our @Starting_ARGV = @ARGV; + + our %Opts_Cmdline_Short; + our %Opts_Cmdline_Long; + our $Opts_Cmdline_Long_Str; + our %Opts_Cmdline_Double; + our %Opts_Groff_Short; + + our $File_split_env_sh; + our @Manopt; + our @Conf_Files; + + # options may not be abbreviated, but must be exact + my @conf_args; + foreach my $f ( @Conf_Files ) { + if (-s $f) { + my $fh; + open $fh, "<$f" || next; + my $nr = 0; + LINE: foreach my $line (<$fh>) { + ++ $nr; + chomp $line; + # remove starting and ending whitespace + $line =~ s/^\s+|\s+$//g; + # replace whitespace by single space + $line =~ s/\s+/ /g; + # ignore all lines that do not start with minus + next unless $line =~ /^-/; + # three minus + if ($line =~ /^---/) { + warn "Wrong option $line in configuration file $f.\n"; + next; + } + if ( $line =~ /^--[ =]/ ) { + warn "No option name in `$line' in configuration " . + "file $f.\n"; + next; + } + push @Starting_Conf, $line; + # -- or - + if ($line =~ /^--?$/) { + warn "`$line' is not allowed in configuration files.\n"; + next; } +### main_config_params() + if ($line =~ /^--/) { # line is long option + my ($name, $arg); + if ($line =~ /[ =]/) { # has arg on line $line =~ + /^(--[^ =]+)[ =] ?(.*)$/; + ($name, $arg) = ($1, $2); + $arg =~ s/[\'\"]//g; + } else { # does not have an argument on line + $name = $line; + } $name =~ s/[\'\"]//g; + unless (exists $Opts_Cmdline_Long{$name}) { + # option does not exist + warn "Option `$name' does not exist.\n"; + next LINE; + } + # option exists + if ( $Opts_Cmdline_Long{$name} ) { # option has arg + if (defined $arg) { + push @conf_args, $name, $arg; + next LINE; + } else { warn "Option `$name' needs an argument in " . + "configuration file $f\n"; + next LINE; + } + } else { # option has no arg + if (defined $arg) { + warn "Option `$name' may not have an argument " . + "in configuration file $f\n"; + next LINE; + } else { + push @conf_args, $name; next LINE; + } + } +### main_config_params() + } else { # line is short option or cluster + $line =~ s/^-//; + while ($line) { + $line =~ s/^(.)//; + my $opt = "-$1"; + next if ($opt =~ /\'\"/); + if ($opt =~ /- /) { + warn "Option `$conf_args[$#conf_args]' does not " . + "have an argument.\n"; + next LINE; + } + if ( exists $Opts_Cmdline_Short{$opt} ) { + # short opt exists + push @conf_args, $opt; + if ( $Opts_Cmdline_Short{$opt} ) { # with arg + my $arg = $line; + $arg =~ s/^ //; + $arg =~ s/\'\"//g; + push @conf_args, "$arg"; + next LINE; + } else { # no arg + next; + } + } else { # short option does not exist + warn "Wrong short option `-$opt' from " . + "configuration. Rest of line ignored.\n"; + next LINE; + } + } + } + } + close $fh; + } + } + +### main_config_params() + #handle environment variable $GROFFER_OPT + my @GROFFER_OPT; + if ( $ENV{'GROFFER_OPT'} ) { + @GROFFER_OPT = `sh $File_split_env_sh GROFFER_OPT`; + chomp @GROFFER_OPT; + } + + # Handle command line parameters together with $GROFFER_OPT. + # Options can be abbreviated, with each - as abbreviation place. + { + my @argv0 = (@GROFFER_OPT, @ARGV); + my @argv; + my $only_files = 0; + my $n = $#argv0; # last element + my $n1 = scalar @GROFFER_OPT; # first element of @ARGV + my $i = 0; # number of the element + my @s = ('the environment variable $GROFFER_OPT', 'the command line'); + my $j = 0; # index in @s, 0 before $n1, 1 then + ELT: while ($i <= $n) { + my $elt = $argv0[$i]; + $j = 1 if $i >= $n1; + ++$i; + # remove starting and ending whitespace + $elt =~ s/^\s+|\s+$//g; + # replace whitespace by single space + $elt =~ s/\s+/ /g; + + if ($only_files) { + push @Filespecs, $elt; + next ELT; + } + +### main_config_params() + if ( $elt =~ /^-$/ ) { # - + push @Filespecs, $elt; + next ELT; + } + if ($elt =~ /^--$/) { # -- + $only_files = 1; + next ELT; + } + + if ($elt =~ /^--[ =]/) { # no option name + warn "No option name in `$elt' at $s[$j].\n"; + next ELT; + } + if ($elt =~ /^---/) { # wrong with three minus + warn "Wrong option `$elt' at $s[$j].\n"; + next ELT; + } + + if ($elt =~ /^--[^-]/) { # long option + my ($name, $opt, $abbrev, $arg); + if ($elt =~ /[ =]/) { # has arg on elt + $elt =~ /^--([^ =]+)[ =] ?(.*)$/; + ($name, $arg) = ($1, $2); + $opt = "--$name"; + $abbrev = $name; + $arg =~ s/[\'\"]//g; + } else { # does not have an argument in the element + $opt = $name = $elt; + $name =~ s/^--//; + $abbrev = $name; + } +### main_config_params() + # remove quotes in name + $name =~ s/[\'\"]//g; + my $match = $name; + $match =~ s/-/[^- ]*-/g; + if ( exists $Opts_Cmdline_Long{$opt} ) { + # option exists exactly + } elsif ( $Opts_Cmdline_Long_Str =~ / (${match}[^- ]*?) / ) { + # option is an abbreviation without further - + my $n0 = $1; + if ( $Opts_Cmdline_Long_Str =~ + /\s(${match}[^-\s]*)\s.*\s(${match}[^-\s]*) / ) { + warn "Option name `--$abbrev' is not unique: " . + "--$1 --$2 \n"; + next ELT; + } + $name = $n0; + $opt = "--$n0"; + } elsif ( $Opts_Cmdline_Long_Str =~ /\s(${match}[^\s]*)\s/ ) { + # option is an abbreviation with further - + my $n0 = $1; + if ( $Opts_Cmdline_Long_Str =~ + /\s(${match}[^\s]*)\s.*\s(${match}[^\s]*)\s/ ) { + warn "Option name `--$abbrev' is not unique: " . + "--$1 --$2 \n"; + next ELT; + } + $name = $n0; + $opt = "--$n0"; + } else { + warn "Option `--$abbrev' does not exist.\n"; + next ELT; + } +### main_config_params() + if ( $Opts_Cmdline_Long{$opt} ) { # option has arg + if (defined $arg) { + push @argv, "--$name", $arg; + next ELT; + } else { # $arg not defined, argument at next element + if (($i == $n1) || ($i > $n)) { + warn "No argument left for option " . + "`$elt' at $s[$j].\n"; + next ELT; } + # add argument as next element + push @argv, "--$name", $argv0[$i]; + ++$i; + next ELT; + } # if (defined $arg) + } else { # option has no arg + if (defined $arg) { + warn "Option `$abbrev' may not have an argument " . + "at $s[$j].\n"; + next ELT; + } else { + push @argv, "--$name"; + next ELT; + } + } # if ($Opts_Cmdline_Long{$opt}) +### main_config_params() + } elsif ( $elt =~ /^-[^-]/ ) { # short option or cluster + my $cluster = $elt; + $cluster =~ s/^-//; + while ($cluster) { + $cluster =~ s/^(.)//; + my $opt = "-$1"; + if ( exists $Opts_Cmdline_Short{$opt} ) { # opt exists + if ( $Opts_Cmdline_Short{$opt} ) { # with arg + if ($cluster) { # has argument in this element + $cluster =~ s/^\s//; + $cluster =~ s/\'\"//g; + # add argument as rest of this element + push @argv, $opt, $cluster; + next ELT; + } else { # argument at next element + if (($i == $n1) || ($i > $n)) { + warn "No argument left for option " . + "`$opt' at $s[$j].\n"; + next ELT; } +### main_config_params() + # add argument as next element + push @argv, $opt, $argv0[$i]; + ++$i; + next ELT; + } + } else { # no arg + push @argv, $opt; next; + } + } else { # short option does not exist + warn "Wrong short option `$opt' at $s[$j].\n"; + next ELT; + } # if (exists $Opts_Cmdline_Short{$opt}) + } # while ($cluster) + } else { # not an option, file name + push @Filespecs, $elt; + next; + } + } +### main_config_params() + @Options = (@Manopt, @conf_args, @argv); + foreach my $i ( 0..$#Options ) { + if ( exists $Opts_Cmdline_Double{$Options[$i]} ) { + $Options[$i] = $Opts_Cmdline_Double{ $Options[$i] }; + } + } @Filespecs = ('-') unless (@Filespecs); + @ARGV = (@Options, '--', @Filespecs); + } +} # main_config_params() + + +######################################################################## +# main_parse_params() +######################################################################## + +sub main_parse_params { + # options that are ignored in this part + # shell version of groffer: --debug*, --shell + # man options: --catman (only special in man), + # --preprocessor (force groff preproc., handled by grog), + # --prompt (prompt for less, ignored), + # --troff (-mandoc, handled by grog), + # --update (inode check, ignored) + our %Opt; + our %Man; + our %Debug; + our %Opts_Cmdline_Short; + our %Opts_Cmdline_Double; + our %Opts_Cmdline_Long; + our %Opts_Groff_Short; + our $i; + our $n; + our @Starting_ARGV; + our @Starting_Conf; + our @Default_Modes; + our @Addopts_Groff; + our @Options; + + my %ignored_opts = ( + '--catman' => 0, + '--debug-func' => 0, + '--debug-not-func' => 0, + '--debug-lm' => 0, + '--debug-shell' => 0, + '--debug-stacks' => 0, + '--debug-user' => 0, + '--preprocessor' => 1, + '--prompt' => 1, + '--shell' => 1, + '--troff' => 0, + '--update' => 0, + ); + +### main_parse_params() + my %long_opts = + ( + '--debug' => + sub { $Debug{$_} = 1 foreach (qw/FILENAMES GROG KEEP PARAMS TMPDIR/); }, + '--debug-filenames' => sub { $Debug{'FILENAMES'} = 1; }, + '--debug-grog' => sub { $Debug{'GROG'} = 1; }, + '--debug-keep' => sub { $Debug{'KEEP'} = 1; $Debug{'PARAMS'} = 1; }, + '--debug-params' => sub { $Debug{'PARAMS'} = 1; }, + '--debug-tmpdir' => sub { $Debug{'TMPDIR'} = 1; }, + '--help' => sub { &usage(); $Opt{'DO_NOTHING'} = 1; }, + '--source' => sub { $Opt{'MODE'} = 'source'; }, + '--device' => + sub { $Opt{'DEVICE'} = &_get_arg(); + my %modes = ( + 'ascii' => 'tty', + 'cp1047' => 'tty', + 'dvi'=> 'dvi', + 'html' => 'html', + 'latin1' => 'tty', + 'lbp' => 'groff', + 'lj4' => 'groff', + 'pdf' => 'pdf', + 'pdf2' => 'pdf2', + 'ps' => 'ps', + 'utf8' => 'tty', + ); + if ($Opt{'DEVICE'} =~ /^X.*/) { + $Opt{'MODE'} = 'x'; + } elsif ( exists $modes{ $Opt{'DEVICE'} } ) { + if ( $modes{ $Opt{'DEVICE'} } eq 'tty' ) { + $Opt{'MODE'} = 'tty' + unless ($Opt{'MODE'} eq 'text'); + } else { + $Opt{'MODE'} = $modes{ $Opt{'DEVICE'} }; + } + } else { + # for all elements not in %modes + $Opt{'MODE'} = 'groff'; + } + }, +### main_parse_params() + '--version' => sub { &version(); $Opt{'DO_NOTHING'} = 1; }, + '--intermediate-output' => sub { $Opt{'Z'} = 1; }, + '--all' => sub { $Opt{'ALL'} = 1; }, + '--apropos' => # run apropos + sub { $Opt{'APROPOS'} = 1; + delete $Opt{'APROPOS_SECTIONS'}; + delete $Opt{'WHATIS'}; }, + '--apropos-data' => # run apropos for data sections + sub { $Opt{'APROPOS'} = 1; + $Opt{'APROPOS_SECTIONS'} = '457'; + delete $Opt{'WHATIS'}; }, + '--apropos-devel' => # run apropos for devel sections + sub { $Opt{'APROPOS'} = 1; + $Opt{'APROPOS_SECTIONS'} = '239'; + delete $Opt{'WHATIS'}; }, + '--apropos-progs' => # run apropos for prog sections + sub { $Opt{'APROPOS'} = 1; + $Opt{'APROPOS_SECTIONS'} = '168'; + delete $Opt{'WHATIS'}; }, + '--ascii' => + sub { push @Addopts_Groff, '-mtty-char'; + $Opt{'MODE'} = 'text' unless $Opt{'MODE'}; }, + '--auto' => # the default automatic mode + sub { delete $Opt{'MODE'}; }, + '--bordercolor' => # border color for viewers, arg + sub { $Opt{'BD'} = &_get_arg(); }, + '--background' => # background color for viewers, arg + sub { $Opt{'BG'} = &_get_arg(); }, +### main_parse_params() + '--borderwidth' => # border width for viewers, arg + sub { $Opt{'BW'} = &_get_arg(); }, + '--default' => # reset variables to default + sub { %Opt = (); }, + '--default-modes' => # sequence of modes in auto mode; arg + sub { $Opt{'DEFAULT_MODES'} = &_get_arg(); }, + '--display' => # set X display, arg + sub { $Opt{'DISPLAY'} = &_get_arg(); }, + '--do-nothing' => sub { $Opt{'DO_NOTHING'} = 1; }, + '--dvi' => sub { $Opt{'MODE'} = 'dvi'; }, + '--extension' => # the extension for man pages, arg + sub { $Opt{'EXTENSION'} = &_get_arg(); }, + '--foreground' => # foreground color for viewers, arg + sub { $Opt{'FG'} = &_get_arg(); }, + '--font' => # set font for viewers, arg + sub { $Opt{'FN'} = &_get_arg(); }, + '--geometry' => # window geometry for viewers, arg + sub { $Opt{'GEOMETRY'} = &_get_arg(); }, + '--groff' => sub { $Opt{'MODE'} = 'groff'; }, + '--html' => sub { $Opt{'MODE'} = 'html'; }, + '--iconic' => # start viewers as icons + sub { $Opt{'ICONIC'} = 1; }, + '--locale' => # set language for man pages, arg + # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) + sub { $Opt{'LANG'} = &_get_arg(); }, + '--local-file' => # force local files; same as `--no-man' + sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; }, + '--location' => # print file locations to stderr + sub { $Opt{'LOCATION'} = 1; }, +### main_parse_params() + '--man' => # force all file params to be man pages + sub { $Man{'ENABLE'} = 1; $Man{'FORCE'} = 1; }, + '--manpath' => # specify search path for man pages, arg + # arg is colon-separated list of directories + sub { $Opt{'MANPATH'} = &_get_arg(); }, + '--mode' => # display mode + sub { my $arg = &_get_arg(); + my %modes = ( '' => '', + 'auto' => '', + 'groff' => 'groff', + 'html' => 'html', + 'www' => 'html', + 'dvi' => 'dvi', + 'pdf' => 'pdf', + 'pdf2' => 'pdf2', + 'ps' => 'ps', + 'text' => 'text', + 'tty' => 'tty', + 'X' => 'x', + 'x' => 'x', + 'Q' => 'source', + 'source' => 'source', + ); + if ( exists $modes{$arg} ) { + if ( $modes{$arg} ) { + $Opt{'MODE'} = $modes{$arg}; + } else { + delete $Opt{'MODE'}; + } + } else { + warn "Unknown mode in `$arg' for --mode\n"; + } + }, +### main_parse_params() + '--no-location' => # disable former call to `--location' + sub { delete $Opt{'LOCATION'}; }, + '--no-man' => # disable search for man pages + sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; }, + '--no-special' => # disable some special former calls + sub { delete $Opt{'ALL'}; delete $Opt{'APROPOS'}; + delete $Opt{'WHATIS'}; }, + '--pager' => # set paging program for tty mode, arg + sub { $Opt{'PAGER'} = &_get_arg(); }, + '--pdf' => sub { $Opt{'MODE'} = 'pdf'; }, + '--pdf2' => sub { $Opt{'MODE'} = 'pdf2'; }, + '--print' => # print argument, for argument test + sub { my $arg = &_get_arg; print STDERR $arg . "\n"; }, + '--ps' => sub { $Opt{'MODE'} = 'ps'; }, + '--resolution' => # set resolution for X devices, arg + sub { my $arg = &_get_arg(); + my %res = ( '75' => 75, + '75dpi' => 75, + '100' => 100, + '100dpi' => 100, + ); + if (exists $res{$arg}) { + $Opt{'RESOLUTION'} = $res{$arg}; + } else { + warn "--resolution allows only 75, 75dpi, " . + "100, 100dpi as argument.\n"; + } + }, +### main_parse_params() + '--rv' => sub { $Opt{'RV'} = 1; }, + '--sections' => # specify sections for man pages, arg + # arg is a `:'-separated (colon) list of section names + sub { my $arg = &_get_arg(); + my @arg = split /:/, $arg; + my $s; + foreach (@arg) { + /^(.)/; + my $c = $1; + if ($Man{'AUTO_SEC_CHARS'} =~ /$c/) { + $s .= $c; + } else { + warn "main_parse_params(): not a man section `$c';"; + } + } + $Opt{'SECTIONS'} = $s; }, + '--systems' => # man pages for different OS's, arg + # argument is a comma-separated list + sub { $Opt{'SYSTEMS'} = &_get_arg(); }, + '--text' => # text mode without pager + sub { $Opt{'MODE'} = 'text'; }, + '--title' => # title for X viewers; arg + sub { my $arg = &_get_arg(); + if ($arg) { + if ( $Opt{'TITLE'} ) { + $Opt{'TITLE'} = "$Opt{'TITLE'} $arg"; + } else { + $Opt{'TITLE'} = $arg; + } + } + }, + '--text-device' => # device for tty mode; arg + sub { $Opt{'TEXT_DEVICE'} = &_get_arg(); }, + '--to-stdout' => # print mode file without display + sub { $Opt{'STDOUT'} = 1; }, + '--tty' => # tty mode, text with pager + sub { $Opt{'MODE'} = 'tty'; }, + '--viewer' => # viewer for actiual mode + sub { $Opt{'VIEWER'} = &_get_arg(); }, + '--whatis' => sub { delete $Opt{'APROPOS'}; $Opt{'WHATIS'} = 1; }, + '--x' => sub { $Opt{'MODE'} = 'x'; }, +### main_parse_params() + '--xrm' => # pass X resource string, arg + sub { my $arg = &_get_arg(); push @{$Opt{'XRM'}}, $arg if $arg; }, + ); + +# '--dvi-viewer' => # viewer program for dvi mode; arg +# sub { $Opt{'VIEWER_DVI'} = &_get_arg(); }, +# '--html-viewer' => # viewer program for html mode; arg +# sub { $Opt{'VIEWER_HTML'} = &_get_arg(); }, +# '--pdf-viewer' => # viewer program for pdf and pdf2 mode; arg +# sub { $Opt{'VIEWER_PDF'} = &_get_arg(); }, +# '--ps-viewer' => # viewer program for ps mode; arg +# sub { $Opt{'VIEWER_PS'} = &_get_arg(); }, +# '--x-viewer' => # viewer program for x mode; arg +# sub { $Opt{'VIEWER_X'} = &_get_arg(); }, + + my %short_opts = ( + '-V' => sub { $Opt{'V'} = 1; }, + '-X' => sub { $Opt{'X'} = 1; }, + ); + + if (0) { + # check if all options are handled in parse parameters + + # short options + my %these_opts = (%ignored_opts, %short_opts, %Opts_Groff_Short, + %Opts_Cmdline_Double); + foreach my $key (keys %Opts_Cmdline_Short) { + warn "unused option: $key" unless exists $these_opts{$key}; + } + + # long options + %these_opts = (%ignored_opts, %long_opts, %Opts_Cmdline_Double); + foreach my $key (keys %Opts_Cmdline_Long) { + warn "unused option: $key" unless exists $these_opts{$key}; + } + } # if (0) + +### main_parse_params() + OPTION: while ($i <= $n) { + my $opt = $Options[$i]; + ++$i; + if ($opt =~ /^-([^-])$/) { # single minus for short option + if (exists $short_opts{$opt}) { # short option handled by hash + $short_opts{$opt}->(); + next OPTION; + } else { # $short_opts{$opt} does not exist + my $c = $1; # the option character + next OPTION unless $c; + if ( exists $Opts_Groff_Short{ $opt } ) { # groff short option + if ( $Opts_Groff_Short{ $opt } ) { # option has argument + my $arg = $Options[$i]; + ++$i; + push @Addopts_Groff, $opt, $arg; + next OPTION; + } else { # no argument for this option + push @Addopts_Groff, $opt; + next OPTION; + } + } elsif ( exists $Opts_Cmdline_Short{ $opt } ) { + # is a groffer short option + warn "Groffer option $opt not handled " . + "in parameter parsing"; + } else { + warn "$opt is not a groffer option.\n"; + } + } # if (exists $short_opts{$opt}) + } # if ($opt =~ /^-([^-])$/) + # now it is a long option + + # handle ignored options + if ( exists $ignored_opts{ $opt } ) { + ++$i if ( $ignored_opts{ $opt } ); + next OPTION; + } +### main_parse_params() + + # handle normal long options + if (exists $long_opts{$opt}) { + $long_opts{$opt}->(); + } else { + warn "Unknown option $opt.\n"; + } + next OPTION; + } # while ($i <= $n) + + if ($Debug{'PARAMS'}) { + print STDERR '$MANOPT: ' . $ENV{'MANOPT'} . "\n" if $ENV{'MANOPT'}; + foreach (@Starting_Conf) { + print STDERR "configuration: " . $_ . "\n"; + } + print STDERR '$GROFFER_OPT: ' . $ENV{'GROFFER_OPT'} . "\n" + if $ENV{'GROFFER_OPT'}; + print STDERR "command line: @Starting_ARGV\n"; + print STDERR "parameters: @ARGV\n"; + } + + if ( $Opt{'WHATIS'} ) { + die "main_parse_params(): cannot handle both `whatis' and `apropos';" + if $Opt{'APROPOS'}; + $Man{'ALL'} = 1; + delete $Opt{'APROPOS_SECTIONS'}; + } + + if ( $Opt{'DO_NOTHING'} ) { + exit; + } + + if ( $Opt{'DEFAULT_MODES'} ) { + @Default_Modes = split /,/, $Opt{'DEFAULT_MODES'}; + } +} # main_parse_params() + + +sub _get_arg { + our $i; + our $n; + our @Options; + if ($i > $n) { + die '_get_arg(): No argument left for last option;'; + } + my $arg = $Options[$i]; + ++$i; + $arg; +} # _get_arg() of main_parse_params() + + +######################################################################## +# main_set_mode() +######################################################################## + +sub main_set_mode { + our %Opt; + + our @Default_Modes; + our @Addopts_Groff; + + our $Viewer_Background; + our $PDF_Did_Not_Work; + our $PDF_Has_gs; + our $PDF_Has_ps2pdf; + our %Display = ('MODE' => '', + 'PROG' => '', + 'ARGS' => '' + ); + + my @modes; + + # set display + $ENV{'DISPLAY'} = $Opt{'DISPLAY'} if $Opt{'DISPLAY'}; + + push @Addopts_Groff, '-V' if $Opt{'V'}; + + if ( $Opt{'X'} ) { + $Display{'MODE'} = 'groff'; + push @Addopts_Groff, '-X'; + } + + if ( $Opt{'Z'} ) { + $Display{'MODE'} = 'groff'; + push @Addopts_Groff, '-Z'; + } + + $Display{'MODE'} = 'groff' if $Opt{'MODE'} and $Opt{'MODE'} eq 'groff'; + + return 1 if $Display{'MODE'} and $Display{'MODE'} eq 'groff'; + +### main_set_mode() + if ($Opt{'MODE'}) { + if ($Opt{'MODE'} =~ /^(source|text|tty)$/) { + $Display{'MODE'} = $Opt{'MODE'}; + return 1; + } + $Display{'MODE'} = $Opt{'MODE'} if $Opt{'MODE'} =~ /^html$/; + @modes = ($Opt{'MODE'}); + } else { # empty mode + if ($Opt{'DEVICE'}) { + if ($Opt{'DEVICE'} =~ /^X/) { + &is_X() || die "no X display found for device $Opt{'DEVICE'}"; + $Display{'MODE'} = 'x'; + return 1; + } + ; + if ($Opt{'DEVICE'} =~ /^(ascii|cp1047|latin1|utf8)$/) { + $Display{'MODE'} ne 'text' and $Display{'MODE'} = 'tty'; + return 1; + } + ; + unless (&is_X) { + $Display{'MODE'} = 'tty'; + return 1; + } + } # check device + @modes = @Default_Modes; + } # check mode + +### main_set_mode() + LOOP: foreach my $m (@modes) { + $Viewer_Background = 0; + if ($m =~ /^(test|tty|X)$/) { + $Display{'MODE'} = $m; + return 1; + } elsif ($m eq 'pdf') { + &_get_prog_args($m) ? return 1: next LOOP; + } elsif ($m eq 'pdf2') { + next LOOP if $PDF_Did_Not_Work; + $PDF_Has_gs = &where_is_prog('gs') ? 1 : 0 + unless (defined $PDF_Has_gs); + $PDF_Has_ps2pdf = &where_is_prog('ps2pdf') ? 1 : 0 + unless (defined $PDF_Has_ps2pdf); + if ( (! $PDF_Has_gs) and (! $PDF_Has_ps2pdf) ) { + $PDF_Did_Not_Work = 1; + next LOOP; + } + + if (&_get_prog_args($m)) { + return 1; + } else { + $PDF_Did_Not_Work = 1; + next LOOP; + } + } else { # other modes + &_get_prog_args($m) ? return 1 : next LOOP; + } # if $m + } # loop: foreach + die 'set mode: no suitable display mode found under ' . + join(', ', @modes) . ';' unless $Display{'MODE'}; + die 'set mode: no viewer available for mode ' . $Display{'MODE'} . ';' + unless $Display{'PROG'}; + 0; +} # main_set_mode() + + +######################################################################## +# functions to main_set_mode() +######################################################################## + +########## +# _get_prog_args() +# +# Simplification for loop in set mode. +# +# Globals in/out: $Viewer_Background +# globals in : $Opt{VIEWER}, $VIEWER_X{}, +# $Viewer_tty{} +# +## globals in : $Opt{VIEWER_}, $VIEWER_X{}, +## $Viewer_tty{} +## +sub _get_prog_args { + our %Opt; + our %Display; + our %Viewer_X; + our %Viewer_tty; + + our $Viewer_Background; + my $n = @_; + die "_get_prog_args(): one argument is needed; you used $n;" + unless $n == 1; + + my $mode = lc($_[0]); + my $MODE = uc($mode); + $MODE = 'PDF' if ( $MODE =~ /^PDF2$/ ); + + my $xlist = $Viewer_X{$MODE}; + my $ttylist = $Viewer_tty{$MODE}; + +# my $vm = "VIEWER_${MODE"; + my $vm = "VIEWER"; + my $opt = $Opt{$vm}; + + if ($opt) { + my %prog = &where_is_prog($opt); + my $prog_ref = \%prog; + unless (%prog) { + warn "_get_prog_args(): `$opt' is not an existing program;"; + return 0; + } + + # $prog from $opt is an existing program + +### _get_prog_args() of main_set_mode() + if (&is_X) { + if ( &_check_prog_on_list($prog_ref, $xlist) ) { + $Viewer_Background = 1; + } else { + $Viewer_Background = 0; + &_check_prog_on_list($prog_ref, $ttylist); + } + } else { # is not X + $Viewer_Background = 0; + &_check_prog_on_list($prog_ref, $ttylist); + } # if is X + } else { # $opt is empty + $Viewer_Background = 0; + my $x; + if (&is_X) { + $x = &_get_first_prog($xlist); + $Viewer_Background = 1 if $x; + } else { # is not X + $x = &_get_first_prog($ttylist); + } # test on X + $Display{'MODE'} = $mode if $x; + return $x; + } + $Display{'MODE'} = $mode; + return 1; +} # _get_prog_args() of main_set_mode() + + +########## +# _get_first_prog() +# +# Retrieve from the elements of the list in the argument the first +# existing program in $PATH. +# +# Local function of main_set_mode(). +# +# Return : `0' if not a part of the list, `1' if found in the list. +# +sub _get_first_prog { + our %Display; + my $n = @_; + die "_get_first_prog(): one argument is needed; you used $n;" + unless $n == 1; + + foreach my $i (@{$_[0]}) { + next unless $i; + my %prog = &where_is_prog($i); + if (%prog) { + $Display{'PROG'} = $prog{'fullname'}; + $Display{'ARGS'} = $prog{'args'}; + return 1; + } + } + return 0; +} # _get_first_prog() of main_set_mode() + + +########## +# _check_prog_on_list ( ) +# +# Check whether the content of is in the list +# . +# The globals are set correspondingly. +# +# Local function for main_set_mode(). +# +# Arguments: 2 +# +# Return : `0' if not a part of the list, `1' if found in the list. +# Output : none +# +# Globals in : $Viewer_X{}, $Viewer_tty{} +# Globals in/out: $Display{'PROG'}, $Display{'ARGS'} +# +sub _check_prog_on_list { + our %Display; + my $n = @_; + die "_get_first_prog(): 2 arguments are needed; you used $n;" + unless $n == 2; + + my %prog = %{$_[0]}; + + $Display{'PROG'} = $prog{'fullname'}; + $Display{'ARGS'} = $prog{'args'}; + + foreach my $i (@{$_[1]}) { + my %p = &where_is_prog($i); + next unless %p; + next unless $Display{'PROG'} eq $p{'fullname'}; + if ($p{'args'}) { + if ($Display{'ARGS'}) { + $Display{'ARGS'} = $p{'args'}; + } else { + $Display{'ARGS'} = "$p{'args'} $Display{'ARGS'}"; + } + } # if args + return 1; + } # foreach $i + # prog was not in the list + return 0; +} # _check_prog_on_list() of main_set_mode() + + +######################################################################## +# groffer temporary directory, main_temp() +######################################################################## + +sub main_temp { + our %Debug; + our $tmpdir; + our $fh_cat; + our $fh_stdin; + our $tmp_cat; + our $tmp_stdin; + my $template = 'groffer_' . "$$" . '_XXXX'; + foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'}, + $ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) { + if ($_ && -d $_ && -w $_) { + if ($Debug{'KEEP'}) { + eval { $tmpdir = tempdir( $template, DIR => "$_" ); }; + } else { + eval { $tmpdir = tempdir( $template, + CLEANUP => 1, DIR => "$_" ); }; + } + last if $tmpdir; + } + } + $tmpdir = tempdir( $template, CLEANUP => 1, DIR => File::Spec->tmpdir ) + unless ($tmpdir); + + # see Lerning Perl, page 205, or Programming Perl, page 413 + # $SIG{'INT'} is for Ctrl-C interruption + $SIG{'INT'} = sub { &clean_up(); die "interrupted..."; }; + $SIG{'QUIT'} = sub { &clean_up(); die "quit..."; }; + + if ($Debug{'TMPDIR'}) { + if ( $Debug{'KEEP'}) { + print STDERR "temporary directory is kept: " . $tmpdir . "\n"; + } else { + print STDERR "temporary directory will be cleaned: " . + $tmpdir . "\n"; + } + } + + # further argument: SUFFIX => '.sh' + if ($Debug{'KEEP'}) { + ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', DIR => $tmpdir); + ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', DIR => $tmpdir); + } else { + ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', UNLINK => 1, + DIR => $tmpdir); + ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', UNLINK => 1, + DIR => $tmpdir); + } +} # main_temp() + + +######################################################################## +# subs needed for main_do_fileargs() +######################################################################## + +########## +# register_file() +# +# Write a found file and register the title element. +# +# Arguments: 1: a file name +# Output: none +# +sub register_file { + our $tmp_stdin; + my $n = @_; + die "register_file(): one argument is needed; you used $n;" + unless $n == 1; + die 'register_file(): file name is empty;' unless $_[0]; + + if ($_[0] eq '-') { + &to_tmp($tmp_stdin) && ®ister_title('stdin'); + } else { + &to_tmp($_[0]) && ®ister_title($_[0]); + } + 1; +} # register_file() + + +########## +# register_title() +# +# Create title element from and append to $_REG_TITLE_LIST. +# Basename is created. +# +# Globals in/out: @REG_TITLE +# +# Variable prefix: rt +# +sub register_title { + our @REG_TITLE; + our %Debug; + my $n = @_; + die "register_title(): one argument is needed; you used $n;" + unless $n == 1; + return 1 unless $_[0]; + + return 1 if scalar @REG_TITLE > 3; + + my $title = &get_filename($_[0]); + $title =~ s/\s/_/g; + $title =~ s/\.bz2$//g; + $title =~ s/\.gz$//g; + $title =~ s/\.Z$//g; + + if ($Debug{'FILENAMES'}) { + if ($_[0] eq 'stdin') { + print STDERR "register_title(): file title is stdin\n"; + } else { + print STDERR "register_title(): file title is $title\n"; + } + } # if ($Debug{'FILENAMES'}) + + return 1 unless $title; + push @REG_TITLE, $title; + 1; +} # register_title() + + +########## +# save_stdin() +# +# Store standard input to temporary file (with decompression). +# +sub save_stdin { + our $tmp_stdin; + our $fh_stdin; + our $tmpdir; + + our %Debug; + + my ($fh_input, $tmp_input); + $tmp_input = File::Spec->catfile($tmpdir, ',input'); + open $fh_input, ">$tmp_input" or + die "save_stdin(): could not open $tmp_input"; + foreach () { + print $fh_input $_; + } + close $fh_input; + open $fh_stdin, ">$tmp_stdin" or + die "save_stdin(): could not open $tmp_stdin"; + foreach ( &cat_z("$tmp_input") ) { + print $fh_stdin $_; + } + close $fh_stdin; + unlink $tmp_input unless $Debug{'KEEP'}; +} # save_stdin() + + +######################################################################## +# main_do_fileargs() +######################################################################## + +sub main_do_fileargs { + our %Man; + our %Opt; + + our @Filespecs; + + our $Filespec_Arg; + our $Filespec_Is_Man; + our $Special_Filespec; + our $No_Filespecs; + our $Macro_Pkg; + our $Manspec; + + &special_setup(); + if ($Opt{'APROPOS'}) { + if ($No_Filespecs) { + &apropos_filespec(); + return 1; + } + } else { + foreach (@Filespecs) { + if (/^-$/) { + &save_stdin(); + last; + } + } # foreach (@Filespecs) + } # if ($Opt{'APROPOS'}) + + my $section = ''; + my $ext = ''; + my $twoargs = 0; + my $filespec; + my $former_arg; + + FILESPEC: foreach (@Filespecs) { + $filespec = $_; + $Filespec_Arg = $_; + $Filespec_Is_Man = 0; + $Manspec = ''; + $Special_Filespec = 0; + + next FILESPEC unless $filespec; + +### main_do_fileargs() + if ($twoargs) { # second run + $twoargs = 0; + # $section and $ext are kept from earlier run + my $h = { 'name' => $filespec, 'sec' => $section, 'ext' => $ext }; + &man_setup(); + if ( &is_man($h) ) { + $Filespec_Arg = "$former_arg $Filespec_Arg"; + &special_filespec(); + $Filespec_Is_Man = 1; + &man_get($h); + next FILESPEC; + } else { + warn "main_do_fileargs(): $former_arg is neither a file nor a " . + "man page nor a section argument for $filespec;"; + } + } + $twoargs = 0; + + if ( $Opt{'APROPOS'} ) { + &apropos_filespec(); + next FILESPEC; + } + + if ($filespec eq '-') { + ®ister_file('-'); + &special_filespec(); + next FILESPEC; + } elsif ( &get_filename($filespec) ne $filespec ) { # path with dir + &special_filespec(); + if (-f $filespec && -r $filespec) { + ®ister_file($filespec) + } else { + warn "main_do_fileargs: the argument $filespec is not a file;"; + } + next FILESPEC; + } else { # neither `-' nor has dir + # check whether filespec is an existing file + unless ( $Man{'FORCE'} ) { + if (-f $filespec && -r $filespec) { + &special_filespec(); + ®ister_file($filespec); + next FILESPEC; + } + } + } # if ($filespec eq '-') + +### main_do_fileargs() + # now it must be a man page pattern + + if ($Macro_Pkg and $Macro_Pkg ne '-man') { + warn "main_do_fileargs(): $filespec is not a file, " . + "man pages are ignored due to $Macro_Pkg;"; + next FILESPEC; + } + + # check for man page + &man_setup(); + unless ( $Man{'ENABLE'} ) { + warn "main_do_fileargs(): the argument $filespec is not a file;"; + next FILESPEC; + } + my $errmsg; + if ( $Man{'FORCE'} ) { + $errmsg = 'is not a man page'; + } else { + $errmsg = 'is neither a file nor a man page'; + } + + $Filespec_Is_Man = 1; + +### main_do_fileargs() + # test filespec with `man:...' or `...(...)' on man page + + my @names = ($filespec); + if ($filespec =~ /^man:(.*)$/) { + push @names, $1; + } + + foreach my $i (@names) { + next unless $i; + my $h = { 'name' => $i }; + if ( &is_man($h) ) { + &special_filespec(); + &man_get($h); + next FILESPEC; + } + if ( $i =~ /^(.*)\(([$Man{'AUTO_SEC_CHARS'}])(.*)\)$/ ) { + $h = { 'name' => $1, 'sec' => $2, 'ext' => $3 }; + if ( &is_man($h) ) { + &special_filespec(); + &man_get($h); + next FILESPEC; + } + } # if // + if ( $i =~ /^(.*)\.([$Man{'AUTO_SEC_CHARS'}])(.*)$/ ) { + $h = { 'name' => $1, 'sec' => $2, 'ext' => $3 }; + if ( &is_man($h) ) { + &special_filespec(); + &man_get($h); + next FILESPEC; + } + } # if // + } # foreach (@names) + +### main_do_fileargs() + # check on "s name", where "s" is a section with or without an extension + if ($filespec =~ /^([$Man{'AUTO_SEC_CHARS'}])(.*)$/) { + unless ( $Man{'ENABLE'} ) { + warn "main_do_fileargs(): $filespec $errmsg;"; + next FILESPEC; + } + $twoargs = 1; + $section = $1; + $ext = $2; + $former_arg = $filespec; + next FILESPEC; + } else { + warn "main_do_fileargs(): $filespec $errmsg;"; + next FILESPEC; + } + } # foreach (@Filespecs) + + if ( $twoargs ) { + warn "main_do_fileargs(): no filespec arguments left for second run;"; + return 0; + } + 1; +} # main_do_fileargs() + + +######################################################################## +# main_set_resources() +######################################################################## + +########## +# main_set_resources () +# +# Determine options for setting X resources with $_DISPLAY_PROG. +# +# Globals: $Display{PROG}, $Output_File_Name +# +sub main_set_resources { + our %Opt; + our %Display; + our %Debug; + + our @REG_TITLE; + + our $Default_Resolution; + our $tmp_stdin; + our $tmpdir; + our $Output_File_Name; + + # $prog viewer program + # $rl resource list + unlink $tmp_stdin unless $Debug{'KEEP'}; + $Output_File_Name = ''; + + my @title = @REG_TITLE; + @title = ($Opt{'TITLE'}) unless @title; + @title = () unless @title; + + foreach my $n (@title) { + next unless $n; + $n =~ s/^,+// if $n =~ /^,/; + next unless $n; + $Output_File_Name = $Output_File_Name . ',' if $Output_File_Name; + $Output_File_Name = "$Output_File_Name$n"; + } # foreach (@title) + + $Output_File_Name =~ s/^,+//; + $Output_File_Name = '-' unless $Output_File_Name; + $Output_File_Name = File::Spec->catfile($tmpdir, $Output_File_Name); + +### main_set_resources() + unless ($Display{'PROG'}) { # for example, for groff mode + $Display{'ARGS'} = ''; + return 1; + } + + my %h = &where_is_prog($Display{'PROG'}); + my $prog = $h{'file'}; + if ($Display{'ARGS'}) { + $Display{'ARGS'} = "$h{'args'} $Display{'ARGS'}"; + } else { + $Display{'ARGS'} = $h{'args'}; + } + + my @rl = (); + + if ($Opt{'BD'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-bd', $Opt{'BD'}; + } + } + + if ($Opt{'BG'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-bg', $Opt{'BG'}; + } elsif ($prog eq 'kghostview') { + push @rl, '--bg', $Opt{'BG'}; + } elsif ($prog eq 'xpdf') { + push @rl, '-papercolor', $Opt{'BG'}; + } + } + +### main_set_resources() + if ($Opt{'BW'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-bw', $Opt{'BW'}; + } + } + + if ($Opt{'FG'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-fg', $Opt{'FG'}; + } elsif ($prog eq 'kghostview') { + push @rl, '--fg', $Opt{'FG'}; + } + } + + if ($Opt{'FN'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-fn', $Opt{'FN'}; + } elsif ($prog eq 'kghostview') { + push @rl, '--fn', $Opt{'FN'}; + } + } + + if ($Opt{'GEOMETRY'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-geometry', $Opt{'GEOMETRY'}; + } elsif ($prog eq 'kghostview') { + push @rl, '--geometry', $Opt{'GEOMETRY'}; + } + } + +### main_set_resources() + if ($Opt{'RESOLUTION'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-resolution', $Opt{'RESOLUTION'}; + } elsif ($prog eq 'xpdf') { + if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z + if ($Default_Resolution == 75) { + push @rl, '-z', 104; + } elsif ($Default_Resolution == 100) { # 72dpi is '100' + push @rl, '-z', 139; + } + } + } # if $prog + } else { # empty $Opt{RESOLUTION} + $Opt{'RESOLUTION'} = $Default_Resolution; + if ($prog =~ /^(gxditview|xditview)$/) { + push @rl, '-resolution', $Default_Resolution; + } elsif ($prog eq 'xpdf') { + if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z + if ($Default_Resolution == 75) { + push @rl, '-z', 104; + } elsif ($Default_Resolution == 100) { # 72dpi is '100' + push @rl, '-z', 139; + } + } + } # if $prog + } # if $Opt{RESOLUTION} + + if ($Opt{'ICONIC'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-iconic'; + } + } + +### main_set_resources() + if ($Opt{'RV'}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { + push @rl, '-rv'; + } + } + + if (@{$Opt{'XRM'}}) { + if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi|xpdf)$/) { + foreach (@{$Opt{'XRM'}}) { + push @rl, '-xrm', $_; + } + } + } + + if (@title) { + if ($prog =~ /^(gxditview|xditview)$/) { + push @rl, '-title', $Output_File_Name; + } + } + + my $args = join ' ', @rl; + if ($Display{'ARGS'}) { + $Display{'ARGS'} = "$args $Display{'ARGS'}"; + } else { + $Display{'ARGS'} = $args; + } + + 1; +} # main_set_resources() + + +######################################################################## +# set resources +######################################################################## + +########## +# main_display () +# +# Do the actual display of the whole thing. +# +# Globals: +# in: $Display{MODE}, $Opt{DEVICE}, @Addopts_Groff, +# $fh_cat, $tmp_cat, $Opt{PAGER}, $Output_File_Name +# +sub main_display { + our ( %Display, %Opt, %Debug, %Viewer_tty, %Viewer_X ); + + our @Addopts_Groff; + + our ( $groggy, $modefile, $addopts, $fh_cat, $tmp_cat, $tmpdir ); + our ( $Output_File_Name, $Default_tty_Device ); + + $addopts = join ' ', @Addopts_Groff; + + if (-z $tmp_cat) { + warn "groffer: empty input\n"; + &clean_up(); + return 1; + } + + $modefile = $Output_File_Name; + + # go to the temporary directory to be able to access internal data files + chdir $tmpdir; + +### main_display() + SWITCH: foreach ($Display{'MODE'}) { + /^groff$/ and do { + push @Addopts_Groff, "-T$Opt{'DEVICE'}" if $Opt{'DEVICE'}; + $addopts = join ' ', @Addopts_Groff; + $groggy = `cat $tmp_cat | grog`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_opt_V(); + unlink $modefile; + rename $tmp_cat, $modefile; + system("cat $modefile | $groggy $addopts"); + &clean_up(); + next SWITCH; + }; # /groff/ + + /^(text|tty)$/ and do { + my $device; + if (! $Opt{'DEVICE'}) { + $device = $Opt{'TEXT_DEVICE'}; + $device = $Default_tty_Device unless $device; + } elsif ($Opt{'DEVICE'} =~ /^(ascii||cp1047|latin1|utf8)$/) { + $device = $Opt{'DEVICE'}; + } else { + warn "main_display(): wrong device for $Display{'MODE'} mode: " . + "$Opt{'DEVICE'}"; + } + $groggy = `cat $tmp_cat | grog -T$device`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: " . $groggy . "\n" if $Debug{'GROG'}; + if ($Display{'MODE'} eq 'text') { + &_do_opt_V(); + system("cat $tmp_cat | $groggy $addopts"); + &clean_up(); + next SWITCH; + } + +### main_display() + # mode is not 'text', but `tty' + my %pager; + my @p; + push @p, $Opt{'PAGER'} if $Opt{'PAGER'}; + push @p, $ENV{'PAGER'} if $ENV{'PAGER'}; + foreach (@p) { + %pager = &where_is_prog($_); + next unless %pager; + if ($pager{'file'} eq 'less') { + if ($pager{'args'}) { + $pager{'args'} = "-r -R $pager{'args'}"; + } else { + $pager{'args'} = '-r -R'; + } + } + last if $pager{'file'}; + } # foreach @p + unless (%pager) { + foreach (@{$Viewer_tty{'TTY'}}, @{$Viewer_X{'TTY'}}, 'cat') { + next unless $_; + %pager = &where_is_prog($_); + last if %pager; + } + } + die "main_display(): no pager program found for tty mode;" + unless %pager; + &_do_opt_V(); + system("cat $tmp_cat | $groggy $addopts | " . + "$pager{'fullname'} $pager{'args'}"); + &clean_up(); + next SWITCH; + }; # /text|tty/ + + /^source$/ and do { + open $fh_cat, "<$tmp_cat"; + foreach (<$fh_cat>) { + print "$_"; + } + &clean_up(); + next SWITCH; + }; + +### main_display() + /^dvi$/ and do { + if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'dvi') { + warn "main_display(): " . + "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" + } + $modefile .= '.dvi'; + $groggy = `cat $tmp_cat | grog -Tdvi`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(); + next SWITCH; + }; + + /^html$/ and do { + if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'html') { + warn "main_display(): " . + "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" + } + $modefile .= '.html'; + $groggy = `cat $tmp_cat | grog -Thtml`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(); + next SWITCH; + }; + + /^pdf$/ and do { + $modefile .= '.pdf'; + $groggy = `cat $tmp_cat | grog -Tpdf --ligatures`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(); + next SWITCH; + }; + + + /^pdf2$/ and do { + if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') { + warn "main_display(): " . + "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" + } + $modefile .= '.ps'; + $groggy = `cat $tmp_cat | grog -Tps`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(\&_make_pdf2); + next SWITCH; + }; + +### main_display() + /^ps$/ and do { + if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') { + warn "main_display(): " . + "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" + } + $modefile .= '.ps'; + $groggy = `cat $tmp_cat | grog -Tps`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(); + next SWITCH; + }; + + /^x$/ and do { + my $device; + if ($Opt{'DEVICE'} && $Opt{'DEVICE'} =~ /^X/) { + $device = $Opt{'DEVICE'}; + } else { + if ($Opt{'RESOLUTION'} == 100) { + if ( $Display{'PROG'} =~ /^(g|)xditview$/ ) { + # add width of 800dpi for resolution of 100dpi to the args + $Display{'ARGS'} .= ' -geometry 800'; + $Display{'ARGS'} =~ s/^ //; + } + } else { # RESOLUTIOM != 100 + $device = 'X75-12'; + } # if RESOLUTIOM + } # if DEVICE + $groggy = `cat $tmp_cat | grog -T$device -Z`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + &_do_display(); + next SWITCH; + }; + +### main_display() + /^X$/ and do { + if (! $Opt{'DEVICE'}) { + $groggy = `cat $tmp_cat | grog -X`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + } elsif ($Opt{'DEVICE'} =~ /^(X.*|dvi|html|lbp|lj4|ps)$/) { + # these devices work with + $groggy = `cat $tmp_cat | grog -T$Opt{'DEVICE'} -X`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + } else { + warn "main_display(): wrong device for " . + "$Display{'MODE'} mode: $Opt{'DEVICE'};"; + $groggy = `cat $tmp_cat | grog -Z`; + die "main_display(): grog error;" if $?; + chomp $groggy; + print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; + } # if DEVICE + &_do_display(); + next SWITCH; + }; + + /^.*$/ and do { + die "main_display(): unknown mode `$Display{'MODE'}';"; + }; + + } # SWITCH + 1; +} # main_display() + + +######################## +# _do_display ([]) +# +# Perform the generation of the output and view the result. If an +# argument is given interpret it as a function name that is called in +# the midst (actually only for `pdf'). +# +sub _do_display { + our ( %Display, %Debug, %Opt ); + + our ( $modefile, $tmpdir, $tmp_cat, $addopts, $groggy ); + our ( $Viewer_Background ); + + &_do_opt_V(); + unless ($Display{'PROG'}) { + system("$groggy $addopts $tmp_cat"); + &clean_up(); + return 1; + } + unlink $modefile; + die "_do_display(): empty output;" if -z $tmp_cat; + system("cat $tmp_cat | $groggy $addopts >$modefile"); + die "_do_display(): empty output;" if -z $modefile; + &print_times("before display"); + if ($_[0] && ref($_[0]) eq 'CODE') { + $_[0]->(); + } + unlink $tmp_cat unless $Debug{'KEEP'}; + + if ( $Opt{'STDOUT'} ) { + my $fh; + open $fh, "<$modefile"; + foreach (<$fh>) { + print; + } + close $fh; + return 1; + } + + if ( $Viewer_Background ) { + if ($Debug{'KEEP'}) { + exec "$Display{'PROG'} $Display{'ARGS'} $modefile &"; + } else { + exec "{ $Display{'PROG'} $Display{'ARGS'} $modefile; " . + "rm -rf $tmpdir; } &"; + } + } else { + system("$Display{'PROG'} $Display{'ARGS'} $modefile"); + &clean_up(); + } +} # _do_display() of main_display() + + +############# +# _do_opt_V () +# +# Check on option `-V'; if set print the corresponding output and leave. +# +# Globals: @ARGV, $Display{MODE}, $Display{PROG}, +# $Display{ARGS}, $groggy, $modefile, $addopts +# +sub _do_opt_V { + our %Opt; + our %Display; + our @ARGV; + + our ($groggy, $modefile, $addopts); + + if ($Opt{'V'}) { + $Opt{'V'} = 0; + print "Parameters: @ARGV\n"; + print "Display Mode: $Display{'MODE'}\n"; + print "Output file: $modefile\n"; + print "Display prog: $Display{'PROG'} $Display{'ARGS'}\n"; + print "Output of grog: $groggy $addopts\n"; + my $res = `$groggy $addopts\n`; + chomp $res; + print "groff -V: $res\n"; + exit 0; + } + 1; +} # _do_opt_V() of main_display() + + +############## +# _make_pdf2 () +# +# Transform to ps/pdf format; for pdf2 mode in _do_display(). +# +# Globals: $md_modefile (from main_display()) +# +sub _make_pdf2 { + our %Debug; + our %Opt; + + our $PDF_Did_Not_Work; + our $PDF_Has_gs; + our $PDF_Has_ps2pdf; + our $Dev_Null; + our $modefile; + + die "_make_pdf2(): pdf2 mode did not work;" if $PDF_Did_Not_Work; + my $psfile = $modefile; + die "_make_pdf2(): empty output;" if -z $modefile; + $modefile =~ s/\.ps$/.pdf/; + unlink $modefile; + my $done; + if ($PDF_Has_ps2pdf) { + system("ps2pdf $psfile $modefile 2>$Dev_Null"); + $done = ! $?; + } + if (! $done && $PDF_Has_gs) { + system("gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " . + "-sOutputFile=$modefile -c save pop -f $psfile 2>$Dev_Null"); + $done = ! $?; + } + if (! $done) { + $PDF_Did_Not_Work = 1; + warn '_make_pdf2(): Could not transform into pdf format, ' . + 'the Postscript mode (ps) is used instead;'; + $Opt{'MODE'} = 'ps'; + &main_set_mode(); + &main_set_resources(); + &main_display(); + exit 0; + } + unlink $psfile unless $Debug{'KEEP'}; + 1; +} # _make_pdf2() of main_display() + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/groffer/Makefile.sub groff-1.22.3/contrib/groffer/Makefile.sub --- groff-1.22.2/contrib/groffer/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/groffer/Makefile.sub 2014-11-04 09:38:35.478520834 +0100 @@ -2,18 +2,15 @@ # File position: /contrib/groffer/Makefile.sub -# Copyright (C) 2001, 2002, 2005, 2006, 2009, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Written by Werner Lemberg and # Bernd Warken . -# Last update: 17 Oct 2011 - # This file is part of `groffer' which is part of `groff'. # `groff' is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # `groff' is distributed in the hope that it will be useful, but @@ -22,14 +19,15 @@ # 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 . +# along with this program. If not, see +# . ######################################################################## ROFF2MODES=dvi html pdf ps text x ROFF2PROGS=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&/g'` ROFF2MAN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.man/g'` -ROFF2MANN=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.n/g'` +ROFF2N=`echo $(ROFF2MODES) | sed 's/[a-z][a-z]*/roff2&.n/g'` MAN1=groffer.n \ roff2dvi.n \ @@ -39,69 +37,38 @@ roff2text.n \ roff2x.n -MOSTLYCLEANADD=groffer HAVE_PERL HAVE_SHELL groffer.man \ - $(MAN1) $(ROFF2MAN) $(ROFF2PROGS) +MOSTLYCLEANADD=groffer $(MAN1) $(ROFF2MAN) $(ROFF2N) $(ROFF2PROGS) -# not all make programs have $(RM) predefined. RM=rm -f all: groffer -GROFFER_PERL=$(srcdir)/perl/func.pl \ - $(srcdir)/perl/man.pl \ - $(srcdir)/perl/perl_test.pl \ - $(srcdir)/perl/split_env.sh -GROFFER_SHELL=$(srcdir)/shell/groffer2.sh -GROFFER_REST=$(srcdir)/roff2.man \ - $(srcdir)/version.sh \ - $(srcdir)/perl/groffer.man \ - $(srcdir)/perl/groffer.pl \ - $(srcdir)/perl/roff2.pl \ - $(srcdir)/shell/roff2.sh \ - $(srcdir)/shell/groffer.man \ - $(srcdir)/shell/groffer.sh - -GROFFER_PERL_=`echo $(GROFFER_PERL) | sed 's|$(srcdir)/perl/||g'` -GROFFER_SHELL_=`echo $(GROFFER_SHELL) | sed 's|$(srcdir)/shell||g'` - -# TODO: Add perl check to configure script. -groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \ - $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT) - if perl $(srcdir)/perl/perl_test.pl 2>&1 >/dev/null; then \ - : >HAVE_PERL; \ - echo "Using perl version of groffer."; \ - sed -f "$(SH_DEPS_SED_SCRIPT)" \ - -e "s|@g@|$(g)|g" \ - -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ - -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ - -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \ - -e "s|@VERSION@|$(version)$(revision)|g" \ - -e "$(SH_SCRIPT_SED_CMD)" \ - $(srcdir)/perl/groffer.pl >$@; \ - cp $(srcdir)/perl/groffer.man groffer.man; \ - for f in $(ROFF2PROGS); do \ - cp $(srcdir)/perl/roff2.pl $$f; \ - done; \ - else \ - : >HAVE_SHELL; \ - echo "Using shell version of groffer."; \ - sed -f "$(SH_DEPS_SED_SCRIPT)" \ - -e "s|@g@|$(g)|g" \ +GROFFER_PERL=subs.pl \ + main_subs.pl \ + man.pl \ + split_env.sh +GROFFER_REST=roff2.man \ + version.sh \ + groffer.man \ + groffer.pl \ + roff2.pl + +groffer: $(GROFFER_PERL) $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT) + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \ -e "s|@VERSION@|$(version)$(revision)|g" \ -e "$(SH_SCRIPT_SED_CMD)" \ - $(srcdir)/shell/groffer.sh >$@; \ - cp $(srcdir)/shell/groffer.man groffer.man; \ - for f in $(ROFF2PROGS); do \ - cp $(srcdir)/shell/roff2.sh $$f; \ - done; \ - fi + $(srcdir)/groffer.pl >$@; \ + for f in $(ROFF2PROGS); do \ + cp $(srcdir)/roff2.pl $$f; \ + done; \ chmod +x $@ for m in $(ROFF2MODES); do \ cat $(srcdir)/roff2.man \ - | sed 's/@ROFF2MODE@/'"$$m"'/g' > roff2$${m}.man; \ + | sed 's/@ROFF2MODE@/'"$$m"'/g' > roff2$${m}.man; \ done install_data: groffer @@ -113,32 +80,25 @@ $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \ done -test -d $(DESTDIR)$(groffer_dir) \ - || $(mkinstalldirs) $(DESTDIR)$(groffer_dir) + || $(mkinstalldirs) $(DESTDIR)$(groffer_dir) $(RM) $(DESTDIR)$(groffer_dir)/version.sh - $(INSTALL_DATA) $(srcdir)/version.sh \ - $(DESTDIR)$(groffer_dir)/version.sh - for f in $(GROFFER_PERL_) $(GROFFER_SHELL_); do \ - $(RM) $(DESTDIR)$(groffer_dir)/$$f; \ - done - if test -f HAVE_PERL; then \ - for f in $(GROFFER_PERL_); do \ - $(INSTALL_SCRIPT) $(srcdir)/perl/$$f \ - $(DESTDIR)$(groffer_dir)/$$f; \ - done; \ - elif test -f HAVE_SHELL; then \ - for f in $(GROFFER_SHELL_); do \ - $(INSTALL_SCRIPT) $(srcdir)/shell/$$f \ - $(DESTDIR)$(groffer_dir)/$$f; \ - done; \ - fi; + $(INSTALL_DATA) $(srcdir)/version.sh $(DESTDIR)$(groffer_dir)/version.sh + for f in $(GROFFER_PERL); do \ + $(RM) $(DESTDIR)$(groffer_dir)/$$f; \ + done + for f in $(GROFFER_PERL); do \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(groffer_dir)/$$f; \ + done; uninstall_sub: $(RM) $(DESTDIR)$(bindir)/groffer - for f in $(ROFF2PROGS); do $(RM) $(DESTDIR)$(bindir)/$$f; done - for f in $(GROFFER_PERL_) $(GROFFER_SHELL_) version.sh; do \ - $(RM) $(DESTDIR)$(groffer_dir)/$$f; \ - done - -rmdir $(DESTDIR)$(libdir)/groff/groffer + -for f in $(ROFF2PROGS); do $(RM) $(DESTDIR)$(bindir)/$$f; done + -for f in $(GROFFER_PERL) version.sh; do \ + $(RM) $(DESTDIR)$(groffer_dir)/$$f;\ + done + -test -d $(DESTDIR)$(libdir)/groff/groffer && \ + rmdir $(DESTDIR)$(libdir)/groff/groffer + ######################################################################## # Emacs settings diff -ruN groff-1.22.2/contrib/groffer/man.pl groff-1.22.3/contrib/groffer/man.pl --- groff-1.22.2/contrib/groffer/man.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/man.pl 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,736 @@ +#! /usr/bin/env perl + +# groffer - display groff files + +# Source file position: /contrib/groffer/man.pl +# Installed position: /lib/groff/groffer/man.pl + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + +######################################################################## + +use strict; +use warnings; + +######################################################################## +# functions for apropos, man, whatis +######################################################################## + +########## +# apropos_filespec() +# +# Compose temporary file for filspec. +# +# Globals: in: $main::Opt{'APROPOS'}, $main::Special_Setup, $main::Filespec_Arg, +# $main::Apropos_Prog, $main::Opt{'APROPOS_SECTIONS'}, $main::Opt{'SECTIONS'} +# out: $main::Special_Filespec +# +sub apropos_filespec { + return 0 unless $main::Opt{'APROPOS'}; + die 'apropos_filespec(): apropos_setup() must be run first;' + unless $main::Special_Setup; + die 'apropos_filespec(): no $main::Filespec_Arg is set;' + unless defined $main::Filespec_Arg; + $main::Special_Filespec = 1; + + my $s; + if ($main::No_Filespecs) { + &to_tmp_line('.SH no filespec'); + $s = `$main::Apropos_Prog`; + $s =~ s/^/\\\&/; + &to_tmp_line($s); + return 1; + } + + $s = $main::Filespec_Arg; + $s =~ s/[^\\]-/\\-/g; + &to_tmp_line(".SH $s"); + + if ( $main::Opt{'APROPOS_SECTIONS'} ) { + $s = qr/^[^\(]*\([$main::Opt{'APROPOS_SECTIONS'}]/; + } else { + if ( $main::Opt{'SECTIONS'} ) { + $s = $main::Opt{'SECTIONS'}; + $s = qr/^[^\(]*\([$s]/; + } else { + $s = qr/^.*\(.+\).*$/; + } + } + +### apropos_filespec() + my $filespec = $main::Filespec_Arg; + $filespec =~ s#/#\\/#g; + $filespec =~ s#\.#\\./#g; + my @ap; + foreach ( `$main::Apropos_Prog $main::Filespec_Arg 2>$main::Dev_Null` ) { + chomp; + if (/^$filespec:\s/) { # for error messages of this script + my $line = $_; + $line =~ s/^(.*)$/\\\&$1/s; + push @ap, $line; + } + if (/$s/) { + push @ap, $_; + } + } + my @res; + foreach (sort @ap) { + s/^ + ([^\(]+\(+[$main::Man{'AUTO_SEC_CHARS'}][^\)]*\)+) + (\s*-*)*\s* + (.*) + $/.br\n.TP 15\n.BR "$1"\n\\\&$3\n/sx; + push @res, $_; + } + &to_tmp_line(@res); + 1; +} # apropos_filespec() + + +########## +# apropos_setup() +# +# Setup for the --apropos* options, just 2 global variables are set. +# +# Globals: in: $main::Opt{'APROPOS'} +# out: $main::Special_Setup, $main::Apropos_Prog +# +sub apropos_setup { + return 0 unless $main::Opt{'APROPOS'}; + if ( &where_is_prog('apropos') ) { + $main::Apropos_Prog = 'apropos'; + } elsif ( &where_is_prog('man') ) { + if (! system("man --apropos man >$main::Dev_Null 2>$main::Dev_Null")) { + $main::Apropos_Prog = 'man --apropos'; + } elsif (! system("man -k man >$main::Dev_Null 2>$main::Dev_Null")) { + $main::Apropos_Prog = 'man --k'; + } + } # test man + die 'apropos_setup(): no apropos program available;' + unless $main::Apropos_Prog; + &to_tmp_line('.TH GROFFER APROPOS'); + $main::Special_Setup = 1; + $main::Opt{'TITLE'} = 'apropos' unless $main::Opt{'TITLE'}; + 1; +} # apropos_setup() + + +########## +# is_man() +# +# Test whether the argument hash exists as man page (from is_man()). +# +# Globals: in: $main::Man{AUTO_SEC_CHARS},$main::Man{SEC_CHARS}, +# $main::Man{EXT}, $tmpdir +# out: $main::Manspec +# +# Arguments: 1, a hash reference with keys 'name', 'sec', 'ext', where +# 'sec' is a string of one or several section characters +# +sub is_man { + my $n = @_; + die "is_man(): one argument is needed, you used $n;" + unless $n == 1; + die "is_man(): the argument is not a hash reference `$_[0]';" + if ref($_[0]) ne 'HASH'; + die 'is_man(): temporary directory is not set;' unless $main::tmpdir; + die 'is_man(): man_setup() must be run first;' unless $main::Man{'IS_SETUP'}; + + my $name = $_[0]->{'name'}; + unless ($name) { + $main::Manspec = ''; + return 0; + } + + my $sec; + $sec = $_[0]->{'sec'}; + $sec = $main::Man{'SEC_CHARS'} unless $sec; + $sec = $main::Man{'AUTO_SEC_CHARS'} unless $sec; + $sec = '' unless defined $sec; + # take care, $sec may be several sections + +### is_man() + my $ext; + $ext = $_[0]->{'ext'}; + $ext = $main::Man{'EXT'} unless $ext; + $ext = '' unless defined $ext; + + $main::Manspec = "$name.$sec,$ext"; + my @m; + if (exists $main::Man{'MANSPEC'}{$main::Manspec}) { + return 1; + } else { + foreach my $p ( @{$main::Man{'PATH'}} ) { + foreach my $s (split //, $sec) { + my $dir = File::Spec->catdir($p, "man$s"); + next unless -d $dir; + my $file = File::Spec->catfile($dir, "$name.$s$ext"); + push @m, glob("$file*"); + } + } + $main::Man{'MANSPEC'}{$main::Manspec} = \@m; + } + return 0 unless (@m); + return 1; +} # is_man() + + +########## +# man_get () +# +# Write a man page to the temporary file. +# +# Globals in: $main::Manspec, $main::Man{MANSPEC}, $main::Man{SEC_CHARS}, +# $main::Man{EXT}, $main::Man{ALL} +# +# Arguments: 1, a hash reference with keys 'name', 'sec', 'ext', where +# 'sec' is a string of one or several section characters +# +sub man_get { + my $n = @_; + die "man_get(): one argument is needed, you used $n;" + unless $n == 1; + die "man_get(): the argument is not a hash reference `$_[0]';" + if ref($_[0]) ne 'HASH'; + die "man_get(): is_man() must be run first on the argument;" + unless $main::Manspec; + die "man_get(): wrong hash reference `$_[0]', no 'name' key;" + unless exists $_[0]->{'name'}; + + my ($name, $sec, $ext, $f, $path); + $name = $_[0]->{'name'}; + die "man_get(): empty 'name' key in the argument;" unless $name; + + $sec = $_[0]->{'sec'}; + $sec = $main::Man{'SEC_CHARS'} if (! $sec) and $main::Man{'SEC_CHARS'}; + $sec = '' unless defined $sec; + # take care $sec may be several sections + +### man_get() + $ext = $_[0]->{'ext'}; + $ext = $main::Man{'EXT'} unless $ext; + $ext = '' unless defined $ext; + + die 'man_get(): $main::Manspec does not suit the arguments;' + if ($main::Manspec ne "$name.$sec,$ext") and + (! exists $main::Man{'MANSPEC'}{$main::Manspec}); + + if ($main::Man{'ALL'}) { + my $ok; + my %list; + foreach ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + next if exists $list{$_}; + if (-f $_ and -r $_) { + $list{$_} = 1; + &to_tmp($_); + $ok = 1; + } + } + ®ister_title("man:$name") if $ok; + return 1; + } + + # not $main::Man{'ALL'} + + if ($_[0]->{'sec'}) { + my $path = File::Spec->catfile('', "man$sec", $name); + if ($ext) { + foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ($f =~ m#$path\.$sec$ext($|\..*$)#) { + if (-f $f && -r $f) { + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f +### man_get() + foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ($f =~ m#$path\.$sec$ext.*$#) { + if (-f $f && -r $f) { + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f + } else { # $ext is empty + foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ($f =~ m#$path\.$sec($|\..*$)#) { + if (-f $f && -r $f) { + # &to_tmp($f) && ®ister_file($f); + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f + foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ($f =~ m#$path\.$sec.*$#) { + if (-f $f && -r $f) { + # &to_tmp($f) && ®ister_file($f); + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f + } # if $ext +### man_get() + } else { # sec is empty + my $m = $main::Man{'SEC_CHARS'}; + $m = $main::Man{'AUTO_SEC_CHARS'} unless $m; + foreach my $s (split //, $m) { + my $path = File::Spec->catfile('', "man$s", $name); + unless ($ext) { + foreach my $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ( $f =~ m#$path\.$s($|\..*$)# ) { + if (-f $f && -r $f) { + # &to_tmp($f) && ®ister_file($f); + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f + } # unless $ext + foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { + if ($f =~ m#$path\.$s$ext.*$#) { + if (-f $f && -r $f) { + # &to_tmp($f) && ®ister_file($f); + ®ister_file($f); + return 1; + } + } # if $f =~ + } # foreach $f + } # foreach $s + } # if sec + + 1; +} # man_get() + + +########## +# man_setup () +# +# Setup the variables in %MAN needed for man page searching. +# +# Globals: +# in: %OPT, $LANG, $LC_MESSAGES, $LC_ALL, +# $MANPATH, $MANSEC, $PAGER, $SYSTEM, $MANOPT. +# out: $main::Man{PATH}, $main::Man{LANG}, $main::Man{LANG2}, $main::Man{SYS}, +# $main::Man{SEC}, $main::Man{ALL} +# in/out: $main::Man{ENABLE} +# +# The precedence for the variables related to `man' is that of GNU +# `man', i.e. +# +# $LANG; overridden by +# $LC_MESSAGES; overridden by +# $LC_ALL; this has the same precedence as +# $MANPATH, $MANSEC, $PAGER, $SYSTEM; overridden by +# $MANOPT; overridden by +# the groffer command line options. +# +# $MANROFFSEQ is ignored because grog determines the preprocessors. +# +sub man_setup { + return 1 if $main::Man{'IS_SETUP'}; + $main::Man{'IS_SETUP'} = 1; + return 1 unless $main::Man{'ENABLE'}; + + # determine basic path for man pages + my $path; + if (defined $main::Opt{'MANPATH'}) { + $path = $main::Opt{'MANPATH'}; + } elsif ($ENV{'MANPATH'}) { + $path = $ENV{'MANPATH'}; + } elsif ( &where_is_prog('manpath') ) { + $path = `manpath 2>$main::Dev_Null`; + } + if ($path) { + chomp $path; + $main::Man{'PATH'} = [split /:/, $path]; + } else { + $main::Man{'PATH'} = []; + &manpath_set_from_path(); + } + unless ( @{$main::Man{'PATH'}} ) { + $main::Man{'ENABLE'} = 0; + warn "man_setup(): man path is empty;"; + return 1; + } + +### man_setup() + # make man path list consisting of unique existing directories + @{$main::Man{'PATH'}} = &path_uniq( @{$main::Man{'PATH'}} ); + + unless ($main::Man{'ALL'}) { + $main::Man{'ALL'} = $main::Opt{'ALL'} ? 1 : 0; + } + + # handle man systems + my $sys = $ENV{'SYSTEM'}; + $sys = $main::Opt{'SYSTEMS'} if $main::Opt{'SYSTEMS'}; + if ($sys) { + chomp $sys; + $main::Man{'SYS'} = [split /,/, $sys]; + } else { + $main::Man{'SYS'} = []; + $sys = ''; + } + +### man_setup() + # handle language + my $lang = ''; + $lang = $main::Opt{'LANG'} if $main::Opt{'LANG'}; + unless ($lang) { + foreach ('LC_ALL', 'LC_MESSAGES', 'LANG') { + if ($ENV{$_}) { + $lang = $ENV{$_}; + last; + } + } + } + if ($lang) { + if ($lang eq 'C' or $lang eq 'POSIX') { + $main::Man{'LANG'} = ''; + $main::Man{'LANG2'} = ''; + } elsif ($lang =~ /^.$/) { + $main::Man{'LANG'} = $lang; + $main::Man{'LANG2'} = ''; + } elsif ($lang =~ /^..$/) { + $main::Man{'LANG'} = $lang; + $main::Man{'LANG2'} = $lang; + } else { + $main::Man{'LANG'} = $lang; + $main::Man{'LANG2'} = $lang; + $main::Man{'LANG2'} =~ s/^(..).*$/$1/; + } + } # if ($lang) + # from now on, use only $main::Man{LANG*}, + # forget about $main::Opt{LANG}, $ENV{LC_*}. + + &manpath_add_lang_sys(); + +### man_setup() + # section + my $sec; + $sec = $main::Opt{'SECTIONS'} if $main::Opt{'SECTIONS'}; + unless ($sec) { + $sec = $ENV{'MANSEC'} if $ENV{'MANSEC'}; + } + $main::Man{'SEC'} = []; + $main::Man{'SEC_CHARS'} = ''; + if ($sec) { + foreach (split /:/, $sec) { + push @{$main::Man{'SEC'}}, $_ if /^[$main::Man{'AUTO_SEC_CHARS'}]$/; + } + $main::Man{'SEC_CHARS'} = join '', @{$main::Man{'SEC'}} if @{$main::Man{'SEC'}}; + } # if ($sec) + + # extension + my $ext = ''; + $ext = $main::Opt{'EXTENSION'} if $main::Opt{'EXTENSION'}; + unless ($ext) { + $ext = $ENV{'EXTENSION'} if $ENV{'EXTENSION'}; + } + $main::Man{'EXT'} = $ext; + + # creation of man temporary is omitted, because of globs in perl + 1; +} # man_setup() + + +########## +# manpath_add_lang_sys() +# +# Add language and operating system specific directories to man path. +# +# Globals: +# in: $main::Man{SYS}: a list of names of operating systems. +# $main::Man{LANG} and $main::Man{LANG2}: each a single name +# in/out: @{$main::Man{PATH}}: list of directories which shall have the `man?' +# subdirectories. +# +sub manpath_add_lang_sys { + return 1 unless $main::Man{'PATH'}; + return 1 unless @{$main::Man{'PATH'}}; + + my @mp; + + if ( @{$main::Man{'SYS'}} ) { + foreach ( @{$main::Man{'SYS'}} ) { + if ($_ eq 'man') { + @mp = (@mp, @{$main::Man{'PATH'}}); + } elsif ($_) { + my $sys = $_; + foreach my $p (@{$main::Man{'PATH'}}) { + my $dir = File::Spec->catdir($p, $sys); + push @mp, $dir; + } + } # if eq 'man' + } # foreach SYS + } else { # no SYS + @mp = @{$main::Man{'PATH'}}; + } + + if (@mp && $main::Man{'LANG'}) { + my @lang_path; + my $man_lang2 = ''; + $man_lang2 = $main::Man{'LANG2'} if $main::Man{'LANG'} ne $main::Man{'LANG2'}; + foreach my $i ($main::Man{'LANG'}, $man_lang2) { + next unless $i; + my $lang = $i; + foreach my $p (@mp) { + my $dir = File::Spec->catdir($p, $lang); + push @lang_path, $dir; + } # foreach $p + } # foreach $i + @mp = (@lang_path, @mp); + } # if $mp + + $main::Man{PATH} = [&path_uniq(@mp)]; + 1; +} # manpath_add_lang_sys() + + +########## +# manpath_set_from_path() +# +# Determine basic search path for man pages from $PATH. +# +# Return: `1' if a valid man path was retrieved. +# Output: none +# Globals: +# in: $PATH +# out: $_MAN_PATH +# +sub manpath_set_from_path { + my @path = + qw( /usr/local /usr /usr/X11R6 /usr/openwin /opt /opt/gnome /opt/kde ); + # get a basic man path from $ENV{PATH} + my @path2 = @main::Path; + foreach (@path2) { + s#bin/*$##; + push @path, $_; + } + @path = &path_uniq(@path); + foreach my $d (@path) { + foreach my $e ( File::Spec->catdir( qw(share man) ), + File::Spec->catdir( qw(share MAN) ), + 'man', 'MAN' ) { + my $dir = File::Spec->catdir($d, $e); + push @{$main::Man{'PATH'}}, $dir if -d $dir; + } + } + 1; +} # manpath_set_from_path() + + +########## +# special_filespec() +# +# Handle special modes like whatis and apropos. Run their filespec +# functions if suitable. +# +# Globals: in: $main::Opt{'APROPOS'}, $main::Opt{'WHATIS'}, $main::Special_Setup +# out: $main::Special_Filespec (internal) +# +sub special_filespec { + return 0 unless $main::Opt{'APROPOS'} || $main::Opt{'WHATIS'}; + die 'special_filespec(): setup for apropos or whatis must be run first;' + unless $main::Special_Setup; + if ( $main::Opt{'APROPOS'} ) { + die "special_setup(): both apropos and whatis option variables are set;" + if $main::Opt{'WHATIS'}; + return &apropos_filespec() ? 1 : 0; + } + if ( $main::Opt{'WHATIS'} ) { + return &whatis_filespec() ? 1 : 0; + } + 0; +} # special_filespec + + +########## +# special_setup() +# +# Handle special modes like whatis and apropos. Run their setup +# functions if suitable. +# +sub special_setup { + if ( $main::Opt{'APROPOS'} ) { + die "special_setup(): both --apropos and --whatis option variables " . + "are set;" if $main::Opt{'WHATIS'}; + return &apropos_setup() ? 1 : 0; + } + if ( $main::Opt{'WHATIS'} ) { + return &whatis_setup() ? 1 : 0; + } + 0; +} # special_setup() + + +########## +# whatis_filename() +# +# Interpret as a man page and display its `whatis' +# information as a fragment written in the groff language. +# +# Globals: in: $main::Opt{'WHATIS'}, $main::Special_Setup, $main::Special_Filespec, +# $main::Filespec_Arg +# +sub whatis_filename { + my $n = @_; + die "whatis_filename(): one argument is needed; you used $n;" + unless $n == 1; + die "whatis_filename(): whatis is not setup;" unless $main::Opt{'WHATIS'}; + die "whatis_filename(): setup for whatis must be run first;" + unless $main::Special_Setup; + die "whatis_filename(): whatis_filespec() must be run first;" + unless $main::Special_Filespec; + die 'whatis_filename(): no $main::Filespec_Arg is set;' + unless defined $main::Filespec_Arg; + + my $arg = $_[0]; + die "whatis_file_name(): $arg is not an existing file" unless -f $arg; + die "whatis_file_name(): could not read file $arg" unless -r $arg; + return 1 if -z $arg; + $arg = 'stdin' if $main::Filespec_Arg eq '-'; + + &to_tmp_line('.br', '\\f[CR]' . $arg . '\\f[]:', '.br'); + +### whatis_filename() + # get the parts of the file name according to the naming of man pages + my ($dir, $name) = &split_path( $_[0] ); + my $section = $_[0]; + my $path = File::Spec->catfile('', 'man'); + $section =~ s#^.*$path([$main::Man{'AUTO_SEC_CHARS'}]).*$#$1#; + $section = '' if $section eq $_[0]; + if ($section) { + if ($name =~ m#^.*\.$section.*$#) { + $name =~ s/^(.*)\.$section.*$/$1/; + } else { + $section = ''; + } + } + + # traditional man style; grep the line containing `.TH' macro, if any + my @catz = &cat_z($_[0]); + my $res; + my $test; + foreach (@catz) { + if (/^[\.']\s*TH\s/) { # search .TH, traditional man style + $test = 1; + last; + } + } # foreach (@catz) +### whatis_filename() + if ($test) { # traditional man style + # get the first line after the first `.SH' macro before the next `.SH' + my $test1; + foreach (@catz) { + if ($test1) { + chomp; + next unless $_; + next if /^[\.']?\s*$/; + last if /^[\.']/; # especially for .SH + if ($res) { + $res = "$res $_"; + } else { + $res = $_; + } + } else { # $test1 is empty + $test1 = 1 if (/^[\.']\s*SH\s/); + } # if ($test1) + } # foreach (@catz) + + if ($section) { + if ($res =~ m|^ + $name + \s + [^-]* + - + \s* + (.*) + $|sx) { + $res = "$name ($section) \\[em] $1"; + } + } # if ($section) +### whatis_filename() + &to_tmp_line($res, '.br', '', '.br'); + return 1; + } # if ($test) + + # mdoc style (BSD doc); grep the line containing `.Nd' macro, if any + foreach (@catz) { + if (/^[\.']\s*Nd\s/) { # BSD doc style + $res =~ s/^(.*)$/$name ($section) \\[em] $1/; + &to_tmp_line($res); + return 1; + } + } + + &to_tmp_line('is not a man page', '.br', '', '.br'); + 1; +} # whatis_filename() + + +########## +# whatis_filespec() +# +# Print the filespec name as .SH to the temporary cat file. +# +# Globals: in: $main::Opt{'WHATIS'}, $main::Filespec_Arg +# in/out: $main::Special_Filespec +# +sub whatis_filespec { + return 0 unless ($main::Opt{'WHATIS'}); + die 'whatis_filespec(): whatis_setup() must be run first.' + unless $main::Special_Setup; + die 'whatis_filespec(): no $main::Filespec_Arg is set;' + unless defined $main::Filespec_Arg; + $main::Special_Filespec = 1; + my $arg = $main::Filespec_Arg; + $arg =~ s/[^\\]-/\\-/g; + to_tmp_line(".SH $arg"); +} # whatis_filespec() + + +########## +# whatis_setup () +# +# Print the whatis header to the temporary cat file; this is the setup +# for whatis. +# +# Globals: in: $main::Opt{'WHATIS'} +# out: $main::Special_Setup +sub whatis_setup { + if ( $main::Opt{'WHATIS'} ) { + &to_tmp_line('.TH GROFFER WHATIS'); + $main::Special_Setup = 1; + $main::Opt{'TITLE'} = 'whatis' unless $main::Opt{'TITLE'}; + return 1; + } + 0; +} # whatis_setup () + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/groffer/perl/func.pl groff-1.22.3/contrib/groffer/perl/func.pl --- groff-1.22.2/contrib/groffer/perl/func.pl 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/func.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,789 +0,0 @@ -#! /usr/bin/env perl - -# groffer - display groff files - -# Source file position: /contrib/groffer/perl/func.pl -# Installed position: /lib/groff/groffer/func.pl - -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - -use strict; -use warnings; - -######################################################################## -# some functions -######################################################################## - -########## -# cat_z() -# -# Decompress or cat the . -# -# Return: the decompressed file as array -# -sub cat_z { - my $n = @_; - die "cat_z(): one argument is needed; you used $n;" - unless $n == 1; - - my $file = $_[0]; - die "cat_z(): `$file' is not a readable file;" unless -f $file && -r $file; - return () if -z $file; - - my @res; - if ($main::Has_Compression) { - if ($main::Has_bzip) { - # test whether bz2 compressed, shell return must be inverted - unless ( system("bzip2 -t $file 2>$main::Dev_Null") ) { - @res = `bzip2 -c -d $file 2>$main::Dev_Null`; - return @res; - } - # if not compressed with gz, gzip will act like `cat' - @res = `gzip -c -d -f $file 2>$main::Dev_Null`; - return @res; - } - } else { - my $fh; - open $fh, "<$file" or die "cat_z(): could not open $file"; - @res = <$fh>; - close $fh; - return @res; - } - (); -} # cat_z() - - -########## -# clean_up() -# -# Remove the temporary directory and restore the system. -# -sub clean_up { - umask $main::Umask; - chdir $main::Start_Dir; - if ($main::Debug{'KEEP'} && -d $main::tmpdir) { - my $glob = File::Spec->catfile($main::tmpdir, '*'); - unlink glob($glob); # rm $tmpdir/* - rmdir $main::tmpdir; - } -} # clean_up() - - -########## -# get_dirname() -# -# Split the path and return the directory name part -# -# Return: string of directory name -# -sub get_dirname { - my $n = @_; - die "get_filename(): one argument is needed; you used $n;" unless $n == 1; - return '' unless $_[0]; - - my ($dirname, $filename) = &split_path($_[0]); - $dirname; -} # get_dirname() - - -########## -# get_filename() -# -# Split the path and return the file name part -# -# Return: string of file name -# -sub get_filename { - my $n = @_; - die "get_dirname(): one argument is needed; you used $n;" unless $n == 1; - return '' unless $_[0]; - - my ($dirname, $filename) = &split_path($_[0]); - $filename; -} # get_filename() - - -########## -# is_X() -# -# Test whether X Windows is running. -# -sub is_X { - return 1 if $ENV{'DISPLAY'}; - return 0; -} # is_X() - - -########## -# list_has(, ) -# -# Determine if has as element. -# -sub list_has { - my $n = @_; - die "list_has(): 2 arguments are needed; you used $n;" - unless $n == 2; - - my $list_ref = $_[0]; - my $string = $_[1]; - die "list_has(): first argument must be an array reference;" - unless ref($list_ref) eq 'ARRAY'; - - foreach ( @$list_ref ) { - return 1 if $_ eq $string; - } - 0; -} - - -########## -# path_uniq(...) -# -# make path having unique existing directories -# -sub path_uniq { - my @a; - my %h; - foreach (@_) { - next if exists $h{$_}; - next unless -d $_; - push @a, $_; - $h{$_} = 1; - } - @a; -} # path_uniq() - - -########## -# print_hash() -# -# print the elements of a hash or hash reference -# -sub print_hash { - my $hr; - my $n = scalar @_; - if ($n == 0) { - print "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 "empty hash\n"; - return 1; - } - print "hash (ignore the ^ characters):\n"; - for my $k (sort keys %$hr) { - my $hk = $hr->{$k}; - print " $k => "; - if (defined $hk) { - print "^$hk^"; - } else { - print "undef"; - } - print "\n"; - } - - 1; -} # print_hash() - - -########## -# print_times() -# -# print the time, result: user, system, child process user, child system -# -sub print_times { - my @t = times; - my $s = ''; - $s = $_[0] if $_[0]; -# print STDERR "$s: @t\n"; -} # print_times() - -BEGIN { &print_times("start"); } -END { &print_times("end"); } - - -########## -# split_path() -# -# Split the path into directory and file name parts -# -# Return: array with 2 elements consisting of directory and file name -# -sub split_path { - my $n = @_; - die "split_path(): one argument is needed; you used $n;" unless $n == 1; - my $arg = $_[0]; - return () unless $arg; - - my $basename = basename($arg); - if ( $basename ne $arg ) { # path with dir - # fileparse() is from File::Basename - my($filename, $dirname, $suffix) = fileparse($arg); - return ($dirname, $basename); - } - return ('', $arg); -} - - -{ - my $nr_file = 0; - my $nr_so = 0; - - my $tmp_file_base; - my $tmp_so_base; - - my $soelim_r = ''; - $soelim_r = '-r' - if ! system("echo -n '' | soelim -r 2>$main::Dev_Null >$main::Dev_Null"); - - ########## - # to_tmp () - # - # Print file (decompressed) to the temporary cat file with handling .SO - # for man pages. - # - sub to_tmp { - my $n = @_; - die "to_tmp(): one argument is needed; you used $n;" - unless $n == 1; - - my $arg = $_[0]; - return 1 unless $arg; - die "to_tmp(): $arg is not an existing file;" unless -f $arg; - die "to_tmp(): could not read file $arg;" unless -r $arg; - return 1 if -z $arg; - - $tmp_file_base = File::Spec->catfile($main::tmpdir, ',file') - unless $tmp_file_base; - $tmp_so_base = File::Spec->catfile($main::tmpdir, ',so') - unless $tmp_so_base; - - open $main::fh_cat, ">>$main::tmp_cat" or - die "to_tmp(): could not open temporary cat file"; - - if ($main::Opt{'WHATIS'}) { - &whatis_filename($arg); - return 1; - } - - ### to_tmp() - my $dir = &get_dirname($arg); - - my ($fh_file, $tmp_file, $fh_tmp, $tmp_tmp); - ++$nr_file; - $tmp_file = $tmp_file_base . $nr_file; - $tmp_tmp = File::Spec->catfile($main::tmpdir, ',tmp'); - - print STDERR "file: $arg\n" if $main::Debug{'FILENAMES'}; - - if ($main::Filespec_Is_Man) { - my ($fh_so, $tmp_so); - - open $fh_file, ">$tmp_file" or - die "to_tmp(): could not open $tmp_file;"; - foreach ( &cat_z($arg) ) { - print $fh_file "$_"; - } - close $fh_file; - - open $fh_file, "<$tmp_file" or - die "to_tmp(): could not open $tmp_file;"; - my @list; - foreach (<$fh_file>) { - if (/^[\.']\s*so\s/) { - chomp; - s/^[\.']\s*so\s*//; - push @list, $_; - } - } - close $fh_file; - - if ( @list && $main::Debug{'KEEP'} ) { - my $f = $tmp_file . '+man'; - copy($tmp_file, $f); - } - - ### to_tmp() - DO_MAN_SO: foreach (@list) { - # start of _do_man_so() in shell version - my $so = $_; - my $soname = $so; - $soname =~ s/\\\s/ /g; - - my $sofound; - my $path = File::Spec->rootdir(); - if ($soname =~ m#^$path#) { # absolute path name - next DO_MAN_SO if -f $soname; - foreach ('.gz', '.Z', '.bz2') { - my $name = $soname . $_; - if (-f $name) { - $sofound = $name; - last; - } - } # foreach - next DO_MAN_SO unless $sofound; - } else { # relative to man path - LOOP: foreach my $ext ('', '.gz', '.Z', '.bz2') { - foreach my $p ( @{$main::Man{'PATH'}} ) { - my $f = File::Spec->catfile($p, "$soname$ext"); - if (-f $f) { - $sofound = $f if -f $f; - last LOOP; - } - } # foreach - } # LOOP: - next DO_MAN_SO unless $sofound; - } # if on path - - print STDERR "file from .so: $so\n" if $main::Debug{'FILENAMES'}; - - ### to_tmp() - ++$nr_so; - $tmp_so = $tmp_so_base . $nr_so; - unlink $tmp_so if -e $tmp_so; - open $fh_so, ">$tmp_so" or - die "to_tmp(): could not open $tmp_so;"; - foreach ( &cat_z($sofound) ) { - print $fh_so $_; - } - close $fh_so; - - my $esc = $so; - $esc =~ s/\\/\\\\/g; - open $fh_file, "<$tmp_file" or - die "to_tmp(): could not open $tmp_file;"; - open $fh_tmp, ">$tmp_tmp" or - die "to_tmp(): could not open $tmp_tmp;"; - foreach (<$fh_file>) { - s#^([\.'])\s*so\s+($so|$esc|$soname)\s*\n$#${1}so $tmp_so\n#s; - print $fh_tmp $_; - } - ### to_tmp() - close $fh_tmp; - close $fh_file; - unlink $tmp_file if -e $tmp_file; - rename $tmp_tmp, $tmp_file; - # end of _do_man_so() in shell version - } # foreach (@list) - - if ( @list && $main::Debug{'KEEP'} ) { - my $f = $tmp_file . '+tmp'; - copy($tmp_file, $f); - } - - unlink $tmp_tmp if -e $tmp_tmp; - rename $tmp_file, $tmp_tmp; - system("soelim -I$dir $soelim_r $tmp_tmp >$tmp_file"); - unlink $tmp_tmp if -e $tmp_tmp; - - } else { # $Filespec_Is_Man is empty - open $fh_tmp, ">$tmp_tmp" or - die "to_tmp(): could not open $tmp_tmp;"; - foreach (cat_z $arg) { - print $fh_tmp $_; - } - close $fh_tmp; - if ($dir) { - system("soelim -I$dir $soelim_r $tmp_tmp >$tmp_file"); - } else { - system("soelim $soelim_r $tmp_tmp >$tmp_file"); - } - unlink $tmp_tmp; - } # if ($Filespec_Is_Man) - - ### to_tmp() - my $grog = `grog $tmp_file`; - die "to_tmp(): grog error on $tmp_file;" if $?; - chomp $grog; - print STDERR "grog output: $grog\n" if $main::Debug{'GROG'}; - if ($grog =~ /^.*\s-m.*$/) { - $grog =~ s/\s+/ /g; - $grog =~ s/ -m / -m/g; - $grog =~ s/ -mm([^ ]) / -m$1/g; - foreach my $g (split / /, $grog) { - if ($g =~ /^-m/) { - my $ref = \@main::Macro_Packages; - if ( &list_has($ref, $g) ) { - if (! $main::Macro_Pkg) { - $main::Macro_Pkg = $g; - } elsif ($main::Macro_Pkg eq $g) { - 1; - } elsif ($main::Macro_Pkg =~ /^-m/) { - warn "to_tmp(): Ignore $arg because it needs $g " . - "instead of $main::Macro_Pkg"; - unlink $tmp_file unless $main::Debug{'KEEP'}; - return 0; - } elsif ($main::Macro_Pkg ne $g) { - die "to_tmp(): \$Macro_Pkg does not start with -m: " . - "$main::Macro_Pkg"; - } # if (! $main::Macro_Pkg) - } # if (&list_has - } # if (/^-m/) - } # foreach my $g - } # if $grog - - open $fh_file, "<$tmp_file" or - die "to_tmp(): could not open $tmp_file for reading;"; - open $main::fh_cat, ">>$main::tmp_cat" or - die "to_tmp(): could not open $main::tmp_cat for appending;"; - foreach (<$fh_file>) { - print $main::fh_cat $_; - } - close $main::fh_cat; - close $fh_file; - - unless ( $main::Debug{'KEEP'} ) { - unlink $tmp_file; - foreach ( glob("$tmp_so_base*") ) { - unlink $_; - } - } - 1; - } # to_tmp() -} - -########## -# to_tmp_line (...) -# -# Print array of lines with to the temporary cat file. \n is added -# if a line does not end with \n. -# -sub to_tmp_line { - my $n = @_; - return 1 if $n == 0; - open $main::fh_cat, ">>$main::tmp_cat" or - die "to_tmp_line(): could not open temporary cat file"; - foreach (@_) { - my $line = $_; - chomp($line); - print $main::fh_cat "$line\n"; - } - close $main::fh_cat; - 1; -} # to_tmp_line() - - -########## -# usage() -# -# Print usage information for --help. -# -sub usage { - print "\n"; - &version(); - print <) { - chomp; - if (/^\s*_PROGRAM_VERSION\s*=\s*['"]*([^'"]*)['"]*\s*;?\s*$/) { - $program_version = $1; - next; - } - if (/^\s*_LAST_UPDATE\s*=\s*['"]*([^'"]*)['"]*\s*;?\s*$/) { - $last_update = $1; - next; - } - if (/^\s*_GROFF_VERSION_PRESET\s*=\s*['"]*([^'"]*)['"]*\s*;?\s*$/) { - # this setting of the groff version is only used before make is run, - # otherwise @VERSION@ will set it, see groffer.sh. - $groff_version_preset = $1; - next; - } - } - close $fh; - - if ($main::Groff_Version) { - $groff_version = $main::Groff_Version; - } else { - $groff_version = $groff_version_preset; - } - my $year = $last_update; - $year =~ s/^.* //; - print <) -# -# Test whether without its arguments exists or is a program -# in $PATH. -# -# Arguments : 1, can have spaces and arguments. -# Return : a hash with `dir', `file', `fullname', `args' if -# argument exists or is a program in $PATH, empty hash else. -# -sub where_is_prog { - scalar @_ eq 1 or die "where_is_prog(): only one argument is allowed"; - my $p1 = $_[0]; - return () unless $p1; - - $p1 =~ s/\s+/ /g; - $p1 =~ s/(\\)+ / /g; - $p1 =~ s/^ | $//g; - return () unless $p1; - - my $noarg = $p1; - $noarg =~ s/ -.*$//; - return () unless $noarg; - - my $args; - if ($p1 =~ /^.* -.*$/) { - $args = $p1; - $args =~ s#^$noarg ##; - } - $args = '' unless defined $args; - - my %result; - - # test whether $noarg has directory, so it is not tested with $PATH - my ($dir, $name) = &split_path($noarg); - $result{'dir'} = $dir; - -### where_is_prog() - if (-f $noarg && -x $noarg) { - $result{'args'} = $args; - $result{'file'} = $name; - $result{'fullname'} = File::Spec->catfile($dir, $name); - return %result; - } - - if ($dir) { # $noarg has name with directory - # now $wip_noarg (with directory) is not an executable file - - # test name with space - if ($name =~ / /) { - my @base = split(/ /, $name); - my $n = pop @base; - my @baseargs = ($n); - while (@base) { - my $base = join(' ', @base); - my $file = File::Spec->catpath($dir, $base); - if (-f $file && -x $file) { - my $baseargs = join(' ', @baseargs); - ### where_is_prog() - if ($args) { - $args = "$baseargs $args"; - } else { - $args = $baseargs; - } - $result{'args'} = $args; - $result{'file'} = $base; - $result{'fullname'} = $file; - return %result; - } # file test $file - $n = pop @base; - unshift(@baseargs, $n); - } # while (@base) - } # end of test name with space - return (); - } # test on $dir - - # now $noarg doesn't have a directory part - - $name = $noarg; - - # check with $PATH - - # test path with $win_noarg as a whole, evt. with spaces - foreach my $d (@main::Path) { - my $file = File::Spec->catfile($d, $name); - if (-f $file && -x $file) { - $result{'args'} = $args; - $result{'fullname'} = $file; - ($result{'dir'}, $result{'file'}) = &split_path($file); - return %result; - } # file test $file - } # foreach (@main::Path) - -### where_is_prog() - if ($name =~ / /) { - my @base = split(/ /, $name); - my $n = pop @base; - my @baseargs = ($n); - while (@base) { - my $base = join(' ', @base); - foreach my $d (@maon::Path) { - my $file = File::Spec->catfile($d, $base); - if (-f $file && -x $file) { - my $baseargs = join(' ', @baseargs); - if ($args) { - $args = "$baseargs $args"; - } else { - $args = $baseargs; - } - $result{'args'} = $args; - $result{'fullname'} = $file; - ($result{'dir'}, $result{'file'}) = &split_path($file); - return %result; - } # file test $file - } # foreach (@main::Path) - $n = pop @base; - unshift(@baseargs, $n); - } # while (@base) - } # test $name on space - return (); -} # where_is_prog() - - -########## -# wait() -# -# stop for checking temp files, etc. -# -sub wait { - print "push Ctrl-D"; - my @x = ; - print "\n"; -} # wait() - -1; diff -ruN groff-1.22.2/contrib/groffer/perl/groffer.man groff-1.22.3/contrib/groffer/perl/groffer.man --- groff-1.22.2/contrib/groffer/perl/groffer.man 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/groffer.man 1970-01-01 01:00:00.000000000 +0100 @@ -1,3920 +0,0 @@ -.TH GROFFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groffer \- display groff files and man\~pages on X and tty -. -.SH "SYNOPSIS" -.\" The .SH was moved to this place in order to appease `apropos'. -. -.\" -------------------------------------------------------------------- -.\" Legalese -.\" -------------------------------------------------------------------- -. -.de author -This file was written by Bernd Warken . -.. -.de copyleft -Copyright (C) 2001, 2002, 2004-2006, 2009-2012 - Free Software Foundation, Inc. -. -.P -This file is part of -.IR \%groffer , -which is part of -.IR \%groff , -a free software project. -. -You can redistribute it and/or modify it under the terms of the -.nh -.B GNU General Public License -.hy -as published by the -.nh -.BR "Free Software Foundation" , -.hy -either version 3 of the License, or (at your option) any later version. -. -.P -You should have received a copy of the \f[CR]GNU General Public -License\f[] along with -.IR groff , -see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top -directory of the -.I groff -source package. -. -Or read the -.I man\~page -.BR gpl (1). -You can also visit -.nh -.B . -.hy -.. -. -.\" -------------------------------------------------------------------- -.\" Setup -.\" -------------------------------------------------------------------- -. -.ds Ellipsis "\&.\|.\|.\&\" -. -.\" -------------------------------------------------------------------- -.\" Macro definitions -. -.\" -------------------------------------------------------------------- -.\" .CB (...) -.\" -.\" Print in constant-width bold font. -.\" -.de CB -. ft CB -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .CI (...) -.\" -.\" Print in constant-width italic font. -.\" -.de CI -. ft CI -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .CR (...) -.\" -.\" Print in constant-width roman font. -.\" -.de CR -. ft CR -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .Error (...) -.\" -.\" Print error message to terminal and abort. -.\" -.de Error -. tm \\$* -. ab -.. -.\" -------------------------------------------------------------------- -.\" .Env_var ( []) -.\" -.\" Display an environment variable, with optional punctuation. -.\" -.de Env_var -. nh -. SM -. Text \f[CB]\\$1\f[]\\$2 -. hy -.. -.\" -------------------------------------------------------------------- -.\" .File_name () -.\" -.\" Display a file or directory name in CB font. -.\" -.de File_name -. Header_CB \\$@ -.. -.\" -------------------------------------------------------------------- -.\" .Header_CB () -.\" -.\" Display a line in CB font, for example after .TP -.\" -.de Header_CB -. nh -. Text \f[CB]\\$1\f[]\\$2 -. hy -.. -.\" -------------------------------------------------------------------- -.\" .Text (...) -.\" -.\" Treat the arguments as text, no matter how they look. -.\" -.de Text -. if \\n[.$]=0 \ -. return -. nh -. nop \)\\$*\) -. hy -.. -.\" -------------------------------------------------------------------- -.\" .Topic ([]) -.\" -.\" A bulleted paragraph -.\" -.de Topic -. ie \\n[.$]=0 \ -. ds @indent 2m\" -. el \ -. ds @indent \\$1\" -. IP \[bu] \\*[@indent] -. rm @indent -.. - -.\" End of macro definitions -. -. -.\" -------------------------------------------------------------------- -.\" SH "SYNOPSIS" -.\" -------------------------------------------------------------------- -. -.SY groffer -.OP option \*[Ellipsis] -.OP -- -.OP \%filespec \*[Ellipsis] -.YS -. -.SY groffer -.BR -h | --help -.YS -. -.SY groffer -.BR -v | --version -.YS -. -. -.\" -------------------------------------------------------------------- -.SH DESCRIPTION -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program is the easiest way to use -.BR \%groff (@MAN1EXT@). -It can display arbitrary documents written in the -.I \%groff -language, see -.BR \%groff (@MAN7EXT@), -or other -.I \%roff -languages, see -.BR \%roff (@MAN7EXT@), -that are compatible to the original -.I \%troff -language. -. -It finds and runs all necessary -.I groff -preprocessors, such as -.BR @g@chem . -. -. -.P -The -.B \%groffer -program also includes many of the features for finding and displaying -the \%\f[CR]Unix\f[] manual pages -.nh -.RI ( man\~pages ), -.hy -such that it can be used as a replacement for a -.BR \%man (1) -program. -. -Moreover, compressed files that can be handled by -.BR \%gzip (1) -or -.BR \%bzip2 (1) -are decompressed on-the-fly. -. -. -.P -The normal usage is quite simple by supplying a file name or name of a -.I \%man\~page -without further options. -. -But the option handling has many possibilities for creating special -behaviors. -. -This can be done either in configuration files, with the shell -environment variable -.Env_var \%$GROFFER_OPT , -or on the command line. -. -. -.P -The output can be generated and viewed in several different ways -available for -.IR \%groff . -. -This includes the -.I \%groff -native \%\f[CR]X\~Window\f[] viewer -.BR \%gxditview (@MAN1EXT@), -each -.IR \%Postcript , -.IR \%pdf , -or -.I \%dvi -display program, a web browser by generating -.I \%html -in -.IR \%www\~mode , -or several -.I \%text\~modes -in text terminals. -. -. -.P -Most of the options that must be named when running -.B \%groff -directly are determined automatically for -.BR \%groffer , -due to the internal usage of the -.BR \%grog (@MAN1EXT@) -program. -. -But all parts can also be controlled manually by arguments. -. -. -.P -Several file names can be specified on the command line arguments. -. -They are transformed into a single document in the normal way of -.BR \%groff . -. -. -.P -Option handling is done in \f[CR]GNU\f[] style. -. -Options and file names can be mixed freely. -. -The option -.RB ` \-\- ' -closes the option handling, all following arguments are treated as -file names. -. -Long options can be abbreviated in several ways. -. -. -.\" -------------------------------------------------------------------- -.SH "OPTION OVERVIEW" -.\" -------------------------------------------------------------------- -. -.TP -.I breaking options -.RS -.P -.SY -.OP -h\~\fR|\fB\~--help -.OP -v\~\fR|\fB\~--version -.YS -.RE -. -. -.TP -.I \%groffer mode options -.RS -.P -.SY -.OP --auto -.OP --default -.OP --default\-modes mode1,mode2,\*[Ellipsis] -.OP --dvi -.OP --dvi\-viewer prog -.OP --groff -.OP --html -.OP --html\-viewer prog -.OP --mode display_mode -.OP --pdf -.OP --pdf\-viewer prog -.OP --ps -.OP --ps\-viewer prog -.OP --source -.OP --text -.OP --to\-stdout -.OP --tty -.OP --tty\-viewer prog -.OP --www -.OP --www\-viewer prog -.OP --x\~\fR|\fB\~--X -.OP --x\-viewer\~\fR|\fB\~--X\-viewer prog -.YS -.RE -. -. -.TP -.I options related to \%groff -.RS -.P -.SY -.OP -T\~\fR|\fB\~--device device -.OP -Z\~\fR|\fB\~--intermediate\-output\~\fR|\fB\~--ditroff -.YS -.P -All further -.B \%groff -short options are accepted. -.RE -. -. -.TP -.I options for man\~pages -.RS -.P -.SY -.OP --apropos -.OP --apropos\-data -.OP --apropos\-devel -.OP --apropos\-progs -.OP --man -.OP --no\-man -.OP --no\-special -.OP --whatis -.YS -.RE -. -. -.TP -.I long options taken over from GNU man -.RS -.P -.SY -.OP --all -.OP --ascii -.OP --ditroff -.OP --extension suffix -.OP --locale language -.OP --local\-file -.OP --location\~\fR|\fB\~--where -.OP --manpath dir1:dir2:\*[Ellipsis] -.OP --no\-location -.OP --pager program -.OP --sections sec1:sec2:\*[Ellipsis] -.OP --systems sys1,sys2,\*[Ellipsis] -.OP --troff\-device device -.YS -.P -Further long options of \f[CR]GNU\f[] -.B man -are accepted as well. -.RE -. -. -.TP -.I X Window Toolkit options -.RS -.P -.SY -.OP --bd\~\fR|\fB\~--bordercolor pixels -.OP --bg\~\fR|\fB\~--background color -.OP --bw\~\fR|\fB\~--borderwidth pixels -.OP --display X-display -.OP --fg\~\fR|\fB\~--foreground color -.OP --fn\~\fR|\fB\~--ft\~\fR|\fB\~--font font_name -.OP --geometry size_pos -.OP --resolution value -.OP --rv -.OP --title string -.OP --xrm X\-resource -.YS -.RE -. -. -.TP -.I options for development -.RS -.P -.SY -.OP --debug -.OP --debug\-filenames -.OP --debug\-grog -.OP --debug\-keep -.OP --debug\-params -.OP --debug\-tmpdir -.OP --do\-nothing -.OP --print text -.OP -V -.YS -.RE -. -. -.TP -.I \%filespec arguments -.RS -.P -The -.I \%filespec -parameters are all arguments that are neither an option nor an option -argument. -. -They usually mean a file name or a -.I man page -searching scheme. -. -. -.P -In the following, the term -.I section_extension -is used. -. -It means a word that consists of a -.I man section -that is optionally followed by an -.IR extension . -. -The name of a -.I man section -is a single character from -.BR \%[1-9on] , -the -.I extension -is some word. -. -The -.I extension -is mostly lacking. -. -. -.P -No -.I \%filespec -parameters means standard input. -. -. -.TP 10m -.B - -stands for standard input (can occur several times). -. -. -.TP -.I filename -the path name of an existing file. -. -. -.TP -.BI man: name ( section_extension ) -.TQ -.BI man: name . section_extension -.TQ -.IB name ( section_extension ) -.TQ -.IB name . section_extension -.TQ -.I "section_extension name" -search the \%man\~page -.I \%name -in the section with optional extension -.IR section_extension . -. -. -.TP -.BI man: name -\%man\~page in the lowest -.I \%man\~section -that has -.IR \%name . -. -. -.TP -.I name -if -.I \%name -is not an existing file search for the man\~page -.I \%name -in the lowest man\~section. -. -.RE -. -. -.\" -------------------------------------------------------------------- -.SH "OPTION DETAILS" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program can usually be run with very few options. -. -But for special purposes, it supports many options. -. -These can be classified in 5 option classes. -. -. -.P -All short options of -.B \%groffer -are compatible with the short options of -.BR \%groff (@MAN1EXT@). -. -All long options of -.B \%groffer -are compatible with the long options of -.BR \%man (1). -. -. -.P -Arguments for long option names can be abbreviated in several ways. -. -First, the argument is checked whether it can be prolonged as is. -. -Furthermore, each minus sign -.B - -is considered as a starting point for a new abbreviation. -. -This leads to a set of multiple abbreviations for a single argument. -. -For example, -.B --de\-n\-f -can be used as an abbreviation for -.BR --debug\-not\-func , -but -.B --de\-n -works as well. -. -If the abbreviation of the argument leads to several resulting options -an error is raised. -. -. -.P -These abbreviations are only allowed in the environment variable -.Env_var \%$GROFFER_OPT , -but not in the configuration files. -. -In configuration, all long options must be exact. -. -. -.\" -------------------------------------------------------------------- -.SS "groffer breaking Options" -.\" -------------------------------------------------------------------- -. -As soon as one of these options is found on the command line it is -executed, printed to standard output, and the running -.B \%groffer -is terminated thereafter. -. -All other arguments are ignored. -. -. -.TP -.B -h\~\fR|\fB\~--help -Print help information with a short explanation of options to -standard output. -. -. -.TP -.B -v\~\fR|\fB\~--version -Print version information to standard output. -. -. -.\" -------------------------------------------------------------------- -.SS "groffer Mode Options" -.\" -------------------------------------------------------------------- -. -The display mode and the viewer programs are determined by these -options. -. -If none of these mode and viewer options is specified -.B \%groffer -tries to find a suitable display mode automatically. -. -The default modes are -.IR "mode pdf" , -.IR "mode ps" , -.IR "mode html" , -.IR "mode x" , -and -.I "mode dvi" -in \%\f[CR]X\~Window\f[] with different viewers and -.I mode tty -with device -.I latin1 -under -.B less -on a terminal; other modes are tested if the programs for the main -default mode do not exist. -. -. -.P -In \%\f[CR]X\~Window\f[], -many programs create their own window when called. -.B \%groffer -can run these viewers as an independent program in the background. -. -As this does not work in text mode on a terminal (tty) there must be a -way to know which viewers are \%\f[CR]X\~Window\f[] graphical -programs. -. -The -.B \%groffer -script has a small set of information on some viewer names. -. -If a viewer argument of the command\-line chooses an element that is -kept as \%\f[CR]X\~Window\f[] program in this list it is treated as a -viewer that can run in the background. -. -All other, unknown viewer calls are not run in the background. -. -. -.P -For each mode, you are free to choose whatever viewer you want. -. -That need not be some graphical viewer suitable for this mode. -. -There is a chance to view the output source; for example, the -combination of the options -.B --mode=ps -and -.B --ps\-viewer=less -shows the content of the -.I Postscript -output, the source code, with the pager -.BR less . -. -. -.TP -.B --auto -Equivalent to -.BR --mode=auto . -. -. -.TP -.B --default -Reset all configuration from previously processed command line options -to the default values. -. -This is useful to wipe out all former options of the configuration, in -.Env_var \%$GROFFER_OPT , -and restart option processing using only the rest of the command line. -. -. -.TP -.BI --default\-modes \ mode1,mode2,\*[Ellipsis] -Set the sequence of modes for -.I \%auto\~mode -to the comma separated list given in the argument. -. -See -.B --mode -for details on modes. Display in the default manner; actually, this -means to try the modes -.IR x , -.IR ps , -and -.I \%tty -in this sequence. -. -. -. -.TP -.B --dvi -Equivalent to -.BR --mode=\%dvi . -. -. -.TP -.BI --dvi\-viewer \ prog -Choose a viewer program for -.IR \%dvi\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH . -. -Known \%\f[CR]X\~Window\f[] -.I \%dvi -viewers include -.BR \%xdvi (1) -and -.BR \%dvilx (1). -. -In each case, arguments can be provided additionally. -. -. -.TP -.B --groff -Equivalent to -.BR --mode=groff . -. -. -.TP -.B --html -Equivalent to -.BR --mode=html . -. -. -.TP -.B --html\-viewer -Choose a web browser program for viewing in -.IR \%html\~mode . -. -It can be the path name of an executable file or a program in -.Env_var $PATH . -. -In each case, arguments can be provided additionally. -. -. -.TP -.BI --mode \ value -. -Set the display mode. -. -The following mode values are recognized: -. -.RS -. -.TP -.Header_CB auto -Select the automatic determination of the display mode. -. -The sequence of modes that are tried can be set with the -.B --default\-modes -option. -. -Useful for restoring the -.I \%default\~mode -when a different mode was specified before. -. -. -.TP -.Header_CB dvi -Display formatted input in a -.I \%dvi -viewer program. -. -By default, the formatted input is displayed with the -.BR \%xdvi (1) -program. -. -. -.TP -.Header_CB groff -After the file determination, switch -.B \%groffer -to process the input like -.BR \%groff (@MAN1EXT@) -would do. -. -This disables the -.I \%groffer -viewing features. -. -. -.TP -.Header_CB html -Translate the input into html format and display the result in a web -browser program. -. -By default, the existence of a sequence of standard web browsers is -tested, starting with -.BR \%konqueror (1) -and -.BR \%mozilla (1). -The text html viewer is -.BR \%lynx (1). -. -. -.TP -.Header_CB pdf -Display formatted input in a -.I \%PDF -(Portable Document Format) viewer -program. -. -By default, the input is formatted by -.B \%groff -using the Postscript device, then it is transformed into the PDF file -format using -.BR \%gs (1), -or -.BR ps2pdf (1). -If that's not possible, the -.I Postscript mode (ps) -is used instead. -. -Finally it is displayed using different viewer programs. -. -.I \%pdf -has a big advantage because the text is displayed graphically and -is searchable as well. -. -. -.TP -.Header_CB ps -Display formatted input in a Postscript viewer program. -. -By default, the formatted input is displayed in one of many viewer -programs. -. -. -.TP -.Header_CB text -Format in a -.I \%groff\~text\~mode -and write the result to standard output without a pager or viewer -program. -. -The text device, -.I \%latin1 -by default, can be chosen with option -.BR -T . -. -. -.TP -.Header_CB tty -Format in a -.I \%groff\~text\~mode -and write the result to standard output using a text pager program, -even when in \%\f[CR]X\~Window\f[]. -. -. -.TP -.Header_CB www -Equivalent to -.BR --mode=html . -. -. -.TP -.Header_CB x -Display the formatted input in a native -.I roff -viewer. -. -By default, the formatted input is displayed with the -.BR \%gxditview (@MAN1EXT@) -program being distributed together with -.BR \%groff . -But the standard \%\f[CR]X\~Window\f[] tool -.BR \%xditview (1) -can also be chosen with the option -.BR --x\-viewer . -The default resolution is -.BR 75dpi , -but -.B 100dpi -are also possible. -. -The default -.I groff -device -for the resolution of -.B 75dpi -is -.BR X75\-12 , -for -.B 100dpi -it is -.BR X100 . -. -The corresponding -.I "groff intermediate output" -for the actual device is generated and the result is displayed. -. -For a resolution of -.BR 100dpi , -the default width of the geometry of the display program is chosen to -.BR 850dpi . -. -. -.TP -.Header_CB X -Equivalent to -.BR --mode=x . -. -. -.P -The following modes do not use the -.I \%groffer -viewing features. -. -They are only interesting for advanced applications. -. -. -.TP -.Header_CB groff -Generate device output with plain -.I \%groff -without using the special viewing features of -.IR \%groffer . -If no device was specified by option -.B -T -the -.I \%groff -default -.B \%ps -is assumed. -. -. -.TP -.Header_CB source -Output the roff source code of the input files without further -processing. -. -. -.RE -. -. -.TP -.B --pdf -Equivalent to -.BR --mode=pdf . -. -. -.TP -.BI --pdf\-viewer \ prog -Choose a viewer program for -.IR \%pdf\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B --ps -Equivalent to -.BR --mode=ps . -. -. -.TP -.BI --ps\-viewer \ prog -Choose a viewer program for -.IR \%ps\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH . -. -Common Postscript viewers include -.BR \%gv (1), -.BR \%ghostview (1), -and -.BR \%gs (1), -. -In each case, arguments can be provided additionally. -. -. -.TP -.B --source -Equivalent to -.BR --mode=source . -. -. -.TP -.B --text -Equivalent to -.BR --mode=text . -. -. -.TP -.B --to\-stdout -The file for the chosen mode is generated and its content is printed -to standard output. -. -It will not be displayed in graphical mode. -. -. -.TP -.B --tty -Equivalent to -.BR --mode=tty . -. -. -.TP -.BI --tty\-viewer \ prog -Choose a text pager for mode -.IR tty . -The standard pager is -.BR less (1). -This option is equivalent to -.I man -option -.BR --pager=\fIprog\fP . -The option argument can be a file name or a program to be searched in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B --www -Equivalent to -.BR --mode=html . -. -. -.TP -.BI --www\-viewer \ prog -Equivalent to -.BR --html\-viewer . -. -. -.TP -.B --X\~\fR|\fB\~--x -Equivalent to -.BR --mode=x . -. -. -.TP -.BI --X\-viewer\~\fR|\fB\~--x\-viewer \ prog -Choose a viewer program for -.IR \%x\~mode . -Suitable viewer programs are -.BR \%gxditview (@MAN1EXT@) -which is the default and -.BR \%xditview (1). -The argument can be any executable file or a program in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B -- -Signals the end of option processing; all remaining arguments are -interpreted as -.I \%filespec -parameters. -. -. -.P -Besides these, -.B \%groffer -accepts all short options that are valid for the -.BR \%groff (@MAN1EXT@) -program. -. -All -.RB \%non- groffer -options are sent unmodified via -.B \%grog -to -.BR \%groff . -. -So postprocessors, macro packages, compatibility with -.I classical -.IR \%troff , -and much more can be manually specified. -. -. -.\" -------------------------------------------------------------------- -.SS "Options related to groff" -.\" -------------------------------------------------------------------- -. -All short options of -.B \%groffer -are compatible with the short options of -.BR \%groff (@MAN1EXT@). -. -The following of -.B \%groff -options have either an additional special meaning within -.B \%groffer -or make sense for normal usage. -. -. -.P -Because of the special outputting behavior of the -.B \%groff -option -.B -Z -.B \%groffer -was designed to be switched into -.IR \%groff\~mode ; -the -.I \%groffer -viewing features are disabled there. -. -The other -.B \%groff -options do not switch the mode, but allow to customize the formatting -process. -. -. -.TP -.B --a -This generates an ascii approximation of output in the -.IR \%text\~modes . -. -That could be important when the text pager has problems with control -sequences in -.IR "tty mode" . -. -. -.TP -.BI --m \ file -Add -.I \%file -as a -.I \%groff -macro file. -. -This is useful in case it cannot be recognized automatically. -. -. -.TP -.BI --P \ opt_or_arg -Send the argument -.I \%opt_or_arg -as an option or option argument to the actual -.B \%groff -postprocessor. -. -. -.TP -.B --T \fIdevname\fR\~\fR|\fB\~--device \fIdevname\fR -. -This option determines -.BR \%groff 's -output device. -. -The most important devices are the text output devices for referring -to the different character sets, such as -.BR \%ascii , -.BR \%utf8 , -.BR \%latin1 , -and others. -. -Each of these arguments switches -.B \%groffer -into a -.I \%text\~mode -using this device, to -.I \%mode\~tty -if the actual mode is not a -.IR \%text\~mode . -. -The following -.I \%devname -arguments are mapped to the corresponding -.B \%groffer -.B --mode=\fIdevname\fR -option: -.BR \%dvi , -.BR \%html , -and -.BR \%ps . -All -.B \%X* -arguments are mapped to -.IR \%mode\~x . -Each other -.I \%devname -argument switches to -.I \%mode\~groff -using this device. -. -. -.TP -.B --X -is equivalent to -.BR "groff \-X" . -It displays the -.I groff intermediate output -with -.BR gxditview . -As the quality is relatively bad this option is deprecated; use -.B --X -instead because the -.I \%x\~mode -uses an -.IR X * -device for a better display. -. -. -.TP -.B -Z\~\fR|\fB\~--intermediate-output\~\fR|\fB\~--ditroff -Switch into -.I \%groff\~mode -and format the input with the -.I \%groff intermediate output -without postprocessing; see -.BR \%groff_out (@MAN5EXT@). -This is equivalent to option -.B --ditroff -of -.IR \%man , -which can be used as well. -. -. -.P -All other -.B \%groff -options are supported by -.BR \%groffer , -but they are just transparently transferred to -.B \%groff -without any intervention. -. -The options that are not explicitly handled by -.B \%groffer -are transparently passed to -.BR \%groff . -. -Therefore these transparent options are not documented here, but in -.BR \%groff (@MAN1EXT@). -Due to the automatism in -.BR \%groffer , -none of these -.B \%groff -options should be needed, except for advanced usage. -. -. -.\" -------------------------------------------------------------------- -.SS "Options for man\~pages" -.\" -------------------------------------------------------------------- -. -.TP -.B --apropos -Start the -.BR \%apropos (1) -command or facility of -.BR \%man (1) -for searching the -.I \%filespec -arguments within all -.I \%man\~page -descriptions. -. -Each -.I \%filespec -argument is taken for search as it is; -.I section -specific parts are not handled, such that -.B 7 groff -searches for the two arguments -.B 7 -and -.BR groff , -with a large result; for the -.I \%filespec -.B groff.7 -nothing will be found. -. -The -.I language -locale is handled only when the called programs do support this; the -GNU -.B apropos -and -.B man \-k -do not. -. -The display differs from the -.B \%apropos -program by the following concepts: -.RS -.Topic -Construct a -.I \%groff -frame similar to a -.I \%man\~page -to the output of -.BR \%apropos , -.Topic -each -.I \%filespec -argument is searched on its own. -.Topic -The restriction by -.B --sections -is handled as well, -.Topic -wildcard characters are allowed and handled without a further option. -.RE -. -. -.TP -.B --apropos\-data -Show only the -.B \%apropos -descriptions for data documents, these are the -.BR \%man (7) -.IR sections\~4 ", " 5 ", and " 7 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --apropos\-devel -Show only the -.B \%apropos -descriptions for development documents, these are the -.BR man (7) -.IR sections\~2 ", " 3 ", and " 9 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --apropos\-progs -Show only the -.B \%apropos -descriptions for documents on programs, these are the -.BR \%man (7) -.IR sections\~1 ", " 6 ", and " 8 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --whatis -For each -.I \%filespec -argument search all -.I \%man\~pages -and display their description \[em] or say that it is not a -.IR \%man\~page . -This is written from anew, so it differs from -.IR man 's -.B whatis -output by the following concepts -.RS -.Topic -each retrieved file name is added, -.Topic -local files are handled as well, -.Topic -the \fIlanguage\fP and \fIsystem\fP locale is supported, -.Topic -the display is framed by a -.I groff -output format similar to a -.IR \%man\~page , -.Topic -wildcard characters are allowed without a further option. -.RE -. -. -.P -The following options were added to -.B \%groffer -for choosing whether the file name arguments are interpreted as names -for local files or as a search pattern for -.IR \%man\~pages . -. -The default is looking up for local files. -. -. -.TP -.B --man -Check the non-option command line arguments -.nh -.RI ( filespecs ) -.hy -first on being -.IR \%man\~pages , -then whether they represent an existing file. -. -By default, a -.I \%filespec -is first tested whether it is an existing file. -. -. -.TP -.B --no-man\~\fR|\fB\~--local-file -Do not check for -.IR \%man\~pages . -. -.B --local-file -is the corresponding -.B man -option. -. -. -.TP -.B --no-special -Disable former calls of -.BR --all , -.BR --apropos* , -and -.BR --whatis . -. -. -.\" -------------------------------------------------------------------- -.SS "Long options taken over from GNU man" -.\" -------------------------------------------------------------------- -. -The long options of -.B \%groffer -were synchronized with the long options of \f[CR]GNU\f[] -.BR man . -. -All long options of \f[CR]GNU\f[] -.B man -are recognized, but not all of these options are important to -.BR \%groffer , -so most of them are just ignored. -. -These ignored -.B man -options are -.BR --catman , -.BR --troff , -and -.BR --update . -. -. -.P -In the following, the -.B man -options that have a special meaning for -.B \%groffer -are documented. -. -. -.P -If your system has \f[CR]GNU\f[] -.B man -installed the full set of long and short options of the \f[CR]GNU\f[] -.B man -program can be passed via the environment variable -.Env_var \%$MANOPT ; -see -.BR \%man (1). -. -. -.TP -.B --all -In searching -.IR \%man\~pages , -retrieve all suitable documents instead of only one. -. -. -.TP -.B -7\~\fR|\fB\~--ascii -In -.IR \%text\~modes , -display ASCII translation of special characters for critical environment. -. -This is equivalent to -.BR "groff \%-mtty_char" ; -see -.BR groff_tmac (@MAN5EXT@). -. -. -.TP -.B --ditroff -Produce -.IR "groff intermediate output" . -This is equivalent to -.B \%groffer -.BR -Z . -. -. -.TP -.BI --extension \ suffix -Restrict -.I \%man\~page -search to file names that have -.I \%suffix -appended to their section element. -. -For example, in the file name -.I \%/usr/share/man/man3/terminfo.3ncurses.gz -the -.I \%man\~page -extension is -.IR \%ncurses . -. -. -.TP -.BI --locale \ language -. -Set the language for -.IR \%man\~pages . -. -This has the same effect, but overwrites -.Env_var $LANG . -. -. -.TP -.B --location -Print the location of the retrieved files to standard error. -. -. -.TP -.B --no-location -Do not display the location of retrieved files; this resets a former -call to -.BR --location . -. -This was added by -.BR \%groffer . -. -. -.TP -.BI --manpath \ 'dir1:dir2:\*[Ellipsis]' -Use the specified search path for retrieving -.I \%man\~pages -instead of the program defaults. -. -If the argument is set to the empty string "" the search for -.I \%man\~page -is disabled. -. -. -.TP -.B --pager -Set the pager program in -.IR \%tty\~mode ; -default is -.BR \%less . -This is equivalent to -.BR --tty\-viewer . -. -. -.TP -.BI --sections \ sec1:sec2:\*[Ellipsis] -Restrict searching for -.I \%man\~pages -to the given -.IR sections , -a colon-separated list. -. -. -.TP -.BI --systems \ sys1,sys2,\*[Ellipsis] -Search for -.I \%man\~pages -for the given operating systems; the argument -.I \%systems -is a comma-separated list. -. -. -.TP -.B --where -Equivalent to -.BR --location . -. -. -.\" -------------------------------------------------------------------- -.SS "X\~\%Window\~\%Toolkit Options" -.\" -------------------------------------------------------------------- -. -The following long options were adapted from the corresponding -\%\f[CR]X\~Window\~Toolkit\f[] options. -. -.B \%groffer -will pass them to the actual viewer program if it is an -\%\f[CR]X\~Window\f[] program. -. -Otherwise these options are ignored. -. -. -.P -Unfortunately these options use the old style of a single minus for -long options. -. -For -.B \%groffer -that was changed to the standard with using a double minus for long -options, for example, -.B \%groffer -uses the option -.B --font -for the \%\f[CR]X\~Window\f[] option -.BR -font . -. -. -.P -See -.BR X (7) -and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options -for more details on these options and their arguments. -. -. -.TP -.BI --background \ color -Set the background color of the viewer window. -. -. -.TP -.BI --bd \ pixels -This is equivalent to -.BR --bordercolor . -. -. -.TP -.BI --bg \ color -This is equivalent to -.BR --background . -. -. -.TP -.BI --bw \ pixels -This is equivalent to -.BR --borderwidth . -. -. -.TP -.BI --bordercolor \ pixels -Specifies the color of the border surrounding the viewer window. -. -. -.TP -.BI --borderwidth \ pixels -Specifies the width in pixels of the border surrounding the viewer -window. -. -. -.TP -.BI --display \ X-display -Set the \%\f[CR]X\~Window\f[] display on which the viewer program -shall be started, see the \%\f[CR]X\~Window\f[] documentation for the -syntax of the argument. -. -. -.TP -.BI --foreground \ color -Set the foreground color of the viewer window. -. -. -.TP -.BI --fg \ color -This is equivalent to -.BR -foreground . -. -. -.TP -.BI --fn \ font_name -This is equivalent to -.BR --font . -. -. -.TP -.BI --font \ font_name -Set the font used by the viewer window. -. -The argument is an \%\f[CR]X\~Window\f[] font name. -. -. -.TP -.BI --ft \ font_name -This is equivalent to -.BR --font . -. -. -.TP -.BI --geometry \ size_pos -Set the geometry of the display window, that means its size and its -starting position. -. -See -.BR \%X (7) -for the syntax of the argument. -. -. -.TP -.BI --resolution \ value -Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some -viewer programs. -. -The only supported dpi values are -.B 75 -and -.BR 100 . -. -Actually, the default resolution for -.B \%groffer -is set to -.BR 75dpi . -The resolution also sets the default device in -.IR "mode x" . -. -. -.TP -.B --rv -Reverse foreground and background color of the viewer window. -. -. -.TP -.BI --title "\ 'some text'" -Set the title for the viewer window. -. -. -.TP -.BI --xrm \ 'resource' -Set \f[CR]\%X\~Window\f[] resource. -. -. -.\" -------------------------------------------------------------------- -.SS "Options for Development" -.\" -------------------------------------------------------------------- -. -.TP -.B --debug -Enable all debugging options -.BR --debug\-\fItype\fP . -. -The temporary files are kept and not deleted, the -.B grog -output is printed, the name of the temporary directory is printed, the -displayed file names are printed, and the parameters are printed. -. -. -.TP -.B --debug\-filenames -Print the names of the files and -.I \%man\~pages -that are displayed by -.BR \&groffer . -. -. -.TP -.B --debug\-grog -Print the output of all -.B grog -commands. -. -. -.TP -.B --debug\-keep -Enable two debugging informations. -. -Print the name of the temporary directory and keep the temporary -files, do not delete them during the run of -.BR \%groffer . -. -. -.TP -.B --debug\-params -Print the parameters, as obtained from the configuration files, from -.Env_var \%GROFFER_OPT , -and the command line arguments. -. -. -.TP -.B --debug\-tmpdir -Print the name of the temporary directory. -. -. -.TP -.B --do-nothing -This is like -.BR --version , -but without the output; no viewer is started. -. -This makes only sense in development. -. -. -.TP -.B --print=\fItext\fR -Just print the argument to standard error. -. -This is good for parameter check. -. -. -.TP -.B -V -This is an advanced option for debugging only. -. -Instead of displaying the formatted input, a lot of -.I \%groffer -specific information is printed to standard output: -. -.RS -.Topic -the output file name in the temporary directory, -. -.Topic -the display mode of the actual -.B \%groffer -run, -. -.Topic -the display program for viewing the output with its arguments, -. -.Topic -the active parameters from the config files, the arguments in -.Env_var \%$GROFFER_OPT , -and the arguments of the command line, -. -.Topic -the pipeline that would be run by the -.B \%groff -program, but without executing it. -.RE -. -. -.P -Other useful debugging options are the -.B \%groff -option -.B -Z -and -.BR --mode=groff . -. -. -.\" -------------------------------------------------------------------- -.SS "Filespec Arguments" -.\" -------------------------------------------------------------------- -. -A -.I \%filespec -parameter is an argument that is not an option or option argument. -. -In -.BR \%groffer , -.I \%filespec -parameters are a file name or a template for searching -.IR \%man\~pages . -. -These input sources are collected and composed into a single output -file such as -.B \%groff -does. -. -. -.P -The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind -the first non-option argument as -.I \%filespec -arguments is ignored. -. -The \f[CR]GNU\f[] behavior to recognize options even when mixed with -.I \%filespec -arguments is used throughout. -. -But, as usual, the double minus argument -.B -- -ends the option handling and interprets all following arguments as -.I \%filespec -arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted. -. -. -.P -The options -.B --apropos* -have a special handling of -.I filespec -arguments. -. -Each argument is taken as a search scheme of its own. -. -Also a regexp (regular expression) can be used in the filespec. -. -For example, -.B groffer --apropos '^gro.f$' -searches -.B groff -in the -.I man\~page -name, while -.B groffer --apropos groff -searches -.B groff -somewhere in the name or description of the -.IR man\~pages . -. -. -.P -All other parts of -.IR groffer , -such as the normal display or the output with -.B --whatis -have a different scheme for -.IR filespecs . -No regular expressions are used for the arguments. -. -The -.I filespec -arguments are handled by the following scheme. -. -. -.P -It is necessary to know that on each system the -.I \%man\~pages -are sorted according to their content into several sections. -. -The -.I classical man sections -have a single-character name, either a digit from -.B 1 -to -.B 9 -or one of the characters -.B n -or -.BR o . -. -. -.P -This can optionally be followed by a string, the so-called -.IR extension . -The -.I extension -allows to store several -.I man\~pages -with the same name in the same -.IR section . -But the -.I extension -is only rarely used, usually it is omitted. -. -Then the -.I extensions -are searched automatically by alphabet. -. -. -.P -In the following, we use the name -.I section_extension -for a word that consists of a single character -.I section -name or a -.I section -character that is followed by an -.IR extension . -. -Each -.I \%filespec -parameter can have one of the following forms in decreasing sequence. -. -. -.Topic -No -.I \%filespec -parameters means that -.B \%groffer -waits for standard input. -. -The minus option -.B - -always stands for standard input; it can occur several times. -. -If you want to look up a -.I \%man\~page -called -.B - -use the argument -.BR man:\- . -. -. -.Topic -Next a -.I \%filespec -is tested whether it is the path name of an existing file. -. -Otherwise it is assumed to be a searching pattern for a -.IR \%man\~page . -. -. -.Topic -.BI \%man: name ( section_extension ) , -.BI \%man: name . section_extension, -.IB \%name ( section_extension ) , -or -.IB \%name . section_extension -search the \%man\~page -.I \%name -in \%man\~section and possibly extension of -.IR \%section_extension . -. -. -.Topic -Now -.BI \%man: name -searches for a -.I \%man\~page -in the lowest -.I \%man\~section -that has a document called -.IR \%name . -. -. -.Topic -.I \%section_extension\~name -is a pattern of 2 arguments that originates from a strange argument -parsing of the -.B man -program. -. -Again, this searches the man page -.I name -with -.IR \%section_extension , -a combination of a -.I section -character optionally followed by an -.IR extension . -. -. -.Topic -We are left with the argument -.I \%name -which is not an existing file. -. -So this searches for the -.I \%man\~page -called -.I \%name -in the lowest -.I \%man\~section -that has a document for this name. -. -. -.P -Several file name arguments can be supplied. -. -They are mixed by -.B \%groff -into a single document. -. -Note that the set of option arguments must fit to all of these file -arguments. -. -So they should have at least the same style of the -.I \%groff -language. -. -. -.\" -------------------------------------------------------------------- -.SH "OUTPUT MODES" -.\" -------------------------------------------------------------------- -. -By default, the -.B \%groffer -program collects all input into a single file, formats it with the -.B \%groff -program for a certain device, and then chooses a suitable viewer -program. -. -The device and viewer process in -.B \%groffer -is called a -.IR \%mode . -. -The mode and viewer of a running -.B \%groffer -program is selected automatically, but the user can also choose it -with options. -. -. -The modes are selected by option the arguments of -.BR --mode=\fIanymode . -Additionally, each of this argument can be specified as an option of -its own, such as -.BR anymode . -Most of these modes have a viewer program, which can be chosen by an -option that is constructed like -.BR --\fIanymode\fR\-viewer . -. -. -.P -Several different modes are offered, graphical modes for -\f[CR]\%X\~Window\f[], -.IR \%text\~modes , -and some direct -.I \%groff\~modes -for debugging and development. -. -. -.P -By default, -.B \%groffer -first tries whether -.I \%x\~mode -is possible, then -.IR \%ps\~mode , -and finally -.IR \%tty\~mode . -. -This mode testing sequence for -.I \%auto\~mode -can be changed by specifying a comma separated list of modes with the -option -.B --default\-modes. -. -. -.P -The searching for -.I \%man\~pages -and the decompression of the input are active in every mode. -. -. -.\" -------------------------------------------------------------------- -.SS "Graphical Display Modes" -.\" -------------------------------------------------------------------- -. -The graphical display modes work mostly in the \%\f[CR]X\~Window\f[] -environment (or similar implementations within other windowing -environments). -. -The environment variable -.Env_var \%$DISPLAY -and the option -.B --display -are used for specifying the \%\f[CR]X\~Window\f[] display to be used. -. -If this environment variable is empty -.B \%groffer -assumes that no \%\f[CR]X\~Window\f[] is running and changes to a -.IR \%text\~mode . -. -You can change this automatic behavior by the option -.BR --default\-modes . -. -. -.P -Known viewers for the graphical display modes and their standard -\%\f[CR]X\~Window\f[] viewer programs are -. -.Topic -in a PDF viewer -.nh -.RI ( \%pdf\~mode ) -.hy -. -.Topic -in a web browser -.nh -.RI ( html -or -.IR \%www\~mode ) -.hy -.RE -. -.Topic -in a Postscript viewer -.nh -.RI ( \%ps\~mode ) -.hy -. -.Topic -\%\f[CR]X\~Window\f[] -.I roff -viewers such as -.BR \%gxditview (@MAN1EXT@) -or -.BR \%xditview (1) -(in -.IR \%x\~mode ) -. -.Topic -in a dvi viewer program -.nh -.RI ( \%dvi\~mode ) -.hy -. -. -.P -The -.I \%pdf\~mode -has a major advantage \[em] it is the only graphical display mode that -allows to search for text within the viewer; this can be a really -important feature. -. -Unfortunately, it takes some time to transform the input into the PDF -format, so it was not chosen as the major mode. -. -. -.P -These graphical viewers can be customized by options of the -\%\f[CR]X\~Window\~Toolkit\f[]. -. -But the -.B \%groffer -options use a leading double minus instead of the single minus used by -the \%\f[CR]X\~Window\~Toolkit\f[]. -. -. -.\" -------------------------------------------------------------------- -.SS "Text modes" -.\" -------------------------------------------------------------------- -. -There are two modes for text output, -.I \%mode\~text -for plain output without a pager and -.I \%mode\~tty -for a text output on a text terminal using some pager program. -. -. -.P -If the variable -.Env_var \%$DISPLAY -is not set or empty, -.B \%groffer -assumes that it should use -.IR \%tty\~\%mode . -. -. -.P -In the actual implementation, the -.I groff -output device -.I \%latin1 -is chosen for -.IR \%text\~modes . -. -This can be changed by specifying option -.B -T -or -.BR \%--device . -. -. -.P -The pager to be used can be specified by one of the options -.B --pager -and -.BR --tty\-viewer , -or by the environment variable -.Env_var \%$PAGER . -If all of this is not used the -.BR \%less (1) -program with the option -.B -r -for correctly displaying control sequences is used as the default -pager. -. -. -.\" -------------------------------------------------------------------- -.SS "Special Modes for Debugging and Development" -.\" -------------------------------------------------------------------- -. -These modes use the -.I \%groffer -file determination and decompression. -. -This is combined into a single input file that is fed directly into -.B \%groff -with different strategy without the -.I \%groffer -viewing facilities. -. -These modes are regarded as advanced, they are useful for debugging -and development purposes. -. -. -.P -The -.I \%source\~mode -with option -.B --source -just displays the decompressed input. -. -. -.P -Otion -.B --to\-stdout -does not display in a graphical mode. -. -It just generates the file for the chosen mode and then prints its -content to standard output. -. -. -.P -The -.I \%groff\~mode -passes the input to -.B \%groff -using only some suitable options provided to -.BR \%groffer . -. -This enables the user to save the generated output into a file or pipe -it into another program. -. -. -.P -In -.IR \%groff\~\%mode , -the option -.B -Z -disables post-processing, thus producing the -.nh -.I groff intermediate -.IR output . -.hy -. -In this mode, the input is formatted, but not postprocessed; see -.BR \%groff_out (@MAN5EXT@) -for details. -. -. -.P -All -.B \%groff -short options are supported by -.BR \%groffer . -. -. -.\" -------------------------------------------------------------------- -.SH "MAN PAGE SEARCHING" -.\" -------------------------------------------------------------------- -. -The default behavior of -.B \%groffer -is to first test whether a file parameter represents a local file; if -it is not an existing file name, it is assumed to represent the name -of a -.IR \%man\~page . -The following options can be used to determine whether the arguments -should be handled as file name or -.I \%man\~page -arguments. -. -.TP -.B --man -forces to interpret all file parameters as -.I \%filespecs -for searching -.IR \%man\~pages . -. -.TP -.B --no\-man -.TQ -.B --local\-file -disable the -.I man -searching; so only local files are displayed. -. -. -.P -If neither a local file nor a -.I \%man\~page -was retrieved for some file parameter a warning is issued on standard -error, but processing is continued. -. -. -.\" -------------------------------------------------------------------- -.SS "Search Algorithm" -.\" -------------------------------------------------------------------- -. -Let us now assume that a -.I \%man\~page -should be searched. -. -The -.B \%groffer -program provides a search facility for -.IR \%man\~pages . -. -All long options, all environment variables, and most of the -functionality of the \f[CR]GNU\fP -.BR \%man (1) -program were implemented. -. -The search algorithm shall determine which file is displayed for a given -.IR \%man\~page . -The process can be modified by options and environment variables. -. -. -.P -The only -.I man -action that is omitted in -.B \%groffer -are the preformatted -.IR \%man\~pages , -also called -.IR cat\~pages . -. -With the excellent performance of the actual computers, the -preformatted -.I \%man\~pages -aren't necessary any longer. -. -Additionally, -.B \%groffer -is a -.I roff -program; it wants to read -.I roff -source files and format them itself. -. -. -.P -The algorithm for retrieving the file for a -.I \%man\~page -needs first a set of directories. -. -This set starts with the so-called -.I man\~path -that is modified later on by adding names of -.I operating system -and -.IR language . -. -This arising set is used for adding the section directories which -contain the -.I \%man\~page -files. -. -. -.P -The -.I man\~path -is a list of directories that are separated by colon. -. -It is generated by the following methods. -. -.Topic -The environment variable -.Env_var \%$MANPATH -can be set. -. -.Topic -It can be read from the arguments of the environment variable -.Env_var \%$MANOPT . -. -.Topic -The -.I man\~path -can be manually specified by using the option -.BR --manpath . -An empty argument disables the -.I \%man\~page -searching. -. -.Topic -When no -.I man\~path -was set the -.BR \%manpath (1) -program is tried to determine one. -. -.Topic -If this does not work a reasonable default path from -.Env_var $PATH -is determined. -. -. -.P -We now have a starting set of directories. -. -The first way to change this set is by adding names of -.I operating -.IR systems . -. -This assumes that -.I \%man\~pages -for several -.I operating systems -are installed. -. -This is not always true. -. -The names of such -.I operating systems -can be provided by 3 methods. -. -.Topic -The environment variable -.Env_var \%$SYSTEM -has the lowest precedence. -. -.Topic -This can be overridden by an option in -.Env_var \%$MANOPT . -. -.Topic -This again is overridden by the command line option -.BR --systems . -. -. -.P -Several names of -.I operating systems -can be given by appending their names, separated by a comma. -. -. -.P -The -.I man\~path -is changed by appending each -.I system -name as subdirectory at the end of each directory of the set. -. -No directory of the -.I man\~path -set is kept. -. -But if no -.I system -name is specified the -.I man\~path -is left unchanged. -. -. -.P -After this, the actual set of directories can be changed by -.I language -information. -. -This assumes that there exist -.I man\~pages -in different languages. -. -The wanted -.I language -can be chosen by several methods. -. -.Topic -Environment variable -.Env_var $LANG . -. -.Topic -This is overridden by -.Env_var \%$LC_MESSAGES . -. -.Topic -This is overridden by -.Env_var $LC_ALL . -. -.Topic -This can be overridden by providing an option in -.Env_var \%$MANOPT . -. -.Topic -All these environment variables are overridden by the command line -option -.BR --locale . -. -. -.P -The -.I default language -can be specified by specifying one of the pseudo-language parameters -\f[CR]C\fP or \f[CR]\%POSIX\fP. -. -This is like deleting a formerly given -.I language -information. -. -The -.I \%man\~pages -in the -.I default language -are usually in English. -. -. -.P -Of course, the -.I language -name is determined by -.BR man . -In \f[CR]GNU\fP -.BR man , -it is specified in the \%\f[CR]POSIX\~1003.1\fP based format: -.P -.nh -\f[I]\f[][\f[CB]_\f[]\f[I]\f[][\f[CB].\fP\ -\f[I]\f[][\f[CB],\fP\f[I]\fP]]], -.hy -.P -but the two-letter code in -.nh -.I -.hy -is sufficient for most purposes. -. -If for a complicated -.I language -formulation no -.I \%man\~pages -are found -.B \%groffer -searches the country part consisting of these first two characters as -well. -. -. -.P -The actual directory set is copied thrice. -. -The -.I language -name is appended as subdirectory to each directory in the first copy -of the actual directory set (this is only done when a language -information is given). -. -Then the 2-letter abbreviation of the -.I language -name is appended as subdirectories to the second copy of the directory -set (this is only done when the given language name has more than 2 -letters). -. -The third copy of the directory set is kept unchanged (if no -.I language -information is given this is the kept directory set). -. -These maximally 3 copies are appended to get the new directory set. -. -. -.P -We now have a complete set of directories to work with. -. -In each of these directories, the -.I man -files are separated in -.IR sections . -. -The name of a -.I section -is represented by a single character, a digit between -.I 1 -and -.IR 9 , -or the character -.I o -or -.IR n , -in this order. -. -. -.P -For each available -.IR section , -a subdirectory -.File_name man \fI
\fP -exists containing all -.I man -files for this -.IR section , -where -.I
-is a single character as described before. -. -Each -.I man -file in a -.I section -directory has the form -.IR \%\f[CB]man\fP
\f[CB]/\fP\f[CB].\fP
\ -[][\f[CB].\fP] , -where -.I \% -and -.I \% -are optional. -. -.I \% -is the name of the -.I \%man\~page -that is also specified as filespec argument on the command line. -. -. -.P -The -.I extension -is an addition to the section. -. -This postfix acts like a subsection. -. -An -.I extension -occurs only in the file name, not in name of the -.I section -subdirectory. -. -It can be specified on the command line. -. -. -.P -On the other hand, the -.I compression -is just an information on how the file is compressed. -. -This is not important for the user, such that it cannot be specified -on the command line. -. -. -.P -There are 4 methods to specify a -.I section -on the command line: -. -.Topic -Environment variable -.Env_var \%$MANSECT -. -.Topic -Command line option -.B --sections -. -.Topic -Appendix to the -.I name -argument in the form -.I .
-. -.Topic -Preargument before the -.I name -argument in the form -.I
-. -. -.P -It is also possible to specify several -.I sections -by appending the single characters separated by colons. -. -One can imagine that this means to restrict the -.I \%man\~page -search to only some -.IR sections . -. -The multiple -.I sections -are only possible for -.Env_var \%$MANSECT -and -.BR --sections . -. -. -.P -If no -.I section -is specified all -.I sections -are searched one after the other in the given order, starting with -.IR section\~1 , -until a suitable file is found. -. -. -.P -There are 4 methods to specify an -.I extension -on the command line. -. -But it is not necessary to provide the whole extension name, some -abbreviation is good enough in most cases. -. -.Topic -Environment variable -.Env_var \%$EXTENSION -. -.Topic -Command line option -.B --extension -. -.Topic -Appendix to the -.I .
-argument in the form -.I .
-. -.Topic -Preargument before the -.I name -argument in the form -.I
-. -. -.P -For further details on -.I \%man\~page -searching, see -.BR \%man (1). -. -. -.\" -------------------------------------------------------------------- -.SS "Examples of man files" -.\" -------------------------------------------------------------------- -. -.TP -.File_name /usr/share/man/man1/groff.1 -This is an uncompressed file for the -.I \%man\~page -\f[CR]groff\fP in -.IR section\~1 . -. -It can be called by -.EX -\fIsh#\fR groffer\~groff -.EE -No -.I section -is specified here, so all -.I sections -should be searched, but as -.I section\~1 -is searched first this file will be found first. -. -The file name is composed of the following components. -.File_name /usr/share/man -must be part of the -.IR \%man\~path ; -the subdirectory -.File_name man1/ -and the part -.File_name .1 -stand for the -.IR section ; -.File_name groff -is the name of the -.IR \%man\~page . -. -. -.TP -.File_name /usr/local/share/man/man7/groff.7.gz -The file name is composed of the following components. -.File_name /usr/local/share/man -must be part of the -.IR \%man\~path ; -the subdirectory -.File_name man7/ -and the part -.File_name .7 -stand for the -.IR section ; -.File_name groff -is the name of the -.IR \%man\~page ; -the final part -.File_name .gz -stands for a compression with -.BR gzip (1). -As the -.I section -is not the first one it must be specified as well. -. -This can be done by one of the following commands. -.EX -\fIsh#\fR\~groffer\~groff.7 -\fIsh#\fR\~groffer\~7\~groff -\fIsh#\fR\~groffer\~\-\-sections=7\~groff -.EE -. -.TP -.File_name /usr/local/man/man1/ctags.1emacs21.bz2 -Here -.File_name /usr/local/man -must be in -.IR \%man\~path ; -the subdirectory -.File_name man1/ -and the file name part -.File_name .1 -stand for -.IR section\~1 ; -the name of the -.I \%man\~page -is -.File_name ctags ; -the section has an extension -.File_name emacs21 ; -and the file is compressed as -.File_name .bz2 -with -.BR bzip2 (1). -The file can be viewed with one of the following commands -.EX -\fIsh#\fR\~groffer\~ctags.1e -\fIsh#\fR\~groffer\~1e\~ctags -\fIsh#\fR\~groffer\~\-\-extension=e\~\-\-sections=1\~ctags -.EE -where \f[CR]e\fP works as an abbreviation for the extension -\f[CR]emacs21\fP. -. -. -.TP -.File_name /usr/man/linux/de/man7/man.7.Z -The directory -.File_name /usr/man -is now part of the -.IR \%man\~path ; -then there is a subdirectory for an -.I operating system -name -.File_name linux/ ; -next comes a subdirectory -.File_name de/ -for the German -.IR language ; -the -.I section -names -.File_name man7 -and -.File_name .7 -are known so far; -.File_name man -is the name of the -.IR \%man\~page ; -and -.File_name .Z -signifies the compression that can be handled by -.BR gzip (1). -We want now show how to provide several values for some options. -. -That is possible for -.I sections -and -.I operating system -names. -. -So we use as -.I sections\~5 -and -.I 7 -and as -.I system -names -.I linux -and -.IR aix . -The command is then -.sp -.EX -\fIsh#\fR groffer\~\-\-locale=de\~\-\-sections=5:7\~\-\-systems=linux,aix\~man -\fIsh#\fR LANG=de\~MANSECT=5:7\~SYSTEM=linux,aix\~groffer\~man -.EE -. -. -.\" -------------------------------------------------------------------- -.SH DECOMPRESSION -.\" -------------------------------------------------------------------- -. -The program has a decompression facility. -. -If standard input or a file that was retrieved from the command line -parameters is compressed with a format that is supported by either -.BR \%gzip (1) -or -.BR \%bzip2 (1) -it is decompressed on-the-fly. -. -This includes the \f[CR]GNU\fP -.BR \%.gz , -.BR \%.bz2 , -and the traditional -.B \%.Z -compression. -. -The program displays the concatenation of all decompressed input in -the sequence that was specified on the command line. -. -. -.\" -------------------------------------------------------------------- -.SH "ENVIRONMENT" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program supports many system variables, most of them by courtesy of -other programs. -. -All environment variables of -.BR \%groff (@MAN1EXT@) -and \f[CR]GNU\fP -.BR \%man (1) -and some standard system variables are honored. -. -. -.\" -------------------------------------------------------------------- -.SS "Native groffer Variables" -.\" -------------------------------------------------------------------- -. -.TP -.Env_var \%$GROFFER_OPT -Store options for a run of -.BR \%groffer . -. -The options specified in this variable are overridden by the options -given on the command line. -. -The content of this variable is run through the shell builtin `eval'; -so arguments containing white-space or special shell characters should -be quoted. -. -Do not forget to export this variable, otherwise it does not exist -during the run of -.BR groffer . -. -. -.\" -------------------------------------------------------------------- -.SS "System Variables" -.\" -------------------------------------------------------------------- -. -The following variables have a special meaning for -.BR \%groffer . -. -. -.TP -.Env_var \%$DISPLAY -If this variable is set this indicates that the \%\f[CR]X\~Window\fP -system is running. -. -Testing this variable decides on whether graphical or text output is -generated. -. -This variable should not be changed by the user carelessly, but it can -be used to start the graphical -.B \%groffer -on a remote \%\f[CR]X\~Window\fP terminal. -. -For example, depending on your system, -.B \%groffer -can be started on the second monitor by the command -.sp -.EX -\fIsh#\fR DISPLAY=:0.1\~groffer\~what.ever & -.EE -. -. -.TP -.Env_var \%$LC_ALL -.TQ -.Env_var \%$LC_MESSAGES -.TQ -.Env_var $LANG -If one of these variables is set (in the above sequence), its content -is interpreted as the locale, the language to be used, especially when -retrieving -.IR \%man\~pages . -. -A locale name is typically of the form -.nh -.IR language [\c -.B _\c -.IR territory [\c -.B .\c -.IR codeset [\c -.B @\c -.IR modifier ]]], -.hy -where -.I \%language -is an ISO 639 language code, -.I \%territory -is an ISO 3166 country code, and -.I \%codeset -is a character set or encoding identifier like ISO-8859-1 or UTF-8; -see -.BR \%setlocale (3). -. -The locale values \f[CR]C\fP and \%\f[CR]POSIX\fP -stand for the default, i.e. the -.I \%man\~page -directories without a language prefix. -. -This is the same behavior as when all 3\~variables are unset. -. -. -.TP -.Env_var \%$PAGER -This variable can be used to set the pager for the tty output. -. -For example, to disable the use of a pager completely set this -variable to the -.BR \%cat (1) -program -.sp -.EX -\fIsh#\fR PAGER=cat\~groffer\~anything -.EE -.sp -. -.TP -.Env_var $PATH -All programs within the -.B \%groffer -script are called without a fixed path. -. -Thus this environment variable determines the set of programs used -within the run of -.BR \%groffer . -. -. -.\" -------------------------------------------------------------------- -.SS "Groff Variables" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program internally calls -.BR \%groff , -so all environment variables documented in -.BR \%groff (@MAN1EXT@) -are internally used within -.B \%groffer -as well. -. -The following variable has a direct meaning for the -.B \%groffer -program. -. -.TP -.Env_var \%$GROFF_TMPDIR -If the value of this variable is an existing, writable directory, -.B \%groffer -uses it for storing its temporary files, just as -.B groff -does. -. -See the -.BR \%groff (@MAN1EXT@) -man page for more details on the location of temporary files. -. -. -.\" -------------------------------------------------------------------- -.SS "Man Variables" -.\" -------------------------------------------------------------------- -. -Parts of the functionality of the -.B man -program were implemented in -.BR \%groffer ; -support for all environment variables documented in -.BR \%man (1) -was added to -.BR \%groffer , -but the meaning was slightly modified due to the different approach in -.BR \%groffer ; -but the user interface is the same. -. -The -.B man -environment variables can be overwritten by options provided with -.Env_var \%$MANOPT , -which in turn is overwritten by the command line. -. -. -.TP -.Env_var \%$EXTENSION -Restrict the search for -.I \%man\~pages -to files having this extension. -. -This is overridden by option -.BR --extension ; -see there for details. -. -. -.TP -.Env_var \%$MANOPT -This variable contains options as a preset for -.BR \%man (1). -As not all of these are relevant for -.B \%groffer -only the essential parts of its value are extracted. -. -The options specified in this variable overwrite the values of the -other environment variables that are specific to -.IR man . -. -All options specified in this variable are overridden by the options -given on the command line. -. -. -.TP -.Env_var \%$MANPATH -If set, this variable contains the directories in which the -.I \%man\~page -trees are stored. -. -This is overridden by option -.BR \%--manpath . -. -. -.TP -.Env_var \%$MANSECT -If this is a colon separated list of section names, the search for -.I \%man\~pages -is restricted to those manual sections in that order. -. -This is overridden by option -.BR --sections . -. -. -.TP -.Env_var \%$SYSTEM -If this is set to a comma separated list of names these are interpreted -as -.I \%man\~page -trees for different operating systems. -. -This variable can be overwritten by option -.BR --systems ; -see there for details. -. -. -.P -The environment variable -.Env_var \%$MANROFFSEQ -is ignored by -.B \%groffer -because the necessary preprocessors are determined automatically. -. -. -.\" -------------------------------------------------------------------- -.SH "CONFIGURATION FILES" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program can be preconfigured by two configuration files. -. -. -.TP -.File_name \%/etc/groff/groffer.conf -System-wide configuration file for -.BR \%groffer . -. -. -.TP -.File_name \%$HOME/.groff/groffer.conf -User-specific configuration file for -.BR \%groffer , -where -.Env_var \%$HOME -denotes the user's home directory. -. -This file is called after the system-wide configuration file to enable -overriding by the user. -. -. -.P -Both files are handled for the configuration, but the configuration -file in -.File_name /etc -comes first; it is overwritten by the configuration file in the home -directory; both configuration files are overwritten by the environment -variable -.Env_var \%$GROFFER_OPT ; -everything is overwritten by the command line arguments. -. -. -.P -The configuration files contain options that should be called as -default for every -.B \%groffer -run. -. -These options are written in lines such that each contains either a -long option, a short option, or a short option cluster; each with or -without an argument. -. -So each line with configuration information starts with a minus -character -.RB ` \- '; -a line with a long option starts with two minus characters -.RB ` \-\- ', -a line with a short option or short option cluster starts with a -single minus -.RB ` \- '. -. -. -.P -The option names in the configuration files may not be abbreviated, -they must be exact. -. -. -.P -The argument for a long option can be separated from the option name -either by an equal sign -.RB ` = ' -or by whitespace, i.e. one or several space or tab characters. -. -An argument for a short option or short option cluster can be directly -appended to the option name or separated by whitespace. -. -The end of an argument is the end of the line. -. -It is not allowed to use a shell environment variable in an option -name or argument. -. -. -.P -It is not necessary to use quotes in an option or argument, except for -empty arguments. -. -An empty argument can be provided by appending a pair of quotes to the -separating equal sign or whitespace; with a short option, the -separator can be omitted as well. -. -For a long option with a separating equal sign -.RB ` = ', -the pair of quotes can be omitted, thus ending the line with the -separating equal sign. -. -All other quote characters are cancelled internally. -. -. -.P -In the configuration files, arbitrary whitespace is allowed at the -beginning of each line, it is just ignored. -. -Each whitespace within a line is replaced by a single space character -` ' internally. -. -. -.P -All lines of the configuration lines that do not start -with a minus character are ignored, such that comments starting with -.RB ` # ' -are possible. -. -So there are no shell commands in the configuration files. -. -. -.P -As an example, consider the following configuration file that can be -used either in -.File_name \%/etc/groff/groffer.conf -or -.File_name \%~/.groff/groffer.conf . -. -. -.P -.ft CR -.nh -.nf -# groffer configuration file -# -# groffer options that are used in each call of groffer -\-\-foreground=DarkBlue -\-\-resolution=100 -\-\-x\-viewer=gxditview \-geometry 900x1200 -\-\-pdf\-viewer xpdf \-Z 150 -.fi -.hy -.ft -. -. -.P -The lines starting with -.B # -are just ignored, so they act as command lines. -. -This configuration sets four -.B \%groffer -options (the lines starting with -.RB ` \- '). -This has the following effects: -. -. -.Topic -Use a text color of -.B \%DarkBlue -in all viewers that support this, such as -.BR \%gxditview . -. -. -.Topic -Use a resolution of -.B 100dpi -in all viewers that support this, such as -.BR \%gxditview . -. -By this, the default device in -.I x mode -is set to -.BR X100 . -. -. -.Topic -Force -.BR \%gxditview (@MAN1EXT@) -as the -.I \%x-mode -viewer using the geometry option for setting the width to -.B 900px -and the height to -.BR 1200px . -This geometry is suitable for a resolution of -.BR 100dpi . -. -. -.Topic -Use -.BR \%xpdf (1) -as the -.I \%pdf-mode -viewer with the argument -.B \-Z -.BR 150 . -. -. -.\" -------------------------------------------------------------------- -.SH "EXAMPLES" -.\" -------------------------------------------------------------------- -. -The usage of -.B \%groffer -is very easy. -. -Usually, it is just called with a file name or -.IR \%man\~page . -. -The following examples, however, show that -.B \%groffer -has much more fancy capabilities. -. -.sp -.EX -\fIsh#\fR\~groffer\~/usr/local/share/doc/groff/meintro.ms.gz -.EE -.sp -Decompress, format and display the compressed file -.File_name meintro.ms.gz -in the directory -.File_name /usr/local/share/doc/groff , -using the standard viewer -.B \%gxditview -as graphical viewer when in \%\f[CR]X\~Window\fP, or the -.BR \%less (1) -pager program when not in \%\f[CR]X\~Window\fP. -. -.sp -.EX -\fIsh#\fR\~groffer\~groff -.EE -.sp -If the file -.File_name \%./groff -exists use it as input. -. -Otherwise interpret the argument as a search for the -.I \%man\~page -named -.B \%groff -in the smallest possible -.IR \%man\~section , -being section 1 in this case. -. -.sp -.EX -\fIsh#\fR\~groffer\~man:groff -.EE -.sp -search for the -.I \%man\~page -of -.B \%groff -even when the file -.File_name ./groff -exists. -. -.sp -.EX -\fIsh#\fR\~groffer\~groff.7 -\fIsh#\fR\~groffer\~7\~groff -.EE -.sp -search the -.I \%man\~page -of -.B \%groff -in -.I \%man\~section -.BR 7 . -This section search works only for a digit or a single character from -a small set. -. -.sp -.EX -\fIsh#\fR\~groffer\~fb.modes -.EE -.sp -If the file -.File_name ./fb.modes -does not exist interpret this as a search for the -.I \%man\~page -of -.BR fb.modes . -As the extension -.I \%modes -is not a single character in classical section style the argument is -not split to a search for -.BR fb . -. -.sp -.EX -\fIsh#\fR\~groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff -.EE -.sp -The arguments that are not existing files are looked-up as the -following -.IR \%man\~pages : -.B \%groff -(automatic search, should be found in \fIman\fP\~section\~1), -.B \%troff -(in section\~1), -and -.B \%roff -(in the section with the lowest number, being\~7 in this case). -. -The quotes around -.nh -.I \[cq]troff(1)\[cq] -.hy -are necessary because the parentheses are special shell characters; -escaping them with a backslash character -.I \[rs]( -and -.I \[rs]) -would be possible, too. -. -The formatted files are concatenated and displayed in one piece. -. -.sp -.EX -\fIsh#\fR\~LANG=de\~groffer\~--man\~--www\~--www-viewer=galeon\~ls -.EE -.sp -Retrieve the German -.I \%man\~page -(language -.IR de ) -for the -.B ls -program, decompress it, format it to -.I \%html -format -.nh -.RI ( \%www\~mode ) -.hy -and view the result in the web browser -.BR \%galeon . -The option -.B --man -guarantees that the -.I \%man\~page -is retrieved, even when a local file -.File_name \%ls -exists in the actual directory. -. -. -.sp -.EX -\fIsh#\fR\~groffer\~--source\~'man:roff(7)' -.EE -.sp -Get the -.I \%man\~page -called -.I \%roff -in \fIman\fP\~section 7, decompress it, and print its unformatted -content, its source code. -. -. -.sp -.EX -\fIsh#\fR\~groffer\~--de-p\~--in\~--ap -.EE -.sp -This is a set of abbreviated arguments, it is determined as -.br -.sp -.EX -\fIsh#\fR\~groffer\~--debug-params\~--intermediate-output\~--apropos -.EE -.sp -. -.sp -.EX -\fIsh#\fR\~cat\~file.gz\~|\~groffer\~-Z\~-mfoo -.EE -.sp -. -The file -.File_name file.gz -is sent to standard input, this is decompressed, and then this is -transported to the -.I \%groff intermediate output mode -without post-processing -.RB ( groff -option -.BR -Z ), -using macro package -.I \%foo -.RB ( groff -option -.BR -m ). -. -. -.sp -.EX -\fIsh#\fR\~echo\~'\[rs]f[CB]WOW!'\~| -> groffer --x --bg red --fg yellow --geometry 200x100 - -.EX -.sp -. -Display the word \f[CB]WOW!\fP in a small window in constant-width -bold font, using color yellow on red background. -. -. -.\" -------------------------------------------------------------------- -.SH "COMPATIBILITY" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program is written in Perl, the Perl version during writing was v5.8.8. -. -. -.P -.B \%groffer -provides its own parser for command line arguments that is compatible -to both \%\f[CR]POSIX\fP -.BR \%getopts (1) -and \%\f[CR]GNU\fP -.BR \%getopt (1). -It can handle option arguments and file names containing white space -and a large set of special characters. -. -The following standard types of options are supported. -. -. -.Topic -The option consisting of a single minus -.B - -refers to standard input. -. -. -.Topic -A single minus followed by characters refers to a single character -option or a combination thereof; for example, the -.B \%groffer -short option combination -.B -Qmfoo -is equivalent to -.BR -Q\~\-m\~foo . -. -. -.Topic -Long options are options with names longer than one character; they -are always preceded by a double minus. -. -An option argument can either go to the next command line argument or -be appended with an equal sign to the argument; for example, -.B --long=arg -is equivalent to -.BR --long\~arg . -. -. -.Topic -An argument of -.B -- -ends option parsing; all further command line arguments are -interpreted as -.I \%filespec -parameters, i.e. file names or constructs for searching -.IR \%man\~pages ). -. -. -.Topic -All command line arguments that are neither options nor option -arguments are interpreted as -.I \%filespec -parameters and stored until option parsing has finished. -. -For example, the command line -.sp -.EX -\fIsh#\fR\~groffer file1 -a -o arg file2 -.EE -.sp -is equivalent to -.sp -.EX -\fIsh#\fR\~groffer -a -o arg -- file1 file2 -.EE -.sp -. -.P -The free mixing of options and -.I \%filespec -parameters follows the GNU principle. -. -That does not fulfill the strange option behavior of \%\f[CR]POSIX\fP -that ends option processing as soon as the first non-option argument -has been reached. -. -The end of option processing can be forced by the option -.RB ` \-\- ' -anyway. -. -. -.\" -------------------------------------------------------------------- -.SH "BUGS" -.\" -------------------------------------------------------------------- -. -Report bugs to the -.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 -.B \%groffer -you are using. -. -. -.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" -.\" -------------------------------------------------------------------- -. -.P -.BR \%groff (@MAN1EXT@), -.BR \%@g@troff (@MAN1EXT@) -.RS -Details on the options and environment variables available in -.BR \%groff ; -all of them can be used with -.BR \%groffer . -.RE -. -. -.TP -.BR \%groff (@MAN7EXT@) -Documentation of the -.I \%groff -language. -. -. -.TP -.BR \%grog (@MAN1EXT@) -Internally, -.B \%groffer -tries to guess the -.B \%groff -command line options from the input using this program. -. -. -.TP -.BR groff_out (@MAN5EXT@) -Documentation on the -.I \%groff intermediate output -.nh -.RI ( ditroff -output). -.hy -. -. -.TP -.BR groff_tmac (@MAN5EXT@) -Documentation on the -.I \%groff -macro files. -. -. -.TP -.BR \%man (1) -The standard program to display -.IR \%man\~pages . -. -The information there is only useful if it is the -.I \%man\~page -for GNU -.BR man . -Then it documents the options and environment variables that are -supported by -.BR \%groffer . -. -. -.P -.BR \%gxditview (@MAN1EXT@), -.BR \%xditview (1x) -.RS -Viewers for -.BR \%groffer 's -.IR \%x\~mode . -.RE -. -. -.P -.BR \%kpdf (1), -.BR \%kghostview (1), -.BR \%evince (1), -.BR \%ggv (1), -.BR \%gv (1), -.BR \%ghostview (1), -.BR \%gs (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%ps\~mode . -.RE -. -. -.P -.BR \%kpdf (1), -.BR \%acroread (1), -.BR \%evince (1), -.BR \%xpdf (1), -.BR \%gpdf (1), -.BR \%kghostview (1), -.BR \%ggv (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%pdf\~mode . -.RE -. -. -.P -.BR \%kdvi (1), -.BR \%xdvi (1), -.BR \%dvilx (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%dvi\~mode . -.RE -. -. -.P -.BR \%konqueror (1), -.BR \%epiphany (1), -.BR \%firefox (1), -.BR \%mozilla (1), -.BR \%netscape (1), -.BR \%lynx (1) -.RS -Web-browsers for -.BR \%groffer 's -.I \%html -or -.IR \%www\~mode . -.RE -. -. -.TP -.BR \%less (1) -Standard pager program for the -.IR \%tty\~mode . -. -. -.P -.BR \%gzip (1), -.BR \%bzip2 (1) -.RS -The decompression programs supported by -.BR \%groffer . -.RE -. -. -.\" -------------------------------------------------------------------- -.SH "AUTHOR" -.\" -------------------------------------------------------------------- -.author -. -. -.\" -------------------------------------------------------------------- -.SH "COPYING" -.\" -------------------------------------------------------------------- -.copyleft -. -. -.\" -------------------------------------------------------------------- -.\" Emacs settings -.\" -------------------------------------------------------------------- -. -.\" Local Variables: -.\" mode: nroff -.\" End: diff -ruN groff-1.22.2/contrib/groffer/perl/groffer.pl groff-1.22.3/contrib/groffer/perl/groffer.pl --- groff-1.22.2/contrib/groffer/perl/groffer.pl 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/groffer.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,2204 +0,0 @@ -#! /usr/bin/env perl - -# groffer - display groff files - -# Source file position: /contrib/groffer/perl/groffer.pl -# Installed position: /bin/groffer - -# Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 22 Mar 2011 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - -use strict; -use warnings; -#use diagnostics; - -# temporary dir and files -use File::Temp qw/ tempfile tempdir /; - -# needed for temporary dir -use File::Spec; - -# for `copy' and `move' -use File::Copy; - -# for fileparse, dirname and basename -use File::Basename; - -# current working directory -use Cwd; - -# $Bin is the directory where this script is located -use FindBin; - - -######################################################################## -# system variables and exported variables -######################################################################## - -our $Dev_Null; -our $Umask; -our @Path; -our $Start_Dir; - -our $tmpdir = ''; -our ($fh_cat, $tmp_cat); -our ($fh_stdin, $tmp_stdin); - -our @Addopts_Groff; -our %Debug; -our %Opt; - -our $Has_Compression; -our $Has_bzip; - -our $Output_File_Name; - -our $Apropos_Prog; -our $Filespec_Arg; -our $Filespec_Is_Man; -our $Macro_Pkg; -our $Manspec; -our $No_Filespecs; -our $Special_Filespec; -our $Special_Setup; - -our %Man; - -BEGIN { - $Dev_Null = File::Spec->devnull(); - - $Umask = umask 077; - - $Start_Dir = getcwd; - - # flush after each print or write command - $| = 1; -} - - -######################################################################## -# read-only variables with double-@ construct -######################################################################## - -our $File_split_env_sh; -our $File_version_sh; -our $Groff_Version; - -BEGIN { - { - my $before_make; # script before run of `make' - { - my $at = '@'; - $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; - } - - my %at_at; - my $file_perl_test_pl; - my $groffer_libdir; - - if ($before_make) { - my $groffer_perl_dir = $FindBin::Bin; - my $groffer_top_dir = File::Spec->catdir($groffer_perl_dir, '..'); - $groffer_top_dir = Cwd::realpath($groffer_top_dir); - $at_at{'BINDIR'} = $groffer_perl_dir; - $at_at{'G'} = ''; - $at_at{'LIBDIR'} = ''; - $groffer_libdir = $groffer_perl_dir; - $file_perl_test_pl = File::Spec->catfile($groffer_perl_dir, - 'perl_test.pl'); - $File_version_sh = File::Spec->catfile($groffer_top_dir, 'version.sh'); - $Groff_Version = ''; - } else { - $Groff_Version = '@VERSION@'; - $at_at{'BINDIR'} = '@BINDIR@'; - $at_at{'G'} = '@g@'; - $at_at{'LIBDIR'} = '@libdir@'; - $groffer_libdir = '@groffer_dir@'; - $file_perl_test_pl = File::Spec->catfile($groffer_libdir, - 'perl_test.pl'); - $File_version_sh = File::Spec->catfile($groffer_libdir, 'version.sh'); - } - - die "$groffer_libdir is not an existing directory;" - unless -d $groffer_libdir; - - unshift(@INC, $groffer_libdir); - - $File_split_env_sh = File::Spec->catfile($groffer_libdir, 'split_env.sh'); - die "$File_split_env_sh does not exist;" unless -f "$File_split_env_sh"; - - # test perl on suitable version - die "$file_perl_test_pl does not exist;" unless -f "$file_perl_test_pl"; - do "$file_perl_test_pl" or die "Perl test: $@"; - - require 'func.pl'; - require 'man.pl'; - - @Path = &path_uniq( File::Spec->path() ); - - if ( &where_is_prog('gzip') ) { - $Has_Compression = 1; - $Has_bzip = 1 if &where_is_prog('bzip2'); - } - } -} - - -######################################################################## -# modes, viewers, man sections, and defaults -######################################################################## - -# configuration files -my @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(), - 'etc', 'groff', 'groffer.conf'), - File::Spec->catfile("$ENV{'HOME'}", '.groff', - 'groffer.conf') - ); - -my @Default_Modes = ('pdf', 'html', 'ps', 'x', 'dvi', 'tty'); -my $Default_Resolution = 75; -my $Default_tty_Device = 'latin1'; - -my @Macro_Packages = ('-man', '-mdoc', '-me', '-mm', '-mom', '-ms'); - -my %Viewer_tty = ('DVI' => [], - 'HTML' => ['lynx', 'w3m'], - 'PDF' => [], - 'PS' => [], - 'TTY' => ['less -r -R', 'more', 'pager'], - 'X' => [], - ); - -my %Viewer_X =('DVI' => ['kdvi', 'xdvi', 'dvilx'], - 'HTML' => ['konqueror', 'epiphany'. 'mozilla-firefox', - 'firefox', 'mozilla', 'netscape', 'galeon', 'opera', - 'amaya','arena', 'mosaic'], - 'PDF' => ['okular', 'kpdf', 'acroread', 'evince', 'xpdf -z 150', 'gpdf', - 'kghostview --scale 1.45', 'ggv'], - 'PS' => ['okular', 'kpdf', 'kghostview --scale 1.45', 'evince', 'ggv', - 'gv', 'ghostview', 'gs_x11', 'gs'], - 'TTY' => ['xless'], - 'X' => ['gxditview', 'xditview'], - ); - -%Man = ('ALL' => 0, - 'AUTO_SEC' => ['1', '2', '3', '4', '5', '6', '7', '8', '9', - 'n', 'o'], - 'ENABLE' => 1, - 'EXT' => '', - 'FORCE' => 0, - 'IS_SETUP' => 0, - 'MANSPEC' => {}, - 'LANG' => '', - 'LANG2' => '', - 'PATH' => [], - 'SEC' => [], - 'SEC_CHARS' => '', - 'SYS' => [], - ); -$Man{'AUTO_SEC_CHARS'} = join('', @{$Man{'AUTO_SEC'}}); - - -######################################################################## -# given options, main_set_options() -######################################################################## - -my %Opts_Cmdline_Short; -my %Opts_Cmdline_Long; -my $Opts_Cmdline_Long_Str; -my %Opts_Cmdline_Double; -my %Opts_Groff_Short; - -sub main_set_options { - # the following options are ignored in groffer.pl, but are kept from - # groffer.sh: --shell arg, --debug-shell - - my @opts_ignored_short_na = (); - my @opts_ignored_short_arg = (); - - my @opts_ignored_long_na = ('debug-shell'); - - my @opts_ignored_long_arg = ('shell'); - - - ###### groffer native options - - my @opts_groffer_short_na = ('h', 'Q', 'v', 'V', 'X', 'Z'); - my @opts_groffer_short_arg = ('T'); - - my @opts_groffer_long_na = ('auto', 'apropos', 'apropos-data', - 'apropos-devel', 'apropos-progs', 'debug', 'debug-all', - 'debug-filenames', 'debug-func', 'debug-grog', 'debug-not-func', - 'debug-keep', 'debug-lm', 'debug-params', 'debug-stacks', - 'debug-tmpdir', 'debug-user', 'default', 'do-nothing', 'dvi', - 'groff', 'help', 'intermediate-output', 'html', 'man', - 'no-location', 'no-man', 'no-special', 'pdf', 'ps', 'rv', 'source', - 'text', 'to-stdout', 'text-device', 'tty', 'tty-device', 'version', - 'whatis', 'where', 'www', 'x', 'X'); - -### main_set_options() - my @opts_groffer_long_arg = ('default-modes', 'device', - 'dvi-viewer', 'dvi-viewer-tty', 'extension', 'fg', 'fn', 'font', - 'foreground', 'html-viewer', 'html-viewer-tty', 'mode', - 'pdf-viewer', 'pdf-viewer-tty', 'print', 'ps-viewer', - 'ps-viewer-tty', 'title', 'tty-viewer', 'tty-viewer-tty', - 'www-viewer', 'www-viewer-tty', 'x-viewer', 'x-viewer-tty', - 'X-viewer', 'X-viewer-tty'); - - ##### groffer options inhereted from groff - - my @opts_groff_short_na = ('a', 'b', 'c', 'C', 'e', 'E', 'g', 'G', - 'i', 'k', 'l', 'N', 'p', 'R', 's', 'S', 't', 'U', 'z'); - - my @opts_groff_short_arg = ('d', 'f', 'F', 'I', 'K', 'L', 'm', 'M', 'n', - 'o', 'P', 'r', 'w', 'W'); - - my @opts_groff_long_na = (); - my @opts_groff_long_arg = (); - - ##### groffer options inhereted from the X Window toolkit - - my @opts_x_short_na = (); - my @opts_x_short_arg = (); - - my @opts_x_long_na = ('iconic', 'rv'); - - my @opts_x_long_arg = ('background', 'bd', 'bg', 'bordercolor', - 'borderwidth', 'bw', 'display', 'fg', 'fn', 'font', 'foreground', - 'ft', 'geometry', 'resolution', 'title', 'xrm'); - -### main_set_options() - ###### groffer options inherited from man - - my @opts_man_short_na = (); - my @opts_man_short_arg = (); - - my @opts_man_long_na = ('all', 'ascii', 'catman', 'ditroff', - 'local-file', 'location', 'troff', 'update'); - - my @opts_man_long_arg = ('locale', 'manpath', 'pager', - 'preprocessor', 'prompt', 'sections', 'systems', 'troff-device'); - - ###### additional options for parsing evironment variable $MANOPT only - - my @opts_manopt_short_na = ('7', 'a', 'c', 'd', 'D', 'f', 'h', 'k', - 'l', 't', 'u', 'V', 'w', 'Z'); - - my @opts_manopt_short_arg = ('e', 'L', 'm', 'M', 'p', 'P', 'r', 'S', - 'T'); - - my @opts_manopt_long_na = (@opts_man_long_na, 'apropos', 'debug', - 'default', 'help', 'html', 'ignore-case', 'location-cat', - 'match-case', 'troff', 'update', 'version', 'whatis', 'where', - 'where-cat'); - - my @opts_manopt_long_arg = (@opts_man_long_na, 'config_file', - 'encoding', 'extension', 'locale'); - -### main_set_options() - ###### collections of command line options - - # There are two hashes that control the whole of the command line - # options, one for short and one for long options. Options without - # and with arguments are mixed by advicing a value of 0 for an option - # without argument and a value of 1 for an option with argument. - # The options are with leading minus. - - foreach (@opts_groffer_short_na, @opts_groff_short_na, - @opts_x_short_na, @opts_man_short_na, @opts_ignored_short_na) { - $Opts_Cmdline_Short{"-$_"} = 0 if $_; - } - foreach (@opts_groffer_short_arg, @opts_groff_short_arg, - @opts_x_short_arg, @opts_man_short_arg, @opts_ignored_short_arg) { - $Opts_Cmdline_Short{"-$_"} = 1 if $_; - } - - foreach (@opts_groffer_long_na, @opts_groff_long_na, - @opts_x_long_na, @opts_man_long_na, @opts_ignored_long_na) { - $Opts_Cmdline_Long{"--$_"} = 0 if $_; - } - foreach (@opts_groffer_long_arg, @opts_groff_long_arg, - @opts_x_long_arg, @opts_man_long_arg, @opts_ignored_long_arg) { - $Opts_Cmdline_Long{"--$_"} = 1 if $_; - } - - # For determining abbreviations of an option take two spaces as join - # for better check. - # The options are without leading minus. - $Opts_Cmdline_Long_Str = join ' ', keys %Opts_Cmdline_Long; - if ($Opts_Cmdline_Long_Str) { - $Opts_Cmdline_Long_Str = " $Opts_Cmdline_Long_Str "; - $Opts_Cmdline_Long_Str =~ s/--//g; - } - -### main_set_options() - # options with equal meaning are mapped to a single option name - # all of these have leading minus characters - %Opts_Cmdline_Double = ('-h' => '--help', - '-Q' => '--source', - '-T' => '--device', - '-v' => '--version', - '-Z' => '--intermediate-output', - '--bd' => '--bordercolor', - '--bg' => '--background', - '--bw' => '--borderwidth', - '--debug-all' => '--debug', - '--ditroff' => '--intermediate-output', - '--dvi-viewer-tty' => '--dvi-viewer', - '--fg' => '--foreground', - '--fn' => '--font', - '--ft' => '--font', - '--html-viewer-tty' => '--html-viewer', - '--pdf-viewer-tty' => '--pdf-viewer', - '--ps-viewer-tty' => '--ps-viewer', - '--troff-device' => '--device', - '--tty-device' => '--text-device', - '--tty-viewer' => '--pager', - '--tty-viewer-tty' => '--pager', - '--where' => '--location', - '--www' => '--html', - '--www-viewer' => '--html-viewer', - '--www-viewer-tty' => '--html-viewer', - '--x-viewer-tty' => '--x-viewer', - '--X' => '--x', - '--X-viewer' => '--x-viewer', - '--X-viewer-tty' => '--x-viewer', - ); - - # groff short options with leading minus - foreach (@opts_groff_short_na) { - $Opts_Groff_Short{"-$_"} = 0; - } - foreach (@opts_groff_short_arg) { - $Opts_Groff_Short{"-$_"} = 1; - } - -} # main_set_options() - - -######################################################################## -# $MANOPT, main_parse_MANOPT() -######################################################################## - -# handle environment variable $MANOPT -my @Manopt; - -sub main_parse_MANOPT { - if ($ENV{'MANOPT'}) { - @Manopt = `sh $File_split_env_sh MANOPT`; - chomp @Manopt; - - my @manopt; - # %opts stores options that are used by groffer for $MANOPT - # All options not in %opts are ignored. - # Check options used with %Opts_Cmdline_Double. - # 0: option used ('' for ignore), 1: has argument or not -### main_parse_MANOPT() - my %opts = ('-7' => ['--ascii', 0], - '--ascii' => ['--ascii', 0], - '-a' => ['--all', 0], - '--all' => ['--all', 0], - '-c' => ['', 1], - '--catman' => ['', 1], - '-e' => ['--extension', 1], - '--extension' => ['--extension', 1], - '-f' => ['--whatis', 1], - '--whatis' => ['--whatis', 1], - '-L' => ['--locale', 1], - '--locale' => ['--locale', 1], - '-m' => ['--systems', 1], - '--systems' => ['--systems', 1], - '-M' => ['--manpath', 1], - '-manpath' => ['--manpath', 1], - '--manpath' => ['--manpath', 1], - '-p' => ['', 1], - '--preprocessor' => ['', 1], - '-P' => ['--pager', 1], - '-pager' => ['--pager', 1], - '-r' => ['', 1], - '-prompt' => ['', 1], - '-S' => ['--sections', 1], - '-sections' => ['--sections', 1], - '-T' => ['-T', 1], - '--device' => ['-T', 1], - '-w' => ['--location', 0], - '--where' => ['--location', 0], - '--location' => ['--location', 0], - ); - -### main_parse_MANOPT() - my ($opt, $has_arg); - my $i = 0; - my $n = $#Manopt; - while ($i <= $n) { - my $o = $Manopt[$i]; - ++$i; - # ignore, when not in %opts - next unless (exists $opts{$o}); - if (($o eq '-D') or ($o eq '--default')) { - @manopt = (); - next; - } - $opt = $opts{$o}[0]; - $has_arg = $opts{$o}[1]; - # ignore, when empty in %opts - unless ($opt) { - # ignore without argument - next unless ($has_arg); - # ignore the argument as well - ++$i; - next; - } - if ($has_arg) { - last if ($i > $n); - push @manopt, $opt, $Manopt[$i]; - ++$i; - next; - } else { - push @manopt, $opt; - next; - } - } - @Manopt = @manopt; - } -} # main_parse_MANOPT() - - -######################################################################## -# configuration files, $GROFFER_OPT, and command line, main_config_params() -######################################################################## - -my @Options; -my @Filespecs; -my @Starting_Conf; -my @Starting_ARGV = @ARGV; -sub main_config_params { # handle configuration files - # options may not be abbreviated, but must be exact - my @conf_args; - foreach my $f (@Conf_Files) { - if (-s $f) { - my $fh; - open $fh, "<$f" || next; - my $nr = 0; - LINE: foreach my $line (<$fh>) { - ++ $nr; - chomp $line; - # remove starting and ending whitespace - $line =~ s/^\s+|\s+$//g; - # replace whitespace by single space - $line =~ s/\s+/ /g; - # ignore all lines that do not start with minus - next unless $line =~ /^-/; - # three minus - if ($line =~ /^---/) { - warn "Wrong option $line in configuration file $f.\n"; - next; - } - if ($line =~ /^--[ =]/) { - warn "No option name in `$line' in configuration " . - "file $f.\n"; - next; - } - push @Starting_Conf, $line; - # -- or - - if ($line =~ /^--?$/) { - warn "`$line' is not allowed in configuration files.\n"; - next; - } - ### main_config_params() - if ($line =~ /^--/) { # line is long option - my ($name, $arg); - if ($line =~ /[ =]/) { # has arg on line - $line =~ /^(--[^ =]+)[ =] ?(.*)$/; - ($name, $arg) = ($1, $2); - $arg =~ s/[\'\"]//g; - } else { # does not have an argument on line - $name = $line; - } - $name =~ s/[\'\"]//g; - unless (exists $Opts_Cmdline_Long{$name}) { - # option does not exist - warn "Option `$name' does not exist.\n"; - next LINE; - } - # option exists - if ($Opts_Cmdline_Long{$name}) { # option has arg - if (defined $arg) { - push @conf_args, $name, $arg; - next LINE; - } else { - warn "Option `$name' needs an argument in " . - "configuration file $f\n"; - next LINE; - } - } else { # option has no arg - if (defined $arg) { - warn "Option `$name' may not have an argument " . - "in configuration file $f\n"; - next LINE; - } else { - push @conf_args, $name; - next LINE; - } - } - ### main_config_params() - } else { # line is short option or cluster - $line =~ s/^-//; - while ($line) { - $line =~ s/^(.)//; - my $opt = "-$1"; - next if ($opt =~ /\'\"/); - if ($opt =~ /- /) { - warn "Option `$conf_args[$#conf_args]' does not " . - "have an argument.\n"; - next LINE; - } - if (exists $Opts_Cmdline_Short{$opt}) { - # short opt exists - push @conf_args, $opt; - if ($Opts_Cmdline_Short{$opt}) { # with arg - my $arg = $line; - $arg =~ s/^ //; - $arg =~ s/\'\"//g; - push @conf_args, "$arg"; - next LINE; - } else { # no arg - next; - } - } else { # short option does not exist - warn "Wrong short option `-$opt' from " . - "configuration. Rest of line ignored.\n"; - next LINE; - } - } - } - } - close $fh; - } - } - -### main_config_params() - # handle environment variable $GROFFER_OPT - my @GROFFER_OPT; - if ($ENV{'GROFFER_OPT'}) { - @GROFFER_OPT = `sh $File_split_env_sh GROFFER_OPT`; - chomp @GROFFER_OPT; - } - - # Handle command line parameters together with $GROFFER_OPT. - # Options can be abbreviated, with each - as abbreviation place. - { - my @argv0 = (@GROFFER_OPT, @ARGV); - my @argv; - my $only_files = 0; - my $n = $#argv0; # last element - my $n1 = scalar @GROFFER_OPT; # first element of @ARGV - my $i = 0; # number of the element - my @s = ('the environment variable $GROFFER_OPT', 'the command line'); - my $j = 0; # index in @s, 0 before $n1, 1 then - ELT: while ($i <= $n) { - my $elt = $argv0[$i]; - $j = 1 if $i >= $n1; - ++$i; - # remove starting and ending whitespace - $elt =~ s/^\s+|\s+$//g; - # replace whitespace by single space - $elt =~ s/\s+/ /g; - - if ($only_files) { - push @Filespecs, $elt; - next ELT; - } - -### main_config_params() - if ($elt =~ /^-$/) { # - - push @Filespecs, $elt; - next ELT; - } - if ($elt =~ /^--$/) { # -- - $only_files = 1; - next ELT; - } - - if ($elt =~ /^--[ =]/) { # no option name - warn "No option name in `$elt' at $s[$j].\n"; - next ELT; - } - if ($elt =~ /^---/) { # wrong with three minus - warn "Wrong option `$elt' at $s[$j].\n"; - next ELT; - } - - if ($elt =~ /^--[^-]/) { # long option - my ($name, $opt, $abbrev, $arg); - if ($elt =~ /[ =]/) { # has arg on elt - $elt =~ /^--([^ =]+)[ =] ?(.*)$/; - ($name, $arg) = ($1, $2); - $opt = "--$name"; - $abbrev = $name; - $arg =~ s/[\'\"]//g; - } else { # does not have an argument in the element - $opt = $name = $elt; - $name =~ s/^--//; - $abbrev = $name; - } -### main_config_params() - # remove quotes in name - $name =~ s/[\'\"]//g; - my $match = $name; - $match =~ s/-/[^- ]*-/g; - ### main_config_params() - if (exists $Opts_Cmdline_Long{$opt}) { - # option exists exactly - } elsif ($Opts_Cmdline_Long_Str =~ / (${match}[^- ]*?) /) { - # option is an abbreviation without further - - my $n0 = $1; - if ($Opts_Cmdline_Long_Str =~ - / (${match}[^- ]*) .* (${match}[^- ]*) /) { - warn "Option name `--$abbrev' is not unique: " . - "--$1 --$2 \n"; - next ELT; - } - $name = $n0; - $opt = "--$n0"; - } elsif ($Opts_Cmdline_Long_Str =~ / (${match}[^ ]*) /) { - # option is an abbreviation with further - - my $n0 = $1; - if ($Opts_Cmdline_Long_Str =~ - / (${match}[^ ]*) .* (${match}[^ ]*) /) { - warn "Option name `--$abbrev' is not unique: " . - "--$1 --$2 \n"; - next ELT; - } - $name = $n0; - $opt = "--$n0"; - } else { - warn "Option `--$abbrev' does not exist.\n"; - next ELT; - } -### main_config_params() - if ($Opts_Cmdline_Long{$opt}) { # option has arg - if (defined $arg) { - push @argv, "--$name", $arg; - next ELT; - } else { # $arg not defined, argument at next element - if (($i == $n1) || ($i > $n)) { - warn "No argument left for option " . - "`$elt' at $s[$j].\n"; - next ELT; - } - ### main_config_params() - # add argument as next element - push @argv, "--$name", $argv0[$i]; - ++$i; - next ELT; - } # if (defined $arg) - } else { # option has no arg - if (defined $arg) { - warn "Option `$abbrev' may not have an argument " . - "at $s[$j].\n"; - next ELT; - } else { - push @argv, "--$name"; - next ELT; - } - } # if ($Opts_Cmdline_Long{$opt}) -### main_config_params() - } elsif ($elt =~ /^-[^-]/) { # short option or cluster - my $cluster = $elt; - $cluster =~ s/^-//; - while ($cluster) { - $cluster =~ s/^(.)//; - my $opt = "-$1"; - if (exists $Opts_Cmdline_Short{$opt}) { # opt exists - if ($Opts_Cmdline_Short{$opt}) { # with arg - if ($cluster) { # has argument in this element - $cluster =~ s/^ //; - $cluster =~ s/\'\"//g; - # add argument as rest of this element - push @argv, $opt, $cluster; - next ELT; - } else { # argument at next element - if (($i == $n1) || ($i > $n)) { - warn "No argument left for option " . - "`$opt' at $s[$j].\n"; - next ELT; - } - ### main_config_params() - # add argument as next element - push @argv, $opt, $argv0[$i]; - ++$i; - next ELT; - } - } else { # no arg - push @argv, $opt; - next; - } - } else { # short option does not exist - warn "Wrong short option `$opt' at $s[$j].\n"; - next ELT; - } # if (exists $Opts_Cmdline_Short{$opt}) - } # while ($cluster) - } else { # not an option, file name - push @Filespecs, $elt; - next; - } - } -### main_config_params() - @Options = (@Manopt, @conf_args, @argv); - foreach my $i (0..$#Options) { - if ( exists $Opts_Cmdline_Double{ $Options[$i] } ) { - $Options[$i] = $Opts_Cmdline_Double{ $Options[$i] }; - } - } - @Filespecs = ('-') unless (@Filespecs); - @ARGV = (@Options, '--', @Filespecs); - } -} # main_config_params() - -if (0) { - print STDERR "<$_>\n" foreach @ARGV; -} - - -######################################################################## -# main_parse_params() -######################################################################## - -my $i; -my $n; - -$Opt{'XRM'} = []; - -sub main_parse_params { - $i = 0; - $n = $#Options; - - # options that are ignored in this part - # shell version of groffer: --debug*, --shell - # man options: --catman (only special in man), - # --preprocessor (force groff preproc., handled by grog), - # --prompt (prompt for less, ignored), - # --troff (-mandoc, handled by grog), - # --update (inode check, ignored) - my %ignored_opts = ( - '--catman' => 0, - '--debug-func' => 0, - '--debug-not-func' => 0, - '--debug-lm' => 0, - '--debug-shell' => 0, - '--debug-stacks' => 0, - '--debug-user' => 0, - '--preprocessor' => 1, - '--prompt' => 1, - '--shell' => 1, - '--troff' => 0, - '--update' => 0, - ); - -### main_parse_params() - my %long_opts = - ( - '--debug' => - sub { $Debug{$_} = 1 foreach (qw/FILENAMES GROG KEEP PARAMS TMPDIR/); }, - '--debug-filenames' => sub { $Debug{'FILENAMES'} = 1; }, - '--debug-grog' => sub { $Debug{'GROG'} = 1; }, - '--debug-keep' => sub { $Debug{'KEEP'} = 1; $Debug{'PARAMS'} = 1; }, - '--debug-params' => sub { $Debug{'PARAMS'} = 1; }, - '--debug-tmpdir' => sub { $Debug{'TMPDIR'} = 1; }, - '--help' => sub { &usage(); $Opt{'DO_NOTHING'} = 1; }, - '--source' => sub { $Opt{'MODE'} = 'source'; }, - '--device' => - sub { $Opt{'DEVICE'} = &_get_arg(); - my %modes = ( 'dvi'=> 'dvi', - 'html' => 'html', - 'lbp' => 'groff', - 'lj4' => 'groff', - 'ps' => 'ps', - 'ascii' => 'tty', - 'cp1047' => 'tty', - 'latin1' => 'tty', - 'utf8' => 'tty', - ); - if ($Opt{'DEVICE'} =~ /^X.*/) { - $Opt{'MODE'} = 'x'; - } elsif ( exists $modes{ $Opt{'DEVICE'} } ) { - if ( $modes{ $Opt{'DEVICE'} } eq 'tty' ) { - $Opt{'MODE'} = 'tty' - unless ($Opt{'MODE'} eq 'text'); - } else { - $Opt{'MODE'} = $modes{ $Opt{'DEVICE'} }; - } - } else { - # for all elements not in %modes - $Opt{'MODE'} = 'groff'; - } - }, -### main_parse_params() - '--version' => sub { &version(); $Opt{'DO_NOTHING'} = 1; }, - '--intermediate-output' => sub { $Opt{'Z'} = 1; }, - '--all' => sub { $Opt{'ALL'} = 1; }, - '--apropos' => # run apropos - sub { $Opt{'APROPOS'} = 1; - delete $Opt{'APROPOS_SECTIONS'}; - delete $Opt{'WHATIS'}; }, - '--apropos-data' => # run apropos for data sections - sub { $Opt{'APROPOS'} = 1; - $Opt{'APROPOS_SECTIONS'} = '457'; - delete $Opt{'WHATIS'}; }, - '--apropos-devel' => # run apropos for devel sections - sub { $Opt{'APROPOS'} = 1; - $Opt{'APROPOS_SECTIONS'} = '239'; - delete $Opt{'WHATIS'}; }, - '--apropos-progs' => # run apropos for prog sections - sub { $Opt{'APROPOS'} = 1; - $Opt{'APROPOS_SECTIONS'} = '168'; - delete $Opt{'WHATIS'}; }, - '--ascii' => - sub { push @Addopts_Groff, '-mtty-char'; - $Opt{'MODE'} = 'text' unless $Opt{'MODE'}; }, - '--auto' => # the default automatic mode - sub { delete $Opt{'MODE'}; }, - '--bordercolor' => # border color for viewers, arg - sub { $Opt{'BD'} = &_get_arg(); }, - '--background' => # background color for viewers, arg - sub { $Opt{'BG'} = &_get_arg(); }, -### main_parse_params() - '--borderwidth' => # border width for viewers, arg - sub { $Opt{'BW'} = &_get_arg(); }, - '--default' => # reset variables to default - sub { %Opt = (); }, - '--default-modes' => # sequence of modes in auto mode; arg - sub { $Opt{'DEFAULT_MODES'} = &_get_arg(); }, - '--display' => # set X display, arg - sub { $Opt{'DISPLAY'} = &_get_arg(); }, - '--do-nothing' => sub { $Opt{'DO_NOTHING'} = 1; }, - '--dvi' => sub { $Opt{'MODE'} = 'dvi'; }, - '--dvi-viewer' => # viewer program for dvi mode; arg - sub { $Opt{'VIEWER_DVI'} = &_get_arg(); }, - '--extension' => # the extension for man pages, arg - sub { $Opt{'EXTENSION'} = &_get_arg(); }, - '--foreground' => # foreground color for viewers, arg - sub { $Opt{'FG'} = &_get_arg(); }, - '--font' => # set font for viewers, arg - sub { $Opt{'FN'} = &_get_arg(); }, - '--geometry' => # window geometry for viewers, arg - sub { $Opt{'GEOMETRY'} = &_get_arg(); }, - '--groff' => sub { $Opt{'MODE'} = 'groff'; }, - '--html' => sub { $Opt{'MODE'} = 'html'; }, - '--html-viewer' => # viewer program for html mode; arg - sub { $Opt{'VIEWER_HTML'} = &_get_arg(); }, - '--iconic' => # start viewers as icons - sub { $Opt{'ICONIC'} = 1; }, - '--locale' => # set language for man pages, arg - # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) - sub { $Opt{'LANG'} = &_get_arg(); }, - '--local-file' => # force local files; same as `--no-man' - sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; }, - '--location' => # print file locations to stderr - sub { $Opt{'LOCATION'} = 1; }, -### main_parse_params() - '--man' => # force all file params to be man pages - sub { $Man{'ENABLE'} = 1; $Man{'FORCE'} = 1; }, - '--manpath' => # specify search path for man pages, arg - # arg is colon-separated list of directories - sub { $Opt{'MANPATH'} = &_get_arg(); }, - '--mode' => # display mode - sub { my $arg = &_get_arg(); - my %modes = ( '' => '', - 'auto' => '', - 'groff' => 'groff', - 'html' => 'html', - 'www' => 'html', - 'dvi' => 'dvi', - 'pdf' => 'pdf', - 'ps' => 'ps', - 'text' => 'text', - 'tty' => 'tty', - 'X' => 'x', - 'x' => 'x', - 'Q' => 'source', - 'source' => 'source', - ); - if ( exists $modes{$arg} ) { - if ( $modes{$arg} ) { - $Opt{'MODE'} = $modes{$arg}; - } else { - delete $Opt{'MODE'}; - } - } else { - warn "Unknown mode in `$arg' for --mode\n"; - } - }, -### main_parse_params() - '--no-location' => # disable former call to `--location' - sub { delete $Opt{'LOCATION'}; }, - '--no-man' => # disable search for man pages - sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; }, - '--no-special' => # disable some special former calls - sub { delete $Opt{'ALL'}; delete $Opt{'APROPOS'}; - delete $Opt{'WHATIS'}; }, - '--pager' => # set paging program for tty mode, arg - sub { $Opt{'PAGER'} = &_get_arg(); }, - '--pdf' => sub { $Opt{'MODE'} = 'pdf'; }, - '--pdf-viewer' => # viewer program for pdf mode; arg - sub { $Opt{'VIEWER_PDF'} = &_get_arg(); }, - '--print' => # print argument, for argument test - sub { my $arg = &_get_arg; print STDERR "$arg\n"; }, - '--ps' => sub { $Opt{'MODE'} = 'ps'; }, - '--ps-viewer' => # viewer program for ps mode; arg - sub { $Opt{'VIEWER_PS'} = &_get_arg(); }, - '--resolution' => # set resolution for X devices, arg - sub { my $arg = &_get_arg(); - my %res = ( '75' => 75, - '75dpi' => 75, - '100' => 100, - '100dpi' => 100, - ); - if (exists $res{$arg}) { - $Opt{'RESOLUTION'} = $res{$arg}; - } else { - warn "--resolution allows only 75, 75dpi, " . - "100, 100dpi as argument.\n"; - } - }, -### main_parse_params() - '--rv' => sub { $Opt{'RV'} = 1; }, - '--sections' => # specify sections for man pages, arg - # arg is a `:'-separated (colon) list of section names - sub { my $arg = &_get_arg(); - my @arg = split /:/, $arg; - my $s; - foreach (@arg) { - /^(.)/; - my $c = $1; - if ($Man{'AUTO_SEC_CHARS'} =~ /$c/) { - $s .= $c; - } else { - warn "main_parse_params(): not a man section `$c';"; - } - } - $Opt{'SECTIONS'} = $s; }, - '--systems' => # man pages for different OS's, arg - # argument is a comma-separated list - sub { $Opt{'SYSTEMS'} = &_get_arg(); }, - '--text' => # text mode without pager - sub { $Opt{'MODE'} = 'text'; }, - '--title' => # title for X viewers; arg - sub { my $arg = &_get_arg(); - if ($arg) { - if ( $Opt{'TITLE'} ) { - $Opt{'TITLE'} = "$Opt{'TITLE'} $arg"; - } else { - $Opt{'TITLE'} = $arg; - } - } - }, - '--tty' => # tty mode, text with pager - sub { $Opt{'MODE'} = 'tty'; }, - '--to-stdout' => # print mode file without display - sub { $Opt{'STDOUT'} = 1; }, - '--text-device' => # device for tty mode; arg - sub { $Opt{'TEXT_DEVICE'} = &_get_arg(); }, - '--whatis' => sub { delete $Opt{'APROPOS'}; $Opt{'WHATIS'} = 1; }, - '--x' => sub { $Opt{'MODE'} = 'x'; }, -### main_parse_params() - '--xrm' => # pass X resource string, arg - sub { my $arg = &_get_arg(); push @{$Opt{'XRM'}}, $arg if $arg; }, - '--x-viewer' => # viewer program for x mode; arg - sub { $Opt{'VIEWER_X'} = &_get_arg(); }, - ); - - my %short_opts = ( - '-V' => sub { $Opt{'V'} = 1; }, - '-X' => sub { $Opt{'X'} = 1; }, - ); - - if (0) { - # check if all options are handled in parse parameters - - #short options - my %these_opts = (%ignored_opts, %short_opts, %Opts_Groff_Short, - %Opts_Cmdline_Double); - foreach my $key (keys %Opts_Cmdline_Short) { - warn "unused option: $key" unless exists $these_opts{$key}; - } - - # long options - %these_opts = (%ignored_opts, %long_opts, %Opts_Cmdline_Double); - foreach my $key (keys %Opts_Cmdline_Long) { - warn "unused option: $key" unless exists $these_opts{$key}; - } - } # if (0) - -### main_parse_params() - OPTION: while ($i <= $n) { - my $opt = $Options[$i]; - ++$i; - if ($opt =~ /^-([^-])$/) { # single minus for short option - if (exists $short_opts{$opt}) { # short option handled by hash - $short_opts{$opt}->(); - next OPTION; - } else { # $short_opts{$opt} does not exist - my $c = $1; # the option character - next OPTION unless $c; - if ( exists $Opts_Groff_Short{ $opt } ) { # groff short option - if ( $Opts_Groff_Short{ $opt } ) { # option has argument - my $arg = $Options[$i]; - ++$i; - push @Addopts_Groff, $opt, $arg; - next OPTION; - } else { # no argument for this option - push @Addopts_Groff, $opt; - next OPTION; - } - } elsif ( exists $Opts_Cmdline_Short{ $opt } ) { - # is a groffer short option - warn "Groffer option $opt not handled " . - "in parameter parsing"; - } else { - warn "$opt is not a groffer option.\n"; - } - } # if (exists $short_opts{$opt}) - } # if ($opt =~ /^-([^-])$/) - # Now it is a long option - - # handle ignored options - if ( exists $ignored_opts{ $opt } ) { - ++$i if ( $ignored_opts{ $opt } ); - next OPTION; - } -### main_parse_params() - - # handle normal long options - if (exists $long_opts{$opt}) { - $long_opts{$opt}->(); - } else { - warn "Unknown option $opt.\n"; - } - next OPTION; - } # while ($i <= $n) - - if ($Debug{'PARAMS'}) { - print STDERR '$MANOPT: ' . "$ENV{'MANOPT'}\n" if $ENV{'MANOPT'}; - foreach (@Starting_Conf) { - print STDERR "configuration: $_\n"; - } - print STDERR '$GROFFER_OPT: ' . "$ENV{'GROFFER_OPT'}\n" - if $ENV{'GROFFER_OPT'}; - print STDERR "command line: @Starting_ARGV\n"; - print STDERR "parameters: @ARGV\n"; - } - - if ( $Opt{'WHATIS'} ) { - die "main_parse_params(): cannot handle both `whatis' and `apropos';" - if $Opt{'APROPOS'}; - $Man{'ALL'} = 1; - delete $Opt{'APROPOS_SECTIONS'}; - } - - if ( $Opt{'DO_NOTHING'} ) { - exit; - } - - if ( $Opt{'DEFAULT_MODES'} ) { - @Default_Modes = split /,/, $Opt{'DEFAULT_MODES'}; - } -} # main_parse_params() - - -sub _get_arg { - if ($i > $n) { - die '_get_arg(): No argument left for last option;'; - } - my $arg = $Options[$i]; - ++$i; - $arg; -} # _get_arg() of main_parse_params() - - -######################################################################## -# main_set_mode() -######################################################################## - -my $Viewer_Background; -my $PDF_Did_Not_Work; -my $PDF_Has_gs; -my $PDF_Has_ps2pdf; -my %Display = ('MODE' => '', - 'PROG' => '', - 'ARGS' => '' - ); - -sub main_set_mode { - my @modes; - - # set display - $ENV{'DISPLAY'} = $Opt{'DISPLAY'} if $Opt{'DISPLAY'}; - - push @Addopts_Groff, '-V' if $Opt{'V'}; - - if ( $Opt{'X'} ) { - $Display{'MODE'} = 'groff'; - push @Addopts_Groff, '-X'; - } - - if ( $Opt{'Z'} ) { - $Display{'MODE'} = 'groff'; - push @Addopts_Groff, '-Z'; - } - - $Display{'MODE'} = 'groff' if $Opt{'MODE'} and $Opt{'MODE'} eq 'groff'; - - return 1 if $Display{'MODE'} and $Display{'MODE'} eq 'groff'; - -### main_set_mode() - if ($Opt{'MODE'}) { - if ($Opt{'MODE'} =~ /^(source|text|tty)$/) { - $Display{'MODE'} = $Opt{'MODE'}; - return 1; - } - $Display{'MODE'} = $Opt{'MODE'} if $Opt{'MODE'} =~ /^html$/; - @modes = ($Opt{'MODE'}); - } else { # empty mode - if ($Opt{'DEVICE'}) { - if ($Opt{'DEVICE'} =~ /^X/) { - &is_X() || die "no X display found for device $Opt{'DEVICE'}"; - $Display{'MODE'} = 'x'; - return 1; - } - ; - if ($Opt{'DEVICE'} =~ /^(ascii|cp1047|latin1|utf8)$/) { - $Display{'MODE'} ne 'text' and $Display{'MODE'} = 'tty'; - return 1; - } - ; - unless (&is_X) { - $Display{'MODE'} = 'tty'; - return 1; - } - } # check device - @modes = @Default_Modes; - } # check mode - -### main_set_mode() - LOOP: foreach my $m (@modes) { - $Viewer_Background = 0; - if ($m =~ /^(test|tty|X)$/) { - $Display{'MODE'} = $m; - return 1; - } elsif ($m eq 'pdf') { - next LOOP if $PDF_Did_Not_Work; - $PDF_Has_gs = &where_is_prog('gs') ? 1 : 0 - unless (defined $PDF_Has_gs); - $PDF_Has_ps2pdf = &where_is_prog('ps2pdf') ? 1 : 0 - unless (defined $PDF_Has_ps2pdf); - if ( (! $PDF_Has_gs) and (! $PDF_Has_ps2pdf) ) { - $PDF_Did_Not_Work = 1; - next LOOP; - } - - if (&_get_prog_args($m)) { - return 1; - } else { - $PDF_Did_Not_Work = 1; - next LOOP; - } - } else { # other modes - &_get_prog_args($m) ? return 1 : next LOOP; - } # if $m - } # LOOP: foreach - die 'set mode: no suitable display mode found under ' . - join(', ', @modes) . ';' unless $Display{'MODE'}; - die 'set mode: no viewer available for mode ' . $Display{'MODE'} . ';' - unless $Display{'PROG'}; - 0; -} # main_set_mode() - - -######################################################################## -# functions to main_set_mode() -######################################################################## - -########## -# _get_prog_args() -# -# Simplification for loop in set mode. -# -# Globals in/out: $Viewer_Background -# Globals in : $Opt{VIEWER_}, $Viewer_X{}, -# $Viewer_tty{} -# -sub _get_prog_args { - my $n = @_; - die "_get_prog_args(): one argument is needed; you used $n;" - unless $n == 1; - - my $mode = lc($_[0]); - my $MODE = uc($mode); - - my $xlist = $Viewer_X{$MODE}; - my $ttylist = $Viewer_tty{$MODE}; - - my $vm = "VIEWER_${MODE}"; - my $opt = $Opt{$vm}; - - if ($opt) { - my %prog = where_is_prog $opt; - my $prog_ref = \%prog; - unless (%prog) { - warn "_get_prog_args(): `$opt' is not an existing program;"; - return 0; - } - - # $prog from $opt is an existing program - -### _get_prog_args() of main_set_mode() - if (&is_X) { - if ( &_check_prog_on_list($prog_ref, $xlist) ) { - $Viewer_Background = 1; - } else { - $Viewer_Background = 0; - &_check_prog_on_list($prog_ref, $ttylist); - } - } else { # is not X - $Viewer_Background = 0; - &_check_prog_on_list($prog_ref, $ttylist); - } # if is X - } else { # $opt is empty - $Viewer_Background = 0; - my $x; - if (&is_X) { - $x = &_get_first_prog($xlist); - $Viewer_Background = 1 if $x; - } else { # is not X - $x = &_get_first_prog($ttylist); - } # test on X - $Display{'MODE'} = $mode if $x; - return $x; - } - $Display{'MODE'} = $mode; - return 1; -} # _get_prog_args() of main_set_mode() - - -########## -# _get_first_prog() -# -# Retrieve from the elements of the list in the argument the first -# existing program in $PATH. -# -# Local function of main_set_mode(). -# -# Return : `0' if not a part of the list, `1' if found in the list. -# -sub _get_first_prog { - my $n = @_; - die "_get_first_prog(): one argument is needed; you used $n;" - unless $n == 1; - - foreach my $i (@{$_[0]}) { - next unless $i; - my %prog = &where_is_prog($i); - if (%prog) { - $Display{'PROG'} = $prog{'fullname'}; - $Display{'ARGS'} = $prog{'args'}; - return 1; - } - } - return 0; -} # _get_first_prog() of main_set_mode() - - -########## -# _check_prog_on_list ( ) -# -# Check whether the content of is in the list -# . -# The globals are set correspondingly. -# -# Local function for main_set_mode(). -# -# Arguments: 2 -# -# Return : `0' if not a part of the list, `1' if found in the list. -# Output : none -# -# Globals in : $Viewer_X{}, $Viewer_tty{} -# Globals in/out: $Display{'PROG'}, $Display{'ARGS'} -# -sub _check_prog_on_list { - my $n = @_; - die "_get_first_prog(): 2 arguments are needed; you used $n;" - unless $n == 2; - - my %prog = %{$_[0]}; - - $Display{'PROG'} = $prog{'fullname'}; - $Display{'ARGS'} = $prog{'args'}; - - foreach my $i (@{$_[1]}) { - my %p = &where_is_prog($i); - next unless %p; - next unless $Display{'PROG'} eq $p{'fullname'}; - if ($p{'args'}) { - if ($Display{'ARGS'}) { - $Display{'ARGS'} = $p{'args'}; - } else { - $Display{'ARGS'} = "$p{'args'} $Display{'ARGS'}"; - } - } # if args - return 1; - } # foreach $i - # prog was not in the list - return 0; -} # _check_prog_on_list() of main_set_mode() - - -######################################################################## -# groffer temporary directory, main_temp() -######################################################################## - -sub main_temp { - my $template = 'groffer_' . "$$" . '_XXXX'; - foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'}, - $ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) { - if ($_ && -d $_ && -w $_) { - if ($Debug{'KEEP'}) { - eval { $tmpdir = tempdir( $template, DIR => "$_" ); }; - } else { - eval { $tmpdir = tempdir( $template, - CLEANUP => 1, DIR => "$_" ); }; - } - last if $tmpdir; - } - } - $tmpdir = tempdir( $template, CLEANUP => 1, DIR => File::Spec->tmpdir ) - unless ($tmpdir); - - # see Lerning Perl, page 205, or Programming Perl, page 413 - # $SIG{'INT'} is for Ctrl-C interruption - $SIG{'INT'} = sub { &clean_up(); die "interrupted..."; }; - $SIG{'QUIT'} = sub { &clean_up(); die "quit..."; }; - - if ($Debug{'TMPDIR'}) { - if ( $Debug{'KEEP'}) { - print STDERR "temporary directory is kept: $tmpdir\n"; - } else { - print STDERR "temporary directory will be cleaned: $tmpdir\n"; - } - } - - # further argument: SUFFIX => '.sh' - if ($Debug{'KEEP'}) { - ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', DIR => $tmpdir); - ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', DIR => $tmpdir); - } else { - ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', UNLINK => 1, - DIR => $tmpdir); - ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', UNLINK => 1, - DIR => $tmpdir); - } -} # main_temp() - - -######################################################################## -# tmp functions and compression -######################################################################## - -######################################################################## -# further functions needed for main_do_fileargs() -######################################################################## - -my @REG_TITLE = (); - -########## -# register_file() -# -# Write a found file and register the title element. -# -# Arguments: 1: a file name -# Output: none -# -sub register_file { - my $n = @_; - die "register_file(): one argument is needed; you used $n;" - unless $n == 1; - die 'register_file(): file name is empty;' unless $_[0]; - - if ($_[0] eq '-') { - &to_tmp($tmp_stdin) && ®ister_title('stdin'); - } else { - &to_tmp($_[0]) && ®ister_title($_[0]); - } - 1; -} # register_file() - - -########## -# register_title() -# -# Create title element from and append to $_REG_TITLE_LIST. -# Basename is created. -# -# Globals in/out: @REG_TITLE -# -# Variable prefix: rt -# -sub register_title { - my $n = @_; - die "register_title(): one argument is needed; you used $n;" - unless $n == 1; - return 1 unless $_[0]; - - return 1 if scalar @REG_TITLE > 3; - - my $title = &get_filename($_[0]); - $title =~ s/\s/_/g; - $title =~ s/\.bz2$//g; - $title =~ s/\.gz$//g; - $title =~ s/\.Z$//g; - - if ($Debug{'FILENAMES'}) { - if ($_[0] eq 'stdin') { - print STDERR "register_title(): file title is stdin\n"; - } else { - print STDERR "register_title(): file title is $title\n"; - } - } # if ($Debug{'FILENAMES'}) - - return 1 unless $title; - push @REG_TITLE, $title; - 1; -} # register_title() - - -########## -# save_stdin() -# -# Store standard input to temporary file (with decompression). -# -sub save_stdin { - my ($fh_input, $tmp_input); - $tmp_input = File::Spec->catfile($tmpdir, ',input'); - open $fh_input, ">$tmp_input" or - die "save_stdin(): could not open $tmp_input"; - foreach () { - print $fh_input $_; - } - close $fh_input; - open $fh_stdin, ">$tmp_stdin" or - die "save_stdin(): could not open $tmp_stdin"; - foreach ( &cat_z("$tmp_input") ) { - print $fh_stdin "$_"; - } - close $fh_stdin; - unlink $tmp_input unless $Debug{'KEEP'}; -} # save_stdin() - - -######################################################################## -# main_do_fileargs() -######################################################################## - -sub main_do_fileargs { - &special_setup(); - if ($Opt{'APROPOS'}) { - if ($No_Filespecs) { - &apropos_filespec(); - return 1; - } - } else { - foreach (@Filespecs) { - if (/^-$/) { - &save_stdin(); - last; - } - } # foreach (@Filespecs) - } # if ($Opt{'APROPOS'}) - - my $section = ''; - my $ext = ''; - my $twoargs = 0; - my $filespec; - my $former_arg; - - FILESPEC: foreach (@Filespecs) { - $filespec = $_; - $Filespec_Arg = $_; - $Filespec_Is_Man = 0; - $Manspec = ''; - $Special_Filespec = 0; - - next FILESPEC unless $filespec; - -### main_do_fileargs() - if ($twoargs) { # second run - $twoargs = 0; - # $section and $ext are kept from earlier run - my $h = { 'name' => $filespec, 'sec' => $section, 'ext' => $ext }; - &man_setup(); - if ( &is_man($h) ) { - $Filespec_Arg = "$former_arg $Filespec_Arg"; - &special_filespec(); - $Filespec_Is_Man = 1; - &man_get($h); - next FILESPEC; - } else { - warn "main_do_fileargs(): $former_arg is neither a file nor a " . - "man page nor a section argument for $filespec;"; - } - } - $twoargs = 0; - - if ( $Opt{'APROPOS'} ) { - &apropos_filespec(); - next FILESPEC; - } - - if ($filespec eq '-') { - ®ister_file('-'); - &special_filespec(); - next FILESPEC; - } elsif ( &get_filename($filespec) ne $filespec ) { # path with dir - &special_filespec(); - if (-f $filespec && -r $filespec) { - ®ister_file($filespec) - } else { - warn "main_do_fileargs: the argument $filespec is not a file;"; - } - next FILESPEC; - } else { # neither `-' nor has dir - # check whether filespec is an existing file - unless ( $Man{'FORCE'} ) { - if (-f $filespec && -r $filespec) { - &special_filespec(); - ®ister_file($filespec); - next FILESPEC; - } - } - } # if ($filespec eq '-') - -### main_do_fileargs() - # now it must be a man page pattern - - if ($Macro_Pkg and $Macro_Pkg ne '-man') { - warn "main_do_fileargs(): $filespec is not a file, " . - "man pages are ignored due to $Macro_Pkg;"; - next FILESPEC; - } - - # check for man page - &man_setup(); - unless ( $Man{'ENABLE'} ) { - warn "main_do_fileargs(): the argument $filespec is not a file;"; - next FILESPEC; - } - my $errmsg; - if ( $Man{'FORCE'} ) { - $errmsg = 'is not a man page'; - } else { - $errmsg = 'is neither a file nor a man page'; - } - - $Filespec_Is_Man = 1; - -### main_do_fileargs() - # test filespec with `man:...' or `...(...)' on man page - - my @names = ($filespec); - if ($filespec =~ /^man:(.*)$/) { - push @names, $1; - } - - foreach my $i (@names) { - next unless $i; - my $h = { 'name' => $i }; - if ( &is_man($h) ) { - &special_filespec(); - &man_get($h); - next FILESPEC; - } - if ( $i =~ /^(.*)\(([$Man{'AUTO_SEC_CHARS'}])(.*)\)$/ ) { - $h = { 'name' => $1, 'sec' => $2, 'ext' => $3 }; - if ( &is_man($h) ) { - &special_filespec(); - &man_get($h); - next FILESPEC; - } - } # if // - if ( $i =~ /^(.*)\.([$Man{'AUTO_SEC_CHARS'}])(.*)$/ ) { - $h = { 'name' => $1, 'sec' => $2, 'ext' => $3 }; - if ( &is_man($h) ) { - &special_filespec(); - &man_get($h); - next FILESPEC; - } - } # if // - } # foreach (@names) - -### main_do_fileargs() - # check on "s name", where "s" is a section with or without an extension - if ($filespec =~ /^([$Man{'AUTO_SEC_CHARS'}])(.*)$/) { - unless ( $Man{'ENABLE'} ) { - warn "main_do_fileargs(): $filespec $errmsg;"; - next FILESPEC; - } - $twoargs = 1; - $section = $1; - $ext = $2; - $former_arg = $filespec; - next FILESPEC; - } else { - warn "main_do_fileargs(): $filespec $errmsg;"; - next FILESPEC; - } - } # foreach (@Filespecs) - - if ($twoargs) { - warn "main_do_fileargs(): no filespec arguments left for second run;"; - return 0; - } - 1; -} # main_do_fileargs() - - -######################################################################## -# main_set_resources() -######################################################################## - -########## -# main_set_resources () -# -# Determine options for setting X resources with $_DISPLAY_PROG. -# -# Globals: $Display{PROG}, $Output_File_Name -# -sub main_set_resources { - # $prog viewer program - # $rl resource list - unlink $tmp_stdin unless $Debug{'KEEP'}; - $Output_File_Name = ''; - - my @title = @REG_TITLE; - @title = ($Opt{'TITLE'}) unless @title; - @title = () unless @title; - - foreach my $n (@title) { - next unless $n; - $n =~ s/^,+// if $n =~ /^,/; - next unless $n; - $Output_File_Name = $Output_File_Name . ',' if $Output_File_Name; - $Output_File_Name = "$Output_File_Name$n"; - } # foreach (@title) - - $Output_File_Name =~ s/^,+//; - $Output_File_Name = '-' unless $Output_File_Name; - $Output_File_Name = File::Spec->catfile($tmpdir, $Output_File_Name); - -### main_set_resources() - unless ($Display{'PROG'}) { # for example, for groff mode - $Display{'ARGS'} = ''; - return 1; - } - - my %h = &where_is_prog($Display{'PROG'}); - my $prog = $h{'file'}; - if ($Display{'ARGS'}) { - $Display{'ARGS'} = "$h{'args'} $Display{'ARGS'}"; - } else { - $Display{'ARGS'} = $h{'args'}; - } - - my @rl = (); - - if ($Opt{'BD'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-bd', $Opt{'BD'}; - } - } - - if ($Opt{'BG'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-bg', $Opt{'BG'}; - } elsif ($prog eq 'kghostview') { - push @rl, '--bg', $Opt{'BG'}; - } elsif ($prog eq 'xpdf') { - push @rl, '-papercolor', $Opt{'BG'}; - } - } - -### main_set_resources() - if ($Opt{'BW'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-bw', $Opt{'BW'}; - } - } - - if ($Opt{'FG'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-fg', $Opt{'FG'}; - } elsif ($prog eq 'kghostview') { - push @rl, '--fg', $Opt{'FG'}; - } - } - - if ($Opt{'FN'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-fn', $Opt{'FN'}; - } elsif ($prog eq 'kghostview') { - push @rl, '--fn', $Opt{'FN'}; - } - } - - if ($Opt{'GEOMETRY'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-geometry', $Opt{'GEOMETRY'}; - } elsif ($prog eq 'kghostview') { - push @rl, '--geometry', $Opt{'GEOMETRY'}; - } - } - -### main_set_resources() - if ($Opt{'RESOLUTION'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-resolution', $Opt{'RESOLUTION'}; - } elsif ($prog eq 'xpdf') { - if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z - if ($Default_Resolution == 75) { - push @rl, '-z', 104; - } elsif ($Default_Resolution == 100) { # 72dpi is '100' - push @rl, '-z', 139; - } - } - } # if $prog - } else { # empty $Opt{RESOLUTION} - $Opt{'RESOLUTION'} = $Default_Resolution; - if ($prog =~ /^(gxditview|xditview)$/) { - push @rl, '-resolution', $Default_Resolution; - } elsif ($prog eq 'xpdf') { - if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z - if ($Default_Resolution == 75) { - push @rl, '-z', 104; - } elsif ($Default_Resolution == 100) { # 72dpi is '100' - push @rl, '-z', 139; - } - } - } # if $prog - } # if $Opt{RESOLUTION} - - if ($Opt{'ICONIC'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-iconic'; - } - } - -### main_set_resources() - if ($Opt{'RV'}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) { - push @rl, '-rv'; - } - } - - if (@{$Opt{'XRM'}}) { - if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi|xpdf)$/) { - foreach (@{$Opt{'XRM'}}) { - push @rl, '-xrm', $_; - } - } - } - - if (@title) { - if ($prog =~ /^(gxditview|xditview)$/) { - push @rl, '-title', $Output_File_Name; - } - } - - my $args = join ' ', @rl; - if ($Display{'ARGS'}) { - $Display{'ARGS'} = "$args $Display{'ARGS'}"; - } else { - $Display{'ARGS'} = $args; - } - - 1; -} # main_set_resources() - - -######################################################################## -# set resources -######################################################################## - -my $groggy; -my $modefile; -my $addopts; - -########## -# main_display () -# -# Do the actual display of the whole thing. -# -# Globals: -# in: $Display{MODE}, $Opt{DEVICE}, @Addopts_Groff, -# $fh_cat, $tmp_cat, $Opt{PAGER}, $Output_File_Name -# -sub main_display { - $addopts = join ' ', @Addopts_Groff; - - if (-z $tmp_cat) { - warn "groffer: empty input\n"; - &clean_up(); - return 1; - } - - $modefile = $Output_File_Name; - - # go to the temporary directory to be able to access internal data files - chdir $tmpdir; - -### main_display() - SWITCH: foreach ($Display{'MODE'}) { - /^groff$/ and do { - push @Addopts_Groff, "-T$Opt{'DEVICE'}" if $Opt{'DEVICE'}; - $addopts = join ' ', @Addopts_Groff; - $groggy = `cat $tmp_cat | grog`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_opt_V(); - unlink $modefile; - rename $tmp_cat, $modefile; - system("cat $modefile | $groggy $addopts"); - &clean_up(); - next SWITCH; - }; # /groff/ - - /^(text|tty)$/ and do { - my $device; - if (! $Opt{'DEVICE'}) { - $device = $Opt{'TEXT_DEVICE'}; - $device = $Default_tty_Device unless $device; - } elsif ($Opt{'DEVICE'} =~ /^(ascii||cp1047|latin1|utf8)$/) { - $device = $Opt{'DEVICE'}; - } else { - warn "main_display(): wrong device for $Display{'MODE'} mode: " . - "$Opt{'DEVICE'}"; - } - $groggy = `cat $tmp_cat | grog -T$device`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - if ($Display{'MODE'} eq 'text') { - &_do_opt_V(); - system("cat $tmp_cat | $groggy $addopts"); - &clean_up(); - next SWITCH; - } - -### main_display() - # mode is not 'text', but `tty' - my %pager; - my @p; - push @p, $Opt{'PAGER'} if $Opt{'PAGER'}; - push @p, $ENV{'PAGER'} if $ENV{'PAGER'}; - foreach (@p) { - %pager = &where_is_prog($_); - next unless %pager; - if ($pager{'file'} eq 'less') { - if ($pager{'args'}) { - $pager{'args'} = "-r -R $pager{'args'}"; - } else { - $pager{'args'} = '-r -R'; - } - } - last if $pager{'file'}; - } # foreach @p - unless (%pager) { - foreach (@{$Viewer_tty{'TTY'}}, @{$Viewer_X{'TTY'}}, 'cat') { - next unless $_; - %pager = &where_is_prog($_); - last if %pager; - } - } - die "main_display(): no pager program found for tty mode;" - unless %pager; - &_do_opt_V(); - system("cat $tmp_cat | $groggy $addopts | " . - "$pager{'fullname'} $pager{'args'}"); - &clean_up(); - next SWITCH; - }; # /text|tty/ - - /^source$/ and do { - open $fh_cat, "<$tmp_cat"; - foreach (<$fh_cat>) { - print "$_"; - } - &clean_up(); - next SWITCH; - }; - -### main_display() - /^dvi$/ and do { - if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'dvi') { - warn "main_display(): " . - "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" - } - $modefile .= '.dvi'; - $groggy = `cat $tmp_cat | grog -Tdvi`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_display(); - next SWITCH; - }; - - /^html$/ and do { - if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'html') { - warn "main_display(): " . - "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" - } - $modefile .= '.html'; - $groggy = `cat $tmp_cat | grog -Thtml`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_display(); - next SWITCH; - }; - - /^pdf$/ and do { - if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') { - warn "main_display(): " . - "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" - } - $modefile .= '.ps'; - $groggy = `cat $tmp_cat | grog -Tps`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_display(\&_make_pdf); - next SWITCH; - }; - -### main_display() - /^ps$/ and do { - if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') { - warn "main_display(): " . - "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};" - } - $modefile .= '.ps'; - $groggy = `cat $tmp_cat | grog -Tps`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_display(); - next SWITCH; - }; - - /^x$/ and do { - my $device; - if ($Opt{'DEVICE'} && $Opt{'DEVICE'} =~ /^X/) { - $device = $Opt{'DEVICE'}; - } else { - if ($Opt{'RESOLUTION'} == 100) { - if ( $Display{'PROG'} =~ /^(g|)xditview$/ ) { - # add width of 800dpi for resolution of 100dpi to the args - $Display{'ARGS'} .= ' -geometry 800'; - $Display{'ARGS'} =~ s/^ //; - } - } else { # RESOLUTIOM != 100 - $device = 'X75-12'; - } # if RESOLUTIOM - } # if DEVICE - $groggy = `cat $tmp_cat | grog -T$device -Z`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - &_do_display(); - next SWITCH; - }; - -### main_display() - /^X$/ and do { - if (! $Opt{'DEVICE'}) { - $groggy = `cat $tmp_cat | grog -X`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - } elsif ($Opt{'DEVICE'} =~ /^(X.*|dvi|html|lbp|lj4|ps)$/) { - # these devices work with - $groggy = `cat $tmp_cat | grog -T$Opt{'DEVICE'} -X`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - } else { - warn "main_display(): wrong device for " . - "$Display{'MODE'} mode: $Opt{'DEVICE'};"; - $groggy = `cat $tmp_cat | grog -Z`; - die "main_display(): grog error;" if $?; - chomp $groggy; - print STDERR "grog output: $groggy\n" if $Debug{'GROG'}; - } # if DEVICE - &_do_display(); - next SWITCH; - }; - - /^.*$/ and do { - die "main_display(): unknown mode `$Display{'MODE'}';"; - }; - - } # SWITCH - 1; -} # main_display() - - -######################## -# _do_display ([]) -# -# Perform the generation of the output and view the result. If an -# argument is given interpret it as a function name that is called in -# the midst (actually only for `pdf'). -# -sub _do_display { - &_do_opt_V(); - unless ($Display{'PROG'}) { - system("$groggy $addopts $tmp_cat"); - &clean_up(); - return 1; - } - unlink $modefile; - die "_do_display(): empty output;" if -z $tmp_cat; - system("cat $tmp_cat | $groggy $addopts >$modefile"); - die "_do_display(): empty output;" if -z $modefile; - &print_times("before display"); - if ($_[0] && ref($_[0]) eq 'CODE') { - $_[0]->(); - } - unlink $tmp_cat unless $Debug{'KEEP'}; - - if ( $Opt{'STDOUT'} ) { - my $fh; - open $fh, "<$modefile"; - foreach (<$fh>) { - print; - } - close $fh; - return 1; - } - - if ($Viewer_Background) { - if ($Debug{'KEEP'}) { - exec "$Display{'PROG'} $Display{'ARGS'} $modefile &"; - } else { - exec "{ $Display{'PROG'} $Display{'ARGS'} $modefile; " . - "rm -rf $tmpdir; } &"; - } - } else { - system("$Display{'PROG'} $Display{'ARGS'} $modefile"); - &clean_up(); - } -} # _do_display() of main_display() - - -############# -# _do_opt_V () -# -# Check on option `-V'; if set print the corresponding output and leave. -# -# Globals: @ARGV, $Display{MODE}, $Display{PROG}, -# $Display{ARGS}, $groggy, $modefile, $addopts -# -sub _do_opt_V { - if ($Opt{'V'}) { - $Opt{'V'} = 0; - print "Parameters: @ARGV\n"; - print "Display Mode: $Display{'MODE'}\n"; - print "Output file: $modefile\n"; - print "Display prog: $Display{'PROG'} $Display{'ARGS'}\n"; - print "Output of grog: $groggy $addopts\n"; - my $res = `$groggy $addopts\n`; - chomp $res; - print "groff -V: $res\n"; - exit 0; - } - 1; -} # _do_opt_V() of main_display() - -############## -# _make_pdf () -# -# Transform to pdf format; for pdf mode in _do_display(). -# -# Globals: $md_modefile (from main_display()) -# -sub _make_pdf { - die "_make_pdf(): pdf mode did not work;" if $PDF_Did_Not_Work; - my $psfile = $modefile; - die "_make_pdf(): empty output;" if -z $modefile; - $modefile =~ s/\.ps$/.pdf/; - unlink $modefile; - my $done; - if ($PDF_Has_ps2pdf) { - system("ps2pdf $psfile $modefile 2>$Dev_Null"); - $done = ! $?; - } - if (! $done && $PDF_Has_gs) { - system("gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " . - "-sOutputFile=$modefile -c save pop -f $psfile 2>$Dev_Null"); - $done = ! $?; - } - if (! $done) { - $PDF_Did_Not_Work = 1; - warn '_make_pdf(): Could not transform into pdf format, ' . - 'the Postscript mode (ps) is used instead;'; - $Opt{'MODE'} = 'ps'; - &main_set_mode(); - &main_set_resources(); - &main_display(); - exit 0; - } - unlink $psfile unless $Debug{'KEEP'}; - 1; -} # _make_pdf() of main_display() - - -######################################################################## - -&main_set_options(); -&main_parse_MANOPT(); -&main_config_params(); -&main_parse_params(); -&main_set_mode(); -&main_temp(); -&main_do_fileargs(); -&main_set_resources(); -&main_display(); - -&clean_up(); - -1; -######################################################################## -### Emacs settings -# Local Variables: -# mode: CPerl -# End: diff -ruN groff-1.22.2/contrib/groffer/perl/man.pl groff-1.22.3/contrib/groffer/perl/man.pl --- groff-1.22.2/contrib/groffer/perl/man.pl 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/man.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,731 +0,0 @@ -#! /usr/bin/env perl - -# groffer - display groff files - -# Source file position: /contrib/groffer/perl/man.pl -# Installed position: /lib/groff/groffer/man.pl - -# Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 27 Jan 2011 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - -use strict; -use warnings; - -######################################################################## -# functions for apropos, man, whatis -######################################################################## - -########## -# apropos_filespec() -# -# Compose temporary file for filspec. -# -# Globals: in: $main::Opt{'APROPOS'}, $main::Special_Setup, $main::Filespec_Arg, -# $main::Apropos_Prog, $main::Opt{'APROPOS_SECTIONS'}, $main::Opt{'SECTIONS'} -# out: $main::Special_Filespec -# -sub apropos_filespec { - return 0 unless $main::Opt{'APROPOS'}; - die 'apropos_filespec(): apropos_setup() must be run first;' - unless $main::Special_Setup; - die 'apropos_filespec(): no $main::Filespec_Arg is set;' - unless defined $main::Filespec_Arg; - $main::Special_Filespec = 1; - - my $s; - if ($main::No_Filespecs) { - &to_tmp_line('.SH no filespec'); - $s = `$main::Apropos_Prog`; - $s =~ s/^/\\\&/; - &to_tmp_line($s); - return 1; - } - - $s = $main::Filespec_Arg; - $s =~ s/[^\\]-/\\-/g; - &to_tmp_line(".SH $s"); - - if ( $main::Opt{'APROPOS_SECTIONS'} ) { - $s = qr/^[^\(]*\([$main::Opt{'APROPOS_SECTIONS'}]/; - } else { - if ( $main::Opt{'SECTIONS'} ) { - $s = $main::Opt{'SECTIONS'}; - $s = qr/^[^\(]*\([$s]/; - } else { - $s = qr/^.*\(.+\).*$/; - } - } - -### apropos_filespec() - my $filespec = $main::Filespec_Arg; - $filespec =~ s#/#\\/#g; - $filespec =~ s#\.#\\./#g; - my @ap; - foreach ( `$main::Apropos_Prog $main::Filespec_Arg 2>$main::Dev_Null` ) { - chomp; - if (/^$filespec:\s/) { # for error messages of this script - my $line = $_; - $line =~ s/^(.*)$/\\\&$1/s; - push @ap, $line; - } - if (/$s/) { - push @ap, $_; - } - } - my @res; - foreach (sort @ap) { - s/^ - ([^\(]+\(+[$main::Man{'AUTO_SEC_CHARS'}][^\)]*\)+) - (\s*-*)*\s* - (.*) - $/.br\n.TP 15\n.BR "$1"\n\\\&$3\n/sx; - push @res, $_; - } - &to_tmp_line(@res); - 1; -} # apropos_filespec() - - -########## -# apropos_setup() -# -# Setup for the --apropos* options, just 2 global variables are set. -# -# Globals: in: $main::Opt{'APROPOS'} -# out: $main::Special_Setup, $main::Apropos_Prog -# -sub apropos_setup { - return 0 unless $main::Opt{'APROPOS'}; - if ( &where_is_prog('apropos') ) { - $main::Apropos_Prog = 'apropos'; - } elsif ( &where_is_prog('man') ) { - if (! system("man --apropos man >$main::Dev_Null 2>$main::Dev_Null")) { - $main::Apropos_Prog = 'man --apropos'; - } elsif (! system("man -k man >$main::Dev_Null 2>$main::Dev_Null")) { - $main::Apropos_Prog = 'man --k'; - } - } # test man - die 'apropos_setup(): no apropos program available;' - unless $main::Apropos_Prog; - &to_tmp_line('.TH GROFFER APROPOS'); - $main::Special_Setup = 1; - $main::Opt{'TITLE'} = 'apropos' unless $main::Opt{'TITLE'}; - 1; -} # apropos_setup() - - -########## -# is_man() -# -# Test whether the argument hash exists as man page (from is_man()). -# -# Globals: in: $main::Man{AUTO_SEC_CHARS},$main::Man{SEC_CHARS}, -# $main::Man{EXT}, $tmpdir -# out: $main::Manspec -# -# Arguments: 1, a hash reference with keys 'name', 'sec', 'ext', where -# 'sec' is a string of one or several section characters -# -sub is_man { - my $n = @_; - die "is_man(): one argument is needed, you used $n;" - unless $n == 1; - die "is_man(): the argument is not a hash reference `$_[0]';" - if ref($_[0]) ne 'HASH'; - die 'is_man(): temporary directory is not set;' unless $main::tmpdir; - die 'is_man(): man_setup() must be run first;' unless $main::Man{'IS_SETUP'}; - - my $name = $_[0]->{'name'}; - unless ($name) { - $main::Manspec = ''; - return 0; - } - - my $sec; - $sec = $_[0]->{'sec'}; - $sec = $main::Man{'SEC_CHARS'} unless $sec; - $sec = $main::Man{'AUTO_SEC_CHARS'} unless $sec; - $sec = '' unless defined $sec; - # take care, $sec may be several sections - -### is_man() - my $ext; - $ext = $_[0]->{'ext'}; - $ext = $main::Man{'EXT'} unless $ext; - $ext = '' unless defined $ext; - - $main::Manspec = "$name.$sec,$ext"; - my @m; - if (exists $main::Man{'MANSPEC'}{$main::Manspec}) { - return 1; - } else { - foreach my $p ( @{$main::Man{'PATH'}} ) { - foreach my $s (split //, $sec) { - my $dir = File::Spec->catdir($p, "man$s"); - next unless -d $dir; - my $file = File::Spec->catfile($dir, "$name.$s$ext"); - push @m, glob("$file*"); - } - } - $main::Man{'MANSPEC'}{$main::Manspec} = \@m; - } - return 0 unless (@m); - return 1; -} # is_man() - - -########## -# man_get () -# -# Write a man page to the temporary file. -# -# Globals in: $main::Manspec, $main::Man{MANSPEC}, $main::Man{SEC_CHARS}, -# $main::Man{EXT}, $main::Man{ALL} -# -# Arguments: 1, a hash reference with keys 'name', 'sec', 'ext', where -# 'sec' is a string of one or several section characters -# -sub man_get { - my $n = @_; - die "man_get(): one argument is needed, you used $n;" - unless $n == 1; - die "man_get(): the argument is not a hash reference `$_[0]';" - if ref($_[0]) ne 'HASH'; - die "man_get(): is_man() must be run first on the argument;" - unless $main::Manspec; - die "man_get(): wrong hash reference `$_[0]', no 'name' key;" - unless exists $_[0]->{'name'}; - - my ($name, $sec, $ext, $f, $path); - $name = $_[0]->{'name'}; - die "man_get(): empty 'name' key in the argument;" unless $name; - - $sec = $_[0]->{'sec'}; - $sec = $main::Man{'SEC_CHARS'} if (! $sec) and $main::Man{'SEC_CHARS'}; - $sec = '' unless defined $sec; - # take care $sec may be several sections - -### man_get() - $ext = $_[0]->{'ext'}; - $ext = $main::Man{'EXT'} unless $ext; - $ext = '' unless defined $ext; - - die 'man_get(): $main::Manspec does not suit the arguments;' - if ($main::Manspec ne "$name.$sec,$ext") and - (! exists $main::Man{'MANSPEC'}{$main::Manspec}); - - if ($main::Man{'ALL'}) { - my $ok; - my %list; - foreach ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - next if exists $list{$_}; - if (-f $_ and -r $_) { - $list{$_} = 1; - &to_tmp($_); - $ok = 1; - } - } - ®ister_title("man:$name") if $ok; - return 1; - } - - # not $main::Man{'ALL'} - - if ($_[0]->{'sec'}) { - my $path = File::Spec->catfile('', "man$sec", $name); - if ($ext) { - foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ($f =~ m#$path\.$sec$ext($|\..*$)#) { - if (-f $f && -r $f) { - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f -### man_get() - foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ($f =~ m#$path\.$sec$ext.*$#) { - if (-f $f && -r $f) { - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f - } else { # $ext is empty - foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ($f =~ m#$path\.$sec($|\..*$)#) { - if (-f $f && -r $f) { - # &to_tmp($f) && ®ister_file($f); - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f - foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ($f =~ m#$path\.$sec.*$#) { - if (-f $f && -r $f) { - # &to_tmp($f) && ®ister_file($f); - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f - } # if $ext -### man_get() - } else { # sec is empty - my $m = $main::Man{'SEC_CHARS'}; - $m = $main::Man{'AUTO_SEC_CHARS'} unless $m; - foreach my $s (split //, $m) { - my $path = File::Spec->catfile('', "man$s", $name); - unless ($ext) { - foreach my $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ( $f =~ m#$path\.$s($|\..*$)# ) { - if (-f $f && -r $f) { - # &to_tmp($f) && ®ister_file($f); - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f - } # unless $ext - foreach $f ( @{$main::Man{'MANSPEC'}{$main::Manspec}} ) { - if ($f =~ m#$path\.$s$ext.*$#) { - if (-f $f && -r $f) { - # &to_tmp($f) && ®ister_file($f); - ®ister_file($f); - return 1; - } - } # if $f =~ - } # foreach $f - } # foreach $s - } # if sec - - 1; -} # man_get() - - -########## -# man_setup () -# -# Setup the variables in %MAN needed for man page searching. -# -# Globals: -# in: %OPT, $LANG, $LC_MESSAGES, $LC_ALL, -# $MANPATH, $MANSEC, $PAGER, $SYSTEM, $MANOPT. -# out: $main::Man{PATH}, $main::Man{LANG}, $main::Man{LANG2}, $main::Man{SYS}, -# $main::Man{SEC}, $main::Man{ALL} -# in/out: $main::Man{ENABLE} -# -# The precedence for the variables related to `man' is that of GNU -# `man', i.e. -# -# $LANG; overridden by -# $LC_MESSAGES; overridden by -# $LC_ALL; this has the same precedence as -# $MANPATH, $MANSEC, $PAGER, $SYSTEM; overridden by -# $MANOPT; overridden by -# the groffer command line options. -# -# $MANROFFSEQ is ignored because grog determines the preprocessors. -# -sub man_setup { - return 1 if $main::Man{'IS_SETUP'}; - $main::Man{'IS_SETUP'} = 1; - return 1 unless $main::Man{'ENABLE'}; - - # determine basic path for man pages - my $path; - if (defined $main::Opt{'MANPATH'}) { - $path = $main::Opt{'MANPATH'}; - } elsif ($ENV{'MANPATH'}) { - $path = $ENV{'MANPATH'}; - } elsif ( &where_is_prog('manpath') ) { - $path = `manpath 2>$main::Dev_Null`; - } - if ($path) { - chomp $path; - $main::Man{'PATH'} = [split /:/, $path]; - } else { - $main::Man{'PATH'} = []; - &manpath_set_from_path(); - } - unless ( @{$main::Man{'PATH'}} ) { - $main::Man{'ENABLE'} = 0; - warn "man_setup(): man path is empty;"; - return 1; - } - -### man_setup() - # make man path list consisting of unique existing directories - @{$main::Man{'PATH'}} = &path_uniq( @{$main::Man{'PATH'}} ); - - unless ($main::Man{'ALL'}) { - $main::Man{'ALL'} = $main::Opt{'ALL'} ? 1 : 0; - } - - # handle man systems - my $sys = $ENV{'SYSTEM'}; - $sys = $main::Opt{'SYSTEMS'} if $main::Opt{'SYSTEMS'}; - if ($sys) { - chomp $sys; - $main::Man{'SYS'} = [split /,/, $sys]; - } else { - $main::Man{'SYS'} = []; - $sys = ''; - } - -### man_setup() - # handle language - my $lang = ''; - $lang = $main::Opt{'LANG'} if $main::Opt{'LANG'}; - unless ($lang) { - foreach ('LC_ALL', 'LC_MESSAGES', 'LANG') { - if ($ENV{$_}) { - $lang = $ENV{$_}; - last; - } - } - } - if ($lang) { - if ($lang eq 'C' or $lang eq 'POSIX') { - $main::Man{'LANG'} = ''; - $main::Man{'LANG2'} = ''; - } elsif ($lang =~ /^.$/) { - $main::Man{'LANG'} = $lang; - $main::Man{'LANG2'} = ''; - } elsif ($lang =~ /^..$/) { - $main::Man{'LANG'} = $lang; - $main::Man{'LANG2'} = $lang; - } else { - $main::Man{'LANG'} = $lang; - $main::Man{'LANG2'} = $lang; - $main::Man{'LANG2'} =~ s/^(..).*$/$1/; - } - } # if ($lang) - # from now on, use only $main::Man{LANG*}, forget about $main::Opt{LANG}, $ENV{LC_*}. - - &manpath_add_lang_sys(); - -### man_setup() - # section - my $sec; - $sec = $main::Opt{'SECTIONS'} if $main::Opt{'SECTIONS'}; - unless ($sec) { - $sec = $ENV{'MANSEC'} if $ENV{'MANSEC'}; - } - $main::Man{'SEC'} = []; - $main::Man{'SEC_CHARS'} = ''; - if ($sec) { - foreach (split /:/, $sec) { - push @{$main::Man{'SEC'}}, $_ if /^[$main::Man{'AUTO_SEC_CHARS'}]$/; - } - $main::Man{'SEC_CHARS'} = join '', @{$main::Man{'SEC'}} if @{$main::Man{'SEC'}}; - } # if ($sec) - - # extension - my $ext = ''; - $ext = $main::Opt{'EXTENSION'} if $main::Opt{'EXTENSION'}; - unless ($ext) { - $ext = $ENV{'EXTENSION'} if $ENV{'EXTENSION'}; - } - $main::Man{'EXT'} = $ext; - - # creation of man temporary is omitted, because of globs in perl - 1; -} # man_setup() - - -########## -# manpath_add_lang_sys() -# -# Add language and operating system specific directories to man path. -# -# Globals: -# in: $main::Man{SYS}: a list of names of operating systems. -# $main::Man{LANG} and $main::Man{LANG2}: each a single name -# in/out: @{$main::Man{PATH}}: list of directories which shall have the `man?' -# subdirectories. -# -sub manpath_add_lang_sys { - return 1 unless $main::Man{'PATH'}; - return 1 unless @{$main::Man{'PATH'}}; - - my @mp; - - if ( @{$main::Man{'SYS'}} ) { - foreach ( @{$main::Man{'SYS'}} ) { - if ($_ eq 'man') { - @mp = (@mp, @{$main::Man{'PATH'}}); - } elsif ($_) { - my $sys = $_; - foreach my $p (@{$main::Man{'PATH'}}) { - my $dir = File::Spec->catdir($p, $sys); - push @mp, $dir; - } - } # if eq 'man' - } # foreach SYS - } else { # no SYS - @mp = @{$main::Man{'PATH'}}; - } - - if (@mp && $main::Man{'LANG'}) { - my @lang_path; - my $man_lang2 = ''; - $man_lang2 = $main::Man{'LANG2'} if $main::Man{'LANG'} ne $main::Man{'LANG2'}; - foreach my $i ($main::Man{'LANG'}, $man_lang2) { - next unless $i; - my $lang = $i; - foreach my $p (@mp) { - my $dir = File::Spec->catdir($p, $lang); - push @lang_path, $dir; - } # foreach $p - } # foreach $i - @mp = (@lang_path, @mp); - } # if $mp - - $main::Man{PATH} = [&path_uniq(@mp)]; - 1; -} # manpath_add_lang_sys() - - -########## -# manpath_set_from_path() -# -# Determine basic search path for man pages from $PATH. -# -# Return: `1' if a valid man path was retrieved. -# Output: none -# Globals: -# in: $PATH -# out: $_MAN_PATH -# -sub manpath_set_from_path { - my @path = - qw( /usr/local /usr /usr/X11R6 /usr/openwin /opt /opt/gnome /opt/kde ); - # get a basic man path from $ENV{PATH} - my @path2 = @main::Path; - foreach (@path2) { - s#bin/*$##; - push @path, $_; - } - @path = &path_uniq(@path); - foreach my $d (@path) { - foreach my $e ( File::Spec->catdir( qw(share man) ), - File::Spec->catdir( qw(share MAN) ), - 'man', 'MAN' ) { - my $dir = File::Spec->catdir($d, $e); - push @{$main::Man{'PATH'}}, $dir if -d $dir; - } - } - 1; -} # manpath_set_from_path() - - -########## -# special_filespec() -# -# Handle special modes like whatis and apropos. Run their filespec -# functions if suitable. -# -# Globals: in: $main::Opt{'APROPOS'}, $main::Opt{'WHATIS'}, $main::Special_Setup -# out: $main::Special_Filespec (internal) -# -sub special_filespec { - return 0 unless $main::Opt{'APROPOS'} || $main::Opt{'WHATIS'}; - die 'special_filespec(): setup for apropos or whatis must be run first;' - unless $main::Special_Setup; - if ( $main::Opt{'APROPOS'} ) { - die "special_setup(): both apropos and whatis option variables are set;" - if $main::Opt{'WHATIS'}; - return &apropos_filespec() ? 1 : 0; - } - if ( $main::Opt{'WHATIS'} ) { - return &whatis_filespec() ? 1 : 0; - } - 0; -} # special_filespec - - -########## -# special_setup() -# -# Handle special modes like whatis and apropos. Run their setup -# functions if suitable. -# -sub special_setup { - if ( $main::Opt{'APROPOS'} ) { - die "special_setup(): both --apropos and --whatis option variables " . - "are set;" if $main::Opt{'WHATIS'}; - return &apropos_setup() ? 1 : 0; - } - if ( $main::Opt{'WHATIS'} ) { - return &whatis_setup() ? 1 : 0; - } - 0; -} # special_setup() - - -########## -# whatis_filename() -# -# Interpret as a man page and display its `whatis' -# information as a fragment written in the groff language. -# -# Globals: in: $main::Opt{'WHATIS'}, $main::Special_Setup, $main::Special_Filespec, -# $main::Filespec_Arg -# -sub whatis_filename { - my $n = @_; - die "whatis_filename(): one argument is needed; you used $n;" - unless $n == 1; - die "whatis_filename(): whatis is not setup;" unless $main::Opt{'WHATIS'}; - die "whatis_filename(): setup for whatis must be run first;" - unless $main::Special_Setup; - die "whatis_filename(): whatis_filespec() must be run first;" - unless $main::Special_Filespec; - die 'whatis_filename(): no $main::Filespec_Arg is set;' - unless defined $main::Filespec_Arg; - - my $arg = $_[0]; - die "whatis_file_name(): $arg is not an existing file" unless -f $arg; - die "whatis_file_name(): could not read file $arg" unless -r $arg; - return 1 if -z $arg; - $arg = 'stdin' if $main::Filespec_Arg eq '-'; - - &to_tmp_line('.br', '\\f[CR]' . $arg . '\\f[]:', '.br'); - -### whatis_filename() - # get the parts of the file name according to the naming of man pages - my ($dir, $name) = &split_path( $_[0] ); - my $section = $_[0]; - my $path = File::Spec->catfile('', 'man'); - $section =~ s#^.*$path([$main::Man{'AUTO_SEC_CHARS'}]).*$#$1#; - $section = '' if $section eq $_[0]; - if ($section) { - if ($name =~ m#^.*\.$section.*$#) { - $name =~ s/^(.*)\.$section.*$/$1/; - } else { - $section = ''; - } - } - - # traditional man style; grep the line containing `.TH' macro, if any - my @catz = &cat_z($_[0]); - my $res; - my $test; - foreach (@catz) { - if (/^[\.']\s*TH\s/) { # search .TH, traditional man style - $test = 1; - last; - } - } # foreach (@catz) -### whatis_filename() - if ($test) { # traditional man style - # get the first line after the first `.SH' macro before the next `.SH' - my $test1; - foreach (@catz) { - if ($test1) { - chomp; - next unless $_; - next if /^[\.']?\s*$/; - last if /^[\.']/; # especially for .SH - if ($res) { - $res = "$res $_"; - } else { - $res = $_; - } - } else { # $test1 is empty - $test1 = 1 if (/^[\.']\s*SH\s/); - } # if ($test1) - } # foreach (@catz) - - if ($section) { - if ($res =~ m|^ - $name - \s - [^-]* - - - \s* - (.*) - $|sx) { - $res = "$name ($section) \\[em] $1"; - } - } # if ($section) -### whatis_filename() - &to_tmp_line($res, '.br', '', '.br'); - return 1; - } # if ($test) - - # mdoc style (BSD doc); grep the line containing `.Nd' macro, if any - foreach (@catz) { - if (/^[\.']\s*Nd\s/) { # BSD doc style - $res =~ s/^(.*)$/$name ($section) \\[em] $1/; - &to_tmp_line($res); - return 1; - } - } - - &to_tmp_line('is not a man page', '.br', '', '.br'); - 1; -} # whatis_filename() - - -########## -# whatis_filespec() -# -# Print the filespec name as .SH to the temporary cat file. -# -# Globals: in: $main::Opt{'WHATIS'}, $main::Filespec_Arg -# in/out: $main::Special_Filespec -# -sub whatis_filespec { - return 0 unless ($main::Opt{'WHATIS'}); - die 'whatis_filespec(): whatis_setup() must be run first.' - unless $main::Special_Setup; - die 'whatis_filespec(): no $main::Filespec_Arg is set;' - unless defined $main::Filespec_Arg; - $main::Special_Filespec = 1; - my $arg = $main::Filespec_Arg; - $arg =~ s/[^\\]-/\\-/g; - to_tmp_line(".SH $arg"); -} # whatis_filespec() - - -########## -# whatis_setup () -# -# Print the whatis header to the temporary cat file; this is the setup -# for whatis. -# -# Globals: in: $main::Opt{'WHATIS'} -# out: $main::Special_Setup -sub whatis_setup { - if ( $main::Opt{'WHATIS'} ) { - &to_tmp_line('.TH GROFFER WHATIS'); - $main::Special_Setup = 1; - $main::Opt{'TITLE'} = 'whatis' unless $main::Opt{'TITLE'}; - return 1; - } - 0; -} # whatis_setup () - -1; diff -ruN groff-1.22.2/contrib/groffer/perl/perl_test.pl groff-1.22.3/contrib/groffer/perl/perl_test.pl --- groff-1.22.2/contrib/groffer/perl/perl_test.pl 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/perl_test.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -#! /usr/bin/env perl - -# groffer - display groff files - -# Source file position: /contrib/groffer/perl/perl_test.sh -# Installed position: /lib/groff/groffer/perl_test.sh - -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 file tests whether perl has a suitable version. It is used by -# groffer.pl and Makefile.sub. - -# require 5.004_05; -require v5.6.1; diff -ruN groff-1.22.2/contrib/groffer/perl/README_PERL groff-1.22.3/contrib/groffer/perl/README_PERL --- groff-1.22.2/contrib/groffer/perl/README_PERL 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/README_PERL 1970-01-01 01:00:00.000000000 +0100 @@ -1,263 +0,0 @@ -README_PERL - -Special description for the Perl version of `groffer' - -The files related to the Perl version are - -perl/groffer.pl perl main source file for groffer -perl/func.pl selection of functions needed for groffer.pl -perl/man.pl selection of man functions needed for groffer.pl -perl/split_env.sh shell script called from groffer.pl to split a variable -perl/groffer.man manual file rewritten for the perl version of groffer -perl/README_PERL this file -perl_test.pl test whether perl has a suitable version -version.sh information on version number and last update - - -Compatibility - -This is the Perl version of groffer. It was written under Perl v5.8.8 -and needs an installed Perl version of at least version 5.6.1. - -It was written in Linux, but it seems to be independent of the -operating system. At least no directory slashes are used. - -For testing, `groffer.pl' may be used directly without a Makefile. By -`make' this file will be transformed into the file `groffer' that will -be installed. - -The following options were removed compared to the shell version of -groffer: - ---shell --debug-func --debug-not_func --debug-lm --debug-shell ---debug-stacks --debug-user - -They can be used, but they are just ignored. - -Otherwise, the Perl version has the same functionality as the shell -version. - - -Temporary files - -The Perl version keeps more files for debug mode than the shell -version. The `file' and `so' temporaries are numbered and the files -with .so request are copied. All .so requests are handled; this is an -extension to `man' that deals only with the first .so request. - - -Comparison of variable names in both groffer versions - -shell perl -======================================================================= -$GROFFER_OPT $Env{GROFFER} -$PATH @Path -$_ADDOPTS_GROFF @Addopts_Groff -$_ALL_PARAMS @ARGV -$_APROPOS_PROG $Apropos_Prog -$_APROPOS_SECTIONS $Opt{APROPOS_SECTIONS} -$_AT $at -$_AT_BINDIR_AT $at_at{BINDIR} -$_AT_G_AT $at_at{G} -$_AT_LIBDIR_AT $at_at{LIBDIR} -$_BAD - -$_BEFORE_MAKE $before_make -$_CONF_FILES @Conf_Files -$_CONF_FILE_ETC @Conf_Files -$_CONF_FILE_HOME @Conf_Files -$_DEBUG_FUNC_CHECK - -$_DEBUG_KEEP_FILES @Debug{KEEP} -$_DEBUG_LM - -$_DEBUG_PRINT_FILENAMES @Debug{FILENAMES} -$_DEBUG_PRINT_PARAMS @Debug{PARAMS} -$_DEBUG_PRINT_SHELL - -$_DEBUG_PRINT_TMPDIR @Debug{TMPDIR} -$_DEBUG_STACKS - -$_DEBUG_USER_WITH_STACK - -$_DEFAULT_MODES $Default_Modes -$_DEFAULT_RESOLUTION $Default_Resolution -$_DEFAULT_TTY_DEVICE $Default_tty_Device -$_DISPLAY_ARGS $Display{ARGS} -$_DISPLAY_MODE $Display{MODE} -$_DISPLAY_PROG $Display{PROG} -$_ERROR - -$_FILEARGS @Filespecs -$_FILESPEC_ARG $Filespec_Arg -$_FILESPEC_IS_MAN $Filespec_Is_Man -$_FUNC_STACK - -$_GOOD - -$_GROFFER2_SH - -$_GROFFER_LIBDIR $groffer_libdir -$_GROFFER_SH _ -$_GROFF_VERSION $Groff_Version -$_GROFF_VERSION_PRESET $groff_version_preset -$_HAS_BZIP $Has_bzip -$_HAS_COMPRESSION $Has_Compression -$_LAST_UPDATE $last_update -$_MACRO_PACKAGES $Macro_Packages -$_MACRO_PKG $Macro_Pkg -$_MANOPT_ALL - -$_MANOPT_EXTENSION - -$_MANOPT_LANG - -$_MANOPT_PAGER - -$_MANOPT_PATH - -$_MANOPT_SEC - -$_MANOPT_SYS - -$_MAN_ALL $Man{ALL} -$_MAN_AUTO_SEC_CHARS $Man{AUTO_SEC_CHARS} -$_MAN_AUTO_SEC_LIST @{$Man{AUTO_SEC}} -$_MAN_ENABLE $Man{ENABLE} -$_MAN_EXT $Man{EXT} -$_MAN_FORCE $Man{FORCE} -$_MAN_IS_SETUP $Man{IS_SETUP} -$_MAN_LANG $Man{LANG} -$_MAN_LANG2 $Man{LANG2} -$_MAN_PATH @{$Man{PATH}} -$_MAN_SEC @{$Man{SEC}} -$_MAN_SEC_CHARS $Man{SEC_CHARS} -$_MAN_SEC_LIST - -$_MAN_SYS @{$Man{SYS}} -$_NO - -$_NO_FILESPECS $No_Filespecs -$_NULL_DEV $Dev_Null -$_OK - -$_OPTS_CMDLINE_LONG_ARG %Opts_Cmdline_Long with value 1 -$_OPTS_CMDLINE_LONG_NA %Opts_Cmdline_Long with value 0 -$_OPTS_CMDLINE_SHORT_ARG %Opts_Cmdline_Short with value 1 -$_OPTS_CMDLINE_SHORT_NA %Opts_Cmdline_Short with value 0 -$_OPTS_GROFFER_LONG_ARG - -$_OPTS_GROFFER_LONG_NA - -$_OPTS_GROFFER_SHORT_ARG - -$_OPTS_GROFFER_SHORT_NA - -$_OPTS_GROFF_LONG_ARG - -$_OPTS_GROFF_LONG_NA - -$_OPTS_GROFF_SHORT_ARG - -$_OPTS_GROFF_SHORT_NA - -$_OPTS_MANOPT_LONG_ARG - -$_OPTS_MANOPT_LONG_NA - -$_OPTS_MANOPT_SHORT_ARG - -$_OPTS_MANOPT_SHORT_NA - -$_OPTS_MAN_LONG_ARG - -$_OPTS_MAN_LONG_NA - -$_OPTS_MAN_SHORT_ARG - -$_OPTS_MAN_SHORT_NA - -$_OPTS_X_LONG_ARG - -$_OPTS_X_LONG_NA - -$_OPTS_X_SHORT_ARG - -$_OPTS_X_SHORT_NA - -$_OPT_ALL $Opt{ALL} -$_OPT_APROPOS $Opt{APROPOS} -$_OPT_BD $Opt{BD} -$_OPT_BG $Opt{BG} -$_OPT_BW $Opt{BW} -$_OPT_DEFAULT_MODES $Opt{DEFAULT_MODES} -$_OPT_DEVICE $Opt{DEVICE} -$_OPT_DISPLAY $Opt{DISPLAY} -$_OPT_DO_NOTHING $Opt{DO_NOTHING} -$_OPT_EXTENSION $Opt{EXTENSION} -$_OPT_FG $Opt{FG} -$_OPT_FN $Opt{FN} -$_OPT_GEOMETRY $Opt{GEOMETRY} -$_OPT_ICONIC $Opt{ICONIC} -$_OPT_LANG $Opt{LANG} -$_OPT_MANPATH $Opt{MANPATH} -$_OPT_MODE $Opt{MODE} -$_OPT_PAGER $Opt{PAGER} -$_OPT_RESOLUTION $Opt{RESOLUTION} -$_OPT_RV $Opt{RV} -$_OPT_SECTIONS $Opt{SECTIONS} -$_OPT_SYSTEMS $Opt{SYSTEMS} -$_OPT_TEXT_DEVICE $Opt{TEXT_DEVICE} -$_OPT_TITLE $Opt{TITLE} -$_OPT_V $Opt{V} -$_OPT_VIEWER_DVI $Opt{VIEWER_DVI} -$_OPT_VIEWER_HTML $Opt{VIEWER_HTML} -$_OPT_VIEWER_PDF $Opt{VIEWER_PDF} -$_OPT_VIEWER_PS $Opt{VIEWER_PS} -$_OPT_VIEWER_X $Opt{VIEWER_X} -$_OPT_WHATIS $Opt{WHATIS} -$_OPT_XRM @{$Opt{XRM}} -$_OPT_Z $Opt{Z} -$_OUTPUT_FILE_NAME $Output_File_Name -$_PDF_DID_NOT_WORK $PDF_Did_Not_Work -$_PDF_HAS_GS $PDF_Has_gs -$_PDF_HAS_PS2PDF $PDF_Has_ps2pdf -$_PROCESS_ID - -$_PROGRAM_VERSION $program_version -$_REG_TITLE_LIST @Reg_Title -$_SHELL - -$_SP - -$_SPACE_CASE - -$_SPACE_SED - -$_SPECIAL_FILESPEC $Special_Filespec -$_SPECIAL_SETUP $Special_Setup -$_SQ - -$_START_DIR $Start_Dir -$_TAB - -$_TMP_CAT $fh_cat, $tmp_cat -$_TMP_DIR $tmpdir -$_TMP_MAN - -$_TMP_MANSPEC $Manspec for @{Man{MANSPEC}{$Manspec}} -$_TMP_STDIN $fh_stdin, $tmp_stdin -$_UNSET - -$_VIEWER_BACKGROUND $Viewer_Background -$_VIEWER_DVI_TTY $Viewer_tty{'DVI'} -$_VIEWER_DVI_X $Viewer_X{'DVI'} -$_VIEWER_HTML_TTY $Viewer_tty{'HTML'} -$_VIEWER_HTML_X $Viewer_X{'HTML'} -$_VIEWER_PDF_TTY $Viewer_tty{'PDF'} -$_VIEWER_PDF_X $Viewer_X{'PDF'} -$_VIEWER_PS_TTY $Viewer_tty{'PS'} -$_VIEWER_PS_X $Viewer_X{'PS'} -$_VIEWER_TTY_TTY - -$_VIEWER_TTY_X - -$_VIEWER_X_TTY $Viewer_tty{'X'} -$_VIEWER_X_X $Viewer_X{'X'} -$_YES - -$return_bad - -$return_error - -$return_good - -$return_no - -$return_ok - -$return_var - -$return_yes - -- @ARGV -- @Manopt -- $Opt{LOCATION} -- $Opt{X} -- $File_Split_Env -- @Options -- @StartingARGV -- @StartingConf -- $Umask - - -####### License - -Copyright (C) 2003, 2004, 2005, 2006, 2009 - Free Software Foundation, Inc. -Written by Bernd Warken . - -This file is part of `groffer', which is part of `groff'. - -`groff' is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 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 . - -Last update: 5 Jan 2009 - - -####### Emacs settings - -Local Variables: -mode: text -End: diff -ruN groff-1.22.2/contrib/groffer/perl/roff2.pl groff-1.22.3/contrib/groffer/perl/roff2.pl --- groff-1.22.2/contrib/groffer/perl/roff2.pl 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/perl/roff2.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,223 +0,0 @@ -#! /usr/bin/env perl - -# roff2* - transform roff files into other formats - -# Source file position: /contrib/groffer/perl/roff2.pl -# Installed position: /bin/roff2* - -# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - -require v5.6; - -use strict; -use warnings; -use File::Spec; - -# temporary dir and files -use File::Temp qw/ tempfile /; - -my $Dev_Null = File::Spec->devnull(); -my $Mode; -my $Name; -{ - my ($v, $d); - ($v, $d, $Name) = File::Spec->splitpath($0); - die "wrong program name: $Name;" - if $Name !~ /^roff2[a-z]/; -} -$Mode = $Name; -$Mode =~ s/^roff2//; - -my $Groff_Version = `groff --version 2>$Dev_Null`; -die "$Name error: groff does not work;" if $?; -my $Groffer_Version = `groffer --version 2>$Dev_Null`; -my $Has_Groffer = ! $?; - -if ($Has_Groffer) { - foreach (@ARGV) { - last if $_ eq '--'; - next if $_ eq '-'; - if ($_ eq '-v' || '--version' =~ m|^$_|) { - print $Name, ' in ', $Groffer_Version; - exit 0; - } - if ($_ eq '-h' || '--help' =~ m|^$_|) { - &usage_with_groffer(); - exit 0; - } - } - system('groffer', '--to-stdout', "--$Mode", @ARGV); - exit $?; -} else { - my @filespec; - my $double_minus; - foreach (@ARGV) { - if ($double_minus) { - push @filespec, $_; - next; - } - if ($_ eq '--') { - $double_minus = 1; - next; - } - if ($_ eq '-') { - push @filespec, '-'; - next; - } - if ($_ eq '-v' || '--version' =~ m|^$_|) { - print $Name, ' in ', $Groff_Version; - exit 0; - } - if ($_ eq '-h' || '--help' =~ m|^$_|) { - &usage_without_groffer(); - exit 0; - } - if ($_ =~ /^-/) { - &error_no_groffer(); - &error_no_options(); - next; - } - if (-f && -r) { - push @filespec, $_; - } else { - &error_no_groffer(); - print STDERR "$_ is not an existing, readable file.\n"; - } - } - - @filespec = ('-') unless @filespec; - my $has_stdin; - foreach (@filespec) { - if ($_ eq '-') { - $has_stdin =1; - last; - } - } - - if ($has_stdin) { - my $tempdir; - foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, - $ENV{'TEMP'}, $ENV{'TEMPDIR'}, - File::Spec->catfile($ENV{'HOME'}, 'tmp')) { - if ($_ && -d $_ && -w $_) { - $tempdir = $_; - last; - } - } - my $template = $Name . '_XXXX'; - my ($fh, $stdin); - if ($tempdir) { - ($fh, $stdin) = tempfile($template, UNLINK => 1, DIR => $tempdir) || - die "$Name: could not create temporary file;"; - } else { - ($fh, $stdin) = tempfile($template, UNLINK => 1) || - die "$Name: could not create temporary file;"; - } - open $fh, ">$stdin"; - print $fh $_ foreach ; - - foreach (@filespec) { - $_ = $stdin if $_ eq '-'; - } - } # if $has_stdin - - my $grog; - my $groff_options = "-T$Mode"; - $groff_options = '-TX75-12 -Z' if $Mode eq 'x'; - $groff_options = '-Tlatin1' if $Mode eq 'text'; - if ($Mode eq 'pdf') { - my $ps2pdf; - my @path = File::Spec->path(); - foreach (@path) { - my $file = File::Spec->catfile($_, 'ps2pdf'); - if (-f $file && -x $file) { - $ps2pdf = "$file -"; - last; - } - } - unless ($ps2pdf) { - foreach (@path) { - my $file = File::Spec->catfile($_, 'gs'); - if (-f $file && -x $file) { - $ps2pdf = $file . ' -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite ' . - '-sOutputFile=- -c save pop -f -'; - last; - } - } - } - $grog = `grog -Tps @filespec`; - chomp $grog; - system("$grog | $ps2pdf"); - exit $?; - } else { - $grog = `grog $groff_options @filespec`; - chomp $grog; - system($grog); - exit $?; - } -} - -my $error_no_groffer; -sub error_no_groffer { - return 1 if $error_no_groffer; - $error_no_groffer = 1; - print STDERR "$Name: groffer is not available.\n"; -} - -my $error_no_options; -sub error_no_options { - return 1 if $error_no_options; - $error_no_groffer = 1; - print STDERR "$Name: groffer options are not allowed.\n"; -} - -sub usage_with_groffer { - print </contrib/groffer/perl/split_env.sh -# Installed position: /lib/groff/groffer/split_env.sh - -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 file is called from groffer.pl. The environment variable -# of the name in $1 will be split at output. The corresponding variable -# must be exported before the call of groffer.pl. - -if test $# = 0 -then - echo 'split_env.sh was called without an argument.' >&2; -else - eval v='"$'"$1"'"'; - if test _"$v"_ != __ - then - eval set x $v; - shift; - for i in "$@"; - do - echo $i; - done; - fi; -fi; diff -ruN groff-1.22.2/contrib/groffer/README groff-1.22.3/contrib/groffer/README --- groff-1.22.2/contrib/groffer/README 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/groffer/README 2014-11-04 09:38:35.478520834 +0100 @@ -2,19 +2,8 @@ The `groffer' program is the easiest way to read documents written in some `roff' language, such as the `man pages', the manual pages in -many operating systems. All `roff' preprocessors, such as `chem', are -detected and executed automatically. - - -Source files in this directory - -ChangeLog information on all changements for groffer versions 1.* -Makefile.sub make file used by groff -README this file, general description of the program -version.sh information on version number and last update -perl_test.pl test whether perl has a suitable version -perl/ subdirectory for the Perl version, see perl/README_PERL -shell/ subdirectory for the shell version, see shell/README_SH +many operating systems. All `roff' preprocessors, such as `chem' or +`glilypond', are detected and executed automatically. Input @@ -60,21 +49,20 @@ as by option `-V' and the `man' like `whatis' and `apropos' outputs. -By default, the program tries to display a graphical device in X; on -non-X text terminals, the `tty' text mode with a pager is tried by -default. +By default, the program creates a PDF file; on non-X text terminals, +the `tty' text mode with a pager is tried by default. File access -The shell and the Perl version of groffer now use umask of 077. This -is a very strict security issue. It allows only access of the -temporary files by the file owner. +The Perl version of groffer now use umask of 077. This is a very +strict security issue. It allows only access of the temporary files +by the file owner. Compatibility -`groffer' is compatible with the `man' program. It supports .so +`groffer' is compatible to the `man' program. It supports `.so' requests based on the man path and compressed files. That's more than `groff' does. @@ -94,17 +82,14 @@ ####### License -Last update: 5 Jan 2009 - -Copyright (C) 2003, 2004, 2005, 2006, 2009 - Free Software Foundation, Inc. +Copyright (C) 2003-2014 Free Software Foundation, Inc. Written by Bernd Warken . This file is part of `groffer', which is part of `groff'. `groff' is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or +the Free Software Foundation, either version 2 of the License, or (at your option) any later version. `groff' is distributed in the hope that it will be useful, but WITHOUT @@ -113,7 +98,8 @@ for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see . +along with this program. If not, see +. ####### Emacs settings diff -ruN groff-1.22.2/contrib/groffer/README_PERL groff-1.22.3/contrib/groffer/README_PERL --- groff-1.22.2/contrib/groffer/README_PERL 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/README_PERL 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,49 @@ +README_PERL + +`groffer' is written in the programming language Perl. + + +Compatibility + +It was written in Linux, but due to Free Software under GNU it is +available for each operating system. + +For testing, `groffer.pl' may be used directly without a Makefile. By +`make', this file will be transformed into the file `groffer' that will +be installed. + + +Temporary files + +The `file' and `so' temporaries are numbered and the files with .so +request are copied. All .so requests are handled; this is an +extension to `man' that deals only with the first .so request. + + +####### License + +Copyright (C) 2003-2014 Free Software Foundation, Inc. +Written by Bernd Warken . + +This file is part of `groffer', which is part of `groff'. + +`groff' is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 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: diff -ruN groff-1.22.2/contrib/groffer/roff2.man groff-1.22.3/contrib/groffer/roff2.man --- groff-1.22.2/contrib/groffer/roff2.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/groffer/roff2.man 2014-11-04 09:38:35.478520834 +0100 @@ -1,81 +1,65 @@ -.ig -roff2@ROFF2MODE@.1 - man page for roff2@ROFF2MODE@ (section 1). - -Source file position: /contrib/groffer/roff2.man -Installed position: $prefix/share/man/man1/roff2@ROFF2MODE@.1 - -Last update: 5 Jan 2009 -Simplified to use .SY/.OP/.YS -.. +.TH roff2@ROFF2MODE@ @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +roff2@ROFF2MODE@ \- transform roff code into @ROFF2MODE@ mode . +.\" roff2@ROFF2MODE@.1 - man page for roff2@ROFF2MODE@ (section 1). . -.de au -This file was written by Bernd Warken . -.. +.\" Source file position: /contrib/groffer/roff2.man +.\" Installed position: $prefix/share/man/man1/roff2@ROFF2MODE@.1 . . -.de co -Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- . -.P -This file is part of -.IR \%groffer , -which is part of -.IR \%groff , -a free software project. -. -You can redistribute it and/or modify it under the terms of the -.nh -.B "GNU General Public License" -.hy -as published by the -.nh -.BR "Free Software Foundation" , -.hy -either version\~2, or (at your option) any later version. +.de co +Copyright \[co] 2006-2014 Free Software Foundation, Inc. + +This file is part of groffer, which is part of GNU groff, a free +software project. + +You can redistribute it and/or modify it under the terms of the GNU +General Public License version 2 (GPL2) as published by the Free +Software Foundation. + +The license text is available in the internet at +.UR http://www.gnu.org/licenses/gpl-2.0.html +.UE . +.. . -.P -You should have received a copy of the \f[CR]GNU General Public -License\f[] along with -.IR groff , -see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top -directory of the -.I groff -source package. -. -Or read the -.I man\~page -.BR gpl (1). -You can also write to the -.nh -.B "Free Software Foundation, 51 Franklin St - Fifth Floor, Boston," -.BR "MA 02110-1301, USA" . -.hy +.de au +This file was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . .. . +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- . -.TH roff2@ROFF2MODE@ @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -roff2@ROFF2MODE@ \- transform roff code into @ROFF2MODE@ mode +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL . . .\" -------------------------------------------------------------------- .SH "SYNOPSIS" +.\" -------------------------------------------------------------------- . .SY roff2@ROFF2MODE@ -.RI [ \%groffer_option .\|.\|.\&] +.OP \& "\%groffer_option \*(EL" .OP \-\- -.RI [ \%filespec .\|.\|.\&] +.OP \& "\%filespec \*(EL" +.YS . .SY roff2@ROFF2MODE@ -.B \-h -| -.B \-\-help +.BR \-h | \-\-help +.YS . .SY roff2@ROFF2MODE@ -.B \-v -| -.B \-\-version +.BR \-v | \-\-version .YS . .P @@ -229,15 +213,13 @@ . . .\" -------------------------------------------------------------------- -.SH "AUTHOR" -.\" -------------------------------------------------------------------- -.au -. -. -.\" -------------------------------------------------------------------- .SH "COPYING" .\" -------------------------------------------------------------------- .co +.\" -------------------------------------------------------------------- +.SH "AUTHOR" +.\" -------------------------------------------------------------------- +.au . . .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/contrib/groffer/roff2.pl groff-1.22.3/contrib/groffer/roff2.pl --- groff-1.22.2/contrib/groffer/roff2.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/roff2.pl 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,230 @@ +#! /usr/bin/env perl + +# roff2* - transform roff files into other formats + +# Source file position: /contrib/groffer/roff2.pl +# Installed position: /bin/roff2* + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 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 +# . + +######################################################################## + +require v5.6; + +use strict; +use warnings; +use File::Spec; + +# temporary dir and files +use File::Temp qw/ tempfile /; + +my $Dev_Null = File::Spec->devnull(); +my $Mode; +my $Name; +{ + my ($v, $d); + ($v, $d, $Name) = File::Spec->splitpath($0); + die "wrong program name: $Name;" + if $Name !~ /^roff2[a-z]/; +} +$Mode = $Name; +$Mode =~ s/^roff2//; + +my $Groff_Version = `groff --version 2>$Dev_Null`; +die "$Name error: groff does not work;" if $?; +my $Groffer_Version = `groffer --version 2>$Dev_Null`; +my $Has_Groffer = ! $?; + +if ($Has_Groffer) { + foreach (@ARGV) { + last if $_ eq '--'; + next if $_ eq '-'; + if ($_ eq '-v' || '--version' =~ m|^$_|) { + print $Name, ' in ', $Groffer_Version; + exit 0; + } + if ($_ eq '-h' || '--help' =~ m|^$_|) { + &usage_with_groffer(); + exit 0; + } + } + system('groffer', '--to-stdout', "--$Mode", @ARGV); + exit $?; +} else { + my @filespec; + my $double_minus; + foreach (@ARGV) { + if ($double_minus) { + push @filespec, $_; + next; + } + if ($_ eq '--') { + $double_minus = 1; + next; + } + if ($_ eq '-') { + push @filespec, '-'; + next; + } + if ($_ eq '-v' || '--version' =~ m|^$_|) { + print $Name, ' in ', $Groff_Version; + exit 0; + } + if ($_ eq '-h' || '--help' =~ m|^$_|) { + &usage_without_groffer(); + exit 0; + } + if ($_ =~ /^-/) { + &error_no_groffer(); + &error_no_options(); + next; + } + if (-f && -r) { + push @filespec, $_; + } else { + &error_no_groffer(); + print STDERR "$_ is not an existing, readable file.\n"; + } + } + + @filespec = ('-') unless @filespec; + my $has_stdin; + foreach (@filespec) { + if ($_ eq '-') { + $has_stdin =1; + last; + } + } + + if ($has_stdin) { + my $tempdir; + foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, + $ENV{'TEMP'}, $ENV{'TEMPDIR'}, + File::Spec->catfile($ENV{'HOME'}, 'tmp')) { + if ($_ && -d $_ && -w $_) { + $tempdir = $_; + last; + } + } + my $template = $Name . '_XXXX'; + my ($fh, $stdin); + if ($tempdir) { + ($fh, $stdin) = tempfile($template, UNLINK => 1, DIR => $tempdir) || + die "$Name: could not create temporary file;"; + } else { + ($fh, $stdin) = tempfile($template, UNLINK => 1) || + die "$Name: could not create temporary file;"; + } + open $fh, ">$stdin"; + print $fh $_ foreach ; + + foreach (@filespec) { + $_ = $stdin if $_ eq '-'; + } + } # if $has_stdin + + my $grog; + my $groff_options = "-T$Mode"; + $groff_options = '-TX75-12 -Z' if $Mode eq 'x'; + $groff_options = '-Tlatin1' if $Mode eq 'text'; + if ($Mode eq 'pdf') { + my $ps2pdf; + my @path = File::Spec->path(); + foreach (@path) { + my $file = File::Spec->catfile($_, 'ps2pdf'); + if (-f $file && -x $file) { + $ps2pdf = "$file -"; + last; + } + } + unless ($ps2pdf) { + foreach (@path) { + my $file = File::Spec->catfile($_, 'gs'); + if (-f $file && -x $file) { + $ps2pdf = $file . ' -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite ' . + '-sOutputFile=- -c save pop -f -'; + last; + } + } + } + $grog = `grog -Tps @filespec`; + chomp $grog; + system("$grog | $ps2pdf"); + exit $?; + } else { + $grog = `grog $groff_options @filespec`; + chomp $grog; + system($grog); + exit $?; + } +} + +my $error_no_groffer; +sub error_no_groffer { + return 1 if $error_no_groffer; + $error_no_groffer = 1; + print STDERR "$Name: groffer is not available.\n"; +} + +my $error_no_options; +sub error_no_options { + return 1 if $error_no_options; + $error_no_groffer = 1; + print STDERR "$Name: groffer options are not allowed.\n"; +} + +sub usage_with_groffer { + print < - - * ChangeLog.0: This file is the former ChangeLog file of the - `groffer' versions 0.* consisting of a shell version only. Since - then the files have been moved to the subdirectory `shell' of the - `groffer' main directory. - -2006-10-05 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.31 - - * groffer2.sh: - - _make_pdf(): Fix argument of `obj'. - - to_tmp(): Add option -r to soelim to omit the .lf request. The - new global variable $_SOELIM_R stores the option if it is - available. Use numbers for the names of the `file' and `so' - temporary files, such that the information for each filespec - argument is kept for debug. New global variable $_FILE_NR. - - main_set_resources(): Remove `man' temporary files except for - debug - - man_get(): Change name in $_TMP_MANSPEC. - - man_is_man(): Change name in $_TMP_MANSPEC. Remove file in - $_TMP_MANPEC if empty. - - _do_display() of main_display(): Add check on empty mode file. - - * groffer.man: Filespec: Add information on the argument - handling of apropos. - - Remove the space characters at the end of line in all files. - -2006-10-03 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.30 - - * groffer2.sh: - - Correct spacing. - - main_do_fileargs(): Distribute special_filespec() in order to - get a better heading for `whatis'. - -2006-10-03 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.29 - - * groffer2.sh: - - --to-stdtout: New option to display the generated mode file - without graphical display. - - _get_prog_args() of main_set_mode(): Make argument upper case. - - usage(): Add --to-stdout, remove -Q, reorder --source. - - * groffer.man: - - Reorder the default viewers. - - Move `--source' to `groffer' options. - - Remove `-Q'. - - Add `--to-stdout'. - - Reconfigure the sections on filespec arguments. - - Remove information on wildcards. - -2006-10-01 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.28 - - * groffer.sh: - - Change all directories to end with `/'. - - In the state before the run of `make', make the script runnable - from each directory using $0 and `pwd'. - - * groffer2.sh: - - main_init(): Change the umask to 0077 to allow only access for - the file owner for the temporary files. This is done for security - reasons. - - version(): Put the whole output under `< - ________________________________________________________________ - * release of groffer 0.9.27 - - * Makefile.sub: Add Emacs setting at the end of the file. - - * TODO: Remove this file because it does not contain any actual - entries. - - * groffer2.sh: - - main_set_mode(): Remove too early test of modes on X. Fix pdf - mode. - - where_is_prog(): Fix this function to detect files in the - current directory. - - _get_prog_args() of main_set_mode(): Fix return; - - _get_first_prog() of main_set_mode(): Fix call of exit_test(). - - cat_z(): Make it a single function and add file test. - - whatis_setup(): Rename whatis_header(). Fix display title to - `whatis'. - - apropos_setup(): Fix display title to `apropos'. - - Globals: Fix this section in the description of several - functions. - - apropos_filespec(): Fix variable $s and the corresponding sed - call. - - man_setup(): Add $EXTENSION. - - _do_man_so() of to_tmp(): Fix variables. - - $_ALL_EXIT: Remove unused variable. - - $_TITLE_ELT: Remove unused variable. - - man_set_resources(): Fix setting of $_DISPLAY_ARGS. - - main_display(): Fix description. Remove $md_options. Let - $MANOPT override system variables. - -2006-09-16 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.26 - - ### Simplification of main_set_mode() - - * groffer2.sh: - - _get_first_prog() of main_set_mode(): Rewrite this function - such that it does not have an output, but set the variables - $_DISPLAY_PROG and $_DISPLAY_ARGS. - - _check_prog_on_list() of main_set_mode(): Rename and rewrite - _check_X_prog(). Suitable for being called for $_VIEWER__X - and $_VIEWER__TTY. No output, but set the variables - $_DISPLAY_PROG and $_DISPLAY_ARGS. - - _obj_set_vars() of main_set_mode(): Remove this function. It is - no longer necessary because its variables are set by the other - functions. - - _get_prog_args() of main_set_mode(): New function that - simplifies the loop in main_set_mode() and handles both - $_VIEWER__X and $_VIEWER__TTY. - - _process_mode() of main_set_mode(): Remove this function. - - main_set_mode(): Remove case for calling _process_mode(). In - the loop, use _get_prog_args() for simplification. - - main_parse_args(): Make ---viewer equivalent to - ---viewer-tty to make _process_mode() unnecessary. - - $_VIEWER_BACKGROUND: Start with `no'. - - ### Extend the documentation - - * groffer2.sh: - - Environment Variables: Add information on the naming of - variables in functions. - - $_ADDOPTS_POST, $_ADDOPTS_X: Remove these unused variables. - - apropos_setup(), apropos_setup (), base_name(), dir_name(), - echo1(), echo2(), func_check(), func_pop(), func_push(), - is_greater_than(), list_append(), list_from_split(), - _manpath_add_sys() of manpath_add_lang_sys(), rm_tree(), - special_filespec(), special_setup(), tmp_create(), to_tmp_line(), - usage(), version(), where_is_prog(), main_set_mode(): - Fix and extend the description. Many other function descriptions - were just fixed without being mentioned. - - landmark 7: man_*(): Add information on the search of `man' - pages. - - * groffer.man: - - GNU `man' option overview: Add --location, --no-location, and - --where. - - GNU `man' options: Add the GNU `man' long options that are - accepted by `groffer', but just ignored. - - MAN PAGE SEARCHING: Correct and extend this section. - - * TODO: - - Remove entry on function headers. - - Remove entry on GNU `man' options. - - Remove entry on search algorithm for `man' pages. - - ### Other fixes - - * groffer2.sh: - - man_get(): On `man' page search with given name and section - handle also files with extension when no files without extension - are found. - -2006-09-11 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.25 - - ### Version information - - * groffer2.sh: - - version(): Add groffer to the version information; replace the - call of `groff --version'. - - ### Configuration Files - - * groffer.sh: Fix the configuration handling by removing all - quotes. Arguments are ended by the end of the line. - - * groffer.man: Fix the section on the configuration files. - - ### Options - - * groffer2.sh: - - $_OPTS_GROFF_SHORT_NA: Add `-k' as new groff option. - - main_pars_args(): Add X options `--ft', `--bordercolor', - `--borderwidth'. - - usage(): Add `--debug-filenames'. Remove `*-viewer-tty'. - Correct first line after call of version(). - - main_parse_MANOPT(): Fix `-h', `-t', and `-u' as options without - argument. - - * groffer.man: - - Add documentation to `--fn', `--ft', `--bordercolor', - `--borderwidth'. - - Remove the `--*-viewer-tty' options. These options are still - supported by the groffer program, but they aren't needed any - more. - - ### soelim: Allow manpath and compressed files in .so requests, as - ### man does. - - * groffer2.sh: - - $_FILESPEC_IS_MAN: New variable for storing if a filespec is for - searching a man page. - - to_tmp(): Rewrite. For existing file as filespec argument, add - call of `soelim' with the corresponding `-I dir' before the call - of `grog'. For man paged, uncompress and store the files from .so - requests; replace the requests with the stored file names. - - _do_man_so() of to_tmp(): New function to handle the file of a - .so request. - - man_get(): For man pages without extension, add special search - strategy. - - * README: Add the .so handling to the Compatiblity section. - - ### Print file names debug - - * groffer2.sh: - - $_OPT_LOCATION: Replace this variable by - $_DEBUG_PRINT_FILENAMES. - - register_file(): Move file name printing and call to basename to - register_title(). - - _do_man_so() of to_tmp(): Add file name printing for man pages. - - ### modes - - * groffer2.sh: - - $_DEFAULT_MODES: New set of default modes in the sequence 'pdf', - 'html', 'ps', 'x', 'dvi', and 'tty'. That is done because the `x' - mode viewers `gxditview' and `xditview' are very bad programs. - - _make_pdf() of main_display(): If pdf format can not be - generated use Postscript mode (ps) instead for display. - - $_PDF_DID_NOT_WORK, $_PDF_HAS_PS2PDF, $_PDF_HAS_GS: New - variables for pdf mode to avoid several runs. - - $_VIEWER_TTY_TTY, $_VIEWER_TTY_X: Add these variables for the - viewers in tty mode. - - main_display(): Rewrite tty mode by using where_is_prog() to add - options to `less' from the command line. - - * groffer.man: - - Add this information. - - Adjust the viewers in `SEE ALSO'. - - ### Check viewer option for programs running in X Window - - * groffer2.sh: - - _check_X_prog() of main_set_mode(): New function for checking if - a program of a command line argument is in the list for X for this - mode. - - _get_first_prog() of main_set_mode(): Use where_is_prog(); - change the output to the same 3-element list as _check_X_prog(). - - _obj_set_vars() of main_set_mode(): New function for setting - some variables in several modes. Argument is the 3-element list - from _check_X_prog() or _get_first_prog(). - - _process_mode() of main_set_mode(): Remove part with - list_has_not_prog(). This is better done by _check_X_prog(). - - main_set_mode(): Use _check_X_prog() in different modes. - Correct several modes. Add reset of $_VIEWER_BACKGROUND at the - beginning of the loop of default modes. - - ### Allow man pages with space characters - - * groffer2.sh: - - man_is_man(): Fix grep calls. - - list_from_file(): New function that reads the lines of a file as - list elements. - - man_get(): Fix `case' applications by double-quoting all - variables. Use list_from_file() instead of setting with `cat'. - Add further tests. - - _do_man_so() of to_tmp(): Use list_from_file() instead of - setting with `cat'. - - ### Allow program names with space - - * groffer2.sh: - - is_prog(), is_not_program(): Change to exactly one argument with - possible spaces and arguments. Fix all calls. - - where_is_prog(): Change to exactly one argument. Change - variable prefix to `wip'. Rewrite it to support programs with - spaces and arguments. Return a list with 3 elements: the - program's directory, the program name, and the given arguments. - - main_display(): Correct tty mode. - - ### Further fixes - - * groffer2.sh: - - main_setup(): Fix func_check. - - clean_up(): Add variable to avoid several prints. - - where_is_prog(): Remove possible arguments from program - argument. - - obj_from_output(): As return value take the return value of the - called function. - - is_not_empty(): Rename of is_non_emtpy(). - - $_VIEWER_BACKGROUND: Rename $_VIEWER_TERMINAL and reverse its - values. - - list_has_prog(), list_has_not_prog(): Remove these functions, - they are no longer needed. - - * groffer.man: - - Add `--print' in OPTION OVERVIEW. - - Correct many entries with the non-breaking `\%' construct. - -2006-07-28 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.24 - - ### Extent long option abbreviation to abbreviations before each `-'. - - * groffer2.sh: - - list_from_cmdline_with_minus(): New function, the same as - list_from_cmdline() with multiple abbreviations around `-'. - - _search_abbrev(): Subfunction of list_from_cmdline_with_minus(). - - main_parse_args(): Use list_from_cmdline_with_minus() for - getting the double abbreviation, but keep main_parse_MANOPT() - to list_from_cmdline() for simple abbreviation of long options. - - For the debug test at the beginning, add the double abbreviation - functionality. - - * README_SH, groffer.man: Document the multiple set of - abbreviations by `-'. - - ### Fix handling of `--apropos*' and `--whatis' - - * groffer2.sh: - - apropos_filespec(): Fix handling of `/' and `.' in sed; add `\&' - at the beginning of each non-macro groff line in sed. - - main_parse_args(): Set $_MAN_OPT to `yes' if --whatis is called. - - main_do_fileargs(): Fix dealing with `apropos' for several - cases. - - apropos_*(), special_*(), whatis_*(): Add two different return - values. - - $_SPECIAL_SETUP: New variable to test whether apropos_setup() or - whatis_header() had been run. - - Add language locale to --whatis, the `whatis' program does not - support this. - - ### Handle several macro packages - - * groffer2.sh: - - $_MACROS: New variable to store the actual macro package. - - $_MACRO_PACKAGES: New variable for the full macro packages of - groff (man, mdoc, me, mm, mom, ms). - - to_tmp(): Add test for different macro packages. Ignore files - with a different one. - - main_do_fileargs(): Add different macro check before doing man - pages. - - ### Rewrite the man page search - - * groffer2.sh: - - $_MAN_SEC_CHARS, $_MAN_SEC_LIST: New variables from $_MAN_SEC. - Add these to man_setup(). - - man_get(): New function that finally gets the man page or man - pages for a filespec. Avoid double files. - - man_is_man(): New function that checks whether a name goes as - man page. - - manpath_add_lang_sys(): Fix handling of language addition for - short language names. - - main_parse_args(): Move handling of `-' to main_do_fileargs(). - - do_filearg(), man_do_filespec(), man_register_file(), - man_search_section(): Remove these functions. - - main_do_fileargs(): Rewrite this function together with - the removed functions. - - list_uniq(): New function to remove the multiple elements from a - list. - - ### Version handling. - - * version.sh: New file for $_PROGRAM_VERSION, $_LAST_UPDATE, and - $_GROFF_VERSION_PRESET. - - * groffer.sh: - - Add running of version.sh with `.'. - - Remove $_PROGRAM_VERSION and $_LAST_UPDATE. - - Run groffer2.sh with `.' instead of `exec'. This allows to have - groffer2.sh without executive access permission. - - Determine $_BEFORE_MAKE by @VERSION@, use this variable on more - places. - - * groffer2.sh: - - Remove executive access permission. - - version(): Write a version information without calling groff. - - * Makefile.sub: - - Add version.sh. Use $(INSTALL_DATA) instead of - $(INSTALL_SCRIPT) for version.sh and groffer2.sh. - - Add $(DESTDIR) to some elements of `sed' call in `groffer:'. - - ### viewers for different modes - - * groffer2.sh: - - $_VIEWER_HTML_X: Add `epiphany' as browser. - - $_VIEWER_PDF_X: Add `kpdf' and `evince' as pdf viewer for X. - Make `kpdf', `acroread', `evince', and `xpdf' the first automatic - pdf viewers for X because they support searching. Add `gpdf'. - - $_VIEWER_PS_X: Add `kpdf' and `evince' as ps viewer for X; make - `kpdf' the first automatic ps viewer for X because it supports - searching even for Postscript. - - ### pdf mode - - * groffer2.sh: - - _make_pdf() of main_display(): add `ps2pdf' as secondary - transformer. - - main_set_resources(): Allow setting of resolution for `xpdf' - only if option -z is not set for `xpdf'. - - ### Revise $_VIEWER_* - - * groffer2.sh: - - $_VIEWER__TTY: Add this variable to each mode even if it - is only empty. - - $_VIEWER__X: Rename $_VIEWER_ to this for each - mode. - - ### Other fixes - - * groffer2.sh: - - is_empty_file(): New function. - - obj_from_output(): Quote arguments by building a list. - - path_list(): Output path list with unique elements. - - where_is_prog(): Rename where_is(). Handle all file names - having a slash somewhere instead of only those that start with a - slash. - - $_REG_TITLE_LIST: Replace $_REGISTERED_TITLE and make it a - list. - - $_OPT_TITLE: Make it a list with at most 1 element. - - Remove double quotes in case patterns. - - _func_test(): For the function test at the beginning, add this - function for output check with $() construct. - - usage(): Add --shell. - - $_VIEWER_HTML_X: Add `firefox' and `mosaic'. - - list_get(): Remove this unused function. - - Fix func_check() calls in all functions. - - * groffer.sh: Adjust groff version to 19.3. - - * README: Add information list of the source files. - -2006-02-26 Claudio Fontana - - * Makefile.sub: Add DESTDIR to install and uninstall targets - to support staged installations. - -2005-09-14 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.23 - - ### Increase the speed for the search of man pages - - Run `find' on all man directories and ask this with `grep' instead - of scanning through many `ls'. - - * groffer2.sh: - - $_TMP_MAN: New variable with the name of the file that stores - the `find' of the man path. - - $_TMP_MANSPEC: New variable with the name of the file that - stores the man page file names for each filespec. - - man_setup(): Do the `find' of the man path with $_TMP_MAN. - - man_do_filespec(): Add creation of $_TMP_MANSPEC. - - man_search_section(): Rewrite it to use $_TMP_MANSPEC. - - * TODO: The demand on the increase of speed for man pages is now - removed. - - ### Increase speed by enhancement of debug - - * groffer.sh: $_BEFORE_MAKE: New variable that stores whether the - @...@ constructs are still available or already transformed by - `make'. - - * groffer2.sh: - - $_DEBUG_FUNC_CHECK: New debug variable that regulates the check - calls at the beginning and end of most functions done by the - functions func_(). By default, this is enabled before the - run of `make', and disabled after. $_DEBUG_STACKS and - $_DEBUG_USER_WITH_STACK enable this variable automatically. - - --debug-func: New option for setting $_DEBUG_FUNC_CHECK. - - usage(), main_parse_args(): Add information for --debug-func. - - func_(): Disable these functions if $_DEBUG_FUNC_CHECK is - not `yes'. - - * groffer.man: - - Add information on --debug-func. - - Move the sections on options for development to the end of - option processing. - - ### Fixes of man page search - - - man_search_section(): Repair it such that extensions do not - occur in the directory name. - - manpath_set_from_path(): Rewrite it. Add `.../MAN/...' - subdirectories additionally to `.../man/...'. - - manpath_add_lang_sys(): Rewrite it to overwrite _MAN_PATH by - systems parameter if any. Then _MAN_PATH is prepended by the - language part. - - _manpath_add_sys(): New subfunction of manpath_add_lang_sys() to - handle the systems part. - - man_search_section: Fix it to handle section names that have - more than one character (an extension). - - $_MAN_PATH: Now stores man path as a list. This is done in - man_setup() and manpath_set_from_path(), and used in - manpath_add_lang_sys(). - - $_MAN_SYS: Now stores man systems parameter as a list. This is - done in man_setup() and used in manpath_add_lang_sys(). - - $_MAN_SEC_DONE, $_MAN_SYS_DONE, $_MAN_LANG_DONE: Remove these - variables. - - ### Reorder the beginning of groffer2.sh - - * groffer2.sh: - - func_(): Move these functions to the functions in - alphabetical order. - - main_init(): Move "Test for compression" to this function. - - Move the "System Test" and function landmark() to the beginning - "Test of rudimentary shell functionality". Change landmarks 1 and - 2 to new positions. - - ### Fix the mode when not in X - - * groffer2.sh: - - main_parse_args(): Accept modes even when not in X, hoping for a - program given by option. Add $_OPT_VIEWER__TTY. Remove - $_VIEWER_TERMINAL. - - main_set_mode(): Add a section to set $_VIEWER_TERMINAL and move - the value of $_OPT_VIEWER__TTY to $_OPT_VIEWER_. When - not in X and no terminal programs are set remove $_OPT_MODE. All - unknown programs are treated as terminal programs. - - usage(): Comment out options ---viewer-tty. They exist - and are handled by `groffer', but they are no longer documented. - - $_OPT_VIEWER__TTY: New variables for option - ---viewer-tty. - - $_DEFAULT_MODE, $_VIEWER_: Change it from , separation to - a list. Rewrite _get_first_prog() of main_set_mode() to get - around with this. - - * groffer.man: Remove information on ---viewer-tty. - - ### Debug - - * groffer2.sh: - - $_DEBUG_PRINT_FILENAMES: New variable for printing the file - names that are displayed by `groffer'. - - --debug-filenames: The corresponding option. It is used in - man_register_file(), register_file(), and main_parse_args(). - - * groffer.man: Add information on --debug-filenames. - - ### Other changements - - * groffer2.sh: - - is_greater_than(): New function. Use it where suitable. - - lists_combine(): New function to combine several lists to a - single list. - - list_from_split(): Rewrite it to output a list with quoted - elements. - - list_has_prog(), list_has_not_prog(): New functions to check the - list on an element that starts with a given word. - - obj_from_output(): Use this function at many places instead of - `var="$(...)"'; this makes the usage of exit_test() unnecessary. - - path_clean(): Fix assignment. - - path_list(): Rename path_split(). - - tmp_create(): Add check of temporary file. - - usage(): Fix. - - * README_SH: - - Fix section `Error handling'. - - Add section `Speed'. - -2005-08-22 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.22 - - ### `--whatis' - - Produce a `groff' output and allow wild cards on filespec - parameters for `--whatis'. - - * groffer2.sh: - - $_FILESPEC_ARG: New variable for storing the actual filespec - parameter. - - main_do_fileargs(): Set $_FILESPEC_ARG and add - what_is_filespec(). - - main_parse_args(): Add --all to --whatis. - - to_tmp_line(): New function to write the arguments to the - temorary cat file. - - whatis_filename(): Rename of what_is(). Construct a better - printout using $_FILESPEC_ARG. Repair the sed sequneces. - - whatis_filespec(): New function to print the filespec once - during the `whatis' process. - - whatis_header(): New funtion for printing the header of the - `whatis' output. - - * groffer.man: Revise the documentation of --whatis. - - ### `--apropos*' - - Produce `groff' for `--apropos*'. Allow `--sections' for - `--apropos', ignore it with `--apropos-*'. - - * groffer2.sh: - - --apropos*: Make these options without argument. - - $_APROPOS_PROG: New variable for the program that is is used for - `apropos'. - - $_APROPOS_SECTIONS: New variable to determine the sections that - are filtered out of `apropos' output depending on `--apropos-*'. - - apropos_filespec(): Handling of apropos at the filespec level. - - apropos_run(): Remove it. - - apropos_setup(): New function. - - main_set_mode(): Remove handling of $_OPT_APROPOS*. - - * groffer.man: - - Revise the documentation of `--apropos*'. - - Split section 'options for GNU man' into two sections `options - for man pages' and `long options taken over from GNU man'. - - Move `--apropos*', `--whatis', `--man', and `--no-man' to - section `options for man pages'. - - ### special display (apropos and whatis) - - * groffer2.sh: - - special_setup(): New function that chooses the setup between - apropos and whatis. - - special_filespec(): New function that does the output at the - filespec level for apropos or whatis. - - ### handle `--sections' for man page searching - - * groffer2.sh: - - man_do_filespec(): Use $_OPT_SECTIONS of --sections instead of - $_MAN_AUTO_SEC if non-empty. If a section was given on the - filespec parameter $_OPT_SECTIONS is ignored. This differs from - `man' which always uses the restricted sections of --sections. - This function works for both normal man page search and whatis. - - apropos_filespec(): Use --sections for --apropos, but not for - --apropos-* because these provide already their own sections. - - ### wildcards in filespec arguments - - * groffer2.sh: Wildcards are now accepted. In `--apropos*' and - `--whatis' they are interpreted as wildcard search elements; but - in normal display they are only handled as their own character. - - ### development; new option - - * groffer2.sh: - - --print: New option that prints just its argument for parameter - check. - - usage(): Add new option. - - $_OPT_DO_NOTHING: New variable for do_nothing(). Handle it at - the end of main_parse_Args(). - - * groffer.man: Add information on --print. - - ### safe exit - - * groffer2.sh: - - error(): Always exit with $_ERROR. - - exit_test(): New function to exit when first exit was hidden by - (). Call it after each $(). - - ### automatic shell determination - - * groffer.sh: - - If no option --shell is given perform a test of several shells - to automatically start some shell for groffer2.sh. `ksh' is used - first because it can be safely terminated by Ctrl-C. - - This can be cancelled by providing --shell=''. - - Add test on `sed' program. - - * groffer.man: Revise information on --shell. - - ### trap - - * groffer2.sh: - - trap_set(): Remove argument. Instead of $_ALL_EXIT use only - signal 0. - - trap_unset(): Rename trap_clean(). Instead of $_ALL_EXIT use - only signal 0. - - $_ALL_EXIT: Remove this variable. - - Replace all direct `trap' calls by trap_set(). - - * README_SH: New section `Bugs' on `trap'.. - - ### user errors, error output without function stack - - * groffer2.sh: - - error_user(): New function for user errors. - - error(): Remove call of clean_up() because the trap will do it - with the exit. Remove the `kill' commands. Create a temporary - file `.error' that can be tested by exit_test() for a better exit - test (especially for shell `ksh'). - - $_DEBUG_USER_WITH_STACK: New variable to enable function stack - output in error_user(). - - list_from_cmdline(), list_single_from_abbrev(), main_set_mode(): - Use error_user(). - - ### test modes on X and tty - - * groffer2,sh: - - is_X(), is_not_X(): New functions for checking on X Window. - - $_VIEWER_HTML_TTY, $_VIEWER_HTML_X: New variables that split - $_VIEWER_HTML. Add `galeon'. - - main_parse_args(): Allow mode change for graphical modes only - when in X Window. - - _do_display() of main_display(): Create a special run for - viewers that run on the terminal; `lynx' is the only one so far. - - ### add $GROFFER_MODE to command line - - * groffer.sh: - - After the handling of the configuration files integrate - $GROFFER_OPT to the command line. - - This makes a `set' in the shell determination unnecessary. - - * groffer2.sh: - - The debug test gets simpler because quotes are vanished without - $GROFFER_OPT. - - main_parse_MANOPT(): Prepend $mpm_list to the command line. - - main_parse_args(): `set' is unnecessary. - - ### debug; new options - - * groffer2.sh: - - --debug-all, --debug-lm, --debug-params, --debug-shell, - --debug-stacks, --debug-tmpdir, --debug-user: New options. - - --debug: Enable all debug variables except $_DEBUG_STACKS and - $_DEBUG_LM. By the new options the smallest abbreviation is now - `--debug'. - - $_DEBUG_STACKS: Rename $_DEBUG. - - $_DEBUG_PRINT_TMPDIR: New debug variable for printing the name - of the temporary directory in main_init(). - - $_OPT_DEBUG: Remove this variable because debug is handled at - the early part of the script. - - clean_up(): Enlarge $_DEBUG_KEEP_FILES to not deleting the - temporary directory. - - usage(): Move all development options on a section of its own. - - Move the test of rudimentary shell functionality at the - beginning of the script. Add test on `sed'. - - Follow this by the debug section. The determination of all - --debug* options can be done without a function. - - * groffer.man: Revise information on --debug and add new options. - - ### variables - - * groffer.sh: - - $_ERROR: Move the definition of this variable here. - - $_GROFF_VERSION: New variable, is set over @...@ construct. - - $_OUTPUT_FILE_NAME: Move this variable to groffer2.sh. - - * groffer2.sh: - - $_MAN_AUTO_SEC_LIST: Rename $_MAN_AUTO_SEC because it represents - a list. - - $_MAN_AUTO_SEC_CHARS: New read-only variable for storing - $_MAN_AUTO_SEC_LIST in [] construct. Use it in man_do_filespec() - and whatis_filename(). - - $_SPACE_CASE: New read-only variable with [] on space characters - with \ for `case' patterns. Use it in several functions. - - $_SPACE_SED: New read-only variable with [] on space characters - for `sed'. Use it in several functions. - - ### options and display - - * groffer2.sh: - - list_from_cmdline(): Add test whether the same abbreviation is - part of long options with and without arguments. Give handling of - `=' a `case' pattern of its own. - - main_display(): Remove unnecessary calls of `clean_up' in order - to use `mozilla' without problems. In _do_display(): Fix -X by - providing a different process when $_DISPLAY_PROG is empty. - - main_set_mode(): Accept options for viewers as is, without check - for program. Add test whether no program is given for a mode. - This avoids unnecessary empty $_DISPLAY_PROG in main_display(). - - ### viewer programs that run on the terminal (tty); new options - - * groffer2.sh: - - $_VIEWER_TERMINAL: New variable that stores whether a viewer was - supposed to run on tty. - - --dvi-viewer-tty, --html-viewer-tty, --pdf-viewer-tty, - --ps-viewer-tty, --tty-viewer-tty, --X-viewer-tty, --x-viewer-tty, - --www-viewer-tty: New options for viewers that run on a terminal. - - main_parse_args(), _do_display() of main_display(): Use the new - options and the new variable. - - usage(): Add the new options. - - * groffer.man: Add information on options --*-viewer-tty. - - ### other fixes - - * groffer2.sh: - - _do_display() of main_display(): Bear errors of `groff' run. - - is_not_file: Fix to have exactly one argument. - - is_not_prog(): Handle no arguments. - - list_has_not(): Fix. - - main_do_fileargs(): Remove $mdfa_exitcode. - - register_title(): Limit title to 4 elements. - - version(): Print the version information to standard output just - like `groff' does. - - --no-special: New option to disable former calls of `--all', - `--apropos*', and `whatis. - - --title: Make it an option with argument. - -2005-08-07 Keith Marshall - - * contrib/groffer/Makefile.sub (install): Reference groffer2.sh - as $(srcdir)/groffer2.sh, so it will install when building in a - different directory from the source. - -2005-08-02 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.21 - - ### @...@ constructs - - * groffer.sh: - - $_AT: New variable for `@'. - - @...@: Replace the @...@ constructs by variables _AT_..._AT. - These constructs are transformed by `make' to useful information. - Keep all of these constructs in the first part of groffer.sh. For - a run before a `make' call, the script sets these variables to - special values for testing purpose. - - $_GROFFER_LIBDIR: Variable pointing to the groffer library - directory @libdir@/groff/groffer. - - ### Configuration files - - * groffer.sh: - - Add test for `$()' construct. - - Read and transform the configuration files and execute the - emerging commands. The `sed' script was heavily enlarged to - handle line with spaces and quotes. The emerging script is now - called by `eval', so no temporary file is needed. - - $_CONF_FILE_ETC, $_CONF_FILE_HOME: New variables for the config - files. - - $_SQ, $_SP: Move variables for characters before the handling of - the configuration files. Rename $_SQUOTE to $_SQ and $_SPACE to - $_SP. - - $GROFFER_OPT: Remove cleaning of this variable before the - reading of the configuration files. - - * groffer2.sh: - - main_init(): Remove the getting of the configuration files. - - ### Rewrite the shell determination - - * groffer.sh: - - Get rid of all functions in `groffer.sh'. Rewrite the shell - determination with `` and $(). - - --shell: Shortest abbreviation is `--sh'. Allow arguments for - the shell name. - - Allow an empty argument for --shell as shell name to overwrite a - specified shell; an empty shell name gets back to the default - shell. - - The shell determination now inludes the full handling of the - config files. The `--shell' option needs no longer a line - starting with `-'. - - ### Test of unset - - * groffer.sh: - - Remove test of `unset'. - - Remove all calls of `unset'. - - Use one character names for all variables that are meant to be - local in this script. - - * groffer2.sh: - - Move the test of `unset' to the testing of rudimentary shell - functionality without change. - - ### Allow abbreviations for long options - - * groffer2.sh: - - list_has_abbrev(): New function for checking a list having an - element with a given abbreviation. - - list_get_single_from_abbrev(): New function to retrieve the - element having a given abbreviation. - - list_from_cmd_line(): For an option abbreviation determine the - corresponding long option. - - From the man option lists remove the elements that are also in - a groffer list. - - Allow abbreviation for the early test of --debug. - - * groffer.sh: Allow abbreviation for the early test on --shell. - - get_opt_shell(): Rewrite _get_opt_shell() and the shell test - around it. - - test_on_shell(): Rename function _test_on_shell(). - - $_SHELL: global variable for the shell to run groffer2.sh. - - ### Get rid of `sh -c' - - * groffer2.sh: - - main_display(), _do_display(): Remove the `sh -c' calls. Make - the cleanup working without it. - - _do_display(): Extend _do_display() such that it can be used for - the pdf mode as well. - - _make_pdf(): New subfunction of main_display() for running the - additional parts of pdf mode in _do_display(). - - rm_file(), rm_file_with_debug(), rm_tree(): New functions for - removing files and directories. - - ### Change directory - - * groffer2.sh: - - $_START_DIR: New variable to store the directory at the starting - time of the script. - - main_display(): Go to the groffer temporary directory to be able - to process internal `groff' data like pictures. - - clean_up(): Get back to the starting directory. - - ### Compatibility with strange shells - - * groffer2.sh: - - clean_up(): `zsh' and `posh' had difficulties with `eval'. - - is_*(): Add test on empty argument. Some shells return true on - `test -d' etc. with empty argument, while most shells return - false. - - echo1(); New function to print single line `cat < - ________________________________________________________________ - * release of groffer 0.9.20 - - ### Split groffer.sh into two files groffer.sh and groffer2.sh. - - * groffer.sh: - - Remove the second part of this script. It is now in - groffer2.sh. - - $_GROFFER2_SH: New variable to point to the installed position - of `groffer2.sh'. This position is presented using @libdir@. - - * groffer2.sh: New script containing the second part of - groffer.sh. This script will be installed in the groffer library - directory @libdir@/groff/groffer, this might be - /usr/local/lib/groff/groffer/groffer2.sh for example. - - * Makefile.sub: - - `groffer': Add replacement of @libdir@. - - `install_data': Add the installation of the groffer library - directory and groffer2.sh. - - `uninstall_sub': Delete the installed `groffer2.sh' and the - groffer library directory. - - * README_SH: - - Remove the function list. - - Add argument options to the list of used commands. - - Documentation of the splitting of the script. - - Document the possible abbreviation of options. - -2005-07-07 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.19 - - * groffer.sh: extensions - - `mode x': Mode for the equivalent options `--x', `--mode x', - `--X' `--mode X', and the default mode. The default assumes a - resolution of 75 dpi. The default device for a resolution of 75 - dpi is `X75-12', the default device for a resolution of 100 dpi is - `X100'. The default geometry for the resolution of 100 dpi is set - to the width 800 dpi. - - `mode X': New mode for option -X only. - - `-V': Extent the `groff' output of -V by `groffer' specific - information (in main_display()). - - register_file(): Replace title `-' by `stdin'. - - $_DEBUG_KEEP_FILES: If set to `yes' the files in the temporary - directory are not deleted before the end trap. - - * groffer.sh: get `zsh' to work as well - - tmp_create(): Use `: >file' for generating an empty file. - - rmdir: Replace `rmdir' by `rm -f -r'. - - eval: Add `eval' to many commands with variable arguments. - - * groffer.sh: repair `debug' - - Print all debug output to stderr. - - $_FUNC_STACK: Built function call stack even when $_DEBUG is not - set. Now the arguments are not added. - - $_DEBUG: If set to `yes' print 3 call stack events: the function - that is added with its arguments is printed with `+++ ' - (func_push()); the call stack after the addition is printed with - `>>> ' (func_push()); the call stack after the removing is printed - with `<<< ' (func_pop()). - - error(): Always print the function call stack on errors. - - * groffer.sh: Corrections - - $_groffer_run: Rename to $_GROFFER_RUN. - - $unset: Rename to $_UNSET. - - Repair test of `unset'. - - Repair test for `--shell'. The script is now rerun under the - shell specified in the option argument. This can increase the - speed. - - * README_SH: `zsh' now works. - - * groffer.man: - - Reformulate the information for the `groffer' specific details - of option `-V'. - - Add information on the debug process. - - Add information on the default devices in `x mode'. - - Minor corrections. - -2005-07-01 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.18 - - * groffer.sh: further shell compatibility - - `echo': Remove options and possible options of `echo' by - preceding the argument with a character `x' that is removed by - `sed' or replace `echo' by `cat < - ________________________________________________________________ - * release of groffer 0.9.17 - - * groffer.sh: get rid of `local' in functions (it is not POSIX) - - Replace local variables by variable names with a special prefix - that is an abbreviation of the corresponding function name (quasi- - local variables). - - Unset the quasi-local function variables before returning. - - _t_e_s_t_f_u_n_c_(): Remove tests for local and global - variables. - - Add quasi-local variables for saving the content of - single-character variables. - - Remove some unused local and global variables. - - Several variables were forgotten to make local. They are now - made quasi-local. - - * groffer.sh: other corrections - - $return_var: New function (after `eval') for an arbitrary - return value. - - obj*(): Add return modes. - - Rewrite tests for `true' and `false'. - - Add function names to error calls where it was forgotten. - - `for': Replace `for x in "$@"' by `for x'. - - `set': Replace `set -- ...' by `set x ...; shift'. - - `sed': Replace `\|.*|s|...|...|' by `s|...|...|'. - - * README_SH: - - Add information on the removing of `local'. - - New section for non-POSIX shell restrictions. - -2005-06-20 Keith Marshall - - * README-SH: Information of `Portable shells' in info autoconf. - -2005-06-19 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.16 - - * groffer.sh: Place each `then', `else', and `do' on a line of its - own because some shells do not support the mixture mode. - - * groffer.man: Add section `BUGS'. - - * README_SH: - - Add compatibility information. - - Correct documentation for function arguments. - -2005-06-18 Keith Marshall - - * groffer.sh: $_NULL_DEV: Replace /dev/null by $_NULL_DEV which is - either /dev/null or NUL if /dev/null does not exist. - -2005-06-17 Zvezdan Petkovic - - * Makefile.sub: $(RM): Define it to `rm -f' because not all `make' - programs have it predefined. - -2005-06-16 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.15 - - * Makefile.sub: - - Use `$(RM)'. - - Use `sed -f $(SH_DEPS_SED_SCRIPT)'. - -2005-05-20 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.14 - - * groffer.man: correction of non-hyphenation - -2005-05-17 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.13 - - * groffer.sh: - - $_VIEWER_DVI: Add `kdvi'. - - $_VIEWER_PDF: Add `kghostview', `ggv', and `kpdf'. - - $_VIEWER_PS: Add `kghostview' and `ggv'. - - $_modefile: For the output file name, add extension .ps for ps - mode and .dvi for dvi mode. This exists already for the html and - pdf modes. - - Update some parts of the documentation. - - * README, README_SH: - - Move some parts on usage from README_SH to README. - - Reformulate several parts of both files. - - * groffer.man: update - -2005-05-14 Keith Marshall - - * groffer.sh: - - first line: Add space to `#! /bin/sh'. - -2004-11-15 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.12 - - * groffer.sh: - - main_init(): Rewriting of the creation of the temporary - directory to ensure that it cannot be made writable apart from the - user. If the directory already exists and cannot be removed then - append `X' to the directory name. - - is_non_empty_file(): fix it to use POSIX `test -s'. - - is_existing(): new function. - - POSIX `rm -f -r': use this in `clean_up()' and `main_init()'. - - `--macro-file': remove this unused long option. - - `-V', `--source', `--device': move these from groff options - to groffer options. - - `$_TMP_DIR_SUB': remove this unused variable. - -2004-06-15 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.11 - - * groffer.sh: - - To the search of the `--apropos-*' options, add man pages with a - subsection in their apropos output. - -2004-06-02 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.10 - - * groffer.sh: - - Remove automatic call of `ash' due to inconsistencies of - different ash versions. - - In the first run, add recognition of `--shell' lines in the - groffer configuration files. To configure an external shell in - a configuration file, a line starting with `--shell' is - necessary. - - list_from_cmdline(): Simplify the arguments. - - As $POSIXLY_CORRECT is internally set to `y' by some GNU - `/bin/sh' shells the following 2 fixes are necessary: - -- `sed': Empty patterns are not allowed with $POSIXLY_CORRECT - set; so move the address information before the `s' command to the - pattern after the command, and write `.*' to the address field. - -- list_from_cmdline(): Remove the strange $POSIXLY_CORRECT style - to finish the option processing after the first non-option - argument; use the flexible GNU mixing of options and file names - instead. - - * groffer.man: - - Remove any hints on `ash'. - - Add minus line behavior of `--shell' for configuration and add a - corresponding example. - - Update the information on $POSIXLY_CORRECT. - -2004-05-29 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.9 - - * groffer.sh: - Fix first run section to allow the starting shell to go on if - `ash' is not available. - - * groffer.man: - Remove unnecessary information on groffer version. - -2004-05-12 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.8 - - * groffer.sh: - Fix problems of `test' by adding subs to arguments. - - * groffer.man: - Write the file license as macros that are called in sections - AUTHOR and COPYING. - - * .cvsignore: - Restore this file. - -2004-04-30 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.7 - - * groffer.sh: - - obj(), obj_data(), obj_from_output(), obj_set(): New object - oriented functions to minimize complicated `eval' commands. - - list_*(): Corrections. - - usage(): Streamlining. - - * groffer.man, README_SH: - Corrections. - -2004-04-27 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.6 - - This version replaces the license of all files except ChangeLog of - the groffer source to the GNU General Public License (GPL) of the - version described in files COPYING and LICENSE in the groff top - source directory. - - * groffer.man: - Changement from the GNU Free Documentation License (FDL) to - the GNU General Public License (GPL). - - * README, README_SH, TODO: - Add license GNU General Public License (GPL). - - * Makefile.sub, groffer.sh: - Keep the GNU General Public License (GPL), but refer to the - COPYING and LICENSE files. - - * ChangeLog: Add a license in the style of Emacs ChangeLog file, - which is weaker than the GPL, but has its flavor. - -2004-04-24 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.5 - - This version is a rewrite of groffer in many parts, but it is kept - in the old single script style. - - Overview of new options: - --text, --mode text, --tty-viewer, - --X, --mode X, --X-viewer, --html, --mode html, --html-view, - --apropos-data, --apropos-devel, --apropos-progs - - New file: - /README_SH - - - ******* Extension of the `apropos' handling - - The output of man's `apropos' has grown immensely meanwhile, so it - has become inefficient. Now `groffer' provides new options to get - the a selected information from this output. - - * groffer.sh: - `--apropos-progs': new option for displaying only information - on programs (man page sections 1, 6, and 8) - `--apropos-data': new option for displaying only information - on documented data (man page sections 4, 5 and 7) - `--apropos-devel': new option for displaying only information - on development documentation (man page sections 2, 3 and 9) - `--apropos': still displays just the output of man's `apropos' - program. - - Specify all of these options as a single argument option; that - makes groffer's `--apropos' option slightly different because - the corresponding `man' option does not have arguments, but takes - all file arguments as apropos targets. So just ignore the `man' - options `-k' and `--apropos' in the parsing of $MANOPT. - - Exit after processing one `apropos' call. - - - ******* Quasi object oriented function arguments - - An object is the name of an environment variable. The value of - this variable contains the object's content. This allows to - specify function arguments and the calling syntax in a simpler way - by letting the first argument be a variable name, usable for input - or output. - - Such an object type is `list', the string value of a shell - variable arranged in space-separated single-quoted elements, such - as $GROFFER_OPT internally. - - * groffer.sh: - - Remove list_from_args(), list_element_from_arg() - list_from_lists(), list_length(), and list_prepend(). - They can be replaced by list_append(). - - All list*() functions are rearranged such that the first - argument is a list object, the name of a variable. - - - ******* Simplification of configuration files - - The new syntax of the groffer configuration files is - - all lines starting with a `-' character are interpreted as - command line options for all calls of groffer; they are collected - and prepended to the actual value of $GROFFER_OPT; optional - spaces at the beginning.of the line are omitted. - - all other lines are interpreted as a shell command and executed - in the current shell of the groffer call. - - Precedence: - - The command line and the external environment variables such as - $GROFFER_OPT of the groffer call have the highest precedence. - - This is overwritten by the configuration file in the user's home - directory. - - The system configuration file in /etc has the lowest - precedence. - - * groffer.sh: - The configuration files are now called after the determination of - the temporary files in main_init(). - - - ******* Script file name - - The file name of the script is needed for the several calls during - the search for the optimal shell. - - * groffer.sh: - - $_GROFFER_SH: replace $_this by $_GROFFER_SH and use $0 for - determining the file name of the script for the following calls, - instead of the cumbersome @BINDIR@ construction. - - Force the script to be called as an executable file, so $0 must - contain the program name. - - - ******* Improved temporary file names - - Just like groff, groffer mixes all file parameters into a single - output file. Its name is now constructed as a comma-separated - list built from the file name arguments without a leading comma. - So a leading comma can be used for the internal temporary file - names. - - * groffer.sh: - - $_OUTPUT_FILE_NAME: new global variable as basis for the output - file name; it is set in main_set_resources(). - - tmp_create(): use `,name' for temporary files different from - output file because the output file name does not start with a - comma. `$$' is not needed anymore. - - main_display(): simplification of $_modefile in _do_display() - and single display modes. - - Add extension `.html' to output file name in html mode. - - base_name(): correction for strange positions of `/'. - - - ******* Mode fixes - - * groffer.sh: - - Set the main default mode to `x' with groff's X Window viewer - `gxditview'. - - Allow 'x' and 'X' in `--mode' for the X Window mode; the same - for `--x' and `X', `--x-viewer' and `--X-viewer'. - - Make groff's `-X' equivalent to `mode X'. - - Fix `--auto', `--mode auto', and `--default-modes'. - - `html' mode: new mode equivalent to `www', add `konqueror' and - `lynx' as viewers. - - `pdf' mode: fix zoom options for pdf-viewer `xpdf' in - main_set_resources(); in main_display() fix the display structure. - - Set default X Window resolution to 75dpi. This is not optimal, - but with a higher value the options and resources for some viewers - must be optimized. - `--text' and `--mode text': new option for text output without a - pager. - - `--tty-viewer': new option equivalent to `--pager'. - - Correct the pagers for `tty' mode. - - Fix `groff' mode in main_set_resources() and main_display(). - - Harmonize `--mode arg' with the equivalent options `--arg'. - - - ******* Fixes for command line options - - * groffer.sh: - - list_from_cmdline(): fix the parsing of options with arguments. - - Rename $_OPT_TTY_DEVICE to $_OPT_TEXT_DEVICE. - - $_OPTS_X_*: new variables for the inhereted X Window variables. - - Improve the distribution of the command line options into - $_OPTS_GROFFER_*, $_OPTS_GROFF_*, $_OPTS_X_*, and $_OPTS_MAN_*. - - $_OPTS_MANOPT_*: new variables for the parsing of $MANOPT. - - Correct $_OPTS_CMDLINE_*. - - Remove some unused $_OPTS_*. - - `--iconic': new option from `-iconic' of the X Window toolkit. - - Correct `--rv' to an option without argument. - - Minor fixes of other X Window toolkit options. - - - ******* Other fixes - - * groffer.sh: - - is_prog(): allow 0 arguments. - - is_not_writable(): new function. - - is_*(): fix trailing return codes. - - Replace most `test' calls by is_*() functions. - - man_setup(): due to bugs in `manpath', prefer - manpath_set_from_path() for the determination of the man page path. - - man_search_section(): correction of some `for' loops. - - Remove export of external non-groffer variables. - - - ******* Documentation - - * groffer.man: - - Reorder the option details according to the option origin as - groffer, groff, X, and man options. - - Add the programming changes information mentioned above. - - Support man pages with a dot in their name - - * README_SH: new file - Move large parts of the documentation in `groffer.sh' into this - file. - - * groffer.sh: usage(): - - Change the output for `--help' to standard output. - - Restructure the information for this help output. - - - ******* Removement of the author's email address - - Because of the extreme spam attacks, the author removed all - occurencies of his email address in every file of the groffer - source. - -2003-01-22 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.4 - - * groffer.sh: corrections for some restrictive shells - - Possible exit codes in actual `ash' are between 0 and 63. To - handle even deeper restrictions, use 7 as maximal code instead - of 255 as replacement for error -1. - - Remove variables $_BAD2 and $_BAD3. - - Replace `trap' argument `EXIT' by 0 and write new fuctions - `trap_clean' and `trap_set' to handle the restrictions of `trap' - for some shells. - - Correct wrong $MANPATH to $_MAN_PATH in function - `man_do_filespec'. - - Test existence of directory before deleting it in the - `clean_up' definitions. - - Correct help output in `usage' (called by `--help'). - - * TODO: - Remove mention of `shoop' and `apropos'. - -2002-10-21 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.3 - - * groffer.sh: new temporary subdirectory - - Generate temporary subdirectory for storing temporary files - with better names in future groffer versions (name: - "groffer$$" in usual temporary directory). - - Use `umask 000' for temporary files to allow cleaning up - for everyone after a system break. - - Change both clean_up() functions (for normal shell and - for main_display() subshell) to handle the new subdirectory. - - clean_up_secondary() and $_TMP_PREFIX are unnecessary now, so - they were removed. - - * Makefile.sub: `sed' commands for "groffer:" - - Remove "@g@" entry (not used in "groffer.sh"). - - Add global replace for "@BINDIR@" and "@VERSION@" for future - usage. - - * TODO: think about... - - writing part of groffer in C/C++. - - handling several files with different macro packages. - -2002-10-17 Bernd Warken - ________________________________________________________________ - * fixes of groffer 0.9.2 - - * groffer.sh: - Terminate main_parse_MANOPT() if $MANOPT is empty or consists - of space characters only. - - * groffer.man: some fixes in "GROFFER OPTIONS" - - New macro ".Header_CB" for CB font in .TP headers; used for - definition of variables in option --mode. - - Fix some option references to refer to long options. - - * README: - New file for general information on the groffer source; it is - not installed. - -2002-10-14 Bernd Warken - - * Makefile.sub: - add replacement "@BINDIR@" to "$(bindir)" for "groffer:" - - * groffer.sh: - Define $_this as "@BINDIR@/${_PROGRAM_NAME}" to save the right - installation position of groffer for the special shell calling. - - * groffer.man: - Remove double definition of filespec parameters. - -2002-10-13 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.2 - - * groffer.sh: fixes - - Fix some 'sed' functions: two in func_stack_dump(), one in - base_name(), add 'sed' command in list_from_cmdline(). - - Finish main_parse_MANOPT() if $MANOPT is empty. - - Sort $_OPTS_GROFF_SHORT_NA like groff short options (but - unchanged). - - Fix some comments. - - * groffer.man: make it more readable (but no additions) - - A shortened section "SYNOPSIS" is followed by a simplified - section "DESCRIPTION". - - The options from "SYNOPSIS" go to new section "OPTION - OVERVIEW" with all groffer options in a single subsection. - - The details of all groffer options are described in section - "GROFFER OPTIONS". - - New macro for file names ".File_name". - - "Option Parsing" is moved to section "COMPATIBILITY". - - Fix some "EXAMPLES". - -2002-09-30 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.1 - - * TODO: remove done entries - - Remove request for different shells. - - Remove the 'sed' complaints. - -2002-07-15 Bernd Warken - - * groffer.sh: replace `sed' interface by direct `sed' - - This improves the performance of the shell programming parts - and shortens the groffer script by about 5%. - - Remove functions: string_del_append(), string_del_leading(), - string_del_trailing(), string_flatten(), string_get_before(), - string_get_leading(), string_replace_all(), string_sed_s(), - and their auxiliary functions. - - Replace all calls of these functions by direct `sed' commands. - - Define variables for special characters to ease `sed' calls. - - Remove `$APPEND'. - - Restrict list_from_string() to single character separators. - - Correct list_check() and base_name(). - - Add comments to all calls of `sed'. - - * groffer.sh: add run-time support for several shells - - New option `--shell': stop execution and rerun groffer under - the shell specified in the argument of `--shell'. - - If no shell was specified at run-time, `ash' is tried first; - if `ash' is not available continue with the shell with which - groffer was called from the command line, or with the shell - name in the first line of the script, actually `/bin/sh'. - -2002-07-12 Bernd Warken - ________________________________________________________________ - * fixes for groffer 0.9.0 - - * groffer.sh: enhance version information - `groffer -v|--version' now print: - - groffer's version number and date - - the string `is part of ' - - groff's version information (version number and copyright), - but not groff's `called subprograms' information. - - * groffer.sh: minor fixes - - Fix the argument parser to process argument `-' correctly. - - Some display programs have trouble with empty input; feed a - line consisting of a single space character in this case for - all display modes (not for source or groff modes). - - * TODO: - fix entry `shoop' (not 'shopt'). - -2002-06-28 Bernd Warken - ________________________________________________________________ - * release of groffer 0.9.0 - - * groffer.sh: new mode `pdf' - - PDF (Portable Document Format): - -> Transform groff `ps' output into pdf using `gs'. - -> Pro: PDF viewers provide text searching (!). - -> Con: the transformation is quite slow. - -> Not suitable as an auto mode. - - New options `--pdf', `--pdf-viewer', `--mode pdf'. - - Standard pdf viewers `xpdf' and `acroread'. - - For `xpdf', choose zoom `z 3' for 100 dpi, `z 2' for 75 dpi. - - * groffer.sh: support bzip2 decompression - - add test for `bzip2' with necessary options - - extend functions `catz()' and `save_stdin()'. - - * TODO - remove entry on `bzip' decompression (done). - - * groffer.man: - - Document new `pdf' features. - - Document new `bzip2' decompression. - - Fix documentation for `--auto-modes'. - - * groffer.sh: minor fixes - - Improve device tests in `tty' and `dvi' modes. - - Internally, map mode `auto' to '' to facilitate tests. - - Fix auto mode sequence to: `ps,x,tty' as was intended. - -2002-06-25 Bernd Warken - - * groffer.sh: - Fix `source' mode. - - * groffer.man: - Fix some indentations. - -2002-06-23 Bernd Warken - ________________________________________________________________ - * release of groffer 0.8 - - * Makefile.sub: add copyright section - - * groffer.man: - - Document the new options. - - Revise the documentation of the modes. - - Document the configuration files in new section `FILES'. - - Redesign section `EXAMPLES'. - - Remove documentation for `-W'. - - * groffer.sh: new debugging features - - Disabled by default; enabled by environment variables. - - Add landmark() to catch typos with quotes. - - Add a function call stack for suitable functions; implemented - as within the argument checker func_check(). - - This implies the need to provide `return' with some clean-up - facility; implemented as `eval "$_return_..."'. - - Add option `--debug' to enable debugging at run-time. - - Actually, the groffer script uses only shell builtins found - in `ash' (a subset of POSIX) and POSIX `sed' as the only - external shell utility. - - * groffer.sh: customization of viewers - - In `groff' mode, the groffer viewing facilities are disabled. - - The postprocessor option `-P' costumizes the viewer only in - some situations in the `groff' mode, so a new infrastructure - for viewer customization is necessary. - - Allow to specify arguments to the viewer programs specified - in `--*-viewer()'. - - Implement some of the essential X Toolkit resource options in - groffer, but with use a leading double minus. - -> `--bd': set border color. - -> `--bg', `--background': set background color. - -> `--bw': set border width. - -> `--display': set X display. - -> `--geometry': set size and position of viewer window. - -> `--fg', `--foreground': set foreground color. - -> `--ft', `--font': set font. - -> `--resolution': set X resolution in dpi. - -> `--title': set viewer window title. - -> `--xrm': set X resource. - - Remove misnamed option `--xrdb'. - - * groffer.sh: new mode structure - - New Postcript mode `ps' (`--ps'): - -> default viewers: gv,ghostview,gs_x11,gs; - -> `--ps-viewer' sets the Postscript viewer. - - New mode `www' (`--www') for displaying in a web browser: - -> default browsers: mozilla,netscape,opera,amaya,arena; - -> `--www-viewer' sets the web browser. - - New dvi mode (`--dvi'); default viewer `xdvi': - -> default viewers: xdvi,dvilx; - -> `--dvi-viewer' sets the dvi viewer. - - New mode `auto': - -> active if no other mode is given or by new option `--auto'; - -> selects from a sequence of modes that are tested until one - of them succeeds. - -> the default mode sequence is actually `ps', `x', `tty'. - -> `--default-modes' sets this mode sequence as a comma - separated string of program names, optionally each one - with arguments). - - New mode `groff': - -> process input like groff, ignore viewing options. - -> activated by new option `--groff'. - -> automatically active with one of `-V', `-X', `-Z'. - - Revise `tty' mode: - -> allow several text devices. - -> - - Reorganize the mode management: - -> new mode setting option `--mode'. - -> logically separate source, groff, and display modes. - -> intermediate output mode is now part of mode groff; remove - any special features around `-Z'. - - Update usage() to reflect the new option structure. - - * groffer.sh: add configuration files - - `/etc/groff/groffer.conf' system-wide configuration. - - `${HOME}/.groff/groffer.conf' user configuration. - - The configuration file are shell scripts for now; later - implementations can identify this from the `#! /bin/sh' line. - - * groffer.sh: new data structure `list': - - Implement a `list' data structure as a string consisting of - single-quoted elements, separated by a space character; - embedded single-quotes are escaped. - - * groffer.sh: new option parser based on `list': - - Write new option parser based on `list', compatible to both - POSIX getopts() and GNU getopt(). - - Long options are now available on GNU and non-GNU systems. - - Get rid of POSIX getopts() and GNU getopt(). - - the `-W--longopt' construct is now obsolete; remove it. - - add test/function for `unset'. - - Option strings are now implemented as `list's in order to - allow unusual characters in options. - - Parse $MANOPT first; translate essential arguments into - groffer options. - - * groffer.man: - - determine prompt length for `.Shell_cmd'* dynamically. - - naming scheme for static strings and registers changed to - `namespace:macro.variable'. - - -2002-06-16 Werner Lemberg - - * groffer.sh: - Implement man option `--ascii' by `-mtty-char'. - - -2002-05-31 Werner LEMBERG - - * groffer.man (@.Shell_cmd_width): - Increase to 4m (we use `sh#' as the prompt). - - -2002-05-31 Bernd Warken - ________________________________________________________________ - * release of groffer 0.7 - - * groffer.sh: remove incompatibilities with the `ash' shell: - - do not use `!command': - -> use `else' - -> write `_not_' equivalents for some functions - - do not use `[^]' in `case': - -> restructure some functions. - - only single-character names for loop variables: - -> spoils the paradigm of leading `_' for local variables. - - spurious trouble with `for i in ${var}': - -> use `eval set -- ${var}' and `for i in "$@"' - - do not change or use $IFS: - -> define new functions string_split() and `path_split()'. - -> result must be processed by `eval set --'. - -> solve conflicts with existing positional parameters. - - trouble with exporting external `$GROFF_*' variables: - -> hope that they were exported in the calling shell. - - not smart about additional blanks: - -> remove unnecessary white space. - - * groffer.sh: improve run-time speed: - - `ash' more than doubles the speed of `bash'. - - speed-up `man_setup()'. - - -2002-05-30 Werner Lemberg - - * groffer.man: - - remove some wrong `\:'. - - rename macro names that start with a `[' (clashes with refer). - - fix TP_header. - - -2002-05-28 Bernd Warken - ________________________________________________________________ - * release of groffer 0.6 - - This is almost a complete rewrite since groffer 0.5 . - ________________________________________________________________ - * Documentation - - * groffer.man: - - Apply the changes done in www.tmac (.URL and .MTO) - - Replace \fP by \f[]. - - Redesign and rewrite most macros. - - Include the documentation for the new features. - - Greatly enlarge section ENVIRONMENT - - Add examples. - - * TODO: - - Start a TODO file with several sections. - - * ChangeLog: - Due to the many changes, shorten and rearrange the entries - since groffer 0.5 . - ________________________________________________________________ - * Shell compatibility - - * groffer.sh: - - Due to possible conflicts in old BSD versions, `[]' was - replaced by `test'; the `test' options `-a' and `-o' were - replaced by multiple calls of `test'. - - Write interface to the `sed' command `s' to become - independent of the delimiter character. Rewrite all text - manipulating function to use this new scheme. The new - functions are named `string_*'. - - `tr' is not needed any longer, replaced by `sed'. - - `grep' is not needed any longer, mostly replaced by `case'. - - Revision of test for `getopt'. - - Remove `set -a'; explicitly export variables. - - The only external programs used are POSIX `sed' and the - fallback to `apropos'. All other program calls were - replaced by shell builtins and functions. - - ________________________________________________________________ - * Cosmetics - - * groffer.sh: - - Implement a prefix based naming scheme for local variables - and functions (OOP-like). - - Introduce variables for white space (better readability with - $IFS). - - Store the names of the processed filespecs into a variable - instead of a temporary file. - - Error-prone shell constructions were replaced by functions - with a simple interface. - - To avoid too long pipes, replace supercat() by do_fileargs(); - every input file is handled independently. - - ________________________________________________________________ - * New features: - - Add support for more X devices (e.g. X75-12 and X100-12). - - Add long option `--intermediate_output' to `-Z'. - - Make the options for mode selection clobber each other. - - Add option `--mode' with an argument having the following - values: - `X': force displaying in X, same as options `-X'; - `tty': display with a pager on text terminal; same as `--tty'; - `source', `default', `auto', etc. - - Make the handling of the X mode like in groff (e.g. -X -Tps). - - Make resolution for gxditview behave like groff (default - 75 dpi). - - Add environment variable $GROFFER_OPT to preset groffer - options. - - ________________________________________________________________ - * implement most of the functionality of GNU `man'. - - - Add all `man' long options to groffer. - - Add all `man' environment variables. - - Parse and use content of `$MANOPT'. - - The precedence of the options and environment variables - is regulated like in GNU `man'. - - Force the option `--manpath' to have a colon-separated - argument like GNU `man'. - - Support `man section name' calling convention. - - Remove all dependencies on `man -w'. - - * groffer.sh: - - Add the new features above. - - Rewrite the search algorithm for man pages. - - Remove searching with `man -w' (problems with space - characters in file names). - - Fix and complement usage(). - - The filespec parsers gets a function of its own do_manpage(). - - -2002-01-08 Bernd Warken - - * groffer 0.5 (beta) released - - * groffer.man: - - Fix hyphenation problems with macros describing options. - - Fix the handling of some `-' characters. - - Examples of shell commands now print in font CR instead of CB. - - Remove documentation for option `-X'. - - Add documentation for option `--dpi'. - - * groffer.sh: - - New method for creating temporary files, based on process - IDs. This is reliable enough and suitable for GNU and POSIX. - - Run gxditview in a new shell instantiation for having a clean - handling of the temporary files when running in the - background. - - Revision of the retrieving method for the window title. - - Empty input is now tolerated. - - Export the variables that are set before the call of `set -a'. - - Function usage() corrected and updated. - - Unnecessary stuff removed. - - Comments adjusted. - - Pass option `-X' to groff, i.e. force X output with 75 dpi. - - Implement option `--dpi' for setting the resolution for the X - viewer, which had already been documented in earlier versions. - -2002-01-07 Bernd Warken - - * groffer 0.4 (beta) released (as groff `contrib') - - * groffer.man: - - New features documented. - - Macros stream-lined. - - Section EXAMPLES added. - - * groffer.sh: - - System tests added/optimized. - - Speed/memory optimizations by defining some shell functions - alternatively depending on the text results. - - Use `gzip' for decompression instead of `zcat'. - - Signal handling added for clean exiting by `trap'. - - Temporary files exist only as long as necessary. - - Setup of path for man-pages moved after the option parsing. - - Fixed a bug in determining the path for man-pages. - - Fixed a bug in the handling of non-groffer options. - - * New features: - - New option --tty for forcing paging on text terminal. - - New option --no-man for disabling the man-page feature. - - Implement reserved POSIX -W feature to simulate long options. - - gxditview is now run as a background process. - -2002-01-05 Werner LEMBERG - - * Integrate groffer into groff's `contrib' tree. - - * Makefile: Replaced by... - Makefile.sub: New file. - - * groffer: Replaced by... - groffer.sh: New file. - - * groffer.man (OptDef): Add missing backslashes. - Update copyright. - -2001-12-15 Bernd Warken - - * groffer 0.3 (alpha) released (still stand-alone package). - - * GNU and POSIX are supported (POSIX without long options). - - * New options : --man, --mandb, --title, --xrdb - - * Support for command line arguments with embedded single space - characters (GNU only) . - - * Several search methods for man-pages when no `man -w' is - available ($MANPATH, mandb, a default path). - - * Language support for man-pages. - - * Recognize the following filespecs as man-page parameters: - man:name(section), man:name, name.section, name. - -2001-12-03 Bernd Warken - - * Stand-alone package for groffer 0.2 (alpha) created - Files: groffer, groffer.man, Makefile, TODO, ChangeLog - -2001-12-02 Bernd Warken - - * groffer 0.2 (alpha) program released. - - * Name changed from `groffview' to `groffer'. - - * Comments added. - - * Name changed from `groffview' to `groffer'. - - * Options harmonized with groff. - New options : -Q --source, -T --device, -X . - Other options known from groff are passed unchanged. - - * 100 dpi as default, 75 dpi only in emergency situations. - - * Bugs with temporary files fixed. - - * Code restructured and comments added. - -2001-11-28 Bernd Warken - - ***** groffview 0.1 (experimental) and groffview.man released - (predecessor of groffer, shell script) - - * Options : -h --help, -v --version - - * Search for man-pages based on $MANPATH - - * development of `groffview' shell script started - -2001-11-28 Bernd Warken - - ________________________________________________________________ - License - - Copyright (C) 2001,2002,2003,2004,2005,2006 - Free Software Foundation, Inc. - Written by Bernd Warken . - - Copying and distribution of this file, with or without - modification, are permitted provided the copyright notice and this - notice are preserved. - - This file is part of `groffer', which is part of the `groff' - project. - - - Emacs settings - - Local Variables: - mode: change-log - End: diff -ruN groff-1.22.2/contrib/groffer/shell/groffer2.sh groff-1.22.3/contrib/groffer/shell/groffer2.sh --- groff-1.22.2/contrib/groffer/shell/groffer2.sh 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/shell/groffer2.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,7312 +0,0 @@ -#! /bin/sh - -# groffer - display groff files - -# Source file position: /contrib/groffer/shell/groffer2.sh -# Installed position: /lib/groff/groffer/groffer2.sh - -# This file should not be run independently. It is called by -# `groffer.sh' in the source or by the installed `groffer' program. - -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - - -######################################################################## -# Test of rudimentary shell functionality -######################################################################## - -# Zsh is not Bourne compatible without the following: -if test -n "$ZSH_VERSION"; then - emulate sh - NULLCMD=: -fi - - -######################################################################## -# Test of `unset' -# -export _UNSET; -export _foo; -_foo=bar; -_res="$(unset _foo 2>&1)"; -if unset _foo >${_NULL_DEV} 2>&1 && \ - test _"${_res}"_ = __ && test _"${_foo}"_ = __ -then - _UNSET='unset'; - eval "${_UNSET}" _foo; - eval "${_UNSET}" _res; -else - _UNSET=':'; -fi; - - -######################################################################## -# Test of `test'. -# -if test a = a && test a != b && test -f "${_GROFFER_SH}" -then - :; -else - echo '"test" did not work.' >&2; - exit "${_ERROR}"; -fi; - - -######################################################################## -# Test of `echo' and the `$()' construct. -# -if echo '' >${_NULL_DEV} -then - :; -else - echo '"echo" did not work.' >&2; - exit "${_ERROR}"; -fi; -if test _"$(t1="$(echo te)" && - t2="$(echo '')" && - t3="$(echo 'st')" && - echo "${t1}${t2}${t3}")"_ \ - != _test_ -then - echo 'The "$()" construct did not work' >&2; - exit "${_ERROR}"; -fi; - - -######################################################################## -# Test of sed program; test in groffer.sh is not valid here. -# -if test _"$(echo xTesTx \ - | sed -n 's/^.\([Tt]e*x*sTT*\).*$/\1/p' \ - | sed 's|T|t|g')"_ != _test_ -then - echo 'The sed program did not work.' >&2; - exit "${_ERROR}"; -fi; - - -######################################################################## -# Test of `cat'. -# -if test _"$(echo test | cat)"_ != _test_ -then - error 'Test of "cat" command failed.'; -fi; - - -######################################################################## -# Test of function definitions. -# -_t_e_s_t_f_u_n_c_() -{ - return 0; -} - -_test_func() -{ - echo test; -} - -if _t_e_s_t_f_u_n_c_ 2>${_NULL_DEV} && \ - test _"$(_test_func 2>${_NULL_DEV})"_ = _test_ -then - :; -else - echo 'Shell '"${_SHELL}"' does not support function definitions.' >&2; - exit "${_ERROR}"; -fi; - - -######################################################################## -# landmark () -# -# Print to standard error as a debugging aid. -# -# Globals: $_DEBUG_LM -# -landmark() -{ - if test _"${_DEBUG_LM}"_ = _yes_ - then - echo "LM: $*" >&2; - fi; -} # landmark() - - -######################################################################## -# test for compression. -# -export _HAS_COMPRESSION; -export _HAS_BZIP; -if test _"$(echo 'test' | gzip -c -d -f - 2>${_NULL_DEV})"_ = _test_ -then - _HAS_COMPRESSION='yes'; - if echo 'test' | bzip2 -c 2>${_NULL_DEV} | bzip2 -t 2>${_NULL_DEV} \ - && test _"$(echo 'test' | bzip2 -c 2>${_NULL_DEV} \ - | bzip2 -d -c 2>${_NULL_DEV})"_ \ - = _test_ - then - _HAS_BZIP='yes'; - else - _HAS_BZIP='no'; - fi; -else - _HAS_COMPRESSION='no'; - _HAS_BZIP='no'; -fi; - - -######################################################################## -# debug - diagnostic messages -######################################################################## - -export _DEBUG_FUNC_CHECK; -if test _"${_BEFORE_MAKE}"_ = _yes_ -then - _DEBUG_FUNC_CHECK='yes'; -else - _DEBUG_FUNC_CHECK='no'; -fi; -_DEBUG_FUNC_CHECK='no'; # disable function checking -#_DEBUG_FUNC_CHECK='yes'; # enable function checking - -export _DEBUG_STACKS; -_DEBUG_STACKS='no'; # disable stack output in each function -#_DEBUG_STACKS='yes'; # enable stack output in each function - -export _DEBUG_USER_WITH_STACK; -_DEBUG_USER_WITH_STACK='no'; # disable stack dump in error_user() -#_DEBUG_USER_WITH_STACK='yes'; # enable stack dump in error_user() - -export _DEBUG_LM; -_DEBUG_LM='no'; # disable landmark messages -#_DEBUG_LM='yes'; # enable landmark messages - -export _DEBUG_GROG; -_DEBUG_GROG='no'; # disable grog output -#_DEBUG_GROG='yes'; # enable grog output - -export _DEBUG_KEEP_FILES; -_DEBUG_KEEP_FILES='no' # disable file keeping in temporary dir -#_DEBUG_KEEP_FILES='yes' # enable file keeping in temporary dir - -export _DEBUG_PRINT_PARAMS; -_DEBUG_PRINT_PARAMS='no'; # disable printing of all parameters -#_DEBUG_PRINT_PARAMS='yes'; # enable printing of all parameters - -export _DEBUG_PRINT_SHELL; -_DEBUG_PRINT_SHELL='no'; # disable printing of the shell name -#_DEBUG_PRINT_SHELL='yes'; # enable printing of the shell name - -export _DEBUG_PRINT_TMPDIR; -_DEBUG_PRINT_TMPDIR='no'; # disable printing of the temporary dir -#_DEBUG_PRINT_TMPDIR='yes'; # enable printing of the temporary dir - -export _DEBUG_PRINT_FILENAMES; -_DEBUG_PRINT_FILENAMES='no'; # disable printing of the found file names -#_DEBUG_PRINT_FILENAMES='yes'; # enable printing of the found file names - -# determine all --debug* options -case " $*" in -*\ --deb*|*\ --d*-*) - # --debug-* options - d=' --debug-all --debug-filenames --debug-func --debug-grog '\ -'--debug-not-func --debug-keep --debug-lm --debug-params '\ -'--debug-shell --debug-stacks --debug-tmpdir --debug-user '; - # non-debug options with scheme --d*-* - n=' --do-nothing --default-modes --dvi-viewer --dvi-viewer-tty '; - for i - do - case "$i" in - --deb|--debu|--debug) - _DEBUG_FUNC_CHECK='yes'; - # _DEBUG_STACKS='yes'; - _DEBUG_USER_WITH_STACK='yes'; - # _DEBUG_LM='yes'; - _DEBUG_GROG='yes'; - _DEBUG_KEEP_FILES='yes'; - _DEBUG_PRINT_PARAMS='yes'; - _DEBUG_PRINT_SHELL='yes'; - _DEBUG_PRINT_TMPDIR='yes'; - _DEBUG_PRINT_FILENAMES='yes'; - continue; - ;; - --d*-*) - # before `-' - b="$(echo x"$i" | sed 's/^x--\([^-]*\)-.*$/\1/')"; - # after `-' - a="$(echo x"$i" | sed 's/^x--[^-]*-\(.*\)$/\1/')"; - ;; - *) - continue; - ;; - esac; - case "$n" in - *\ --$b*-$a*) - continue; - ;; - esac; - case "$d" in - *\ --$b*-$a*) - case "$a" in - f|s) # double --debug-* options - continue; - ;; - esac; - # extract whole word of double abbreviation - s="$(cat <&2; -fi; - -if test _"${_DEBUG_PRINT_SHELL}"_ = _yes_ -then - if test _"${_SHELL}"_ = __ - then - if test _"${POSIXLY_CORRECT}"_ = _y_ - then - echo 'shell: bash as /bin/sh (none specified)' >&2; - else - echo 'shell: /bin/sh (none specified)' >&2; - fi; - else - echo "shell: ${_SHELL}" >&2; - fi; -fi; - - -######################################################################## -# Environment Variables -######################################################################## - -landmark "1: environment variables"; - -# Environment variables that exist only for this file start with an -# underscore letter. Global variables to this file are written in -# upper case letters, e.g. $_GLOBAL_VARIABLE; temporary variables -# start with an underline and use only lower case letters and -# underlines, e.g. $_local_variable. - -# [A-Z]* system variables, e.g. $MANPATH -# _[A-Z_]* global file variables, e.g. $_MAN_PATH -# _[a-z_]* temporary variables, e.g. $_manpath - -# Due to incompatibilities of the `ash' shell, the name of loop -# variables in `for' must be a single character. -# [a-z] local loop variables, e.g. $i - -# In functions, other writings are used for variables. As some shells -# do not support the `local' command a unique prefix in lower case is -# constructed for each function, most are the abbreviation of the -# function name. All variable names start with this prefix. -# ${prefix}_[a-z_]* variable name in a function, e.g. $msm_modes - - -######################################################################## -# read-only variables (global to this file) -######################################################################## - -# function return values; `0' means ok; other values are error codes -export _BAD; -export _GOOD; -export _NO; -export _OK; -export _YES; - -_GOOD='0'; # return ok -_BAD='1'; # return negatively, error code `1' -# $_ERROR was already defined as `7' in groffer.sh. - -_NO="${_BAD}"; -_YES="${_GOOD}"; -_OK="${_GOOD}"; - -# quasi-functions, call with `eval', e.g `eval "${return_ok}"' -export return_ok; -export return_good; -export return_bad; -export return_yes; -export return_no; -export return_error; -export return_var; -return_ok="func_pop; return ${_OK}"; -return_good="func_pop; return ${_GOOD}"; -return_bad="func_pop; return ${_BAD}"; -return_yes="func_pop; return ${_YES}"; -return_no="func_pop; return ${_NO}"; -return_error="func_pop; return ${_ERROR}"; -return_var="func_pop; return"; # add number, e.g. `eval "${return_var} $n' - - -export _DEFAULT_MODES; -_DEFAULT_MODES="'pdf' 'html' 'ps' 'x' 'dvi' 'tty'"; -export _DEFAULT_RESOLUTION; -_DEFAULT_RESOLUTION='75'; - -export _DEFAULT_TTY_DEVICE; -_DEFAULT_TTY_DEVICE='latin1'; - -# _VIEWER_* viewer programs for different modes constructed as lists -export _VIEWER_DVI_TTY; # viewer program for dvi mode in tty -export _VIEWER_DVI_X; # viewer program for dvi mode in X -export _VIEWER_HTML_TTY; # viewer program for html mode in tty -export _VIEWER_HTML_X; # viewer program for html mode in X -export _VIEWER_PDF_TTY; # viewer program for pdf mode in tty -export _VIEWER_PDF_X; # viewer program for pdf mode in X -export _VIEWER_PS_TTY; # viewer program for ps mode in tty -export _VIEWER_PS_X; # viewer program for ps mode in X -export _VIEWER_TTY_TTY; # viewer program for X/x mode in tty -export _VIEWER_TTY_X; # viewer program for X/x mode in X -export _VIEWER_X_TTY; # viewer program for X/x mode in tty -export _VIEWER_X_X; # viewer program for X/x mode in X -_VIEWER_DVI_TTY=""; -_VIEWER_DVI_X="'kdvi' 'xdvi' 'dvilx'"; -_VIEWER_HTML_TTY="'lynx' 'w3m'"; -_VIEWER_HTML_X="'konqueror' 'epiphany' 'mozilla-firefox' 'firefox' 'mozilla' \ -'netscape' 'galeon' 'opera' 'amaya' 'arena' 'mosaic'"; -_VIEWER_PDF_TTY=""; -_VIEWER_PDF_X="'kpdf' 'acroread' 'evince' 'xpdf -z 150' 'gpdf' \ -'kghostview --scale 1.45' 'ggv'"; -_VIEWER_PS_TTY=""; -_VIEWER_PS_X="'kpdf' 'kghostview --scale 1.45' 'evince' 'ggv' 'gv' \ -'ghostview' 'gs_x11,gs'"; -_VIEWER_TTY_TTY="'less -r -R' 'more' 'pager'"; -_VIEWER_TTY_X="'xless'"; -_VIEWER_X_TTY=""; -_VIEWER_X_X="'gxditview' 'xditview'"; - -# Search automatically in standard sections `1' to `8', and in the -# traditional sections `9', `n', and `o'. On many systems, there -# exist even more sections, mostly containing a set of man pages -# special to a specific program package. These aren't searched for -# automatically, but must be specified on the command line. -export _MAN_AUTO_SEC_LIST; -_MAN_AUTO_SEC_LIST="'1' '2' '3' '4' '5' '6' '7' '8' '9' 'n' 'o'"; -export _MAN_AUTO_SEC_CHARS; -_MAN_AUTO_SEC_CHARS='[123456789no]'; - -export _SPACE_SED; -_SPACE_SED='['"${_SP}${_TAB}"']'; - -export _SPACE_CASE; -_SPACE_CASE='[\'"${_SP}"'\'"${_TAB}"']'; - -export _PROCESS_ID; # for shutting down the program -_PROCESS_ID="$$"; - -export _START_DIR; # directory at start time of the script -_START_DIR="$(pwd)"; - - -############ the command line options of the involved programs -# -# The naming scheme for the options environment names is -# $_OPTS__[_] -# -# : program name GROFFER, GROFF, or CMDLINE (for all -# command line options) -# : LONG (long options) or SHORT (single character options) -# : ARG for options with argument, NA for no argument; -# without _ both the ones with and without arg. -# -# Each option that takes an argument must be specified with a -# trailing : (colon). - -# exports -export _OPTS_GROFFER_SHORT_NA; -export _OPTS_GROFFER_SHORT_ARG; -export _OPTS_GROFFER_LONG_NA; -export _OPTS_GROFFER_LONG_ARG; -export _OPTS_GROFF_SHORT_NA; -export _OPTS_GROFF_SHORT_ARG; -export _OPTS_GROFF_LONG_NA; -export _OPTS_GROFF_LONG_ARG; -export _OPTS_X_SHORT_ARG; -export _OPTS_X_SHORT_NA; -export _OPTS_X_LONG_ARG; -export _OPTS_X_LONG_NA; -export _OPTS_MAN_SHORT_ARG; -export _OPTS_MAN_SHORT_NA; -export _OPTS_MAN_LONG_ARG; -export _OPTS_MAN_LONG_NA; -export _OPTS_MANOPT_SHORT_ARG; -export _OPTS_MANOPT_SHORT_NA; -export _OPTS_MANOPT_LONG_ARG; -export _OPTS_MANOPT_LONG_NA; -export _OPTS_CMDLINE_SHORT_NA; -export _OPTS_CMDLINE_SHORT_ARG; -export _OPTS_CMDLINE_LONG_NA; -export _OPTS_CMDLINE_LONG_ARG; - -###### groffer native options - -_OPTS_GROFFER_SHORT_NA="'h' 'Q' 'v' 'V' 'X' 'Z'"; -_OPTS_GROFFER_SHORT_ARG="'T'"; - -_OPTS_GROFFER_LONG_NA="'auto' \ -'apropos' 'apropos-data' 'apropos-devel' 'apropos-progs' \ -'debug' 'debug-all' 'debug-filenames' \ -'debug-func' 'debug-not-func' 'debug-grog' 'debug-keep' 'debug-lm' \ -'debug-params' 'debug-shell' 'debug-stacks' 'debug-tmpdir' 'debug-user' \ -'default' 'do-nothing' 'dvi' 'groff' 'help' 'intermediate-output' 'html' \ -'man' 'no-location' 'no-man' 'no-special' 'pdf' 'ps' 'rv' 'source' \ -'text' 'to-stdout' 'text-device' 'tty' 'tty-device' \ -'version' 'whatis' 'www' 'x' 'X'"; - -_OPTS_GROFFER_LONG_ARG="\ -'default-modes' 'device' 'dvi-viewer' 'dvi-viewer-tty' 'extension' 'fg' \ -'fn' 'font' 'foreground' 'html-viewer' 'html-viewer-tty' 'mode' \ -'pdf-viewer' 'pdf-viewer-tty' 'print' 'ps-viewer' 'ps-viewer-tty' 'shell' \ -'title' 'tty-viewer' 'tty-viewer-tty' 'www-viewer' 'www-viewer-tty' \ -'x-viewer' 'x-viewer-tty' 'X-viewer' 'X-viewer-tty'"; - -##### groffer options inhereted from groff - -_OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'C' 'e' 'E' 'g' 'G' 'i' 'k' 'l' 'N' 'p' \ -'R' 's' 'S' 't' 'U' 'z'"; -_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'K' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \ -'w' 'W'"; -_OPTS_GROFF_LONG_NA=""; -_OPTS_GROFF_LONG_ARG=""; - -##### groffer options inhereted from the X Window toolkit - -_OPTS_X_SHORT_NA=""; -_OPTS_X_SHORT_ARG=""; - -_OPTS_X_LONG_NA="'iconic' 'rv'"; - -_OPTS_X_LONG_ARG="'background' 'bd' 'bg' 'bordercolor' 'borderwidth' \ -'bw' 'display' 'fg' 'fn' 'font' 'foreground' 'ft' 'geometry' \ -'resolution' 'title' 'xrm'"; - -###### groffer options inherited from man - -_OPTS_MAN_SHORT_NA=""; -_OPTS_MAN_SHORT_ARG=""; - -_OPTS_MAN_LONG_NA="'all' 'ascii' 'catman' 'ditroff' \ -'local-file' 'location' 'troff' 'update' 'where'"; - -_OPTS_MAN_LONG_ARG="'locale' 'manpath' \ -'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'"; - -###### additional options for parsing $MANOPT only - -_OPTS_MANOPT_SHORT_NA="'7' 'a' 'c' 'd' 'D' 'f' 'h' 'k' 'l' 't' 'u' \ -'V' 'w' 'Z'"; -_OPTS_MANOPT_SHORT_ARG="'e' 'L' 'm' 'M' 'p' 'P' 'r' 'S' 'T'"; - -_OPTS_MANOPT_LONG_NA="${_OPTS_MAN_LONG_NA} \ -'apropos' 'debug' 'default' 'help' 'html' 'ignore-case' 'location-cat' \ -'match-case' 'troff' 'update' 'version' 'whatis' 'where' 'where-cat'"; - -_OPTS_MANOPT_LONG_ARG="${_OPTS_MAN_LONG_NA} \ -'config_file' 'encoding' 'extension' 'locale'"; - -###### collections of command line options - -_OPTS_CMDLINE_SHORT_NA="${_OPTS_GROFFER_SHORT_NA} \ -${_OPTS_GROFF_SHORT_NA} ${_OPTS_X_SHORT_NA} ${_OPTS_MAN_SHORT_NA}"; -_OPTS_CMDLINE_SHORT_ARG="${_OPTS_GROFFER_SHORT_ARG} \ -${_OPTS_GROFF_SHORT_ARG} ${_OPTS_X_SHORT_ARG} ${_OPTS_MAN_SHORT_ARG}"; - -_OPTS_CMDLINE_LONG_NA="${_OPTS_GROFFER_LONG_NA} \ -${_OPTS_GROFF_LONG_NA} ${_OPTS_X_LONG_NA} ${_OPTS_MAN_LONG_NA}"; -_OPTS_CMDLINE_LONG_ARG="${_OPTS_GROFFER_LONG_ARG} \ -${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG} ${_OPTS_X_LONG_ARG}"; - - -######################################################################## -# read-write variables (global to this file) -######################################################################## - -export _ALL_PARAMS; # All options and file name parameters -export _ADDOPTS_GROFF; # Transp. options for groff (`eval'). -export _APROPOS_PROG; # Program to run apropos. -export _APROPOS_SECTIONS; # Sections for different --apropos-*. -export _DISPLAY_MODE; # Display mode. -export _DISPLAY_PROG; # Viewer program to be used for display. -export _DISPLAY_ARGS; # X resources for the viewer program. -export _FILE_NR; # number for temporary `,file,*' -export _FILEARGS; # Stores filespec parameters. -export _FILESPEC_ARG; # Stores the actual filespec parameter. -export _FILESPEC_IS_MAN; # filespec is for searching a man page -export _FUNC_STACK; # Store debugging information. -export _MACRO_PACKAGES; # groff's macro packages. -export _MACRO_PKG; # Macro package for each found file. -export _NO_FILESPECS; # Yes, if there are no filespec arguments. -export _OUTPUT_FILE_NAME; # output generated, see main_set_res..() -export _REG_TITLE_LIST; # Processed file names. -export _SOELIM_R; # option -r for soelim -export _SPECIAL_FILESPEC; # Filespec ran for apropos or whatis. -export _SPECIAL_SETUP; # Test on setup for apropos or whatis. -export _VIEWER_BACKGROUND; # viewer shall be run in the background or not -# _MAN_* finally used configuration of man searching -export _MAN_ALL; # search all man pages per filespec -export _MAN_ENABLE; # enable search for man pages -export _MAN_EXT; # extension for man pages -export _MAN_FORCE; # force file parameter to be man pages -export _MAN_IS_SETUP; # setup man variables only once -export _MAN_LANG; # language for man pages -export _MAN_LANG2; # language for man pages -export _MAN_PATH; # search path for man pages as a list -export _MAN_SEC; # sections for man pages; sep. `:' -export _MAN_SEC_CHARS; # sections for man pages as [] construct -export _MAN_SEC_LIST; # sections for man pages as a list -export _MAN_SYS; # system names for man pages as a list -# _MANOPT_* as parsed from $MANOPT -export _MANOPT_ALL; # $MANOPT --all -export _MANOPT_EXTENSION; # $MANOPT --extension -export _MANOPT_LANG; # $MANOPT --locale -export _MANOPT_PATH; # $MANOPT --manpath -export _MANOPT_PAGER; # $MANOPT --pager -export _MANOPT_SEC; # $MANOPT --sections -export _MANOPT_SYS; # $MANOPT --systems -# variables for mode pdf -export _PDF_DID_NOT_WORK; -export _PDF_HAS_GS; -export _PDF_HAS_PS2PDF; -# _OPT_* as parsed from groffer command line -export _OPT_ALL; # display all suitable man pages -export _OPT_APROPOS; # call `apropos' program -export _OPT_BD; # set border color in some modes -export _OPT_BG; # set background color in some modes -export _OPT_BW; # set border width in some modes -export _OPT_DEFAULT_MODES; # `,'-list of modes when no mode given -export _OPT_DEVICE; # device option -export _OPT_DO_NOTHING; # do nothing in main_display() -export _OPT_DISPLAY; # set X display -export _OPT_EXTENSION; # set extension for man page search -export _OPT_FG; # set foreground color in some modes -export _OPT_FN; # set font in some modes -export _OPT_GEOMETRY; # set size and position of viewer in X -export _OPT_ICONIC; # -iconic option for X viewers -export _OPT_LANG; # set language for man pages -export _OPT_MODE; # values: X, tty, Q, Z, "" -export _OPT_MANPATH; # manual setting of path for man-pages -export _OPT_PAGER; # specify paging program for tty mode -export _OPT_RESOLUTION; # set X resolution in dpi -export _OPT_RV; # reverse fore- and background colors -export _OPT_SECTIONS; # sections for man page search -export _OPT_STDOUT; # print mode file to standard output -export _OPT_SYSTEMS; # man pages of different OS's -export _OPT_TITLE; # title for gxditview window -export _OPT_TEXT_DEVICE; # set device for tty mode -export _OPT_V; # groff option -V -export _OPT_VIEWER_DVI; # viewer program for dvi mode -export _OPT_VIEWER_HTML; # viewer program for html mode -export _OPT_VIEWER_PDF; # viewer program for pdf mode -export _OPT_VIEWER_PS; # viewer program for ps mode -export _OPT_VIEWER_X; # viewer program for x mode -export _OPT_WHATIS; # print the man description -export _OPT_XRM; # specify X resource -export _OPT_Z; # groff option -Z -# _TMP_* temporary directory and files -export _TMP_DIR; # groffer directory for temporary files -export _TMP_CAT; # stores concatenation of everything -export _TMP_MAN; # stores find of man path -export _TMP_MANSPEC; # filters man pages with filespec -export _TMP_STDIN; # stores stdin, if any - -# these variables are preset in section `Preset' after the rudim. test - - -######################################################################## -# Preset and reset of read-write global variables -######################################################################## - -# For variables that can be reset by option `--default', see reset(). - -_FILE_NR=0; -_FILEARGS=''; -_MACRO_PACKAGES="'-man' '-mdoc' '-me' '-mm' '-mom' '-ms'"; -_SPECIAL_FILESPEC='no'; -_SPECIAL_SETUP='no'; - -# _TMP_* temporary files -_TMP_DIR=''; -_TMP_CAT=''; -_TMP_MAN=''; -_TMP_CONF=''; -_TMP_STDIN=''; - -# variables for mode pdf -_PDF_DID_NOT_WORK='no'; -_PDF_HAS_GS='no'; -_PDF_HAS_PS2PDF='no'; - -# option -r for soelim -if : | soelim -r 2>${_NULL_DEV} >${_NULL_DEV} -then - _SOELIM_R='-r'; -else - _SOELIM_R=''; -fi; - -######################################################################## -# reset () -# -# Reset the variables that can be affected by options to their default. -# -reset() -{ - if test "$#" -ne 0 - then - error "reset() does not have arguments."; - fi; - - _ADDOPTS_GROFF=''; - _APROPOS_PROG=''; - _APROPOS_SECTIONS=''; - _DISPLAY_ARGS=''; - _DISPLAY_MODE=''; - _DISPLAY_PROG=''; - _MACRO_PKG=''; - _NO_FILESPECS=''; - _REG_TITLE_LIST=''; - - # _MAN_* finally used configuration of man searching - _MAN_ALL='no'; - _MAN_ENABLE='yes'; # do search for man-pages - _MAN_EXT=''; - _MAN_FORCE='no'; # first local file, then search man page - _MAN_IS_SETUP='no'; - _MAN_LANG=''; - _MAN_LANG2=''; - _MAN_PATH=''; - _MAN_SEC=''; - _MAN_SEC_CHARS=''; - _MAN_SEC_LIST=''; - _MAN_SYS=''; - - # _MANOPT_* as parsed from $MANOPT - _MANOPT_ALL='no'; - _MANOPT_EXTENSION=''; - _MANOPT_LANG=''; - _MANOPT_PATH=''; - _MANOPT_PAGER=''; - _MANOPT_SEC=''; - _MANOPT_SYS=''; - - # _OPT_* as parsed from groffer command line - _OPT_ALL='no'; - _OPT_APROPOS='no'; - _OPT_BD=''; - _OPT_BG=''; - _OPT_BW=''; - _OPT_DEFAULT_MODES=''; - _OPT_DEVICE=''; - _OPT_DISPLAY=''; - _OPT_DO_NOTHING='no'; - _OPT_EXTENSION=''; - _OPT_FG=''; - _OPT_FN=''; - _OPT_GEOMETRY=''; - _OPT_ICONIC='no'; - _OPT_LANG=''; - _OPT_MODE=''; - _OPT_MANPATH=''; - _OPT_PAGER=''; - _OPT_RESOLUTION=''; - _OPT_RV='no'; - _OPT_SECTIONS=''; - _OPT_SYSTEMS=''; - _OPT_STDOUT='no'; - _OPT_TITLE=''; - _OPT_TEXT_DEVICE=''; - _OPT_V='no'; - _OPT_VIEWER_DVI=''; - _OPT_VIEWER_PDF=''; - _OPT_VIEWER_PS=''; - _OPT_VIEWER_HTML=''; - _OPT_VIEWER_X=''; - _OPT_WHATIS='no'; - _OPT_XRM=''; - _OPT_Z='no'; - _VIEWER_BACKGROUND='no'; -} - -reset; - - -######################################################################## -# Preliminary functions for error handling -######################################################################## - -landmark "2: preliminary functions"; - -# These functions do not have a func-check frame. Basically they could be -# moved to the functions in alphabetical order. - -############## -# echo1 (*) -# -# Output to stdout with final line break. -# -# Arguments : arbitrary text including `-'. -# -echo1() -{ - cat <*) -# -# Output to stderr with final line break. -# -# Arguments : arbitrary text including `-'. -# -echo2() -{ - cat >&2 <"${_NULL_DEV}" 2>&1; - if test _${_DEBUG_KEEP_FILES}_ = _yes_ - then - if test _"$cu_already"_ = _yes_ - then - eval "${return_ok}"; - fi; - cu_already=yes; - echo2 "Kept temporary directory ${_TMP_DIR}." - else - if test _"${_TMP_DIR}"_ != __ - then - if test -e "${_TMP_DIR}" - then - rm -f -r "${_TMP_DIR}" >${_NULL_DEV} 2>&1; - fi; - fi; - fi; - eval "${return_ok}"; -} # clean_up() - - -############# -# diag (text>*) -# -# Output a diagnostic message to stderr. -# -diag() -{ - echo2 '>>>>>'"$*"; -} # diag() - - -############# -# error (*) -# -# Print an error message to standard error, print the function stack, -# exit with an error condition. The argument should contain the name -# of the function from which it was called. This is for system errors. -# -error() -{ - case "$#" in - 1) echo2 'groffer error: '"$1"; ;; - *) echo2 'groffer error: wrong number of arguments in error().'; ;; - esac; - func_stack_dump; - if test _"${_TMP_DIR}"_ != __ && test -d "${_TMP_DIR}" - then - : >"${_TMP_DIR}"/,error; - fi; - exit "${_ERROR}"; -} # error() - - -############# -# error_user (*) -# -# Print an error message to standard error; exit with an error condition. -# The error is supposed to be produced by the user. So the funtion stack -# is omitted. -# -error_user() -{ - case "$#" in - 1) - echo2 'groffer error: '"$1"; - ;; - *) - echo2 'groffer error: wrong number of arguments in error_user().'; - ;; - esac; - if test _"${_DEBUG_USER_WITH_STACK}"_ = _yes_ - then - func_stack_dump; - fi; - if test _"${_TMP_DIR}"_ != __ && test -d "${_TMP_DIR}" - then - : >"${_TMP_DIR}"/,error; - fi; - exit "${_ERROR}"; -} # error_user() - - - -############# -# exit_test () -# -# Test whether the former command ended with error(). Exit again. -# -# Globals: $_ERROR -# -exit_test() -{ - if test "$?" = "${_ERROR}" - then - exit ${_ERROR}; - fi; - if test _"${_TMP_DIR}"_ != __ && test -f "${_TMP_DIR}"/,error - then - exit ${_ERROR}; - fi; -} # exit_test() - - -######################################################################## -# Definition of normal Functions in alphabetical order -######################################################################## - -landmark "3: functions"; - -######################################################################## -# apropos_filespec () -# -# Compose temporary file for filspec. -# -# Globals: in: $_OPT_APROPOS, $_SPECIAL_SETUP, $_FILESPEC_ARG, -# $_APROPOS_PROG, $_APROPOS_SECTIONS, $_OPT_SECTIONS -# out: $_SPECIAL_FILESPEC -# -# Variable prefix: af -# -apropos_filespec() -{ - - func_check apropos_filespec '=' 0 "$@"; - if obj _OPT_APROPOS is_yes - then - if obj _SPECIAL_SETUP is_not_yes - then - error 'apropos_filespec(): apropos_setup() must be run first.'; - fi; - _SPECIAL_FILESPEC='yes'; - if obj _NO_FILESPECS is_yes - then - to_tmp_line '.SH no filespec'; - eval "${_APROPOS_PROG}" | sed 's/^/\\\&/' >>"${_TMP_CAT}"; - eval "${return_ok}"; - fi; - eval to_tmp_line \ - "'.SH $(echo1 "${_FILESPEC_ARG}" | sed 's/[^\\]-/\\-/g')'"; - exit_test; - if obj _APROPOS_SECTIONS is_empty - then - if obj _OPT_SECTIONS is_empty - then - s='^.*(..*).*$'; - else - s='^.*(['"$(echo1 "${_OPT_SECTIONS}" | sed 's/://g')"']'; - fi; - else - s='^.*(['"${_APROPOS_SECTIONS}"']'; - fi; -### apropos_filespec() - af_filespec="$(echo1 "${_FILESPEC_ARG}" | sed ' -s,/,\\/,g -s/\./\\./g -')"; - eval "${_APROPOS_PROG}" "'${_FILESPEC_ARG}'" | \ - sed -n ' -/^'"${af_filespec}"': /s/^\(.*\)$/\\\&\1/p -/'"$s"'/p -' | \ - sort |\ - sed ' -s/^\(.*(..*).*\) *- *\(.*\)$/\.br\n\.TP 15\n\.BR \"\1\"\n\\\&\2/ -' >>"${_TMP_CAT}"; - eval ${_UNSET} af_filespec; - eval "${return_ok}"; - else - eval "${return_bad}"; - fi; -} # apropos_filespec() - - -######################################################################## -# apropos_setup () -# -# Setup for the --apropos* options, just 2 global variables are set. -# -# Globals: in: $_OPT_APROPOS -# out: $_SPECIAL_SETUP, $_APROPOS_PROG -# -apropos_setup() -{ - func_check apropos_setup '=' 0 "$@"; - if obj _OPT_APROPOS is_yes - then - if is_prog apropos - then - _APROPOS_PROG='apropos'; - elif is_prog man - then - if man --apropos man >${_NULL_DEV} 2>${_NULL_DEV} - then - _APROPOS_PROG='man --apropos'; - elif man -k man >${_NULL_DEV} 2>${_NULL_DEV} - then - _APROPOS_PROG='man -k'; - fi; - fi; - if obj _APROPOS_PROG is_empty - then - error 'apropos_setup(): no apropos program available.'; - fi; - to_tmp_line '.TH GROFFER APROPOS'; - _SPECIAL_SETUP='yes'; - if obj _OPT_TITLE is_empty - then - _OPT_TITLE='apropos'; - fi; - eval "${return_ok}"; - else - eval "${return_bad}"; - fi; -} # apropos_setup() - - -######################################################################## -# base_name () -# -# Get the file name part of , i.e. delete everything up to last -# `/' from the beginning of . Remove final slashes, too, to get -# a non-empty output. The output is constructed according the shell -# program `basename'. -# -# Arguments : 1 -# Output : the file name part (without slashes) -# -# Variable prefix: bn -# -base_name() -{ - func_check base_name = 1 "$@"; - bn_name="$1"; - case "${bn_name}" in - */) - # delete all final slashes - bn_name="$(echo1 "${bn_name}" | sed 's|//*$||')"; - exit_test; - ;; - esac; - case "${bn_name}" in - '') - eval ${_UNSET} bn_name; - eval "${return_bad}"; - ;; - /) - # this is like `basename' does - echo1 '/'; - ;; - */*) - # delete everything before and including the last slash `/'. - echo1 "${bn_name}" | sed 's|^.*//*\([^/]*\)$|\1|'; - ;; - *) - obj bn_name echo1; - ;; - esac; - eval ${_UNSET} bn_name; - eval "${return_ok}"; -} # base_name() - - -######################################################################## -# cat_z () -# -# Decompress if possible or just print to standard output. -# gzip, bzip2, and .Z decompression is supported. -# -# Arguments: 1, a file name. -# Output: the content of , possibly decompressed. -# -cat_z() -{ - func_check cat_z = 1 "$@"; - case "$1" in - '') - error 'cat_z(): empty file name.'; - ;; - '-') - error 'cat_z(): for standard input use save_stdin().'; - ;; - esac; - if is_file "$1" - then - :; - else - error 'cat_z(): argument $1 is not a file.'; - fi; - if test -s "$1" - then - :; - else - eval "${return_ok}"; - fi; - if obj _HAS_COMPRESSION is_yes - then - if obj _HAS_BZIP is_yes - then - # test whether being compressed with bz2 - if bzip2 -t "$1" 2>${_NULL_DEV} - then - bzip2 -c -d "$1" 2>${_NULL_DEV}; - eval "${return_ok}"; - fi; - fi; - # if not compressed gzip acts like `cat' - gzip -c -d -f "$1" 2>${_NULL_DEV}; - else - cat "$1"; - fi; - eval "${return_ok}"; -} # cat_z() - - -######################################################################## -# clean_up () -# -# Do the final cleaning up before exiting; used by the trap calls. -# -# defined above - - -######################################################################## -# diag (*) -# -# Print marked message to standard error; useful for debugging. -# -# defined above - - -######################################################################## -landmark '4: dir_name()*'; -######################################################################## - -####################################################################### -# dir_name () -# -# Get the directory name of . The output is constructed -# according to the shell program `dirname'. -# -# Arguments : 1 -# Output : the directory part of -# -# Variable prefix: dn -# -dir_name() -{ - func_check dir_name = 1 "$@"; - obj_from_output dn_name dir_name_chop "$1"; - case "${dn_name}" in - ''|.) - echo1 '.'; - ;; - /) - echo1 '/'; - ;; - */*) - echo1 "$(echo1 "${dn_name}" | sed 's#/*[^/][^/]*$##')"; - ;; - *) - echo1 "${dn_name}"; - ;; - esac; - eval "${return_ok}"; -} # dir_name() - - -####################################################################### -# dir_name_append ( ) -# -# Append `name' to `dir' with clean handling of `/'. -# -# Arguments : 2 -# Output : the generated new directory name / -# -dir_name_append() -{ - func_check dir_name_append = 2 "$@"; - if is_empty "$1" - then - echo1 "$2"; - elif is_empty "$2" - then - echo1 "$1"; - else - dir_name_chop "$1"/"$2"; - fi; - eval "${return_ok}"; -} # dir_name_append() - - -######################################################################## -# dir_name_chop () -# -# Remove unnecessary slashes from directory name. -# -# Argument: 1, a directory name. -# Output: path without double, or trailing slashes. -# -# Variable prefix: dc -# -dir_name_chop() -{ - func_check dir_name_chop = 1 "$@"; - # replace all multiple slashes by a single slash `/'. - dc_res="$(echo1 "$1" | sed 's|///*|/|g')"; - exit_test; - case "${dc_res}" in - ?*/) - # remove trailing slash '/'; - echo1 "${dc_res}" | sed 's|/$||'; - ;; - *) - obj dc_res echo1 - ;; - esac; - eval ${_UNSET} dc_res; - eval "${return_ok}"; -} # dir_name_chop() - - -######################################################################## -# do_nothing () -# -# Dummy function that does nothing. -# -do_nothing() -{ - eval return "${_OK}"; -} # do_nothing() - - -######################################################################## -# echo1 (*) -# -# Print to standard output with final line break. -# -# defined above - - -######################################################################## -# echo2 (*) -# -# Print to standard error with final line break. -# -# defined above - - - -######################################################################## -# error (*) -# -# Print error message and exit with error code. -# -# defined above - - -######################################################################## -# exit_test () -# -# Test whether the former command ended with error(). Exit again. -# -# defined above - - -if test _"${_DEBUG_FUNC_CHECK}"_ = _yes_ -then - - ############# - # func_check ( "$@") - # - # This is called at the first line of each function. It checks the - # number of arguments of function and registers the - # function call to _FUNC_STACK. - # - # Arguments: >=3 - # : name of the calling function. - # : a relational operator: = != < > <= >= - # : number of arguments to be checked against - # "$@": the arguments of the calling function. - # - # Variable prefix: fc - # - func_check() - { - if test "$#" -lt 3 - then - error 'func_check() needs at least 3 arguments.'; - fi; - fc_fname="$1"; - case "$3" in - 1) - fc_nargs="$3"; - fc_s=''; - ;; - 0|[2-9]) - fc_nargs="$3"; - fc_s='s'; - ;; - *) - error "func_check(): third argument must be a digit."; - ;; - esac; -### func_check() - case "$2" in - '='|'-eq') - fc_op='-eq'; - fc_comp='exactly'; - ;; - '>='|'-ge') - fc_op='-ge'; - fc_comp='at least'; - ;; - '<='|'-le') - fc_op='-le'; - fc_comp='at most'; - ;; - '<'|'-lt') - fc_op='-lt'; - fc_comp='less than'; - ;; - '>'|'-gt') - fc_op='-gt'; - fc_comp='more than'; - ;; - '!='|'-ne') - fc_op='-ne'; - fc_comp='not'; - ;; -### func_check() - *) - error \ - 'func_check(): second argument is not a relational operator.'; - ;; - esac; - shift; - shift; - shift; - if test "$#" "${fc_op}" "${fc_nargs}" - then - do_nothing; - else - error "func_check(): \ -${fc_fname}"'() needs '"${fc_comp} ${fc_nargs}"' argument'"${fc_s}"'.'; - fi; - func_push "${fc_fname}"; - if test _"${_DEBUG_STACKS}"_ = _yes_ - then - echo2 '+++ '"${fc_fname} $@"; - echo2 '>>> '"${_FUNC_STACK}"; - fi; - eval ${_UNSET} fc_comp; - eval ${_UNSET} fc_fname; - eval ${_UNSET} fc_nargs; - eval ${_UNSET} fc_op; - eval ${_UNSET} fc_s; - } # func_check() - - - ############# - # func_pop () - # - # Retrieve the top element from the function stack. This is called - # by every return variable in each function. - # - # The stack elements are separated by `!'; the popped element is - # identical to the original element, except that all `!' characters - # were removed. - # - # Arguments: 1 - # - func_pop() - { - if test "$#" -ne 0 - then - error 'func_pop() does not have arguments.'; - fi; - case "${_FUNC_STACK}" in - '') - if test _"${_DEBUG_STACKS}"_ = _yes_ - then - error 'func_pop(): stack is empty.'; - fi; - ;; - *!*) - # split at first bang `!'. - _FUNC_STACK="$(echo1 "${_FUNC_STACK}" | sed 's/^[^!]*!//')"; - exit_test; - ;; - *) - _FUNC_STACK=''; - ;; - esac; - if test _"${_DEBUG_STACKS}"_ = _yes_ - then - echo2 '<<< '"${_FUNC_STACK}"; - fi; - } # func_pop() - - - ############# - # func_push () - # - # Store another element to the function stack. This is called by - # func_check() at the beginning of each function. - # - # The stack elements are separated by `!'; if contains a `!' - # it is removed first. - # - # Arguments: 1 - # - # Variable prefix: fp - # - func_push() - { - if test "$#" -ne 1 - then - error 'func_push() needs 1 argument.'; - fi; - case "$1" in - *'!'*) - # remove all bangs `!'. - fp_element="$(echo1 "$1" | sed 's/!//g')"; - exit_test; - ;; - *) - fp_element="$1"; - ;; - esac; - if test _"${_FUNC_STACK}"_ = __ - then - _FUNC_STACK="${fp_element}"; - else - _FUNC_STACK="${fp_element}!${_FUNC_STACK}"; - fi; - eval ${_UNSET} fp_element; - } # func_push() - - - ############# - # func_stack_dump () - # - # Print the content of the function stack. Ignore the arguments. - # - func_stack_dump() - { - diag 'call stack(): '"${_FUNC_STACK}"; - } # func_stack_dump() - -else # $_DEBUG_FUNC_CHECK is not `yes' - - func_check() { return; } - func_pop() { return; } - func_push() { return; } - func_stack_dump() { return; } - -fi; # test of $_DEBUG_FUNC_CHECK - - -######################################################################## -# get_first_essential (*) -# -# Retrieve first non-empty argument. -# -# Return : `1' if all arguments are empty, `0' if found. -# Output : the retrieved non-empty argument. -# -# Variable prefix: gfe -# -get_first_essential() -{ - func_check get_first_essential '>=' 0 "$@"; - if is_equal "$#" 0 - then - eval "${return_ok}"; - fi; - for i - do - gfe_var="$i"; - if obj gfe_var is_not_empty - then - obj gfe_var echo1; - eval ${_UNSET} gfe_var; - eval "${return_ok}"; - fi; - done; - eval ${_UNSET} gfe_var; - eval "${return_bad}"; -} # get_first_essential() - - -######################################################################## -landmark '5: is_*()'; -######################################################################## - -######################################################################## -# is_dir () -# -# Test whether `name' is a readable directory. -# -# Arguments : 1 -# Return : `0' if arg1 is a directory, `1' otherwise. -# -is_dir() -{ - func_check is_dir '=' 1 "$@"; - if is_not_empty "$1" && test -d "$1" && test -r "$1" - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_dir() - - -######################################################################## -# is_empty () -# -# Test whether is empty. -# -# Arguments : <=1 -# Return : `0' if arg1 is empty or does not exist, `1' otherwise. -# -is_empty() -{ - func_check is_empty '=' 1 "$@"; - if test _"$1"_ = __ - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_empty() - - -######################################################################## -# is_empty_file () -# -# Test whether is an empty existing file. -# -# Arguments : <=1 -# Return : -# `0' if arg1 is an empty existing file -# `1' otherwise -# -is_empty_file() -{ - func_check is_empty_file '=' 1 "$@"; - if is_file "$1" - then - if test -s "$1" - then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - fi; - eval "${return_no}"; -} # is_empty_file() - - -######################################################################## -# is_equal ( ) -# -# Test whether is equal to . -# -# Arguments : 2 -# Return : `0' both arguments are equal strings, `1' otherwise. -# -is_equal() -{ - func_check is_equal '=' 2 "$@"; - if test _"$1"_ = _"$2"_ - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_equal() - - -######################################################################## -# is_existing () -# -# Test whether is an existing file or directory. Solaris 2.5 does -# not have `test -e'. -# -# Arguments : 1 -# Return : `0' if arg1 exists, `1' otherwise. -# -is_existing() -{ - func_check is_existing '=' 1 "$@"; - if is_empty "$1" - then - eval "${return_no}"; - fi; - if test -f "$1" || test -d "$1" || test -c "$1" - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_existing() - - -######################################################################## -# is_file () -# -# Test whether is a readable file. -# -# Arguments : 1 -# Return : `0' if arg1 is a readable file, `1' otherwise. -# -is_file() -{ - func_check is_file '=' 1 "$@"; - if is_not_empty "$1" && test -f "$1" && test -r "$1" - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_file() - - -######################################################################## -# is_greater_than ( ) -# -# Test whether is greater than . -# -# Arguments : 2 -# Return : `0' if is a greater integer than , -# `1' otherwise. -# -is_greater_than() -{ - func_check is_greater_than '=' 2 "$@"; - if is_integer "$1" && is_integer "$2" && test "$1" -gt "$2" - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_greater_than() - - -######################################################################## -# is_integer () -# -# Test whether `string' is an integer. -# -# Arguments : 1 -# Return : `0' if argument is an integer, `1' otherwise. -# -is_integer() -{ - func_check is_integer '=' 1 "$@"; - if is_equal "$(echo1 "$1" | sed -n ' -s/^[0-9][0-9]*$/ok/p -s/^[-+][0-9][0-9]*$/ok/p -')" 'ok' - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_integer() - - -######################################################################## -# is_not_empty_file () -# -# Test whether is a non-empty existing file. -# -# Arguments : <=1 -# Return : -# `0' if arg1 is a non-empty existing file -# `1' otherwise -# -is_not_empty_file() -{ - func_check is_not_empty_file '=' 1 "$@"; - if is_file "$1" && test -s "$1" - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_not_empty_file() - - -######################################################################## -# is_not_dir () -# -# Test whether is not a readable directory. -# -# Arguments : 1 -# Return : `0' if arg1 is a directory, `1' otherwise. -# -is_not_dir() -{ - func_check is_not_dir '=' 1 "$@"; - if is_dir "$1" - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_dir() - - -######################################################################## -# is_not_empty () -# -# Test whether is not empty. -# -# Arguments : <=1 -# Return : `0' if arg1 exists and is not empty, `1' otherwise. -# -is_not_empty() -{ - func_check is_not_empty '=' 1 "$@"; - if is_empty "$1" - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_empty() - - -######################################################################## -# is_not_equal ( ) -# -# Test whether differs from . -# -# Arguments : 2 -# -is_not_equal() -{ - func_check is_not_equal '=' 2 "$@"; - if is_equal "$1" "$2" - then - eval "${return_no}"; - fi - eval "${return_yes}"; -} # is_not_equal() - - -######################################################################## -# is_not_file () -# -# Test whether is a not readable file. -# -# Arguments : 1 (empty allowed) -# -is_not_file() -{ - func_check is_not_file '=' 1 "$@"; - if is_file "$1" - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_file() - - -######################################################################## -# is_not_prog () -# -# Verify that is not a command in $PATH. -# -# Arguments : 1, can have spaces and arguments. -# -is_not_prog() -{ - func_check is_not_prog '=' 1 "$@"; - if where_is_prog "$1" >${_NULL_DEV} - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_prog() - - -######################################################################## -# is_not_writable () -# -# Test whether is not a writable file or directory. -# -# Arguments : >=1 (empty allowed), more args are ignored -# -is_not_writable() -{ - func_check is_not_writable '>=' 1 "$@"; - if is_writable "$1" - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_writable() - - -######################################################################## -# is_not_X () -# -# Test whether the script is not running in X Window by checking $DISPLAY. -# -is_not_X() -{ - func_check is_not_X '=' 0 "$@"; - if obj DISPLAY is_empty - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_not_X() - - -######################################################################## -# is_not_yes () -# -# Test whether is not `yes'. -# -# Arguments : 1 -# -is_not_yes() -{ - func_check is_not_yes = 1 "$@"; - if is_yes "$1" - then - eval "${return_no}"; - fi; - eval "${return_yes}"; -} # is_not_yes() - - -######################################################################## -# is_prog () -# -# Determine whether is a program in $PATH. -# -# Arguments : 1, can have spaces and arguments. -# -is_prog() -{ - func_check is_prog '=' 1 "$@"; - if where_is_prog "$1" >${_NULL_DEV} - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_prog() - - -######################################################################## -# is_writable () -# -# Test whether is a writable file or directory. -# -# Arguments : >=1 (empty allowed), more args are ignored -# -is_writable() -{ - func_check is_writable '>=' 1 "$@"; - if is_empty "$1" - then - eval "${return_no}"; - fi; - if test -r "$1" - then - if test -w "$1" - then - eval "${return_yes}"; - fi; - fi; - eval "${return_no}"; -} # is_writable() - - -######################################################################## -# is_X () -# -# Test whether the script is running in X Window by checking $DISPLAY. -# -is_X() -{ - func_check is_X '=' 0 "$@"; - if obj DISPLAY is_not_empty - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_X() - - -######################################################################## -# is_yes () -# -# Test whether has value `yes'. -# -# Return : `0' if arg1 is `yes', `1' otherwise. -# -is_yes() -{ - func_check is_yes '=' 1 "$@"; - if is_equal "$1" 'yes' - then - eval "${return_yes}"; - fi; - eval "${return_no}"; -} # is_yes() - - -######################################################################## -# landmark () -# -# Print debugging information on standard error if $_DEBUG_LM is `yes'. -# -# Globals: $_DEBUG_LM -# -# Defined in section `Debugging functions'. - - -######################################################################## -# leave ([]) -# -# Clean exit without an error or with error . -# -leave() -{ - clean_up; - if test $# = 0 - then - exit "${_OK}"; - else - exit "$1"; - fi; -} # leave() - - -######################################################################## -landmark '6: list_*()'; -######################################################################## -# -# `list' is an object class that represents an array or list. Its -# data consists of space-separated single-quoted elements. So a list -# has the form "'first' 'second' '...' 'last'". See list_append() for -# more details on the list structure. The array elements of `list' -# can be get by `eval set x "$list"; shift`. - - -######################################################################## -# list_append ( ...) -# -# Add one or more elements to an existing list. may also be -# empty. -# -# Arguments: >=2 -# : a variable name for a list of single-quoted elements -# : some sequence of characters. -# Output: none, but $ is set to -# if is empty: "'' '...'" -# otherwise: "$list '' ..." -# -# Variable prefix: la -# -list_append() -{ - func_check list_append '>=' 2 "$@"; - la_name="$1"; - eval la_list='"${'"$1"'}"'; - shift; - for s - do - la_s="$s"; - case "${la_s}" in - *\'*) - # escape each single quote by replacing each - # "'" (squote) by "'\''" (squote bslash squote squote); - # note that the backslash must be doubled in the following `sed' - la_element="$(echo1 "${la_s}" | sed 's/'"${_SQ}"'/&\\&&/g')"; - exit_test; - ;; - '') - la_element=""; - ;; - *) - la_element="${la_s}"; - ;; - esac; -### list_append() - if obj la_list is_empty - then - la_list="'${la_element}'"; - else - la_list="${la_list} '${la_element}'"; - fi; - done; - eval "${la_name}"='"${la_list}"'; - eval ${_UNSET} la_element; - eval ${_UNSET} la_list; - eval ${_UNSET} la_name; - eval ${_UNSET} la_s; - eval "${return_ok}"; -} # list_append() - - -######################################################################## -# list_from_cmdline ( [...]) -# -# Transform command line arguments into a normalized form. -# -# Options, option arguments, and file parameters are identified and -# output each as a single-quoted argument of its own. Options and -# file parameters are separated by a '--' argument. -# -# Arguments: >=1 -# : common part of a set of 4 environment variable names: -# $_SHORT_NA: list of short options without an arg. -# $_SHORT_ARG: list of short options that have an arg. -# $_LONG_NA: list of long options without an arg. -# $_LONG_ARG: list of long options that have an arg. -# ...: the arguments from a command line, such as "$@", -# the content of a variable, or direct arguments. -# -# Output: ['-[-]opt' ['optarg']]... '--' ['filename']... -# -# Example: -# list_from_cmdline PRE -a f1 -bcarg --lon=larg f2 low larg2 -# PRE_SHORT_NA="'a' 'b'" -# PRE_SHORT_ARG="'c' 'd'" -# PRE_LONG_NA="'help' 'version'" -# PRE_LONG_ARG="'longer' 'lower'" -# This will result in printing: -# '-a' '-b' '-c' 'arg' '--longer' 'larg' '--lower' 'larg2' '--' 'f1' 'f2' -# -# Use this function in the following way: -# eval set x "$(list_from_cmdline PRE_NAME "$@")"; -# shift; -# while test "$1" != '--'; do -# case "$1" in -# ... -# esac; -# shift; -# done; -# shift; #skip '--' -# # all positional parameters ("$@") left are file name parameters. -# -# Variable prefix: lfc -# -list_from_cmdline() -{ - func_check list_from_cmdline '>=' 1 "$@"; - # short options, no argument - obj_from_output lfc_short_n obj_data "$1"_SHORT_NA; - # short options, with argument - obj_from_output lfc_short_a obj_data "$1"_SHORT_ARG; - # long options, no argument - obj_from_output lfc_long_n obj_data "$1"_LONG_NA; - # long options, with argument - obj_from_output lfc_long_a obj_data "$1"_LONG_ARG; - if obj lfc_short_n is_empty - then - error 'list_from_cmdline(): no $'"$1"'_SHORT_NA options.'; - fi; - if obj lfc_short_a is_empty - then - error 'list_from_cmdline(): no $'"$1"'_SHORT_ARG options.'; - fi; - if obj lfc_long_n is_empty - then - error 'list_from_cmdline(): no $'"$1"'_LONG_NA options.'; - fi; - if obj lfc_long_a is_empty - then - error 'list_from_cmdline(): no $'"$1"'_LONG_ARG options.'; - fi; - shift; - - if is_equal "$#" 0 - then - echo1 "'--'" - eval ${_UNSET} lfc_fparams; - eval ${_UNSET} lfc_short_a; - eval ${_UNSET} lfc_short_n; -### list_from_cmdline() - eval ${_UNSET} lfc_long_a; - eval ${_UNSET} lfc_long_n; - eval ${_UNSET} lfc_result; - eval "${return_ok}"; - fi; - - lfc_fparams=''; - lfc_result=''; - while is_greater_than "$#" 0 - do - lfc_arg="$1"; - shift; - case "${lfc_arg}" in - --) break; ;; - --*=*) - # delete leading '--'; - lfc_with_equal="$(echo1 "${lfc_arg}" | sed 's/^--//')"; - # extract option by deleting from the first '=' to the end - lfc_abbrev="$(echo1 "${lfc_with_equal}" | \ - sed 's/^\([^=]*\)=.*$/\1/')"; - obj_from_output lfc_opt \ - list_single_from_abbrev lfc_long_a "${lfc_abbrev}"; - if obj lfc_opt is_empty - then - error_user "--${lfc_abbrev} is not an option."; - else - # get the option argument by deleting up to first `=' - lfc_optarg="$(echo1 "${lfc_with_equal}" | sed 's/^[^=]*=//')"; - exit_test; - list_append lfc_result "--${lfc_opt}" "${lfc_optarg}"; - continue; - fi; -### list_from_cmdline() - ;; - --*) - # delete leading '--'; - lfc_abbrev="$(echo1 "${lfc_arg}" | sed 's/^--//')"; - if list_has lfc_long_n "${lfc_abbrev}" - then - lfc_opt="${lfc_abbrev}"; - else - obj_from_output lfc_opt \ - list_single_from_abbrev lfc_long_n "${lfc_abbrev}"; - if obj lfc_opt is_not_empty && is_not_equal "$#" 0 - then - obj_from_output a \ - list_single_from_abbrev lfc_long_a "${lfc_abbrev}"; - if obj a is_not_empty - then - error_user "The abbreviation ${lfc_arg} \ -has multiple options: --${lfc_opt} and --${a}."; - fi; - fi; - fi; # if list_has lfc_long_n "${lfc_abbrev}" - if obj lfc_opt is_not_empty - then - # long option, no argument - list_append lfc_result "--${lfc_opt}"; - continue; - fi; - obj_from_output lfc_opt \ - list_single_from_abbrev lfc_long_a "${lfc_abbrev}"; - if obj lfc_opt is_not_empty - then -### list_from_cmdline() - # long option with argument - if is_equal "$#" 0 - then - error_user "no argument for option --${lfc_opt}." - fi; - list_append lfc_result "--${lfc_opt}" "$1"; - shift; - continue; - fi; # if obj lfc_opt is_not_empty - error_user "${lfc_arg} is not an option."; - ;; - -?*) # short option (cluster) - # delete leading `-'; - lfc_rest="$(echo1 "${lfc_arg}" | sed 's/^-//')"; - exit_test; - while obj lfc_rest is_not_empty - do - # get next short option from cluster (first char of $lfc_rest) - lfc_optchar="$(echo1 "${lfc_rest}" | sed 's/^\(.\).*$/\1/')"; - # remove first character from ${lfc_rest}; - lfc_rest="$(echo1 "${lfc_rest}" | sed 's/^.//')"; - exit_test; - if list_has lfc_short_n "${lfc_optchar}" - then - list_append lfc_result "-${lfc_optchar}"; - continue; - elif list_has lfc_short_a "${lfc_optchar}" - then - if obj lfc_rest is_empty - then - if is_greater_than "$#" 0 - then -### list_from_cmdline() - list_append lfc_result "-${lfc_optchar}" "$1"; - shift; - continue; - else - error_user "no argument for option -${lfc_optchar}."; - fi; - else # rest is the argument - list_append lfc_result "-${lfc_optchar}" "${lfc_rest}"; - lfc_rest=''; - continue; - fi; # if obj lfc_rest is_empty - else - error_user "unknown option -${lfc_optchar}."; - fi; # if list_has lfc_short_n "${lfc_optchar}" - done; # while obj lfc_rest is_not_empty - ;; - *) - # Here, $lfc_arg is not an option, so a file parameter. - list_append lfc_fparams "${lfc_arg}"; - - # Ignore the strange POSIX option handling to end option - # parsing after the first file name argument. To reuse it, do - # a `break' here if $POSIXLY_CORRECT of `bash' is not empty. - # When `bash' is called as `sh' $POSIXLY_CORRECT is set - # automatically to `y'. - ;; - esac; # case "${lfc_arg}" in - done; # while is_greater_than "$#" 0 - list_append lfc_result '--'; - if obj lfc_fparams is_not_empty - then - lfc_result="${lfc_result} ${lfc_fparams}"; - fi; -### list_from_cmdline() - if is_greater_than "$#" 0 - then - list_append lfc_result "$@"; - fi; - obj lfc_result echo1; - eval ${_UNSET} lfc_abbrev; - eval ${_UNSET} lfc_fparams; - eval ${_UNSET} lfc_short_a; - eval ${_UNSET} lfc_short_n; - eval ${_UNSET} lfc_long_a; - eval ${_UNSET} lfc_long_n; - eval ${_UNSET} lfc_result; - eval ${_UNSET} lfc_arg; - eval ${_UNSET} lfc_opt; - eval ${_UNSET} lfc_opt_arg; - eval ${_UNSET} lfc_opt_char; - eval ${_UNSET} lfc_with_equal; - eval ${_UNSET} lfc_rest; - eval "${return_ok}"; -} # list_from_cmdline() - - -######################################################################## -# list_from_cmdline_with_minus ( [...]) -# -# Transform command line arguments into a normalized form with a double -# abbreviation before and after an internal `-' sign. -# -# Options, option arguments, and file parameters are identified and -# output each as a single-quoted argument of its own. Options and -# file parameters are separated by a `--' argument. -# -# Arguments: >=1 -# : common part of a set of 4 environment variable names: -# $_SHORT_NA: list of short options without an arg. -# $_SHORT_ARG: list of short options that have an arg. -# $_LONG_NA: list of long options without an arg. -# $_LONG_ARG: list of long options that have an arg. -# ...: the arguments from a command line, such as "$@", -# the content of a variable, or direct arguments. -# -# Output: ['-[-]opt' ['optarg']]... '--' ['filename']... -# -# Example: -# list_from_cmdline PRE -a f1 -bcarg --lon=larg --h-n f2 low larg2 -# PRE_SHORT_NA="'a' 'b'" -# PRE_SHORT_ARG="'c' 'd'" -# PRE_LONG_NA="'help' 'version' 'hi-non-arg'" -# PRE_LONG_ARG="'long-arg' 'low-arg'" -# This will result in printing: -# '-a' '-b' '-c' 'arg' '--long-arg' 'larg' '--hi-non-arg' \ -# '--low-arg' 'larg2' '--' 'f1' 'f2' -# -# Use this function in the following way: -# eval set x "$(list_from_cmdline_with_minus PRE_NAME "$@")"; -# shift; -# while test "$1" != '--'; do -# case "$1" in -# ... -# esac; -# shift; -# done; -# shift; #skip '--' -# # all positional parameters ("$@") left are file name parameters. -# -# Variable prefix: lfcwm -# -list_from_cmdline_with_minus() -{ - func_check list_from_cmdline_with_minus '>=' 1 "$@"; - # short options, no argument - obj_from_output lfcwm_short_n obj_data "$1"_SHORT_NA; - # short options, with argument - obj_from_output lfcwm_short_a obj_data "$1"_SHORT_ARG; - # long options, no argument - obj_from_output lfcwm_long_n obj_data "$1"_LONG_NA; - # long options, with argument - obj_from_output lfcwm_long_a obj_data "$1"_LONG_ARG; - if obj lfcwm_short_n is_empty - then - error 'list_from_cmdline(): no $'"$1"'_SHORT_NA options.'; - fi; - if obj lfcwm_short_a is_empty - then - error 'list_from_cmdline(): no $'"$1"'_SHORT_ARG options.'; - fi; - if obj lfcwm_long_n is_empty - then - error 'list_from_cmdline(): no $'"$1"'_LONG_NA options.'; - fi; - if obj lfcwm_long_a is_empty - then - error 'list_from_cmdline(): no $'"$1"'_LONG_ARG options.'; - fi; - shift; - - if is_equal "$#" 0 - then - echo1 "'--'"; - eval ${_UNSET} lfcwm_short_a; - eval ${_UNSET} lfcwm_short_n; -### list_from_cmdline_with_minus() - eval ${_UNSET} lfcwm_long_a; - eval ${_UNSET} lfcwm_long_n; - eval "${return_ok}"; - fi; - obj_from_output lfcwm_long_both lists_combine lfcwm_long_a lfcwm_long_n; - lfcwm_fparams=''; - lfcwm_result=''; - while is_greater_than "$#" 0 # command line arguments - do - lfcwm_arg="$1"; - shift; - lfcwm_optarg=''; - case "${lfcwm_arg}" in - --) - break; - ;; - --*=*) - # delete leading '--'; - lfcwm_with_equal="$(echo1 "${lfcwm_arg}" | sed 's/^--//')"; - # extract option by deleting from the first '=' to the end - lfcwm_abbrev="$(echo1 "${lfcwm_with_equal}" | \ - sed 's/^\([^=]*\)=.*$/\1/')"; - # extract option argument by deleting up to the first '=' - lfcwm_optarg="$(echo1 "${lfcwm_with_equal}" | \ - sed 's/^[^=]*=\(.*\)$/\1/')"; -### list_from_cmdline_with_minus() - if list_has lfcwm_long_a "${lfcwm_abbrev}" - then - lfcwm_opt="${lfcwm_abbrev}"; - else - obj_from_output lfcwm_opt \ - _search_abbrev lfcwm_long_a "${lfcwm_abbrev}"; - fi; - list_append lfcwm_result "--${lfcwm_opt}" "${lfcwm_optarg}"; - continue; - ;; - --*) - # delete leading '--'; - lfcwm_abbrev="$(echo1 "${lfcwm_arg}" | sed 's/^--//')"; - if list_has lfcwm_long_both "${lfcwm_abbrev}" - then - lfcwm_opt="${lfcwm_abbrev}"; - else - obj_from_output lfcwm_opt \ - _search_abbrev lfcwm_long_both "${lfcwm_abbrev}"; - fi; -### list_from_cmdline_with_minus() - if list_has lfcwm_long_a "${lfcwm_opt}" - then - if is_equal "$#" 0 - then - error_user "Option ${lfcwm_opt} needs an argument."; - fi; - lfcwm_optarg="$1"; - shift; - list_append lfcwm_result "--${lfcwm_opt}" "${lfcwm_optarg}"; - else - list_append lfcwm_result "--${lfcwm_opt}"; - fi; - continue; - ;; - -?*) # short option (cluster) - # delete leading '-'; - lfcwm_rest="$(echo1 "${lfcwm_arg}" | sed 's/^-//')"; - while obj lfcwm_rest is_not_empty - do - # get next short option from cluster (first char of $lfcwm_rest) - lfcwm_optchar="$(echo1 "${lfcwm_rest}" | sed 's/^\(.\).*$/\1/')"; - # remove first character from ${lfcwm_rest}; - lfcwm_rest="$(echo1 "${lfcwm_rest}" | sed 's/^.//')"; - if list_has lfcwm_short_n "${lfcwm_optchar}" - then - list_append lfcwm_result "-${lfcwm_optchar}"; - continue; - elif list_has lfcwm_short_a "${lfcwm_optchar}" - then - if obj lfcwm_rest is_empty - then - if is_greater_than "$#" 0 - then -### list_from_cmdline_with_minus() - list_append lfcwm_result "-${lfcwm_optchar}" "$1"; - shift; - continue; - else - error_user "no argument for option -${lfcwm_optchar}."; - fi; - else # rest is the argument - list_append lfcwm_result "-${lfcwm_optchar}" "${lfcwm_rest}"; - lfcwm_rest=''; - continue; - fi; # if obj lfcwm_rest is_empty - else - error_user "unknown option -${lfcwm_optchar}."; - fi; # if list_has lfcwm_short_n "${lfcwm_optchar}" - done; # while obj lfcwm_rest is_not_empty - ;; - *) - # Here, $lfcwm_arg is not an option, so a file parameter. - list_append lfcwm_fparams "${lfcwm_arg}"; - - # Ignore the strange POSIX option handling to end option - # parsing after the first file name argument. To reuse it, do - # a `break' here if $POSIXLY_CORRECT of `bash' is not empty. - # When `bash' is called as `sh' $POSIXLY_CORRECT is set - # automatically to `y'. - ;; - esac; - done; - - list_append lfcwm_result '--'; - if obj lfcwm_fparams is_not_empty - then - lfcwm_result="${lfcwm_result} ${lfcwm_fparams}"; - fi; -### list_from_cmdline_with_minus() - if is_greater_than "$#" 0 - then - list_append lfcwm_result "$@"; - fi; - obj lfcwm_result echo1; - eval ${_UNSET} lfcwm_abbrev; - eval ${_UNSET} lfcwm_fparams; - eval ${_UNSET} lfcwm_short_a; - eval ${_UNSET} lfcwm_short_n; - eval ${_UNSET} lfcwm_long_a; - eval ${_UNSET} lfcwm_long_both; - eval ${_UNSET} lfcwm_long_n; - eval ${_UNSET} lfcwm_result; - eval ${_UNSET} lfcwm_arg; - eval ${_UNSET} lfcwm_opt; - eval ${_UNSET} lfcwm_optarg; - eval ${_UNSET} lfcwm_optchar; - eval ${_UNSET} lfcwm_with_equal; - eval ${_UNSET} lfcwm_rest; - eval "${return_ok}"; -} # list_from_cmdline_with_minus() - - -# _search_abbrev ( ) -# -# Check whether has an element constructed from the abbreviation -# . All `-' in are replaced by `-*'. This construction -# is searched first with `[^-]*'. If there is more than a -# single element an error is created. If none is found `*' -# is searched. Again an error is created for several results. -# This function was constructed from the former function -# list_single_from_abbrev(). -# -# This is a local function of list_from_cmdline_with_minus(). -# -# Arguments: 2 -# : a variable name for a list of single-quoted elements -# : some sequence of characters. -# -# Output: the found element (always not empty), error when none found. -# -# Variable prefix: _sa -# -_search_abbrev() -{ - func_check _search_abbrev '=' 2 "$@"; - eval _sa_list='"${'$1'}"'; - if obj _sa_list is_empty - then - error "_search_abbrev(): list is empty."; - fi; - - _sa_abbrev="$2"; - if obj _sa_abbrev is_empty - then - error "_search_abbrev(): abbreviation argument is empty."; - fi; - - _sa_case="$(echo1 "${_sa_abbrev}" | sed 's/-/\*-/g')"; - _sa_opt=''; - case " ${_sa_list}" in - *\ \'${_sa_case}*) # list has the abbreviation - _sa_m1=''; - _sa_m2=''; - _sa_nm=''; - eval set x "${_sa_list}"; - shift; - for i # over the option list - do - _sa_i="$i"; -### _search_abbrev() of list_from_cmdline_with_minus() - case "${_sa_i}" in - ${_sa_case}*-*) - if obj _sa_m1 is_empty - then - _sa_m1="${_sa_i}"; - continue; - fi; - _sa_m2="${_sa_i}"; - continue; - ;; - ${_sa_case}*) - if obj _sa_nm is_empty - then - _sa_nm="${_sa_i}"; - continue; - fi; - error_user "The abbreviation --${_sa_abbrev} has multiple options "\ -"--${_sa_nm} and --${_sa_i}."; - ;; - esac; - done; - if obj _sa_nm is_empty - then - if obj _sa_m2 is_not_empty - then - error_user "The abbreviation --${_sa_abbrev} has multiple options "\ -"--${_sa_m1} and --${_sa_m2}."; - fi; -### _search_abbrev() of list_from_cmdline_with_minus() - if obj _sa_m1 is_not_empty - then - _sa_opt="${_sa_m1}"; - fi; - else - _sa_opt="${_sa_nm}"; - fi; - ;; - esac; - if obj _sa_opt is_empty - then - error_user "--${_sa_abbrev} is not an option."; - fi; - obj _sa_opt echo1; - eval "${_UNSET}" _sa_abbrev; - eval "${_UNSET}" _sa_case; - eval "${_UNSET}" _sa_i; - eval "${_UNSET}" _sa_list; - eval "${_UNSET}" _sa_m1; - eval "${_UNSET}" _sa_m2; - eval "${_UNSET}" _sa_nm; - eval "${_UNSET}" _sa_opt; - eval "${return_ok}"; -} # _search_abbrev() of list_from_cmdline_with_minus() - - -######################################################################## -# list_from_file ( ) -# -# Extrect the lines from and store them as elements to list -# . -# -# Arguments: 2 -# : a variable name for output, a list of single-quoted elts -# : the name of an existing file -# -# Variable prefix: lff -# -list_from_file() -{ - func_check list_from_file '=' 2 "$@"; - if is_not_file "$2" - then - eval "${return_bad}"; - fi; - lff_n="$(wc -l "$2" | eval sed "'s/^[ ${_TAB}]*\([0-9]\+\).*$/\1/'")"; - eval "$1"="''"; - if obj lff_n is_equal 0 - then - eval "${return_good}"; - fi; - lff_i=0; - while obj lff_i is_not_equal "${lff_n}" - do - lff_i="$(expr "${lff_i}" + 1)"; - list_append "$1" "$(eval sed -n "'${lff_i}p -${lff_i}q'" "'$2'")"; - done; - eval "${_UNSET}" lff_i; - eval "${_UNSET}" lff_n; - eval "${return_good}"; -} # list_from_file() - - -######################################################################## -# list_from_split ( ) -# -# Split by into a list, omitting the separator. -# -# Arguments: 2: a that is to be split into parts divided by -# character -# Output: the resulting list string -# -# Variable prefix: lfs -# -list_from_split() -{ - func_check list_from_split = 2 "$@"; - if is_empty "$1" - then - eval "${return_ok}"; - fi; - case "$2" in - ?) - lfs_splitter="$2"; - ;; - '\:') - lfs_splitter=':'; - ;; - *) - error "list_from_split(): split argument $2 must be a single character."; - ;; - esac; - lfs_list=''; - lfs_rest="$1"; - while : - do - case "${lfs_rest}" in - *${lfs_splitter}*) - case "${lfs_splitter}" in - /) - lfs_elt="$(echo1 ${lfs_rest} | sed \ - 's|^\([^'"${lfs_splitter}"']*\)'"${lfs_splitter}"'.*|\1|')"; - lfs_rest="$(echo1 ${lfs_rest} | sed \ - 's|^[^'"${lfs_splitter}"']*'"${lfs_splitter}"'\(.*\)$|\1|')"; - ;; - *) -### list_from_split() - lfs_elt="$(echo1 ${lfs_rest} | sed \ - 's/^\([^'"${lfs_splitter}"']*\)'"${lfs_splitter}"'.*/\1/')"; - lfs_rest="$(echo1 ${lfs_rest} | sed \ - 's/^[^'"${lfs_splitter}"']*'"${lfs_splitter}"'\(.*\)$/\1/')"; - ;; - esac; - list_append lfs_list "${lfs_elt}" - continue; - ;; - *) - list_append lfs_list "${lfs_rest}" - break - ;; - esac; - done - echo1 "${lfs_list}"; - - eval ${_UNSET} lfs_elt; - eval ${_UNSET} lfs_list; - eval ${_UNSET} lfs_rest; - eval ${_UNSET} lfs_splitter; - eval "${return_ok}"; -} # list_from_split() - - -######################################################################## -# list_has ( ) -# -# Test whether the list has the element . -# -# Arguments: 2 -# : a variable name for a list of single-quoted elements -# : some sequence of characters. -# -# Variable prefix: lh -# -list_has() -{ - func_check list_has = 2 "$@"; - eval lh_list='"${'$1'}"'; - if obj lh_list is_empty - then - eval "${_UNSET}" lh_list; - eval "${return_no}"; - fi; - case "$2" in - \'*\') lh_element=" $2 "; ;; - *) lh_element=" '$2' "; ;; - esac; - if string_contains " ${lh_list} " "${lh_element}" - then - eval "${_UNSET}" lh_list; - eval "${_UNSET}" lh_element; - eval "${return_yes}"; - else - eval "${_UNSET}" lh_list; - eval "${_UNSET}" lh_element; - eval "${return_no}"; - fi; -} # list_has() - - -######################################################################## -# list_has_abbrev ( ) -# -# Test whether the list of has an element starting with -# . -# -# Arguments: 2 -# : a variable name for a list of single-quoted elements -# : some sequence of characters. -# -# Variable prefix: lha -# -list_has_abbrev() -{ - func_check list_has_abbrev '=' 2 "$@"; - eval lha_list='"${'$1'}"'; - if obj lha_list is_empty - then - eval "${_UNSET}" lha_list; - eval "${return_no}"; - fi; - case "$2" in - \'*) - lha_element="$(echo1 "$2" | sed 's/'"${_SQ}"'$//')"; - ;; - *) - lha_element="'$2"; - ;; - esac; - if string_contains " ${lha_list}" " ${lha_element}" - then - eval "${_UNSET}" lha_list; - eval "${_UNSET}" lha_element; - eval "${return_yes}"; - else - eval "${_UNSET}" lha_list; - eval "${_UNSET}" lha_element; - eval "${return_no}"; - fi; - eval "${return_ok}"; -} # list_has_abbrev() - - -######################################################################## -# list_has_not ( ) -# -# Test whether has no . -# -# Arguments: 2 -# : a space-separated list of single-quoted elements. -# : some sequence of characters. -# -# Variable prefix: lhn -# -list_has_not() -{ - func_check list_has_not = 2 "$@"; - eval lhn_list='"${'$1'}"'; - if obj lhn_list is_empty - then - eval "${_UNSET}" lhn_list; - eval "${return_yes}"; - fi; - case "$2" in - \'*\') lhn_element=" $2 "; ;; - *) lhn_element=" '$2' "; ;; - esac; - if string_contains " ${lhn_list} " "${lhn_element}" - then - eval "${_UNSET}" lhn_list; - eval "${_UNSET}" lhn_element; - eval "${return_no}"; - else - eval "${_UNSET}" lhn_list; - eval "${_UNSET}" lhn_element; - eval "${return_yes}"; - fi; -} # list_has_not() - - -######################################################################## -# list_single_from_abbrev ( ) -# -# Check whether the list has an element starting with . If -# there are more than a single element an error is raised. -# -# Arguments: 2 -# : a variable name for a list of single-quoted elements -# : some sequence of characters. -# -# Output: the found element. -# -# Variable prefix: lsfa -# -list_single_from_abbrev() -{ - func_check list_single_from_abbrev '=' 2 "$@"; - eval lsfa_list='"${'$1'}"'; - if obj lsfa_list is_empty - then - eval "${_UNSET}" lsfa_list; - eval "${return_no}"; - fi; - lsfa_abbrev="$2"; - if list_has lsfa_list "${lsfa_abbrev}" - then - obj lsfa_abbrev echo1; - eval "${_UNSET}" lsfa_abbrev; - eval "${_UNSET}" lsfa_list; - eval "${return_yes}"; - fi; - if list_has_abbrev lsfa_list "${lsfa_abbrev}" - then - lsfa_element=''; - eval set x "${lsfa_list}"; - shift; -### list_single_from_abbrev() - for i - do - case "$i" in - ${lsfa_abbrev}*) - if obj lsfa_element is_not_empty - then - error_user "The abbreviation --${lsfa_abbrev} \ -has multiple options: --${lsfa_element} and --${i}."; - fi; - lsfa_element="$i"; - ;; - esac; - done; - obj lsfa_element echo1; - eval "${_UNSET}" lsfa_abbrev; - eval "${_UNSET}" lsfa_element; - eval "${_UNSET}" lsfa_list; - eval "${return_yes}"; - else - eval "${_UNSET}" lsfa_abbrev; - eval "${_UNSET}" lsfa_element; - eval "${_UNSET}" lsfa_list; - eval "${return_no}"; - fi; -} # list_single_from_abbrev() - - -######################################################################## -# list_uniq () -# -# Generate a list with only unique elements. -# -# Output: the corrected list -# -# Variable prefix: lu -# -list_uniq() -{ - func_check list_uniq '=' 1 "$@"; - if is_empty "$1" - then - eval "${return_ok}"; - fi; - eval a='"${'"$1"'}"'; - if obj a is_empty - then - eval "${return_ok}"; - fi; - eval set x "$a"; - shift; - lu_list=''; - for i - do - lu_i="$i"; - if list_has lu_list "${lu_i}" - then - continue; - else - list_append lu_list ${lu_i}; - fi; - done; - obj lu_list echo1; - eval "${_UNSET}" lu_i; - eval "${_UNSET}" lu_list; - eval "${return_ok}"; -} # list_uniq() - - -######################################################################## -# lists_combine ( ...) -# -# Combine several lists to a single list. All arguments are list names. -# -# Output: the combined list -# -# Variable prefix: lc -# -lists_combine() -{ - func_check lists_combine '>=' 2 "$@"; - lc_list=''; - for i - do - eval lc_arg='"${'"$i"'}"'; - case "${lc_arg}" in - '') :; ;; - "'"*"'") - if obj lc_list is_empty - then - lc_list="${lc_arg}"; - else - lc_list="${lc_list} ${lc_arg}"; - fi; - ;; - *) - error 'lists_combine(): $'"$i"' is not a list.'; - ;; - esac; - done; - obj lc_list echo1; - eval "${_UNSET}" lc_arg; - eval "${_UNSET}" lc_list; - eval "${return_ok}"; -} # lists_combine() - - -######################################################################## -landmark '7: man_*()'; -######################################################################## - -######################################################################## -# Information on the search of man pages in groffer - -# The search of man pages is based on a set of directories. That -# starts with the so-called man path. This is determined in function -# man_setup() either by the command-line option --manpath, by $MANOPT, -# or by $MANPATH. There is also a program `manpath'. If all of this -# does not work a man path is created from $PATH with function -# manpath_set_from_path(). We now have a set of existing directories -# for the search of man pages; usually they end with `/man'. - -# The directory set of the man path can be changed in 2 ways. If -# operating system names are given in $SYSTEM or by --systems on the -# command-line all man path directory will be appended by these names. -# The appended system names replace the original man path; but if no -# system name is set, the original man path is kept. In `groffer', -# this is done by the function manpath_add_lang_sys() in man_setup(). - -# The next addition for directories is the language. It is specified -# by --locale or by one of the environment variables $LC_ALL, -# $LC_MESSAGES, and $LANG. The language name of `C' or `POSIX' means -# the return to the default language (usually English); this deletes -# former language specifications. The language name and its -# abbreviation with 2 characters is appended to the man page -# directories. But these new arising directories are added to the man -# page, they do not replace it such as the system names did. This is -# done by function manpath_add_lang_sys() in man_setup() as well. - -# Now we have the basic set of directories for the search of man pages -# for given filespec arguments. The real directories with the man -# page source files are gotten by appending `man
' to each -# directory, where section is a single character of the form -# `[1-9on]'. - -# There you find files named according to the form -# .
[][], where `[]' means -# optional this time. is the name of the man page;
-# is the single character from the last paragraphe; the optional -# consists of some letters denoting special aspects for -# the section; and the optional is something like `.gz', -# `.Z', or `.bz2', meaning that the file is compressed. - -# If name, section. and extension are specified on the command-line -# the file of the form .
with or without -# are handled. The first one found according to the -# directory set for the section is shown. - -# If just name and section are specified on the command-line then -# first .
with or without are searched. -# If no matching file was found, .
with or -# without are searched for all possible extensions. - -# If only name is specified on the command-line then the section -# directories are searched by and by, starting with section `1', until -# a file is matched. - -# The function man_is_man() determines all suitable man files for a -# command-line argument, while man_get() searches the single matching -# file for display. - - -######################################################################## -# man_get ( [
[]]) -# -# Write a man page to the temporary file. -# -# Globals in: $_TMP_MANSPEC, $_MAN_SEC_CHARS, $_MAN_EXT, $_MAN_ALL -# -# Arguments: 1, 2, or 3 -# -# Variable prefix: mg -# -man_get() -{ - func_check man_get '>=' 1 "$@"; - if obj _TMP_MANSPEC is_empty - then - error 'man_get(): man_is_man() must be run first on '"$*".; - fi; - mg_name="$1"; - mg_sec="$2"; - if is_empty "$2" - then - mg_sec="${_MAN_SEC_CHARS}"; # take care it is not a single section - fi; - mg_ext="$3"; - if is_empty "$3" - then - mg_ext="${_MAN_EXT}"; - fi; - if obj _TMP_MANSPEC is_not_equal "${_TMP_DIR}/,man:$1:${mg_sec}${mg_ext}" - then - error 'man_get(): $_TMP_MANSPEC does not suit to the arguments '"$*".; - fi; -### man_get() - - if obj _MAN_ALL is_yes - then - list_from_file mg_list "${_TMP_MANSPEC}"; - eval set x ${mg_list}; - shift; - mg_ok='no'; - mg_list=''; - for f - do - mg_f="$f"; - if list_has mg_list "${mg_f}" - then - continue; - else - list_append mg_list "${mg_f}"; - fi; -### man_get() - if obj mg_f is_file - then - to_tmp "${mg_f}" && mg_ok='yes'; - fi; - done; - if obj mg_ok is_yes - then - register_title man:"${mg_name}"; - fi; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - else # $_MAN_ALL is not 'yes' - if is_empty "$2" - then # no section from command line - if obj _MAN_SEC_LIST is_empty - then - m="${_MAN_AUTO_SEC_LIST}"; # list of all sections - else - m="${_MAN_SEC_LIST}"; # from --sections - fi; -### man_get() - for s in $(eval set x $m; shift; echo1 "$@") - do - mg_s="$s"; - list_from_file mg_list "${_TMP_MANSPEC}"; - eval set x ${mg_list}; - shift; - if obj mg_ext is_empty - then - for f - do - mg_f="$f"; - case "${mg_f}" in -*/man"${mg_s}"/"${mg_name}"."${mg_s}"|*/man"${mg_s}"/"${mg_name}"."${mg_s}".*) - if obj mg_f is_file - then - to_tmp "${mg_f}" && register_title "${mg_name}(${mg_s})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; # "$mg_f" - done; # for f - fi; # mg_ext is_empty -### man_get() - for f - do - mg_f="$f"; - case "${mg_f}" in - */man"${mg_s}"/"${mg_name}"."${mg_s}""${mg_ext}"*) - if obj mg_f is_file - then - to_tmp "${mg_f}" && register_title "${mg_name}(${mg_s})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; # "$mg_f" - done; # for f - done; # for s - else # $mg_sec is not empty, do with section - list_from_file mg_list "${_TMP_MANSPEC}"; - eval set x ${mg_list}; - shift; - if obj mg_ext is_empty - then - for f - do - mg_f="$f"; -### man_get() - case "${mg_f}" in -*/man"${mg_sec}"/"${mg_name}"."${mg_sec}"|\ -*/man"${mg_sec}"/"${mg_name}"."${mg_sec}".*) - if obj mg_f is_file - then - obj mg_f to_tmp && \ - register_title "${mg_name}(${mg_sec})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; - done; # for f - for f - do - mg_f="$f"; -### man_get() - case "${mg_f}" in -*/man"${mg_sec}"/"${mg_name}"."${mg_sec}"*) - if obj mg_f is_file - then - obj mg_f to_tmp && \ - register_title "${mg_name}(${mg_sec})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; - done; # for f - else # mg_ext is not empty - for f - do - mg_f="$f"; -### man_get() - case "${mg_f}" in -*/man"${mg_sec}"/"${mg_name}"."${mg_sec}""${mg_ext}"|\ -*/man"${mg_sec}"/"${mg_name}"."${mg_sec}""${mg_ext}".*) - if obj mg_f is_file - then - obj mg_f to_tmp && \ - register_title "${mg_name}(${mg_sec}${mg_ext})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; - done; # for f - for f - do - mg_f="$f"; -### man_get() - case "${mg_f}" in - */man"${mg_sec}"/"${mg_name}"."${mg_sec}""${mg_ext}"*) - if obj mg_f is_file - then - obj mg_f to_tmp && \ - register_title "${mg_name}(${mg_sec}${mg_ext})"; - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_s; - eval ${_UNSET} mg_sec; - eval "${return_ok}"; - fi; - ;; - esac; - done; # for f - fi; - fi; # $mg_sec - fi; # $_MAN_ALL - - eval ${_UNSET} mg_ext; - eval ${_UNSET} mg_f; - eval ${_UNSET} mg_list; - eval ${_UNSET} mg_name; - eval ${_UNSET} mg_sec; - eval ${_UNSET} mg_s; - eval "${return_ok}"; -} # man_get() - - -######################################################################## -# man_is_man ( [
[]]) -# -# Test whether exists as man page. -# -# Globals: in: $_TMP_MAN, $_MAN_SEC_CHARS, $_TMP_DIR, $_MAN_EXT, -# $_MAN_AUTO_SEC_CHARS -# out: $_TMP_MANSPEC -# -# Arguments: 1, 2, or 3 -# -# Variable prefix: mim -# -man_is_man() -{ - func_check man_is_man '>=' 1 "$@"; - if is_empty "$1" - then - _TMP_MANSPEC=''; - eval "${return_no}"; - fi; - if obj _TMP_DIR is_empty - then - error 'man_is_man(): main_init() must be run first.'; - fi; - if obj _MAN_IS_SETUP is_not_yes - then - error 'man_is_man(): man_setup() must be run first.'; - fi; - mim_sec="$2"; - if is_empty "$2" - then - mim_sec="${_MAN_SEC_CHARS}"; - fi; - if is_empty "$3" - then - mim_ext="${_MAN_EXT}"; - else - mim_ext="$3"; - fi; - _TMP_MANSPEC="${_TMP_DIR}/,man:$1:${mim_sec}${mim_ext}"; -### man_is_man() - if obj _TMP_MANSPEC is_not_file - then - if obj mim_sec is_empty - then - m="${_MAN_AUTO_SEC_CHARS}"; - eval grep "'/man$m/$1\.$m${mim_ext}'" \ - "${_TMP_MAN}" > "${_TMP_MANSPEC}"; - else - eval grep "'/man${mim_sec}/$1\.${mim_sec}${mim_ext}'" \ - "${_TMP_MAN}" > "${_TMP_MANSPEC}"; - fi; - fi; - eval ${_UNSET} mim_ext; - eval ${_UNSET} mim_sec; - if obj _TMP_MANSPEC is_empty_file - then - rm_file_with_debug "${_TMP_MANSPEC}"; - eval "${return_no}"; - else - eval "${return_yes}"; - fi; -} # man_is_man() - - -######################################################################## -# man_setup () -# -# Setup the variables $_MAN_* needed for man page searching. -# -# Globals: -# in: $_OPT_*, $_MANOPT_*, $LANG, $LC_MESSAGES, $LC_ALL, -# $MANPATH, $MANSEC, $PAGER, $SYSTEM, $MANOPT. -# out: $_MAN_PATH, $_MAN_LANG, $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2, -# $_MAN_SEC, $_MAN_ALL, $_TMP_MAN -# in/out: $_MAN_ENABLE -# -# The precedence for the variables related to `man' is that of GNU -# `man', i.e. -# -# $LANG; overridden by -# $LC_MESSAGES; overridden by -# $LC_ALL; this has the same precedence as -# $MANPATH, $MANSEC, $PAGER, $SYSTEM; overridden by -# $MANOPT; overridden by -# the groffer command line options. -# -# $MANROFFSEQ is ignored because grog determines the preprocessors. -# -# Variable prefix: ms -# -man_setup() -{ - func_check man_setup '=' 0 "$@"; - - if obj _MAN_IS_SETUP is_yes - then - eval "${return_ok}"; - fi; - _MAN_IS_SETUP='yes'; - - if obj _MAN_ENABLE is_not_yes - then - eval "${return_ok}"; - fi; - - # determine basic path for man pages - obj_from_output ms_path \ - get_first_essential "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}"; - if obj ms_path is_empty && is_prog 'manpath' - then - obj_from_output ms_path manpath 2>${_NULL_DEV}; # not always available - fi; - if obj ms_path is_empty - then - manpath_set_from_path; - else - obj_from_output _MAN_PATH path_list "${ms_path}"; - fi; - if obj _MAN_PATH is_empty - then - _MAN_ENABLE="no"; - echo2 "man_setup(): man path is empty"; - eval ${_UNSET} ms_path; - eval "${return_ok}"; - fi; - obj_from_output _MAN_PATH list_uniq _MAN_PATH; -### man_setup() - - if obj _MAN_ALL is_not_yes - then - if obj _OPT_ALL is_yes || obj _MANOPT_ALL is_yes - then - _MAN_ALL='yes'; - else - _MAN_ALL='no'; - fi; - fi; - - ms_sys="$(get_first_essential \ - "${_OPT_SYSTEMS}" "${_MANOPT_SYS}" "${SYSTEM}")"; - if obj ms_sys is_not_empty - then - obj_from_output _MAN_SYS list_from_split "${ms_sys}" ','; - fi; - - obj_from_output ms_lang get_first_essential \ - "${_OPT_LANG}" "${LC_ALL}" "${LC_MESSAGES}" "${LANG}"; - case "${ms_lang}" in - C|POSIX) - _MAN_LANG=""; - _MAN_LANG2=""; - ;; - ?) - _MAN_LANG="${ms_lang}"; - _MAN_LANG2=""; - ;; - ??) - _MAN_LANG="${ms_lang}"; - _MAN_LANG2="${ms_lang}"; - ;; -### man_setup() - *) - _MAN_LANG="${ms_lang}"; - # get first two characters of $ms_lang - _MAN_LANG2="$(echo1 "${ms_lang}" | sed 's/^\(..\).*$/\1/')"; - exit_test; - ;; - esac; - # from now on, use only $_MAN_LANG*, forget about $_OPT_LANG, $LC_*. - - manpath_add_lang_sys; - obj_from_output _MAN_PATH list_uniq _MAN_PATH; - - obj_from_output _MAN_SEC get_first_essential \ - "${_OPT_SECTIONS}" "${_MANOPT_SEC}" "${MANSEC}"; - _MAN_SEC_LIST=""; - _MAN_SEC_CHARS=""; - case "${_MAN_SEC}" in - *:*) - eval set x "$(list_from_split "${_MAN_SEC}" :)"; - shift; - for s - do - if list_has _MAN_AUTO_SEC_LIST "$s" - then - list_append _MAN_SEC_LIST "$s"; - _MAN_SEC_CHARS="${_MAN_SEC_CHARS}$s"; - fi; - done - if obj _MAN_SEC_CHARS is_not_empty - then - _MAN_SEC_CHARS="[${_MAN_SEC_CHARS}]"; - fi; - ;; - *) - if list_has _MAN_AUTO_SEC_LIST "${_MAN_SEC}" - then - list_append _MAN_SEC_LIST "${_MAN_SEC}"; - _MAN_SEC_CHARS="[${_MAN_SEC}]"; - fi; - ;; - esac; - -### man_setup() - obj_from_output _MAN_EXT get_first_essential \ - "${_OPT_EXTENSION}" "${_MANOPT_EXTENSION}" "${EXTENSION}"; - - _TMP_MAN="$(tmp_create man)"; - - eval set x "${_MAN_PATH}"; - shift; - if is_not_equal "$#" 0 - then - for i - do - for j in "$i"/man* - do - if obj j is_dir - then - find "$j" >>"${_TMP_MAN}"; - fi; - done - done; - fi; - - eval ${_UNSET} ms_lang; - eval ${_UNSET} ms_list; - eval ${_UNSET} ms_path; - eval ${_UNSET} ms_sys; - eval "${return_ok}"; -} # man_setup() - - -######################################################################## -landmark '8: manpath_*()'; -######################################################################## - -######################################################################## -# manpath_add_lang_sys () -# -# Add language and operating system specific directories to man path. -# -# Arguments : 0 -# Output : none -# Globals: -# in: $_MAN_SYS: a list of names of operating systems. -# $_MAN_LANG and $_MAN_LANG2: each a single name -# in/out: $_MAN_PATH: list of directories which shall have the `man?' -# subdirectories. -# -# Variable prefix: mals -# -manpath_add_lang_sys() -{ - func_check manpath_add_lang_sys '=' 0 "$@"; - if obj _MAN_PATH is_empty - then - eval "${return_ok}"; - fi; - if obj _MAN_SYS is_empty - then - mals_mp="${_MAN_PATH}"; - else - mals_mp=''; - eval set x "${_MAN_SYS}"; - shift; - for s - do - _manpath_add_sys "$s"; - done; - fi; - - if obj mals_mp is_not_empty - then - mals_lang_path=''; - if is_equal "$_MAN_LANG" "$_MAN_LANG2" - then - mals_man_lang2=''; - else - mals_man_lang2="${_MAN_LANG2}"; - fi; - for i in "${_MAN_LANG}" "${mals_man_lang2}" - do - if obj i is_empty - then - continue; - fi; -### manpath_add_lang_sys() - mals_lang="$i"; - eval set x "${mals_mp}"; - shift; - for p - do - obj_from_output mals_dir dir_name_append "${p}" "${mals_lang}"; - if obj mals_dir is_dir - then - list_append mals_lang_path "${mals_dir}"; - fi; - done; - done; - obj_from_output mals_mp lists_combine mals_lang_path mals_mp; - fi; - - _MAN_PATH="${mals_mp}"; - eval ${_UNSET} mals_dir; - eval ${_UNSET} mals_lang; - eval ${_UNSET} mals_lang_path; - eval ${_UNSET} mals_man_lang2; - eval ${_UNSET} mals_mp; - eval "${return_ok}"; -} # manpath_add_lang_sys() - - -# _manpath_add_sys () -# -# Append the existing subdirectories of man path directories to -# the list $mals_mp. -# -# Local function to manpath_add_lang_sys(). -# -# Argument: 1, a operating system name (for appending to a man path -# directory) -# -# Globals in: $_MAN_PATH -# Globals in/out: $mals_mp -# -# Variable prefix: _mas -# -_manpath_add_sys() -{ - func_check _manpath_add_sys '=' 1 "$@"; - case "$1" in - '') - :; - ;; - man) - obj_from_output mals_mp lists_combine mals_mp _MAN_PATH; - ;; - *) - _mas_sys="$1"; - eval set x "${_MAN_PATH}"; - shift; - for p - do - obj_from_output _mas_dir dir_name_append "${p}" "${_mas_sys}"; - if obj _mas_dir is_dir - then - list_append mals_mp "${_mas_dir}"; - fi; - done; - ;; - esac; - eval ${_UNSET} _mas_dir; - eval ${_UNSET} _mas_sys; - eval "${return_ok}"; -} # _manpath_add_sys() of manpath_add_lang_sys() - - -######################################################################## -# manpath_set_from_path () -# -# Determine basic search path for man pages from $PATH. -# -# Return: `0' if a valid man path was retrieved. -# Output: none -# Globals: -# in: $PATH -# out: $_MAN_PATH -# -# Variable prefix: msfp -# -manpath_set_from_path() -{ - func_check manpath_set_from_path '=' 0 "$@"; - - msfp_manpath=''; - - # get a basic man path from $PATH - if obj PATH is_not_empty - then - # delete the final `/bin' part - p="$(echo1 "${PATH}" | sed 's|//*bin/*:|:|g')"; - obj_from_output msfp_list path_list "$p"; - # append some default directories - for b in /usr/local /usr/local /usr /usr \ - /usr/X11R6 /usr/openwin \ - /opt /opt/gnome /opt/kde - do - msfp_base="$b"; - if list_has_not msfp_list "${msfp_base}" && obj msfp_base is_dir - then - list_append msfp_list "${msfp_base}"; - fi; - done; - eval set x "${msfp_list}"; - shift; - for d - do - # including empty for former `/bin'. - msfp_base="$d"; - for e in /share/man /share/MAN /man /MAN - do - msfp_mandir="${msfp_base}$e"; - if obj msfp_mandir is_dir - then - list_append msfp_manpath "${msfp_mandir}"; - fi; - done; - done; - fi; - - _MAN_PATH="${msfp_manpath}"; - eval ${_UNSET} msfp_base; - eval ${_UNSET} msfp_list; - eval ${_UNSET} msfp_mandir; - eval ${_UNSET} msfp_manpath; - eval "${return_ok}"; -} # manpath_set_from_path() - - -######################################################################## -landmark '9: obj_*()'; -######################################################################## - -######################################################################## -# obj ( ...) -# -# This works like a method (object function) call for an object. -# Run " $ ...". -# -# The first argument represents an object name whose data is given as -# first argument to (). -# -# Argument: >=2 -# : variable name -# : a program or function name -# -# Variable prefix: o -# -obj() -{ - func_check obj '>=' 2 "$@"; - eval o_arg1='"${'$1'}"'; - if is_empty "$2" - then - error "obj(): function name is empty." - else - o_func="$2"; - fi; - shift; - shift; - eval "${o_func}"' "${o_arg1}" "$@"'; - n="$?"; - eval ${_UNSET} o_arg1; - eval ${_UNSET} o_func; - eval "${return_var} $n"; -} # obj() - - -######################################################################## -# obj_data () -# -# Print the data of , i.e. the content of $. -# For possible later extensions. -# -# Arguments: 1 -# : a variable name -# Output: the data of -# -# Variable prefix: od -# -obj_data() -{ - func_check obj_data '=' 1 "$@"; - if is_empty "$1" - then - error "obj_data(): object name is empty." - fi; - eval od_res='"${'"$1"'}"'; - obj od_res echo1; - eval ${_UNSET} od_res; - eval "${return_ok}"; -} # obj_data() - - -######################################################################## -# obj_from_output ( ...) -# -# Run '$="$( ...)"' to set the result of a -# function call to a global variable. Variables are not stored. -# -# Arguments: >=2 -# : a variable name -# : the name of a function or program -# : optional argument to -# Output: none -# -# Variable prefix: ofo -# -obj_from_output() -{ - func_check obj_from_output '>=' 2 "$@"; - if is_empty "$1" - then - error "obj_from_output(): variable name is empty."; - fi; - if is_empty "$2" - then - error "obj_from_output(): function name is empty." - fi; - ofo_result_name="$1"; - shift; - ofo_return=0; - if is_equal "$#" 0 - then - eval "${ofo_result_name}"'=""'; - else - ofo_list=''; - for i - do - list_append ofo_list "$i"; - done; - eval "${ofo_result_name}"'="$('"${ofo_list}"')"'; - ofo_return="$?"; - exit_test; - fi; - r="${ofo_return}"; - eval ${_UNSET} ofo_list; - eval ${_UNSET} ofo_return; - eval ${_UNSET} ofo_result_name; - eval "${return_var} $r"; -} # obj_from_output() - - -######################################################################## -# obj_set ( ) -# -# Set the data of , i.e. call "$=". -# -# Arguments: 2 -# : a variable name -# : a string -# Output:: none -# -obj_set() -{ - func_check obj_set '=' 2 "$@"; - if is_empty "$1" - then - error "obj_set(): object name is empty." - fi; - eval "$1"='"$2"'; - eval "${return_ok}"; -} # obj_set() - - -######################################################################## -# path_chop () -# -# Remove unnecessary colons from path. -# -# Argument: 1, a colon separated path. -# Output: path without leading, double, or trailing colons. -# -path_chop() -{ - func_check path_chop = 1 "$@"; - - # replace multiple colons by a single colon `:' - # remove leading and trailing colons - echo1 "$1" | sed ' -s/^:*// -s/:::*/:/g -s/:*$// -'; - eval "${return_ok}"; -} # path_chop() - - -######################################################################## -# path_clean () -# -# Remove non-existing directories from a colon-separated list. -# -# Argument: 1, a colon separated path. -# Output: colon-separated list of existing directories. -# -# Variable prefix: pc -# -path_clean() -{ - func_check path_clean = 1 "$@"; - if is_not_equal "$#" 1 - then - error 'path_clean() needs 1 argument.'; - fi; - pc_arg="$1"; - eval set x "$(path_list "${pc_arg}")"; - exit_test; - shift; - pc_res=""; - for i - do - pc_i="$i"; - if obj pc_i is_not_empty \ - && obj pc_res path_not_contains "${pc_i}" \ - && obj pc_i is_dir - then - case "${pc_i}" in - ?*/) - pc_res="${pc_res}:$(dir_name_chop "${pc_i}")"; - exit_test; - ;; - *) - pc_res="${pc_res}:${pc_i}"; - ;; - esac; - fi; - done; - path_chop "${pc_res}"; - eval ${_UNSET} pc_arg; - eval ${_UNSET} pc_i; - eval ${_UNSET} pc_res; - eval "${return_ok}"; -} # path_clean() - - -######################################################################## -# path_contains ( ) -# -# Test whether is contained in , a list separated by `:'. -# -# Arguments : 2 -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -path_contains() -{ - func_check path_contains = 2 "$@"; - case ":$1:" in - *:${2}:*) - eval "${return_yes}"; - ;; - *) - eval "${return_no}"; - ;; - esac; - eval "${return_ok}"; -} # path_contains() - - -######################################################################## -# path_not_contains ( ) -# -# Test whether is not contained in colon separated . -# -# Arguments : 2 -# -path_not_contains() -{ - func_check path_not_contains = 2 "$@"; - if path_contains "$1" "$2" - then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} # path_not_contains() - - -######################################################################## -# path_list () -# -# From a `:' separated path generate a list with unique elements. -# -# Arguments: 1: a colon-separated path -# Output: the resulting list, process it with `eval set' -# -# Variable prefix: pl -# -path_list() -{ - func_check path_list = 1 "$@"; - eval set x "$(list_from_split "$1" '\:')"; - shift; - pl_list=''; - for e - do - pl_elt="$e"; - if list_has pl_list "${pl_elt}" - then - continue; - else - list_append pl_list "${pl_elt}"; - fi; - done; - obj pl_list echo1; - eval ${_UNSET} pl_elt; - eval ${_UNSET} pl_list; - eval "${return_ok}"; -} # path_list() - - -######################################################################## -landmark '10: register_*()'; -######################################################################## - -######################################################################## -# register_file () -# -# Write a found file and register the title element. -# -# Arguments: 1: a file name -# Output: none -# -register_file() -{ - func_check register_file = 1 "$@"; - if is_empty "$1" - then - error 'register_file(): file name is empty'; - fi; - if is_equal "$1" '-' - then - to_tmp "${_TMP_STDIN}" && register_title 'stdin'; - else - to_tmp "$1" && register_title "$1"; - exit_test; - fi; - eval "${return_ok}"; -} # register_file() - - -######################################################################## -# register_title () -# -# Create title element from and append to $_REG_TITLE_LIST. -# Basename is created. -# -# Globals: $_REG_TITLE_LIST (rw) -# -# Variable prefix: rt -# -register_title() -{ - func_check register_title '=' 1 "$@"; - if is_empty "$1" - then - eval "${return_ok}"; - fi; - - if obj _DEBUG_PRINT_FILENAMES is_yes - then - if is_equal "$1" 'stdin' - then - echo2 "file: standard input"; - else - if obj _FILESPEC_IS_MAN is_yes - then - echo2 "file title: $1"; - else - echo2 "file: $1"; - fi; - fi; - fi; - - case "${_REG_TITLE_LIST}" in - *\ *\ *\ *) - eval "${return_ok}"; - ;; - esac; - - # remove directory part - obj_from_output rt_title base_name "$1"; - # replace space characters by `_' - rt_title="$(echo1 "${rt_title}" | sed 's/[ ]/_/g')"; - # remove extension `.bz2' - rt_title="$(echo1 "${rt_title}" | sed 's/\.bz2$//')"; - # remove extension `.gz' - rt_title="$(echo1 "${rt_title}" | sed 's/\.gz$//')"; - # remove extension `.Z' - rt_title="$(echo1 "${rt_title}" | sed 's/\.Z$//')"; - - if obj rt_title is_empty - then - eval ${_UNSET} rt_title; - eval "${return_ok}"; - fi; - list_append _REG_TITLE_LIST "${rt_title}"; - eval ${_UNSET} rt_title; - eval "${return_ok}"; -} # register_title() - - -######################################################################## -# reset () -# -# Reset the variables that can be affected by options to their default. -# -# -# Defined in section `Preset' after the rudimentary shell tests. - - -######################################################################## -# rm_file () -# -# Remove file. -# -rm_file() -{ - func_check rm_file '=' 1 "$@"; - if is_file "$1" - then - rm -f "$1" >${_NULL_DEV} 2>&1; - fi; - if is_existing "$1" - then - eval "${return_bad}"; - else - eval "${return_good}"; - fi; -} # rm_file() - - -######################################################################## -# rm_file_with_debug () -# -# Remove file if $_DEBUG_KEEP_FILES allows it. -# -# Globals: $_DEBUG_KEEP_FILES -# -rm_file_with_debug() -{ - func_check rm_file_with_debug '=' 1 "$@"; - if obj _DEBUG_KEEP_FILES is_not_yes - then - if is_file "$1" - then - rm -f "$1" >${_NULL_DEV} 2>&1; - fi; - fi; - if is_existing "$1" - then - eval "${return_bad}"; - else - eval "${return_good}"; - fi; -} # rm_file_with_debug() - - -######################################################################## -# rm_tree () -# -# Remove a file or a complete directory tree. -# -# Globals: $_DEBUG_KEEP_FILES -# -rm_tree() -{ - func_check rm_tree '=' 1 "$@"; - if is_existing "$1" - then - rm -f -r "$1" >${_NULL_DEV} 2>&1; - fi; - if is_existing "$1" - then - eval "${return_bad}"; - else - eval "${return_good}"; - fi; -} # rm_tree() - - -######################################################################## -# save_stdin () -# -# Store standard input to temporary file (with decompression). -# -# Variable prefix: ss -# -if obj _HAS_COMPRESSION is_yes -then - save_stdin() - { - func_check save_stdin '=' 0 "$@"; - ss_f="${_TMP_DIR}"/INPUT; - cat >"${ss_f}"; - cat_z "${ss_f}" >"${_TMP_STDIN}"; - rm_file "${ss_f}"; - eval ${_UNSET} ss_f; - eval "${return_ok}"; - } # save_stdin() -else # no compression - save_stdin() - { - func_check save_stdin '=' 0 "$@"; - cat >"${_TMP_STDIN}"; - eval "${return_ok}"; - } # save_stdin() -fi; - - -######################################################################## -# special_filespec () -# -# Handle special modes like whatis and apropos. Run their filespec -# functions if suitable. -# -# Globals: in: $_OPT_APROPOS, $_OPT_WHATIS, $_SPECIAL_SETUP -# out: $_SPECIAL_FILESPEC (internal) -# -special_filespec() -{ - func_check special_filespec '=' 0 "$@"; - if obj _OPT_APROPOS is_not_yes && obj _OPT_WHATIS is_not_yes - then - eval "${return_bad}"; - fi; - if obj _OPT_APROPOS is_yes && obj _OPT_WHATIS is_yes - then - error \ - 'special_filespec(): $_OPT_APROPOS and $_OPT_WHATIS are both "yes"'; - fi; - if obj _SPECIAL_SETUP is_not_yes - then - error 'special_filespec(): setup for apropos or whatis must be run first.'; - fi; - if apropos_filespec || whatis_filespec; - then - eval "${return_ok}"; - else - eval "${return_bad}"; - fi; -} # special_filespec() - - -######################################################################## -# special_setup () -# -# Handle special modes like whatis and apropos. Run their setup -# functions if suitable. -# -special_setup() -{ - func_check special_setup '=' 0 "$@"; - if obj _OPT_APROPOS is_yes && obj _OPT_WHATIS is_yes - then - error \ - 'special_setup(): $_OPT_APROPOS and $_OPT_WHATIS are both "yes"'; - fi; - if apropos_setup || whatis_setup - then - eval "${return_ok}"; - else - eval "${return_bad}"; - fi; -} # special_setup() - - -######################################################################## -landmark '11: stack_*()'; -######################################################################## - -######################################################################## -# string_contains ( ) -# -# Test whether is contained in . -# -# Arguments : 2 text arguments. -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -string_contains() -{ - func_check string_contains '=' 2 "$@"; - case "$1" in - *${2}*) - eval "${return_yes}"; - ;; - *) - eval "${return_no}"; - ;; - esac; - eval "${return_ok}"; -} # string_contains() - - -######################################################################## -# string_not_contains ( ) -# -# Test whether is not substring of . -# -# Arguments : 2 text arguments. -# Return : `0' if arg2 is substring of arg1, `1' otherwise. -# -string_not_contains() -{ - func_check string_not_contains '=' 2 "$@"; - if string_contains "$1" "$2" - then - eval "${return_no}"; - else - eval "${return_yes}"; - fi; - eval "${return_ok}"; -} # string_not_contains() - - -######################################################################## -landmark '12: tmp_*()'; -######################################################################## - -######################################################################## -# tmp_cat () -# -# Output the temporary cat file (the concatenation of all input). -# -tmp_cat() -{ - func_check tmp_cat '=' 0 "$@"; - cat "${_TMP_CAT}"; - eval "${return_var}" "$?"; -} # tmp_cat() - - -######################################################################## -# tmp_create (?) -# -# Create temporary file. The generated name is `,' followed by -# . -# -# Argument: 0 or 1 -# -# Globals: $_TMP_DIR -# -# Output : name of created file -# -# Variable prefix: tc -# -tmp_create() -{ - func_check tmp_create '<=' 1 "$@"; - if obj _TMP_DIR is_empty || obj _TMP_DIR is_not_dir - then - error 'tmp_create(): there is no temporary directory.'; - else - # the output file does not have `,' as first character, so these are - # different names from the output file. - tc_tmp="${_TMP_DIR}/,$1"; - obj tc_tmp rm_file; - : >"${tc_tmp}" - obj tc_tmp echo1; - fi; - eval ${_UNSET} tc_tmp; - eval "${return_ok}"; -} # tmp_create() - - -######################################################################## -# to_tmp () -# -# Print file (decompressed) to the temporary cat file. -# -# Variable prefix: tt -# -to_tmp() -{ - func_check to_tmp '=' 1 "$@"; - if obj _TMP_CAT is_empty - then - error 'to_tmp(): $_TMP_CAT is not yet set'; - fi; - tt_1="$1"; - tt_so_nr=0; # number for temporary `,so,*,*' - if is_file "${tt_1}" - then - tt_dir="$(dir_name "${tt_1}")"; - if obj _OPT_WHATIS is_yes - then - whatis_filename "${tt_1}" >>"${_TMP_CAT}"; - else - _FILE_NR="$(expr ${_FILE_NR} + 1)"; - tt_file="${_TMP_DIR}/,file${_FILE_NR}"; - if obj _FILESPEC_IS_MAN is_yes - then - if obj _DEBUG_PRINT_FILENAMES is_yes - then - echo2 "file: ${tt_1}"; - fi; - tt_tmp="${_TMP_DIR}/,tmp"; - cat_z "${tt_1}" >"${tt_file}"; - grep '^\.[ ]*so[ ]' "${tt_file}" | - sed 's/^\.[ ]*so[ ]*//' >"${tt_tmp}"; - list_from_file tt_list "${tt_tmp}"; - eval set x ${tt_list}; - shift; - for i - do - tt_i="$i"; - tt_so_nr="$(expr ${tt_so_nr} + 1)"; - tt_sofile="${_TMP_DIR}/,so${_FILE_NR}_${tt_so_nr}"; - tt_sofiles="${tt_sofiles} ${tt_sofile}"; - _do_man_so "${tt_i}"; - done; - rm_file "${tt_tmp}"; - mv "${tt_file}" "${tt_tmp}"; - cat "${tt_tmp}" | soelim -I "${tt_dir}" ${_SOELIM_R} >"${tt_file}"; - for f in ${tt_sofiles} - do - rm_file_with_debug $f; - done; - rm_file "${tt_tmp}"; - else # $_FILESPEC_IS_MAN ist not yes - cat_z "${tt_1}" | soelim -I "${tt_dir}" ${_SOELIM_R} >"${tt_file}"; - fi; -### to_tmp() - obj_from_output tt_grog grog "${tt_file}"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${tt_grog}"; - case " ${tt_grog} " in - *\ -m*) - eval set x "$(echo1 " ${tt_grog} " | sed ' -s/'"${_TAB}"'/ /g -s/ */ /g -s/ -m / -m/g -s/ -mm\([^ ]\)/ -m\1/g -')"; - shift; - for i - do - tt_i="$i"; - case "${tt_i}" in - -m*) - if list_has _MACRO_PACKAGES "${tt_i}" - then - case "${_MACRO_PKG}" in - '') - _MACRO_PKG="${tt_i}"; - ;; - ${tt_i}) - :; - ;; - -m*) - echo2 "Ignore ${tt_1} because it needs ${tt_i} instead "\ -"of ${_MACRO_PKG}." - rm_file_with_debug "${tt_file}"; - eval ${_UNSET} tt_1; - eval ${_UNSET} tt_dir; - eval ${_UNSET} tt_file; - eval ${_UNSET} tt_grog; - eval ${_UNSET} tt_i; - eval ${_UNSET} tt_so_nr; - eval ${_UNSET} tt_sofile; - eval ${_UNSET} tt_sofiles; - eval ${_UNSET} tt_sofound; - eval ${_UNSET} tt_list; - eval ${_UNSET} tt_tmp; - eval "${return_bad}"; - ;; -### to_tmp() - *) - error \ -'to_tmp(): $_MACRO_PKG does not start with -m: '"${_MACRO_PKG}"; - ;; - esac; - fi; - ;; - esac; - done; - ;; - esac; - cat "${tt_file}" >>"${_TMP_CAT}"; - rm_file_with_debug "${tt_file}"; - fi; - else - error "to_tmp(): could not read file \`${tt_1}'."; - fi; - eval ${_UNSET} tt_1; - eval ${_UNSET} tt_dir; - eval ${_UNSET} tt_file; - eval ${_UNSET} tt_grog; - eval ${_UNSET} tt_i; - eval ${_UNSET} tt_so_nr; - eval ${_UNSET} tt_sofile; - eval ${_UNSET} tt_sofiles; - eval ${_UNSET} tt_sofound; - eval ${_UNSET} tt_list; - eval ${_UNSET} tt_tmp; - eval "${return_ok}"; -} # to_tmp() - - -############# -# _do_man_so () -# -# Handle single .so file name for man pages. -# -# Local function to to_tmp(). -# -# Globals from to_tmp(): $tt_tmp, $tt_sofile, $tt_file -# Globals: $_TMP_MAN -# -# Variable prefix: dms -# -_do_man_so() { - func_check _do_man_so '=' 1 "$@"; - _dms_so="$1"; # evt. with `\ ' - _dms_soname="$(echo $1 | sed 's/\\[ ]/ /g')"; # without `\ ' - case "${_dms_soname}" in - /*) # absolute path - if test -f "${_dms_soname}" - then - eval "${return_ok}"; - fi; - if test -f "${_dms_soname}"'.gz' - then - _dms_sofound="${_dms_soname}"'.gz'; - elif test -f "${_dms_soname}"'.Z' - then - _dms_sofound="${_dms_soname}"'.Z'; - elif test -f "${_dms_soname}"'.bz2' - then - _dms_sofound="${_dms_soname}"'.bz2'; - else - eval ${_UNSET} _dms_so; - eval ${_UNSET} _dms_soname; - eval "${return_ok}"; - fi; - ;; -### _do_man_so() of to_tmp() - *) # relative to man path - eval grep "'/${_dms_soname}\$'" "${_TMP_MAN}" >"${tt_tmp}"; - if is_empty_file "${tt_tmp}" - then - eval grep "'/${_dms_soname}.gz\$'" "${_TMP_MAN}" >"${tt_tmp}"; - if is_empty_file "${tt_tmp}" - then - eval grep "'/${_dms_soname}.Z\$'" "${_TMP_MAN}" >"${tt_tmp}"; - if is_empty_file "${tt_tmp}" - then - eval grep "'/${_dms_soname}.bz2\$'" "${_TMP_MAN}" >"${tt_tmp}"; - fi; - fi; - fi; - if is_empty_file "${tt_tmp}" - then - eval "${return_ok}"; - fi; - _dms_done='no'; - list_from_file _dms_list "${tt_tmp}"; - eval set x ${_dms_list}; - shift; - for i - do - _dms_sofound="$i"; - if obj _dms_sofound is_empty - then - continue; - fi; - _dms_done='yes'; - break; - done; -### _do_man_so() of to_tmp() - if obj _dms_done is_not_yes - then - eval ${_UNSET} _dms_done; - eval ${_UNSET} _dms_sofound; - eval "${return_ok}"; - fi; - ;; - esac; - if obj _DEBUG_PRINT_FILENAMES is_yes - then - echo2 "file from .so: ${_dms_so}"; - fi; - cat_z "${_dms_sofound}" >"${tt_sofile}"; - _dms_esc="$(echo ${_dms_so} | sed 's/\\/\\\\/g')"; - cat "${tt_file}" | eval sed \ -"'s#^\\.[ ]*so[ ]*\(${_dms_so}\|${_dms_esc}\|${_dms_soname}\)[ ]*\$'"\ -"'#.so ${tt_sofile}#'" \ - >"${tt_tmp}"; - rm_file "${tt_file}"; - mv "${tt_tmp}" "${tt_file}"; - eval ${_UNSET} _dms_done; - eval ${_UNSET} _dms_esc; - eval ${_UNSET} _dms_so; - eval ${_UNSET} _dms_sofound; - eval ${_UNSET} _dms_soname; - eval "${return_ok}"; -} # _do_man_so() of to_tmp() - - -######################################################################## -# to_tmp_line (...) -# -# Print single line with to the temporary cat file. -# -to_tmp_line() -{ - func_check to_tmp_line '>=' 1 "$@"; - if obj _TMP_CAT is_empty - then - error 'to_tmp_line(): $_TMP_CAT is not yet set'; - fi; - echo1 "$*" >>"${_TMP_CAT}"; - eval "${return_ok}"; -} # to_tmp_line() - - -######################################################################## -# trap_set -# -# Call function on signal 0. -# -trap_set() -{ - func_check trap_set '=' 0 "$@"; - trap 'clean_up' 0 2>${_NULL_DEV} || :; - eval "${return_ok}"; -} # trap_set() - - -######################################################################## -# trap_unset () -# -# Disable trap on signal 0. -# -trap_unset() -{ - func_check trap_unset '=' 0 "$@"; - trap '' 0 2>${_NULL_DEV} || :; - eval "${return_ok}"; -} # trap_unset() - - -######################################################################## -# usage () -# -# Print usage information to standard output; for groffer option --help. -# -usage() -{ - func_check usage = 0 "$@"; - echo; - version; - cat <) -# -# Print warning to stderr. -# -warning() -{ - echo2 "warning: $*"; -} # warning() - - -######################################################################## -# whatis_filename () -# -# Interpret as a man page and display its `whatis' -# information as a fragment written in the groff language. -# -# Globals: in: $_OPT_WHATIS, $_SPECIAL_SETUP, $_SPECIAL_FILESPEC, -# $_FILESPEC_ARG -# -# Variable prefix: wf -# -whatis_filename() -{ - func_check whatis_filename = 1 "$@"; - if obj _OPT_WHATIS is_not_yes - then - error 'whatis_filename(): $_OPT_WHATIS is not yes.'; - fi; - if obj _SPECIAL_SETUP is_not_yes - then - error \ - 'whatis_filename(): setup for whatis whatis_setup() must be run first.'; - fi; - if obj _SPECIAL_FILESPEC is_not_yes - then - error 'whatis_filename(): whatis_filespec() must be run first.'; - fi; - wf_arg="$1"; - if obj wf_arg is_not_file - then - error "whatis_filename(): argument is not a readable file." - fi; - wf_dot='^\.'"${_SPACE_SED}"'*'; -### whatis_filename() - if obj _FILESPEC_ARG is_equal '-' - then - wf_arg='stdin'; - fi; - cat <) -# -# Output path of a program and the given arguments if in $PATH. -# -# Arguments : 1, can have spaces and arguments. -# Output : list of 2 elements: prog name (with directory) and arguments -# Return : `0' if arg1 is a program in $PATH, `1' otherwise. -# -# Variable prefix: wip -# -where_is_prog() -{ - func_check where_is_prog '=' 1 "$@"; - if is_empty "$1" - then - eval "${return_bad}"; - fi; - - # Remove disturbing multiple spaces and tabs - wip_1="$(echo1 "$1" | sed 's/[ ][ ]*/ /g' | \ - sed 's/\(\\\)* / /g' | sed 's/^ //' | sed 's/ $//')"; - wip_noarg="$(echo1 "${wip_1}" | sed 's/ -.*$//')"; - exit_test; - - if obj wip_noarg is_empty - then - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_noarg; - eval "${return_bad}"; - fi; - - case "${wip_1}" in - *\ -*) - wip_args="$(echo1 "${wip_1}" | - eval sed "'s#^${wip_noarg} ##'")"; - exit_test; - ;; - *) - wip_args=''; - ;; - esac; - - wip_result=''; -### where_is_prog() - - if test -f "${wip_noarg}" && test -x "${wip_noarg}" - then - list_append wip_result "${wip_noarg}" "${wip_args}"; - exit_test; - obj wip_result echo1; - exit_test; - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_args; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_ok}"; - fi; - - # test whether $wip_noarg has directory, so it is not tested with $PATH - case "${wip_noarg}" in - */*) - # now $wip_noarg (with /) is not an executable file - - # test name with space - obj_from_output wip_name base_name "${wip_noarg}"; - obj_from_output wip_dir dir_name "${wip_noarg}"; - case "${wip_name}" in - *\ *) - wip_base="$(echo1 "${wip_name}" | sed 's/ .*$//')"; - exit_test; - obj_from_output wip_file dir_name_append "${wip_dir}" "${wip_base}"; - exit_test; -### where_is_prog() - if test -f "${wip_file}" && test -x "${wip_file}" - then - wip_baseargs="$(echo1 "${wip_name}" | - eval sed "'s#^${wip_base} ##'")"; - exit_test; - if obj wip_args is_empty - then - wip_args="${wip_baseargs}"; - else - wip_args="${wip_baseargs} ${wip_args}"; - fi; - - list_append wip_result "${wip_file}" "${wip_args}"; - exit_test; - obj wip_result echo1; - exit_test; - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_args; - eval ${_UNSET} wip_base; - eval ${_UNSET} wip_baseargs; - eval ${_UNSET} wip_dir; - eval ${_UNSET} wip_file; - eval ${_UNSET} wip_name; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_ok}"; - fi; # test ${wip_file} - ;; - esac; # end of test name with space - -### where_is_prog() - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_args; - eval ${_UNSET} wip_base; - eval ${_UNSET} wip_dir; - eval ${_UNSET} wip_name; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_bad}"; - ;; - esac; # test of $wip_noarg on path with directory - - - # now $wip_noarg does not have a /, so it is checked with $PATH. - - eval set x "$(path_list "${PATH}")"; - exit_test; - shift; - - # test path with $win_noarg, evt. with spaces - for d - do - wip_dir="$d"; - obj_from_output wip_file dir_name_append "${wip_dir}" "${wip_noarg}"; -### where_is_prog() - - # test $win_file on executable file - if test -f "${wip_file}" && test -x "${wip_file}" - then - list_append wip_result "${wip_file}" "${wip_args}"; - exit_test; - obj wip_result echo1; - exit_test; - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_dir; - eval ${_UNSET} wip_file; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_ok}"; - fi; # test $win_file on executable file - done; # test path with $win_prog with spaces - - case "${wip_noarg}" in - *\ *) - # test on path with base name without space - wip_base="$(echo1 "${wip_noarg}" | sed 's/^\([^ ]*\) .*$/\1/')"; - exit_test; - for d - do - wip_dir="$d"; - obj_from_output wip_file dir_name_append "${wip_dir}" "${wip_base}"; - exit_test; -### where_is_prog() - - # test $win_file on executable file - if test -f "${wip_file}" && test -x "${wip_file}" - then - wip_baseargs="$(echo1 "${wip_noarg}" | - sed 's/[^ ]* \(.*\)$/\1/')"; - exit_test; - if obj wip_args is_empty - then - wip_args="${wip_baseargs}"; - else - wip_args="${wip_args} ${wip_baseargs}"; - fi; - list_append wip_result "${wip_file}" "${wip_args}"; - exit_test; - obj wip_result echo1; - exit_test; - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_args; - eval ${_UNSET} wip_base; - eval ${_UNSET} wip_baseargs; - eval ${_UNSET} wip_dir; - eval ${_UNSET} wip_file; - eval ${_UNSET} wip_name; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_ok}"; - fi; # test of $wip_file on executable file - done; # test path with base name without space -### where_is_prog() - ;; - esac; # test of $wip_noarg on space - - eval ${_UNSET} wip_1; - eval ${_UNSET} wip_args; - eval ${_UNSET} wip_base; - eval ${_UNSET} wip_baseargs; - eval ${_UNSET} wip_dir; - eval ${_UNSET} wip_file; - eval ${_UNSET} wip_name; - eval ${_UNSET} wip_noarg; - eval ${_UNSET} wip_result; - eval "${return_bad}"; -} # where_is_prog() - - -######################################################################## -# main* Functions -######################################################################## - -# The main area contains the following parts: -# - main_init(): initialize temporary files and set exit trap -# - main_parse_MANOPT(): parse $MANOPT -# - main_parse_args(): argument parsing -# - main_set_mode (): determine the display mode -# - main_do_fileargs(): process filespec arguments -# - main_set_resources(): setup X resources -# - main_display(): do the displaying -# - main(): the main function that calls all main_*() - - -####################################################################### -# main_init () -# -# Set exit trap and create temporary directory and some temporary files. -# -# Globals: $_TMP_DIR, $_TMP_CAT, $_TMP_STDIN -# -# Variable prefix: mi -# -main_init() -{ - func_check main_init = 0 "$@"; - # call clean_up() on shell termination. - trap_set; - - # create temporary directory - umask 0077; - _TMP_DIR=''; - for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \ - "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.' - do - mi_dir="$d"; - if obj mi_dir is_empty || obj mi_dir is_not_dir || \ - obj mi_dir is_not_writable - then - continue; - fi; - - case "${mi_dir}" in - */) - _TMP_DIR="${mi_dir}"; - ;; - *) - _TMP_DIR="${mi_dir}"'/'; - ;; - esac; - _TMP_DIR="${_TMP_DIR}groffer${_PROCESS_ID}"; - if obj _TMP_DIR rm_tree - then - : - else - mi_tdir_="${_TMP_DIR}"_; - mi_n=1; - mi_tdir_n="${mi_tdir_}${mi_n}"; -### main_init() - while obj mi_tdir_n is_existing - do - if obj mi_tdir_n rm_tree - then - # directory could not be removed - mi_n="$(expr "${mi_n}" + 1)"; - mi_tdir_n="${mi_tdir_}${mi_n}"; - continue; - fi; - done; - _TMP_DIR="${mi_tdir_n}"; - fi; - eval mkdir "${_TMP_DIR}"; - if is_not_equal "$?" 0 - then - obj _TMP_DIR rm_tree; - _TMP_DIR=''; - continue; - fi; - if obj _TMP_DIR is_dir && obj _TMP_DIR is_writable - then - # $_TMP_DIR can now be used as temporary directory - break; - fi; - obj _TMP_DIR rm_tree; - _TMP_DIR=''; - continue; - done; - if obj _TMP_DIR is_empty - then - error "main_init(): \ -Couldn't create a directory for storing temporary files."; - fi; -### main_init() - if obj _DEBUG_PRINT_TMPDIR is_yes - then - echo2 "temporary directory: ${_TMP_DIR}"; - fi; - - obj_from_output _TMP_CAT tmp_create groffer_cat; - obj_from_output _TMP_STDIN tmp_create groffer_input; - - eval ${_UNSET} mi_dir; - eval ${_UNSET} mi_n; - eval ${_UNSET} mi_tdir_; - eval ${_UNSET} mi_tdir_n; - eval "${return_ok}"; -} # main_init() - - -######################################################################## -# main_parse_MANOPT () -# -# Parse $MANOPT to retrieve man options, but only if it is a non-empty -# string; found man arguments can be overwritten by the command line. -# -# Globals: -# in: $MANOPT, $_OPTS_MANOPT_* -# out: $_MANOPT_* -# -# Variable prefix: mpm -# -main_parse_MANOPT() -{ - func_check main_parse_MANOPT = 0 "$@"; - - if obj MANOPT is_not_empty - then - # Delete leading and final spaces - MANOPT="$(echo1 "${MANOPT}" | sed ' -s/^'"${_SPACE_SED}"'*// -s/'"${_SPACE_SED}"'*$// -')"; - exit_test; - fi; - if obj MANOPT is_empty - then - eval "${return_ok}"; - fi; - - mpm_list=''; - # add arguments in $MANOPT by mapping them to groffer options - eval set x "$(list_from_cmdline _OPTS_MANOPT "${MANOPT}")"; - exit_test; - shift; - until test "$#" -le 0 || is_equal "$1" '--' - do - mpm_opt="$1"; - shift; - case "${mpm_opt}" in - -7|--ascii) - list_append mpm_list '--ascii'; - ;; - -a|--all) - list_append mpm_list '--all'; - ;; -### main_parse_MANOPT() - -c|--catman) - do_nothing; - shift; - ;; - -d|--debug) - do_nothing; - ;; - -D|--default) - # undo all man options so far - mpm_list=''; - ;; - -e|--extension) - list_append mpm_list '--extension'; - shift; - ;; - -f|--whatis) - list_append mpm_list '--whatis'; - shift; - ;; - -h|--help) - do_nothing; - ;; - -k|--apropos) - # groffer's --apropos takes an argument, but man's does not, so - do_nothing; - ;; - -l|--local-file) - do_nothing; - ;; - -L|--locale) - list_append mpm_list '--locale' "$1"; - shift; - ;; -### main_parse_MANOPT() - -m|--systems) - list_append mpm_list '--systems' "$1"; - shift; - ;; - -M|--manpath) - list_append mpm_list '--manpath' "$1"; - shift; - ;; - -p|--preprocessor) - do_nothing; - shift; - ;; - -P|--pager) - list_append mpm_list '--pager' "$1"; - shift; - ;; - -r|--prompt) - do_nothing; - shift; - ;; - -S|--sections) - list_append mpm_list '--sections' "$1"; - shift; - ;; - -t|--troff) - do_nothing; - ;; - -T|--device) - list_append mpm_list '-T' "$1"; - shift; - ;; -### main_parse_MANOPT() - -u|--update) - do_nothing; - ;; - -V|--version) - do_nothing; - ;; - -w|--where|--location) - list_append mpm_list '--location'; - ;; - -Z|--ditroff) - do_nothing; - ;; - # ignore all other options - esac; - done; - - # prepend $mpm_list to the command line - if obj mpm_list is_not_empty - then - eval set x "${mpm_list}" '"$@"'; - shift; - fi; - - eval ${_UNSET} mpm_list; - eval ${_UNSET} mpm_opt; - eval "${return_ok}"; -} # main_parse_MANOPT() - - -######################################################################## -# main_parse_args (*) -# -# Parse arguments; process options and filespec parameters. -# -# Arguments: pass the command line arguments unaltered. -# Globals: -# in: $_OPTS_* -# out: $_OPT_*, $_ADDOPTS, $_FILEARGS -# -# Variable prefix: mpa -# -main_parse_args() -{ - func_check main_parse_args '>=' 0 "$@"; - obj_from_output _ALL_PARAMS list_from_cmdline_with_minus _OPTS_CMDLINE "$@"; - if obj _DEBUG_PRINT_PARAMS is_yes - then - echo2 "parameters: ${_ALL_PARAMS}"; - fi; - eval set x "${_ALL_PARAMS}"; - shift; - - # By the call of `eval', unnecessary quoting was removed. So the - # positional shell parameters ($1, $2, ...) are now guaranteed to - # represent an option or an argument to the previous option, if any; - # then a `--' argument for separating options and - # parameters; followed by the filespec parameters if any. - - # Note, the existence of arguments to options has already been checked. - # So a check for `$#' or `--' should not be done for arguments. - - until test "$#" -le 0 || is_equal "$1" '--' - do - mpa_opt="$1"; # $mpa_opt is fed into the option handler - shift; - case "${mpa_opt}" in - -h|--help) - usage; - leave; - ;; - -Q|--source) # output source code (`Quellcode'). - _OPT_MODE='source'; - ;; -### main_parse_args() - -T|--device|--troff-device) # device; arg - _OPT_DEVICE="$1"; - _check_device_with_mode; - shift; - ;; - -v|--version) - version; - leave; - ;; - -V) - _OPT_V='yes'; - ;; - -Z|--ditroff|--intermediate-output) # groff intermediate output - _OPT_Z='yes'; - ;; - -X) - _OPT_MODE=X; - ;; - -?) - # delete leading `-' - mpa_optchar="$(echo1 "${mpa_opt}" | sed 's/^-//')"; - exit_test; - if list_has _OPTS_GROFF_SHORT_NA "${mpa_optchar}" - then - list_append _ADDOPTS_GROFF "${mpa_opt}"; - elif list_has _OPTS_GROFF_SHORT_ARG "${mpa_optchar}" - then - list_append _ADDOPTS_GROFF "${mpa_opt}" "$1"; - shift; -### main_parse_args() - else - error "main_parse_args(): Unknown option : \`$1'"; - fi; - ;; - --all) - _OPT_ALL='yes'; - ;; - --apropos) # run `apropos' - _OPT_APROPOS='yes'; - _APROPOS_SECTIONS=''; - _OPT_WHATIS='no'; - ;; - --apropos-data) # run `apropos' for data sections - _OPT_APROPOS='yes'; - _APROPOS_SECTIONS='457'; - _OPT_WHATIS='no'; - ;; - --apropos-devel) # run `apropos' for development sections - _OPT_APROPOS='yes'; - _APROPOS_SECTIONS='239'; - _OPT_WHATIS='no'; - ;; - --apropos-progs) # run `apropos' for program sections - _OPT_APROPOS='yes'; - _APROPOS_SECTIONS='168'; - _OPT_WHATIS='no'; - ;; -### main_parse_args() - --ascii) - list_append _ADDOPTS_GROFF '-mtty-char'; - if obj _OPT_MODE is_empty - then - _OPT_MODE='text'; - fi; - ;; - --auto) # the default automatic mode - _OPT_MODE=''; - ;; - --bd|--bordercolor) # border color for viewers, arg; - _OPT_BD="$1"; - shift; - ;; - --bg|--backgroud) # background color for viewers, arg; - _OPT_BG="$1"; - shift; - ;; - --bw|--borderwidth) # border width for viewers, arg; - _OPT_BW="$1"; - shift; - ;; - --debug|--debug-all|--debug-filenames|--debug-func|--debug-not-func|\ ---debug-grog|--debug-keep|--debug-lm|--debug-params|--debug-shell|\ ---debug-stacks|--debug-tmpdir|--debug-user) - # debug is handled at the beginning - :; - ;; - --default) # reset variables to default - reset; - ;; -### main_parse_args() - --default-modes) # sequence of modes in auto mode; arg - _OPT_DEFAULT_MODES="$1"; - shift; - ;; - --display) # set X display, arg - _OPT_DISPLAY="$1"; - shift; - ;; - --do-nothing) - _OPT_DO_NOTHING='yes'; - ;; - --dvi) - _OPT_MODE='dvi'; - ;; - --dvi-viewer|--dvi-viewer-tty) # viewer program for dvi mode; arg - _OPT_VIEWER_DVI="$1"; - shift; - ;; - --extension) # the extension for man pages, arg - _OPT_EXTENSION="$1"; - shift; - ;; -### main_parse_args() - --fg|--foreground) # foreground color for viewers, arg; - _OPT_FG="$1"; - shift; - ;; - --fn|--ft|--font) # set font for viewers, arg; - _OPT_FN="$1"; - shift; - ;; - --geometry) # window geometry for viewers, arg; - _OPT_GEOMETRY="$1"; - shift; - ;; - --groff) - _OPT_MODE='groff'; - ;; - --html|--www) # display with web browser - _OPT_MODE=html; - ;; - --html-viewer|--www-viewer|--html-viewer-tty|--www-viewer-tty) - # viewer program for html mode; arg - _OPT_VIEWER_HTML="$1"; - shift; - ;; - --iconic) # start viewers as icons - _OPT_ICONIC='yes'; - ;; -### main_parse_args() - --locale) # set language for man pages, arg - # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) - _OPT_LANG="$1"; - shift; - ;; - --local-file) # force local files; same as `--no-man' - _MAN_FORCE='no'; - _MAN_ENABLE='no'; - ;; - --location|--where) # print file locations to stderr - _DEBUG_PRINT_FILENAMES='yes'; - ;; - --man) # force all file params to be man pages - _MAN_ENABLE='yes'; - _MAN_FORCE='yes'; - ;; - --manpath) # specify search path for man pages, arg - # arg is colon-separated list of directories - _OPT_MANPATH="$1"; - shift; - ;; - --mode) # display mode - mpa_arg="$1"; - shift; - case "${mpa_arg}" in - auto|'') # search mode automatically among default - _OPT_MODE=''; - ;; - groff) # pass input to plain groff - _OPT_MODE='groff'; - ;; -### main_parse_args() - html|www) # display with a web browser - _OPT_MODE='html'; - ;; - dvi) # display with xdvi viewer - _OPT_MODE='dvi'; - ;; - pdf) # display with PDF viewer - _OPT_MODE='pdf'; - ;; - ps) # display with Postscript viewer - _OPT_MODE='ps'; - ;; - text) # output on terminal - _OPT_MODE='text'; - ;; - tty) # output on terminal - _OPT_MODE='tty'; - ;; - X|x) # output on X roff viewer - _OPT_MODE='x'; - ;; -### main_parse_args() - Q|source) # display source code - _OPT_MODE="source"; - ;; - *) - error "main_parse_args(): unknown mode ${mpa_arg}"; - ;; - esac; - ;; - --no-location) # disable former call to `--location' - _DEBUG_PRINT_FILENAMES='no'; - ;; - --no-man) # disable search for man pages - # the same as --local-file - _MAN_FORCE='no'; - _MAN_ENABLE='no'; - ;; - --no-special) # disable some special former calls - _OPT_ALL='no' - _OPT_APROPOS='no' - _OPT_WHATIS='no' - ;; - --pager|--tty-viewer|--tty-viewer-tty) - # set paging program for tty mode, arg - _OPT_PAGER="$1"; - shift; - ;; - --pdf) - _OPT_MODE='pdf'; - ;; -### main_parse_args() - --pdf-viewer|--pdf-viewer-tty) # viewer program for pdf mode; arg - _OPT_VIEWER_PDF="$1"; - shift; - ;; - --print) # for argument test - echo2 "$1"; - shift; - ;; - --ps) - _OPT_MODE='ps'; - ;; - --ps-viewer|--ps-viewer-tty) # viewer program for ps mode; arg - _OPT_VIEWER_PS="$1"; - shift; - ;; -### main_parse_args() - --resolution) # set resolution for X devices, arg - mpa_arg="$1"; - shift; - case "${mpa_arg}" in - 75|75dpi) - mpa_dpi=75; - ;; - 100|100dpi) - mpa_dpi=100; - ;; - *) - error "main_parse_args(): \ -only resoutions of 75 or 100 dpi are supported"; - ;; - esac; - _OPT_RESOLUTION="${mpa_dpi}"; - ;; - --rv) - _OPT_RV='yes'; - ;; - --sections) # specify sections for man pages, arg - # arg is colon-separated list of section names - _OPT_SECTIONS="$1"; - shift; - ;; - --shell) - # already done during the first run; so ignore the argument - shift; - ;; -### main_parse_args() - --systems) # man pages for different OS's, arg - # argument is a comma-separated list - _OPT_SYSTEMS="$1"; - shift; - ;; - --text) # text mode without pager - _OPT_MODE=text; - ;; - --title) # title for X viewers; arg - if is_not_empty "$1" - then - list_append _OPT_TITLE "$1"; - fi; - shift; - ;; - --to-stdout) # print mode file without display - _OPT_STDOUT='yes'; - ;; - --tty) # tty mode, text with pager - _OPT_MODE=tty; - ;; - --text-device|--tty-device) # device for tty mode; arg - _OPT_TEXT_DEVICE="$1"; - shift; - ;; - --whatis) - _OPT_WHATIS='yes'; - _OPT_APROPOS='no'; - ;; - --X|--x) - _OPT_MODE=x; - ;; -### main_parse_args() - --xrm) # pass X resource string, arg; - list_append _OPT_XRM "$1"; - shift; - ;; - --x-viewer|--X-viewer|--x-viewer-tty|--X-viewer-tty) - # viewer program for x mode; arg - _OPT_VIEWER_X="$1"; - shift; - ;; - *) - error 'main_parse_args(): unknown option '"\`${mpa_opt}'."; - ;; - esac; - done; - shift; # remove `--' argument - - if obj _OPT_WHATIS is_yes - then - _MAN_ALL='yes'; - _APROPOS_SECTIONS=''; - fi; - - if obj _OPT_DO_NOTHING is_yes - then - leave; - fi; - -### main_parse_args() - case "$_OPT_DEFAULT_MODES" in - '') :; ;; - *,*) - obj_from_output _OPT_DEFAULT_MODES \ - obj _OPT_DEFAULT_MODES list_from_split ','; - ;; - *) :; ;; - esac; - - # Remaining arguments are file names (filespecs). - # Save them to list $_FILEARGS - if is_equal "$#" 0 - then # use "-" for standard input - _NO_FILESPECS='yes'; - set x '-'; - shift; - fi; - _FILEARGS=''; - list_append _FILEARGS "$@"; - # $_FILEARGS must be retrieved with `eval set x "$_FILEARGS"; shift;' - eval ${_UNSET} mpa_arg; - eval ${_UNSET} mpa_dpi; - eval ${_UNSET} mpa_opt; - eval ${_UNSET} mpa_optchar; - eval "${return_ok}"; -} # main_parse_args() - - -# Called from main_parse_args() because double `case' is not possible. -# Globals: $_OPT_DEVICE, $_OPT_MODE -_check_device_with_mode() -{ - func_check _check_device_with_mode = 0 "$@"; - case "${_OPT_DEVICE}" in - dvi) - _OPT_MODE=dvi; - eval "${return_ok}"; - ;; - html) - _OPT_MODE=html; - eval "${return_ok}"; - ;; - lbp|lj4) - _OPT_MODE=groff; - eval "${return_ok}"; - ;; - ps) - _OPT_MODE=ps; - eval "${return_ok}"; - ;; - ascii|cp1047|latin1|utf8) - if obj _OPT_MODE is_not_equal text - then - _OPT_MODE=tty; # default text mode - fi; - eval "${return_ok}"; - ;; - X*) - _OPT_MODE=x; - eval "${return_ok}"; - ;; - *) # unknown device, go to groff mode - _OPT_MODE=groff; - eval "${return_ok}"; - ;; - esac; - eval "${return_error}"; -} # _check_device_with_mode() of main_parse_args() - - -######################################################################## -# main_set_mode () -# -# Determine the display mode and the corresponding viewer program. -# -# Globals: -# in: $DISPLAY, $_OPT_MODE, $_OPT_DEVICE -# out: $_DISPLAY_MODE -# -# Variable prefix: msm -# -main_set_mode() -{ - func_check main_set_mode = 0 "$@"; - - # set display - if obj _OPT_DISPLAY is_not_empty - then - DISPLAY="${_OPT_DISPLAY}"; - fi; - - if obj _OPT_V is_yes - then - list_append _ADDOPTS_GROFF '-V'; - fi; - if obj _OPT_Z is_yes - then - _DISPLAY_MODE='groff'; - list_append _ADDOPTS_GROFF '-Z'; - fi; - if obj _OPT_MODE is_equal 'groff' - then - _DISPLAY_MODE='groff'; - fi; - if obj _DISPLAY_MODE is_equal 'groff' - then - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - fi; - -### main_set_mode() - - case "${_OPT_MODE}" in - '') # automatic mode - case "${_OPT_DEVICE}" in - X*) - if is_not_X - then - error_user "no X display found for device ${_OPT_DEVICE}"; - fi; - _DISPLAY_MODE='x'; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - ascii|cp1047|latin1|utf8) - if obj _DISPLAY_MODE is_not_equal 'text' - then - _DISPLAY_MODE='tty'; - fi; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; -### main_set_mode() - esac; - if is_not_X - then - _DISPLAY_MODE='tty'; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - fi; - - if obj _OPT_DEFAULT_MODES is_empty - then - msm_modes="${_DEFAULT_MODES}"; - else - msm_modes="${_OPT_DEFAULT_MODES}"; - fi; - ;; - source) - _DISPLAY_MODE='source'; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - text) - _DISPLAY_MODE='text'; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - tty) - _DISPLAY_MODE='tty'; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; -### main_set_mode() - html) - _DISPLAY_MODE='html'; - msm_modes="${_OPT_MODE}"; - ;; - *) # display mode was given - msm_modes="${_OPT_MODE}"; - ;; - esac; - - eval set x "${msm_modes}"; - shift; - while is_greater_than "$#" 0 - do - msm_1="$1"; - shift; - - _VIEWER_BACKGROUND='no'; - - case "${msm_1}" in - dvi) - _get_prog_args DVI; - if is_not_equal "$?" 0 - then - continue; - fi; - if obj _DISPLAY_PROG is_empty - then - if is_equal "$#" 0 - then - error 'main_set_mode(): No viewer for dvi mode available.'; - else - continue; - fi; - fi; -### main_set_mode() - _DISPLAY_MODE="dvi"; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - html) - _get_prog_args HTML; - if is_not_equal "$?" 0 - then - continue; - fi; - if obj _DISPLAY_PROG is_empty - then - if is_equal "$#" 0 - then - error 'main_set_mode(): No viewer for html mode available.'; - else - continue; - fi; - fi; -### main_set_mode() - _DISPLAY_MODE=html; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - pdf) - if obj _PDF_DID_NOT_WORK is_yes - then - if is_equal "$#" 0 - then - error 'main_set_mode(): pdf mode did not work.'; - else - continue; - fi; - fi; - if obj _PDF_HAS_PS2PDF is_not_yes - then - if is_prog ps2pdf - then - _PDF_HAS_PS2PDF='yes'; - fi; - fi; - if obj _PDF_HAS_GS is_not_yes - then - if is_prog gs - then - _PDF_HAS_GS='yes'; - fi; - fi; - _get_prog_args PDF; - if is_not_equal "$?" 0 - then - _PDF_DID_NOT_WORK='yes'; - continue; - fi; - if obj _DISPLAY_PROG is_empty - then - _PDF_DID_NOT_WORK='yes'; - if is_equal "$#" 0 - then - error 'main_set_mode(): No viewer for pdf mode available.'; - else - continue; - fi; - fi; - _DISPLAY_MODE="pdf"; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; -### main_set_mode() - ps) - _get_prog_args PS; - if is_not_equal "$?" 0 - then - continue; - fi; - if obj _DISPLAY_PROG is_empty - then - if is_equal "$#" 0 - then - error 'main_set_mode(): No viewer for ps mode available.'; - else - continue; - fi; - fi; - _DISPLAY_MODE="ps"; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - text) - _DISPLAY_MODE='text'; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; -### main_set_mode() - tty) - _DISPLAY_MODE='tty'; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - x) - _get_prog_args x; - if is_not_equal "$?" 0 - then - continue; - fi; - if obj _DISPLAY_PROG is_empty - then - if is_equal "$#" 0 - then - error 'main_set_mode(): No viewer for x mode available.'; - else - continue; - fi; - fi; - _DISPLAY_MODE='x'; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; -### main_set_mode() - X) - _DISPLAY_MODE='X'; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - eval "${return_ok}"; - ;; - esac; - done; - eval ${_UNSET} msm_1; - eval ${_UNSET} msm_modes; - eval ${_UNSET} msm_viewers; - error_user "No suitable display mode found."; -} # main_set_mode() - - -# _get_prog_args () -# -# Simplification for loop in main_set_mode(). -# -# Globals in/out: $_VIEWER_BACKGROUND -# Globals in : $_OPT_VIEWER_, $_VIEWER__X, $_VIEWER__TTY -# -# Variable prefix: _gpa -# -_get_prog_args() -{ - func_check _get_prog_args '=' 1 "$@"; - - x="$(echo1 $1 | tr [a-z] [A-Z])"; - eval _gpa_opt='"${_OPT_VIEWER_'"$x"'}"'; - _gpa_xlist=_VIEWER_"$x"_X; - _gpa_ttylist=_VIEWER_"$x"_TTY; - - if obj _gpa_opt is_empty - then - _VIEWER_BACKGROUND='no'; - if is_X - then - _get_first_prog "${_gpa_xlist}"; - x="$?"; - if is_equal "$x" 0 - then - _VIEWER_BACKGROUND='yes'; - fi; - else - _get_first_prog "${_gpa_ttylist}"; - x="$?"; - fi; - exit_test; - eval ${_UNSET} _gpa_opt; - eval ${_UNSET} _gpa_prog; - eval ${_UNSET} _gpa_ttylist; - eval ${_UNSET} _gpa_xlist; - eval "${return_var} $x"; -### _get_prog_args() of main_set_mode() - else # $_gpa_opt is not empty - obj_from_output _gpa_prog where_is_prog "${_gpa_opt}"; - if is_not_equal "$?" 0 || obj _gpa_prog is_empty - then - exit_test; - echo2 "_get_prog_args(): '${_gpa_opt}' is not an existing program."; - eval ${_UNSET} _gpa_opt; - eval ${_UNSET} _gpa_prog; - eval ${_UNSET} _gpa_ttylist; - eval ${_UNSET} _gpa_xlist; - eval "${return_bad}"; - fi; - exit_test; - - # $_gpa_prog from opt is an existing program - -### _get_prog_args() of main_set_mode() - if is_X - then - eval _check_prog_on_list ${_gpa_prog} ${_gpa_xlist}; - if is_equal "$?" 0 - then - _VIEWER_BACKGROUND='yes'; - else - _VIEWER_BACKGROUND='no'; - eval _check_prog_on_list ${_gpa_prog} ${_gpa_ttylist}; - fi; - else # is not X - _VIEWER_BACKGROUND='no'; - eval _check_prog_on_list ${_gpa_prog} ${_gpa_ttylist}; - fi; # is_X - fi; # test of $_gpa_opt - eval ${_UNSET} _gpa_opt; - eval ${_UNSET} _gpa_prog; - eval ${_UNSET} _gpa_ttylist; - eval ${_UNSET} _gpa_xlist; - eval "${return_good}"; -} # _get_prog_args() of main_set_mode() - - -# _get_first_prog () -# -# Retrieve from the elements of the list in the argument the first -# existing program in $PATH. -# -# Local function for main_set_mode(). -# -# Return : `1' if none found, `0' if found. -# Output : none -# -# Variable prefix: _gfp -# -_get_first_prog() -{ - func_check _get_first_prog '=' 1 "$@"; - eval x='"${'"$1"'}"'; - eval set x "$x"; - shift; - for i - do - _gfp_i="$i"; - if obj _gfp_i is_empty - then - continue; - fi; - obj_from_output _gfp_result where_is_prog "${_gfp_i}"; - if is_equal "$?" 0 && obj _gfp_result is_not_empty - then - exit_test; - eval set x ${_gfp_result}; - shift; - _DISPLAY_PROG="$1"; - _DISPLAY_ARGS="$2"; - eval ${_UNSET} _gfp_i; - eval ${_UNSET} _gfp_result; - eval "${return_good}"; - fi; - exit_test; - done; - eval ${_UNSET} _gfp_i; - eval ${_UNSET} _gfp_result; - eval "${return_bad}"; -} # _get_first_prog() of main_set_mode() - - -# _check_prog_on_list ( ) -# -# Check whether the content of is in the list . -# The globals are set correspondingly. -# -# Local function for main_set_mode(). -# -# Arguments: 3 -# -# Return : `1' if not a part of the list, `0' if found in the list. -# Output : none -# -# Globals in : $_VIEWER__X, $_VIEWER__TTY -# Globals in/out: $_DISPLAY_PROG, $_DISPLAY_ARGS -# -# Variable prefix: _cpol -# -_check_prog_on_list() -{ - func_check _check_prog_on_list '=' 3 "$@"; - _DISPLAY_PROG="$1"; - _DISPLAY_ARGS="$2"; - - eval _cpol_3='"${'"$3"'}"'; - eval set x "${_cpol_3}"; - shift; - eval ${_UNSET} _cpol_3; - - for i - do - _cpol_i="$i"; - obj_from_output _cpol_list where_is_prog "${_cpol_i}"; - if is_not_equal "$?" 0 || obj _cpol_list is_empty - then - exit_test; - continue; - fi; - exit_test; - _cpol_prog="$(eval set x ${_cpol_list}; shift; echo1 "$1")"; - - if is_not_equal "${_DISPLAY_PROG}" "${_cpol_prog}" - then - exit_test; - continue; - fi; - exit_test; -### _check_prog_on_list() of main_set_mode() - - # equal, prog found - - _cpol_args="$(eval set x ${_cpol_list}; shift; echo1 "$2")"; - eval ${_UNSET} _cpol_list; - if obj _cpol_args is_not_empty - then - if obj _DISPLAY_ARGS is_empty - then - _DISPLAY_ARGS="${_cpol_args}"; - else - _DISPLAY_ARGS="${_cpol_args} ${_DISPLAY_ARGS}"; - fi; - fi; - - eval ${_UNSET} _cpol_i; - eval ${_UNSET} _cpol_args; - eval ${_UNSET} _cpol_prog; - eval "${return_good}"; - done; # for vars in list - - # prog was not in the list - eval ${_UNSET} _cpol_i; - eval ${_UNSET} _cpol_args; - eval ${_UNSET} _cpol_list; - eval ${_UNSET} _cpol_prog; - eval "${return_bad}"; -} # _check_prog_on_list() of main_set_mode() - - -####################################################################### -# main_do_fileargs () -# -# Process filespec arguments. -# -# Globals: -# in: $_FILEARGS (process with `eval set x "$_FILEARGS"; shift;') -# -# Variable prefix: mdfa -# -main_do_fileargs() -{ - func_check main_do_fileargs = 0 "$@"; - special_setup; - if obj _OPT_APROPOS is_yes - then - if obj _NO_FILESPECS is_yes - then - apropos_filespec; - eval "${return_ok}"; - fi; - else - if list_has _FILEARGS '-' - then - save_stdin; - fi; - fi; - eval set x "${_FILEARGS}"; - shift; - eval ${_UNSET} _FILEARGS; -### main_do_fileargs() - while is_greater_than "$#" 0 - do - mdfa_filespec="$1"; - _FILESPEC_ARG="$1"; - shift; - _FILESPEC_IS_MAN='no'; - _TMP_MANSPEC=''; - _SPECIAL_FILESPEC='no'; - - case "${mdfa_filespec}" in - '') - continue; - ;; - esac; - - # check for file - case "${mdfa_filespec}" in - '-') - special_filespec; - if obj _OPT_APROPOS is_yes - then - continue; - fi; - register_file '-'; - continue; - ;; -### main_do_fileargs() - */*) - special_filespec; - if obj _OPT_APROPOS is_yes - then - continue; - fi; - if obj mdfa_filespec is_file - then - obj mdfa_filespec register_file; - else - echo2 "The argument ${mdfa_filespec} is not a file."; - fi; - continue; - ;; - *) - if obj _OPT_APROPOS is_yes - then - special_filespec; - continue; - fi; - # check whether filespec is an existing file - if obj _MAN_FORCE is_not_yes - then - if obj mdfa_filespec is_file - then - special_filespec; - obj mdfa_filespec register_file; - continue; - fi; - fi; - ;; - esac; -### main_do_fileargs() - - # now it must be a man page pattern - - if obj _MACRO_PKG is_not_empty && obj _MACRO_PKG is_not_equal '-man' - then - echo2 "${mdfa_filespec} is not a file, man pages are ignored "\ -"due to ${_MACRO_PKG}."; - continue; - fi; - - # check for man page - if obj _MAN_ENABLE is_not_yes - then - echo2 "The argument ${mdfa_filespec} is not a file."; - continue; - fi; - if obj _MAN_FORCE is_yes - then - mdfa_errmsg='is not a man page.'; - else - mdfa_errmsg='is neither a file nor a man page.'; - fi; -### main_do_fileargs() - man_setup; - _FILESPEC_IS_MAN='yes'; - - # test filespec with `man:...' or `...(...)' on man page - mdfa_name=''; - mdfa_section=''; - mdfa_ext=''; - - mdfa_names="${mdfa_filespec}"; - case "${mdfa_filespec}" in - man:*) - mdfa_names="${mdfa_names} "\ -"$(obj mdfa_filespec echo1 | sed 's/^man://')"; - ;; - esac; - - mdfa_continue='no'; - for i in ${mdfa_names} - do - mdfa_i=$i; - if obj mdfa_i man_is_man - then - special_filespec; - obj mdfa_i man_get; - mdfa_continue='yes'; - break; - fi; - case "${mdfa_i}" in - *\(${_MAN_AUTO_SEC_CHARS}*\)) - mdfa_section="$(obj mdfa_i echo1 | sed 's/^[^(]*(\(.\).*)$/\1/')"; - mdfa_name="$(obj mdfa_i echo1 | sed 's/^\([^(]*\)(.*)$/\1/')"; - mdfa_ext="$(obj mdfa_i echo1 | sed 's/^[^(]*(.\(.*\))$/\1/')"; - if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}" - then - special_filespec; - man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"; - mdfa_continue='yes'; - break; - fi; - ;; - *.${_MAN_AUTO_SEC_CHARS}*) - mdfa_name="$(obj mdfa_i echo1 | \ - sed 's/^\(.*\)\.'"${_MAN_AUTO_SEC_CHARS}"'.*$/\1/')"; - mdfa_section="$(obj mdfa_i echo1 | \ - sed 's/^.*\.\('"${_MAN_AUTO_SEC_CHARS}"'\).*$/\1/')"; - mdfa_ext="$(obj mdfa_i echo1 | \ - sed 's/^.*\.'"${_MAN_AUTO_SEC_CHARS}"'\(.*\)$/\1/')"; - if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}" - then - special_filespec; - man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"; - mdfa_continue='yes'; - break; - fi; - ;; - esac; - done; - - if obj mdfa_continue is_yes - then - continue; - fi; - -### main_do_fileargs() - # check on "s name", where "s" is a section with or without an extension - if is_not_empty "$1" - then - mdfa_name="$1"; - case "${mdfa_filespec}" in - ${_MAN_AUTO_SEC_CHARS}) - mdfa_section="${mdfa_filespec}"; - mdfa_ext=''; - ;; - ${_MAN_AUTO_SEC_CHARS}*) - mdfa_section="$(echo1 "${mdfa_filespec}" | \ - sed 's/^\(.\).*$/\1/')"; - mdfa_ext="$(echo1 "${mdfa_filespec}" | \ - sed 's/^.\(.*\)$/\1/')"; - ;; - *) - echo2 "${mdfa_filespec} ${mdfa_errmsg}"; - continue; - ;; - esac; - shift; - if man_is_man "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}" - then - _FILESPEC_ARG="${mdfa_filespec} ${mdfa_name}"; - special_filespec; - man_get "${mdfa_name}" "${mdfa_section}" "${mdfa_ext}"; - continue; - else - echo2 "No man page for ${mdfa_name} with section ${mdfa_filespec}."; - continue; - fi; - fi; - -### main_do_fileargs() - echo2 "${mdfa_filespec} ${mdfa_errmsg}"; - continue; - done; - - obj _TMP_STDIN rm_file_with_debug; - eval ${_UNSET} mdfa_filespec; - eval ${_UNSET} mdfa_i; - eval ${_UNSET} mdfa_name; - eval ${_UNSET} mdfa_names; - eval "${return_ok}"; -} # main_do_fileargs() - - -######################################################################## -# main_set_resources () -# -# Determine options for setting X resources with $_DISPLAY_PROG. -# -# Globals: $_DISPLAY_PROG, $_OUTPUT_FILE_NAME -# -# Variable prefix: msr -# -main_set_resources() -{ - func_check main_set_resources = 0 "$@"; - # $msr_prog viewer program - # $msr_rl resource list - for f in ${_TMP_DIR}/,man* - do - rm_file_with_debug $f; - done; - obj_from_output msr_title \ - get_first_essential "${_OPT_TITLE}" "${_REG_TITLE_LIST}"; - _OUTPUT_FILE_NAME=''; - eval set x "${msr_title}"; - shift; - until is_equal "$#" 0 - do - msr_n="$1"; - case "${msr_n}" in - '') - continue; - ;; - ,*) - msr_n="$(echo1 "$1" | sed 's/^,,*//')"; - exit_test; - ;; - esac; - if obj msr_n is_empty - then - continue; - fi; - if obj _OUTPUT_FILE_NAME is_not_empty - then - _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}"','; - fi; - _OUTPUT_FILE_NAME="${_OUTPUT_FILE_NAME}${msr_n}"; - shift; - done; # until $# is 0 -### main_set_resources() - - case "${_OUTPUT_FILE_NAME}" in - '') - _OUTPUT_FILE_NAME='-'; - ;; - ,*) - error "main_set_resources(): ${_OUTPUT_FILE_NAME} starts with a comma."; - ;; - esac; - _OUTPUT_FILE_NAME="${_TMP_DIR}/${_OUTPUT_FILE_NAME}"; - - if obj _DISPLAY_PROG is_empty - then # for example, for groff mode - _DISPLAY_ARGS=''; - eval ${_UNSET} msr_n; - eval ${_UNSET} msr_prog; - eval ${_UNSET} msr_rl; - eval ${_UNSET} msr_title; - eval "${return_ok}"; - fi; - - eval set x "${_DISPLAY_PROG}"; - shift; - obj_from_output msr_prog base_name "$1"; - shift; - if is_greater_than $# 0 - then - if obj _DISPLAY_ARGS is_empty - then - _DISPLAY_ARGS="$*"; - else - _DISPLAY_ARGS="$* ${_DISPLAY_ARGS}"; - fi; - fi; -### main_set_resources() - msr_rl=''; - if obj _OPT_BD is_not_empty - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-bd' "${_OPT_BD}"; - ;; - esac; - fi; - if obj _OPT_BG is_not_empty - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-bg' "${_OPT_BG}"; - ;; - kghostview) - list_append msr_rl '--bg' "${_OPT_BG}"; - ;; - xpdf) - list_append msr_rl '-papercolor' "${_OPT_BG}"; - ;; - esac; - fi; - if obj _OPT_BW is_not_empty - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - _list_append msr_rl '-bw' "${_OPT_BW}"; - ;; - esac; - fi; -### main_set_resources() - if obj _OPT_FG is_not_empty - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-fg' "${_OPT_FG}"; - ;; - kghostview) - list_append msr_rl '--fg' "${_OPT_FG}"; - ;; - esac; - fi; - if is_not_empty "${_OPT_FN}" - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-fn' "${_OPT_FN}"; - ;; - kghostview) - list_append msr_rl '--fn' "${_OPT_FN}"; - ;; - esac; - fi; - if is_not_empty "${_OPT_GEOMETRY}" - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi|xpdf) - list_append msr_rl '-geometry' "${_OPT_GEOMETRY}"; - ;; - kghostview) - list_append msr_rl '--geometry' "${_OPT_GEOMETRY}"; - ;; - esac; - fi; -### main_set_resources() - if is_empty "${_OPT_RESOLUTION}" - then - _OPT_RESOLUTION="${_DEFAULT_RESOLUTION}"; - case "${msr_prog}" in - gxditview|xditview) - list_append msr_rl '-resolution' "${_DEFAULT_RESOLUTION}"; - ;; - xpdf) - case "${_DISPLAY_PROG}" in - *-z*) - :; - ;; - *) # if xpdf does not have option -z - case "${_DEFAULT_RESOLUTION}" in - 75) - # 72dpi is '100' - list_append msr_rl '-z' '104'; - ;; - 100) - list_append msr_rl '-z' '139'; - ;; - esac; - ;; - esac; - ;; - esac; - else - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-resolution' "${_OPT_RESOLUTION}"; - ;; - xpdf) - case "${_DISPLAY_PROG}" in - *-z*) - :; - ;; - *) # if xpdf does not have option -z - case "${_OPT_RESOLUTION}" in - 75) - list_append msr_rl '-z' '104'; - # '100' corresponds to 72dpi - ;; -### main_set_resources() - 100) - list_append msr_rl '-z' '139'; - ;; - esac; - ;; - esac; - ;; - esac; - fi; - if is_yes "${_OPT_ICONIC}" - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-iconic'; - ;; - esac; - fi; - if is_yes "${_OPT_RV}" - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi) - list_append msr_rl '-rv'; - ;; - esac; - fi; - if is_not_empty "${_OPT_XRM}" - then - case "${msr_prog}" in - ghostview|gv|gxditview|xditview|xdvi|xpdf) - eval set x "${_OPT_XRM}"; - shift; - for i - do - list_append msr_rl '-xrm' "$i"; - done; -### main_set_resources() - ;; - esac; - fi; - if is_not_empty "${msr_title}" - then - case "${msr_prog}" in - gxditview|xditview) - list_append msr_rl '-title' "${msr_title}"; - ;; - esac; - fi; - if obj _DISPLAY_ARGS is_empty - then - _DISPLAY_ARGS="${msr_rl}"; - else - _DISPLAY_ARGS="${msr_l} ${_DISPLAY_ARGS}"; - fi; - eval ${_UNSET} msr_n; - eval ${_UNSET} msr_prog; - eval ${_UNSET} msr_rl; - eval ${_UNSET} msr_title; - eval "${return_ok}"; -} # main_set_resources - - -######################################################################## -# main_display () -# -# Do the actual display of the whole thing. -# -# Globals: -# in: $_DISPLAY_MODE, $_OPT_DEVICE, $_ADDOPTS_GROFF, -# $_TMP_CAT, $_OPT_PAGER, $_MANOPT_PAGER, $_OUTPUT_FILE_NAME -# -# Variable prefix: md -# -main_display() -{ - func_check main_display = 0 "$@"; - - export md_addopts; - export md_groggy; - export md_modefile; - - if obj _TMP_CAT is_empty_file - then - echo2 'groffer: empty input.'; - clean_up; - eval "${return_ok}"; - fi; - - md_modefile="${_OUTPUT_FILE_NAME}"; - - # go to the temporary directory to be able to access internal data files - cd "${_TMP_DIR}" >"${_NULL_DEV}" 2>&1; - - case "${_DISPLAY_MODE}" in - groff) - if obj _OPT_DEVICE is_not_empty - then - _ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}"; - fi; - md_groggy="$(tmp_cat | eval grog)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_opt_V; - -### main_display() - obj md_modefile rm_file; - mv "${_TMP_CAT}" "${md_modefile}"; - trap_unset; - cat "${md_modefile}" | \ - { - trap_set; - eval "${md_groggy}" "${_ADDOPTS_GROFF}"; - } & - ;; - text|tty) - case "${_OPT_DEVICE}" in - '') - obj_from_output md_device \ - get_first_essential "${_OPT_TEXT_DEVICE}" "${_DEFAULT_TTY_DEVICE}"; - ;; - ascii|cp1047|latin1|utf8) - md_device="${_OPT_DEVICE}"; - ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - md_addopts="${_ADDOPTS_GROFF}"; - md_groggy="$(tmp_cat | grog -T${md_device})"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - if obj _DISPLAY_MODE is_equal 'text' - then - _do_opt_V; - tmp_cat | eval "${md_groggy}" "${md_addopts}"; - else # $_DISPLAY_MODE is 'tty' -### main_display() - md_pager=''; - for p in "${_OPT_PAGER}" "${_MANOPT_PAGER}" "${PAGER}" - do - if obj p is_empty - then - continue; - fi; - obj_from_output md_pager where_is_prog "$p"; - if is_not_equal "$?" 0 || obj md_pager is_empty - then - md_pager=''; - continue; - fi; - eval set x $md_pager; - shift; - case "$1" in - */less) - if is_empty "$2" - then - md_pager="$1"' -r -R'; - else - md_pager="$1"' -r -R '"$2"; - fi; - ;; -### main_display() - *) - if is_empty "$2" - then - md_pager="$1"; - else - md_pager="$1 $2"; - fi; - ;; - esac; - break; - done; - if obj md_pager is_empty - then - eval set x ${_VIEWER_TTY_TTY} ${_VIEWER_TTY_X} 'cat'; - shift; - # that is: 'less -r -R' 'more' 'pager' 'xless' 'cat' - for p - do - if obj p is_empty - then - continue; - fi; - md_p="$p"; - if is_prog "${md_p}" - then - md_pager="${md_p}"; - break; - fi; - done; - fi; -### main_display() - if obj md_pager is_empty - then - error 'main_display(): no pager program found for tty mode'; - fi; - _do_opt_V; - tmp_cat | eval "${md_groggy}" "${md_addopts}" | \ - eval "${md_pager}"; - fi; # $_DISPLAY_MODE - clean_up; - ;; # text|tty) - source) - tmp_cat; - clean_up; - ;; - - #### viewer modes - -### main_display() - dvi) - case "${_OPT_DEVICE}" in - ''|dvi) do_nothing; ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}" - ;; - esac; - md_modefile="${md_modefile}".dvi; - md_groggy="$(tmp_cat | grog -Tdvi)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_display; - ;; - html) - case "${_OPT_DEVICE}" in - ''|html) do_nothing; ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - md_modefile="${md_modefile}".html; - md_groggy="$(tmp_cat | grog -Thtml)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_display; - ;; -### main_display() - pdf) - case "${_OPT_DEVICE}" in - ''|ps) - do_nothing; - ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - md_groggy="$(tmp_cat | grog -Tps)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_display _make_pdf; - ;; - ps) - case "${_OPT_DEVICE}" in - ''|ps) - do_nothing; - ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - ;; - esac; - md_modefile="${md_modefile}".ps; - md_groggy="$(tmp_cat | grog -Tps)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_display; - ;; -### main_display() - x) - case "${_OPT_DEVICE}" in - X*) - md_device="${_OPT_DEVICE}" - ;; - *) - case "${_OPT_RESOLUTION}" in - 100) - md_device='X100'; - if obj _OPT_GEOMETRY is_empty - then - case "${_DISPLAY_PROG}" in - gxditview|xditview) - # add width of 800dpi for resolution of 100dpi to the args - list_append _DISPLAY_ARGS '-geometry' '800'; - ;; - esac; - fi; - ;; - *) - md_device='X75-12'; - ;; - esac - esac; - md_groggy="$(tmp_cat | grog -T${md_device} -Z)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - _do_display; - ;; -### main_display() - X) - case "${_OPT_DEVICE}" in - '') - md_groggy="$(tmp_cat | grog -X)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - ;; - X*|dvi|html|lbp|lj4|ps) - # these devices work with - md_groggy="$(tmp_cat | grog -T"${_OPT_DEVICE}" -X)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - ;; - *) - warning "main_display(): \ -wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; - md_groggy="$(tmp_cat | grog -Z)"; - if is_not_equal "$?" 0 - then - exit "${_ERROR}"; - fi; - echo2 "grog output: ${md_groggy}"; - exit_test; - ;; - esac; - _do_display; - ;; - *) - error "main_display(): unknown mode \`${_DISPLAY_MODE}'"; - ;; - esac; - eval ${_UNSET} md_addopts; - eval ${_UNSET} md_device; - eval ${_UNSET} md_groggy; - eval ${_UNSET} md_modefile; - eval ${_UNSET} md_p; - eval ${_UNSET} md_pager; - eval "${return_ok}"; -} # main_display() - - -######################## -# _do_display ([]) -# -# Perform the generation of the output and view the result. If an -# argument is given interpret it as a function name that is called in -# the midst (actually only for `pdf'). -# -# Globals: $md_modefile, $md_groggy (from main_display()) -# -_do_display() -{ - func_check _do_display '>=' 0 "$@"; - _do_opt_V; - if obj _DISPLAY_PROG is_empty - then - trap_unset; - { - trap_set; - eval "${md_groggy}" "${_ADDOPTS_GROFF}" "${_TMP_CAT}"; - } & - else - obj md_modefile rm_file; - cat "${_TMP_CAT}" | \ - eval "${md_groggy}" "${_ADDOPTS_GROFF}" > "${md_modefile}"; - if obj md_modefile is_empty_file - then - echo2 '_do_display(): empty output.'; - clean_up; - exit; - fi; - if is_not_empty "$1" - then - eval "$1"; - fi; -### _do_display() of main_display() - obj _TMP_CAT rm_file_with_debug; - if obj _OPT_STDOUT is_yes - then - cat "${md_modefile}"; - clean_up; - exit; - fi; - if obj _VIEWER_BACKGROUND is_not_yes # for programs that run on tty - then - eval "'${_DISPLAY_PROG}'" ${_DISPLAY_ARGS} "\"${md_modefile}\""; - else - trap_unset; - { - trap_set; - eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "\"${md_modefile}\""; - } & - fi; - fi; - eval "${return_ok}"; -} # _do_display() of main_display() - - -############# -# _do_opt_V () -# -# Check on option `-V'; if set print the corresponding output and leave. -# -# Globals: $_ALL_PARAMS, $_ADDOPTS_GROFF, $_DISPLAY_MODE, $_DISPLAY_PROG, -# $_DISPLAY_ARGS, $md_groggy, $md_modefile -# -# Variable prefix: _doV -# -_do_opt_V() -{ - func_check _do_opt_V '=' 0 "$@"; - if obj _OPT_V is_yes - then - _OPT_V='no'; - echo1 "Parameters: ${_ALL_PARAMS}"; - echo1 "Display mode: ${_DISPLAY_MODE}"; - echo1 "Output file: ${md_modefile}"; - echo1 "Display prog: ${_DISPLAY_PROG} ${_DISPLAY_ARGS}"; - a="$(eval echo1 "'${_ADDOPTS_GROFF}'")"; - exit_test; - echo1 "Output of grog: ${md_groggy} $a"; - _doV_res="$(eval "${md_groggy}" "${_ADDOPTS_GROFF}")"; - exit_test; - echo1 "groff -V: ${_doV_res}" - leave; - fi; - eval "${return_ok}"; -} # _do_opt_V() of main_display() - - -############## -# _make_pdf () -# -# Transform to pdf format; for pdf mode in _do_display(). -# -# Globals: $md_modefile (from main_display()) -# -# Variable prefix: _mp -# -_make_pdf() -{ - func_check _make_pdf '=' 0 "$@"; - _mp_psfile="${md_modefile}"; - md_modefile="${md_modefile}.pdf"; - obj md_modefile rm_file; - if obj _PDF_HAS_PS2PDF is_yes && ps2pdf "${_mp_psfile}" "${md_modefile}"; - then - :; - elif obj _PDF_HAS_GS is_yes && gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ - -sOutputFile="${md_modefile}" -c save pop -f "${_mp_psfile}"; - then - :; - else - _PDF_DID_NOT_WORK='yes'; - echo2 '_make_pdf(): Could not transform into pdf format. '\ -'The Postscript mode (ps) is used instead.'; - _OPT_MODE='ps'; - main_set_mode; - main_set_resources; - main_display; - exit; - fi; - obj _mp_psfile rm_file_with_debug; - eval ${_UNSET} _mp_psfile; - eval "${return_ok}"; -} # _make_pdf() of main_display() - - -######################################################################## -# main (*) -# -# The main function for groffer. -# -# Arguments: -# -main() -{ - func_check main '>=' 0 "$@"; - # Do not change the sequence of the following functions! - landmark '13: main_init()'; - main_init; - landmark '14: main_parse_MANOPT()'; - main_parse_MANOPT; - landmark '15: main_parse_args()'; - main_parse_args "$@"; - landmark '16: main_set_mode()'; - main_set_mode; - landmark '17: main_do_fileargs()'; - main_do_fileargs; - landmark '18: main_set_resources()'; - main_set_resources; - landmark '19: main_display()'; - main_display; - eval "${return_ok}"; -} - - -######################################################################## - -main "$@"; diff -ruN groff-1.22.2/contrib/groffer/shell/groffer.man groff-1.22.3/contrib/groffer/shell/groffer.man --- groff-1.22.2/contrib/groffer/shell/groffer.man 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/shell/groffer.man 1970-01-01 01:00:00.000000000 +0100 @@ -1,4124 +0,0 @@ -.TH GROFFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groffer \- display groff files and man\~pages on X and tty -. -.SH "SYNOPSIS" -.\" The .SH was moved to this place in order to appease `apropos'. -. -.\" -------------------------------------------------------------------- -.\" Legalese -.\" -------------------------------------------------------------------- -. -.de author -This file was written by Bernd Warken . -.. -.de copyleft -Copyright (C) 2001, 2002, 2004-2012 - Free Software Foundation, Inc. -. -.P -This file is part of -.IR \%groffer , -which is part of -.IR \%groff , -a free software project. -. -You can redistribute it and/or modify it under the terms of the -.nh -.B GNU General Public License -.hy -as published by the -.nh -.BR "Free Software Foundation" , -.hy -either version 3 of the License, or (at your option) any later version. -. -.P -You should have received a copy of the \f[CR]GNU General Public -License\f[] along with -.IR groff , -see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top -directory of the -.I groff -source package. -. -Or read the -.I man\~page -.BR gpl (1). -You can also visit -.nh -.B . -.hy -.. -. -.\" -------------------------------------------------------------------- -.\" Setup -.\" -------------------------------------------------------------------- -. -.ds Ellipsis "\&.\|.\|.\&\" -. -.\" -------------------------------------------------------------------- -.\" Macro definitions -. -.\" -------------------------------------------------------------------- -.\" .CB (...) -.\" -.\" Print in constant-width bold font. -.\" -.de CB -. ft CB -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .CI (...) -.\" -.\" Print in constant-width italic font. -.\" -.de CI -. ft CI -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .CR (...) -.\" -.\" Print in constant-width roman font. -.\" -.de CR -. ft CR -. Text \\$* -. ft -.. -.\" -------------------------------------------------------------------- -.\" .Error (...) -.\" -.\" Print error message to terminal and abort. -.\" -.de Error -. tm \\$* -. ab -.. -.\" -------------------------------------------------------------------- -.\" .Env_var ( []) -.\" -.\" Display an environment variable, with optional punctuation. -.\" -.de Env_var -. nh -. SM -. Text \f[CB]\\$1\f[]\\$2 -. hy -.. -.\" -------------------------------------------------------------------- -.\" .File_name () -.\" -.\" Display a file or directory name in CB font. -.\" -.de File_name -. Header_CB \\$@ -.. -.\" -------------------------------------------------------------------- -.\" .Header_CB () -.\" -.\" Display a line in CB font, for example after .TP -.\" -.de Header_CB -. nh -. Text \f[CB]\\$1\f[]\\$2 -. hy -.. -.\" -------------------------------------------------------------------- -.\" .Text (...) -.\" -.\" Treat the arguments as text, no matter how they look. -.\" -.de Text -. if \\n[.$]=0 \ -. return -. nh -. nop \)\\$*\) -. hy -.. -.\" -------------------------------------------------------------------- -.\" .Topic ([]) -.\" -.\" A bulleted paragraph -.\" -.de Topic -. ie \\n[.$]=0 \ -. ds @indent 2m\" -. el \ -. ds @indent \\$1\" -. IP \[bu] \\*[@indent] -. rm @indent -.. - -.\" End of macro definitions -. -. -.\" -------------------------------------------------------------------- -.\" SH "SYNOPSIS" -.\" -------------------------------------------------------------------- -. -.SY groffer -.OP option \*[Ellipsis] -.OP -- -.OP \%filespec \*[Ellipsis] -.YS -. -.SY groffer -.BR -h | --help -.YS -. -.SY groffer -.BR -v | --version -.YS -. -. -.\" -------------------------------------------------------------------- -.SH DESCRIPTION -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program is the easiest way to use -.BR \%groff (@MAN1EXT@). -It can display arbitrary documents written in the -.I \%groff -language, see -.BR \%groff (@MAN7EXT@), -or other -.I \%roff -languages, see -.BR \%roff (@MAN7EXT@), -that are compatible to the original -.I \%troff -language. -. -It finds and runs all necessary -.I groff -preprocessors, such as -.BR @g@chem . -. -. -.P -The -.B \%groffer -program also includes many of the features for finding and displaying -the \%\f[CR]Unix\f[] manual pages -.nh -.RI ( man\~pages ), -.hy -such that it can be used as a replacement for a -.BR \%man (1) -program. -. -Moreover, compressed files that can be handled by -.BR \%gzip (1) -or -.BR \%bzip2 (1) -are decompressed on-the-fly. -. -. -.P -The normal usage is quite simple by supplying a file name or name of a -.I \%man\~page -without further options. -. -But the option handling has many possibilities for creating special -behaviors. -. -This can be done either in configuration files, with the shell -environment variable -.Env_var \%$GROFFER_OPT , -or on the command line. -. -. -.P -The output can be generated and viewed in several different ways -available for -.IR \%groff . -. -This includes the -.I \%groff -native \%\f[CR]X\~Window\f[] viewer -.BR \%gxditview (@MAN1EXT@), -each -.IR \%Postcript , -.IR \%pdf , -or -.I \%dvi -display program, a web browser by generating -.I \%html -in -.IR \%www\~mode , -or several -.I \%text\~modes -in text terminals. -. -. -.P -Most of the options that must be named when running -.B \%groff -directly are determined automatically for -.BR \%groffer , -due to the internal usage of the -.BR \%grog (@MAN1EXT@) -program. -. -But all parts can also be controlled manually by arguments. -. -. -.P -Several file names can be specified on the command line arguments. -. -They are transformed into a single document in the normal way of -.BR \%groff . -. -. -.P -Option handling is done in \f[CR]GNU\f[] style. -. -Options and file names can be mixed freely. -. -The option -.RB ` \-\- ' -closes the option handling, all following arguments are treated as -file names. -. -Long options can be abbreviated in several ways. -. -. -.\" -------------------------------------------------------------------- -.SH "OPTION OVERVIEW" -.\" -------------------------------------------------------------------- -. -.TP -.I breaking options -.RS -.P -.SY -.OP -h\~\fR|\fB\~--help -.OP -v\~\fR|\fB\~--version -.YS -.RE -. -. -.TP -.I \%groffer mode options -.RS -.P -.SY -.OP --auto -.OP --default -.OP --default\-modes mode1,mode2,\*[Ellipsis] -.OP --dvi -.OP --dvi\-viewer prog -.OP --groff -.OP --html -.OP --html\-viewer prog -.OP --mode display_mode -.OP --pdf -.OP --pdf\-viewer prog -.OP --ps -.OP --ps\-viewer prog -.OP --source -.OP --text -.OP --to\-stdout -.OP --tty -.OP --tty\-viewer prog -.OP --www -.OP --www\-viewer prog -.OP --x\~\fR|\fB\~--X -.OP --x\-viewer\~\fR|\fB\~--X\-viewer prog -.YS -.RE -. -. -.TP -.I options related to \%groff -.RS -.P -.SY -.OP -T\~\fR|\fB\~--device device -.OP -Z\~\fR|\fB\~--intermediate\-output\~\fR|\fB\~--ditroff -.YS -.P -All further -.B \%groff -short options are accepted. -.RE -. -. -.TP -.I options for man\~pages -.RS -.P -.SY -.OP --apropos -.OP --apropos\-data -.OP --apropos\-devel -.OP --apropos\-progs -.OP --man -.OP --no\-man -.OP --no\-special -.OP --whatis -.YS -.RE -. -. -.TP -.I long options taken over from GNU man -.RS -.P -.SY -.OP --all -.OP --ascii -.OP --ditroff -.OP --extension suffix -.OP --locale language -.OP --local\-file -.OP --location\~\fR|\fB\~--where -.OP --manpath dir1:dir2:\*[Ellipsis] -.OP --no\-location -.OP --pager program -.OP --sections sec1:sec2:\*[Ellipsis] -.OP --systems sys1,sys2,\*[Ellipsis] -.OP --troff\-device device -.YS -.P -Further long options of \f[CR]GNU\f[] -.B man -are accepted as well. -.RE -. -. -.TP -.I X Window Toolkit options -.RS -.P -.SY -.OP --bd\~\fR|\fB\~--bordercolor pixels -.OP --bg\~\fR|\fB\~--background color -.OP --bw\~\fR|\fB\~--borderwidth pixels -.OP --display X-display -.OP --fg\~\fR|\fB\~--foreground color -.OP --fn\~\fR|\fB\~--ft\~\fR|\fB\~--font font_name -.OP --geometry size_pos -.OP --resolution value -.OP --rv -.OP --title string -.OP --xrm X\-resource -.YS -.RE -. -. -.TP -.I options for development -.RS -.P -.SY -.OP --debug -.OP --debug\-all -.OP --debug\-filenames -.OP --debug\-func -.OP --debug\-grog -.OP --debug\-keep -.OP --debug\-lm -.OP --debug\-params -.OP --debug\-shell -.OP --debug\-stacks -.OP --debug\-tmpdir -.OP --debug\-user -.OP --do\-nothing -.OP --print text -.OP --shell prog -.OP -V -.YS -.RE -. -. -.TP -.I \%filespec arguments -.RS -.P -The -.I \%filespec -parameters are all arguments that are neither an option nor an option -argument. -. -They usually mean a file name or a -.I man page -searching scheme. -. -. -.P -In the following, the term -.I section_extension -is used. -. -It means a word that consists of a -.I man section -that is optionally followed by an -.IR extension . -. -The name of a -.I man section -is a single character from -.BR \%[1-9on] , -the -.I extension -is some word. -. -The -.I extension -is mostly lacking. -. -. -.P -No -.I \%filespec -parameters means standard input. -. -. -.TP 10m -.B - -stands for standard input (can occur several times). -. -. -.TP -.I filename -the path name of an existing file. -. -. -.TP -.BI man: name ( section_extension ) -.TQ -.BI man: name . section_extension -.TQ -.IB name ( section_extension ) -.TQ -.IB name . section_extension -.TQ -.I "section_extension name" -search the \%man\~page -.I \%name -in the section with optional extension -.IR section_extension . -. -. -.TP -.BI man: name -\%man\~page in the lowest -.I \%man\~section -that has -.IR \%name . -. -. -.TP -.I name -if -.I \%name -is not an existing file search for the man\~page -.I \%name -in the lowest man\~section. -. -.RE -. -. -.\" -------------------------------------------------------------------- -.SH "OPTION DETAILS" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program can usually be run with very few options. -. -But for special purposes, it supports many options. -. -These can be classified in 5 option classes. -. -. -.P -All short options of -.B \%groffer -are compatible with the short options of -.BR \%groff (@MAN1EXT@). -. -All long options of -.B \%groffer -are compatible with the long options of -.BR \%man (1). -. -. -.P -Arguments for long option names can be abbreviated in several ways. -. -First, the argument is checked whether it can be prolonged as is. -. -Furthermore, each minus sign -.B - -is considered as a starting point for a new abbreviation. -. -This leads to a set of multiple abbreviations for a single argument. -. -For example, -.B --de\-n\-f -can be used as an abbreviation for -.BR --debug\-not\-func , -but -.B --de\-n -works as well. -. -If the abbreviation of the argument leads to several resulting options -an error is raised. -. -. -.P -These abbreviations are only allowed in the environment variable -.Env_var \%$GROFFER_OPT , -but not in the configuration files. -. -In configuration, all long options must be exact. -. -. -.\" -------------------------------------------------------------------- -.SS "groffer breaking Options" -.\" -------------------------------------------------------------------- -. -As soon as one of these options is found on the command line it is -executed, printed to standard output, and the running -.B \%groffer -is terminated thereafter. -. -All other arguments are ignored. -. -. -.TP -.B -h\~\fR|\fB\~--help -Print help information with a short explanation of options to -standard output. -. -. -.TP -.B -v\~\fR|\fB\~--version -Print version information to standard output. -. -. -.\" -------------------------------------------------------------------- -.SS "groffer Mode Options" -.\" -------------------------------------------------------------------- -. -The display mode and the viewer programs are determined by these -options. -. -If none of these mode and viewer options is specified -.B \%groffer -tries to find a suitable display mode automatically. -. -The default modes are -.IR "mode pdf" , -.IR "mode ps" , -.IR "mode html" , -.IR "mode x" , -and -.I "mode dvi" -in \%\f[CR]X\~Window\f[] with different viewers and -.I mode tty -with device -.I latin1 -under -.B less -on a terminal; other modes are tested if the programs for the main -default mode do not exist. -. -. -.P -In \%\f[CR]X\~Window\f[], -many programs create their own window when called. -.B \%groffer -can run these viewers as an independent program in the background. -. -As this does not work in text mode on a terminal (tty) there must be a -way to know which viewers are \%\f[CR]X\~Window\f[] graphical -programs. -. -The -.B \%groffer -script has a small set of information on some viewer names. -. -If a viewer argument of the command\-line chooses an element that is -kept as \%\f[CR]X\~Window\f[] program in this list it is treated as a -viewer that can run in the background. -. -All other, unknown viewer calls are not run in the background. -. -. -.P -For each mode, you are free to choose whatever viewer you want. -. -That need not be some graphical viewer suitable for this mode. -. -There is a chance to view the output source; for example, the -combination of the options -.B --mode=ps -and -.B --ps\-viewer=less -shows the content of the -.I Postscript -output, the source code, with the pager -.BR less . -. -. -.TP -.B --auto -Equivalent to -.BR --mode=auto . -. -. -.TP -.B --default -Reset all configuration from previously processed command line options -to the default values. -. -This is useful to wipe out all former options of the configuration, in -.Env_var \%$GROFFER_OPT , -and restart option processing using only the rest of the command line. -. -. -.TP -.BI --default\-modes \ mode1,mode2,\*[Ellipsis] -Set the sequence of modes for -.I \%auto\~mode -to the comma separated list given in the argument. -. -See -.B --mode -for details on modes. Display in the default manner; actually, this -means to try the modes -.IR x , -.IR ps , -and -.I \%tty -in this sequence. -. -. -. -.TP -.B --dvi -Equivalent to -.BR --mode=\%dvi . -. -. -.TP -.BI --dvi\-viewer \ prog -Choose a viewer program for -.IR \%dvi\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH . -. -Known \%\f[CR]X\~Window\f[] -.I \%dvi -viewers include -.BR \%xdvi (1) -and -.BR \%dvilx (1). -. -In each case, arguments can be provided additionally. -. -. -.TP -.B --groff -Equivalent to -.BR --mode=groff . -. -. -.TP -.B --html -Equivalent to -.BR --mode=html . -. -. -.TP -.B --html\-viewer -Choose a web browser program for viewing in -.IR \%html\~mode . -. -It can be the path name of an executable file or a program in -.Env_var $PATH . -. -In each case, arguments can be provided additionally. -. -. -.TP -.BI --mode \ value -. -Set the display mode. -. -The following mode values are recognized: -. -.RS -. -.TP -.Header_CB auto -Select the automatic determination of the display mode. -. -The sequence of modes that are tried can be set with the -.B --default\-modes -option. -. -Useful for restoring the -.I \%default\~mode -when a different mode was specified before. -. -. -.TP -.Header_CB dvi -Display formatted input in a -.I \%dvi -viewer program. -. -By default, the formatted input is displayed with the -.BR \%xdvi (1) -program. -. -. -.TP -.Header_CB groff -After the file determination, switch -.B \%groffer -to process the input like -.BR \%groff (@MAN1EXT@) -would do. -. -This disables the -.I \%groffer -viewing features. -. -. -.TP -.Header_CB html -Translate the input into html format and display the result in a web -browser program. -. -By default, the existence of a sequence of standard web browsers is -tested, starting with -.BR \%konqueror (1) -and -.BR \%mozilla (1). -The text html viewer is -.BR \%lynx (1). -. -. -.TP -.Header_CB pdf -Display formatted input in a -.I \%PDF -(Portable Document Format) viewer -program. -. -By default, the input is formatted by -.B \%groff -using the Postscript device, then it is transformed into the PDF file -format using -.BR \%gs (1), -or -.BR ps2pdf (1). -If that's not possible, the -.I Postscript mode (ps) -is used instead. -. -Finally it is displayed using different viewer programs. -. -.I \%pdf -has a big advantage because the text is displayed graphically and -is searchable as well. -. -. -.TP -.Header_CB ps -Display formatted input in a Postscript viewer program. -. -By default, the formatted input is displayed in one of many viewer -programs. -. -. -.TP -.Header_CB text -Format in a -.I \%groff\~text\~mode -and write the result to standard output without a pager or viewer -program. -. -The text device, -.I \%latin1 -by default, can be chosen with option -.BR -T . -. -. -.TP -.Header_CB tty -Format in a -.I \%groff\~text\~mode -and write the result to standard output using a text pager program, -even when in \%\f[CR]X\~Window\f[]. -. -. -.TP -.Header_CB www -Equivalent to -.BR --mode=html . -. -. -.TP -.Header_CB x -Display the formatted input in a native -.I roff -viewer. -. -By default, the formatted input is displayed with the -.BR \%gxditview (@MAN1EXT@) -program being distributed together with -.BR \%groff . -But the standard \%\f[CR]X\~Window\f[] tool -.BR \%xditview (1) -can also be chosen with the option -.BR --x\-viewer . -The default resolution is -.BR 75dpi , -but -.B 100dpi -are also possible. -. -The default -.I groff -device -for the resolution of -.B 75dpi -is -.BR X75\-12 , -for -.B 100dpi -it is -.BR X100 . -. -The corresponding -.I "groff intermediate output" -for the actual device is generated and the result is displayed. -. -For a resolution of -.BR 100dpi , -the default width of the geometry of the display program is chosen to -.BR 850dpi . -. -. -.TP -.Header_CB X -Equivalent to -.BR --mode=x . -. -. -.P -The following modes do not use the -.I \%groffer -viewing features. -. -They are only interesting for advanced applications. -. -. -.TP -.Header_CB groff -Generate device output with plain -.I \%groff -without using the special viewing features of -.IR \%groffer . -If no device was specified by option -.B -T -the -.I \%groff -default -.B \%ps -is assumed. -. -. -.TP -.Header_CB source -Output the roff source code of the input files without further -processing. -. -. -.RE -. -. -.TP -.B --pdf -Equivalent to -.BR --mode=pdf . -. -. -.TP -.BI --pdf\-viewer \ prog -Choose a viewer program for -.IR \%pdf\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B --ps -Equivalent to -.BR --mode=ps . -. -. -.TP -.BI --ps\-viewer \ prog -Choose a viewer program for -.IR \%ps\~mode . -. -This can be a file name or a program to be searched in -.Env_var $PATH . -. -Common Postscript viewers include -.BR \%gv (1), -.BR \%ghostview (1), -and -.BR \%gs (1), -. -In each case, arguments can be provided additionally. -. -. -.TP -.B --source -Equivalent to -.BR --mode=source . -. -. -.TP -.B --text -Equivalent to -.BR --mode=text . -. -. -.TP -.B --to\-stdout -The file for the chosen mode is generated and its content is printed -to standard output. -. -It will not be displayed in graphical mode. -. -. -.TP -.B --tty -Equivalent to -.BR --mode=tty . -. -. -.TP -.BI --tty\-viewer \ prog -Choose a text pager for mode -.IR tty . -The standard pager is -.BR less (1). -This option is equivalent to -.I man -option -.BR --pager=\fIprog\fP . -The option argument can be a file name or a program to be searched in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B --www -Equivalent to -.BR --mode=html . -. -. -.TP -.BI --www\-viewer \ prog -Equivalent to -.BR --html\-viewer . -. -. -.TP -.B --X\~\fR|\fB\~--x -Equivalent to -.BR --mode=x . -. -. -.TP -.BI --X\-viewer\~\fR|\fB\~--x\-viewer \ prog -Choose a viewer program for -.IR \%x\~mode . -Suitable viewer programs are -.BR \%gxditview (@MAN1EXT@) -which is the default and -.BR \%xditview (1). -The argument can be any executable file or a program in -.Env_var $PATH ; -arguments can be provided additionally. -. -. -.TP -.B -- -Signals the end of option processing; all remaining arguments are -interpreted as -.I \%filespec -parameters. -. -. -.P -Besides these, -.B \%groffer -accepts all short options that are valid for the -.BR \%groff (@MAN1EXT@) -program. -. -All -.RB \%non- groffer -options are sent unmodified via -.B \%grog -to -.BR \%groff . -. -So postprocessors, macro packages, compatibility with -.I classical -.IR \%troff , -and much more can be manually specified. -. -. -.\" -------------------------------------------------------------------- -.SS "Options related to groff" -.\" -------------------------------------------------------------------- -. -All short options of -.B \%groffer -are compatible with the short options of -.BR \%groff (@MAN1EXT@). -. -The following of -.B \%groff -options have either an additional special meaning within -.B \%groffer -or make sense for normal usage. -. -. -.P -Because of the special outputting behavior of the -.B \%groff -option -.B -Z -.B \%groffer -was designed to be switched into -.IR \%groff\~mode ; -the -.I \%groffer -viewing features are disabled there. -. -The other -.B \%groff -options do not switch the mode, but allow to customize the formatting -process. -. -. -.TP -.B --a -This generates an ascii approximation of output in the -.IR \%text\~modes . -. -That could be important when the text pager has problems with control -sequences in -.IR "tty mode" . -. -. -.TP -.BI --m \ file -Add -.I \%file -as a -.I \%groff -macro file. -. -This is useful in case it cannot be recognized automatically. -. -. -.TP -.BI --P \ opt_or_arg -Send the argument -.I \%opt_or_arg -as an option or option argument to the actual -.B \%groff -postprocessor. -. -. -.TP -.B --T \fIdevname\fR\~\fR|\fB\~--device \fIdevname\fR -. -This option determines -.BR \%groff 's -output device. -. -The most important devices are the text output devices for referring -to the different character sets, such as -.BR \%ascii , -.BR \%utf8 , -.BR \%latin1 , -and others. -. -Each of these arguments switches -.B \%groffer -into a -.I \%text\~mode -using this device, to -.I \%mode\~tty -if the actual mode is not a -.IR \%text\~mode . -. -The following -.I \%devname -arguments are mapped to the corresponding -.B \%groffer -.B --mode=\fIdevname\fR -option: -.BR \%dvi , -.BR \%html , -and -.BR \%ps . -All -.B \%X* -arguments are mapped to -.IR \%mode\~x . -Each other -.I \%devname -argument switches to -.I \%mode\~groff -using this device. -. -. -.TP -.B --X -is equivalent to -.BR "groff \-X" . -It displays the -.I groff intermediate output -with -.BR gxditview . -As the quality is relatively bad this option is deprecated; use -.B --X -instead because the -.I \%x\~mode -uses an -.IR X * -device for a better display. -. -. -.TP -.B -Z\~\fR|\fB\~--intermediate-output\~\fR|\fB\~--ditroff -Switch into -.I \%groff\~mode -and format the input with the -.I \%groff intermediate output -without postprocessing; see -.BR \%groff_out (@MAN5EXT@). -This is equivalent to option -.B --ditroff -of -.IR \%man , -which can be used as well. -. -. -.P -All other -.B \%groff -options are supported by -.BR \%groffer , -but they are just transparently transferred to -.B \%groff -without any intervention. -. -The options that are not explicitly handled by -.B \%groffer -are transparently passed to -.BR \%groff . -. -Therefore these transparent options are not documented here, but in -.BR \%groff (@MAN1EXT@). -Due to the automatism in -.BR \%groffer , -none of these -.B \%groff -options should be needed, except for advanced usage. -. -. -.\" -------------------------------------------------------------------- -.SS "Options for man\~pages" -.\" -------------------------------------------------------------------- -. -.TP -.B --apropos -Start the -.BR \%apropos (1) -command or facility of -.BR \%man (1) -for searching the -.I \%filespec -arguments within all -.I \%man\~page -descriptions. -. -Each -.I \%filespec -argument is taken for search as it is; -.I section -specific parts are not handled, such that -.B 7 groff -searches for the two arguments -.B 7 -and -.BR groff , -with a large result; for the -.I \%filespec -.B groff.7 -nothing will be found. -. -The -.I language -locale is handled only when the called programs do support this; the -GNU -.B apropos -and -.B man \-k -do not. -. -The display differs from the -.B \%apropos -program by the following concepts: -.RS -.Topic -Construct a -.I \%groff -frame similar to a -.I \%man\~page -to the output of -.BR \%apropos , -.Topic -each -.I \%filespec -argument is searched on its own. -.Topic -The restriction by -.B --sections -is handled as well, -.Topic -wildcard characters are allowed and handled without a further option. -.RE -. -. -.TP -.B --apropos\-data -Show only the -.B \%apropos -descriptions for data documents, these are the -.BR \%man (7) -.IR sections\~4 ", " 5 ", and " 7 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --apropos\-devel -Show only the -.B \%apropos -descriptions for development documents, these are the -.BR man (7) -.IR sections\~2 ", " 3 ", and " 9 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --apropos\-progs -Show only the -.B \%apropos -descriptions for documents on programs, these are the -.BR \%man (7) -.IR sections\~1 ", " 6 ", and " 8 . -. -Direct -.I section -declarations are ignored, wildcards are accepted. -. -. -.TP -.B --whatis -For each -.I \%filespec -argument search all -.I \%man\~pages -and display their description \[em] or say that it is not a -.IR \%man\~page . -This is written from anew, so it differs from -.IR man 's -.B whatis -output by the following concepts -.RS -.Topic -each retrieved file name is added, -.Topic -local files are handled as well, -.Topic -the \fIlanguage\fP and \fIsystem\fP locale is supported, -.Topic -the display is framed by a -.I groff -output format similar to a -.IR \%man\~page , -.Topic -wildcard characters are allowed without a further option. -.RE -. -. -.P -The following options were added to -.B \%groffer -for choosing whether the file name arguments are interpreted as names -for local files or as a search pattern for -.IR \%man\~pages . -. -The default is looking up for local files. -. -. -.TP -.B --man -Check the non-option command line arguments -.nh -.RI ( filespecs ) -.hy -first on being -.IR \%man\~pages , -then whether they represent an existing file. -. -By default, a -.I \%filespec -is first tested whether it is an existing file. -. -. -.TP -.B --no-man\~\fR|\fB\~--local-file -Do not check for -.IR \%man\~pages . -. -.B --local-file -is the corresponding -.B man -option. -. -. -.TP -.B --no-special -Disable former calls of -.BR --all , -.BR --apropos* , -and -.BR --whatis . -. -. -.\" -------------------------------------------------------------------- -.SS "Long options taken over from GNU man" -.\" -------------------------------------------------------------------- -. -The long options of -.B \%groffer -were synchronized with the long options of \f[CR]GNU\f[] -.BR man . -. -All long options of \f[CR]GNU\f[] -.B man -are recognized, but not all of these options are important to -.BR \%groffer , -so most of them are just ignored. -. -These ignored -.B man -options are -.BR --catman , -.BR --troff , -and -.BR --update . -. -. -.P -In the following, the -.B man -options that have a special meaning for -.B \%groffer -are documented. -. -. -.P -If your system has \f[CR]GNU\f[] -.B man -installed the full set of long and short options of the \f[CR]GNU\f[] -.B man -program can be passed via the environment variable -.Env_var \%$MANOPT ; -see -.BR \%man (1). -. -. -.TP -.B --all -In searching -.IR \%man\~pages , -retrieve all suitable documents instead of only one. -. -. -.TP -.B -7\~\fR|\fB\~--ascii -In -.IR \%text\~modes , -display ASCII translation of special characters for critical environment. -. -This is equivalent to -.BR "groff \%-mtty_char" ; -see -.BR groff_tmac (@MAN5EXT@). -. -. -.TP -.B --ditroff -Produce -.IR "groff intermediate output" . -This is equivalent to -.B \%groffer -.BR -Z . -. -. -.TP -.BI --extension \ suffix -Restrict -.I \%man\~page -search to file names that have -.I \%suffix -appended to their section element. -. -For example, in the file name -.I \%/usr/share/man/man3/terminfo.3ncurses.gz -the -.I \%man\~page -extension is -.IR \%ncurses . -. -. -.TP -.BI --locale \ language -. -Set the language for -.IR \%man\~pages . -. -This has the same effect, but overwrites -.Env_var $LANG . -. -. -.TP -.B --location -Print the location of the retrieved files to standard error. -. -. -.TP -.B --no-location -Do not display the location of retrieved files; this resets a former -call to -.BR --location . -. -This was added by -.BR \%groffer . -. -. -.TP -.BI --manpath \ 'dir1:dir2:\*[Ellipsis]' -Use the specified search path for retrieving -.I \%man\~pages -instead of the program defaults. -. -If the argument is set to the empty string "" the search for -.I \%man\~page -is disabled. -. -. -.TP -.B --pager -Set the pager program in -.IR \%tty\~mode ; -default is -.BR \%less . -This is equivalent to -.BR --tty\-viewer . -. -. -.TP -.BI --sections \ sec1:sec2:\*[Ellipsis] -Restrict searching for -.I \%man\~pages -to the given -.IR sections , -a colon-separated list. -. -. -.TP -.BI --systems \ sys1,sys2,\*[Ellipsis] -Search for -.I \%man\~pages -for the given operating systems; the argument -.I \%systems -is a comma-separated list. -. -. -.TP -.B --where -Equivalent to -.BR --location . -. -. -.\" -------------------------------------------------------------------- -.SS "X\~\%Window\~\%Toolkit Options" -.\" -------------------------------------------------------------------- -. -The following long options were adapted from the corresponding -\%\f[CR]X\~Window\~Toolkit\f[] options. -. -.B \%groffer -will pass them to the actual viewer program if it is an -\%\f[CR]X\~Window\f[] program. -. -Otherwise these options are ignored. -. -. -.P -Unfortunately these options use the old style of a single minus for -long options. -. -For -.B \%groffer -that was changed to the standard with using a double minus for long -options, for example, -.B \%groffer -uses the option -.B --font -for the \%\f[CR]X\~Window\f[] option -.BR -font . -. -. -.P -See -.BR X (7) -and the documentation on the \%\f[CR]X\~Window\~Toolkit\f[] options -for more details on these options and their arguments. -. -. -.TP -.BI --background \ color -Set the background color of the viewer window. -. -. -.TP -.BI --bd \ pixels -This is equivalent to -.BR --bordercolor . -. -. -.TP -.BI --bg \ color -This is equivalent to -.BR --background . -. -. -.TP -.BI --bw \ pixels -This is equivalent to -.BR --borderwidth . -. -. -.TP -.BI --bordercolor \ pixels -Specifies the color of the border surrounding the viewer window. -. -. -.TP -.BI --borderwidth \ pixels -Specifies the width in pixels of the border surrounding the viewer -window. -. -. -.TP -.BI --display \ X-display -Set the \%\f[CR]X\~Window\f[] display on which the viewer program -shall be started, see the \%\f[CR]X\~Window\f[] documentation for the -syntax of the argument. -. -. -.TP -.BI --foreground \ color -Set the foreground color of the viewer window. -. -. -.TP -.BI --fg \ color -This is equivalent to -.BR -foreground . -. -. -.TP -.BI --fn \ font_name -This is equivalent to -.BR --font . -. -. -.TP -.BI --font \ font_name -Set the font used by the viewer window. -. -The argument is an \%\f[CR]X\~Window\f[] font name. -. -. -.TP -.BI --ft \ font_name -This is equivalent to -.BR --font . -. -. -.TP -.BI --geometry \ size_pos -Set the geometry of the display window, that means its size and its -starting position. -. -See -.BR \%X (7) -for the syntax of the argument. -. -. -.TP -.BI --resolution \ value -Set \%\f[CR]X\~Window\f[] resolution in dpi (dots per inch) in some -viewer programs. -. -The only supported dpi values are -.B 75 -and -.BR 100 . -. -Actually, the default resolution for -.B \%groffer -is set to -.BR 75dpi . -The resolution also sets the default device in -.IR "mode x" . -. -. -.TP -.B --rv -Reverse foreground and background color of the viewer window. -. -. -.TP -.BI --title "\ 'some text'" -Set the title for the viewer window. -. -. -.TP -.BI --xrm \ 'resource' -Set \f[CR]\%X\~Window\f[] resource. -. -. -.\" -------------------------------------------------------------------- -.SS "Options for Development" -.\" -------------------------------------------------------------------- -. -.TP -.B --debug -Enable eight debugging informations. -. -The temporary files are kept and not deleted, the name of the -temporary directory and the shell name for -.File_name groffer2.sh -are printed, the displayed file names are printed, the -.B grog -output is printed, the parameters are printed at several steps of -development, and a function stack is output with function -\f[CR]error_user()\f[] as well. -. -Neither the function call stack at the opening and closing of each -function call nor the landmark information to determine how far the -program is running are printed. -. -These seem to be the most useful parts among all debugging options. -. -. -.TP -.B --debug\-all -Enable all ten debugging informations including the function call -stack and the landmark information. -. -. -.TP -.B --debug\-filenames -Print the names of the files and -.I \%man\~pages -that are displayed by -.BR \&groffer . -. -. -.TP -.B --debug\-func -Enable the basic debugging information for checking the functions on -the beginning and end of each call. -. -The options -.B --debug\-stacks -and -.B --debug\-user -enable this option automatically. -. -This option is important for the development, but it decreases the -speed of -.B groffer -by large amounts. -. -. -.TP -.B --debug\-grog -Print the output of all -.B grog -commands. -. -. -.TP -.B --debug\-keep -Enable two debugging informations, the printing of the name of the -temporary directory and the keeping of the temporary files. -. -. -.TP -.B --debug\-lm -Enable one debugging information, the landmark information. -. -. -.TP -.B --debug\-params -Enable one debugging information, the parameters at several steps. -. -. -.TP -.B --debug\-shell -Enable one debugging information, the shell name for -.File_name groffer2.sh . -. -. -.TP -.B --debug\-stacks -Enable one debugging information, the function call stack. -. -. -.TP -.B --debug\-tmpdir -Enable one debugging information, the name of the temporary directory. -. -. -.TP -.B --debug\-user -Enable one debugging information, the function stack with -\f[CR]error_user()\f[]. -. -. -.TP -.B --do-nothing -This is like -.BR --version , -but without the output; no viewer is started. -. -This makes only sense in development. -. -. -.TP -.B --print=\fItext\fR -Just print the argument to standard error. -. -This is good for parameter check. -. -. -.TP -.B --shell \fIshell_program\fR -Specify the shell under which the -.File_name \%groffer2.sh -script should be run. -. -This option overwrites the automatic shell determination of the -program. -. -If the argument -.I shell_program -is empty a former shell option and the automatic shell determination -is cancelled and the default shell is restored. -. -Some shells run considerably faster than the standard shell. -. -. -.TP -.B -V -This is an advanced option for debugging only. -. -Instead of displaying the formatted input, a lot of -.I \%groffer -specific information is printed to standard output: -. -.RS -.Topic -the output file name in the temporary directory, -. -.Topic -the display mode of the actual -.B \%groffer -run, -. -.Topic -the display program for viewing the output with its arguments, -. -.Topic -the active parameters from the config files, the arguments in -.Env_var \%$GROFFER_OPT , -and the arguments of the command line, -. -.Topic -the pipeline that would be run by the -.B \%groff -program, but without executing it. -.RE -. -. -.P -Other useful debugging options are the -.B \%groff -option -.B -Z -and -.BR --mode=groff . -. -. -.\" -------------------------------------------------------------------- -.SS "Filespec Arguments" -.\" -------------------------------------------------------------------- -. -A -.I \%filespec -parameter is an argument that is not an option or option argument. -. -In -.BR \%groffer , -.I \%filespec -parameters are a file name or a template for searching -.IR \%man\~pages . -. -These input sources are collected and composed into a single output -file such as -.B \%groff -does. -. -. -.P -The strange \%\f[CR]POSIX\f[] behavior to regard all arguments behind -the first non-option argument as -.I \%filespec -arguments is ignored. -. -The \f[CR]GNU\f[] behavior to recognize options even when mixed with -.I \%filespec -arguments is used throughout. -. -But, as usual, the double minus argument -.B -- -ends the option handling and interprets all following arguments as -.I \%filespec -arguments; so the \%\f[CR]POSIX\f[] behavior can be easily adopted. -. -. -.P -The options -.B --apropos* -have a special handling of -.I filespec -arguments. -. -Each argument is taken as a search scheme of its own. -. -Also a regexp (regular expression) can be used in the filespec. -. -For example, -.B groffer --apropos '^gro.f$' -searches -.B groff -in the -.I man\~page -name, while -.B groffer --apropos groff -searches -.B groff -somewhere in the name or description of the -.IR man\~pages . -. -. -.P -All other parts of -.IR groffer , -such as the normal display or the output with -.B --whatis -have a different scheme for -.IR filespecs . -No regular expressions are used for the arguments. -. -The -.I filespec -arguments are handled by the following scheme. -. -. -.P -It is necessary to know that on each system the -.I \%man\~pages -are sorted according to their content into several sections. -. -The -.I classical man sections -have a single-character name, either a digit from -.B 1 -to -.B 9 -or one of the characters -.B n -or -.BR o . -. -. -.P -This can optionally be followed by a string, the so-called -.IR extension . -The -.I extension -allows to store several -.I man\~pages -with the same name in the same -.IR section . -But the -.I extension -is only rarely used, usually it is omitted. -. -Then the -.I extensions -are searched automatically by alphabet. -. -. -.P -In the following, we use the name -.I section_extension -for a word that consists of a single character -.I section -name or a -.I section -character that is followed by an -.IR extension . -. -Each -.I \%filespec -parameter can have one of the following forms in decreasing sequence. -. -. -.Topic -No -.I \%filespec -parameters means that -.B \%groffer -waits for standard input. -. -The minus option -.B - -always stands for standard input; it can occur several times. -. -If you want to look up a -.I \%man\~page -called -.B - -use the argument -.BR man:\- . -. -. -.Topic -Next a -.I \%filespec -is tested whether it is the path name of an existing file. -. -Otherwise it is assumed to be a searching pattern for a -.IR \%man\~page . -. -. -.Topic -.BI \%man: name ( section_extension ) , -.BI \%man: name . section_extension, -.IB \%name ( section_extension ) , -or -.IB \%name . section_extension -search the \%man\~page -.I \%name -in \%man\~section and possibly extension of -.IR \%section_extension . -. -. -.Topic -Now -.BI \%man: name -searches for a -.I \%man\~page -in the lowest -.I \%man\~section -that has a document called -.IR \%name . -. -. -.Topic -.I \%section_extension\~name -is a pattern of 2 arguments that originates from a strange argument -parsing of the -.B man -program. -. -Again, this searches the man page -.I name -with -.IR \%section_extension , -a combination of a -.I section -character optionally followed by an -.IR extension . -. -. -.Topic -We are left with the argument -.I \%name -which is not an existing file. -. -So this searches for the -.I \%man\~page -called -.I \%name -in the lowest -.I \%man\~section -that has a document for this name. -. -. -.P -Several file name arguments can be supplied. -. -They are mixed by -.B \%groff -into a single document. -. -Note that the set of option arguments must fit to all of these file -arguments. -. -So they should have at least the same style of the -.I \%groff -language. -. -. -.\" -------------------------------------------------------------------- -.SH "OUTPUT MODES" -.\" -------------------------------------------------------------------- -. -By default, the -.B \%groffer -program collects all input into a single file, formats it with the -.B \%groff -program for a certain device, and then chooses a suitable viewer -program. -. -The device and viewer process in -.B \%groffer -is called a -.IR \%mode . -. -The mode and viewer of a running -.B \%groffer -program is selected automatically, but the user can also choose it -with options. -. -. -The modes are selected by option the arguments of -.BR --mode=\fIanymode . -Additionally, each of this argument can be specified as an option of -its own, such as -.BR anymode . -Most of these modes have a viewer program, which can be chosen by an -option that is constructed like -.BR --\fIanymode\fR\-viewer . -. -. -.P -Several different modes are offered, graphical modes for -\f[CR]\%X\~Window\f[], -.IR \%text\~modes , -and some direct -.I \%groff\~modes -for debugging and development. -. -. -.P -By default, -.B \%groffer -first tries whether -.I \%x\~mode -is possible, then -.IR \%ps\~mode , -and finally -.IR \%tty\~mode . -. -This mode testing sequence for -.I \%auto\~mode -can be changed by specifying a comma separated list of modes with the -option -.B --default\-modes. -. -. -.P -The searching for -.I \%man\~pages -and the decompression of the input are active in every mode. -. -. -.\" -------------------------------------------------------------------- -.SS "Graphical Display Modes" -.\" -------------------------------------------------------------------- -. -The graphical display modes work mostly in the \%\f[CR]X\~Window\f[] -environment (or similar implementations within other windowing -environments). -. -The environment variable -.Env_var \%$DISPLAY -and the option -.B --display -are used for specifying the \%\f[CR]X\~Window\f[] display to be used. -. -If this environment variable is empty -.B \%groffer -assumes that no \%\f[CR]X\~Window\f[] is running and changes to a -.IR \%text\~mode . -. -You can change this automatic behavior by the option -.BR --default\-modes . -. -. -.P -Known viewers for the graphical display modes and their standard -\%\f[CR]X\~Window\f[] viewer programs are -. -.Topic -in a PDF viewer -.nh -.RI ( \%pdf\~mode ) -.hy -. -.Topic -in a web browser -.nh -.RI ( html -or -.IR \%www\~mode ) -.hy -.RE -. -.Topic -in a Postscript viewer -.nh -.RI ( \%ps\~mode ) -.hy -. -.Topic -\%\f[CR]X\~Window\f[] -.I roff -viewers such as -.BR \%gxditview (@MAN1EXT@) -or -.BR \%xditview (1) -(in -.IR \%x\~mode ) -. -.Topic -in a dvi viewer program -.nh -.RI ( \%dvi\~mode ) -.hy -. -. -.P -The -.I \%pdf\~mode -has a major advantage \[em] it is the only graphical display mode that -allows to search for text within the viewer; this can be a really -important feature. -. -Unfortunately, it takes some time to transform the input into the PDF -format, so it was not chosen as the major mode. -. -. -.P -These graphical viewers can be customized by options of the -\%\f[CR]X\~Window\~Toolkit\f[]. -. -But the -.B \%groffer -options use a leading double minus instead of the single minus used by -the \%\f[CR]X\~Window\~Toolkit\f[]. -. -. -.\" -------------------------------------------------------------------- -.SS "Text modes" -.\" -------------------------------------------------------------------- -. -There are two modes for text output, -.I \%mode\~text -for plain output without a pager and -.I \%mode\~tty -for a text output on a text terminal using some pager program. -. -. -.P -If the variable -.Env_var \%$DISPLAY -is not set or empty, -.B \%groffer -assumes that it should use -.IR \%tty\~\%mode . -. -. -.P -In the actual implementation, the -.I groff -output device -.I \%latin1 -is chosen for -.IR \%text\~modes . -. -This can be changed by specifying option -.B -T -or -.BR \%--device . -. -. -.P -The pager to be used can be specified by one of the options -.B --pager -and -.BR --tty\-viewer , -or by the environment variable -.Env_var \%$PAGER . -If all of this is not used the -.BR \%less (1) -program with the option -.B -r -for correctly displaying control sequences is used as the default -pager. -. -. -.\" -------------------------------------------------------------------- -.SS "Special Modes for Debugging and Development" -.\" -------------------------------------------------------------------- -. -These modes use the -.I \%groffer -file determination and decompression. -. -This is combined into a single input file that is fed directly into -.B \%groff -with different strategy without the -.I \%groffer -viewing facilities. -. -These modes are regarded as advanced, they are useful for debugging -and development purposes. -. -. -.P -The -.I \%source\~mode -with option -.B --source -just displays the decompressed input. -. -. -.P -Otion -.B --to\-stdout -does not display in a graphical mode. -. -It just generates the file for the chosen mode and then prints its -content to standard output. -. -. -.P -The -.I \%groff\~mode -passes the input to -.B \%groff -using only some suitable options provided to -.BR \%groffer . -. -This enables the user to save the generated output into a file or pipe -it into another program. -. -. -.P -In -.IR \%groff\~\%mode , -the option -.B -Z -disables post-processing, thus producing the -.nh -.I groff intermediate -.IR output . -.hy -. -In this mode, the input is formatted, but not postprocessed; see -.BR \%groff_out (@MAN5EXT@) -for details. -. -. -.P -All -.B \%groff -short options are supported by -.BR \%groffer . -. -. -.\" -------------------------------------------------------------------- -.SH "MAN PAGE SEARCHING" -.\" -------------------------------------------------------------------- -. -The default behavior of -.B \%groffer -is to first test whether a file parameter represents a local file; if -it is not an existing file name, it is assumed to represent the name -of a -.IR \%man\~page . -The following options can be used to determine whether the arguments -should be handled as file name or -.I \%man\~page -arguments. -. -.TP -.B --man -forces to interpret all file parameters as -.I \%filespecs -for searching -.IR \%man\~pages . -. -.TP -.B --no\-man -.TQ -.B --local\-file -disable the -.I man -searching; so only local files are displayed. -. -. -.P -If neither a local file nor a -.I \%man\~page -was retrieved for some file parameter a warning is issued on standard -error, but processing is continued. -. -. -.\" -------------------------------------------------------------------- -.SS "Search Algorithm" -.\" -------------------------------------------------------------------- -. -Let us now assume that a -.I \%man\~page -should be searched. -. -The -.B \%groffer -program provides a search facility for -.IR \%man\~pages . -. -All long options, all environment variables, and most of the -functionality of the \f[CR]GNU\fP -.BR \%man (1) -program were implemented. -. -The search algorithm shall determine which file is displayed for a given -.IR \%man\~page . -The process can be modified by options and environment variables. -. -. -.P -The only -.I man -action that is omitted in -.B \%groffer -are the preformatted -.IR \%man\~pages , -also called -.IR cat\~pages . -. -With the excellent performance of the actual computers, the -preformatted -.I \%man\~pages -aren't necessary any longer. -. -Additionally, -.B \%groffer -is a -.I roff -program; it wants to read -.I roff -source files and format them itself. -. -. -.P -The algorithm for retrieving the file for a -.I \%man\~page -needs first a set of directories. -. -This set starts with the so-called -.I man\~path -that is modified later on by adding names of -.I operating system -and -.IR language . -. -This arising set is used for adding the section directories which -contain the -.I \%man\~page -files. -. -. -.P -The -.I man\~path -is a list of directories that are separated by colon. -. -It is generated by the following methods. -. -.Topic -The environment variable -.Env_var \%$MANPATH -can be set. -. -.Topic -It can be read from the arguments of the environment variable -.Env_var \%$MANOPT . -. -.Topic -The -.I man\~path -can be manually specified by using the option -.BR --manpath . -An empty argument disables the -.I \%man\~page -searching. -. -.Topic -When no -.I man\~path -was set the -.BR \%manpath (1) -program is tried to determine one. -. -.Topic -If this does not work a reasonable default path from -.Env_var $PATH -is determined. -. -. -.P -We now have a starting set of directories. -. -The first way to change this set is by adding names of -.I operating -.IR systems . -. -This assumes that -.I \%man\~pages -for several -.I operating systems -are installed. -. -This is not always true. -. -The names of such -.I operating systems -can be provided by 3 methods. -. -.Topic -The environment variable -.Env_var \%$SYSTEM -has the lowest precedence. -. -.Topic -This can be overridden by an option in -.Env_var \%$MANOPT . -. -.Topic -This again is overridden by the command line option -.BR --systems . -. -. -.P -Several names of -.I operating systems -can be given by appending their names, separated by a comma. -. -. -.P -The -.I man\~path -is changed by appending each -.I system -name as subdirectory at the end of each directory of the set. -. -No directory of the -.I man\~path -set is kept. -. -But if no -.I system -name is specified the -.I man\~path -is left unchanged. -. -. -.P -After this, the actual set of directories can be changed by -.I language -information. -. -This assumes that there exist -.I man\~pages -in different languages. -. -The wanted -.I language -can be chosen by several methods. -. -.Topic -Environment variable -.Env_var $LANG . -. -.Topic -This is overridden by -.Env_var \%$LC_MESSAGES . -. -.Topic -This is overridden by -.Env_var $LC_ALL . -. -.Topic -This can be overridden by providing an option in -.Env_var \%$MANOPT . -. -.Topic -All these environment variables are overridden by the command line -option -.BR --locale . -. -. -.P -The -.I default language -can be specified by specifying one of the pseudo-language parameters -\f[CR]C\fP or \f[CR]\%POSIX\fP. -. -This is like deleting a formerly given -.I language -information. -. -The -.I \%man\~pages -in the -.I default language -are usually in English. -. -. -.P -Of course, the -.I language -name is determined by -.BR man . -In \f[CR]GNU\fP -.BR man , -it is specified in the \%\f[CR]POSIX\~1003.1\fP based format: -.P -.nh -\f[I]\f[][\f[CB]_\f[]\f[I]\f[][\f[CB].\fP\ -\f[I]\f[][\f[CB],\fP\f[I]\fP]]], -.hy -.P -but the two-letter code in -.nh -.I -.hy -is sufficient for most purposes. -. -If for a complicated -.I language -formulation no -.I \%man\~pages -are found -.B \%groffer -searches the country part consisting of these first two characters as -well. -. -. -.P -The actual directory set is copied thrice. -. -The -.I language -name is appended as subdirectory to each directory in the first copy -of the actual directory set (this is only done when a language -information is given). -. -Then the 2-letter abbreviation of the -.I language -name is appended as subdirectories to the second copy of the directory -set (this is only done when the given language name has more than 2 -letters). -. -The third copy of the directory set is kept unchanged (if no -.I language -information is given this is the kept directory set). -. -These maximally 3 copies are appended to get the new directory set. -. -. -.P -We now have a complete set of directories to work with. -. -In each of these directories, the -.I man -files are separated in -.IR sections . -. -The name of a -.I section -is represented by a single character, a digit between -.I 1 -and -.IR 9 , -or the character -.I o -or -.IR n , -in this order. -. -. -.P -For each available -.IR section , -a subdirectory -.File_name man \fI
\fP -exists containing all -.I man -files for this -.IR section , -where -.I
-is a single character as described before. -. -Each -.I man -file in a -.I section -directory has the form -.IR \%\f[CB]man\fP
\f[CB]/\fP\f[CB].\fP
\ -[][\f[CB].\fP] , -where -.I \% -and -.I \% -are optional. -. -.I \% -is the name of the -.I \%man\~page -that is also specified as filespec argument on the command line. -. -. -.P -The -.I extension -is an addition to the section. -. -This postfix acts like a subsection. -. -An -.I extension -occurs only in the file name, not in name of the -.I section -subdirectory. -. -It can be specified on the command line. -. -. -.P -On the other hand, the -.I compression -is just an information on how the file is compressed. -. -This is not important for the user, such that it cannot be specified -on the command line. -. -. -.P -There are 4 methods to specify a -.I section -on the command line: -. -.Topic -Environment variable -.Env_var \%$MANSECT -. -.Topic -Command line option -.B --sections -. -.Topic -Appendix to the -.I name -argument in the form -.I .
-. -.Topic -Preargument before the -.I name -argument in the form -.I
-. -. -.P -It is also possible to specify several -.I sections -by appending the single characters separated by colons. -. -One can imagine that this means to restrict the -.I \%man\~page -search to only some -.IR sections . -. -The multiple -.I sections -are only possible for -.Env_var \%$MANSECT -and -.BR --sections . -. -. -.P -If no -.I section -is specified all -.I sections -are searched one after the other in the given order, starting with -.IR section\~1 , -until a suitable file is found. -. -. -.P -There are 4 methods to specify an -.I extension -on the command line. -. -But it is not necessary to provide the whole extension name, some -abbreviation is good enough in most cases. -. -.Topic -Environment variable -.Env_var \%$EXTENSION -. -.Topic -Command line option -.B --extension -. -.Topic -Appendix to the -.I .
-argument in the form -.I .
-. -.Topic -Preargument before the -.I name -argument in the form -.I
-. -. -.P -For further details on -.I \%man\~page -searching, see -.BR \%man (1). -. -. -.\" -------------------------------------------------------------------- -.SS "Examples of man files" -.\" -------------------------------------------------------------------- -. -.TP -.File_name /usr/share/man/man1/groff.1 -This is an uncompressed file for the -.I \%man\~page -\f[CR]groff\fP in -.IR section\~1 . -. -It can be called by -.EX -\fIsh#\fR groffer\~groff -.EE -No -.I section -is specified here, so all -.I sections -should be searched, but as -.I section\~1 -is searched first this file will be found first. -. -The file name is composed of the following components. -.File_name /usr/share/man -must be part of the -.IR \%man\~path ; -the subdirectory -.File_name man1/ -and the part -.File_name .1 -stand for the -.IR section ; -.File_name groff -is the name of the -.IR \%man\~page . -. -. -.TP -.File_name /usr/local/share/man/man7/groff.7.gz -The file name is composed of the following components. -.File_name /usr/local/share/man -must be part of the -.IR \%man\~path ; -the subdirectory -.File_name man7/ -and the part -.File_name .7 -stand for the -.IR section ; -.File_name groff -is the name of the -.IR \%man\~page ; -the final part -.File_name .gz -stands for a compression with -.BR gzip (1). -As the -.I section -is not the first one it must be specified as well. -. -This can be done by one of the following commands. -.EX -\fIsh#\fR\~groffer\~groff.7 -\fIsh#\fR\~groffer\~7\~groff -\fIsh#\fR\~groffer\~\-\-sections=7\~groff -.EE -. -.TP -.File_name /usr/local/man/man1/ctags.1emacs21.bz2 -Here -.File_name /usr/local/man -must be in -.IR \%man\~path ; -the subdirectory -.File_name man1/ -and the file name part -.File_name .1 -stand for -.IR section\~1 ; -the name of the -.I \%man\~page -is -.File_name ctags ; -the section has an extension -.File_name emacs21 ; -and the file is compressed as -.File_name .bz2 -with -.BR bzip2 (1). -The file can be viewed with one of the following commands -.EX -\fIsh#\fR\~groffer\~ctags.1e -\fIsh#\fR\~groffer\~1e\~ctags -\fIsh#\fR\~groffer\~\-\-extension=e\~\-\-sections=1\~ctags -.EE -where \f[CR]e\fP works as an abbreviation for the extension -\f[CR]emacs21\fP. -. -. -.TP -.File_name /usr/man/linux/de/man7/man.7.Z -The directory -.File_name /usr/man -is now part of the -.IR \%man\~path ; -then there is a subdirectory for an -.I operating system -name -.File_name linux/ ; -next comes a subdirectory -.File_name de/ -for the German -.IR language ; -the -.I section -names -.File_name man7 -and -.File_name .7 -are known so far; -.File_name man -is the name of the -.IR \%man\~page ; -and -.File_name .Z -signifies the compression that can be handled by -.BR gzip (1). -We want now show how to provide several values for some options. -. -That is possible for -.I sections -and -.I operating system -names. -. -So we use as -.I sections\~5 -and -.I 7 -and as -.I system -names -.I linux -and -.IR aix . -The command is then -.sp -.EX -\fIsh#\fR groffer\~\-\-locale=de\~\-\-sections=5:7\~\-\-systems=linux,aix\~man -\fIsh#\fR LANG=de\~MANSECT=5:7\~SYSTEM=linux,aix\~groffer\~man -.EE -. -. -.\" -------------------------------------------------------------------- -.SH DECOMPRESSION -.\" -------------------------------------------------------------------- -. -The program has a decompression facility. -. -If standard input or a file that was retrieved from the command line -parameters is compressed with a format that is supported by either -.BR \%gzip (1) -or -.BR \%bzip2 (1) -it is decompressed on-the-fly. -. -This includes the \f[CR]GNU\fP -.BR \%.gz , -.BR \%.bz2 , -and the traditional -.B \%.Z -compression. -. -The program displays the concatenation of all decompressed input in -the sequence that was specified on the command line. -. -. -.\" -------------------------------------------------------------------- -.SH "ENVIRONMENT" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program supports many system variables, most of them by courtesy of -other programs. -. -All environment variables of -.BR \%groff (@MAN1EXT@) -and \f[CR]GNU\fP -.BR \%man (1) -and some standard system variables are honored. -. -. -.\" -------------------------------------------------------------------- -.SS "Native groffer Variables" -.\" -------------------------------------------------------------------- -. -.TP -.Env_var \%$GROFFER_OPT -Store options for a run of -.BR \%groffer . -. -The options specified in this variable are overridden by the options -given on the command line. -. -The content of this variable is run through the shell builtin `eval'; -so arguments containing white-space or special shell characters should -be quoted. -. -Do not forget to export this variable, otherwise it does not exist -during the run of -.BR groffer . -. -. -.\" -------------------------------------------------------------------- -.SS "System Variables" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program is a shell script that is run through -.File_name /bin/sh , -which can be internally linked to programs like -.BR \%bash (1). -The corresponding system environment is automatically effective. -. -The following variables have a special meaning for -.BR \%groffer . -. -. -.TP -.Env_var \%$DISPLAY -If this variable is set this indicates that the \%\f[CR]X\~Window\fP -system is running. -. -Testing this variable decides on whether graphical or text output is -generated. -. -This variable should not be changed by the user carelessly, but it can -be used to start the graphical -.B \%groffer -on a remote \%\f[CR]X\~Window\fP terminal. -. -For example, depending on your system, -.B \%groffer -can be started on the second monitor by the command -.sp -.EX -\fIsh#\fR DISPLAY=:0.1\~groffer\~what.ever & -.EE -. -. -.TP -.Env_var \%$LC_ALL -.TQ -.Env_var \%$LC_MESSAGES -.TQ -.Env_var $LANG -If one of these variables is set (in the above sequence), its content -is interpreted as the locale, the language to be used, especially when -retrieving -.IR \%man\~pages . -. -A locale name is typically of the form -.nh -.IR language [\c -.B _\c -.IR territory [\c -.B .\c -.IR codeset [\c -.B @\c -.IR modifier ]]], -.hy -where -.I \%language -is an ISO 639 language code, -.I \%territory -is an ISO 3166 country code, and -.I \%codeset -is a character set or encoding identifier like ISO-8859-1 or UTF-8; -see -.BR \%setlocale (3). -. -The locale values \f[CR]C\fP and \%\f[CR]POSIX\fP -stand for the default, i.e. the -.I \%man\~page -directories without a language prefix. -. -This is the same behavior as when all 3\~variables are unset. -. -. -.TP -.Env_var \%$PAGER -This variable can be used to set the pager for the tty output. -. -For example, to disable the use of a pager completely set this -variable to the -.BR \%cat (1) -program -.sp -.EX -\fIsh#\fR PAGER=cat\~groffer\~anything -.EE -.sp -. -.TP -.Env_var $PATH -All programs within the -.B \%groffer -shell script are called without a fixed path. -. -Thus this environment variable determines the set of programs used -within the run of -.BR \%groffer . -. -. -.\" -------------------------------------------------------------------- -.SS "Groff Variables" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program internally calls -.BR \%groff , -so all environment variables documented in -.BR \%groff (@MAN1EXT@) -are internally used within -.B \%groffer -as well. -. -The following variable has a direct meaning for the -.B \%groffer -program. -. -.TP -.Env_var \%$GROFF_TMPDIR -If the value of this variable is an existing, writable directory, -.B \%groffer -uses it for storing its temporary files, just as -.B groff -does. -. -See the -.BR \%groff (@MAN1EXT@) -man page for more details on the location of temporary files. -. -. -.\" -------------------------------------------------------------------- -.SS "Man Variables" -.\" -------------------------------------------------------------------- -. -Parts of the functionality of the -.B man -program were implemented in -.BR \%groffer ; -support for all environment variables documented in -.BR \%man (1) -was added to -.BR \%groffer , -but the meaning was slightly modified due to the different approach in -.BR \%groffer ; -but the user interface is the same. -. -The -.B man -environment variables can be overwritten by options provided with -.Env_var \%$MANOPT , -which in turn is overwritten by the command line. -. -. -.TP -.Env_var \%$EXTENSION -Restrict the search for -.I \%man\~pages -to files having this extension. -. -This is overridden by option -.BR --extension ; -see there for details. -. -. -.TP -.Env_var \%$MANOPT -This variable contains options as a preset for -.BR \%man (1). -As not all of these are relevant for -.B \%groffer -only the essential parts of its value are extracted. -. -The options specified in this variable overwrite the values of the -other environment variables that are specific to -.IR man . -. -All options specified in this variable are overridden by the options -given on the command line. -. -. -.TP -.Env_var \%$MANPATH -If set, this variable contains the directories in which the -.I \%man\~page -trees are stored. -. -This is overridden by option -.BR \%--manpath . -. -. -.TP -.Env_var \%$MANSECT -If this is a colon separated list of section names, the search for -.I \%man\~pages -is restricted to those manual sections in that order. -. -This is overridden by option -.BR --sections . -. -. -.TP -.Env_var \%$SYSTEM -If this is set to a comma separated list of names these are interpreted -as -.I \%man\~page -trees for different operating systems. -. -This variable can be overwritten by option -.BR --systems ; -see there for details. -. -. -.P -The environment variable -.Env_var \%$MANROFFSEQ -is ignored by -.B \%groffer -because the necessary preprocessors are determined automatically. -. -. -.\" -------------------------------------------------------------------- -.SH "CONFIGURATION FILES" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program can be preconfigured by two configuration files. -. -. -.TP -.File_name \%/etc/groff/groffer.conf -System-wide configuration file for -.BR \%groffer . -. -. -.TP -.File_name \%$HOME/.groff/groffer.conf -User-specific configuration file for -.BR \%groffer , -where -.Env_var \%$HOME -denotes the user's home directory. -. -This file is called after the system-wide configuration file to enable -overriding by the user. -. -. -.P -Both files are handled for the configuration, but the configuration -file in -.File_name /etc -comes first; it is overwritten by the configuration file in the home -directory; both configuration files are overwritten by the environment -variable -.Env_var \%$GROFFER_OPT ; -everything is overwritten by the command line arguments. -. -. -.P -In the configuration files, arbitrary spaces are allowed at the -beginning of each line, they are just ignored. -. -Apart from that, the lines of the configuration lines either start -with a minus character, all other lines are interpreted as shell -commands. -. -. -.P -The lines with the beginning minus are interpreted as -.B groffer -options. -. -This easily allows to set general -.B \%groffer -options that should be used with any call of -.BR \%groffer . -. -. -.P -If a lines starts with a double minus it represents a -.B \%groffer -long option; everything behind the first equal sign -.RB ` = ' -or space character up to the end of the line is interpreted as its -argument. -. -A line starting with a single minus represents a short options cluster -with or without a final argument. -. -It is not necessary to use quotes in these lines; quotes are just -ignored. -. -. -.P -The lines starting with a minus are changed into a prepend to the -existing value of -.Env_var \%$GROFFER_OPT . -. -So the configuration files will be transferred into a shell script -that is called within -.BR \%groffer . -. -. -.P -It makes sense to use these configuration files for the following -tasks: -. -.Topic -Preset command line options, such as choosing a -.I \%mode -or a viewer. -. -These are written into lines starting with a single or double minus -sign, followed by the option name. -. -.Topic -Preset environment variables recognized by -.BR \%groffer ; -but do not forget to export them. -. -.Topic -You can also write a shell function for calling, for example a viewer -program for some -.IR \%mode . -Such a function can be fed into a corresponding -.B --\f[I]mode\fP\-viewer -option. -. -.Topic -Enter -.B --shell -to specify a shell for the run of -.File_name groffer2.sh . -Some shells run much faster than the standard shell. -. -. -.P -As an example, consider the following configuration file that can be -used either in -.File_name \%/etc/groff/groffer.conf -or -.File_name \%~/.groff/groffer.conf . -. -. -.P -.ft CR -.nh -.nf -# groffer configuration file -# -# groffer options that are used in each call of groffer -\-\-shell=ksh -\-\-foreground=DarkBlue -\-\-resolution=100 -\-\-x\-viewer=gxditview \-geometry 900x1200 -# -# some shell commands -if test "$DISPLAY" = ""; then - export DISPLAY='localhost:0.0' -fi -date >>~/mygroffer.log -.fi -.hy -.ft -. -. -.P -The lines starting with -.B # -are just ignored, so they act as command lines. -. -This configuration sets four -.B \%groffer -options (the lines starting with `\-') and runs two shell commands (the -rest of the script). -. -This has the following effects: -. -. -.Topic -Use -.B ksh -as the shell to run the -.B \%groffer -script; if it works it should be faster than the usual -.BR sh . -. -. -.Topic -Use a text color of -.B \%DarkBlue -in all viewers that support this, such as -.BR \%gxditview . -. -. -.Topic -Use a resolution of -.B 100dpi -in all viewers that support this, such as -.BR \%gxditview . -. -By this, the default device in -.I x mode -is set to -.BR X100 . -. -. -.Topic -Force -.BR \%gxditview (@MAN1EXT@) -as the -.I \%x-mode -viewer using the geometry option for setting the width to -.B 900px -and the height to -.BR 1200px . -This geometry is suitable for a resolution of -.BR 100dpi . -. -. -.Topic -If the environment variable -.Env_var \%$DISPLAY -is empty set it to -.IR localhost:0.0 . -. -That allows to start -.B \%groffer -in the standard \%\f[CR]X\~Window\fP display, even when the program -is called from a text console. -. -. -.Topic -Just for fun, the date of each -.B \%groffer -start is written to the file -.File_name mygroffer.log -in the home directory. -. -. -.\" -------------------------------------------------------------------- -.SH "EXAMPLES" -.\" -------------------------------------------------------------------- -. -The usage of -.B \%groffer -is very easy. -. -Usually, it is just called with a file name or -.IR \%man\~page . -. -The following examples, however, show that -.B \%groffer -has much more fancy capabilities. -. -.sp -.EX -\fIsh#\fR\~groffer\~/usr/local/share/doc/groff/meintro.ms.gz -.EE -.sp -Decompress, format and display the compressed file -.File_name meintro.ms.gz -in the directory -.File_name /usr/local/share/doc/groff , -using the standard viewer -.B \%gxditview -as graphical viewer when in \%\f[CR]X\~Window\fP, or the -.BR \%less (1) -pager program when not in \%\f[CR]X\~Window\fP. -. -.sp -.EX -\fIsh#\fR\~groffer\~groff -.EE -.sp -If the file -.File_name \%./groff -exists use it as input. -. -Otherwise interpret the argument as a search for the -.I \%man\~page -named -.B \%groff -in the smallest possible -.IR \%man\~section , -being section 1 in this case. -. -.sp -.EX -\fIsh#\fR\~groffer\~man:groff -.EE -.sp -search for the -.I \%man\~page -of -.B \%groff -even when the file -.File_name ./groff -exists. -. -.sp -.EX -\fIsh#\fR\~groffer\~groff.7 -\fIsh#\fR\~groffer\~7\~groff -.EE -.sp -search the -.I \%man\~page -of -.B \%groff -in -.I \%man\~section -.BR 7 . -This section search works only for a digit or a single character from -a small set. -. -.sp -.EX -\fIsh#\fR\~groffer\~fb.modes -.EE -.sp -If the file -.File_name ./fb.modes -does not exist interpret this as a search for the -.I \%man\~page -of -.BR fb.modes . -As the extension -.I \%modes -is not a single character in classical section style the argument is -not split to a search for -.BR fb . -. -.sp -.EX -\fIsh#\fR\~groffer\~groff\~\[cq]troff(1)\[cq]\~man:roff -.EE -.sp -The arguments that are not existing files are looked-up as the -following -.IR \%man\~pages : -.B \%groff -(automatic search, should be found in \fIman\fP\~section\~1), -.B \%troff -(in section\~1), -and -.B \%roff -(in the section with the lowest number, being\~7 in this case). -. -The quotes around -.nh -.I \[cq]troff(1)\[cq] -.hy -are necessary because the parentheses are special shell characters; -escaping them with a backslash character -.I \[rs]( -and -.I \[rs]) -would be possible, too. -. -The formatted files are concatenated and displayed in one piece. -. -.sp -.EX -\fIsh#\fR\~LANG=de\~groffer\~--man\~--www\~--www-viewer=galeon\~ls -.EE -.sp -Retrieve the German -.I \%man\~page -(language -.IR de ) -for the -.B ls -program, decompress it, format it to -.I \%html -format -.nh -.RI ( \%www\~mode ) -.hy -and view the result in the web browser -.BR \%galeon . -The option -.B --man -guarantees that the -.I \%man\~page -is retrieved, even when a local file -.File_name \%ls -exists in the actual directory. -. -. -.sp -.EX -\fIsh#\fR\~groffer\~--source\~'man:roff(7)' -.EE -.sp -Get the -.I \%man\~page -called -.I \%roff -in \fIman\fP\~section 7, decompress it, and print its unformatted -content, its source code. -. -. -.sp -.EX -\fIsh#\fR\~groffer\~--de-p\~--in\~--ap -.EE -.sp -This is a set of abbreviated arguments, it is determined as -.br -.sp -.EX -\fIsh#\fR\~groffer\~--debug-params\~--intermediate-output\~--apropos -.EE -.sp -. -.sp -.EX -\fIsh#\fR\~cat\~file.gz\~|\~groffer\~-Z\~-mfoo -.EE -.sp -. -The file -.File_name file.gz -is sent to standard input, this is decompressed, and then this is -transported to the -.I \%groff intermediate output mode -without post-processing -.RB ( groff -option -.BR -Z ), -using macro package -.I \%foo -.RB ( groff -option -.BR -m ). -. -. -.sp -.EX -\fIsh#\fR\~echo\~'\[rs]f[CB]WOW!'\~| -> groffer --x --bg red --fg yellow --geometry 200x100 - -.EX -.sp -. -Display the word \f[CB]WOW!\fP in a small window in constant-width -bold font, using color yellow on red background. -. -. -.\" -------------------------------------------------------------------- -.SH "COMPATIBILITY" -.\" -------------------------------------------------------------------- -. -The -.B \%groffer -program consists of two shell scripts. -. -. -.P -The starting script is the file -.File_name \%groffer -that is installed in a -.File_name bin -directory. -. -It is generated from the source file -.File_name \%groffer.sh . -. -It is just a short starting script without any functions such that it -can run on very poor shells. -. -. -.P -The main part of the -.B \%groffer -program is the file -.File_name groffer2.sh -that is installed in the -.I groff -library directory. -. -This script can be run under a different shell by using the -.B \%groffer -option -.BR --shell . -. -. -.P -Both scripts are compatible with both -\f[CR]GNU\fP and \%\f[CR]POSIX\fP. -. -\%\f[CR]POSIX\fP compatibility refers to -\%\f[CR]IEEE\~P1003.2/D11.2\fP of September 1991, a very early -version of the \%\f[CR]POSIX\fP standard that is still freely -available on the Internet at -.UR http://\:www.funet.fi/\:pub/\:doc/\:posix/\:p1003.2/\:d11.2/\:all -\%POSIX\~P1003.2\~draft\~11.2 -.UE . -. -. -.P -Only a restricted set of shell language elements and shell builtins is -used to achieve even compatibility with some Bourne shells that are -not fully \%\f[CR]POSIX\fP compatible. -. -The -.B \%groffer -shell scripts were tested on many shells, including the following -Bourne shells: -.BR \%ash (1), -.BR \%bash (1), -.BR \%dash (1), -.BR \%ksh (1), -.BR \%pdksh (1), -.BR \%posh (1), -and -.BR \%zsh (1). -So it should work on most actual free and commercial operating -systems. -. -. -.P -The shell for the run of -.File_name groffer2.sh -can be chosen by the option -.BR --shell -on the command line or the environment variable -.Env_var $GROFF_OPT . -If you want to add it to one of the -.B \%groffer -configuration files you must write a line starting with -.BR --shell . -. -. -.P -The -.B \%groffer -program provides its own parser for command line arguments that is -compatible to both \%\f[CR]POSIX\fP -.BR \%getopts (1) -and \%\f[CR]GNU\fP -.BR \%getopt (1). -It can handle option arguments and file names containing white space -and a large set of special characters. -. -The following standard types of options are supported. -. -. -.Topic -The option consisting of a single minus -.B - -refers to standard input. -. -. -.Topic -A single minus followed by characters refers to a single character -option or a combination thereof; for example, the -.B \%groffer -short option combination -.B -Qmfoo -is equivalent to -.BR -Q\~\-m\~foo . -. -. -.Topic -Long options are options with names longer than one character; they -are always preceded by a double minus. -. -An option argument can either go to the next command line argument or -be appended with an equal sign to the argument; for example, -.B --long=arg -is equivalent to -.BR --long\~arg . -. -. -.Topic -An argument of -.B -- -ends option parsing; all further command line arguments are -interpreted as -.I \%filespec -parameters, i.e. file names or constructs for searching -.IR \%man\~pages ). -. -. -.Topic -All command line arguments that are neither options nor option -arguments are interpreted as -.I \%filespec -parameters and stored until option parsing has finished. -. -For example, the command line -.sp -.EX -\fIsh#\fR\~groffer file1 -a -o arg file2 -.EE -.sp -is equivalent to -.sp -.EX -\fIsh#\fR\~groffer -a -o arg -- file1 file2 -.EE -.sp -. -.P -The free mixing of options and -.I \%filespec -parameters follows the GNU principle. -. -That does not fulfill the strange option behavior of \%\f[CR]POSIX\fP -that ends option processing as soon as the first non-option argument -has been reached. -. -The end of option processing can be forced by the option -.RB ` \-\- ' -anyway. -. -. -.\" -------------------------------------------------------------------- -.SH "BUGS" -.\" -------------------------------------------------------------------- -. -Report bugs to the -.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 -.B \%groffer -you are using. -. -. -.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" -.\" -------------------------------------------------------------------- -. -.P -.BR \%groff (@MAN1EXT@), -.BR \%@g@troff (@MAN1EXT@) -.RS -Details on the options and environment variables available in -.BR \%groff ; -all of them can be used with -.BR \%groffer . -.RE -. -. -.TP -.BR \%groff (@MAN7EXT@) -Documentation of the -.I \%groff -language. -. -. -.TP -.BR \%grog (@MAN1EXT@) -Internally, -.B \%groffer -tries to guess the -.B \%groff -command line options from the input using this program. -. -. -.TP -.BR groff_out (@MAN5EXT@) -Documentation on the -.I \%groff intermediate output -.nh -.RI ( ditroff -output). -.hy -. -. -.TP -.BR groff_tmac (@MAN5EXT@) -Documentation on the -.I \%groff -macro files. -. -. -.TP -.BR \%man (1) -The standard program to display -.IR \%man\~pages . -. -The information there is only useful if it is the -.I \%man\~page -for GNU -.BR man . -Then it documents the options and environment variables that are -supported by -.BR \%groffer . -. -. -.P -.BR \%ash (1), -.BR \%bash (1), -.BR \%dash (1), -.BR \%ksh (1), -.BR \%pdksh (1), -.BR \%posh (1), -.BR \%sh (1), -.BR \%zsh (1) -.RS -Bourne shells that were tested with -.BR \%groffer . -.RE -. -. -.P -.BR \%gxditview (@MAN1EXT@), -.BR \%xditview (1x) -.RS -Viewers for -.BR \%groffer 's -.IR \%x\~mode . -.RE -. -. -.P -.BR \%kpdf (1), -.BR \%kghostview (1), -.BR \%evince (1), -.BR \%ggv (1), -.BR \%gv (1), -.BR \%ghostview (1), -.BR \%gs (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%ps\~mode . -.RE -. -. -.P -.BR \%kpdf (1), -.BR \%acroread (1), -.BR \%evince (1), -.BR \%xpdf (1), -.BR \%gpdf (1), -.BR \%kghostview (1), -.BR \%ggv (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%pdf\~mode . -.RE -. -. -.P -.BR \%kdvi (1), -.BR \%xdvi (1), -.BR \%dvilx (1) -.RS -Viewers for -.BR \%groffer 's -.IR \%dvi\~mode . -.RE -. -. -.P -.BR \%konqueror (1), -.BR \%epiphany (1), -.BR \%firefox (1), -.BR \%mozilla (1), -.BR \%netscape (1), -.BR \%lynx (1) -.RS -Web-browsers for -.BR \%groffer 's -.I \%html -or -.IR \%www\~mode . -.RE -. -. -.TP -.BR \%less (1) -Standard pager program for the -.IR \%tty\~mode . -. -. -.P -.BR \%gzip (1), -.BR \%bzip2 (1) -.RS -The decompression programs supported by -.BR \%groffer . -.RE -. -. -.\" -------------------------------------------------------------------- -.SH "AUTHOR" -.\" -------------------------------------------------------------------- -.author -. -. -.\" -------------------------------------------------------------------- -.SH "COPYING" -.\" -------------------------------------------------------------------- -.copyleft -. -. -.\" -------------------------------------------------------------------- -.\" Emacs settings -.\" -------------------------------------------------------------------- -. -.\" Local Variables: -.\" mode: nroff -.\" End: diff -ruN groff-1.22.2/contrib/groffer/shell/groffer.sh groff-1.22.3/contrib/groffer/shell/groffer.sh --- groff-1.22.2/contrib/groffer/shell/groffer.sh 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/shell/groffer.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,384 +0,0 @@ -#! /bin/sh - -# groffer - display groff files - -# Source file position: /contrib/groffer/groffer.sh -# Installed position: /bin/groffer - -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - -export GROFFER_OPT; # option environment for groffer - -export _CONF_FILE_ETC; # configuration file in /etc -export _CONF_FILE_HOME; # configuration file in $HOME -export _CONF_FILES; # configuration files -_CONF_FILE_ETC='/etc/groff/groffer.conf'; -_CONF_FILE_HOME="${HOME}/.groff/groffer.conf"; -_CONF_FILES="${_CONF_FILE_ETC} ${_CONF_FILE_HOME}"; - -# characters - -export _AT; -export _SP; -export _SQ; -export _TAB; - -_AT='@'; -_SP=' '; -_SQ="'"; -_TAB=' '; - -export _ERROR; -_ERROR='7'; # for syntax errors; no `-1' in `ash' - -# @...@ constructs - -export _BEFORE_MAKE; -if test _@VERSION@_ = _${_AT}VERSION${_AT}_ -then - # script before `make' - _BEFORE_MAKE='yes'; -else - _BEFORE_MAKE='no'; -fi; - -export _AT_BINDIR_AT; -export _AT_G_AT; -export _AT_LIBDIR_AT; -export _GROFFER_LIBDIR; -case "${_BEFORE_MAKE}" in -yes) - self="$0"; - case "${self}" in - /*) :; ;; - *) - curdir="$(pwd)"; - case "${curdir}" in - */) - self="${curdir}${self}"; - ;; - *) - self="${curdir}/${self}"; - ;; - esac; - ;; - esac; - groffer_shell_dir="$(dirname ${self})"; - case "${groffer_shell_dir}" in - */) :; ;; - *) groffer_shell_dir="${groffer_shell_dir}/"; - esac; - groffer_top_dir="${groffer_shell_dir}../"; - _AT_G_AT=''; - _AT_BINDIR_AT="${groffer_shell_dir}"; - _AT_LIBDIR_AT="${groffer_shell_dir}"; - _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"; - _VERSION_SH="${groffer_top_dir}version.sh"; - ;; -no) - _AT_G_AT='@g@'; - _AT_BINDIR_AT='@BINDIR@'; - case "${_AT_BINDIR_AT}" in - */) :; ;; - *) _AT_BINDIR_AT="${_AT_BINDIR_AT}/"; - esac; - _AT_LIBDIR_AT='@libdir@'; - case "${_AT_LIBDIR_AT}" in - */) :; ;; - *) _AT_LIBDIR_AT="${_AT_LIBDIR_AT}/"; - esac; - _GROFFER_LIBDIR="${_AT_LIBDIR_AT}"'groff/groffer/'; - _VERSION_SH="${_GROFFER_LIBDIR}"'version.sh'; - ;; -esac; - -if test -f "${_VERSION_SH}" -then - . "${_VERSION_SH}"; -fi; - -export _GROFF_VERSION; -case "${_BEFORE_MAKE}" in -yes) - _GROFF_VERSION="${_GROFF_VERSION_PRESET}"; - ;; -no) - _GROFF_VERSION='@VERSION@'; - ;; -esac; - -export _GROFFER2_SH; # file name of the script that follows up -_GROFFER2_SH="${_GROFFER_LIBDIR}"'groffer2.sh'; - -export _GROFFER_SH; # file name of this shell script -case "$0" in -*groffer*) - _GROFFER_SH="$0"; - ;; -*) - echo 'The groffer script should be started directly.' >&2 - exit 1; - ;; -esac; - -export _NULL_DEV; -if test -c /dev/null -then - _NULL_DEV="/dev/null"; -else - _NULL_DEV="NUL"; -fi; - - -# Test of the `$()' construct. -if test _"$(echo "$(echo 'test')")"_ \ - != _test_ -then - echo 'The "$()" construct did not work.' >&2; - exit "${_ERROR}"; -fi; - -# Test of sed program -if test _"$(echo red | sed 's/r/s/')"_ != _sed_ -then - echo 'The sed program did not work.' >&2; - exit "${_ERROR}"; -fi; - -# for some systems it is necessary to set some unset variables to `C' -# according to Autobook, ch. 22 -for var in LANG LC_ALL LC_MESSAGES LC_CTYPES LANGUAGES -do - if eval test _"\${$var+set}"_ = _set_ - then - eval ${var}='C'; - eval export ${var}; - fi; -done; - - -########################### configuration - -# read and transform the configuration files, execute the arising commands -for f in "${_CONF_FILE_HOME}" "${_CONF_FILE_ETC}" -do - if test -f "$f" - then - o=""; # $o means groffer option - # use "" quotes because of ksh and posh - eval "$(cat "$f" | sed -n ' -# Ignore comments -/^['"${_SP}${_TAB}"']*#/d -# Delete leading and final space -s/^['"${_SP}${_TAB}"']*// -s/['"${_SP}${_TAB}"']*$// -# Print all lines with shell commands, those not starting with - -/^[^-]/p -# Remove all single and double quotes -s/['"${_SQ}"'"]//g -# Replace empty arguments -s/^\(-[^ ]*\)=$/o="${o} \1 '"${_SQ}${_SQ}"'"/p -# Replace division between option and argument by single space -s/[='"${_SP}${_TAB}"']['"${_SP}${_TAB}"']*/'"${_SP}"'/ -# Handle lines without spaces -s/^\(-[^'"${_SP}"']*\)$/o="${o} \1"/p -# Encircle the remaining arguments with single quotes -s/^\(-[^ ]*\) \(.*\)$/o="${o} \1 '"${_SQ}"'\2'"${_SQ}"'"/p -')" - - # Remove leading space - o="$(echo "$o" | sed 's/^ *//')"; - if test _"${o}"_ != __ - then - if test _"{GROFFER_OPT}"_ = __ - then - GROFFER_OPT="${o}"; - else - GROFFER_OPT="${o} ${GROFFER_OPT}"; - fi; - fi; - fi; -done; - -# integrate $GROFFER_OPT into the command line; it isn't needed any more -if test _"${GROFFER_OPT}"_ != __ -then - eval set x "${GROFFER_OPT}" '"$@"'; - shift; - GROFFER_OPT=''; -fi; - - -########################### Determine the shell - -export _SHELL; - -supports_func=no; -foo() { echo bar; } 2>${_NULL_DEV}; -if test _"$(foo)"_ = _bar_ -then - supports_func=yes; -fi; - -# use "``" instead of "$()" for using the case ")" construct -# do not use "" quotes because of ksh -_SHELL=` - # $x means list. - # $s means shell. - # The command line arguments are taken over. - # Shifting herein does not have an effect outside. - export x; - case " $*" in - *\ --sh*) # abbreviation for --shell - x=''; - s=''; - # determine all --shell arguments, store them in $x in reverse order - while test $# != 0 - do - case "$1" in - --shell|--sh|--she|--shel) - if test "$#" -ge 2 - then - s="$2"; - shift; - fi; - ;; - --shell=*|--sh=*|--she=*|--shel=*) - # delete up to first "=" character - s="$(echo x"$1" | sed 's/^x[^=]*=//')"; - ;; - *) - shift; - continue; - esac; - if test _"${x}"_ = __ - then - x="'${s}'"; - else - x="'${s}' ${x}"; - fi; - shift; - done; - - # from all possible shells in $x determine the first being a shell - # or being empty - s="$( - # "" quotes because of posh - eval set x "${x}"; - shift; - if test $# != 0 - then - for i - do - if test _"$i"_ = __ - then - if test _"${supports_func}"_ = _yes_ - then - # use the empty argument as the default shell - echo 'standard shell'; - break; - else - echo groffer: standard shell does not support functions. >&2; - continue; - fi; - else - # test $i on being a shell program; - # use this kind of quoting for posh - if test _"$(eval "$i -c 'echo ok'" 2>${_NULL_DEV})"_ = _ok_ >&2 - then - # test whether shell supports functions - if eval "$i -c 'foo () { exit 0; }; foo'" 2>${_NULL_DEV} - then - # shell with function support found - cat <&2 - continue; - fi; - else - # if not being a shell go on searching - echo groffer: argument $i is not a shell. >&2 - continue; - fi; - fi; - done; - fi; - )"; - if test _"${s}"_ != __ - then - cat <${_NULL_DEV} - then - _SHELL="$s"; - break; - fi; - done; -fi; - - -########################### start groffer2.sh - -if test _"${_SHELL}"_ = _'standard shell'_ -then - _SHELL=''; -fi; - -if test _"${_SHELL}"_ = __ -then - # no shell found, so start groffer2.sh normally - if test _${supports_func}_ = _yes_ - then - eval . "'${_GROFFER2_SH}'" '"$@"'; - exit; - else - echo groffer: standard shell does not support functions; no shell works.\ -Get some free working shell such as bash. >&2 - exit "${_ERROR}"; - fi; -else - # start groffer2.sh with the found $_SHELL - # do not quote $_SHELL to allow arguments - eval exec "${_SHELL} '${_GROFFER2_SH}'" '"$@"'; - exit; -fi; diff -ruN groff-1.22.2/contrib/groffer/shell/README_SH groff-1.22.3/contrib/groffer/shell/README_SH --- groff-1.22.2/contrib/groffer/shell/README_SH 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/shell/README_SH 1970-01-01 01:00:00.000000000 +0100 @@ -1,297 +0,0 @@ -README_SH - -Special description for the shell version of `groffer' - - -The files related to the shell version are - -shell/groffer.sh starting script of groffer -shell/groffer2.sh main script of groffer -shell/groffer.man manual page of groffer -shell/README_SH description of the shell version of the program -shell/ChangeLog.0 information on all changements of groffer versions 0.* -version.sh script that handles the version information - - -Scripts - -The shell version of `groffer' contains two files, `groffer.sh' and -`groffer2.sh'. - -`groffer.sh' is a short introductory script without any functions. I -can be run with a very poor Bourne shell. It just contains some basic -variables, the reading of the configuration files, and the -determination of the shell for `groffer2.sh'. This script is -transformed by `make' into `groffer' which will be installed into -@bindir@, which is usually /usr/local/bin. - -`groffer2.sh' is a long main script with all functions; it is called -by `groffer.sh' (`groffer' after installation). It is installed -unchanged into @libdir@/groff/groffer, which is usually -/usr/local/lib/groff/groffer. This script can be called with a -different shell, using the `groffer' option `--shell'. - - -Options - -The `groffer' script provides its own option parser. It is compatible -to the usual GNU style command line This includes long option names -with two signs such as `--option', clusters of short options, the -mixing of options and non-option file names, the option `--' to close -the option handling, and it is possible to abbreviate the long option -names. The abbreviation of long options is enhanced by letting each -internal `-' sign generate a new center of abbreviation. So each -command line argument starting with `--' can represent a multiple set -of abbreviations. - -The flexible mixing of options and file names in GNU style is always -possible, even if the environment variable `$POSIXLY_CORRECT' is set -to a non-empty value. This disables the rather wicked POSIX behavior -to terminate option parsing when the first non-option command line -argument is found. - - -Error Handling - -Error handling and exit behavior is complicated by the fact that -`exit' can only escape from the current shell; trouble occurs in -subshells. This was solved by adding a temporary error file that is -tested by function exit_test() and by replacing `var=$(...)' by -function obj_from_output(). - - -Function Definitions in `groffer2.sh' - -Each function in groffer2.sh has a description that starts with the -function name and symbols for its arguments in parentheses `()'. Each -`<>' construction gives an argument name that just gives a hint on -what the argument is meant to be; these argument names are otherwise -irrelevant. The `>' sign can be followed by another character that -shows how many of these arguments are possible. - - exactly 1 of this argument -? 0 or 1 of these arguments -* arbitrarily many such arguments, incl. none -+ one or more such arguments -... one or more such arguments -[...] optional arguments - -A function that starts with an underscore `_' is an internal function -for some other function. The internal functions are defined just -after their corresponding function. - - -External Environment Variables - -The groffer.sh script uses the following external system variables. -It is supposed that these variables are already exported outside of -groffer.sh; otherwise they do not have a value within the script. - -external system environment variables that are explicitly used -$DISPLAY: Presets the X display. -$LANG: For language specific man pages. -$LC_ALL: For language specific man pages. -$LC_MESSAGES: For language specific man pages. -$PAGER: Paging program for tty mode. -$PATH: Path for the programs called (`:' separated list). - -groffer native environment variables -$GROFFER_OPT preset options for groffer. - -all groff environment variables are used, see groff(1) -$GROFF_BIN_PATH: Path for all groff programs. -$GROFF_COMMAND_PREFIX: '' (normally) or 'g' (several troffs). -$GROFF_FONT_PATH: Path to non-default groff fonts. -$GROFF_TMAC_PATH: Path to non-default groff macro files. -$GROFF_TMPDIR: Directory for groff temporary files. -$GROFF_TYPESETTER: Preset default device. - -all GNU man environment variables are used, see man(1). -$MANOPT: Preset options for man pages. -$MANPATH: Search path for man pages (: list). -$MANROFFSEQ: Ignored because of grog guessing. -$MANSECT: Search man pages only in sections (:). -$SYSTEM: Man pages for different OS's (, list). - - -Object-oriented Functions - -The groffer script provides an object-oriented construction (OOP). In -object-oriented terminology, a type of object is called a `class'; a -function that handles objects from a class is named `method'. - -In the groffer script, the object is a variable name whose content is -the object's data. Methods are functions that have an object as first -argument. - -The basic functions for object handling are obj_*(). - -The class `list' represents an array structure, see list_*(). - - -Speed - -The major speed gain is the disabling of all debug features. This is -the default for the installed version of `groffer'. Before the run of -`make', the debug feature of $_DEBUG_FUNC_CHECK, corresponding to -option --debug-func, is enabled by default. The resulting heavy -slowing down should be regarded as a temporary feature. - -Another increase of speed was the replacement of the many `ls' calls -by analysing a `find' of manpath with `grep'. - - -Shell Compatibility - -The `groffer' shell scripts are compatible to both the GNU and the -POSIX shell and utilities. Care was taken to restrict the programming -technics used here in order to achieve POSIX compatibility as far back -as POSIX P1003.2 Draft 11.2 of September 1991. This draft is -available at http://www.funet.fi/pub/doc/posix/p1003.2/d11.2 on the -Internet. - -The POSIX draft does not include `local' variables for functions. So -this concept was replaced by global variables with a prefix that -differs for each function. The prefix is chosen from the function -name. These quasi-local variables are unset before each return of the -function. - -For shell compatibility, see also Autobook, chapter 22. - -The `groffer' scripts were tested under the shells `ash', `bash', -`bash-minimal', `dash', 'ksh', `mksh', `pdksh', 'posh', and `zsh' -without problems in Linux Debian. A shell can be tested by the -`groffer' option `--shell', but that will run only with groffer2.sh. -To start it directly from the beginning under this shell the following -command can be used. - - groffer.sh --shell= ... - - -Some shells are not fully POSIX compatible. For them the following -restrictions were done. For more information look at the -documentation `Portable shells' in the `info' page of `autoconf' -(look-up in Emacs-Help-Manuals_Info). - -- The command parts `then', `else', and `do' must be written each on a - line of their own. - -- Replace `for i in "$@"' by `for i' and remove internal `;' (kah). - -- Replace `set -- ...' by `set x ...; shift'. After the first - non-option argument, all arguments including those starting with `-' - are accepted as non-option. For variables or `$()' constructs with - line-breaks, use `eval set' without quotes. That transforms a - line-break within a variable to a space. - -- The name of the variable in `for' is chosen as a single character - (old ash). The content of such variables is not safe because it can - also occur in other functions. So it is often stored in an - additional quasi-local variable. - -- `echo' is not portable on options; some `echo' commands have many - options, others have none. So `echo -n' cannot be used, such that - the output of each function has complete lines. There are two - methods to avoid having `-' as the first character of any argument. - Either a character such as `x' can be prepended to the argument; - this must later on be removed by `sed'. Otherwise, `echo' can be - replaced by `cat < - -This file is part of `groffer', which is part of `groff'. - -`groff' is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 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: diff -ruN groff-1.22.2/contrib/groffer/shell/roff2.sh groff-1.22.3/contrib/groffer/shell/roff2.sh --- groff-1.22.2/contrib/groffer/shell/roff2.sh 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/groffer/shell/roff2.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,339 +0,0 @@ -#! /bin/sh - -# roff2* - transform roff files into other formats - -# Source file position: /contrib/groffer/shell/roff2.sh -# Installed position: /bin/roff2* - -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. -# Written by Bernd Warken . - -# Last update: 5 Jan 2009 - -# This file is part of `groffer', which is part of `groff'. - -# `groff' is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 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 . - -######################################################################## - - -############## -# echo1 (*) -# -# Output to stdout with final line break. -# -# Arguments : arbitrary text including `-'. -# -echo1() -{ - cat <*) -# -# Output to stderr with final line break. -# -# Arguments : arbitrary text including `-'. -# -echo2() -{ - cat >&2 <"$stdin"; - fi; # if has_stdin - - case "$mode" in - x) - groff_options='-TX75-12 -Z'; - ;; - text) - groff_options='-Tlatin1'; - ;; - pdf) - ps2pdf="$(where_is_prog ps2pdf)"; - if test _"$ps2pdf" = _ - then - ps2pdf="$(where_is_prog gs)"; - if test _"$ps2pdf" = _ - then - echo2 "$name: cannot transform to pdf format."; - exit 1; - fi; - ps2pdf="$ps2pdf -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite '-sOutputFile=- -c save pop -f -"; - else - ps2pdf="$ps2pdf -"; - fi; - grog="$(grog -Tps "$@")"; - eval $grog | ${ps2pdf}; - exit $?; - ;; - *) - groff_options="-T$mode"; - ;; - esac; - grog="$(grog $groff_options "$@")"; - eval $grog; - exit $?; -fi; # not has_groffer diff -ruN groff-1.22.2/contrib/groffer/split_env.sh groff-1.22.3/contrib/groffer/split_env.sh --- groff-1.22.2/contrib/groffer/split_env.sh 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/split_env.sh 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,47 @@ +#! /bin/sh + +# groffer - display groff files + +# Source file position: /contrib/groffer/split_env.sh +# Installed position: /lib/groff/groffer/split_env.sh + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 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 file is called from groffer.pl. The environment variable +# of the name in $1 will be split at output. The corresponding variable +# must be exported before the call of groffer.pl. + +if test $# = 0 +then + echo 'split_env.sh was called without an argument.' >&2; +else + eval v='"$'"$1"'"'; + if test _"$v"_ != __ + then + eval set x $v; + shift; + for i in "$@"; + do + echo $i; + done; + fi; +fi; diff -ruN groff-1.22.2/contrib/groffer/subs.pl groff-1.22.3/contrib/groffer/subs.pl --- groff-1.22.2/contrib/groffer/subs.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groffer/subs.pl 2014-11-04 09:38:35.478520834 +0100 @@ -0,0 +1,792 @@ +#! /usr/bin/env perl + +# groffer - display groff files + +# Source file position: /contrib/groffer/subs.pl +# Installed position: /lib/groff/groffer/subs.pl + +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Written by Bernd Warken . + +# This file is part of `groffer', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + +######################################################################## + +use strict; +use warnings; + +######################################################################## +# some functions +######################################################################## + +########## +# cat_z() +# +# Decompress or cat the . +# +# Return: the decompressed file as array +# +sub cat_z { + my $n = @_; + die "cat_z(): one argument is needed; you used $n;" + unless $n == 1; + + my $file = $_[0]; + die "cat_z(): `$file' is not a readable file;" unless -f $file && -r $file; + return () if -z $file; + + my @res; + if ($main::Has_Compression) { + if ($main::Has_bzip) { + # test whether bz2 compressed, shell return must be inverted + unless ( system("bzip2 -t $file 2>$main::Dev_Null") ) { + @res = `bzip2 -c -d $file 2>$main::Dev_Null`; + return @res; + } + # if not compressed with gz, gzip will act like `cat' + @res = `gzip -c -d -f $file 2>$main::Dev_Null`; + return @res; + } + } else { + my $fh; + open $fh, "<$file" or die "cat_z(): could not open $file"; + @res = <$fh>; + close $fh; + return @res; + } + (); +} # cat_z() + + +########## +# clean_up() +# +# Remove the temporary directory and restore the system. +# +sub clean_up { + umask $main::Umask; + chdir $main::Start_Dir; + if ($main::Debug{'KEEP'} && -d $main::tmpdir) { + my $glob = File::Spec->catfile($main::tmpdir, '*'); + unlink glob($glob); # rm $tmpdir/* + rmdir $main::tmpdir; + } +} # clean_up() + + +########## +# get_dirname() +# +# Split the path and return the directory name part +# +# Return: string of directory name +# +sub get_dirname { + my $n = @_; + die "get_filename(): one argument is needed; you used $n;" unless $n == 1; + return '' unless $_[0]; + + my ($dirname, $filename) = &split_path($_[0]); + $dirname; +} # get_dirname() + + +########## +# get_filename() +# +# Split the path and return the file name part +# +# Return: string of file name +# +sub get_filename { + my $n = @_; + die "get_dirname(): one argument is needed; you used $n;" unless $n == 1; + return '' unless $_[0]; + + my ($dirname, $filename) = &split_path($_[0]); + $filename; +} # get_filename() + + +########## +# is_X() +# +# Test whether X Windows is running. +# +sub is_X { + return 1 if $ENV{'DISPLAY'}; + return 0; +} # is_X() + + +########## +# list_has(, ) +# +# Determine if has as element. +# +sub list_has { + my $n = @_; + die "list_has(): 2 arguments are needed; you used $n;" + unless $n == 2; + + my $list_ref = $_[0]; + my $string = $_[1]; + die "list_has(): first argument must be an array reference;" + unless ref($list_ref) eq 'ARRAY'; + + foreach ( @$list_ref ) { + return 1 if $_ eq $string; + } + 0; +} + + +########## +# path_uniq(...) +# +# make path having unique existing directories +# +sub path_uniq { + my @a; + my %h; + foreach (@_) { + next if exists $h{$_}; + next unless -d $_; + push @a, $_; + $h{$_} = 1; + } + @a; +} # path_uniq() + + +########## +# print_hash() +# +# print the elements of a hash or hash reference +# +sub print_hash { + my $hr; + my $n = scalar @_; + if ($n == 0) { + print "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 "empty hash\n"; + return 1; + } + print "hash (ignore the ^ characters):\n"; + for my $k (sort keys %$hr) { + my $hk = $hr->{$k}; + print " $k => "; + if (defined $hk) { + print "^$hk^"; + } else { + print "undef"; + } + print "\n"; + } + + 1; +} # print_hash() + + +########## +# print_times() +# +# print the time, result: user, system, child process user, child system +# +sub print_times { + my @t = times; + my $s = ''; + $s = $_[0] if $_[0]; +# print STDERR "$s: @t\n"; +} # print_times() + +BEGIN { &print_times("start"); } +END { &print_times("end"); } + + +########## +# split_path() +# +# Split the path into directory and file name parts +# +# Return: array with 2 elements consisting of directory and file name +# +sub split_path { + my $n = @_; + die "split_path(): one argument is needed; you used $n;" unless $n == 1; + my $arg = $_[0]; + return () unless $arg; + + my $basename = basename($arg); + if ( $basename ne $arg ) { # path with dir + # fileparse() is from File::Basename + my($filename, $dirname, $suffix) = fileparse($arg); + return ($dirname, $basename); + } + return ('', $arg); +} + + +{ + my $nr_file = 0; + my $nr_so = 0; + + my $tmp_file_base; + my $tmp_so_base; + + my $soelim_r = ''; + $soelim_r = '-r' + if ! system("echo -n '' | soelim -r 2>$main::Dev_Null >$main::Dev_Null"); + + ########## + # to_tmp () + # + # Print file (decompressed) to the temporary cat file with handling .SO + # for man pages. + # + sub to_tmp { + my $n = @_; + die "to_tmp(): one argument is needed; you used $n;" + unless $n == 1; + + my $arg = $_[0]; + return 1 unless $arg; + die "to_tmp(): $arg is not an existing file;" unless -f $arg; + die "to_tmp(): could not read file $arg;" unless -r $arg; + return 1 if -z $arg; + + $tmp_file_base = File::Spec->catfile($main::tmpdir, ',file') + unless $tmp_file_base; + $tmp_so_base = File::Spec->catfile($main::tmpdir, ',so') + unless $tmp_so_base; + + open $main::fh_cat, ">>$main::tmp_cat" or + die "to_tmp(): could not open temporary cat file"; + + if ($main::Opt{'WHATIS'}) { + &whatis_filename($arg); + return 1; + } + + ### to_tmp() + my $dir = &get_dirname($arg); + + my ($fh_file, $tmp_file, $fh_tmp, $tmp_tmp); + ++$nr_file; + $tmp_file = $tmp_file_base . $nr_file; + $tmp_tmp = File::Spec->catfile($main::tmpdir, ',tmp'); + + print STDERR "file: $arg\n" if $main::Debug{'FILENAMES'}; + + if ($main::Filespec_Is_Man) { + my ($fh_so, $tmp_so); + + open $fh_file, ">$tmp_file" or + die "to_tmp(): could not open $tmp_file;"; + foreach ( &cat_z($arg) ) { + print $fh_file "$_"; + } + close $fh_file; + + open $fh_file, "<$tmp_file" or + die "to_tmp(): could not open $tmp_file;"; + my @list; + foreach (<$fh_file>) { + if (/^[\.']\s*so\s/) { + chomp; + s/^[\.']\s*so\s*//; + push @list, $_; + } + } + close $fh_file; + + if ( @list && $main::Debug{'KEEP'} ) { + my $f = $tmp_file . '+man'; + copy($tmp_file, $f); + } + + ### to_tmp() + DO_MAN_SO: foreach (@list) { + # start of _do_man_so() in shell version + my $so = $_; + my $soname = $so; + $soname =~ s/\\\s/ /g; + + my $sofound; + my $path = File::Spec->rootdir(); + if ($soname =~ m#^$path#) { # absolute path name + next DO_MAN_SO if -f $soname; + foreach ('.gz', '.Z', '.bz2') { + my $name = $soname . $_; + if (-f $name) { + $sofound = $name; + last; + } + } # foreach + next DO_MAN_SO unless $sofound; + } else { # relative to man path + LOOP: foreach my $ext ('', '.gz', '.Z', '.bz2') { + foreach my $p ( @{$main::Man{'PATH'}} ) { + my $f = File::Spec->catfile($p, "$soname$ext"); + if (-f $f) { + $sofound = $f if -f $f; + last LOOP; + } + } # foreach + } # LOOP: + next DO_MAN_SO unless $sofound; + } # if on path + + print STDERR "file from .so: $so\n" if $main::Debug{'FILENAMES'}; + + ### to_tmp() + ++$nr_so; + $tmp_so = $tmp_so_base . $nr_so; + unlink $tmp_so if -e $tmp_so; + open $fh_so, ">$tmp_so" or + die "to_tmp(): could not open $tmp_so;"; + foreach ( &cat_z($sofound) ) { + print $fh_so $_; + } + close $fh_so; + + my $esc = $so; + $esc =~ s/\\/\\\\/g; + open $fh_file, "<$tmp_file" or + die "to_tmp(): could not open $tmp_file;"; + open $fh_tmp, ">$tmp_tmp" or + die "to_tmp(): could not open $tmp_tmp;"; + foreach (<$fh_file>) { + s#^([\.'])\s*so\s+($so|$esc|$soname)\s*\n$#${1}so $tmp_so\n#s; + print $fh_tmp $_; + } + ### to_tmp() + close $fh_tmp; + close $fh_file; + unlink $tmp_file if -e $tmp_file; + rename $tmp_tmp, $tmp_file; + # end of _do_man_so() in shell version + } # foreach (@list) + + if ( @list && $main::Debug{'KEEP'} ) { + my $f = $tmp_file . '+tmp'; + copy($tmp_file, $f); + } + + unlink $tmp_tmp if -e $tmp_tmp; + rename $tmp_file, $tmp_tmp; + system("soelim -I$dir $soelim_r $tmp_tmp >$tmp_file"); + unlink $tmp_tmp if -e $tmp_tmp; + + } else { # $Filespec_Is_Man is empty + open $fh_tmp, ">$tmp_tmp" or + die "to_tmp(): could not open $tmp_tmp;"; + foreach (cat_z $arg) { + print $fh_tmp $_; + } + close $fh_tmp; + if ($dir) { + system("soelim -I$dir $soelim_r $tmp_tmp >$tmp_file"); + } else { + system("soelim $soelim_r $tmp_tmp >$tmp_file"); + } + unlink $tmp_tmp; + } # if ($Filespec_Is_Man) + + ### to_tmp() + my $grog = `grog $tmp_file`; + die "to_tmp(): grog error on $tmp_file;" if $?; + chomp $grog; + print STDERR "grog output: $grog\n" if $main::Debug{'GROG'}; + if ($grog =~ /^.*\s-m.*$/) { + $grog =~ s/\s+/ /g; + $grog =~ s/ -m / -m/g; + $grog =~ s/ -mm([^ ]) / -m$1/g; + foreach my $g (split / /, $grog) { + if ($g =~ /^-m/) { + my $ref = \@main::Macro_Packages; + if ( &list_has($ref, $g) ) { + if (! $main::Macro_Pkg) { + $main::Macro_Pkg = $g; + } elsif ($main::Macro_Pkg eq $g) { + 1; + } elsif ($main::Macro_Pkg =~ /^-m/) { + warn "to_tmp(): Ignore $arg because it needs $g " . + "instead of $main::Macro_Pkg"; + unlink $tmp_file unless $main::Debug{'KEEP'}; + return 0; + } elsif ($main::Macro_Pkg ne $g) { + die "to_tmp(): \$Macro_Pkg does not start with -m: " . + "$main::Macro_Pkg"; + } # if (! $main::Macro_Pkg) + } # if (&list_has + } # if (/^-m/) + } # foreach my $g + } # if $grog + + open $fh_file, "<$tmp_file" or + die "to_tmp(): could not open $tmp_file for reading;"; + open $main::fh_cat, ">>$main::tmp_cat" or + die "to_tmp(): could not open $main::tmp_cat for appending;"; + foreach (<$fh_file>) { + print $main::fh_cat $_; + } + close $main::fh_cat; + close $fh_file; + + unless ( $main::Debug{'KEEP'} ) { + unlink $tmp_file; + foreach ( glob("$tmp_so_base*") ) { + unlink $_; + } + } + 1; + } # to_tmp() +} + +########## +# to_tmp_line (...) +# +# Print array of lines with to the temporary cat file. \n is added +# if a line does not end with \n. +# +sub to_tmp_line { + my $n = @_; + return 1 if $n == 0; + open $main::fh_cat, ">>$main::tmp_cat" or + die "to_tmp_line(): could not open temporary cat file"; + foreach (@_) { + my $line = $_; + chomp($line); + print $main::fh_cat "$line\n"; + } + close $main::fh_cat; + 1; +} # to_tmp_line() + + +########## +# usage() +# +# Print usage information for --help. +# +sub usage { + print "\n"; + &version(); + print <) { + chomp; + if (/^\s*_PROGRAM_VERSION\s*=\s*['"]*([^'"]*)['"]*\s*;?\s*$/) { + $program_version = $1; + next; + } + if (/^\s*_GROFF_VERSION_PRESET\s*=\s*['"]*([^'"]*)['"]*\s*;?\s*$/) { + # this setting of the groff version is only used before make is run, + # otherwise @VERSION@ will set it, see groffer.sh. + $groff_version_preset = $1; + next; + } + } + close $fh; + + if ($main::Groff_Version) { + $groff_version = $main::Groff_Version; + } else { + $groff_version = $groff_version_preset; + } + print <) +# +# Test whether without its arguments exists or is a program +# in $PATH. +# +# Arguments : 1, can have spaces and arguments. +# Return : a hash with `dir', `file', `fullname', `args' if +# argument exists or is a program in $PATH, empty hash else. +# +sub where_is_prog { + scalar @_ eq 1 or die "where_is_prog(): only one argument is allowed"; + my $p1 = $_[0]; + return () unless $p1; + + $p1 =~ s/\s+/ /g; + $p1 =~ s/(\\)+ / /g; + $p1 =~ s/^ | $//g; + return () unless $p1; + + my $noarg = $p1; + $noarg =~ s/ -.*$//; + return () unless $noarg; + + my $args; + if ($p1 =~ /^.* -.*$/) { + $args = $p1; + $args =~ s#^$noarg ##; + } + $args = '' unless defined $args; + + my %result; + + # test whether $noarg has directory, so it is not tested with $PATH + my ($dir, $name) = &split_path($noarg); + $result{'dir'} = $dir; + +### where_is_prog() + if (-f $noarg && -x $noarg) { + $result{'args'} = $args; + $result{'file'} = $name; + $result{'fullname'} = File::Spec->catfile($dir, $name); + return %result; + } + + if ($dir) { # $noarg has name with directory + # now $wip_noarg (with directory) is not an executable file + + # test name with space + if ($name =~ / /) { + my @base = split(/ /, $name); + my $n = pop @base; + my @baseargs = ($n); + while (@base) { + my $base = join(' ', @base); + my $file = File::Spec->catpath($dir, $base); + if (-f $file && -x $file) { + my $baseargs = join(' ', @baseargs); + ### where_is_prog() + if ($args) { + $args = "$baseargs $args"; + } else { + $args = $baseargs; + } + $result{'args'} = $args; + $result{'file'} = $base; + $result{'fullname'} = $file; + return %result; + } # file test $file + $n = pop @base; + unshift(@baseargs, $n); + } # while (@base) + } # end of test name with space + return (); + } # test on $dir + + # now $noarg doesn't have a directory part + + $name = $noarg; + + # check with $PATH + + # test path with $win_noarg as a whole, evt. with spaces + foreach my $d (@main::Path) { + my $file = File::Spec->catfile($d, $name); + if (-f $file && -x $file) { + $result{'args'} = $args; + $result{'fullname'} = $file; + ($result{'dir'}, $result{'file'}) = &split_path($file); + return %result; + } # file test $file + } # foreach (@main::Path) + +### where_is_prog() + if ($name =~ / /) { + my @base = split(/ /, $name); + my $n = pop @base; + my @baseargs = ($n); + while (@base) { + my $base = join(' ', @base); + foreach my $d (@maon::Path) { + my $file = File::Spec->catfile($d, $base); + if (-f $file && -x $file) { + my $baseargs = join(' ', @baseargs); + if ($args) { + $args = "$baseargs $args"; + } else { + $args = $baseargs; + } + $result{'args'} = $args; + $result{'fullname'} = $file; + ($result{'dir'}, $result{'file'}) = &split_path($file); + return %result; + } # file test $file + } # foreach (@main::Path) + $n = pop @base; + unshift(@baseargs, $n); + } # while (@base) + } # test $name on space + return (); +} # where_is_prog() + + +########## +# wait() +# +# stop for checking temp files, etc. +# +sub wait { + print "push Ctrl-D"; + my @x = ; + print "\n"; +} # wait() + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/groffer/version.sh groff-1.22.3/contrib/groffer/version.sh --- groff-1.22.2/contrib/groffer/version.sh 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/groffer/version.sh 2014-11-04 09:38:35.478520834 +0100 @@ -5,15 +5,14 @@ # Source file position: /contrib/groffer/version.sh # Installed position: /lib/groff/groffer/version.sh -# Copyright (C) 2001-2006, 2009, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Written by Bernd Warken . # This file is part of `groffer', which is part of `groff'. # `groff' is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # `groff' is distributed in the hope that it will be useful, but @@ -27,12 +26,9 @@ ######################################################################## export _PROGRAM_VERSION; -export _LAST_UPDATE; - -_PROGRAM_VERSION='1.1.2'; -_LAST_UPDATE='26 Jan 2011'; +_PROGRAM_VERSION='2.2.5'; # this setting of the groff version is only used before make is run, # otherwise @VERSION@ will set it, see groffer.sh. export _GROFF_VERSION_PRESET; -_GROFF_VERSION_PRESET='1.21'; +_GROFF_VERSION_PRESET='1.22.3'; diff -ruN groff-1.22.2/contrib/groff_filenames/ChangeLog groff-1.22.3/contrib/groff_filenames/ChangeLog --- groff-1.22.2/contrib/groff_filenames/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groff_filenames/ChangeLog 2014-11-04 09:38:35.471520922 +0100 @@ -0,0 +1,84 @@ +2014-09-03 Bernd Warken + + * groff_filenames.man, Makefile.sub: Repair copying and Emacs + setup. + +2014-08-31 Bernd Warken + + * groff_filenames.man: Replace Heirloom links to more actual + places. Create macro definitions for authors and copying. + +2014-08-30 Bernd Warken + + * groff_filenames.man: Add extension `.1b' for `heirloom' + man-pages. + +2014-07-06 Bernd Warken + + * groff_filenames.man: Make it compatible to doclifter. + +2014-07-04 Bernd Warken + + * groff_filenames.man: Transform to classical man-page style. + +2014-01-06 Bernd Warken + + * Makefile.sub: fix this file + +2014-01-05 Bernd Warken + + * runoff.man: remove this file + + * groff/contrib/RUNOFF: rename this directory to + `groff/contrib/groff_filenames' + + * Makefile.sub: change this file correspondingly + +2013-07-31 Bernd Warken + + Fix RUNOFF + +2013-06-17 Bernd Warken + + Remove files *~ + +2013-06-17 Bernd Warken + + * groff_filenames.man: Corrections. + +2013-06-17 Bernd Warken + + * groff_filenames.man: Extension. + +2013-05-14 Bernd Warken + + * runoff.man: Major rewrite, due to good documentation of 1974, + especially for text lines. + +2013-05-05 Bernd Warken + + New `groff' project: `RUNOFF', which is the predecessor of `roff'. + + * ChangeLog: New file for the `contrib' source. + + * Makefile.sub: New `make' file, so far only for 2 man-files. + + * runoff.man: New file which documents the `RUNOFF' language from + the 1960s up to the 1980s. + + * groff_filenames.man: New file about the file name extensions + since `RUNOFF'. + +######################################################################## + +Copyright 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. + +Local Variables: +version-control: never +coding: utf-8 +End: diff -ruN groff-1.22.2/contrib/groff_filenames/groff_filenames.man groff-1.22.3/contrib/groff_filenames/groff_filenames.man --- groff-1.22.2/contrib/groff_filenames/groff_filenames.man 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groff_filenames/groff_filenames.man 2014-11-04 09:38:35.471520922 +0100 @@ -0,0 +1,665 @@ +.TH GROFF_FILENAMES @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_filenames \(em filename extensions for roff and groff +. +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" ad l +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2013-2014 Free Software Foundation, Inc. + +This file is part of groff, a free software project. You can +redistribute it and/or modify it under the terms of the GNU General +Public License version 2 (GPL2) as published by the Free Software +Foundation (FSF). + +The license text can be found in the internet at +.UR http://www.gnu.org/licenses +.UE . +.. +. +.de au +This file was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . +.. +. +.\" -------------------------------------------------------------------- +.SH DESCRIPTION +.\" -------------------------------------------------------------------- +. +Since the evolution of +.I roff +in the 1970s, a whole bunch of filename extensions for +.I roff +files were used. +. +. +.P +The +.I roff +extensions refer to preprocessors or macro packages. +. +These extensions are fixed in all +.IR Unix \-like +operating systems. +. +. +.P +Later on, +.B groff +added some more extensions. +. +We will now write a +.I man\-page about these filename extensions. +. +. +.\" -------------------------------------------------------------------- +.SH COMPRESSION OF ROFF FILES +.\" -------------------------------------------------------------------- +. +Each +.I roff +file can be optionally +.IR compressed . +. +That means that the +.I total filename +ends with a +.IR "compressor name" . +. +So the whole filename has the structure +.IR \f[CB].\fP [ \f[CB].\fP ] . +. +. +.P +Mostly known are the +.I compressor extensions +.BR .Z , +.BR .gz , +and +.BR .bzip2 . +. +Relatively new is +.BR .xz . +. +. +.P +From now on, we will ignore the +.I compressions +and only comment the structure +.IB . \fR.\fP +. +. +.\" -------------------------------------------------------------------- +.SH MAN\-PAGES +.\" -------------------------------------------------------------------- +. +The +.I Unix manual pages +are shortly named +.IR "man\-pages" . +. +The +.I man\-page +style is the best known part of the +.I roff +language. +. +. +.P +The extensions for +.I man +should be better documented. +. +So this is documented here. +. +. +.P +Files written in the +.I man +language use the following extension: +.BI *.
[] \fR.\fP +. +. +.\" -------------------------------------------------------------------- +.SS Man-page Sections +.\" -------------------------------------------------------------------- +. +The traditional +.I man\-page
+is a digit from +.B 1 +to +.BR 8 . +. +. +.TP +.IB .1 +.TQ +.IB .2 +.TQ +.IB .3 +.TQ +.IB .4 +.TQ +.IB .5 +.TQ +.IB .6 +.TQ +.IB .7 +.TQ +.IB .8 +Classic man\-page +.IR sections . +. +. +.P +Linux added the section number +.B 9 +for kernel man\-pages. +. +. +.TP +.IB .9 +.I Linux +kernel man-pages +. +. +.P +In older commercial +.I Unix +systems, the 3 characters +.BR l , +.BR n , +and +.B o +were also used as +.I section +names. +. +This is today +.IR deprecated , +but there are still documents in this format. +. +. +.TP +.IB .l +.TQ +.IB .n +.TQ +.IB .o +.I Deprecated +old +.IR "man\-page sections" . +. +. +.\" -------------------------------------------------------------------- +.SS Man\-page Group Extensions +.\" -------------------------------------------------------------------- +. +The +.I +extension in +.BI .
[] +is optional, but it can be any string of word characters. +. +Usually programmers use a group name that is already used, e.g. +.B x +for +.I "X Window System" +documents or +.B tk +to refer to the +.I tk +programming language. +. +. +.P +Examples: +. +. +.TP +.B groff.1 +is the man-page for +.B groff +in +.I section +.B 1 +without a +.I group +. +. +.TP +.B xargs.1posix.gz +is the man\-page for the program +.B xargs +in +.I section +.B 1 +and +.I group +.BR posix ; +moreover it is +.I compressed +with +.B gz +.RB ( gzip ). +. +. +.TP +.B config.5ssl +.I "OpenSSL CONF" +library configuration files from +.I section +.B 5 +with +.I group +.BR ssl . +. +. +.TP +.B dpkg-reconfigure.8cdebconf +man\-page for the program +.B dpkg\-reconfigure +in +.I section +.B 8 +and +.I group +.BR cdebconf . +. +. +.\" -------------------------------------------------------------------- +.SS Source of Man\-pages +.\" -------------------------------------------------------------------- +. +There are 2 +.I roff +languages for writing man\-pages: +.B man +and +.BR mdoc . +. +. +.P +The names of these 2 styles are taken as +.I extensions +for the source code files of man\-pages in the +.I groff +package. +. +. +.TP +.IB .man +.I traditional +Unix\-like man\-page format within groff source files. +. +. +.TP +.IB .n +A temporary man-page file produced from a +.IB name .man +man\-page by a run of +.B make +within the +.B groff +source package. +. +. +.TP +.IB .mdoc +Man-page format in BSD. +. +. +.TP +.IB .1b +Man-page format in +.IR "heirloom roff ". +. +. +.TP +.IB .mandoc +Files using this extension recognize both man\-page formats in +.B groff +and other processors. +. +. +.\" -------------------------------------------------------------------- +.SH TRADITIONAL TROFF EXTENSIONS +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS Files Using Macro Packages +.\" -------------------------------------------------------------------- +. +The +.I "classical roff" +languages were interpreted by the traditional +.B "troff" +and +.B "nroff" +programs. +. +. +.P +There were several +.I roff +languages, each represented by a +.IR "macro-package" . +. +Each of these provided a suitable file name +.IR extension : +. +. +.TP +.IB .me +.I roff +file using the +.B me +.IR "macro package" . +. +. +.TP +.IB .mm +.I roff +file using the +.B mm +.I macro package +. +. +.TP +.IB .ms +.I roff +file using the +.B ms +.I macro package +. +. +.P +All of these classical +.I roff +languages and their extensions are still very active in +.BR groff . +. +. +.\" -------------------------------------------------------------------- +.SS Source Code for Macro Packages (TMAC Files) +.\" -------------------------------------------------------------------- +. +In traditional +.I roff +the source code for the macro packages was stored in +.I TMAC +files. +. +Their file names have the form: +. +. +.TP +.BI tmac. \fR,\fP +.I +is the name of the macro package without the leading +.B m +character, which is reintegrated by the option +.BR -m . +. +. +.P +For example, +.B tmac.an +is the source for the +.B man +macro package. +. +. +.P +In the +.B groff +source, more suitable file names were integrated, see later on. +. +. +.\" -------------------------------------------------------------------- +.SS Preprocessors +.\" -------------------------------------------------------------------- +. +Moreover, the following +.I preprocessors +were used as filename extension: +. +. +.TP +.IB .chem +for the integration of chemical formulas +. +. +.TP +.IB .eqn +for the mathematical use of equations +. +. +.TP +.IB .pic +graphical tool +. +. +.TP +.IB .tbl +for tables with +.I tbl +. +. +.TP +.IB .ref +for files using the +.B prefer +.I preprocessor +. +. +.\" -------------------------------------------------------------------- +.SS Classical Roff Files +.\" -------------------------------------------------------------------- +. +.TP +.IB .t +.TQ +.IB .tr +for files using the +.I roff +language of any kind +. +. +.\" -------------------------------------------------------------------- +.SH NEW GROFF EXTENSIONS +.\" -------------------------------------------------------------------- +. +.I "GNU roff" +.B groff +is the actual +.I roff +standard, both for classical +.I roff +and new extensions. +. +So even the used new extensions in the source code should be regarded +as actual standard. +. +The following extensions are used instead of classical +.B .t +or +.BR .tr : +. +. +.TP +.IB .groff +.TQ +.IB .roff +general ending for files using the +.I groff language +. +. +.\" -------------------------------------------------------------------- +.SS Source Code for Macro Packages (TMAC Files) +.\" -------------------------------------------------------------------- +. +As the classical form +.BI tmac. \fR,\fP +of the +.I TMAC +file names is quite strange, +. +.I groff +added the following structures: +. +. +.TP +.IB .tmac +.TQ +.BI m .tmac +.TQ +.BI groff_m .tmac +. +. +.\" -------------------------------------------------------------------- +.SS Files Using new Macro Packages +.\" -------------------------------------------------------------------- +. +.I Groff +uses the following new macro packages: +. +. +.TP +.IB .mmse +file with swedish +.B mm +.I macros +for +.B groff +. +. +.TP +.IB .mom +files written in the +.I "groff macro package" +.B mom +. +. +.TP +.IB .www +files written in +.BR HTML \-like +.I groff +.IR macros . +. +. +.\" -------------------------------------------------------------------- +.SS Preprocessors and Postprocessors +.\" -------------------------------------------------------------------- +. +.TP +.IB .hdtbl +a new +.I tbl +format. +. +See +.BR groff_hdtbl (@MAN7EXT@). +. +. +.TP +.IB .grap +files written for the graphical +.B grap +processor. +. +. +.TP +.IB .grn +for including +.BR gremlin (@MAN1EXT@), +pictures, see +.BR grn (@MAN1EXT@). +. +. +.TP +.IB .pdfroff +transform this file with +.B pdfroff +of the +.I groff +system +. +. +.\" -------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +. +.TP +History and future +.BR roff (@MAN7EXT@), +.BR man\-pages (@MAN7EXT@), +.BR groff_diff (@MAN7EXT@), +.BR groff (@MAN7EXT@) +. +. +.TP +.I Compression +.BR uncompress (1posix), +.BR gzip2 (@MAN1EXT@), +.BR bzip2 (@MAN1EXT@), +.BR xz (@MAN1EXT@) +. +. +.P +A man-page of the naming form +.IB name ( n ) +can be read in text mode by +.RS +.EX +.BI man " n name" +.EE +.RE +or in graphical mode (PDF) by +.RS +.EX +.BI groffer " n name" +.EE +.RE +. +. +.P +.UR https://\:github.com/\:n-t-roff/\:heirloom-doctools +.I Gunnar Ritter\[aq]s Heirloom roff project +.UE . +. +You can get this package with the shell command: +.RS +.EX +\[Do] git clone https://github.com/n-t-roff/heirloom-doctools +.EE +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/groff_filenames/Makefile.sub groff-1.22.3/contrib/groff_filenames/Makefile.sub --- groff-1.22.2/contrib/groff_filenames/Makefile.sub 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/contrib/groff_filenames/Makefile.sub 2014-11-04 09:38:35.471520922 +0100 @@ -0,0 +1,35 @@ +# Makefile.sub for `groff_filenames' (integration into the `groff' source tree) + +# File position: /contrib/groff_filenames/Makefile.sub + +# Copyright (C) 2013-2014 Free Software Foundation, Inc. +# +# Written by Bernd Warken . + +# This file is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 . + +######################################################################## + +MAN7=\ + groff_filenames.n + +MOSTLYCLEANADD=$(MAN7) + +######################################################################## +##### Emacs settings +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/hdtbl/ChangeLog groff-1.22.3/contrib/hdtbl/ChangeLog --- groff-1.22.2/contrib/hdtbl/ChangeLog 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/ChangeLog 2014-11-04 09:38:35.482520784 +0100 @@ -1,3 +1,12 @@ +2013-09-03 Bernd Warken + + * all files in groff_hdtbl: Copying and Emacs setup. + +2014-03-29 Steffen Nurpmeso + + * Makefile.sub: Handle examples separately, controlled by + $(make{_,_install_,_uninstall_}examples). + 2013-02-06 Werner LEMBERG * groff_hdtbl.man: Correct details on loading hdtbl.tmac. @@ -301,7 +310,7 @@ * Import of hdtbl 0.91 (with some further modifications). Still many rough edges. -Copyright 2006, 2008-2013 +Copyright 2006, 2008-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff -ruN groff-1.22.2/contrib/hdtbl/examples/chess_board.roff groff-1.22.3/contrib/hdtbl/examples/chess_board.roff --- groff-1.22.2/contrib/hdtbl/examples/chess_board.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/chess_board.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,10 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig - chess_board.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -20,7 +19,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - .. . .if !d sopath \ diff -ruN groff-1.22.2/contrib/hdtbl/examples/color_boxes.roff groff-1.22.3/contrib/hdtbl/examples/color_boxes.roff --- groff-1.22.2/contrib/hdtbl/examples/color_boxes.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/color_boxes.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,10 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig - color_boxes.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -20,7 +19,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - .. . .if !d sopath \ diff -ruN groff-1.22.2/contrib/hdtbl/examples/color_nested_tables.roff groff-1.22.3/contrib/hdtbl/examples/color_nested_tables.roff --- groff-1.22.2/contrib/hdtbl/examples/color_nested_tables.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/color_nested_tables.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig color_nested_tables.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009-2011 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/color_table_cells.roff groff-1.22.3/contrib/hdtbl/examples/color_table_cells.roff --- groff-1.22.2/contrib/hdtbl/examples/color_table_cells.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/color_table_cells.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig color_table_cells.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/color_transitions.roff groff-1.22.3/contrib/hdtbl/examples/color_transitions.roff --- groff-1.22.2/contrib/hdtbl/examples/color_transitions.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/color_transitions.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig color_transitions.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/col_rowspan_colors.roff groff-1.22.3/contrib/hdtbl/examples/col_rowspan_colors.roff --- groff-1.22.2/contrib/hdtbl/examples/col_rowspan_colors.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/col_rowspan_colors.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,10 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig - col_rowspan_colors.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -20,7 +19,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - .. . .if !d sopath \ diff -ruN groff-1.22.2/contrib/hdtbl/examples/common.roff groff-1.22.3/contrib/hdtbl/examples/common.roff --- groff-1.22.2/contrib/hdtbl/examples/common.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/common.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig common.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2010-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/fonts_n.in groff-1.22.3/contrib/hdtbl/examples/fonts_n.in --- groff-1.22.2/contrib/hdtbl/examples/fonts_n.in 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/fonts_n.in 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: groff -*- .ig font_n.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/fonts_x.in groff-1.22.3/contrib/hdtbl/examples/fonts_x.in --- groff-1.22.2/contrib/hdtbl/examples/fonts_x.in 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/fonts_x.in 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig font_x.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/mixed_pickles.roff groff-1.22.3/contrib/hdtbl/examples/mixed_pickles.roff --- groff-1.22.2/contrib/hdtbl/examples/mixed_pickles.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/mixed_pickles.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig mixed_pickles.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/rainbow.roff groff-1.22.3/contrib/hdtbl/examples/rainbow.roff --- groff-1.22.2/contrib/hdtbl/examples/rainbow.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/rainbow.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig rainbow.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/examples/short_reference.roff groff-1.22.3/contrib/hdtbl/examples/short_reference.roff --- groff-1.22.2/contrib/hdtbl/examples/short_reference.roff 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/examples/short_reference.roff 2014-11-04 09:38:35.593519396 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig short_reference.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/groff_hdtbl.man groff-1.22.3/contrib/hdtbl/groff_hdtbl.man --- groff-1.22.2/contrib/hdtbl/groff_hdtbl.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/groff_hdtbl.man 2014-11-04 09:38:35.483520772 +0100 @@ -1,8 +1,14 @@ -.ig -Copyright (C) 2005, 2006, 2008, 2009, 2010, 2013 - Free Software Foundation, Inc. - -Written by Joachim Walsdorff +.TH GROFF_HDTBL @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_hdtbl \- groff `hdtbl' macros for generation of tables +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2005-2014 Free Software Foundation, Inc. This file is part of groff, the groff. @@ -16,13 +22,12 @@ FDL in the main directory of the groff source package. .. . -. -. -.TH GROFF_HDTBL @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -groff_hdtbl \- groff `hdtbl' macros for generation of tables +.de au +This document was written by +.MT Joachim.Walsdorff@urz.uni-heidelberg.de +Joachim Walsdorff +.ME . +.. . . .ig @@ -166,9 +171,9 @@ . nop ). .. . -. -. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . The .B hdtbl @@ -186,7 +191,7 @@ .B hdtbl is that the tables are constructed without calling a preprocessor; this means that -.BR groff 's +.BR groff \[aq]s full macro capabilities are available. . On the other hand, table processing with @@ -200,13 +205,15 @@ will be easily converted to HTML; this is not implemented yet. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . In this and the next section, we present examples to help users understand the basic workflow of .BR hdtbl . . -First of all, you must load the +First of all, you must load the .I hdtbl.tmac file. . @@ -235,7 +242,7 @@ .nf .nh .RS -.CR -m hdtbl +.CR \-m hdtbl .fi .hy .RE @@ -252,6 +259,7 @@ .CR .ETB macros, respectively. . +. .PP In this man page, we approximate the result of each example in the .I tty @@ -259,6 +267,7 @@ .B hdtbl currently only supports the PS and PDF output devices. . +. .PP The simplest well-formed table consists of just single calls to the four base table macros in the right order. @@ -278,6 +287,7 @@ .hy .RE . +. .PP A .I tty @@ -286,14 +296,17 @@ .PP .nf .nh +.ft C .RS +------------------------------------------------------+ | contents-of-the-table-cell | +------------------------------------------------------+ .RE +.ft .hy .fi . +. .PP Equivalent to the above is the following notation. . @@ -306,20 +319,23 @@ .hy .RE . +. .PP -By default, the formatted table is inserted into the surrounding text at the -place of its definition. +By default, the formatted table is inserted into the surrounding text +at the place of its definition. . -If the vertical space isn't sufficient, it is placed at the top of the next -page. +If the vertical space isn\[aq]t sufficient, it is placed at the top of +the next page. . Tables can also be stored for later insertion. . +. .PP Using .CIR \[oq]row-number * column-number\[cq] -as the data for the table cells, a table with two rows and two columns can -be written as +as the data for the table cells, a table with two rows and two columns +can be written as +. . .PP .RS @@ -333,14 +349,17 @@ .hy .RE . +. .PP A .I tty representation is . +. .PP .nf .nh +.ft C .RS +--------------------------+---------------------------+ | 1*1 | 1*2 | @@ -348,9 +367,11 @@ | 2*1 | 2*2 | +--------------------------+---------------------------+ .RE +.ft .hy .fi . +. .PP Here we see a difference to HTML tables: The number of columns must be explicitly specified using the @@ -359,6 +380,7 @@ .CR \[oq]width\[cq] argument, see below). . +. .PP The contents of a table cell is arbitrary; for example, it can be another table, without restriction to the nesting depth. @@ -420,12 +442,14 @@ .CR .nop is purely cosmetic to get proper indentation). . +. .PP The first table looks like . .PP .nf .nh +.ft C .RS +------------------------------------------------------+ | 1*1 1*2 | @@ -435,6 +459,7 @@ | | +------------------------------------------------------+ .RE +.ft .hy .fi . @@ -444,6 +469,7 @@ .PP .nf .nh +.ft C .RS +------------------------------------------------------+ | 1*1 1*2 | @@ -451,6 +477,7 @@ | 2*1 | 2*2 | +---------------------------+--------------------------+ .RE +.ft .hy .fi . @@ -467,13 +494,16 @@ .hy .RE . +. .PP If a macro has one or more arguments (see below), and it is not starting a line, everything belonging to this macro including the macro itself must be enclosed in double quotes. . . +.\" -------------------------------------------------------------------- .SH MACROS AND ARGUMENTS +.\" -------------------------------------------------------------------- . The order of macro calls and other tokens follows the HTML model. . @@ -513,10 +543,12 @@ .CRI \[dq]key= "value1 \[lB]value2 \[lB]\[ell]\[rB]\[rB]" \[dq] .RE . +. .PP However, this is limited to the case where the macro is the first one in the line and not already enclosed in double quotes. . +. .PP Argument values specified below as\~\c .CI c @@ -540,8 +572,8 @@ .B groff scaling indicators. . -Some of the arguments are specific to one or two macros, but most of them -can be specified with +Some of the arguments are specific to one or two macros, but most of +them can be specified with .CR .TBL\c , .CR .TR\c @@ -553,9 +585,10 @@ . These common arguments are explained in the next subsection. . +. .PP -Most of the argument default values can be changed by the user by setting -corresponding default registers or strings, as listed below. +Most of the argument default values can be changed by the user by +setting corresponding default registers or strings, as listed below. . .\"------------------------------------------------------------------ . @@ -647,7 +680,7 @@ .RE . .IP -for example indicates that the first column is 1.5\|inches wide; the +for example indicates that the first column is 1.5\~inches wide; the remaining columns take 1/10 of the column length each. . .XDEF @@ -798,6 +831,10 @@ This looks like . .PP +.ft C +.if t \{\ +. ne 7v +.\} .RS .nf .nh @@ -809,6 +846,7 @@ | 2*1 | 2*2+3 | +--------------+-------------------------------+ .RE +.ft .hy .fi . @@ -839,6 +877,7 @@ which looks like . .PP +.ft C .RS .nf .nh @@ -850,6 +889,7 @@ .hy .fi .RE +.ft C . .RE .RE @@ -916,7 +956,9 @@ macro. . . -.SS Arguments common to \f[CB].TBL\f[], \f[CB].TR\f[], \f[CB].TD\f[], and \f[CB].TH\f[] +.\" -------------------------------------------------------------------- +.SS "Arguments common to \f[CB].TBL\f[], \f[CB].TR\f[], \f[CB].TD\f[], and \f[CB].TH\f[]" +.\" -------------------------------------------------------------------- . The arguments described in this section can be specified with the .CR .TBL @@ -990,7 +1032,7 @@ .IR italic , or \f[BI]bold italic\f[], respectively. . -As with +As with .BR roff 's .CR .ft request the @@ -1076,7 +1118,7 @@ . .IP The thickness of the separator lines is the half of the border thickness, -but at least 0.1\|inches. +but at least 0.1\~inches. . The distance between the double lines is equal to the line thickness. . @@ -1086,7 +1128,7 @@ .CR \[oq]border=0\[cq] for proper formatting the value of .CR \[oq]csp\[cq] -must be at least .05\|inches for single separator lines and .15\|inches for +must be at least .05\~inches for single separator lines and .15\~inches for double separator lines. . .XDEFS hl=s t*hl @@ -1116,16 +1158,15 @@ .XDEFS vl=s t*vl . . +.\" -------------------------------------------------------------------- .SH HDTBL CUSTOMIZATION +.\" -------------------------------------------------------------------- . .PP -Before creating the first table, -you should configure default values -to minimize the markup -needed in each table. -The following example -sets up defaults -suitable for typical papers: +Before creating the first table, you should configure default values +to minimize the markup needed in each table. +. +The following example sets up defaults suitable for typical papers: .PP .RS .nf @@ -1135,18 +1176,22 @@ .CR ".nr t*cpd 0.1n\e\[dq] cell padding .fi .RE +. +. .PP The file .B examples/common.roff provides another example setup in the ``minimal Page setup'' section. . +. .PP A table which does not fit on a partially filled page is printed automatically on the top of the next page if you append the little utility macro .CR t*hm to the page header macro of your document's main macro package. +. For example, say . .PP @@ -1158,11 +1203,13 @@ .fi .RE . +. .PP if you use the .B ms macro package. . +. .PP The macro .CR t*EM @@ -1170,8 +1217,10 @@ and for missing .CR ETB macros (table not closed). +. You can append this macro to the ``end'' macro of your document's main macro package. +. For example: . .PP @@ -1191,14 +1240,9 @@ macro package. . . -.SH AUTHOR -. -.MT Joachim.Walsdorff@urz.uni-heidelberg.de -Joachim Walsdorff -.ME -. -. +.\" -------------------------------------------------------------------- .SH BUGS AND SUGGESTIONS +.\" -------------------------------------------------------------------- . Please send your commments to the .MT groff@gnu.org @@ -1206,4 +1250,24 @@ .ME or directly to the author. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. +. .\" EOF +. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff -ruN groff-1.22.2/contrib/hdtbl/hdmisc.tmac groff-1.22.3/contrib/hdtbl/hdmisc.tmac --- groff-1.22.2/contrib/hdtbl/hdmisc.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/hdmisc.tmac 2014-11-04 09:38:35.483520772 +0100 @@ -1,11 +1,11 @@ -.\" -*- mode: roff -*- +.\" -*- mode: nroff -*- .ig hdmisc.tmac This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/hdtbl.tmac groff-1.22.3/contrib/hdtbl/hdtbl.tmac --- groff-1.22.2/contrib/hdtbl/hdtbl.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/hdtbl.tmac 2014-11-04 09:38:35.483520772 +0100 @@ -1,11 +1,11 @@ -.\" -*- roff -*- +.\" -*- nroff -*- .ig hdtbl.tmac This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2005-2014 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/hdtbl/Makefile.sub groff-1.22.3/contrib/hdtbl/Makefile.sub --- groff-1.22.2/contrib/hdtbl/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/hdtbl/Makefile.sub 2014-11-04 09:38:35.483520772 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 2006, 2009, 2010, 2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # Written by Werner Lemberg (wl@gnu.org) -# +# # This file is part of groff. -# +# # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 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 . @@ -87,17 +87,21 @@ stamp-strip \ hdmisc.tmac-s hdtbl.tmac-s +RM=rm -f + .SUFFIXES: .roff .in .ps .roff.ps: $(GROFF) -Tps -dfontpath=$(top_srcdir)/font -dsopath=$(srcdir)/ \ - -mhdtbl $< >$@ + -mhdtbl $< >$@ .in.roff: sed -e "s|@fontdir@|$(fontdir)|" $< >$@ +all: $(make_examples) stamp-strip -all: $(PROCESSEDEXAMPLEFILES) stamp-strip +.PHONY: examples +examples: $(PROCESSEDEXAMPLEFILES) $(PROCESSEDEXAMPLEFILES): gnu.eps examples/stamp examples/common.roff @@ -107,48 +111,64 @@ elif test -f $(top_builddir)/doc/gnu.eps; then \ cp $(top_builddir)/doc/gnu.eps . ; \ else \ - xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 | \ - $(pnmtops_nosetpage) -noturn -rle >$@ ; \ + xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 \ + | $(pnmtops_nosetpage) -noturn -rle >$@ ; \ fi examples/stamp: - test -d examples || $(mkinstalldirs) examples + -test -d examples || $(mkinstalldirs) examples touch $@ stamp-strip: $(STRIPFILES) for f in $(STRIPFILES); do \ - rm -f $$f-s; \ + $(RM) $$f-s; \ sed -f $(top_srcdir)/tmac/strip.sed $(srcdir)/$$f >$$f-s; \ done touch $@ -install_data: $(STRIPFILES) $(EXAMPLEFILES) $(GENFILES) \ - $(PROCESSEDEXAMPLEFILES) gnu.eps stamp-strip +$(GENFILES): examples/stamp + +install_data: install_always $(make_install_examples) + +install_always: $(STRIPFILES) $(GENFILES) -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir) for f in $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ $(INSTALL_DATA) $$f-s $(DESTDIR)$(tmacdir)/$$f; \ done + +install_examples: install_always $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) \ + gnu.eps stamp-strip -test -d $(DESTDIR)$(exampledir)/hdtbl \ || $(mkinstalldirs) $(DESTDIR)$(exampledir)/hdtbl for f in $(EXAMPLEFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/hdtbl/$$f; \ + $(RM) $(DESTDIR)$(exampledir)/hdtbl/$$f; \ $(INSTALL_DATA) $(srcdir)/examples/$$f \ $(DESTDIR)$(exampledir)/hdtbl/$$f; \ done for f in $(PROCESSEDEXAMPLEFILES_) $(GENFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/hdtbl/$$f; \ + $(RM) $(DESTDIR)$(exampledir)/hdtbl/$$f; \ $(INSTALL_DATA) examples/$$f $(DESTDIR)$(exampledir)/hdtbl/$$f; \ done $(INSTALL_DATA) gnu.eps $(DESTDIR)$(exampledir)/hdtbl/gnu.eps -uninstall_sub: - -for f in $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ - done - -for f in $(EXAMPLEFILES_) $(PROCESSEDEXAMPLEFILES_) \ - $(GENFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/hdtbl/$$f; \ - done - -rm $(DESTDIR)$(exampledir)/hdtbl/gnu.eps - -rmdir $(DESTDIR)$(exampledir)/hdtbl +uninstall_sub: uninstall_always $(make_uninstall_examples) + +uninstall_always: + -for f in $(STRIPFILES); do $(RM) $(DESTDIR)$(tmacdir)/$$f; done + +uninstall_examples: uninstall_always + -for f in $(EXAMPLEFILES_) $(PROCESSEDEXAMPLEFILES_) $(GENFILES_); do \ + $(RM) $(DESTDIR)$(exampledir)/hdtbl/$$f; \ + done + $(RM) $(DESTDIR)$(exampledir)/hdtbl/gnu.eps + -test -d $(DESTDIR)$(exampledir)/hdtbl && \ + rmdir $(DESTDIR)$(exampledir)/hdtbl + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/mm/ChangeLog groff-1.22.3/contrib/mm/ChangeLog --- groff-1.22.2/contrib/mm/ChangeLog 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/ChangeLog 2014-11-04 09:38:35.487520722 +0100 @@ -1,3 +1,26 @@ +Wed Sep 3 21:29:00 2014 Bernd Warken + + * all files in contrib/mm: Copying and Emacs setting. + +Thu Aug 28 07:20:00 2014 Werner LEMBERG + + * m.tmac (misc@tag): Fix horizontal position. + Problem reported by Blake McBride . + +Sun Mar 30 21:45:00 2014 Steffen Nurpmeso + + * Makefile.sim, Makefile.sub: Put straight error-prevention prefixes + for `rm'. + +Wed Mar 6 22:18:00 2013 Deri James + + * groff_mm.man: Document .PIC flag -B (box). Default position of + picture is left (-L) + +Fri Mar 1 08:41:18 2013 Jim Avera + + * m.tmac (ds@set-format, LI): s/.ie/.if/ if no else clause. + Sat Nov 17 18:36:56 2012 Anton Shepelev Fixed the format of header numbers in references. @@ -926,8 +949,7 @@ * TP&PX supported * warnings for unimplemented macros -Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 +Copyright 1991-2007, 2009-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff -ruN groff-1.22.2/contrib/mm/examples/APP groff-1.22.3/contrib/mm/examples/APP --- groff-1.22.2/contrib/mm/examples/APP 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/APP 2014-11-04 09:38:35.597519346 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/B1B2 groff-1.22.3/contrib/mm/examples/B1B2 --- groff-1.22.2/contrib/mm/examples/B1B2 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/B1B2 2014-11-04 09:38:35.597519346 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/COVER groff-1.22.3/contrib/mm/examples/COVER --- groff-1.22.2/contrib/mm/examples/COVER 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/COVER 2014-11-04 09:38:35.597519346 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/IND groff-1.22.3/contrib/mm/examples/IND --- groff-1.22.2/contrib/mm/examples/IND 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/IND 2014-11-04 09:38:35.597519346 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/LT groff-1.22.3/contrib/mm/examples/LT --- groff-1.22.2/contrib/mm/examples/LT 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/LT 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/LT.se groff-1.22.3/contrib/mm/examples/LT.se --- groff-1.22.2/contrib/mm/examples/LT.se 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/LT.se 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/ML groff-1.22.3/contrib/mm/examples/ML --- groff-1.22.2/contrib/mm/examples/ML 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/ML 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/MOVE groff-1.22.3/contrib/mm/examples/MOVE --- groff-1.22.2/contrib/mm/examples/MOVE 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/MOVE 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/MUL groff-1.22.3/contrib/mm/examples/MUL --- groff-1.22.2/contrib/mm/examples/MUL 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/MUL 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/NCOL groff-1.22.3/contrib/mm/examples/NCOL --- groff-1.22.2/contrib/mm/examples/NCOL 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/NCOL 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/ND groff-1.22.3/contrib/mm/examples/ND --- groff-1.22.2/contrib/mm/examples/ND 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/ND 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/README groff-1.22.3/contrib/mm/examples/README --- groff-1.22.2/contrib/mm/examples/README 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/README 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ - Copyright (C) 1989, 2006, 2009 - Free Software Foundation, Inc. + -*- text -*- + Copyright (C) 1989-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/References groff-1.22.3/contrib/mm/examples/References --- groff-1.22.2/contrib/mm/examples/References 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/References 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/examples/SETR groff-1.22.3/contrib/mm/examples/SETR --- groff-1.22.2/contrib/mm/examples/SETR 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/examples/SETR 2014-11-04 09:38:35.598519334 +0100 @@ -1,5 +1,5 @@ -.\" Copyright (C) 1989, 2009 -.\" Free Software Foundation, Inc. +.\" -*- nroff -*- +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" .\" Copying and distribution of this file, with or without modification, .\" are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mm/groff_mm.man groff-1.22.3/contrib/mm/groff_mm.man --- groff-1.22.2/contrib/mm/groff_mm.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/groff_mm.man 2014-11-04 09:38:35.487520722 +0100 @@ -1,7 +1,11 @@ '\" t -.ig -Copyright (C) 1989, 2000-2003, 2006, 2007, 2009-2011 - Free Software Foundation, Inc. +.TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_mm \- groff mm macros +. +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -19,15 +23,15 @@ the original English. .. . -.TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -. -groff_mm \- groff mm macros -. +.de au +.MT jh@axis.se +J\[:o]rgen H\[:a]gg, Lund, Sweden +.ME . +.. . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .B groff .B \-m@TMAC_M_PREFIX@m @@ -39,7 +43,9 @@ ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . The groff mm macros are intended to be compatible with the DWB mm macros with the following limitations: @@ -56,26 +62,29 @@ .B \(bu groff mm does not support cut marks. . +. .LP .B m@TMAC_M_PREFIX@m is intended to support easy localization. +. Use .B m@TMAC_M_PREFIX@mse as an example how to adapt the output format to a national standard. +. Localized strings are collected in the file -.RI `@MACRODIR@/ xx .tmac', +.RI \[oq]@MACRODIR@/ xx .tmac\[cq], where .I xx denotes the two-letter code for the .IR language , as defined in the ISO 639 standard. -For Swedish, -this is `sv.tmac' \[en] -not `se', -which is the ISO 3166 two-letter code for the +. +For Swedish, this is \[oq]sv.tmac\[cq] \[en] not \[oq]se\[cq], which +is the ISO 3166 two-letter code for the .I country (as used for the output format localization). . +. .\"######################################################################## .LP A file called @@ -83,26 +92,31 @@ or .IB country _locale is read after the initialization of the global variables. +. It is therefore possible to localize the macros with a different company name and so on. . +. .LP -In this manual, -square brackets are used to show optional arguments. +In this manual, square brackets are used to show optional arguments. . . +.\" -------------------------------------------------------------------- .SS "Number registers and strings" +.\" -------------------------------------------------------------------- . Many macros can be controlled by number registers and strings. +. A number register is assigned with the .B nr command: . .RS .LP -.BI .nr\ "XXX \fR[\fP\fB\[+-]\fP\fR]\fPn \fR[\fPi\fR]\fP +.BI .nr\ "XXX \fR[\fP\fB\[+-]\fP\fR]\fPn \fR[\fPi\fR]\fP\"" .RE . +. .LP .I XXX is the name of the register, @@ -110,14 +124,17 @@ \~is the value to be assigned, and .I i\c \~is the increment value for auto-increment. +. .I n\c \~can have a plus or minus sign as a prefix if an increment or decrement of the current value is wanted. +. (Auto-increment or auto-decrement occurs if the number register is used with a plus or minus sign, .BI \[rs]n+[ XXX ] or -.BI \[rs]n-[ XXX ]\fR.)\fP +.BI \[rs]n\-[ XXX ]\fR.)\fP +. . .LP Strings are defined with @@ -127,21 +144,27 @@ .LP \fB\&.ds\fP \fIYYY string\fP .RE -. +.. + .LP The string is assigned everything to the end of the line, even blanks. +. Initial blanks in .I string should be prefixed with a double-quote. +. (Strings are used in the text as .BI \[rs]*[ YYY ]\fR.)\fP . . +.\" -------------------------------------------------------------------- .SS "Special formatting of number registers" +.\" -------------------------------------------------------------------- . A number register is printed with normal digits if no format has been given. +. Set the format with .BR af : . @@ -150,6 +173,7 @@ .BI .af\ "R c" .RE . +. .LP .I R\c \~is the name of the register, @@ -158,7 +182,7 @@ . .RS .LP -.TS +.TS tab(@); lb lb l l. @@ -173,7 +197,9 @@ .RE . . +.\" -------------------------------------------------------------------- .SS Fonts +.\" -------------------------------------------------------------------- . In .BR m@TMAC_M_PREFIX@m , @@ -189,21 +215,26 @@ and\~\c .BR 3 , respectively. +. Internally, font positions are used for backwards compatibility. -From a practical point of view it doesn't make a big difference \[en] -a different font family can still be selected with a call to the +. +From a practical point of view it doesn\[aq]t make a big difference +\[en] a different font family can still be selected with a call to the .B .fam request or using -.BR groff 's +.BR groff \[aq]s .B \-f command line option. +. On the other hand, if you want to replace just, say, font .BR B , you have to replace the font at position\~2 (with a call to -`.fp\~2\~.\|.\|.'). +\[oq].fp\~2\~.\|.\|.\[cq]). . . +.\" -------------------------------------------------------------------- .SS Macros +.\" -------------------------------------------------------------------- . .TP .BI )E\ "level text" @@ -212,23 +243,28 @@ to the table of contents with .IR level , which is either\~0 or in the range 1 to\~7. +. See also .BR .H . +. This macro is used for customized tables of contents. . .TP .BR 1C\ [ 1 ] Begin one-column processing. +. A\~\c .B 1 as an argument disables the page break. -Use wide footnotes, -small footnotes may be overprinted. +. +Use wide footnotes, small footnotes may be overprinted. . .TP .B 2C Begin two-column processing. +. Splits the page in two columns. +. It is a special case of .BR MC . See also @@ -236,13 +272,12 @@ . .TP .B AE -Abstract end, -see +Abstract end, see .BR AS . . .TP .BI AF\ \fR[\fP name-of-firm \fR]\fP -Author's firm, should be called before +Author\[aq]s firm, should be called before .BR AU , see also .BR COVER . @@ -250,7 +285,9 @@ .TP .BI AL\ \fR[\fPtype\ \fR[\fPtext-indent\ \fR[\fP1\fR]]]\fP Start auto-increment list. +. Items are numbered beginning with one. +. The .I type argument controls the format of numbers. @@ -263,8 +300,8 @@ l l. Arg@Description 1@Arabic (the default) -A@Upper-case letters (A-Z) -a@Lower-case letters (a-z) +A@Upper-case letters (A\(enZ) +a@Lower-case letters (a\(enz) I@Upper-case roman i@Lower-case roman .TE @@ -280,24 +317,31 @@ .BI APP\ "name text" Begin an appendix with name .IR name . +. Automatic naming occurs if .I name is .BR \[dq]\[dq] . +. The appendices start with\~\c .B A if automatic naming is used. -A new page is ejected, -and a header is also produced if the number variable +. +A new page is ejected, and a header is also produced if the number +variable .B Aph is non-zero. +. This is the default. -The appendix always appears in the `List of contents' with correct -page numbers. -The name `APPENDIX' can be changed by setting the string +. +The appendix always appears in the \[oq]List of contents\[cq] with +correct page numbers. +. +The name \[oq]APPENDIX\[cq] can be changed by setting the string .B App to the desired text. -The string +. +The string .B Apptxt contains the current appendix text. . @@ -307,14 +351,16 @@ .BR .APP , but the page number is incremented with .IR pages . +. This is used when diagrams or other non-formatted documents are included as appendices. . .TP .BI AS\ "\fR[\fParg \fR[\fPindent\fR]]\fP" Abstract start. -Indentation is specified in `ens', -but scaling is allowed. +. +Indentation is specified in \[oq]ens\[cq], but scaling is allowed. +. Argument .I arg controls where the abstract is printed. @@ -340,81 +386,97 @@ . .IP An abstract is not printed at all in external letters (\fBMT 5\fP). +. The .I indent -parameter controls the indentation of both margins, -otherwise normal text indentation is used. +parameter controls the indentation of both margins, otherwise normal +text indentation is used. . .TP .BI AST\ \fR[\fPtitle\fR]\fP Abstract title. -Default is `ABSTRACT'. +. +Default is \[oq]ABSTRACT\[cq]. +. Sets the text above the abstract text. . .TP .BI AT\ "title1 \fR[\fPtitle2 \fR[.\|.\|.]]\fP" -Author's title. +Author\[aq]s title. +. .B AT must appear just after each .BR AU . +. The title shows up after the name in the signature block. . .TP .BI AU\ "\fR[\fPname \fR[\fPinitials \fR[\fPloc \fR[\fPdept \fR[\fPext \fR[\fProom \fR[\fParg \fR[\fParg \fR[\fParg\fR]]]]]]]]]\fP" Author information. -Specifies the author of the memo or paper, -and is printed on the cover sheet and on other similar places. +. +Specifies the author of the memo or paper, and is printed on the cover +sheet and on other similar places. .B AU must not appear before .BR TL . -The author information -can contain initials, location, department, telephone extension, -room number or name and up to three extra arguments. +. +The author information can contain initials, location, department, +telephone extension, room number or name and up to three extra +arguments. . .TP .BI AV\ \fR[\fPname\ \fR[\fP1\fR]]\fP Approval signature. +. Generates an approval line with place for signature and date. -The string `APPROVED:' can be changed with variable +. +The string \[oq]APPROVED:\[cq] can be changed with variable .BR Letapp ; it is replaced with an empty lin if there is a second argument. -The string `Date' can be changed with variable +. +The string \[oq]Date\[cq] can be changed with variable .BR Letdate . . .TP .BI AVL\ \fR[\fPname\fR]\fP Letter signature. +. Generates a line with place for signature. . .TP .BI B\ "\fR[\fPbold-text \fR[\fPprev-font-text \fR[\fPbold \fR[.\|.\|.]]]]\fP" Begin boldface. +. No limit on the number of arguments. -All arguments are concatenated to one word; -the first, third and so on is printed in boldface. +. +All arguments are concatenated to one word; the first, third and so on +is printed in boldface. . .TP .B B1 Begin box (as the ms macro). +. Draws a box around the text. -The text is indented one character, -and the right margin is one character shorter. +. +The text is indented one character, and the right margin is one +character shorter. . .TP .B B2 End box. +. Finishes the box started with .BR B1 . . .TP .B BE -End bottom block, -see +End bottom block, see .BR BS . . .TP .BI BI\ "\fR[\fPbold-text \fR[\fPitalic-text \fR[\fPbold-text \fR[.\|.\|.]]]]\fP" Bold-italic. +. No limit on the number of arguments, see\~\c .BR B . @@ -422,12 +484,15 @@ .TP .BI BL\ \fR[\fPtext-indent\ \fR[\fP1\fR]]\fP Start bullet list. +. Initializes a list with a bullet and a space in the beginning of each list item (see .BR LI ). +. .I text-indent overrides the default indentation of the list items set by number register .BR Pi . +. A third argument prohibits printing of a blank line before each item. . .TP @@ -438,41 +503,53 @@ .TP .B BS Bottom block start. +. Begins the definition of a text block which is printed at the bottom of each page. +. The block ends with .BR BE . . .TP .BI BVL\ "text-indent \fR[\fPmark-indent\ " \fR[\fP1\fR]]\fP Start of broken variable-item list. +. Broken variable-item list has no fixed mark, it assumes that every .B LI has a mark instead. +. The text always begins at the next line after the mark. +. .I text-indent sets the indentation to the text, and .I mark-indent the distance from the current indentation to the mark. +. A third argument prohibits printing of a blank line before each item. . .TP .BI COVER\ \fR[\fParg\fR]\fP Begin a coversheet definition. +. It is important that .B .COVER appears before any normal text. +. This macro uses .I arg -to build the filename -`@TMAC_MDIR@/\fIarg\fP.cov'. +to build the filename +\[oq]@TMAC_MDIR@/\fIarg\fP.cov\[cq]. +. Therefore it is possible to create unlimited types of cover sheets. -`ms.cov' is supposed to look like the ms cover sheet. +. +\[oq]ms.cov\[cq] is supposed to look like the ms cover sheet. +. .B .COVER requires a .B .COVEND at the end of the cover definition. +. Always use this order of the cover macros: . .RS @@ -499,13 +576,14 @@ .TP .B COVEND Finish the cover description and print the cover page. +. It is defined in the cover file. . .TP .B DE Display end. -Ends a block of text or display that begins -with +. +Ends a block of text or display that begins with .B DS or .BR DF . @@ -513,6 +591,7 @@ .TP .BI DF\ "\fR[\fPformat \fR[\fPfill \fR[\fPrindent\fR]]]\fP" Begin floating display (no nesting allowed). +. A floating display is saved in a queue and is printed in the order entered. .IR Format , .IR fill , @@ -586,23 +665,31 @@ .TP .BI DL\ \fR[\fPtext-indent\ "\fR[\fP\fB1\fP \fR[\fP\fB1\fP\fR]]]\fP" Dash list start. +. Begins a list where each item is printed after a dash. +. .I text-indent -changes the default indentation of the list items set by -number register +changes the default indentation of the list items set by number +register .BR Pi . +. A second argument prevents an empty line between each list item. +. See .BR LI . +. A third argument prohibits printing of a blank line before each item. . .TP .BI DS\ "\fR[\fPformat \fR[\fPfill \fR[\fPrindent\fR]]]\fP" Static display start. +. Begins collection of text until .BR DE . -The text is printed together on the same page, -unless it is longer than the height of the page. +. +The text is printed together on the same page, unless it is longer +than the height of the page. +. .B DS can be nested arbitrarily. . @@ -629,9 +716,9 @@ .RE . .IP -The values `L', `I', `C', and `CB' can also be specified as -`0', `1', `2', and `3', respectively, -for compatibility reasons. +The values \[oq]L\[cq], \[oq]I\[cq], \[oq]C\[cq], and \[oq]CB\[cq] can +also be specified as \[oq]0\[cq], \[oq]1\[cq], \[oq]2\[cq], and +\[oq]3\[cq], respectively, for compatibility reasons. . .IP .B fill @@ -649,20 +736,25 @@ .RE . .IP -`N' and `F' can also be specified as `0' and `1', respectively. +\[oq]N\[cq] and \[oq]F\[cq] can also be specified as \[oq]0\[cq] and +\[oq]1\[cq], respectively. . .IP By default, an empty line is printed before and after the display. +. Setting number register .B Ds to\~0 prevents this. +. .I rindent shortens the line length by that amount. . .TP .BI EC\ "\fR[\fPtitle \fR[\fPoverride \fR[\fPflag \fR[\fPrefname\fR]]]]\fP" Equation title. +. Sets a title for an equation. +. The .I override argument changes the numbering. @@ -699,33 +791,39 @@ uses the number register .B Ec as a counter. +. It is possible to use .B .af to change the format of the number. +. If number register .B Of -is\~1, -the format of title uses a dash instead of a dot after the number. +is\~1, the format of title uses a dash instead of a dot after the +number. . .IP The string .B Le controls the title of the List of Equations; -default is `LIST OF EQUATIONS'. +default is \[oq]LIST OF EQUATIONS\[cq]. +. The List of Equations is only printed if number register .B Le is\~1. +. The default is\~0. +. The string .B Liec -contains the word `Equation', -which is printed before the number. +contains the word \[oq]Equation\[cq], which is printed before the +number. +. If .I refname is used, then the equation number is saved with .BR .SETR , -and can be retrieved with `\fB.GETST\fP \fIrefname\fP'. +and can be retrieved with \[oq]\fB.GETST\fP \fIrefname\fP\[cq]. . .IP Special handling of the title occurs if @@ -739,6 +837,7 @@ .BI EF\ \fR[\fParg\fR]\fP Even-page footer, printed just above the normal page footer on even pages. +. See .BR PF . . @@ -750,6 +849,7 @@ .BI EH\ \fR[\fParg\fR]\fP Even-page header, printed just below the normal page header on even pages. +. See .BR PH . . @@ -765,14 +865,17 @@ .TP .B EOP End-of-page user-defined macro. +. This macro is called instead of the normal printing of the footer. +. The macro is executed in a separate environment, without any trap active. +. See .BR TP . . .IP -.B strings available to EOP +.B Strings available to EOP .RS .TS tab(@); @@ -789,34 +892,40 @@ .I width and .IR height . +. It also prints the text .I name or a default string if .I name is not specified. +. This is used to include external pictures; just give the size of the picture. +. .B \-L left-adjusts the picture; the default is to center. +. See .BR PIC . . .TP .BI EQ\ \fR[\fPlabel\fR]\fP Equation start. +. .BR EQ / EN are the delimiters for equations written for .BR @g@eqn (@MAN1EXT@). +. .BR EQ / EN must be inside of a .BR DS / DE -pair, -except if +pair, except if .B EQ is used to set options for .B @g@eqn only. +. The .I label argument appears at the right margin of the equation, @@ -826,7 +935,9 @@ unless number register .B Eq is\~1. +. Then the label appears at the left margin. +. .IP If there are multiple .BR EQ / EN @@ -838,29 +949,35 @@ .TP .BI EX\ "\fR[\fPtitle \fR[\fPoverride \fR[\fPflag \fR[\fPrefname\fR]]]]\fP" Exhibit title. +. The arguments are the same as for .BR EC . +. .B EX uses the number register .B Ex as a counter. +. The string .B Lx controls the title of the List of Exhibits; -default is `LIST OF EXHIBITS'. +default is \[oq]LIST OF EXHIBITS\[cq]. +. The List of Exhibits is only printed if number register .B Lx is\~1, which is the default. +. The string .B Liex -contains the word `Exhibit', -which is printed before the number. +contains the word \[oq]Exhibit\[cq], which is printed before the +number. +. If .I refname is used, the exhibit number is saved with .BR .SETR , -and can be retrieved with `\fB.GETST\fP \fIrefname\fP'. +and can be retrieved with \[oq]\fB.GETST\fP \fIrefname\fP\[cq]. . .IP Special handling of the title occurs if @@ -872,17 +989,22 @@ . .TP .BI FC\ \fR[\fPclosing\fR]\fP -Print `Yours\~very\~truly,' as a formal closing of a letter or memorandum. +Print \[oq]Yours\~very\~truly,\[cq] as a formal closing of a letter or +memorandum. +. The argument replaces the default string. +. The default is stored in string variable .BR Letfc . . .TP .BI FD\ \fR[\fParg\ \fR[\fP1\fR]]\fP Footnote default format. +. Controls the hyphenation (hyphen), right margin justification (adjust), and indentation of footnote text (indent). +. It can also change the label justification (ljust). . .RS @@ -909,6 +1031,7 @@ . .IP An argument greater than or equal to 11 is considered as value\~0. +. Default for .B m@TMAC_M_PREFIX@m is 10. @@ -920,28 +1043,33 @@ .TP .BI FG\ "\fR[\fPtitle \fR[\fPoverride \fR[\fPflag \fR[\fPrefname\fR]]]]\fP" Figure title. +. The arguments are the same as for .BR EC . .B FG uses the number register .B Fg as a counter. +. The string .B Lf controls the title of the List of Figures; -default is `LIST OF FIGURES'. +default is \[oq]LIST OF FIGURES\[cq]. +. The List of Figures is only printed if number register .B Lf is\~1, which is the default. +. The string .B Lifg -contains the word `Figure', -which is printed before the number. +contains the word \[oq]Figure\[cq], which is printed before the +number. +. If .I refname is used, then the figure number is saved with .BR .SETR , -and can be retrieved with `\fB.GETST\fP \fIrefname\fP'. +and can be retrieved with \[oq]\fB.GETST\fP \fIrefname\fP\[cq]. . .IP Special handling of the title occurs if @@ -954,18 +1082,24 @@ .TP .BI FS\ \fR[\fPlabel\fR]\fP Footnote start. +. The footnote is ended by .BR FE . +. By default, footnotes are automatically numbered; the number is available in string\~\c .BR F . +. Just add .B \[rs]*F in the text. +. By adding .IR label , it is possible to have other number or names on the footnotes. +. Footnotes in displays are now possible. +. An empty line separates footnotes; the height of the line is controlled by number register .BR Fs , @@ -973,11 +1107,14 @@ . .TP .BI GETHN\ "refname \fR[\fPvarname\fR]\fP" -Include the header number where the corresponding `\fBSETR\fP \fIrefname\fP' -was placed. -This is displayed as `X.X.X.' in pass\~1. +Include the header number where the corresponding \[oq]\fBSETR\fP +\fIrefname\fP\[cq] was placed. +. +This is displayed as \[oq]X.X.X.\[cq] in pass\~1. +. See .BR INITR . +. If .I varname is used, @@ -988,11 +1125,14 @@ . .TP .BI GETPN\ "refname \fR[\fPvarname\fR]\fP" -Include the page number where the corresponding `\fBSETR\fP \fIrefname\fP' -was placed. -This is displayed as `9999' in pass\~1. +Include the page number where the corresponding \[oq]\fBSETR\fP +\fIrefname\fP\[cq] was placed. +. +This is displayed as \[oq]9999\[cq] in pass\~1. +. See .BR INITR . +. If .I varname is used, @@ -1007,7 +1147,8 @@ .B GETHN and .B GETPN -with the text `chapter' and `,\~page'. +with the text \[oq]chapter\[cq] and \[oq],\~page\[cq]. +. The string .B Qrf contains the text for the cross reference: @@ -1020,6 +1161,7 @@ .IP .B Qrf may be changed to support other languages. +. Strings .B Qrfh and @@ -1032,31 +1174,40 @@ .BI GETST\ "refname \fR[\fPvarname\fR]\fP" Include the string saved with the second argument to .BR .SETR . +. This is a dummy string in pass\~1. +. If .I varname is used, .B GETST sets it to the saved string. +. See .BR INITR . . .TP .BI H\ "level \fR[\fPheading-text \fR[\fPheading-suffix\fR]]\fP" Numbered section heading. +. Section headers can have a level between 1 and 14; level\~1 is the top level. +. The text is given in .IR heading-text , and must be surrounded by double quotes if it contains spaces. +. .I heading-suffix is added to the header in the text but not in the table of contents. +. This is normally used for footnote marks and similar things. -Don't use +. +Don\[aq]t use .B \[rs]*F in .IR heading-suffix , -it doesn't work. +it doesn\[aq]t work. +. A manual label must be used, see .BR FS . .sp @@ -1065,6 +1216,7 @@ directly after\~\c .B H is ignored. +. .B H\c \~takes care of spacing and indentation. . @@ -1076,14 +1228,19 @@ Number register .B Ej controls page ejection before the heading. +. By default, a level-one heading gets two blank lines before it; higher levels only get one. -A new page is ejected before each first-level heading if number register +. +A new page is ejected before each first-level heading if number +register .B Ej is\~1. +. All levels below or equal the value of .B Ej get a new page. +. Default value for .B Ej is\~0. @@ -1097,6 +1254,7 @@ A line break occurs after the heading if the heading level is less or equal to number register .BR Hb . +. Default value is\~2. .RE . @@ -1105,14 +1263,15 @@ . .RS .IP -A blank line is inserted after the heading if the heading level is less -or equal to number register +A blank line is inserted after the heading if the heading level is +less or equal to number register .BR Hs . +. Default value is\~2. . .IP -Text follows the heading on the same line if the level is greater -than both +Text follows the heading on the same line if the level is greater than +both .B Hb and .BR Hs . @@ -1126,6 +1285,7 @@ Indentation of the text after the heading is controlled by number register .BR Hi . +. Default value is\~0. . .IP @@ -1135,7 +1295,7 @@ l lx. 0@The text is left-justified. 1@T{ -Indentation of the text follows the value of number +Indentation of the text follows the value of number register .B Pt , see @@ -1168,7 +1328,9 @@ .IP The font of each heading level is controlled by string .BR HF . +. It contains a font number or font name for each level. +. Default value is . .RS @@ -1178,6 +1340,7 @@ . .IP (all headings in italic). +. This could also be written as . .RS @@ -1189,6 +1352,7 @@ Note that some other implementations use .B 3\~3\~2\~2\~2\~2\~2 as the default value. +. All omitted values are presumed to have value\~1. .RE . @@ -1203,7 +1367,9 @@ in the same way as .B HF controls the font. +. A value of\~0 selects the default point size. +. Default value is . .RS @@ -1213,6 +1379,7 @@ . .IP Beware that only the point size changes, not the vertical size. +. The latter can be controlled by the user-specified macros .B HX and/or @@ -1229,15 +1396,19 @@ up to .B H14 contain the counter for each heading level. +. The values are printed using Arabic numerals; this can be changed with the macro .B HM (see below). +. All marks are concatenated before printing. +. To avoid this, set number register .B Ht to\~1. +. This only prints the current heading counter at each heading. .RE . @@ -1249,6 +1420,7 @@ All headings whose level is equal or below number register .B Cl are saved to be printed in the table of contents. +. Default value is\~2. .RE . @@ -1259,18 +1431,21 @@ .IP The following macros can be defined by the user to get a finer control of vertical spacing, fonts, or other features. +. Argument .I level is the level-argument to\~\c .BR H , but\~0 for unnumbered headings (see .BR HU ). +. Argument .I rlevel is the real level; it is set to number register .B Hu for unnumbered headings. +. Argument .I heading-text is the text argument to @@ -1282,8 +1457,10 @@ .TP .BI HX\ "level rlevel heading-text" This macro is called just before the printing of the heading. +. The following registers are available for .BR HX . +. Note that .B HX may alter @@ -1303,6 +1480,7 @@ .TP .BR ;0\ (register) Contains the position of the text after the heading. +. 0\~means that the text should follow the heading on the same line, 1\~means that a line break should occur before the text, and 2\~means that a blank line should separate the heading and the text. @@ -1312,7 +1490,9 @@ Contains two spaces if register .B ;0 is\~0. +. It is used to separate the heading from the text. +. The string is empty if .B ;0 is non-zero. @@ -1320,7 +1500,9 @@ .TP .BR ;3\ (register) Contains the needed space in units after the heading. +. Default is 2v. +. Can be used to change things like numbering .RB ( }0 ), vertical spacing @@ -1341,6 +1523,7 @@ or .B HU exits. +. Can be used to change the page header according to the section heading. .RE .RE @@ -1348,17 +1531,21 @@ .TP .BI HC\ \fR[\fPhyphenation-character\fR]\fP Set hyphenation character. -Default value is `\[rs]%'. +. +Default value is \[oq]\[rs]%\[cq]. +. Resets to the default if called without argument. -Hyphenation can be turned off by setting number -register +. +Hyphenation can be turned off by setting number register .B Hy to\~0 at the beginning of the file. . .TP .BI HM\ "\fR[\fParg1 \fR[\fParg2 \fR[.\|.\|.\& [\fParg14\fR]]]]\fP" Heading mark style. +. Controls the type of marking for printing of the heading counters. +. Default is\~1 for all levels. . .IP @@ -1379,59 +1566,75 @@ .TP .BI HU\ heading-text Unnumbered section header. +. .B HU behaves like .B H at the level in number register .BR Hu . +. See\~\c .BR H . . .TP .BI HX\ "dlevel rlevel heading-text" User-defined heading exit. +. Called just before printing the header. +. See\~\c .BR H . . .TP .BI HY\ "dlevel rlevel heading-text" User-defined heading exit. +. Called just before printing the header. +. See\~\c .BR H . . .TP .BI HZ\ "dlevel rlevel heading-text" User-defined heading exit. +. Called just after printing the header. +. See\~\c .BR H . . .TP .BI I\ "\fR[\fPitalic-text \fR[\fPprev-font-text \fR[\fPitalic-text \fR[.\|.\|.]]]]\fP" Italic. +. Changes the font to italic if called without arguments. +. With one argument it sets the word in italic. +. With two arguments it concatenates them and sets the first word in italic and the second in the previous font. +. There is no limit on the number of argument; all are concatenated. . .TP .BI IA\ "\fR[\fPaddressee-name \fR[\fPtitle\fR]]\fP" -Begin specification of the addressee and addressee's address in +Begin specification of the addressee and addressee\[aq]s address in letter style. +. Several names can be specified with empty .BR IA / IE -pairs, but only one address. +. See .BR LT . . .TP .BI IB\ "\fR[\fPitalic-text \fR[\fPbold-text \fR[\fPitalic-text \fR[.\|.\|.]]]]\fP" Italic-bold. +. Even arguments are printed in italic, odd in boldface. +. See\~\c .BR I . . @@ -1442,19 +1645,21 @@ . .TP .BI INITI\ "type filename \fR[\fPmacro\fR]\fP" -Initialize the new index system and set the filename to collect -index lines in with +Initialize the new index system and set the filename to collect index +lines in with .BR IND . +. Argument .I type -selects the type of index: -page number, header marks or both. +selects the type of index: page number, header marks or both. +. The default is page numbers. . .IP It is also possible to create a macro that is responsible for formatting each row; just add the name of the macro as a third argument. +. The macro is then called with the index as argument(s). . .IP @@ -1467,7 +1672,7 @@ N@Page numbers H@Header marks B@T{ -Both page numbers and header marks, +Both page numbers and header marks, separated with a tab character. T} .TE @@ -1475,17 +1680,22 @@ .TP .BI INITR\ filename Initialize the cross reference macros. -Cross references are written to stderr and are supposed to -be redirected into file `\fIfilename\fR.qrf'. +. +Cross references are written to stderr and are supposed to be +redirected into file \[oq]\fIfilename\fR.qrf\[cq]. +. Requires two passes with groff; this is handled by a separate program called .BR mmroff (@MAN1EXT@). +. This program exists because .BR groff (@MAN1EXT@) by default deactivates the unsafe operations that are required by .BR INITR . +. The first pass looks for cross references, and the second one includes them. +. .B INITR can be used several times, but it is only the first occurrence of @@ -1521,19 +1731,22 @@ . .TP .B INDP -Print the index by running the command specified -by string variable +Print the index by running the command specified by string variable .BR Indcmd , -which has `sort\ \-t\[rs]t' as the default value. +which has \[oq]sort\ \-t\[rs]t\[cq] as the default value. +. .B INDP reads the output from the command to form the index, by default in two columns (this can be changed by defining .BR TYIND ). +. The index is printed with string variable .B Index as header, -default is `INDEX'. +default is \[oq]INDEX\[cq]. +. One-column processing is reactivated after the list. +. .B INDP calls the user-defined macros .BR TXIND , @@ -1541,36 +1754,43 @@ and .B TZIND if defined. +. .B TXIND -is called before printing the string `INDEX', +is called before printing the string \[oq]INDEX\[cq], .B TYIND -is called instead of printing `INDEX', and +is called instead of printing \[oq]INDEX\[cq], and .B TZIND -is called after the printing and should take care of restoring to normal -operation again. +is called after the printing and should take care of restoring to +normal operation again. . .TP .B ISODATE \fR[\fP0\fR]\fP Change the predefined date string in .B DT -to ISO-format, this is, `YYYY-MM-DD'. +to ISO-format, this is, \[oq]YYYY-MM-DD\[cq]. +. This can also be done by adding .B \-rIso=1 on the command line. +. Reverts to old date format if argument is\~\c .BR 0 . . .TP .BI IR\ "\fR[\fPitalic-text \fR[\fProman-text \fR[\fPitalic-text \fR[.\|.\|.]]]]\fP" Italic-roman. +. Even arguments are printed in italic, odd in roman. +. See\~\c .BR I . . .TP .BI LB\ "text-indent mark-indent pad type \fR[\fPmark \fR[\fPLI-space \fR[\fPLB-space\fR]]]\fP" List-begin macro. +. This is the common macro used for all lists. +. .I text-indent is the number of spaces to indent the text from the current indentation. . @@ -1579,20 +1799,23 @@ and .I mark-indent control where to put the mark. -The mark is placed within the mark area, -and +. +The mark is placed within the mark area, and .I mark-indent sets the number of spaces before this area. +. By default it is\~0. +. The mark area ends where the text begins. -The start of the text -is still controlled by +. +The start of the text is still controlled by .IR text-indent . . .IP The mark is left-justified within the mark area if .I pad is\~0. +. If .I pad is greater than\~0, @@ -1601,6 +1824,7 @@ and the mark is placed .I pad spaces before the text. +. This right-justifies the mark. . .IP @@ -1621,8 +1845,10 @@ using arabic numbers if .I mark is empty. +. .I mark -can then be any of `1', `A', `a', `I', or `i'. +can then be any of \[oq]1\[cq], \[oq]A\[cq], \[oq]a\[cq], \[oq]I\[cq], +or \[oq]i\[cq]. . .IP .I type @@ -1650,6 +1876,7 @@ Every item in the list gets .I LI-space number of blank lines before them. +. Default is\~1. . .IP @@ -1657,14 +1884,17 @@ itself prints .I LB-space blank lines. +. Default is\~0. . .TP .BI LC\ \fR[\fPlist-level\fR]\fP List-status clear. +. Terminates all current active lists down to .IR list-level , or\~0 if no argument is given. +. This is used by\~\c .B H to clear any active list. @@ -1672,6 +1902,7 @@ .TP .B LE \fR[\fP1\fR]\fP List end. +. Terminates the current list. .B LE outputs a blank line if an argument is given. @@ -1679,33 +1910,43 @@ .TP .BI LI\ \fR[\fPmark\ \fR[\fP1\fR|\fP2\fR]]\fP List item preceding every item in a list. +. Without argument, .B LI prints the mark determined by the current list type. +. By giving .B LI one argument, it uses that as the mark instead. +. Two arguments to .B LI makes .I mark a prefix to the current mark. -There is no separating space between the prefix -and the mark if the second argument is `2' instead of `1'. +. +There is no separating space between the prefix and the mark if the +second argument is \[oq]2\[cq] instead of \[oq]1\[cq]. +. This behaviour can also be achieved by setting number register .B Limsp to zero. +. A zero length .I mark makes a hanging indentation instead. . .IP A blank line is printed before the list item by default. +. This behaviour can be controlled by number register .BR Ls . +. Pre-spacing occurs for each list level less than or equal to .BR Ls . +. Default value is 99. +. There is no nesting limit. . .IP @@ -1716,7 +1957,10 @@ .IP All lists begin with a list initialization macro, .BR LB . -There are, however, seven predefined list types to make lists easier to use. +. +There are, however, seven predefined list types to make lists easier +to use. +. They all call .B LB with different default values. @@ -1738,13 +1982,15 @@ . .IP These lists are described at other places in this manual. +. See also .BR LB . . .TP -.BI LT\ \fR[\fIarg\fR]\fI +.BI LT\ \fR[\fIarg\/\fR]\fI Format a letter in one of four different styles depending on the argument. +. See also section .BR INTERNALS . . @@ -1757,8 +2003,9 @@ Arg@Style BL@T{ Blocked. -Date line, return address, writer's address and closing +Date line, return address, writer\[aq]s address and closing begins at the center of the line. +. All other lines begin at the left margin. T} SB@T{ @@ -1773,7 +2020,7 @@ SP@T{ Simplified. Almost the same as the full-blocked style. -Subject and the writer's identification are printed in all-capital. +Subject and the writer\[aq]s identification are printed in all-capital. T} .TE .RE @@ -1782,6 +2029,7 @@ .BI LO\ "type \fR[\fParg\fR]\fP" Specify options in letter (see .BR .LT ). +. This is a list of the standard options: . .RS @@ -1791,35 +2039,37 @@ l lx. CN@T{ Confidential notation. -Prints `CONFIDENTIAL' on the second line below the date line. -Any argument replaces `CONFIDENTIAL'. +Prints \[oq]CONFIDENTIAL\[cq] on the second line below the date line. +. +Any argument replaces \[oq]CONFIDENTIAL\[cq]. +. See also string variable .BR LetCN . T} RN@T{ Reference notation. -Prints `In reference to:' and the argument two lines below the date line. +Prints \[oq]In reference to:\[cq] and the argument two lines below the date line. See also string variable .BR LetRN . T} AT@T{ Attention. -Prints `ATTENTION:' and the argument below the inside address. +Prints \[oq]ATTENTION:\[cq] and the argument below the inside address. See also string variable .BR LetAT . T} SA@T{ Salutation. -Prints `To Whom It May Concern:' or the argument if it was present. +Prints \[cq]To Whom It May Concern:\[cq] or the argument if it was present. The salutation is printed two lines below the inside address. See also string variable .BR LetSA . T} SJ@T{ Subject line. -Prints the argument as subject prefixed with `SUBJECT:' +Prints the argument as subject prefixed with \[oq]SUBJECT:\[cq] two lines below the inside address, -except in letter type `SP', +except in letter type \[oq]SP\[cq], where the subject is printed in all-capital without any prefix. See also string variable .BR LetSJ . @@ -1830,39 +2080,50 @@ .TP .BI MC\ "column-size \fR[\fPcolumn-separation\fR]\fP" Begin multiple columns. +. Return to normal with .BR 1C . +. .B MC creates as many columns as the current line length permits. +. .I column-size is the width of each column, and .I column-separation is the space between two columns. +. Default separation is .IR column-size /15. +. See also .BR 1C . . .TP .BI ML\ "mark \fR[\fPtext-indent\ " \fR[\fP1\fR]]\fP Marked list start. +. The .I mark argument is printed before each list item. +. .I text-indent sets the indent and overrides .BR Li . +. A third argument prohibits printing of a blank line before each item. . .TP .BI MT\ "\fR[\fParg \fR[\fPaddressee\fR]]\fP" Memorandum type. +. The argument .I arg -is part of a filename in `@TMAC_MDIR@/*.MT'. -Memorandum types 0 to\~5 are supported, -including type `string' (which gets internally mapped to type\~6). +is part of a filename in \[oq]@TMAC_MDIR@/*.MT\[cq]. +. +Memorandum types 0 to\~5 are supported, including type +\[oq]string\[cq] (which gets internally mapped to type\~6). +. .I addressee just sets a variable, used in the AT&T macros. . @@ -1875,9 +2136,9 @@ tab(@); l l. 0@Normal memorandum, no type printed. -1@Memorandum with `MEMORANDUM FOR FILE' printed. -2@Memorandum with `PROGRAMMER'S NOTES' printed. -3@Memorandum with `ENGINEER'S NOTES' printed. +1@Memorandum with \[oq]MEMORANDUM FOR FILE\[cq] printed. +2@Memorandum with \[oq]PROGRAMMER\[aq]S NOTES\[cq] printed. +3@Memorandum with \[oq]ENGINEER\[aq]S NOTES\[cq] printed. 4@Released paper style. 5@External letter style. .TE @@ -1892,9 +2153,12 @@ .BI MOVE\ "y-pos \fR[\fPx-pos \fR[\fPline-length\fR]]\fP" Move to a position, setting page offset to .IR x-pos . +. If .I line-length -is not given, the difference between current and new page offset is used. +is not given, the difference between current and new page offset is +used. +. Use .B PGFORM without arguments to return to normal. @@ -1902,24 +2166,29 @@ .TP .BI MULB\ "cw1 space1 \fR[\fPcw2 space2 \fR[\fPcw3 \fR.\|.\|.]]\fP" Begin a special multi-column mode. +. All columns widths must be specified. +. The space between the columns must be specified also. +. The last column does not need any space definition. +. .B MULB -starts a diversion, -and +starts a diversion, and .B MULE ends the diversion and prints the columns. -The unit for the width and space arguments is `n', -but +. +The unit for the width and space arguments is \[oq]n\[cq], but .B MULB -accepts all normal unit specifications like `c' and `i'. +accepts all normal unit specifications like \[oq]c\[cq] and \[oq]i\[cq]. +. .B MULB operates in a separate environment. . .TP .B MULN Begin the next column. +. This is the only way to switch the column. . .TP @@ -1929,13 +2198,15 @@ .TP .BI nP\ \fR[\fPtype\fR]\fP Print numbered paragraph with header level two. +. See .BR .P . . .TP .B NCOL Force printing to the next column. -Don't use this together with the +. +Don\[aq]t use this together with the .B MUL* macros, see .BR 2C . @@ -1943,11 +2214,15 @@ .TP .BI NS\ \fR[\fParg\ \fR[\fP1\fR]]\fP Print different types of notations. +. The argument selects between the predefined type of notations. -If the second argument is available, +. +If the second argument is available, then the argument becomes the entire notation. -If the argument doesn't select a predefined type, -it is printed as `Copy (\fIarg\fP) to'. +. +If the argument doesn\[aq]t select a predefined type, +it is printed as \[oq]Copy (\fIarg\/\fP) to\[cq]. +. It is possible to add more standard notations, see the string variables .B Letns @@ -1960,7 +2235,7 @@ tab(@); l l. \fBArg@Notation\fP -\fInone\fP@Copy To +\fInone\/\fP@Copy To \[dq]\[dq]@Copy To 1@Copy To (with att.\&) to 2@Copy To (without att.\&) to @@ -1982,7 +2257,9 @@ .TP .BI ND\ new-date New date. +. Overrides the current date. +. Date is not printed if .I new-date is an empty string. @@ -1990,6 +2267,7 @@ .TP .BI OF\ \fR[\fParg\fR]\fP Odd-page footer, a line printed just above the normal footer. +. See .B EF and @@ -2002,6 +2280,7 @@ .TP .BI OH\ \fR[\fParg\fR]\fP Odd-page header, a line printed just below the normal header. +. See .B EH and @@ -2013,19 +2292,23 @@ . .TP .B OP -Make sure that the following text is printed at the top -of an odd-numbered page. +Make sure that the following text is printed at the top of an +odd-numbered page. +. Does not output an empty page if currently at the top of an odd page. . .TP .BI P\ \fR[\fPtype\fR]\fP Begin new paragraph. +. .B P\c -\~without argument produces left-justified text, +\~without argument produces left\-justified text, even the first line of the paragraph. +. This is the same as setting .I type to\~0. +. If the argument is\~1, the first line of text following\~\c .B P @@ -2038,11 +2321,12 @@ .B P it is possible to set the paragraph type in number register .BR Pt . +. Using 0 and\~1 is the same as adding that value to .BR P . -A value of\~2 indents all paragraphs, -except after headings, lists, and displays -(this value can't be used as an argument to +. +A value of\~2 indents all paragraphs, except after headings, lists, +and displays (this value can\[aq]t be used as an argument to .B P itself). . @@ -2054,35 +2338,46 @@ .TP .BI PGFORM\ "\fR[\fPlinelength \fR[\fPpagelength \fR[\fPpageoffset\ " \fR[\fP1\fR]]]]\fP Set line length, page length, and/or page offset. +. This macro can be used for special formatting, like letter heads and other. +. It is normally the first command in a file, though it is not necessary. +. .B PGFORM can be used without arguments to reset everything after a .B MOVE call. +. A line break is done unless the fourth argument is given. +. This can be used to avoid the page number on the first page while setting new width and length. -(It seems as if this macro sometimes doesn't work too well. +. +(It seems as if this macro sometimes doesn\[aq]t work too well. +. Use the command line arguments to change line length, page length, and page offset instead.) . .TP .B PGNH No header is printed on the next page. +. Used to get rid of the header in letters or other special texts. +. This macro must be used before any text to inhibit the page header on the first page. . .TP -.BI "PIC \fR[\fP\-L\fR] [\fP\-C\fR] [\fP\-R\fR] [\fP\-I\ " "n\fR]\fP filename \fR[\fPwidth \fR[\fPheight\fR]]\fP" +.BI "PIC \fR[\fP\-B\fR] [\fP\-L\fR] [\fP\-C\fR] [\fP\-R\fR] [\fP\-I\ " "n\fR]\fP filename \fR[\fPwidth \fR[\fPheight\fR]]\fP" Include a PostScript file in the document. +. The macro depends on .BR mmroff (@MAN1EXT@) and .BR INITR . +. The arguments .BR \-L , .BR \-C , @@ -2090,6 +2385,13 @@ and .BI \-I\ n adjust the picture or indent it. +. +With no flag the picture is adjusted to the left. +. +Adding +.B \-B +draws a box around the picture. +. The optional .I width and @@ -2099,6 +2401,7 @@ .TP .B PE Picture end. +. Ends a picture for .BR @g@pic (@MAN1EXT). . @@ -2107,7 +2410,9 @@ Page footer. .B PF sets the line to be printed at the bottom of each page. +. Empty by default. +. See .B PH for the argument specification. @@ -2118,8 +2423,8 @@ . .TP .BI PH\ \fR[\fParg\fR]\fP -Page header, -a line printed at the top of each page. +Page header, a line printed at the top of each page. +. The argument should be specified as . .RS @@ -2130,13 +2435,15 @@ .IP where .IR left-part , -.IR center-part, +.IR center-part , and .I right-part are printed left-justified, centered, and right justified, respectively. +. Within the argument to .BR PH , -the character `%' is changed to the current page number. +the character \[oq]%\[cq] is changed to the current page number. +. The default argument is . .RS @@ -2154,12 +2461,14 @@ .TP .B PS Picture start (from pic). +. Begins a picture for .BR @g@pic (@MAN1EXT@). . .TP .B PX Page header user-defined exit. +. This macro is called just after the printing of the page header in .I no-space mode. @@ -2167,27 +2476,33 @@ .TP .B R Roman. +. Return to roman font, see also\~\c .BR I . . .TP .BI RB\ "\fR[\fProman-text \fR[\fPbold-text \fR[\fProman-text \fR[.\|.\|.]]]]\fP" Roman-bold. -Even arguments are printed in roman, -odd in boldface. +. +Even arguments are printed in roman, odd in boldface. +. See\~\c .BR I . . .TP .BI RD\ "\fR[\fPprompt \fR[\fPdiversion \fR[\fPstring\fR]]]\fP" Read from standard input to diversion and/or string. +. The text is saved in a diversion named .IR diversion . +. Recall the text by writing the name of the diversion after a dot on an empty line. +. A string is also defined if .I string is given. +. .I Diversion and/or .I prompt @@ -2196,32 +2511,40 @@ .TP .B RF Reference end. +. Ends a reference definition and returns to normal processing. +. See .BR RS . . .TP .BI RI\ "\fR[\fProman-text \fR[\fPitalic-text \fR[\fProman-text \fR[.\|.\|.]]]]\fP" Print even arguments in roman, odd in italic. +. See\~\c .BR I . . .TP .BI RL\ \fR[\fPtext-indent \fR[\fP1\fR]]\fP Reference list start. +. Begins a list where each item is preceded with an automatically incremented number between square brackets. +. .I text-indent changes the default indentation. . .TP .BI RP\ "\fR[\fParg1 \fR[\fParg2\fR]]\fP" Produce reference page. +. This macro can be used if a reference page is wanted somewhere in the document. +. It is not needed if .B TC is used to produce a table of contents. +. The reference page is then printed automatically. . .IP @@ -2252,6 +2575,7 @@ . .IP The reference items are separated by a blank line. +. Setting number register .B Ls to\~0 suppresses the line. @@ -2259,7 +2583,9 @@ .IP The string .B Rp -contains the reference page title and is set to `REFERENCES' by default. +contains the reference page title and is set to \[oq]REFERENCES\[cq] +by default. +. The number register .B Rpe holds the default value for the second argument of @@ -2269,17 +2595,21 @@ .TP .BI RS\ \fR[\fPstring-name\fR]\fP Begin an automatically numbered reference definition. +. Put the string .B \[rs]*(Rf where the reference mark should be and write the reference between .BR RS / RF at next new line after the reference mark. +. The reference number is stored in number register .BR :R . +. If .I string-name -is given, -a string with that name is defined and contains the current reference mark. +is given, a string with that name is defined and contains the current +reference mark. +. The string can be referenced as .BI \[rs]*[ string-name ] later in the text. @@ -2287,58 +2617,72 @@ .TP .BI S\ "\fR[\fPsize \fR[\fPspacing\fR]]\fP" Set point size and vertical spacing. -If any argument is equal to `P', -the previous value is used. -A `C' means current value, -and `D' the default value. -If `+' or `\-' is used before the value, +. +If any argument is equal to \[oq]P\[cq], the previous value is used. +. +A \[oq]C\[cq] means current value, and \[oq]D\[cq] the default value. +. +If \[oq]+\[cq] or \[oq]\-\[cq] is used before the value, the current value is incremented or decremented, respectively. . .TP .BI SA\ \fR[\fParg\fR]\fP Set right-margin justification. +. Justification is turned on by default. -No argument or value `0' turns off justification, -and `1' turns on justification. +. +No argument or value \[oq]0\[cq] turns off justification, +and \[oq]1\[cq] turns on justification. . .TP .BI SETR\ "refname \fR[\fPstring\fR]\fP" Remember the current header and page number as .IR refname . +. Saves .I string if .I string is defined. +. .I string is retrieved with .BR .GETST . +. See .BR INITR . . .TP .BI SG\ \fR[\fParg\ \fR[\fP1\fR]]\fP Signature line. +. Prints the authors name(s) after the formal closing. -The argument is appended to the reference data, -printed at either the first or last author. -The reference data is the location, -department, and initials specified with +. +The argument is appended to the reference data, printed at either the +first or last author. +. +The reference data is the location, department, and initials specified +with .BR .AU . +. It is printed at the first author if the second argument is given, otherwise at the last. +. No reference data is printed if the author(s) is specified through .BR .WA / .WE . +. See section .BR INTERNALS . . .TP .BI SK\ \fR[\fPpages\fR]\fP Skip pages. +. If .I pages -is\~0 or omitted, -a skip to the next page occurs unless it is already at the top of a page. +is\~0 or omitted, a skip to the next page occurs unless it is already +at the top of a page. +. Otherwise it skips .I pages pages. @@ -2346,6 +2690,7 @@ .TP .BI SM\ "string1 \fR[\fPstring2 \fR[\fPstring3\fR]]\fP" Make a string smaller. +. If .I string2 is given, @@ -2355,24 +2700,26 @@ stays at normal size, concatenated with .IR string1 . -With three arguments, -everything is concatenated, -but only +. +With three arguments, everything is concatenated, but only .I string2 is made smaller. . .TP .BI SP\ \fR[\fPlines\fR]\fP Space vertically. +. .I lines -can have any scaling factor, -like `3i' or `8v'. +can have any scaling factor, like \[oq]3i\[cq] or \[oq]8v\[cq]. +. Several .B SP calls in a line only produces the maximum number of lines, not the sum. +. .B SP is ignored also until the first text line in a page. -Add +. +Add .B \[rs]& before a call to .B SP @@ -2381,28 +2728,33 @@ .TP .B TAB Reset tabs to every\ 5n. +. Normally used to reset any previous tab positions. . .TP .BI TB\ "\fR[\fPtitle \fR[\fPoverride \fR[\fPflag \fR[\fPrefname\fR]]]]\fP" Table title. +. The arguments are the same as for .BR EC . +. .B TB uses the number register .B Tb as a counter. +. The string .B Lt controls the title of the List of Tables; -default value is `LIST OF TABLES'. +default value is \[oq]LIST OF TABLES\[cq]. +. The List of Tables is only printed if number register .B Lt is\~1, which is the default. +. The string .B Litb -contains the word `TABLE', -which is printed before the number. +contains the word \[oq]TABLE\[cq], which is printed before the number. . .IP Special handling of the title occurs if @@ -2415,35 +2767,40 @@ .TP .BI TC\ "\fR[\fPslevel \fR[\fPspacing \fR[\fPtlevel \fR[\fPtab \fR[\fPh1 \fR[\fPh2 \fR[\fPh3 \fR[\fPh4 \fR[\fPh5\fR]]]]]]]]]\fP" Table of contents. +. This macro is normally used as the last line of the document. +. It generates a table of contents with headings up to the level controlled by number register .BR Cl . +. Note that .B Cl -controls the saving of headings, -it has nothing to do with +controls the saving of headings, it has nothing to do with .BR TC . +. Headings with a level less than or equal to .I slevel get .I spacing number of lines before them. +. Headings with a level less than or equal to .I tlevel -have their page numbers right-justified with dots or spaces separating +have their page numbers right\-justified with dots or spaces separating the text and the page number. +. Spaces are used if .I tab -is greater than zero, -dots otherwise. -Other headings have the page number directly at the end -of the heading text +is greater than zero, dots otherwise. +. +Other headings have the page number directly at the end of the heading +text .RI ( ragged-right ). . .IP -The rest of the arguments is printed, centered, before the -table of contents. +The rest of the arguments is printed, centered, before the table of +contents. . .IP The user-defined macros @@ -2453,11 +2810,12 @@ are used if .B TC is called with at most four arguments. +. .B TX -is called before the printing of the string `CONTENTS', +is called before the printing of the string \[oq]CONTENTS\[cq], and .B TY -is called instead of printing `CONTENTS'. +is called instead of printing \[oq]CONTENTS\[cq]. . .IP Equivalent macros can be defined for list of figures, tables, equations @@ -2467,12 +2825,14 @@ .BI TY xx\fR,\fP where .I xx -is `Fg', `TB', `EC', or `EX', respectively. +is \[oq]Fg\[cq], \[oq]TB\[cq], \[oq]EC\[cq], or \[oq]EX\[cq], +respectively. . .IP String .B Ci can be set to control the indentations for each heading-level. +. It must be scaled, like . .RS @@ -2481,44 +2841,51 @@ .RE . .IP -By default, -the indentation is controlled by the maximum length of headings in each -level. +By default, the indentation is controlled by the maximum length of +headings in each level. . .IP -The string variables +The string variables .BR Lifg , .BR Litb , .BR Liex , .BR Liec , and .B Licon -contain `Figure', `TABLE', `Exhibit', `Equation', -and `CONTENTS', respectively. +contain \[oq]Figure\[cq], \[oq]TABLE\[cq], \[oq]Exhibit\[cq], +\[oq]Equation\[cq], and \[oq]CONTENTS\[cq], respectively. +. These can be redefined to other languages. . .TP .B TE Table end. +. See .BR TS . . .TP .B TH \fR[\fPN\fR]\fP Table header. +. See .BR TS . +. .B TH ends the header of the table. +. This header is printed again if a page break occurs. -Argument `N' isn't implemented yet. +. +Argument \[oq]N\[cq] isn\[aq]t implemented yet. . .TP .BI TL\ "\fR[\fPcharging-case-number \fR[\fPfiling-case-number\fR]]\fP" Begin title of memorandum. +. All text up to the next .B AU is included in the title. +. .I charging-case-number and .I filing-case-number @@ -2528,15 +2895,21 @@ .BI TM\ "\fR[\fPnum1 \fR[\fPnum2 \fR[.\|.\|.]]]\fP" Technical memorandum numbers used in .BR .MT . +. An unlimited number of arguments may be given. . .TP .B TP Top-of-page user-defined macro. +. This macro is called instead of the normal page header. +. It is possible to get complete control over the header. +. Note that the header and the footer are printed in a separate environment. +. Line length is preserved, though. +. See .BR EOP . . @@ -2555,43 +2928,57 @@ .TP .B TS \fR[\fPH\fR]\fP Table start. +. This is the start of a table specification to .BR @g@tbl (@MAN1EXT@). +. .B TS ends with .BR TE . -Argument `H' tells +. +Argument \[oq]H\[cq] tells .B m@TMAC_M_PREFIX@m that the table has a header. +. See .BR TH . . .TP .B TX User-defined table of contents exit. +. This macro is called just before .B TC -prints the word `CONTENTS'. +prints the word \[oq]CONTENTS\[cq]. +. See .BR TC . . .TP .B TY User-defined table of contents exit. -This macro is called instead of printing `CONTENTS'. +. +This macro is called instead of printing \[oq]CONTENTS\[cq]. +. See .BR TC . . .TP .BI VERBON\ "\fR[\fPflag \fR[\fPpoint-size \fR[\fPfont\fR]]]\fP" Begin verbatim output using Courier font. +. Usually for printing programs. +. All characters have equal width. +. The point size can be changed with the second argument. -By specifying a third argument it is possible to use another -font instead of Courier. +. +By specifying a third argument it is possible to use another font +instead of Courier. +. .I flag controls several special features. +. Its value is the sum of all wanted features. . .RS @@ -2616,10 +3003,11 @@ .BR troff (@MAN1EXT@) command .BR .nm , -normally `1'. +normally \[oq]1\[cq]. T} 16@T{ -Indent the verbose text by `5n'. +Indent the verbose text by \[oq]5n\[cq]. +. This is controlled by the number-variable .B Verbin (in units). @@ -2634,35 +3022,40 @@ .TP .BI VL\ "text-indent \fR[\fPmark-indent\ " \fR[\fP1\fR]]\fP Variable-item list. -It has no fixed mark, -it assumes that every +. +It has no fixed mark, it assumes that every .B LI has a mark instead. +. .I text-indent -sets the indent to the text, -and +sets the indent to the text, and .I mark-indent the distance from the current indentation to the mark. +. A third argument prohibits printing of a blank line before each item. . .TP .BI "VM \fR[\fP\-T\fR] [\fP" "top \fR[\fPbottom\fR]]\fP" Vertical margin. +. Increase the top and bottom margin by .I top and .IR bottom , respectively. +. If option .B \-T is specified, set those margins to .I top and .IR bottom . -If no argument is given, reset the margin to zero, -or to the default (`7v 5v') if +. +If no argument is given, reset the margin to zero, or to the default +(\[oq]7v 5v\[cq]) if .B \-T is used. +. It is highly recommended that macros .B TP and/or @@ -2673,11 +3066,11 @@ . .TP .BI WA\ "\fR[\fPwriter-name \fR[\fPtitle\fR]]\fP" -Begin specification of the writer and writer's address. +Begin specification of the writer and writer\[aq]s address. +. Several names can be specified with empty .BR WA / WE -pairs, -but only one address. +pairs, but only one address. . .TP .B WE @@ -2727,11 +3120,13 @@ .RE . . +.\" -------------------------------------------------------------------- .SS "Strings used in m@TMAC_M_PREFIX@m" +.\" -------------------------------------------------------------------- . .TP .B App -A string containing the word `APPENDIX'. +A string containing the word \[oq]APPENDIX\[cq]. . .TP .B Apptxt @@ -2748,109 +3143,113 @@ and .B .HU to the current heading text. +. Also updated in table of contents & friends. . .TP .B HF -Font list for headings, `2 2 2 2 2 2 2' by default. +Font list for headings, \[oq]2 2 2 2 2 2 2\[cq] by default. +. Non-numeric font names may also be used. . .TP .B HP Point size list for headings. -By default, this is `0 0 0 0 0 0 0' which is the same as -`10 10 10 10 10 10 10'. +. +By default, this is \[cq]0 0 0 0 0 0 0\[cq] which is the same as \[oq]10 +10 10 10 10 10 10\[cq]. . .TP .B Index -Contains the string `INDEX'. +Contains the string \[oq]INDEX\[cq]. . .TP .B Indcmd Contains the index command. -Default value is `sort\ \-t\[rs]t'. +. +Default value is \[oq]sort\ \-t\[rs]t\[cq]. . .TP .B Lifg -String containing `Figure'. +String containing \[oq]Figure\[cq]. . .TP .B Litb -String containing `TABLE'. +String containing \[oq]TABLE\[cq]. . .TP .B Liex -String containing `Exhibit'. +String containing \[oq]Exhibit\[cq]. . .TP .B Liec -String containing `Equation'. +String containing \[oq]Equation\[cq]. . .TP .B Licon -String containing `CONTENTS'. +String containing \[oq]CONTENTS\[cq]. . .TP .B Lf -Contains the string `LIST OF FIGURES'. +Contains the string \[oq]LIST OF FIGURES\[cq]. . .TP .B Lt -Contains the string `LIST OF TABLES'. +Contains the string \[oq]LIST OF TABLES\[cq]. . .TP .B Lx -Contains the string `LIST OF EXHIBITS'. +Contains the string \[oq]LIST OF EXHIBITS\[cq]. . .TP .B Le -Contains the string `LIST OF EQUATIONS'. +Contains the string \[oq]LIST OF EQUATIONS\[cq]. . .TP .B Letfc -Contains the string `Yours very truly,', +Contains the string \[oq]Yours very truly,\[cq], used in .BR .FC . . .TP .B Letapp -Contains the string `APPROVED:', +Contains the string \[oq]APPROVED:\[cq], used in .BR .AV . . .TP .B Letdate -Contains the string `Date', +Contains the string \[oq]Date\[cq], used in .BR .AV . . .TP .B LetCN -Contains the string `CONFIDENTIAL', +Contains the string \[oq]CONFIDENTIAL\[cq], used in .BR ".LO CN" . . .TP .B LetSA -Contains the string `To Whom It May Concern:', +Contains the string \[oq]To Whom It May Concern:\[cq], used in .BR ".LO SA" . . .TP .B LetAT -Contains the string `ATTENTION:', +Contains the string \[oq]ATTENTION:\[cq], used in .BR ".LO AT" . . .TP .B LetSJ -Contains the string `SUBJECT:', +Contains the string \[oq]SUBJECT:\[cq], used in .BR ".LO SJ" . . .TP .B LetRN -Contains the string `In reference to:', +Contains the string \[oq]In reference to:\[cq], used in .BR ".LO RN" . . @@ -2858,17 +3257,19 @@ .B Letns is an array containing the different strings used in .BR .NS . +. It is really a number of string variables prefixed with .BR Letns! . -If the argument doesn't exist, -it is included between +. +If the argument doesn\[aq]t exist, it is included between .B () with .B Letns!copy as a prefix and .B Letns!to as a suffix. -Observe the space after `Copy' and before `to'. +. +Observe the space after \[oq]Copy\[cq] and before \[oq]to\[cq]. . .RS .IP @@ -2901,26 +3302,31 @@ .B Letnsdef Define the standard notation used when no argument is given to .BR .NS . +. Default is\~0. . .TP -.B "MO1 - MO12" -Strings containing the month names `January' through `December'. +.B "MO1 \(en MO12" +Strings containing the month names \[oq]January\[cq] through +\[oq]December\[cq]. . .TP .B Qrf -String containing `See chapter \[rs]\[rs]*[Qrfh], page \[rs]\[rs]n[Qrfp].'. +String containing \[oq]See chapter \[rs]\[rs]*[Qrfh], page +\[rs]\[rs]n[Qrfp].\[cq]. . .TP .B Rp -Contains the string `REFERENCES'. +Contains the string \[oq]REFERENCES\[cq]. . .TP .B Tcst -Contains the current status of the table of contents and list of figures, -etc. +Contains the current status of the table of contents and list of +figures, etc. +. Empty outside of .BR .TC . +. Useful in user-defined macros like .BR .TP . . @@ -2942,7 +3348,7 @@ . .TP .B Tm -Contains the string `\[rs](tm', the trade mark symbol. +Contains the string \[oq]\[rs](tm\[cq], the trade mark symbol. . .TP .B Verbnm @@ -2951,25 +3357,32 @@ in the .B .VERBON command. +. Default is\~1. . . +.\" -------------------------------------------------------------------- .SS "Number variables used in m@TMAC_M_PREFIX@m" +.\" -------------------------------------------------------------------- . .TP .B Aph Print an appendix page for every new appendix if this number variable is non-zero. +. No output occurs if .B Aph -is zero, but there is always an appendix entry in the `List of contents'. +is zero, but there is always an appendix entry in the \[oq]List of +contents\[cq]. . .TP .B Cl Contents level (in the range 0 to 14). +. The contents is saved if a heading level is lower than or equal to the value of .BR Cl . +. Default is\~2. . .TP @@ -2977,23 +3390,31 @@ Eject page between list of table, list of figure, etc., if the value of .B Cp is zero. +. Default is\~0. . .TP .B D Debug flag. -Values greater than zero produce debug information of increasing verbosity. +. +Values greater than zero produce debug information of increasing +verbosity. +. A value of\~1 gives information about the progress of formatting. +. Default is\~0. . .TP .B De If set to\~1, eject after floating display is output. +. Default is\~0. . .TP .B Dsp -If defined, it controls the space output before and after static displays. +If defined, it controls the space output before and after static +displays. +. Otherwise the value of .B Lsp is used. @@ -3001,7 +3422,9 @@ .TP .B Df Control floating keep output. +. This is a number in the range 0 to 5, with a default value of\~5. +. See .BR .DF . . @@ -3010,32 +3433,37 @@ If set to\~1, use the amount of space stored in register .B Lsp before and after display. +. Default is\~1. . .TP .B Ej If set to\~1, eject page before each first-level heading. +. Default is\~0. . .TP .B Eq -Equation labels are left-adjusted if set to\~0 -and right-adjusted if set to\~1. +Equation labels are left-adjusted if set to\~0 and right-adjusted if +set to\~1. +. Default is\~0. . .TP .B Fs Footnote spacing. +. Default is\~1. . .TP -.B "H1 - H7" +.B "H1 \(en H7" Heading counters . .TP .B H1dot -Append a dot after the level-one heading number if value is greater than -zero. +Append a dot after the level-one heading number if value is greater +than zero. +. Default is\~1. . .TP @@ -3043,29 +3471,32 @@ A copy of number register .BR H1 , but it is incremented just before the page break. +. Useful in user-defined header macros. . .TP .B Hb Heading break level. -A number in the range 0 to 14, -with a default value of\~2. +. +A number in the range 0 to 14, with a default value of\~2. +. See\~\c .BR .H . . .TP .B Hc Heading centering level. -A number in the range 0 to 14, -with a default value value of\~0. +. +A number in the range 0 to 14, with a default value value of\~0. +. See\~\c .BR .H . . .TP .B Hi Heading temporary indent. -A number in the range 0 to 2, -with a default value of\~1. +. +A number in the range 0 to 2, with a default value of\~1. . .RS .IP @@ -3075,7 +3506,7 @@ 0@no indentation, left margin 1@T{ indent to the right, similar to -.RB ` ".P 1" ' +.RB \[oq] ".P 1" \[cq] T} 2@T{ indent to line up with text part of preceding heading @@ -3086,10 +3517,13 @@ .TP .B Hps Heading pre-space level. +. If the heading level is less than or equal to .BR Hps , two lines precede the section heading instead of one. +. Default is first level only. +. The real amount of lines is controlled by the variables .B Hps1 and @@ -3101,6 +3535,7 @@ .B .H if the heading level is greater than .BR Hps . +. Value is in units, default is 0.5. . .TP @@ -3109,13 +3544,15 @@ .B .H if the heading level is less than or equal to .BR Hps . +. Value is in units, default is\~1. . .TP .B Hs Heading space level. -A number in the range 0 to 14, -with a default value of\~2. +. +A number in the range 0 to 14, with a default value of\~2. +. See\~\c .BR .H . . @@ -3125,6 +3562,7 @@ .B .H if the heading level is less than or equal to .BR Hs . +. Value is in units, default is\~1. . .TP @@ -3146,6 +3584,7 @@ .TP .B Hu Unnumbered heading level. +. Default is\~2. . .TP @@ -3155,7 +3594,7 @@ .RS .IP .TS -tab(@); +7tab(@); l l. 0@no hyphenation 1@hyphenation on, set to value\~14 @@ -3167,8 +3606,9 @@ . .TP .B Iso -Set this variable to\~1 on the command line to get an -ISO-formatted date string (\fB\-rIso=1\fP). +Set this variable to\~1 on the command line to get an ISO-formatted +date string (\fB\-rIso=1\fP). +. Useless inside of a document. . .TP @@ -3179,18 +3619,22 @@ .B Letwam Maximum lines in return-address, used in .BR .WA / .WE . +. Default is\~14. . .TP .BR Lf ,\ Lt ,\ Lx ,\ Le Enable (1) or disable (0) the printing of List of figures, +. List of tables, List of exhibits and List of equations, respectively. +. Default values are Lf=1, Lt=1, Lx=1, and Le=0. . .TP .B Li List indentation, used by .BR .AL . +. Default is\~6. . .TP @@ -3212,14 +3656,17 @@ .TP .B Ls List space threshold. +. If current list level is greater than .B Ls no spacing occurs around lists. +. Default is\~99. . .TP .B Lsp The vertical space used by an empty line. +. The default is 0.5v in troff mode and 1v in nroff mode. . .TP @@ -3236,16 +3683,17 @@ header replaces footer on first page, header is empty. T} 2@page header is removed on the first page. -3@`section-page' numbering style enabled. +3@\[oq]section-page\[cq] numbering style enabled. 4@page header is removed on the first page. 5@T{ -`section-page' and `section-figure' numbering style enabled. +\[oq]section-page\[cq] and \[oq]section-figure\[cq] numbering style enabled. T} .TE .RE . .IP Default is\~0. +. See also the number registers .B Sectf and @@ -3291,18 +3739,20 @@ . .TP .B P -Current page-number, normally the same as `%' unless -`section-page' numbering style is enabled. +Current page-number, normally the same as \[oq]%\[cq] unless +\[oq]section-page\[cq] numbering style is enabled. . .TP .B Pi Paragraph indentation. +. Default is\~5. . .TP .B Pgps A flag to control whether header and footer point size should follow -the current settings or just change when the header and footer are defined. +the current settings or just change when the header and footer are +defined. . .RS .IP @@ -3361,31 +3811,38 @@ .B Rpe Set default value for second argument of .BR .RP . +. Default is\~0. . .TP .B Sectf -A flag controlling `section-figures' numbering style. +A flag controlling \[oq]section-figures\[cq] numbering style. +. A non-zero value enables this. +. See also register\~\c .BR N . . .TP .B Sectp -A flag controlling `section-page' numbering style. +A flag controlling \[cq]section-page\[cq] numbering style. +. A non-zero value enables this. +. See also register\~\c .BR N . . .TP .B Si Display indentation. +. Default is\~5. . .TP .B Verbin Indentation for .BR .VERBON . +. Default is 5n. . .TP @@ -3397,32 +3854,39 @@ Always\~1. . . +.\" -------------------------------------------------------------------- .SH INTERNALS +.\" -------------------------------------------------------------------- +. +The letter macros are using different submacros depending on the +letter type. +. +The name of the submacro has the letter type as suffix. +. +It is therefore possible to define other letter types, either in the +national macro-file, or as local additions. . -The letter macros are using different submacros depending on -the letter type. -The name of the submacro has the letter type -as suffix. -It is therefore possible to define other letter types, -either in the national macro-file, or as local additions. .B .LT sets the number variables .B Pt and .B Pi to 0 and\~5, respectively. +. The following strings and macros must be defined for a new letter type. . .TP .BI let@init_ type This macro is called directly by .BR .LT . +. It is supposed to initialize variables and other stuff. . .TP .BI let@head_ type This macro prints the letter head, and is called instead of the normal page header. +. It is supposed to remove the alias .BR let@header , otherwise it is called for all pages. @@ -3432,16 +3896,18 @@ .B .SG is calling this macro only for letters; memorandums have its own processing. +. .I name and .I title are specified through .BR .WA / .WB . +. .I n\c -\~is the counter, 1-max, -and +\~is the counter, 1-max, and .I flag is true for the last name. +. Any other argument to .B .SG is appended. @@ -3452,28 +3918,30 @@ .BR .FC , and has the formal closing as the argument. . +. .LP .B .LO is implemented as a general option-macro. +. It demands that a string named .BI Let type is defined, where .I type is the letter type. +. .B .LO then assigns the argument to the string variable .BI let*lo- type\fR.\fP . . +.\" -------------------------------------------------------------------- .\".SH BUGS +.\" -------------------------------------------------------------------- . . -.SH AUTHOR -. -Jörgen Hägg, Lund, Sweden . -. -. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .TP .B @MACRODIR@/@TMAC_M_PREFIX@m.tmac @@ -3485,7 +3953,10 @@ .B @TMAC_MDIR@/locale . . +.na +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- . .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), @@ -3495,6 +3966,17 @@ .br .BR groff_mmse (@MAN7EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHOR +.\" -------------------------------------------------------------------- +.au +. +. .\" Local Variables: .\" mode: nroff .\" coding: latin-1 diff -ruN groff-1.22.2/contrib/mm/groff_mmse.man groff-1.22.3/contrib/mm/groff_mmse.man --- groff-1.22.2/contrib/mm/groff_mmse.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/groff_mmse.man 2014-11-04 09:38:35.487520722 +0100 @@ -1,6 +1,11 @@ +.TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +.SH NAMN +groff_mmse \- svenska mm makro för groff +. +. .ig -Copyright (C) 1989, 1990, 2000, 2001, 2006, 2009 - Free Software Foundation, Inc. +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -24,15 +29,10 @@ . .mso sv.tmac . -.TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAMN -. -groff_mmse \- svenska mm makro för groff -. . +.\" -------------------------------------------------------------------- .SH SYNTAX +.\" -------------------------------------------------------------------- . .B groff .B \-m@TMAC_M_PREFIX@mse @@ -44,14 +44,16 @@ ] . . +.\" -------------------------------------------------------------------- .SH BESKRIVNING +.\" -------------------------------------------------------------------- . .B m@TMAC_M_PREFIX@mse är en svensk variant av .BR m@TMAC_M_PREFIX@m . Alla texter är översatta. En A4 sida får text som är 13\~cm bred, -3.5\~cm indragning samt är 28.5\~cm hög. +3,5\~cm indragning samt är 28,5\~cm hög. Det finns stöd för brevuppställning enligt svensk standard för vänster och högerjusterad text. . @@ -66,7 +68,9 @@ för övriga detaljer. . . +.\" -------------------------------------------------------------------- .SH BREV +.\" -------------------------------------------------------------------- . Tillgängliga brevtyper: . @@ -123,12 +127,16 @@ Där lägger man lämpligen in postadress och annat som brevfot. . . +.\" -------------------------------------------------------------------- .SH "SKRIVET AV" +.\" -------------------------------------------------------------------- . Jörgen Hägg, Lund, Sweden . . +.\" -------------------------------------------------------------------- .SH FILER +.\" -------------------------------------------------------------------- . .TP .B @MACRODIR@/@TMAC_M_PREFIX@mse.tmac @@ -136,7 +144,10 @@ .B @TMAC_MDIR@/se_*.cov . . +.na +.\" -------------------------------------------------------------------- .SH "SE OCKSÅ" +.\" -------------------------------------------------------------------- . .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), diff -ruN groff-1.22.2/contrib/mm/Makefile.sim groff-1.22.3/contrib/mm/Makefile.sim --- groff-1.22.2/contrib/mm/Makefile.sim 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/Makefile.sim 2014-11-04 09:38:35.488520709 +0100 @@ -1,17 +1,17 @@ -# Copyright 1991, 1993, 2000, 2001, 2009 -# +# Copyright 1991-2014 Free S0ftware 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 . # @@ -44,39 +44,44 @@ all: - install: groff_mm.n groff_mmse.n $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \ - INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install + INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install uninstall: groff_mm.n groff_mmse.n $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \ - INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub - + INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub .man.n: @echo Making $@ from $< - @-rm -f $@ + @rm -f $@ @sed -e "s|@HYPHENFILE@|$(hyphenfile)|g" \ - -e "s|@FONTDIR@|$(fontdir)|g" \ - -e "s|@FONTPATH@|$(fontpath)|g" \ - -e "s|@MACRODIR@|$(tmacdir)|g" \ - -e "s|@MACROPATH@|$(tmacpath)|g" \ - -e "s|@DEVICE@|$(DEVICE)|g" \ - -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ - -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ - -e "s|@INDEX_SUFFIX@|$(indexext)|g" \ - -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \ - -e "s|@MAN1EXT@|$(man1ext)|g" \ - -e "s|@MAN5EXT@|$(man5ext)|g" \ - -e "s|@MAN7EXT@|$(man7ext)|g" \ - -e "s|@TMAC_S@|$(tmac_s)|g" \ - -e "s|@TMAC_M@|$(tmac_m)|g" \ - -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \ - -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \ - -e "s|@VERSION@|$(version)|g" \ - -e "s|@MDATE@|$(mdate)|g" \ - -e "s|@g@|$(g)|g" \ - -e "s!@G@;`echo $(g) | tr [a-z] [A-Z]`!g" \ - $< >$@ - + -e "s|@FONTDIR@|$(fontdir)|g" \ + -e "s|@FONTPATH@|$(fontpath)|g" \ + -e "s|@MACRODIR@|$(tmacdir)|g" \ + -e "s|@MACROPATH@|$(tmacpath)|g" \ + -e "s|@DEVICE@|$(DEVICE)|g" \ + -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ + -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ + -e "s|@INDEX_SUFFIX@|$(indexext)|g" \ + -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \ + -e "s|@MAN1EXT@|$(man1ext)|g" \ + -e "s|@MAN5EXT@|$(man5ext)|g" \ + -e "s|@MAN7EXT@|$(man7ext)|g" \ + -e "s|@TMAC_S@|$(tmac_s)|g" \ + -e "s|@TMAC_M@|$(tmac_m)|g" \ + -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \ + -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \ + -e "s|@VERSION@|$(version)|g" \ + -e "s|@MDATE@|$(mdate)|g" \ + -e "s|@g@|$(g)|g" \ + -e "s!@G@;`echo $(g) | tr [a-z] [A-Z]`!g" \ + $< >$@ + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/mm/Makefile.sub groff-1.22.3/contrib/mm/Makefile.sub --- groff-1.22.2/contrib/mm/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/Makefile.sub 2014-11-04 09:38:35.488520709 +0100 @@ -1,17 +1,17 @@ -# Copyright 1991-1993, 1999-2001, 2006, 2007, 2009, 2011 -# +# Copyright 1991-2014 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 . # @@ -24,10 +24,11 @@ MAN7=\ groff_mm.n \ groff_mmse.n -FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov +FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov # Local configuration files with default values. LOCALE=locale se_locale MOSTLYCLEANADD=temp +RM=rm -f all: mmroff @@ -36,21 +37,21 @@ install_data: install_m -test -d $(DESTDIR)$(tmacdir)/mm \ || $(mkinstalldirs) $(DESTDIR)$(tmacdir)/mm - -for f in $(FILES); do \ - rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \ - $(INSTALL_DATA) $(srcdir)/mm/$$f $(DESTDIR)$(tmacdir)/mm/$$f; \ + for f in $(FILES); do \ + $(RM) $(DESTDIR)$(tmacdir)/mm/$$f; \ + $(INSTALL_DATA) $(srcdir)/mm/$$f $(DESTDIR)$(tmacdir)/mm/$$f; \ done - -for f in $(LOCALE); do \ - test -f $(DESTDIR)$(tmacdir)/mm/$$f \ - || touch $(DESTDIR)$(tmacdir)/mm/$$f; \ + for f in $(LOCALE); do \ + test -f $(DESTDIR)$(tmacdir)/mm/$$f \ + || touch $(DESTDIR)$(tmacdir)/mm/$$f; \ done - $(INSTALL_DATA) $(srcdir)/refer-mm.tmac $(DESTDIR)$(tmacdir)/refer-mm.tmac + $(INSTALL_DATA) $(srcdir)/refer-mm.tmac \ + $(DESTDIR)$(tmacdir)/refer-mm.tmac install_m: - -test -d $(DESTDIR)$(tmacdir) \ - || $(mkinstalldirs) $(DESTDIR)$(tmacdir) - -rm -f $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac + -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir) + $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac $(INSTALL_DATA) $(srcdir)/m.tmac \ $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \ @@ -62,27 +63,33 @@ install_mmroff: mmroff -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/mmroff + $(RM) $(DESTDIR)$(bindir)/mmroff $(INSTALL_SCRIPT) mmroff $(DESTDIR)$(bindir)/mmroff mmroff: mmroff.pl - -rm -f $@ - -sed -e 's;/usr/bin/perl;$(PERLPATH);' $(srcdir)/mmroff.pl >$@ - -chmod +x $@ + sed -e 's;/usr/bin/perl;$(PERL);' $(srcdir)/mmroff.pl >$@ + chmod +x $@ uninstall_sub: - -for f in $(FILES); do \ - rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \ - done + -for f in $(FILES); do $(RM) $(DESTDIR)$(tmacdir)/mm/$$f; done -for f in $(LOCALE); do \ - test -s $(DESTDIR)$(tmacdir)/mm/$$f \ - || rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \ + test -s $(DESTDIR)$(tmacdir)/mm/$$f \ + || $(RM) $(DESTDIR)$(tmacdir)/mm/$$f; \ done - -rm -f $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac - -rm -f $(DESTDIR)$(tmacdir)/refer-mm.tmac - -rmdir $(DESTDIR)$(tmacdir)/mm - -rm -f $(DESTDIR)$(bindir)/mmroff + $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac + $(RM) $(DESTDIR)$(tmacdir)/refer-mm.tmac + -test -d $(DESTDIR)$(tmacdir)/mm && \ + rmdir $(DESTDIR)$(tmacdir)/mm + $(RM) $(DESTDIR)$(bindir)/mmroff + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/contrib/mm/mm/0.MT groff-1.22.3/contrib/mm/mm/0.MT --- groff-1.22.2/contrib/mm/mm/0.MT 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm/0.MT 2014-11-04 09:38:35.602519284 +0100 @@ -1,7 +1,7 @@ +.\" -*- nroff -*- .ig -Copyright (C) 1991-2000, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/mm/mm/4.MT groff-1.22.3/contrib/mm/mm/4.MT --- groff-1.22.2/contrib/mm/mm/4.MT 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm/4.MT 2014-11-04 09:38:35.602519284 +0100 @@ -1,7 +1,7 @@ +.\" -*- nroff -*- .ig -Copyright (C) 1991-2000, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/mm/mm/5.MT groff-1.22.3/contrib/mm/mm/5.MT --- groff-1.22.2/contrib/mm/mm/5.MT 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm/5.MT 2014-11-04 09:38:35.602519284 +0100 @@ -1,7 +1,7 @@ +.\" -*- nroff -*- .ig -Copyright (C) 1991-2000, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/mm/mm/ms.cov groff-1.22.3/contrib/mm/mm/ms.cov --- groff-1.22.2/contrib/mm/mm/ms.cov 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm/ms.cov 2014-11-04 09:38:35.602519284 +0100 @@ -1,7 +1,7 @@ +.\" -*- nroff -*- .ig -Copyright (C) 1991-2000, 2005, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/mm/mm/se_ms.cov groff-1.22.3/contrib/mm/mm/se_ms.cov --- groff-1.22.2/contrib/mm/mm/se_ms.cov 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm/se_ms.cov 2014-11-04 09:38:35.602519284 +0100 @@ -1,3 +1,3 @@ -.\" $Id: se_ms.cov,v 2.0 2000/09/14 03:40:25 jhaegg Exp $ +.\" -*- nroff -*- .mso mm/ms.cov .nr cur*abstract-ll 11c diff -ruN groff-1.22.2/contrib/mm/mmroff.man groff-1.22.3/contrib/mm/mmroff.man --- groff-1.22.2/contrib/mm/mmroff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/mmroff.man 2014-11-04 09:38:35.488520709 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989, 2001, 2009, 2011 - Free Software Foundation, Inc. +.TH MMROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +mmroff \- cross reference preprocessor +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,33 +26,65 @@ the original English. .. . -.TH MMROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -mmroff \- cross reference preprocessor +.de au +This document was written by +.MT jh@axis.se +Jörgen Hägg, Lund, Sweden +.ME . +.. +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B mmroff [ -.I -x +.I \-x ] .I groff_arguments +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION -\fBmmroff\fP is a simple preprocessor for \fBgroff\fP, it is -used for expanding cross references in \fBm@TMAC_M_PREFIX@m\fP, see -\fBgroff_mm(@MAN7EXT@)\fP. -\fBgroff\fP is executed twice, first with \fB-z\fP and \fB-rRef=1\fR +.\" -------------------------------------------------------------------- +. +.B mmroff +is a simple preprocessor for +.BR groff , +it is used for expanding cross references in +.BR m@TMAC_M_PREFIX@m , +see +.BR groff_mm (@MAN7EXT@). +. +.B groff +is executed twice, first with +.B \-z +and +.B \-rRef=1 to collect all cross references and then to do the real processing when the cross reference file is up to date. +. +. .TP -\fB\-x\fR +.B \-x Just create the cross reference file. -This can be used to refresh the cross reference file, -it isn't always needed to have accurate -cross references and by using this option \fBgroff\fP will only -be run once. +. +This can be used to refresh the cross reference file, it isn\[aq]t +always needed to have accurate cross references and by using this +option +.B groff +will only be run once. +. +. +.\" -------------------------------------------------------------------- .\".SH BUGS -.SH AUTHOR -Jörgen Hägg, Lund, Sweden . +.\" -------------------------------------------------------------------- +. +. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B @MACRODIR@/@TMAC_M_PREFIX@m.tmac .TP @@ -53,15 +93,32 @@ .B @TMAC_MDIR@/*.MT .TP .B @TMAC_MDIR@/locale +. +. +.na +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -.BR groff_mm(@MAN7EXT@), -.BR groff_mmse(@MAN7EXT@), +.\" -------------------------------------------------------------------- +. +.BR groff_mm (@MAN7EXT@), +.BR groff_mmse (@MAN7EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +. +. +. .\" Local Variables: .\" mode: nroff .\" coding: latin-1 diff -ruN groff-1.22.2/contrib/mm/mmroff.pl groff-1.22.3/contrib/mm/mmroff.pl --- groff-1.22.2/contrib/mm/mmroff.pl 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/mmroff.pl 2014-11-04 09:38:35.488520709 +0100 @@ -1,7 +1,6 @@ #! /usr/bin/perl # -*- Perl -*- -# Copyright (C) 1989, 2005, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # # This file is part of groff. # @@ -153,3 +152,11 @@ } close(IN); } + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/contrib/mm/mmse.tmac groff-1.22.3/contrib/mm/mmse.tmac --- groff-1.22.2/contrib/mm/mmse.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/mmse.tmac 2014-11-04 09:38:35.488520709 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .\" mmse.tmac .\" .do mso mse.tmac diff -ruN groff-1.22.2/contrib/mm/mm.tmac groff-1.22.3/contrib/mm/mm.tmac --- groff-1.22.2/contrib/mm/mm.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/mm.tmac 2014-11-04 09:38:35.488520709 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .\" mm.tmac .\" .do mso m.tmac diff -ruN groff-1.22.2/contrib/mm/mse.tmac groff-1.22.3/contrib/mm/mse.tmac --- groff-1.22.2/contrib/mm/mse.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/mse.tmac 2014-11-04 09:38:35.488520709 +0100 @@ -1,7 +1,7 @@ +.\" -*- nroff -*- .ig -Copyright (C) 1991, 2006, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/contrib/mm/m.tmac groff-1.22.3/contrib/mm/m.tmac --- groff-1.22.2/contrib/mm/m.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/m.tmac 2014-11-04 09:38:35.488520709 +0100 @@ -1,14 +1,8 @@ -.\" -.de @revision -.ds RE \\$2 -.. -.\" -.\" $Id: m.tmac,v 2.53 2012/11/17 17:36:56 ant_222 Exp $ -.@revision $Revision: 2.53 $ +.\" -*- nroff -*- +. .ig -Copyright (C) 1991-2006, 2009-2011 - Free Software Foundation, Inc. +Copyright (C) 1991-2014 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under @@ -742,8 +736,9 @@ .\" Wrapper to cancel the side effect of .tag + .br generating .\" unwanted vertical space. .de misc@tag -.\" retain temporary indentation +.\" retain temporary indentation and horizontal position .if !(\\n[.in]-\\n[.i]=0) .nr misc*ti \\n[.in] +.nr misc*.k \\n[.k] .vpt 0 .DEVTAG-\\$1 \\$2 .br @@ -753,6 +748,8 @@ . sp -1 .\} .sp -1 +\h'\\n[misc*.k]u'\c +.rr misc*.k .vpt 1 .. .\" ######## module pict ################# @@ -2015,7 +2012,7 @@ .if \\n[D]>2 .tm set format=\\n[ds*format] .\" fill or not to fill, that is the... .nr ds*fill 0 -.ie \\n[.$]>1 \{\ +.if \\n[.$]>1 \{\ . ie r ds*fill!\\$2 .nr ds*fill \\n[ds*fill!\\$2] . el .@error "\\*[ds*type]:wrong fill:\\$2" .\} @@ -2197,7 +2194,7 @@ .if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]> .if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]} .if \\n[.$]=1 .ds li*c-mark \\$1 -.ie \\n[.$]=2 \{\ +.if \\n[.$]=2 \{\ . ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark] . el .ds li*c-mark \\$1\ \\*[li*c-mark] .\} diff -ruN groff-1.22.2/contrib/mm/NOTES groff-1.22.3/contrib/mm/NOTES --- groff-1.22.2/contrib/mm/NOTES 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/NOTES 2014-11-04 09:38:35.488520709 +0100 @@ -1,5 +1,4 @@ - Copyright (C) 1989-2000, 2009 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -109,3 +108,9 @@ . . . . 9 title 9 + + +### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/contrib/mm/README groff-1.22.3/contrib/mm/README --- groff-1.22.2/contrib/mm/README 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/README 2014-11-04 09:38:35.488520709 +0100 @@ -1,5 +1,4 @@ - Copyright (C) 1989-2000, 2001, 2002, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -18,7 +17,7 @@ Any new ideas or improvements are welcome. -Newest version is available here or at the groff CVS repository. +Newest version is available here or at the groff repository. ftp://ftp.axis.se/pub/groff/mm.gz You can install mgm as a separate package without the configure in groff @@ -33,3 +32,7 @@ Thanks to everyone who have sent me bug-reports and fixes. +### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/contrib/mm/refer-mm.tmac groff-1.22.3/contrib/mm/refer-mm.tmac --- groff-1.22.2/contrib/mm/refer-mm.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/contrib/mm/refer-mm.tmac 2014-11-04 09:38:35.488520709 +0100 @@ -4,7 +4,7 @@ .\" .\" Refer support for mm macros. .\" -.\" Copyright (C) 2011 Free Software Foundation, Inc. +.\" Copyright (C) 2011-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/contrib/mom/BUGS groff-1.22.3/contrib/mom/BUGS --- groff-1.22.2/contrib/mom/BUGS 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/mom/BUGS 2014-11-04 09:38:35.502520534 +0100 @@ -1,5 +1,5 @@ - Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 - Free Software Foundation, Inc. + -*- text -*- + Copyright 2004-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -22,6 +22,83 @@ ==================================================================== +Version 2.0-c +============= + +Endnotes page offset wrong if (BLOCK)QUOTE last macro before +ENDNOTES. +---Fixed--- + +Character translation of diacritics from lowercase to caps broken. +---Fixed--- + +Spacing not being restored (.ns/.rs) after a HEADING that falls at +the top of the page. +---Fixed--- + +Version 2.0-b +============= + +When line numbering is enabled, line numbers after QUOTE being reset +to '0'. +---Fixed--- + +When line numbering is enabled for QUOTE and BLOCKQUOTE, style +params for line numbers not being applied. +---Fixed--- + +TOC overprinting footer when it comes immediately after +BIBLIOGRAPHY. +---Fixed--- + +TOC page numbers not printing when positioned at top of page. +---Fixed--- + +TOC page numbers not always incrementing properly. +---Fixed--- + +Version 2.0-a_1 +=============== + +QUOTE_INDENT not being respected in FLOAT. +---Fixed--- + +SMARTQUOTES OFF broken. +---Fixed--- + +DOCHEADER_LEAD being reset to default after first chapter. +---Fixed--- + +Forced floats that fit on the page causing floats on the next page +to be treated as forced. +---Fixed--- + +Forced floats not advancing on the page after output if the float is +forced to the next page, causing running text to overprint. +---Fixed--- + +Text after defered floats not being shimmed properly. +---Fixed--- + +Tables that span pages overprinting first two lines of table on new +pages. +---Fixed--- + +PDF_IMAGE not respecting .IL, .IR, or .IB. +---Fixed--- + +AUTOLEAD not sticking after .START. +---Fixed--- + +Version 2.0-a +============= + +Footer not printing on first page when HEADERS_AND_FOOTERS enabled. +---Fixed--- + +$AUTHOR string missing. +---Fixed--- + Version 2.0 =========== diff -ruN groff-1.22.2/contrib/mom/ChangeLog groff-1.22.3/contrib/mom/ChangeLog --- groff-1.22.2/contrib/mom/ChangeLog 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/mom/ChangeLog 2014-11-04 09:38:35.502520534 +0100 @@ -1,1430 +1,1549 @@ +* Wed Oct 29 2014 + + o Makefile.sub: KFLAG to run pdfmom with -k + + o Set utf-8 preconv coding tag in examples/typesetting.mom and + examples/letter.mom + +* Mon Oct 20 2014 + + o Changes to caption/label/source quadding strategy. + +* Wed Sep 03 2014 Bernd Warken + + o all files in contrib/mom source: Copying and Emacs setting. + + o contrib/mom source/ChangeLog: Repair file. The file runs now in + Emacs change-log mode. + +* Tue Aug 12 2014 + + o Makefile.sub (stamp-strip): Set LANG=C LC_ALL=C when calling + `sed'. + + This prevents a build error on OS X. + +* Thu Apr 3 2014 + + o Makefile.sub: Set LC_ALL=C when calling $(PDFMOM). + + Doing so in an UTF-8 locale with $PERL5OPT=-C set avoids warnings + like + + utf8 "\xF5" does not map to Unicode at\ + [.]src/devices/gropdf/gropdf line 1359, line 63. + Malformed UTF-8 character (unexpected end of string)\ + in substitution (s///) at\ + [.]src/devices/gropdf/gropdf line 1315, line 63. + +* Sat Mar 29 2014 + + o Makefile.sub: Handle examples separately, controlled by + $(make{_,_install_,_uninstall_}examples). + +* Wed Mar 26 2014 + + o Added user settable space to PARA_SPACE. + +* Tue Mar 11 2014 + + o Makefile.sub (MAN7): Do not install empty `mom.7' (tiny change). + + A mom(7) manual got briefly added, then promptly removed again in + 9f38f05e58d31eda1affce01d1144760b5f48096 for integration into + groff_mom(7), but it was forgotten to remove it from the list of + manual pages to install. + +* Fri Feb 28 2014 + + o Reworked handling of pdf-images. Preprocessor support expanded + to include eqn and pic. Spacing and placement of tbl output + improved. Fixed floats in columns. Added facilities for captions + and labels for pdf-image, eqn, pic, and tbl. Added auto-generated + "Lists of". + +* Wed Oct 30 2013 + + o Expanded and improved float/tbl handling. + +* Sat Sep 14 2013 + + o .TS/.TE extended to support multi-page tables with headers. + +* Sat Aug 24 2013 + + o Restored reserved.html to toc.html in docs. + +* Tue Aug 20 2013 + + o Integrate mom.7 into the man-page groff_mom.7 + +* Tue Aug 20 2013 + + o New man page mom.7 + +* Sun Aug 11 2013 + + o Updated documentation concerning refer usage + + o Replaced REF_STYLE and REF macros with warnings. + +* Wed Jun 19 2013 + + o groff_mom.man: Fix inappropriate use of .UR/.UE. + * Fri Jan 4 2012 -o Makefile.sub (install_data): Create directory for PDF documentation. - This is necesssary in case GhostScript is not available, and no other - PDF files have been created yet. + o Makefile.sub (install_data): Create directory for PDF + documentation. This is necesssary in case GhostScript is not + available, and no other PDF files have been created yet. * Sun Dec 30 2012 -o Makefile.sub (install_data): Fix symlink. - Patch from Elias Pipping . + o Makefile.sub (install_data): Fix symlink. + Patch from Elias Pipping . * Thu Sep 20 2012 -o Simplify enviroment handling. + o Simplify enviroment handling. * Fri Aug 31 2012 -o Version 2.0 release. Changes documented in version-2.html in - the html documentation. + o Version 2.0 release. Changes documented in version-2.html in + the html documentation. -o Added new documentation, Producing PDFs with groff and mom. + o Added new documentation, Producing PDFs with groff and mom. * Sat Feb 18 2012 -o Added choice to have DOCTYPE NAMED underscored or not when - PRINTSTYLE TYPEWRITE + o Added choice to have DOCTYPE NAMED underscored or not + when PRINTSTYLE TYPEWRITE -o Doc fix to DOCTYPE NAMED underlining entry + o Doc fix to DOCTYPE NAMED underlining entry * Thu Sep 8 2011 -o Added register #SUBHEAD, analagous to #HEAD, to fix excessive - spacing between SUBHEADs and SUBSUBHEADs. + + o Added register #SUBHEAD, analagous to #HEAD, to fix excessive + spacing between SUBHEADs and SUBSUBHEADs. * Sun Feb 20 2011 -o Added support for sub-subheads from patch supplied by Petr Man. + o Added support for sub-subheads from patch supplied by Petr Man. * Fri Feb 11 2011 -o Moved register #UNADJUSTED_DOC_LEAD to top of TRAPS macro. + o Moved register #UNADJUSTED_DOC_LEAD to top of TRAPS macro. * Fri Nov 19 2010 -o Added utility macro, SINGE_SPACE, for PRINTSTYLE TYPEWRITE + o Added utility macro, SINGE_SPACE, for PRINTSTYLE TYPEWRITE * Sat Jan 22 2011 -o groff_mom.man (FILES): Fix directory locations. + o groff_mom.man (FILES): Fix directory locations. * Sun Oct 3 2010 -o Complete overhaul of refer macros and documentation + o Complete overhaul of refer macros and documentation -o Inclusion of Tadziu Hoffman's postscript code for underlining + o Inclusion of Tadziu Hoffman's postscript code for underlining * Wed Aug 18 2010 -o Complete overhaul of documentation + o Complete overhaul of documentation * Thu Aug 5 2010 -o Changes to COVER and DOCCOVER for greater flexibility in placement - of elements + o Changes to COVER and DOCCOVER for greater flexibility in + placement of elements -o Improved handling of MISC info on cover pages for greater style - flexibility + o Improved handling of MISC info on cover pages for greater style + flexibility -o Added _FAMILY, _FONT, _SIZE and _COLOR control macros for CODE + o Added _FAMILY, _FONT, _SIZE and _COLOR control macros for CODE * Mon July 6 2009 -o Added CLOSING_INDENT and SIGNATURE_SPACE to DOCTYPE LETTER macros. + o Added CLOSING_INDENT and SIGNATURE_SPACE to DOCTYPE LETTER + macros. * Sun Jun 14 2009 -o DROPCAP handling changed; uses local vertical motions now instead - of .mk/.rt. + o DROPCAP handling changed; uses local vertical motions now + instead of .mk/.rt. -o Added macro SUPERSCRIPT_RAISE_AMOUNT + o Added macro SUPERSCRIPT_RAISE_AMOUNT -o Added registers and strings to keep track of .RW and .EW and the - amounts passed to them. + o Added registers and strings to keep track of .RW and .EW and the + amounts passed to them. * Sat May 2 2009 -o Fixed error in docs: COVERS_COUNT_PAGES changed to - COVER_COUNTS_PAGES. Ditto DOC_COVERS_COUNT_PAGES. + o Fixed error in docs: COVERS_COUNT_PAGES changed to + COVER_COUNTS_PAGES. Ditto DOC_COVERS_COUNT_PAGES. * Fri May 1 2009 -o Fixed PARAHEAD size so it properly adds the value of - \*[$PH_SIZE_CHANGE] to \n[#DOC_LEAD]. + o Fixed PARAHEAD size so it properly adds the value of + \*[$PH_SIZE_CHANGE] to \n[#DOC_LEAD]. * Sat Jan 17 2009 -o Changed FAMILY, FT and PT_SIZE requests in DO_COVER to groff - primitives (fam, ft and ps respectively). Fixes (DOC_)COVER bug - where (DOC_)COVER was resetting families and fonts of various - document elements (QUOTE, BLOCKQUOTE, etc) to document default. - -o Removed (excessive) cleanup of (doc)cover and docheader strings and - registers from macro CLEANUP. Changes to mom's default style for - these document elements now survive COLLATE. + o Changed FAMILY, FT and PT_SIZE requests in DO_COVER to groff + primitives (fam, ft and ps respectively). Fixes (DOC_)COVER bug + where (DOC_)COVER was resetting families and fonts of various + document elements (QUOTE, BLOCKQUOTE, etc) to document default. + + o Removed (excessive) cleanup of (doc)cover and docheader strings + and registers from macro CLEANUP. Changes to mom's default style + for these document elements now survive COLLATE. * Fri Jan 2 2009 -o Added possibility of quadding docheader left or right, as well as - center, which remains the default. + o Added possibility of quadding docheader left or right, as well + as center, which remains the default. * Wed Dec 31 2008 -o Default definition of $QUOTE0 and $QUOTE1 in om.tmac changed from - \[dq] to \[lq] and \[rq], respectively. + o Default definition of $QUOTE0 and $QUOTE1 in om.tmac changed + from \[dq] to \[lq] and \[rq], respectively. * Sun Jan 4 2009 -o Makefile.sub (CLEANADD): Add om.tmac-s. + o Makefile.sub (CLEANADD): Add om.tmac-s. * Tue Dec 30 2008 -o Doc fixes in toc.html + o Doc fixes in toc.html -o Control of null pagenumbering of covers passed to \n%; formerly - handled by \n[#PAGE_NUM_ADJ] + o Control of null pagenumbering of covers passed to \n%; formerly + handled by \n[#PAGE_NUM_ADJ] * Tue Dec 23 2008 -o Added a CAPS option to HDRFTR_RECTO and HDRFTR_VERSO to allow - capitalization of reserved strings when designing recto and/or - verso headers. Fixed docs accordingly. + o Added a CAPS option to HDRFTR_RECTO and HDRFTR_VERSO to allow + capitalization of reserved strings when designing recto and/or + verso headers. Fixed docs accordingly. * Sun Nov 30 2008 -o Added .nr #DIVER_DEPTH 0 to end of PRINT_PAGE_NUMBER to ensure - that #DIVER_DEPTH=0 + o Added .nr #DIVER_DEPTH 0 to end of PRINT_PAGE_NUMBER to ensure + that #DIVER_DEPTH=0 -o Moved string definition of $FONT in macro FT to top of macro. + o Moved string definition of $FONT in macro FT to top of macro. -o Moved string definition of $FAMILY in macro FAMILY to top of - macro. + o Moved string definition of $FAMILY in macro FAMILY to top of + macro. -o Changed condition generating #NO_BREAK at top of macro COLLATE - from - .if ( \\n[.t] < \\n[.v] ) \{ .nr #NO_BREAK 1 \} - to - .if ( (\\n[.t]-1) <= \\n[.v] ) \{ .nr #NO_BREAK 1 \} + o Changed condition generating #NO_BREAK at top of macro COLLATE + from .if ( \\n[.t] < \\n[.v] ) \{ .nr #NO_BREAK 1 \} to .if ( + (\\n[.t]-1) <= \\n[.v] ) \{ .nr #NO_BREAK 1 \} - (Bottom-of-page trap is tripped 1 unit below last valid - baseline, not on it.) + (Bottom-of-page trap is tripped 1 unit below last valid baseline) + (not on it.) * Tue Nov 25 2008 -o Commented out what appears to be a superfluous and destructive - resetting of #VARIABLE_FOOTER_POSITION at line 13347 in FOOTNOTE - macro. For now, fixes the "vanishing first footnote with some - overflow" bug. + o Commented out what appears to be a superfluous and destructive + resetting of #VARIABLE_FOOTER_POSITION at line 13347 in FOOTNOTE + macro. For now, fixes the "vanishing first footnote with some + overflow" bug. * Mon Oct 6 2008 -o Added a bit to .PP to accommodate .PP_FONT I when PRINTSTYLE is - TYPEWRITE and ITALIC_MEANS_ITALIC + o Added a bit to .PP to accommodate .PP_FONT I when PRINTSTYLE is + TYPEWRITE and ITALIC_MEANS_ITALIC * Mon Jun 30 2008 -o Removed spurious 'sp |\\n[MN-curr-pos]u from MNbottom-right, prior - to re-invoking traps. Hopefully, fixes vanishing RH margin notes - bug. + o Removed spurious 'sp |\\n[MN-curr-pos]u from MNbottom-right, + prior to re-invoking traps. Hopefully, fixes vanishing RH margin + notes bug. * Sun Mar 16 2008 -o Added missing spaced paras bit in blockquotes. + o Added missing spaced paras bit in blockquotes. * Tue Jan 22 2008 -o Fixed indent handling of refer items in endnotes. + o Fixed indent handling of refer items in endnotes. -o Amendations to refer.html. + o Amendations to refer.html. -o Removed dead email address from groff_mom.man. + o Removed dead email address from groff_mom.man. * Fri Jan 04 2008 -o groff_mom.man: Replace .URL with .UR/.UE. - Replace .MTO with .MT/.ME. - Insert `\:' in URLs where appropriate. - Don't include www.tmac. + o groff_mom.man: Replace .URL with .UR/.UE. Replace .MTO with + .MT/.ME. Insert `\:' in URLs where appropriate. Don't include + www.tmac. * Wed Sep 12 2007 -o Fixed an oversight in DROPCAP that meant when DROPCAP needed to - be ignored, the dropcap letter itself was dropped from running - text altogether, instead of printing as a normal part of text. + o Fixed an oversight in DROPCAP that meant when DROPCAP needed to + be ignored, the dropcap letter itself was dropped from running + text altogether, instead of printing as a normal part of text. -o Added an .if n clause to DROPCAP to prevent mom from going into - an infinite loop when groff invoked with the -Tascii switch. + o Added an .if n clause to DROPCAP to prevent mom from going into + an infinite loop when groff invoked with the -Tascii switch. * Wed Jul 25 2007 -o Did a couple of doc fixes. + o Did a couple of doc fixes. -o Added vpt checks at the top of all the graphical object macros. - Basically, only turn vpt's off and on again if they're already enabled. + o Added vpt checks at the top of all the graphical object macros. + Basically, only turn vpt's off and on again if they're already + enabled. * Wed Feb 14 2007 -o Moved .ne requests in HEAD and SUBHEAD to top of respective - macros, fixing bug that was gathering the wrong page number for - head and subhead toc entries. + o Moved .ne requests in HEAD and SUBHEAD to top of respective + macros, fixing bug that was gathering the wrong page number for + head and subhead toc entries. * Fri Nov 24 2006 -o Added a default linebreak color (black) + o Added a default linebreak color (black) * Thu Sep 28 2006 -o Fixed missing #'s in linknames in macrolist.html. + o Fixed missing #'s in linknames in macrolist.html. * Mon Jul 31 2006 -o Changed all .LLs in LIST to .ll requests. + o Changed all .LLs in LIST to .ll requests. -o Added new macro, FINIS_STRING_CAPS, to control capitalization of - the finis string. + o Added new macro, FINIS_STRING_CAPS, to control capitalization of + the finis string. -o Amended doc section on page set up to include directions for - telling groff about the physical dimensions of printer sheets. + o Amended doc section on page set up to include directions for + telling groff about the physical dimensions of printer sheets. -o Added new arg to BLANKPAGE: NULL. If given, BLANKPAGE does not - increment the page number when outputting a blank page. + o Added new arg to BLANKPAGE: NULL. If given, BLANKPAGE does not + increment the page number when outputting a blank page. -o Added new control macros, COVERS_COUNT_PAGES and - DOC_COVERS_COUNT_PAGES in case user wants covers counted in the - pagination scheme. + o Added new control macros, COVERS_COUNT_PAGES and + DOC_COVERS_COUNT_PAGES in case user wants covers counted in the + pagination scheme. -o Added new final arg to COVER and DOC_COVER: BLANKPAGE. Instructs - COVER or DOC_COVER to print a blank page after the cover. + o Added new final arg to COVER and DOC_COVER: BLANKPAGE. + Instructs COVER or DOC_COVER to print a blank page after the + cover. -o Added new optional args to CODE: BR, BREAK, SPREAD. CODE can - now be called inline; if called as a macro and the user wants a - break or spread, s/he has to supply one of the args. + o Added new optional args to CODE: BR, BREAK, SPREAD. CODE can + now be called inline; if called as a macro and the user wants a + break or spread, s/he has to supply one of the args. -o Added new macro, CODE_FAMILY, to set fixed-width family used by - .CODE + o Added new macro, CODE_FAMILY, to set fixed-width family used by + .CODE -o Made EDITOR an alias of AUTHOR + o Made EDITOR an alias of AUTHOR -o Added optional arguments, COVER or DOC_COVER, to reference - macros that may be used on covers and doc covers, allowing users - greater flexibility in determining exactly what goes on covers - and doc covers without screwing up the doc header or the default - page headers/footers + o Added optional arguments, COVER or DOC_COVER, to reference + macros that may be used on covers and doc covers, allowing users + greater flexibility in determining exactly what goes on covers and + doc covers without screwing up the doc header or the default page + headers/footers -o Added macros to control the weight and placement of all - underscore/underline rules used in typesetting and document - processing + o Added macros to control the weight and placement of all + underscore/underline rules used in typesetting and document + processing -o Added macros for drawing of rules, boxes and circles (ellipses) + o Added macros for drawing of rules, boxes and circles (ellipses) -o Added macro, RULE_WEIGHT, to control weight of rules drawn with - \*[RULE] + o Added macro, RULE_WEIGHT, to control weight of rules drawn with + \*[RULE] -o General doc updates, additions, amendations and corrections + o General doc updates, additions, amendations and corrections -o Reformatted entirety of documentation to be xhtml clean + o Reformatted entirety of documentation to be xhtml clean -o Added inlines \*[UC] and \*[LC] to handle inline caps; corrected - doc entry stating that you can use \*[CAPS] and \*[CAPS OFF]; chief - reason is to allow inline capitalization in strings passed to - header/footer definitions. + o Added inlines \*[UC] and \*[LC] to handle inline caps; corrected + doc entry stating that you can use \*[CAPS] and \*[CAPS OFF]; + chief reason is to allow inline capitalization in strings passed + to header/footer definitions. * Fri Jul 7 2006 -o Changed inline, \*[RULE], so that it always draws the rule one - linespace beneath the last output line. Formerly, \*[RULE] drew - the rule on the baseline of the current output line. + o Changed inline, \*[RULE], so that it always draws the rule one + linespace beneath the last output line. Formerly, \*[RULE] drew + the rule on the baseline of the current output line. * Sun Jul 2 2006 -o Changed UNDERSCORE and UNDERSCORE2 to use groff's \D'l ' - line drawing function. + o Changed UNDERSCORE and UNDERSCORE2 to use groff's \D'l ' + line drawing function. -o Changed RULE to use groff's \D'l ' line drawing function. + o Changed RULE to use groff's \D'l ' line drawing function. -o Added RULE_WEIGHT macro, to allow controlling weight of \*[RULE], - expressed in points (including fractional points). + o Added RULE_WEIGHT macro, to allow controlling weight of + \*[RULE], expressed in points (including fractional points). -o Added two new inlines, \*[UC] (all caps) and \*[LC] (caps/lowercase). - These can be used in user-defined header/footer strings (if \E is - used instead of just the backslash by itself) as well as in - normal copy. + o Added two new inlines, \*[UC] (all caps) and \*[LC] + (caps/lowercase). These can be used in user-defined header/footer + strings (if \E is used instead of just the backslash by itself) as + well as in normal copy. * Sat Jul 1 2006 -o Added .FAMILY \\*[$DOC_FAMILY] and .FT R to the end of - .DEFAULT_DOCHEADER, .CHAPTER_DOCHEADER and .NAMED_DOCHEADER. - Fixes bug that was causing type which was set after .START when no - docelement tag given to be set in the last family and font used in - the docheader, instead of the expected $DOC_FAMILY and roman font - (R). + o Added .FAMILY \\*[$DOC_FAMILY] and .FT R to the end of + .DEFAULT_DOCHEADER, .CHAPTER_DOCHEADER and .NAMED_DOCHEADER. + Fixes bug that was causing type which was set after .START when no + docelement tag given to be set in the last family and font used in + the docheader, instead of the expected $DOC_FAMILY and roman font + (R). * Fri Jun 30 2006 -o Updated copyright file + o Updated copyright file -o Massive documentation cleanup to make docs well-formed xhtml + o Massive documentation cleanup to make docs well-formed xhtml * Thu Jun 22 2006 -o Rewrote portions of TITLE, COVERTITLE, DOCCOVERTITLE, - CHAPTER_TITLE, SUBTITLE and MISC so that when they're called from - .COLLATE, they properly clean out all associated strings and - registers. Fixes the "vanishing $TITLE" bug. + o Rewrote portions of TITLE, COVERTITLE, DOCCOVERTITLE, + CHAPTER_TITLE, SUBTITLE and MISC so that when they're called from + .COLLATE, they properly clean out all associated strings and + registers. Fixes the "vanishing $TITLE" bug. -o Added missing .rm $AUTHORS to .AUTHOR. .as $AUTHORS now always - starts with a clean slate. + o Added missing .rm $AUTHORS to .AUTHOR. .as $AUTHORS now always + starts with a clean slate. * Wed Jun 14 2006 -o Added a missing tag to docelement.html. + o Added a missing tag to docelement.html. * Sat Jun 10 2006 -o In header and footer routines, changed all .FAMILY calls when - .PRINTSTYLE TYPESET to .fam + o In header and footer routines, changed all .FAMILY calls when + .PRINTSTYLE TYPESET to .fam -o Fixed DOC_FAMILY so that PARAHEAD_FAMILY and LINENUMBER_FAMILY - are properly set to the new value. + o Fixed DOC_FAMILY so that PARAHEAD_FAMILY and LINENUMBER_FAMILY + are properly set to the new value. * Fri Jun 9 2006 -o Re-worked .QUOTE_INDENT so that users can pass it an absolute - value (by adding a scaling indicator to the arg) instead of just - a value relative to the paragraph indent. Fixes bug (oversight?) - that meant QUOTES and BLOCKQUOTES got no indent at all if the - PP_INDENT was 0. Fixed EPIGRAPH_INDENT similarly. + o Re-worked .QUOTE_INDENT so that users can pass it an absolute + value (by adding a scaling indicator to the arg) instead of just a + value relative to the paragraph indent. Fixes bug (oversight?) + that meant QUOTES and BLOCKQUOTES got no indent at all if the + PP_INDENT was 0. Fixed EPIGRAPH_INDENT similarly. -o Added missing default ENDNOTE_LINENUMBER_FAMILY and _FONT to - DEFAULTS. + o Added missing default ENDNOTE_LINENUMBER_FAMILY and _FONT to + DEFAULTS. * Thu Jun 8 2006 -o Changed distance of the underscores used in docheaders when - PRINTSTYLE is TYPEWRITE from the default 2p to 4p. This is to - leave room for the descenders if the strings are caps/lowercase. + o Changed distance of the underscores used in docheaders when + PRINTSTYLE is TYPEWRITE from the default 2p to 4p. This is to + leave room for the descenders if the strings are caps/lowercase. * Wed Jun 7 2006 -o Added strings $AUTHOR and $AUTHORS. $AUTHOR = $AUTHOR_1 (i.e. - the first arg passed to .AUTHOR); $AUTHORS = a comma-separated - concatenated string of all the args passed to .AUTHOR. + o Added strings $AUTHOR and $AUTHORS. $AUTHOR = $AUTHOR_1 (i.e. + the first arg passed to .AUTHOR); $AUTHORS = a comma-separated + concatenated string of all the args passed to .AUTHOR. * Tue Jun 6 2006 -o Updated docs. + o Updated docs. -o Converted all .ig blocks in om.tmac to comment lines beginning - with \#. This so that the comments will be stripped from om.tmac - during make. The groff sources still contain the commented - version of om.tmac, as do the tarballs posted on mom's homepage. - -o Added new macro, HEADERS_AND_FOOTERS, to allow having both - headers and footers on a page. - -o Fixed whitespace around epigraphs after .DOCTYPE CHAPTER - docheaders. - -o Added test in .PP_FONT for existence of $SAVED_PP_FT; if it's - there, remove it (fixes bug that was causing .PP to ignore - .PP_FONT after .COLLATE). Also fixed .PP so that it properly - passes $PP_FT to .FT if $PP_FT has been re-defined to - $SAVED_PP_FT. + o Converted all .ig blocks in om.tmac to comment lines beginning + with \#. This so that the comments will be stripped from om.tmac + during make. The groff sources still contain the commented + version of om.tmac, as do the tarballs posted on mom's homepage. + + o Added new macro, HEADERS_AND_FOOTERS, to allow having both + headers and footers on a page. + + o Fixed whitespace around epigraphs after .DOCTYPE CHAPTER + docheaders. + + o Added test in .PP_FONT for existence of $SAVED_PP_FT; if it's + there, remove it (fixes bug that was causing .PP to ignore + .PP_FONT after .COLLATE). Also fixed .PP so that it properly + passes $PP_FT to .FT if $PP_FT has been re-defined to + $SAVED_PP_FT. * Sun Jun 4 2006 -o Added a note about colorizing underscored text in the docs. + o Added a note about colorizing underscored text in the docs. * Wed May 24 2006 -o Adjusted the .ne value for heads and subheads (again) + o Adjusted the .ne value for heads and subheads (again) * Sun May 21 2006 -o In the documentation, removed the section stating that setting - the family, font, pointsize and colour of line numbers wasn't - possible. + o In the documentation, removed the section stating that setting + the family, font, pointsize and colour of line numbers wasn't + possible. -o Updated documentation entry for TOCs to include instructions for - using psselect. + o Updated documentation entry for TOCs to include instructions for + using psselect. * Sat May 20 2006 -o Added string $PRE_CODE_FAM to CODE; fixes bug that kept - CODE OFF from restoring the previous family_font combo + o Added string $PRE_CODE_FAM to CODE; fixes bug that kept CODE OFF + from restoring the previous family_font combo -o Added a test for existence of register #DEPTH to .ITEM; if it - doesn't exist, ignore ITEM -*Fri May 19 2006 + o Added a test for existence of register #DEPTH to .ITEM; if it + doesn't exist, ignore ITEM -o Updated docs +* Fri May 19 2006 -o Added macro, CODE + o Updated docs -o DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and - DOC_COVERTITLE now accept multiple arguments; each is printed - on a separate line in docheaders and on cover pages. Where the - macros also supply reference information to page headers, - endnotes and tables of contents, the args are concatenated. + o Added macro, CODE -*Thu May 18 2006 + o DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and + DOC_COVERTITLE now accept multiple arguments; each is printed on a + separate line in docheaders and on cover pages. Where the macros + also supply reference information to page headers, endnotes and + tables of contents, the args are concatenated. -o Changed default DOCHEADER_LEAD to +0 when there's both the chapter - number and a chapter title in DOCTYPE CHAPTER. Compensated by - adding 1/4 of the leading in effect for docheaders between them. - Applies equally similar situations on covers and doc covers. +* Thu May 18 2006 -*Mon May 15 2006 + o Changed default DOCHEADER_LEAD to +0 when there's both the + chapter number and a chapter title in DOCTYPE CHAPTER. + Compensated by adding 1/4 of the leading in effect for docheaders + between them. Applies equally similar situations on covers and + doc covers. -o Added missing default ENDNOTES_ALLOWS_HEADERS to DEFAULTS. +* Mon May 15 2006 -o Added missing temporary change of the pad marker from # to ^ to - the toc title collection routine of .ENDNOTES. + o Added missing default ENDNOTES_ALLOWS_HEADERS to DEFAULTS. -o Added string $SAVED_PP_FT to start of .COLLATE; string is tested - for in .PP + o Added missing temporary change of the pad marker from # to ^ to + the toc title collection routine of .ENDNOTES. -o Improved testing for $FONT and $PP_FT in DEFAULTS + o Added string $SAVED_PP_FT to start of .COLLATE; string is tested + for in .PP -o Trivial changes to docheader spacing for doctypes DEFAULT and - NAMED when PRINTSTYLE is TYPEWRITE. + o Improved testing for $FONT and $PP_FT in DEFAULTS -*Sun May 14 2006 + o Trivial changes to docheader spacing for doctypes DEFAULT and + NAMED when PRINTSTYLE is TYPEWRITE. -o Call to .ne in HEAD moved higher in macro, and .ne's reduced each - by 1. +* Sun May 14 2006 -o Handling of "how much space is needed for subheads + 1 line of - text" in SUBHEAD changed to a simple .ne. Fixes bug that was - causing overprinting of columns when s/h was deferred to next - page/column. + o Call to .ne in HEAD moved higher in macro, and .ne's reduced + each by 1. -o In macro, PRINT_HDRFTR, removed .EOL from clause .if \\n[#HDRFTR_COLOR]=1 + o Handling of "how much space is needed for subheads + 1 line of + text" in SUBHEAD changed to a simple .ne. Fixes bug that was + causing overprinting of columns when s/h was deferred to next + page/column. -*Sat May 13 2006 + o In macro, PRINT_HDRFTR, removed .EOL from clause .if + \\n[#HDRFTR_COLOR]=1 -o Fixed broken link to DOCTITLE in docs. +* Sat May 13 2006 -*Wed Apr 26 2006 + o Fixed broken link to DOCTITLE in docs. -o Corrected doc entry that stated TOC control macros can be entered - anywhere in a file prior to invoking TOC (TOC control macros must - come before START). +* Wed Apr 26 2006 -o Removed spurious .nop from .ie \\n[#PRE_COLLATE]=1 clause in - FAMILY (fixes bug that was causing page numbers on pages before - COLLATE or TOC to be printed too low). + o Corrected doc entry that stated TOC control macros can be + entered anywhere in a file prior to invoking TOC (TOC control + macros must come before START). -o Added a test at top of COLLATE to set register #NO_BREAK to 1 - if the distance to the next trap is less than one linespace; used - in NEWPAGE to determine whether to do a 'br or .br. (fixes BUG - that was causing COLLATE, NEWPAGE, and TOC to spit out a blank - page when the last line of text before them happened to fall on - the last valid baseline of the page). + o Removed spurious .nop from .ie \\n[#PRE_COLLATE]=1 clause in + FAMILY (fixes bug that was causing page numbers on pages before + COLLATE or TOC to be printed too low). -o Changed pad marker used to format TOC entries to permit use of - the pound/number sign (#) in head elements. + o Added a test at top of COLLATE to set register #NO_BREAK to 1 if + the distance to the next trap is less than one linespace; used in + NEWPAGE to determine whether to do a 'br or .br. (fixes BUG that + was causing COLLATE, NEWPAGE, and TOC to spit out a blank page + when the last line of text before them happened to fall on the + last valid baseline of the page). -o New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend - chapter numbers to the numbering scheme used in head element - numbering. + o Changed pad marker used to format TOC entries to permit use of + the pound/number sign (#) in head elements. -o Added missing periods at the ends of head, subhead, parahead - numbers. + o New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend + chapter numbers to the numbering scheme used in head element + numbering. -o CHAPTER, with a numeric argument, can now be used to identify any - document as a "chapter" for the purposes of prefixing the - argument to CHAPTER to the numbering scheme of head elements. + o Added missing periods at the ends of head, subhead, parahead + numbers. -o Fixed alignment of TOC entries. + o CHAPTER, with a numeric argument, can now be used to identify + any document as a "chapter" for the purposes of prefixing the + argument to CHAPTER to the numbering scheme of head elements. -o Removed .rr #DOC_HEADER and replaced with + o Fixed alignment of TOC entries. - .if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \} + o Removed .rr #DOC_HEADER and replaced with - near the end of START. I.e., #DOC_HEADER becomes "2" if - docheaders were on in the previous document. COLLATE tests for 2 - in order to reset #DOC_HEADER to 1 for use in the user-invoked START - that comes after a COLLATE. + .if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \} -o Added register, #CHAPTER_CALLED, to CHAPTER; tested for in - PREFIX_CHAPTER_NUMBER to determine whether the argument to CHAPTER - can be used to establish a chapter number for chapter number - prefixes in head element numbering. + near the end of START. I.e., #DOC_HEADER becomes "2" if + docheaders were on in the previous document. COLLATE tests for 2 + in order to reset #DOC_HEADER to 1 for use in the user-invoked + START that comes after a COLLATE. -*Mon Apr 17 2006 + o Added register, #CHAPTER_CALLED, to CHAPTER; tested for in + PREFIX_CHAPTER_NUMBER to determine whether the argument to CHAPTER + can be used to establish a chapter number for chapter number + prefixes in head element numbering. -o Fixed bug that was causing shifted lists, when returned to, to - revert to the left margin instead of observing the correct - indent+shift for the list. +* Mon Apr 17 2006 -o Added a check in LIST so that if user invokes LIST with RETURN, - mom doesn't get confused by the initial `R' (which she was using - to check if the arg to LIST was ROMAN or roman). + o Fixed bug that was causing shifted lists, when returned to, to + revert to the left margin instead of observing the correct + indent+shift for the list. -o Replaced an incorrectly copied code block in SUBHEAD that was - preventing SUBHEAD from processing subheads properly when - PARA_SPACE was on. + o Added a check in LIST so that if user invokes LIST with RETURN, + mom doesn't get confused by the initial `R' (which she was using + to check if the arg to LIST was ROMAN or roman). -*Wed Mar 15 2006 + o Replaced an incorrectly copied code block in SUBHEAD that was + preventing SUBHEAD from processing subheads properly when + PARA_SPACE was on. -o Added a .SHIM after .sp \\n[#DC_LINES]v in .DROPCAP. Fixes - problem of dropcaps in initial paragraphs after COLLATE being set - slightly too high. +* Wed Mar 15 2006 -o Added .rr #DOC_LEAD_ADJUST_OFF to .ie clause of DOC_LEAD_ADJUST - and removed .rr #DOC_LEAD_ADJUST_OFF from DEFAULTS (after TRAPS) - so that document leading adjustment (or lack thereof) is - maintained from doc to doc when COLLATE is being used. + o Added a .SHIM after .sp \\n[#DC_LINES]v in .DROPCAP. Fixes + problem of dropcaps in initial paragraphs after COLLATE being set + slightly too high. -o Added new register, #PRE_COLLATE. The .FAMILY macro is called - several times during initial COLLATE processing, and contained a - stanza that allowed FAMILY, after a collate, to invoke DOC_FAMILY - if #COLLATE=1. This allowed users to use FAMILY after a COLLATE - but before START in a way consistent with the behaviour described - in the docs (namely, FAMILY before START sets the DOC_FAMILY). - Since that functionality is still needed, #PRE_COLLATE instructs - FAMILY not to reset DOC_FAMILY until COLLATE is complete (i.e. - after the break to a new page). #PRE_COLLATE, if set to 1, is - removed at the end of HEADER. + o Added .rr #DOC_LEAD_ADJUST_OFF to .ie clause of DOC_LEAD_ADJUST + and removed .rr #DOC_LEAD_ADJUST_OFF from DEFAULTS (after TRAPS) + so that document leading adjustment (or lack thereof) is + maintained from doc to doc when COLLATE is being used. -*Thu, Mar 2 2006 + o Added new register, #PRE_COLLATE. The .FAMILY macro is called + several times during initial COLLATE processing, and contained a + stanza that allowed FAMILY, after a collate, to invoke DOC_FAMILY + if #COLLATE=1. This allowed users to use FAMILY after a COLLATE + but before START in a way consistent with the behaviour described + in the docs (namely, FAMILY before START sets the DOC_FAMILY). + Since that functionality is still needed, #PRE_COLLATE instructs + FAMILY not to reset DOC_FAMILY until COLLATE is complete (i.e. + after the break to a new page). #PRE_COLLATE, if set to 1, is + removed at the end of HEADER. -o Added control macros for linenumbering family, font, point size - and color +* Thu, Mar 2 2006 -o Added a NO_SHIM macro + o Added control macros for linenumbering family, font, point size + and color -*Sun Feb 26 2006 + o Added a NO_SHIM macro -o Changed .PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u' in the - "ROMAN I, padded" and "roman i, padded" clauses of ITEM to - .PRINT "\h'\\n[#HL_INDENT\\n[#DEPTH]]u' to fix bug associated - with using both PAD_LIST_DIGITS LEFT and SHIFT_LIST. +* Sun Feb 26 2006 -*Fri Feb 24 2006 + o Changed .PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u' in the "ROMAN + I, padded" and "roman i, padded" clauses of ITEM to .PRINT + "\h'\\n[#HL_INDENT\\n[#DEPTH]]u' to fix bug associated with using + both PAD_LIST_DIGITS LEFT and SHIFT_LIST. -o Removed superfluous "if" from FONT, line 492 +* Fri Feb 24 2006 -o Removed #ADD_BREAK register from FOOTNOTE and ENDNOTE, along with - the routines it invoked + o Removed superfluous "if" from FONT, line 492 -o Added an optional argument, BREAK, to FOOTNOTE OFF and ENDNOTE - OFF, for correct and flexible handling of punctuation and - continued lines when FOOTNOTE or ENDNOTE are called while nofill - mode is active. + o Removed #ADD_BREAK register from FOOTNOTE and ENDNOTE, along + with the routines it invoked -o Created an alias for .so, INCLUDE. + o Added an optional argument, BREAK, to FOOTNOTE OFF and ENDNOTE + OFF, for correct and flexible handling of punctuation and + continued lines when FOOTNOTE or ENDNOTE are called while nofill + mode is active. -*Thu Feb 2 2006 + o Created an alias for .so, INCLUDE. -o Small fix to handling of underlining of italic text spanning - pages in PRINTSTYLE TYPEWRITE. +* Thu Feb 2 2006 -*Thu Jan 12 2006 + o Small fix to handling of underlining of italic text spanning + pages in PRINTSTYLE TYPEWRITE. -o Reworked changing and setting of traps associated with outputting - left and right margin notes. See BUGS. +* Thu Jan 12 2006 -*Sat Jan 7 2006 + o Reworked changing and setting of traps associated with + outputting left and right margin notes. See BUGS. -o Bracketed outputting of margin notes diversions with .nf/.fi. +* Sat Jan 7 2006 -*Fri Jan 6 2006 + o Bracketed outputting of margin notes diversions with .nf/.fi. -o Corrected docs MN_INIT so that the optional first arg is properly - given as RAGGED | SYMMETRIC +* Fri Jan 6 2006 -o Fixed MN_INIT macro routine that reads MN_INIT args into strings - so that the strings are first "initialized" with the @ character - if the corresponding arg is blank. Since MN-init tests for \A - and \B (correctly, I hope) for each of its args, the @ character - should be safe. + o Corrected docs MN_INIT so that the optional first arg is + properly given as RAGGED | SYMMETRIC -*Tue May 16 2005 + o Fixed MN_INIT macro routine that reads MN_INIT args into strings + so that the strings are first "initialized" with the @ character + if the corresponding arg is blank. Since MN-init tests for \A and + \B (correctly, I hope) for each of its args, the @ character + should be safe. -o momdoc/appendices.html: Add space in shebang, conforming to - portability recommendation in autoconf docs. +* Tue May 16 2005 -*Thu May 12 2005 + o momdoc/appendices.html: Add space in shebang, conforming to + portability recommendation in autoconf docs. -o Added margin notes capability +* Thu May 12 2005 -o Added mom-specific refer support; refer calls can be embedded in - running text, sent to footnotes or endnotes, or collected for - output on a bibliography page; also added mom-specific refer - control macros + o Added margin notes capability -o Added bibliography page capability, with full suite of control - macros + o Added mom-specific refer support; refer calls can be embedded in + running text, sent to footnotes or endnotes, or collected for + output on a bibliography page; also added mom-specific refer + control macros -o Added referencing of footnotes and endnotes by line number + o Added bibliography page capability, with full suite of control + macros -o Added capability to have footnotes run on when footnotes are - being referenced by line number + o Added referencing of footnotes and endnotes by line number -o Added a post footnote space option, in case users want a little - space between their footnotes + o Added capability to have footnotes run on when footnotes are + being referenced by line number -o Added ENDNOTE_MARKER_STYLE, so user can choose between endnotes - identified by a numerical marker in the text, or by line number + o Added a post footnote space option, in case users want a little + space between their footnotes -o Added control macros to accommodate differing needs for endnotes - identified by line number + o Added ENDNOTE_MARKER_STYLE, so user can choose between endnotes + identified by a numerical marker in the text, or by line number -o Added ENDNOTE_TITLE_SPACE, so user can control starting position - of the endnotes page title + o Added control macros to accommodate differing needs for endnotes + identified by line number -o Extended LIST so that it accepts lowercase alpha, uppercase roman - numeral and lowercase roman numeral enumerators; also added a - "prefix" argument (which comes *after* the separator argument) + o Added ENDNOTE_TITLE_SPACE, so user can control starting position + of the endnotes page title -o Changed RESET_LIST so that it can reset a list to any number, - letter, or roman numeral, instead of just 1, a, A, I and i + o Extended LIST so that it accepts lowercase alpha, uppercase + roman numeral and lowercase roman numeral enumerators; also added + a "prefix" argument (which comes *after* the separator argument) -o Change to handling of footnote/endnote markers in text; input - lines before FOOTNOTE still require \c, but input line after - FOOTNOTE OFF must be entered as a literal continuation of the - line before FOOTNOTE, including any required word space or - punctuation (this so users can get the footnote marker in text - either before or after the punctuation without hassle) + o Changed RESET_LIST so that it can reset a list to any number, + letter, or roman numeral, instead of just 1, a, A, I and i -o Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have - quotes and blockquotes leaded differently from running text + o Change to handling of footnote/endnote markers in text; input + lines before FOOTNOTE still require \c, but input line after + FOOTNOTE OFF must be entered as a literal continuation of the line + before FOOTNOTE, including any required word space or punctuation + (this so users can get the footnote marker in text either before + or after the punctuation without hassle) -o Reworked QUOTE and BLOCKQUOTE to accommodate _AUTOLEAD control; - spacing above and below quotes is equalized *on a per quote - basis* (not completely happy with this, but at least it gives - users some flexibility in designing (block)quotes) + o Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have + quotes and blockquotes leaded differently from running text -*Fri Mar 18 2005 + o Reworked QUOTE and BLOCKQUOTE to accommodate _AUTOLEAD control; + spacing above and below quotes is equalized *on a per quote basis* + (not completely happy with this, but at least it gives users some + flexibility in designing (block)quotes) -o Added mom.vim to /examples +* Fri Mar 18 2005 -*Thu Jan 20 2005 + o Added mom.vim to /examples -o Added \*[TB+] and \*[B] to give inline functionality of .TN and - .EL, respectively. +* Thu Jan 20 2005 -o Added SECTION and SECTION_CHAR as aliases of LINEBREAK and - LINEBREAK_CHAR + o Added \*[TB+] and \*[B] to give inline functionality of .TN and + .EL, respectively. -o Added a NOBREAK option to PAD, so when PAD is called, it's possible - to instruct mom not to advance on the page. + o Added SECTION and SECTION_CHAR as aliases of LINEBREAK and + LINEBREAK_CHAR -*Wed Jan 19 2005 + o Added a NOBREAK option to PAD, so when PAD is called, it's + possible to instruct mom not to advance on the page. -o New macro, ADD_SPACE, so that extra space can be added at the - top of a new page in document processing; the .ns call in HEADER - was making additional space impossible +* Wed Jan 19 2005 -o Reworked handling of ALD/SPACE/SP and LS when they're used at - the tops of pages during pure (i.e. non-docprocessing) - typesetting. First lines were still wandering. Should also be - more intuitive: ALD after LS advances the specified distance from - the top baseline; LS after ALD doesn't change the position of the - first baseline (i.e. merely sets the lead for the text that - follows). + o New macro, ADD_SPACE, so that extra space can be added at the + top of a new page in document processing; the .ns call in HEADER + was making additional space impossible -*Tue Dec 14 2004 + o Reworked handling of ALD/SPACE/SP and LS when they're used at + the tops of pages during pure (i.e. non-docprocessing) + typesetting. First lines were still wandering. Should also be + more intuitive: ALD after LS advances the specified distance from + the top baseline; LS after ALD doesn't change the position of the + first baseline (i.e. merely sets the lead for the text that + follows). -o Fixed a small problem with spacing under quotes when paragraph - spacing is turned on. +* Tue Dec 14 2004 -*Fri Dec 10 2004 + o Fixed a small problem with spacing under quotes when paragraph + spacing is turned on. -o Put all calls in VFP_CHECK inside their own environment. Without - the .ev call, the trap invoked VFP_CHECK was chopping off the - first word of the last line before footnotes. +* Fri Dec 10 2004 -*Dec 6 2004 + o Put all calls in VFP_CHECK inside their own environment. + Without the .ev call, the trap invoked VFP_CHECK was chopping off + the first word of the last line before footnotes. -o Small fixes to elvis_syntax.new (dealing with strings, \{\ and \} +* Dec 6 2004 -o Changed - . ie \\n[#START] \{\ - . if \\n[#DOC_HEADER]=0 \{ . \} - . \} - in HEAD to - . ie \\n[#START] \{\ - . if \\n[#DOC_HEADER]=0 \{ .RLD 1v \} - . \} - so that HEADs at the start of docs with no docheaders falls on - the correct baseline. + o Small fixes to elvis_syntax.new (dealing with strings, \{\ and + \} -*Dec 3 2004 + o Changed + .ie \\n[#START] \{\ + .if \\n[#DOC_HEADER]=0 \{ . \} + .\} + in HEAD to + .ie \\n[#START] \{\ + .if \\n[#DOC_HEADER]=0 \{ .RLD 1v \} + .\} + so that HEADs at the start of docs with no docheaders falls on + the correct baseline. -o Removed spurious parens from if ( \\n[#TRAP_DISTANCE] < \\n[#DOC_LEAD]*2 ) - in SUBHEAD. +* Dec 3 2004 -*Oct 14 2004 + o Removed spurious parens from if ( \\n[#TRAP_DISTANCE] < + \\n[#DOC_LEAD]*2 ) in SUBHEAD. -o Reworked the LL macro so that the argument can take a prepended + - or - sign (i.e. the argument is relative to the current line - length). +* Oct 14 2004 -*Oct 13 2004 + o Reworked the LL macro so that the argument can take a prepended + + or - sign (i.e. the argument is relative to the current line + length). -o Added an .if \\n(.n=0 if to the ie clause in LS that controls how mom - responds to initial LS invocation at page top if T_MARGIN has - been set. Now, if there's text on the "top" baseline, LS behaves - as expected when invoked afterwards. +* Oct 13 2004 -*Oct 11 2004 + o Added an .if \\n(.n=0 if to the ie clause in LS that controls + how mom responds to initial LS invocation at page top if T_MARGIN + has been set. Now, if there's text on the "top" baseline, LS + behaves as expected when invoked afterwards. -o Added an ie !r#DOCS clause to the processing of "top baseline" - ALDs. ALD is used extensively (internally) in the document - processing macros, and does not need to check--indeed, should not - check--for top baseline placement prior to execution. +* Oct 11 2004 -*Sep 29 2004 + o Added an ie !r#DOCS clause to the processing of "top baseline" + ALDs. ALD is used extensively (internally) in the document + processing macros, and does not need to check--indeed, should not + check--for top baseline placement prior to execution. -o Additions to elvis_syntax.new +* Sep 29 2004 -*Sep 12 2004 + o Additions to elvis_syntax.new -o Small fixes to the documentation. +* Sep 12 2004 -*Aug 21 2004 + o Small fixes to the documentation. -o Removed superfluous second arguments from strings UP, DOWN, FWD - and BCK +* Aug 21 2004 -*Aug 8 2004 + o Removed superfluous second arguments from strings UP, DOWN, FWD + and BCK -o Version changed from the 1.1.x series to 1.2. All of the - features I originally wanted mom to have originally have been - implemented, and appear to be stable. +* Aug 8 2004 -o Major overhaul to the setting of page traps and the handling of - footnotes, both "normal" footnotes and footnotes that occur - inside QUOTE, BLOCKQUOTE and EPIGRAPH. + o Version changed from the 1.1.x series to 1.2. All of the + features I originally wanted mom to have originally have been + implemented, and appear to be stable. -o Addtion of font "styles" to om.tmac, plus changes to the FAMILY - and FT macros to manage them. New section in the doc appendices - on adding fonts and managing the new font styles. + o Major overhaul to the setting of page traps and the handling of + footnotes, both "normal" footnotes and footnotes that occur inside + QUOTE, BLOCKQUOTE and EPIGRAPH. -o Mom now uses a "fallback font" whenever there's an invalid call - to FAMILY. + o Addtion of font "styles" to om.tmac, plus changes to the FAMILY + and FT macros to manage them. New section in the doc appendices + on adding fonts and managing the new font styles. -o RW and EW now affect only the font in effect. A change of family - or font disables them. + o Mom now uses a "fallback font" whenever there's an invalid call + to FAMILY. -o BR_AT_LINE_KERN now properly does a .brp (spread and break) when - used in justified text. + o RW and EW now affect only the font in effect. A change of + family or font disables them. -o NEWPAGE, which used to be an alias for .bp, has been moved into - its own macro, in order to make it more responsive to some unusal - situations. + o BR_AT_LINE_KERN now properly does a .brp (spread and break) when + used in justified text. -o Some changes to elvis_syn.new, including that the file extensions - recognized by elvis now include both .mom and .tmac. This makes - om.tmac much easier to read. + o NEWPAGE, which used to be an alias for .bp, has been moved into + its own macro, in order to make it more responsive to some unusal + situations. -*Jul 6 2004 + o Some changes to elvis_syn.new, including that the file + extensions recognized by elvis now include both .mom and .tmac. + This makes om.tmac much easier to read. -o FT and FAM(ILY) reworked to take advantage of if S, if F and - \n[.sty] additions to groff (1.19.2). Warnings are emitted if a - style hasn't been registered, or if a font style doesn't exist in - the current family. Invalid .FAM(ILY) calls now use a "fallback" - font" (although no warning is issued); fallback is user-settable +* Jul 6 2004 -o New macro, FALLBACK_FONT. Not only controls the fallback font - for invalid family calls, but also controls whether mom aborts on - invalid .FT calls after issuing a warning. + o FT and FAM(ILY) reworked to take advantage of if S, if F and + \n[.sty] additions to groff (1.19.2). Warnings are emitted if a + style hasn't been registered, or if a font style doesn't exist in + the current family. Invalid .FAM(ILY) calls now use a "fallback" + font" (although no warning is issued); fallback is user-settable -o RW/EW now affect only the current font (or font style) + o New macro, FALLBACK_FONT. Not only controls the fallback font + for invalid family calls, but also controls whether mom aborts on + invalid .FT calls after issuing a warning. -o BR_AT_LINE_KERN now (properly) does a break-and-spread when text - is justified. + o RW/EW now affect only the current font (or font style) -o Fairly extensive list of .sty's added to om.tmac. Hopefully, - this will make life easier for users wishing to add new fonts - and/or entire new families to their groff site-font/devps - directory. + o BR_AT_LINE_KERN now (properly) does a break-and-spread when text + is justified. -*Jun 6 2004 + o Fairly extensive list of .sty's added to om.tmac. Hopefully, + this will make life easier for users wishing to add new fonts + and/or entire new families to their groff site-font/devps + directory. -o Altered kerning slightly for footnote markers in text. Daggers - and double-daggers were getting a bit jammed +* Jun 6 2004 -*Jun 3 2004 + o Altered kerning slightly for footnote markers in text. Daggers + and double-daggers were getting a bit jammed -o Rewrote the routines dealing with _FAMILY, _FONT, _SIZE, _COLOR - and _QUAD. A single macro for each checks for the calling alias - (e.g. TITLE_FAMILY in _FAMILY), and performs the appropriate - action. +* Jun 3 2004 -o All "COLOUR" aliases of "COLOR", no matter where, have been - removed. + o Rewrote the routines dealing with _FAMILY, _FONT, _SIZE, _COLOR + and _QUAD. A single macro for each checks for the calling alias + (e.g. TITLE_FAMILY in _FAMILY), and performs the appropriate + action. -o Added cover and doc cover page generation. + o All "COLOUR" aliases of "COLOR", no matter where, have been + removed. -o Added reference macros COVERTITLE, DOC_COVERTITLE, MISC and - COPYRIGHT (for use with covers only) + o Added cover and doc cover page generation. -o Fixed EL and TN so they don't spring page traps; in nofill modes - the preceding input line must be terminated by \c. + o Added reference macros COVERTITLE, DOC_COVERTITLE, MISC and + COPYRIGHT (for use with covers only) -o Added #T_MARGIN_LEAD_ADJ to DO_B_MARGIN, DO_T_MARGIN and NEWPAGE - to ensure accurate placement of first lines on new pages when - docprocessing is not taking place. + o Fixed EL and TN so they don't spring page traps; in nofill modes + the preceding input line must be terminated by \c. -o Made NEWPAGE it's own macro; formerly just an alias of .bp. + o Added #T_MARGIN_LEAD_ADJ to DO_B_MARGIN, DO_T_MARGIN and NEWPAGE + to ensure accurate placement of first lines on new pages when + docprocessing is not taking place. -o Made BREAKQUOTE obsolete; rewrote sections of footnote handling, - including adding support macros to deal with processing of - footnotes that were started inside quotes, blockquotes and - epigraphs. + o Made NEWPAGE it's own macro; formerly just an alias of .bp. -o Added a TERMINATE .em to docprocessing (except letters) to ensure - that deferred footnotes print on the last page of a doc. + o Made BREAKQUOTE obsolete; rewrote sections of footnote handling, + including adding support macros to deal with processing of + footnotes that were started inside quotes, blockquotes and + epigraphs. -*Mar 15 2004 + o Added a TERMINATE .em to docprocessing (except letters) to + ensure that deferred footnotes print on the last page of a doc. -o Added color support +* Mar 15 2004 -o Adjusted vertical placement of hyphens around page numbering - so that they are better centered on the height of the page - number. + o Added color support -o Re-wrote portions of the document processing macros so that tabs - behave in a consistent and intuitive manner. Tab structures are - now properly preserved from page to page and column to column. + o Adjusted vertical placement of hyphens around page numbering so + that they are better centered on the height of the page number. -*Mar 05 2004 + o Re-wrote portions of the document processing macros so that tabs + behave in a consistent and intuitive manner. Tab structures are + now properly preserved from page to page and column to column. -o Makefile.sub (GROFF_BIN_PATH): Use SH_SEP. +* Mar 05 2004 + o Makefile.sub (GROFF_BIN_PATH): Use SH_SEP. -*Feb 20 2004 +* Feb 20 2004 -o Rewrote the macros associated with DOCTYPE LETTER so that the - user can enter DATE, TO and FROM in any order s/he likes. For - backward compatibility, if the older, fixed order (DATE-TO-FROM) - is used, the date goes flush right with two linespaces after - it, while the other fields go flush left with a single linespace - separating them. + o Rewrote the macros associated with DOCTYPE LETTER so that the + user can enter DATE, TO and FROM in any order s/he likes. For + backward compatibility, if the older, fixed order (DATE-TO-FROM) + is used, the date goes flush right with two linespaces after it, + while the other fields go flush left with a single linespace + separating them. -o Fixed handling of DOCHEADER OFF when fell - short of the top margin of running text (the change is actually - in the SHIM macro, which is called by DOCHEADER). + o Fixed handling of DOCHEADER OFF when fell + short of the top margin of running text (the change is actually in + the SHIM macro, which is called by DOCHEADER). -o Added a selection of iso 639 two-letter language codes as - optional arguments to SMARTQUOTES, so that the use can enter - her/his language code to get language specific quoting styles + o Added a selection of iso 639 two-letter language codes as + optional arguments to SMARTQUOTES, so that the use can enter + her/his language code to get language specific quoting styles -o Changed the way the strings for \*[ST], \*[STX], \*[FU] - and \*[BU] are read. Formerly, they were entered literally. - Now they're entered as an array. + o Changed the way the strings for \*[ST], \*[STX], \*[FU] + and \*[BU] are read. Formerly, they were entered literally. + Now they're entered as an array. -*Jan 24 2004 +* Jan 24 2004 -o Added lists and associated macros. Mom now does (nested) lists. + o Added lists and associated macros. Mom now does (nested) lists. -o Added German-style lowered double quotes and two styles of - guillemets to SMARTQUOTES. + o Added German-style lowered double quotes and two styles of + guillemets to SMARTQUOTES. -o Added macro SIZE, intended to be called inline as \*[SIZE ]. - This is to bring mom's inline size change syntax into line with - her other inlines. + o Added macro SIZE, intended to be called inline as \*[SIZE ]. + This is to bring mom's inline size change syntax into line with + her other inlines. -o Added ESC_CHAR as an alias of .ec + o Added ESC_CHAR as an alias of .ec -o Added doc entries for lists. + o Added doc entries for lists. -o Updated SMARTQUOTES entry in docs. + o Updated SMARTQUOTES entry in docs. -o Updated reserved words in docs. + o Updated reserved words in docs. -o Fixed a few more typos in docs. + o Fixed a few more typos in docs. -*Mon Dec 29 2003 +* Mon Dec 29 2003 -o Makefile.sub (GROFF_BIN_PATH): Use $(SEP). + o Makefile.sub (GROFF_BIN_PATH): Use $(SEP). -*Tue Oct 21 2003 +* Tue Oct 21 2003 -o Changed \n[#DRAFT] and \n[#REVISION] to strings \*[$DRAFT] and - \*[$REVISION], allowing for the possibility of blank entries that - don't mess up headers/footers with zeros if user doesn't want any - numbers. + o Changed \n[#DRAFT] and \n[#REVISION] to strings \*[$DRAFT] and + \*[$REVISION], allowing for the possibility of blank entries that + don't mess up headers/footers with zeros if user doesn't want any + numbers. -o Extended handling of draft and revision numbers and strings in - headers/footers for increased flexibility. It's possible now to - have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING - and REVISION, and have them come out in headers/footers as one - intuitively expects/wants. + o Extended handling of draft and revision numbers and strings in + headers/footers for increased flexibility. It's possible now to + have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING + and REVISION, and have them come out in headers/footers as one + intuitively expects/wants. -Mon Oct 13 2003 +* Mon Oct 13 2003 -o Finally fix change 2003-08-26, based on ideas from Chuck Silvers - . + o Finally fix change 2003-08-26, based on ideas from Chuck Silvers + . - Makefile.sub: Use a stamp file in the `examples' directory. + o Makefile.sub: Use a stamp file in the `examples' directory. -Sun Aug 31 2003 +* Sun Aug 31 2003 -o Makefile.sub: Fix last change to make it really work. + o Makefile.sub: Fix last change to make it really work. -Tue Aug 26 2003-08-26 +* Tue Aug 26 2003-08-26 -o Makefile.sub (prepare_make_examples): Make it work with parallel - runs of `make'. Patch from Chuck Silvers . + o Makefile.sub (prepare_make_examples): Make it work with parallel + runs of `make'. Patch from Chuck Silvers . -*Fri Jul 25 2003 +* Fri Jul 25 2003 -o Added a .bp after .if \\n[#START]=1 in FOOTER. Without it, - in document processing mode, documents that use *none* of the - docprocessing tags (yes, there are times when users want to do - this) ignored the footer trap. + o Added a .bp after .if \\n[#START]=1 in FOOTER. Without it, in + document processing mode, documents that use *none* of the + docprocessing tags (yes, there are times when users want to do + this) ignored the footer trap. -*Fri Jun 6 2003 +* Fri Jun 6 2003 -o Changed register #DOCHEADER_LEAD_ADJ to string - $DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer - requires a unit of measure; points is assumed. + o Changed register #DOCHEADER_LEAD_ADJ to string + $DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer + requires a unit of measure; points is assumed. -*Tue Jun 3 2003 +* Tue Jun 3 2003 -o Added SHIM macro, which, when invoked, calculates and moves to - the next "valid" baseline in document processing. + o Added SHIM macro, which, when invoked, calculates and moves to + the next "valid" baseline in document processing. -o Corrected handling of DOCHEADER OFF so that the first - line of running text falls on a "valid" baseline when - is given. + o Corrected handling of DOCHEADER OFF so that the first + line of running text falls on a "valid" baseline when + is given. -*Wed May 21 2003 +* Wed May 21 2003 -o DOC_TITLE changed to be used exclusively with DOCTYPE DEFAULT + o DOC_TITLE changed to be used exclusively with DOCTYPE DEFAULT -o Fixed problem with restoration of previous doc pagenum - style when endnotes use a different pagenum style (set with - ENDNOTES_PAGENUM_STYLE) + o Fixed problem with restoration of previous doc pagenum style + when endnotes use a different pagenum style (set with + ENDNOTES_PAGENUM_STYLE) -o Fixed handling of headers/footers with respect to endnotes. Now, - when either headers or footers are on, mom picks up the correct - page header/footer on the last page prior to ENDNOTES, gets the - pageheaders correct for endnotes pages *including the last one*, - and picks up correct page headers/footers for the subsequent docs - after COLLATE + o Fixed handling of headers/footers with respect to endnotes. + Now, when either headers or footers are on, mom picks up the + correct page header/footer on the last page prior to ENDNOTES, + gets the pageheaders correct for endnotes pages *including the + last one*, and picks up correct page headers/footers for the + subsequent docs after COLLATE -*Sat May 17 2003 +* Sat May 17 2003 -o Added TOC (finally) and a nearly complete set of associated - control macros + o Added TOC (finally) and a nearly complete set of associated + control macros -o Added new control macros to endnotes: + o Added new control macros to endnotes: - ENDNOTES_STRING_CAPS - capitalize the endnotes string - ENDNOTES_NO_COLUMNS - allows docs in columns and endnotes not - ENDNOTES_PAGENUM_STYLE - set page numbering style for endnotes - ENDNOTES_FIRST_PAGENUMBER - set first pagenumber for endnotes - ENDNOTES_ALLOWS_HEADERS - page headers on endnotes pages off or on - ENDNOTES_NO_FIRST_PAGENUM - allows non-printing first page number when page footers are being used instead of headers - ENDNOTES_SINGLE_SPACE - for TYPEWRITE, if doc double-spaced - SUSPEND/RESTORE_PAGINATION - turns page numbering off for endnotes + ENDNOTES_STRING_CAPS - capitalize the endnotes string + ENDNOTES_NO_COLUMNS - allows docs in columns and endnotes not + ENDNOTES_PAGENUM_STYLE - set page numbering style for endnotes + ENDNOTES_FIRST_PAGENUMBER - set first pagenumber for endnotes + ENDNOTES_ALLOWS_HEADERS - page headers on endnotes pages off or on + ENDNOTES_NO_FIRST_PAGENUM - allows non-printing first page number + when page footers are being used instead of headers + ENDNOTES_SINGLE_SPACE - for TYPEWRITE, if doc double-spaced + SUSPEND/RESTORE_PAGINATION - turns page numbering off for endnotes -o Added an ADJUST option to ENDNOTE_LEAD + o Added an ADJUST option to ENDNOTE_LEAD -o Added DOC_TITLE (like TITLE, but sets document-wide title for collated docs) + o Added DOC_TITLE (like TITLE, but sets document-wide title for + collated docs) -o Added HDRFTR_CENTER_PAD, to allow adjustments to placement of - HDRFTR_CENTER_STRING + o Added HDRFTR_CENTER_PAD, to allow adjustments to placement of + HDRFTR_CENTER_STRING -o Added BLANKPAGE macro, to output blank pages (silently numbered) + o Added BLANKPAGE macro, to output blank pages (silently numbered) -o Extensive changes to DEFAULTS, START, COLLATE, HEAD, SUBHEAD and - PARAHEAD because of new TOC and extended flexibility of ENDNOTES - page design + o Extensive changes to DEFAULTS, START, COLLATE, HEAD, SUBHEAD and + PARAHEAD because of new TOC and extended flexibility of ENDNOTES + page design -o Fixed DOCHEADER OFF (distance), FINIS + o Fixed DOCHEADER OFF (distance), FINIS -Sat Apr 05 2003 +* Sat Apr 05 2003 -o Makefile.sub (GROFFBIN): New variable for groff binary path. - (groff_bin_path): Rename to GROFF_BIN_PATH. - (GROFF): Use GROFFBIN and GROFF_BIN_PATH. + o Makefile.sub (GROFFBIN): New variable for groff binary path. + (groff_bin_path): Rename to GROFF_BIN_PATH. + (GROFF): Use GROFFBIN and GROFF_BIN_PATH. - Patch from Maciej W. Rozycki . + Patch from Maciej W. Rozycki . ----------------------------------------------------------------------- -*Sat Feb 22 2003 +* Sat Feb 22 2003 -o (Re)-fixed handling of post epigraph spacing after #START for - TYPEWRITE double-spaced. + o (Re)-fixed handling of post epigraph spacing after #START for + TYPEWRITE double-spaced. ------------------------------------------------------------------------ -*Sun Feb 16 2003 +* Sun Feb 16 2003 -o Added James Ramsey's proposed CHAPTER_TITLE macro, along with his - rewritten START macro and his utility macros to make START easier - to read. + o Added James Ramsey's proposed CHAPTER_TITLE macro, along with + his rewritten START macro and his utility macros to make START + easier to read. -o Expanded handling of CHAPTER_TITLE to encompass TYPEWRITE, as well as - plugging it into the docheaders. Made CHAPTER_TITLE backwardly - compatible so that pre-1.1.5 docs using CHAPTER_STRING to create a - chapter title remain unaffected when groffed with 1.1.5. + o Expanded handling of CHAPTER_TITLE to encompass TYPEWRITE, as + well as plugging it into the docheaders. Made CHAPTER_TITLE + backwardly compatible so that pre-1.1.5 docs using CHAPTER_STRING + to create a chapter title remain unaffected when groffed with + 1.1.5. -o Created control macros for CHAPTER_TITLE FAMILY, FONT and SIZE. - Added defaults for handling of CHAPTER title to DEFAULTS. Documented - CHAPTER_TITLE and everything that goes along with it. + o Created control macros for CHAPTER_TITLE FAMILY, FONT and SIZE. + Added defaults for handling of CHAPTER title to DEFAULTS. + Documented CHAPTER_TITLE and everything that goes along with it. -o Fixed broken draft and revision in headers/footers. + o Fixed broken draft and revision in headers/footers. -o Fixed \*[RULE] so that it behaves properly with indents and justified - copy. + o Fixed \*[RULE] so that it behaves properly with indents and + justified copy. -o Fixed/tweaked handling of epigraph spacing in TYPEWRITE. + o Fixed/tweaked handling of epigraph spacing in TYPEWRITE. -o Fixed broken spacing of docheaders in TYPEWRITE. + o Fixed broken spacing of docheaders in TYPEWRITE. -*Mon Feb 3 2003 +* Mon Feb 3 2003 -o Fixed an oversight in CLOSING for DOCTYPE LETTER (closing wasn't - being set flush left) + o Fixed an oversight in CLOSING for DOCTYPE LETTER (closing wasn't + being set flush left) -*Sun Sep 29 2002 +* Sun Sep 29 2002 -o Changed .ne in .HEAD when PRINTSTYLE TYPESET from 5 to 4. With 5, - heads required at least 2 lines of text underneath or they'd be - defered to the next page, which created too much whitespace at the - end of the page. Heads will now be processed on the same page if the - head plus at least one line of text underneath fits. I figure it's - easier for the user to break to a new page manually if this behaviour - is unsatisfactory than to massage the page to fix the excess - whitespace. + o Changed .ne in .HEAD when PRINTSTYLE TYPESET from 5 to 4. With + 5, heads required at least 2 lines of text underneath or they'd be + defered to the next page, which created too much whitespace at the + end of the page. Heads will now be processed on the same page if + the head plus at least one line of text underneath fits. I figure + it's easier for the user to break to a new page manually if this + behaviour is unsatisfactory than to massage the page to fix the + excess whitespace. -*Sun Aug 25 2002 +* Sun Aug 25 2002 -o Changed .IX to .IQ. The older form still works, but emits a message - advising the user to update to the newer. (The macro in om.tmac - still remains IX; IQ is an alias.) Docs updated to reflect the - change. + o Changed .IX to .IQ. The older form still works, but emits a + message advising the user to update to the newer. (The macro in + om.tmac still remains IX; IQ is an alias.) Docs updated to + reflect the change. -*Tue Aug 20 2002 +* Tue Aug 20 2002 -o Added new (better) way to handle inline kerning. \*[BU #] and - \*[FU #] allow passing an argument to the inline string. The older - forms \*[BU#] and \*[FU#] still work, though. + o Added new (better) way to handle inline kerning. \*[BU #] and + \*[FU #] allow passing an argument to the inline string. The + older forms \*[BU#] and \*[FU#] still work, though. -o Changed handling of inline horizontal and vertical movements. - Horizontal movements are now done with \*[BCK #] and - \*[FWD #]; verticals with \*[UP #] and \*[DOWN #]. - The older forms \*[FP#] and \*[BP#] still work (horizontals), as do - \*[ALD#] and \*[RLD#] (verticals). + o Changed handling of inline horizontal and vertical movements. + Horizontal movements are now done with \*[BCK #] and \*[FWD + #]; verticals with \*[UP #] and \*[DOWN #]. The + older forms \*[FP#] and \*[BP#] still work (horizontals), as do + \*[ALD#] and \*[RLD#] (verticals). ------------------------------------------------------------------------ -*Mon Aug 19 2002 +* Mon Aug 19 2002 -o Fixed ENDNOTES so footnotes output properly when ENDNOTES is called + o Fixed ENDNOTES so footnotes output properly when ENDNOTES is + called -o Added ENDNOTES_HDRFTR_CENTER so that default no-print of header - center string on endnotes page(s) when DOCTYPE is CHAPTER can - be disabled (i.e. header center will be printed). + o Added ENDNOTES_HDRFTR_CENTER so that default no-print of header + center string on endnotes page(s) when DOCTYPE is CHAPTER can be + disabled (i.e. header center will be printed). -*Sat Aug 10 2002 +* Sat Aug 10 2002 -o Added .nf to top of PAD, with a test beforehand for current fill - mode. If fill mode was on, it's restored after PAD completes - processing. Updated reserved.html to include number register - #FILL_MODE. + o Added .nf to top of PAD, with a test beforehand for current fill + mode. If fill mode was on, it's restored after PAD completes + processing. Updated reserved.html to include number register + #FILL_MODE. -*Fri Jul 12 2002 +* Fri Jul 12 2002 -o More fixes to underlining. + o More fixes to underlining. -*Fri Jul 5 2002 +* Fri Jul 5 2002 -o Added capability of endnotes and pertinent control macros to om.tmac. + o Added capability of endnotes and pertinent control macros to + om.tmac. -o Added document entries pertaining to endnote macros. + o Added document entries pertaining to endnote macros. -o Incorporated endnote macros into elvis_syntax. + o Incorporated endnote macros into elvis_syntax. -o Small doc fixes. + o Small doc fixes. -o Tidied up indenting of om.tmac. + o Tidied up indenting of om.tmac. -o Fixed handling of underlining of italics in PRINTSTYLE TYPEWRITE - (there was a problem with footnotes getting underlined when they - shouldn't have been). + o Fixed handling of underlining of italics in PRINTSTYLE TYPEWRITE + (there was a problem with footnotes getting underlined when they + shouldn't have been). -o Removed ENDNOTES from TODO + o Removed ENDNOTES from TODO -o Fixed the character translations for UNDERLINE so they work properly - with digraphs. + o Fixed the character translations for UNDERLINE so they work + properly with digraphs. -*Mon Jul 1 2002 +* Mon Jul 1 2002 -o Expanded docprocessing.html entry "Special Note on Chapters". Tidied - up html a bit. + o Expanded docprocessing.html entry "Special Note on Chapters". + Tidied up html a bit. -*Sat Jun 15 2002 +* Sat Jun 15 2002 -o Small fix to PAD to make the use of inlines within the pad string - more intuitive. + o Small fix to PAD to make the use of inlines within the pad + string more intuitive. -o Added \*[RULE] ( = \l'\n(.lu' ) so that full measure rules (either to - full line length or within tabs) are easier to set. + o Added \*[RULE] ( = \l'\n(.lu' ) so that full measure rules + (either to full line length or within tabs) are easier to set. -*Sat Jun 8 2002 +* Sat Jun 8 2002 -o Macro .PS renamed to .PT_SIZE. Alias .TS removed. + o Macro .PS renamed to .PT_SIZE. Alias .TS removed. -o .tr bits in .CAPS rewritten in the form .tr é\[`E]. + o .tr bits in .CAPS rewritten in the form .tr é\[`E]. -o General cleanup of docs to reflect changes + o General cleanup of docs to reflect changes -o Small changes/additions to elvis_syn + o Small changes/additions to elvis_syn -*Thu Jun 6 2002 +* Thu Jun 6 2002 -o In DOCTYPE, in .if '\\$1'LETTER', added .FOOTER_RIGHT_SIZE +0. - Without it, the suite page was printing at the default - FOOTER_RIGHT_SIZE of -.5, which didn't look good. + o In DOCTYPE, in .if '\\$1'LETTER', added .FOOTER_RIGHT_SIZE +0. + Without it, the suite page was printing at the default + FOOTER_RIGHT_SIZE of -.5, which didn't look good. -*Wed Jun 5 2002 +* Wed Jun 5 2002 -o Makefile.sub (TFLAG): Add `$(top_builddir)/tmac'. + o Makefile.sub (TFLAG): Add `$(top_builddir)/tmac'. -*Tue Jun 4 2002 +* Tue Jun 4 2002 -o Makefile.sub (groff_bin_dirs): Fix typo (forgotten `src' element). + o Makefile.sub (groff_bin_dirs): Fix typo (forgotten `src' + element). -*Mon Jun 3 2002 +* Mon Jun 3 2002 -o Makefile.sub (uninstall_sub): Don't use `momdocdir' but `htmldocdir'. - Add missing backslash. + o Makefile.sub (uninstall_sub): Don't use `momdocdir' but + `htmldocdir'. Add missing backslash. -*Sat Jun 1 2002 +* Sat Jun 1 2002 -o Makefile.in (prepare_make_examples): Test for `penguin.ps', not - `examples/penguin.ps'. + o Makefile.in (prepare_make_examples): Test for `penguin.ps', not + `examples/penguin.ps'. -*Wed May 29 2002 +* Wed May 29 2002 -o Rewrote portions of PAGENUM_STYLE and COPYSTYLE so that PAGENUM_STYLE - behaves as advertised. + o Rewrote portions of PAGENUM_STYLE and COPYSTYLE so that + PAGENUM_STYLE behaves as advertised. -*Fri May 24 2002 +* Fri May 24 2002 -o /Makefile.sub (momdocdir): Removed. - (HTMLDOCFILES): Prepend `momdoc/'. - (EXTRAEXAMPLEFILES): Removed. Added entries to... - (EXAMPLEFILES): This. - (.SUFFIXES, .mom.ps): New. - (prepare_make_examples): Updated. - (examples/*.ps): Removed; .mom.ps will handle this. - (install_data): Updated. + o /Makefile.sub (momdocdir): Removed. + (HTMLDOCFILES): Prepend `momdoc/'. + (EXTRAEXAMPLEFILES): Removed. Added entries to... + (EXAMPLEFILES): This. + (.SUFFIXES, .mom.ps): New. + (prepare_make_examples): Updated. + (examples/*.ps): Removed; .mom.ps will handle this. + (install_data): Updated. -*Thu May 23 2002 +* hu May 23 2002 -o Applied two small bug fixes to om.tmac (patches 1.1.1a and 1.1.1b). + o Applied two small bug fixes to om.tmac (patches 1.1.1a and + 1.1.1b). -o mom is now part of groff. + o mom is now part of groff. -o Some renaming to avoid problems with 8+3 filesystems: + Some renaming to avoid problems with 8+3 filesystems: - examples/docprocessing_typeset.mom -> examples/typeset.mom - examples/docprocessing_typewrite.mom -> examples/typewrite.mom - examples/typesetting_macros.mom -> examples/macros.mom - examples/penguin_small2_bw.ps -> examples/penguin.ps + examples/docprocessing_typeset.mom -> examples/typeset.mom + examples/docprocessing_typewrite.mom -> examples/typewrite.mom + examples/typesetting_macros.mom -> examples/macros.mom + examples/penguin_small2_bw.ps -> examples/penguin.ps -o Removed `INSTALL' and `README' since groff takes care of installation - now. + o Removed `INSTALL' and `README' since groff takes care of + installation now. -o Added Makefile.sub. + o Added Makefile.sub. -o Added mom.tmac (which simply calls om.tmac). + o Added mom.tmac (which simply calls om.tmac). -o Added groff_mom.man for orthogonality; it simply points to the HTML - documentation. + o Added groff_mom.man for orthogonality; it simply points to the + HTML documentation. -*Thu May 16 2002 +* Thu May 16 2002 -o Added macro DRAFT_WITH_PAGENUMBER so user can have draft/revision - info attached to the pagenumber in COPYSTYLE DRAFT, instead of having - it HEADER center. Always having it HEADER center was creating problems - with long doc titles, esp. with PRINTSTYLE TYPEWRITE (which is when - COPYSTYLE DRAFT is most likely to be used). Now user has the choice, - in these circumstances, either to reduce HEADER_SIZE, or to displace - the draft/revision info. Also rewrote portions of COPYSTYLE so that - if no revision number is given in the reference macros, "Rev. #" - doesn't appear when COPYSTYLE DRAFT. + o Added macro DRAFT_WITH_PAGENUMBER so user can have + draft/revision info attached to the pagenumber in COPYSTYLE DRAFT, + instead of having it HEADER center. Always having it HEADER + center was creating problems with long doc titles, esp. with + PRINTSTYLE TYPEWRITE (which is when COPYSTYLE DRAFT is most likely + to be used). Now user has the choice, in these circumstances, + either to reduce HEADER_SIZE, or to displace the draft/revision + info. Also rewrote portions of COPYSTYLE so that if no revision + number is given in the reference macros, "Rev. #" doesn't appear + when COPYSTYLE DRAFT. -*Fri May 10 2002 +* Fri May 10 2002 -o Added capability of user-defined, single string recto/verso - headers/footers. + o Added capability of user-defined, single string recto/verso + headers/footers. -o Added new entries to docs about the above. Made some additional - small changes to toc.html, rectoverso.html, and headfootpage.html - to supplement the new entries. + o Added new entries to docs about the above. Made some additional + small changes to toc.html, rectoverso.html, and headfootpage.html + to supplement the new entries. -o Small fix to handling of footer separator rule -- was 1 point too low - owing to fuzziness of #CAP_HEIGHT as returned by SIZESPECS. + o Small fix to handling of footer separator rule -- was 1 point + too low owing to fuzziness of #CAP_HEIGHT as returned by + SIZESPECS. -o Added some more useful stuff to elvis_syntax. + o Added some more useful stuff to elvis_syntax. -*Sun May 05 2002 +* Sun May 05 2002 -o Fix to DEFAULTS so that L_MARGIN and R_MARGIN are reprocessed if - DOCTYPE LETTER. R_MARGIN, as set by DOCTYPE LETTER had no preceding - PAGEWIDTH or PAPER from which to get #PAGE_WIDTH for figuring out - line length. + o Fix to DEFAULTS so that L_MARGIN and R_MARGIN are reprocessed if + DOCTYPE LETTER. R_MARGIN, as set by DOCTYPE LETTER had no + preceding PAGEWIDTH or PAPER from which to get #PAGE_WIDTH for + figuring out line length. -o Additional fix to DEFAULTS in handling DOCTYPE LETTER so that if user - sets line length prior to START, no reprocessing of R_MARGIN occurs. - This necessitated adding a new number register: #USER_SET_L_LENGTH + o Additional fix to DEFAULTS in handling DOCTYPE LETTER so that if + user sets line length prior to START, no reprocessing of R_MARGIN + occurs. This necessitated adding a new number register: + #USER_SET_L_LENGTH -*Sat May 04 23:48:05 EDT 2002 +* Sat May 04 23:48:05 EDT 2002 -o Added .cflags 4 /\(en -- was driving me nuts that lines wouldn't - break after these characters; I'm assuming others feel the same way + o Added .cflags 4 /\(en -- was driving me nuts that lines wouldn't + break after these characters; I'm assuming others feel the same + way * Fri May 03 2002 -o Made some small fixes to space handling around quotes, mostly to do - with quotes immediately after START and quotes after (sub)heads. + o Made some small fixes to space handling around quotes, mostly to + do with quotes immediately after START and quotes after + (sub)heads. * Wed May 01 2002 -o Fixed a small bug that was causing the first .PP after START to begin - at the top margin of the page regardless of any type that preceded - .PP when docheaders were off. + o Fixed a small bug that was causing the first .PP after START to + begin at the top margin of the page regardless of any type that + preceded .PP when docheaders were off. + + o Fixed HEADER so that when HEADERS are off the first line of type + on pages after the first falls properly at the top margin -o Fixed HEADER so that when HEADERS are off the first line of type on - pages after the first falls properly at the top margin +* Sat Apr 27 2002 -*Sat Apr 27 2002 + o Renamed docprocessing_macros.mom in /examples to + docprocessing_typeset.mom. Added docprocessing_typewrite.mom, as + well as a README file. -o Renamed docprocessing_macros.mom in /examples to - docprocessing_typeset.mom. Added docprocessing_typewrite.mom, as - well as a README file. + o Fixed UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) so they really + are on by default as the docs say. -o Fixed UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) so they really are - on by default as the docs say. + o Changes to doc entry on COLLATE: -o Changes to doc entry on COLLATE: + - removed bit about using COLLATE after a cover page (I wrote the + entry *before* I wrote the macro!). Cover pages should be + followed by NEWPAGE, not COLLATE. - - removed bit about using COLLATE after a cover page (I wrote the - entry *before* I wrote the macro!). Cover pages should be - followed by NEWPAGE, not COLLATE. + - added caution about mixing PRINTSTYLEs - - added caution about mixing PRINTSTYLEs + - added caution about using DOC_FAMILY to change family of all + document elements after COLLATE - - added caution about using DOC_FAMILY to change family of all - document elements after COLLATE + o Made HEADER_SIZE (and, by extension, FOOTER_SIZE) available to + PRINTSTYLE TYPEWRITE. Changed appropriate doc entries to reflect + this. -o Made HEADER_SIZE (and, by extension, FOOTER_SIZE) available to - PRINTSTYLE TYPEWRITE. Changed appropriate doc entries to reflect - this. +* Wed Apr 24 2002 -*Wed Apr 24 2002 + o Small change to DO_QUOTE to correct a problem with quotes and + blockquotes that fall in the middle of paragraphs (i.e. text after + the quote is not a new para). Basically, added a bit that stores + the current para indent, sets para indent to 0, invokes a PP, then + restores the original para indent. -o Small change to DO_QUOTE to correct a problem with quotes and - blockquotes that fall in the middle of paragraphs (i.e. text after - the quote is not a new para). Basically, added a bit that stores the - current para indent, sets para indent to 0, invokes a PP, then - restores the original para indent. + o Added new macro, BREAK_QUOTE, to deal with the problem of + footnotes in quotes and blockquotes that cross pages or columns. -o Added new macro, BREAK_QUOTE, to deal with the problem of - footnotes in quotes and blockquotes that cross pages or columns. + Quotes and blockquotes are read into diversions, which means they + get their footnote information from the page/column on which they + were started. If a footnoted quote crosses a page/column, what + sometimes happens is that the footnote itself is output at the + bottom of page/column where the quote started, whereas the text + marker for the footnote appears on the next page/column where the + quote ends. Furthermore, the text marker is the one appropriate + to the previous page. BREAK_QUOTE is a workaround. - Quotes and blockquotes are read into diversions, which means they - get their footnote information from the page/column on which they - were started. If a footnoted quote crosses a page/column, what - sometimes happens is that the footnote itself is output at the - bottom of page/column where the quote started, whereas the text - marker for the footnote appears on the next page/column where the - quote ends. Furthermore, the text marker is the one appropriate - to the previous page. BREAK_QUOTE is a workaround. + o Added directory /examples to archive. -o Added directory /examples to archive. + o Added typesetting_macros.mom, docprocessing_macros.mom, + elvis_syntax and penguin_small2_bw.ps to /examples. -o Added typesetting_macros.mom, docprocessing_macros.mom, elvis_syntax - and penguin_small2_bw.ps to /examples. + o Added BREAK_QUOTE to docs, made some additions to reserved words + list, and corrected a few little doc errors. -o Added BREAK_QUOTE to docs, made some additions to reserved words - list, and corrected a few little doc errors. +* Mon Apr 22 2002 -*Mon Apr 22 2002 + o Added default .L_MARGIN 1i and .R_MARGIN 1i to PAPER, PAGE, and + PAGEWIDTH. L_MARGIN is essential otherwise left indents and tabs + don't have a register #L_MARGIN to work with. The default right + margin is a convenience only. Updated the doc entries for + L_MARGIN and R_MARGIN to reflect the change. -o Added default .L_MARGIN 1i and .R_MARGIN 1i to PAPER, PAGE, and - PAGEWIDTH. L_MARGIN is essential otherwise left indents and tabs - don't have a register #L_MARGIN to work with. The default right - margin is a convenience only. Updated the doc entries for L_MARGIN - and R_MARGIN to reflect the change. +* Sun Apr 21 2002 -*Sun Apr 21 2002 + o Changes to COLLATE: -o Changes to COLLATE: + - added some "resets" (LL, LS, QUAD) + - added a check for whether pagination is at page top (either + because FOOTERS are on or because PAGENUM_POS was user set). + If pagination is on, and PAGENUM_POS is TOP, it's turned off + for next page (start of next collated document) and restored + for subsequent pages unless PAGENUM_ON_FIRST_PAGE is on, in + which case the page number appears at page top. - - added some "resets" (LL, LS, QUAD) - - added a check for whether pagination is at page top (either - because FOOTERS are on or because PAGENUM_POS was user set). - If pagination is on, and PAGENUM_POS is TOP, it's turned off - for next page (start of next collated document) and restored - for subsequent pages unless PAGENUM_ON_FIRST_PAGE is on, in - which case the page number appears at page top. + o The macro TRAPS is always invoked at the end of DEFAULTS (which + is called by START). Formerly, TRAPS was only invoked at the + start of a doc, not after COLLATE. Now runs after COLLATE as + well. -o The macro TRAPS is always invoked at the end of DEFAULTS (which is - called by START). Formerly, TRAPS was only invoked at the start - of a doc, not after COLLATE. Now runs after COLLATE as well. + o Distance from $DOC_TYPE in DOCTYPE NAMED "" to start of + running text was one linespace too deep. Fixed (in START). -o Distance from $DOC_TYPE in DOCTYPE NAMED "" to start of - running text was one linespace too deep. Fixed (in START). + o When 1st arg to PAGENUM_POS was user set to TOP, running text + was printing 1 linespace too high, even when PAGINATION was OFF. + Same problem when HEADERS were OFF (i.e. nothing in the header + margin at all). Fixed by removing -\\n[#DOC_LEAD]u from all .sp + |\\n[#T_MARGIN]u calls of .el portion after .ie \\n[#HEADERS_ON]. -o When 1st arg to PAGENUM_POS was user set to TOP, running text was - printing 1 linespace too high, even when PAGINATION was OFF. Same - problem when HEADERS were OFF (i.e. nothing in the header margin at - all). Fixed by removing -\\n[#DOC_LEAD]u from all .sp |\\n[#T_MARGIN]u - calls of .el portion after .ie \\n[#HEADERS_ON]. + o Added new macro: PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS + are being used instead of HEADERS, mom doesn't print the page + number at the top of the first page of a doc, or the first page of + collated docs. New macro allows user to get mom to put the page + number on "first" pages if that's desired. Updated docs to + include the macro. -o Added new macro: PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS are - being used instead of HEADERS, mom doesn't print the page number at - the top of the first page of a doc, or the first page of collated - docs. New macro allows user to get mom to put the page number on - "first" pages if that's desired. Updated docs to include the macro. + o More little fixes to docs. -o More little fixes to docs. +* Thu Apr 18 2002 -*Thu Apr 18 2002 + o Fixed TI (temporary indent) so that it continues to work as + expected, even when called while another type of indent is in + effect. -o Fixed TI (temporary indent) so that it continues to work as expected, - even when called while another type of indent is in effect. +* Tue Apr 16 2002 -*Tue Apr 16 2002 + o String tabs weren't working as advertised when set from within a + tab. Fixed. Two new registers added: #ST_OFFSET and #IN_TAB. + String tabs now behave poperly and intuitively when set within + tabs. -o String tabs weren't working as advertised when set from within - a tab. Fixed. Two new registers added: #ST_OFFSET and #IN_TAB. - String tabs now behave poperly and intuitively when set within tabs. + o Added a note to docs about surrounding \w'...' escape with + double- quotes when it's used as an argument to macros -o Added a note to docs about surrounding \w'...' escape with double- - quotes when it's used as an argument to macros + o Added a note to docs that SILENT does not deposit a .br -o Added a note to docs that SILENT does not deposit a .br +* Mon Apr 15 2002 -*Mon Apr 15 2002 + o Added new macro BR_AT_LINE_KERN if user wants mom to deposit + .br's before .RW and/or .EW. -o Added new macro BR_AT_LINE_KERN if user wants mom to deposit .br's - before .RW and/or .EW. + o Added 1/4 points to inline escapes \*[ALD] and \*[RLD]. -o Added 1/4 points to inline escapes \*[ALD] and \*[RLD]. + o Added 1/4 points to inline escapes \*[FP] and \*[BP] -o Added 1/4 points to inline escapes \*[FP] and \*[BP] + o Updated docs to reflect the above changes. -o Updated docs to reflect the above changes. +* Fri Apr 12 2002 -*Fri Apr 12 2002 + o Fixed .RW and .EW which weren't working because of a missing \ + in \\n(.f register. Also made it so that .RW and .EW affect all + fonts in positions 1, 2, 3, and 4 at once, hence line kerning now + affects all fonts that appear after it, not just the font that was + current at the time of the macros' invocation. -o Fixed .RW and .EW which weren't working because of a missing \ in - \\n(.f register. Also made it so that .RW and .EW affect all fonts - in positions 1, 2, 3, and 4 at once, hence line kerning now affects - all fonts that appear after it, not just the font that was current at - the time of the macros' invocation. + o .SS and .WS now working properly. .WS no longer has any effect + on .SS, which remains constant regardless of .WS. Furthermore, + .SS no longer gets its value by adding \*[$SS_VAR] + \n[.ss]. + Instead, it remains constant. Don't know what I was thinking when + I wrote the routine in the first place. -o .SS and .WS now working properly. .WS no longer has any effect on - .SS, which remains constant regardless of .WS. Furthermore, .SS no - longer gets its value by adding \*[$SS_VAR] + \n[.ss]. Instead, - it remains constant. Don't know what I was thinking when I wrote - the routine in the first place. + o Updated and rewrote doc entry pertaining to SS -o Updated and rewrote doc entry pertaining to SS +* Wed Apr 10 2002 -*Wed Apr 10 2002 + o Renamed tmac.om to om.tmac to bring macro file's name into line + with current groff policy -o Renamed tmac.om to om.tmac to bring macro file's name into line - with current groff policy + o Added more standard paper sizes to PAPER. -o Added more standard paper sizes to PAPER. + o Fixed T_MARGIN, LS, and AUTOLEAD so that if T_MARGIN is set + before LS or AUTOLEAD at the top of a file, the first line of type + falls properly on the baseline set by T_MARGIN. Previously, LS + and AUTOLEAD automatically advanced by the value passed to them + before setting the first line of type, meaning that the first line + of type fell at T_MARGINu+1v instead of T_MARGIN. -o Fixed T_MARGIN, LS, and AUTOLEAD so that if T_MARGIN is set before LS - or AUTOLEAD at the top of a file, the first line of type falls - properly on the baseline set by T_MARGIN. Previously, LS and - AUTOLEAD automatically advanced by the value passed to them before - setting the first line of type, meaning that the first line of type - fell at T_MARGINu+1v instead of T_MARGIN. + o Updated docs to reflect changes. -o Updated docs to reflect changes. + o Removed #TEST_FOR_NUMERIC from list of reserved words. -o Removed #TEST_FOR_NUMERIC from list of reserved words. + o Added "t" and #T_MARGIN_SET to list of reserved words. -o Added "t" and #T_MARGIN_SET to list of reserved words. +* Sat Apr 6 2002 -*Sat Apr 6 2002 + o Added FACTOR arg to AUTOLEAD, so if user wants autolead to be a + factor of point size, instead of being the sum of pointsize + + autolead, s/he has the choice. Incorporated appropriate changes + to PS and LS. -o Added FACTOR arg to AUTOLEAD, so if user wants autolead to be a factor - of point size, instead of being the sum of pointsize + autolead, s/he - has the choice. Incorporated appropriate changes to PS and LS. + o Added new register #AUTOLEAD_FACTOR to reserved words. Modified + comments for AUTOLEAD, PS, and LS to reflect changes. Also + corrected an error where #AUTOLEAD_VALUE had mistakenly been + written $AUTOLEAD_VALUE in comments in the macro file, and removed + erroneous | . Updated AUTOLEAD entry in + momdoc/typesetting.html to reflect the changes. -o Added new register #AUTOLEAD_FACTOR to reserved words. Modified - comments for AUTOLEAD, PS, and LS to reflect changes. Also - corrected an error where #AUTOLEAD_VALUE had mistakenly been written - $AUTOLEAD_VALUE in comments in the macro file, and removed erroneous - | . Updated AUTOLEAD entry in momdoc/typesetting.html - to reflect the changes. +* Wed Apr 3 2002 -*Wed Apr 3 2002 + o Cleaned up html errors in the docs. -o Cleaned up html errors in the docs. + o Added "Next," "Prev" and "Top" links to top and bottom of doc + files. -o Added "Next," "Prev" and "Top" links to top and bottom of doc files. + o Fixed some typos in the docs. -o Fixed some typos in the docs. +________________________________________________________________________ +##### License -Copyright 2004-2012 - Free Software Foundation, Inc. +Copyright 2004-2014 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. +##### Emacs settings Local Variables: version-control: never +mode: change-log coding: latin-1 End: diff -ruN groff-1.22.2/contrib/mom/copyright groff-1.22.3/contrib/mom/copyright --- groff-1.22.2/contrib/mom/copyright 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/mom/copyright 2014-11-04 09:38:35.502520534 +0100 @@ -1,14 +1,15 @@ +-*- text -*- AUTHOR ------ Peter Schaffter (peter@schaffter.ca) -1-355 Lafontaine Ave -Ottawa (ON) K1L 6X6 +3-355 Lafontaine Ave +Vanier (ON) CANADA +K1L 6X6 ======================================================================== -The groff macro file om.tmac and the html documentation pertaining -to it are copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013 Peter Schaffter. +The groff macro file om.tmac and the html documentation pertaining to +it are Copyright (C) 2004-2014 Peter Schaffter. om.tmac is issued under the GNU General Public License, a full copy of which can be had at diff -ruN groff-1.22.2/contrib/mom/examples/elvis_syntax groff-1.22.3/contrib/mom/examples/elvis_syntax --- groff-1.22.2/contrib/mom/examples/elvis_syntax 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/elvis_syntax 2014-11-04 09:38:35.606519234 +0100 @@ -1,5 +1,4 @@ -" Copyright 2004, 2005, 2006, 2009 -" Free Software Foundation, Inc. +" Copyright (C) 2004-2014 Free Software Foundation, Inc. " " Copying and distribution of this file, with or without modification, " are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mom/examples/elvis_syntax.new groff-1.22.3/contrib/mom/examples/elvis_syntax.new --- groff-1.22.2/contrib/mom/examples/elvis_syntax.new 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/elvis_syntax.new 2014-11-04 09:38:35.606519234 +0100 @@ -1,5 +1,4 @@ -" Copyright 2004, 2005, 2006, 2009, 2010, 2011, 2012 -" Free Software Foundation, Inc. +" Copyright (C) 2004-2014 Free Software Foundation, Inc. " " Copying and distribution of this file, with or without modification, " are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mom/examples/letter.mom groff-1.22.3/contrib/mom/examples/letter.mom --- groff-1.22.2/contrib/mom/examples/letter.mom 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/letter.mom 2014-11-04 09:38:35.606519234 +0100 @@ -1,5 +1,6 @@ -\# Copyright 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013 -\# Free Software Foundation, Inc. +.\" -*- mode: troff; coding: utf-8; -*- +. +\# Copyright (C) 2004-2014 Free Software Foundation, Inc. \# \# Copying and distribution of this file, with or without modification, \# are permitted in any medium without royalty provided the copyright @@ -12,7 +13,7 @@ .DATE August 25, 2013 .TO -GUILLAUME BARRIÈRES +GUILLAUME BARRIÈRES Minidoux Corporation 5000 Pannes Drive Redmond, Virginia @@ -20,10 +21,10 @@ .FROM Y.P. GUIQUE 022 Umask Road -St-Sauveur-en-dehors-de-la-mappe, Québec +St-Sauveur-en-dehors-de-la-mappe, Québec CANADA .GREETING -Dear Mr. Barrières, +Dear Mr. Barrières, .PP It has come to my attention that you have been lobbying the US government to prohibit the use of open source software by diff -ruN groff-1.22.2/contrib/mom/examples/mom-pdf.mom groff-1.22.3/contrib/mom/examples/mom-pdf.mom --- groff-1.22.2/contrib/mom/examples/mom-pdf.mom 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/mom-pdf.mom 2014-11-04 09:38:35.606519234 +0100 @@ -1,3 +1,17 @@ +.\" -*- nroff -*- +.\" Copyright (C) 2012-2014 Free Software Foundation, Inc. +.\" +.\" This file is part of mom, which is part of groff, a free software +.\" project. +.\" +.\" You can redistribute it and/or modify it under the terms of the +.\" GNU General Public License as published by the "Free Software + \" Foundation", version\~2. +.\" +.\" The license text is available in the internet at +.\" +.\" +.PAPER A4 .\" Reference macros (metadata) .TITLE "Producing PDFs" "with groff and mom" .PDF_TITLE "\*[$TITLE] @@ -20,7 +34,7 @@ ".IL 2P" \ ".PDF_WWW_LINK http://www.gnu.org/licenses/" \ ".IQ CLEAR" -.COPYRIGHT "20\*[BU3]1\*[BU2]2 Deri James and Peter Schaffter +.COPYRIGHT "20\*[BU3]1\*[BU2]2 Free Software Foundation .ATTRIBUTE_STRING "" \" Don't print 'by' .PDF_BOOKMARKS_OPEN 2 .\" Cover and page header @@ -28,7 +42,6 @@ .HEADER_LEFT "James, Schaffter" .\" Page, style, formatting .PRINTSTYLE TYPESET -.PAPER A4 .L_MARGIN 2.5c .R_MARGIN 2.5c .B_MARGIN 2.5c @@ -106,7 +119,7 @@ .TOC_ENTRY_STYLE 2 FONT I .TOC_LEAD 14 .\" -.DOCHEADER_ADVANCE 4.5c \" Begin this distance down from top of page +.DOCHEADER_ADVANCE 5c \" Begin this distance down from top of page .\" .START .\" @@ -184,7 +197,7 @@ Furthermore, \*[cod]NAMED\|\*[codx] stores the text of the heading for use later on when linking to it (see .PDF_LINK internal SUFFIX ). + -If headings are being numbered, the heading number is included. +If headings are being numbered, the heading number is prepended. .HEADING 2 NAMED target "Creating destination points at arbitrary locations" .PP Any part of a document can be a link destination, not just headings. @@ -245,11 +258,13 @@ destination address. .PP2 The format of the macro to create external links is similar to the -one for creating internal links links links. +one for creating internal links: .COD "\&.PDF_WWW_LINK [PREFIX ] [SUFFIX ] [\[dq]\[dq]]" \*[cod]\*[codx] is any valid URL, usually a web address; \*[cod]PREFIX\|\*[codx] and \*[cod]SUFFIX\|\*[codx] have -exactly the same meaning. +exactly the same meaning, as does \*[cod]\*[codx], +which furthermore accepts the same expandos, \*[cod]\[dq]+\[dq]\*[codx] and +\*[cod]\[dq]*\[dq]\*[codx]. .PP2 .RW .1 If no hotlink text is given, then \*[cod]\*[codx] is @@ -509,12 +524,11 @@ do not require a corresponding \[-P-p] option on the command line. It is even possible to create documents with unequal-sized pages. -.NO_SHIM .HEADING 2 NAMED pdf-diff \ "Differences between pdfmom and pdfroff" .PP Several features described in this manual are not available when -using \[pdfmom] with the \[-Tps] option, or when using \[pdfroff] or +using \[pdfmom] with the \[-Tps] option, or when using \[pdfroff], or \[groff]\~\[-Tps]\~\[-mpdfmark]. .SP .25v .QUAD LEFT diff -ruN groff-1.22.2/contrib/mom/examples/mom.vim groff-1.22.3/contrib/mom/examples/mom.vim --- groff-1.22.2/contrib/mom/examples/mom.vim 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/mom.vim 2014-11-04 09:38:35.606519234 +0100 @@ -1,5 +1,4 @@ -" Copyright 2012 -" Free Software Foundation, Inc. +" Copyright (C) 2012-2014 Free Software Foundation, Inc. " " Copying and distribution of this file, with or without modification, " are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mom/examples/README.txt groff-1.22.3/contrib/mom/examples/README.txt --- groff-1.22.2/contrib/mom/examples/README.txt 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/README.txt 2014-11-04 09:38:35.606519234 +0100 @@ -1,5 +1,5 @@ - Copyright 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013 - Free Software Foundation, Inc. + -*- text -*- + Copyright (C) 2004-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mom/examples/sample_docs.mom groff-1.22.3/contrib/mom/examples/sample_docs.mom --- groff-1.22.2/contrib/mom/examples/sample_docs.mom 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/sample_docs.mom 2014-11-04 09:38:35.607519221 +0100 @@ -1,5 +1,4 @@ -\# Copyright 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013 -\# Free Software Foundation, Inc. +\# Copyright (C) 2004-2014 Free Software Foundation, Inc. \# \# Copying and distribution of this file, with or without modification, \# are permitted in any medium without royalty provided the copyright diff -ruN groff-1.22.2/contrib/mom/examples/typesetting.mom groff-1.22.3/contrib/mom/examples/typesetting.mom --- groff-1.22.2/contrib/mom/examples/typesetting.mom 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/examples/typesetting.mom 2014-11-04 09:38:35.607519221 +0100 @@ -1,5 +1,6 @@ -\# Copyright 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013 -\# Free Software Foundation, Inc. +.\" -*- mode: troff; coding: utf-8; -*- +. +\# Copyright (C) 2004-2014 Free Software Foundation, Inc. \# \# Copying and distribution of this file, with or without modification, \# are permitted in any medium without royalty provided the copyright @@ -81,27 +82,27 @@ \# .TAB 1 \" Notice that this tab gets set line-for-line \*[IT]Peelee Island \" Set italic -\*[PREV]Gewürztraminer \" Revert to former font (roman) +\*[PREV]Gewürztraminer \" Revert to former font (roman) 2000 (Canada) .MCR \" Return to top of column .TAB 2 \" Call tab 2; in multi-column mode, don't use .TN -Jaune pâle. +Jaune pâle. .MCR .TB 3 \" Notice that from here on, we use the alias TB instead of TAB -Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits +Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits tropicaux. .MCR .TB 4 -Doux, fruité, bien équilibré avec une bonne acidité. +Doux, fruité, bien équilibré avec une bonne acidité. .MCR .TB 5 -Bon apéro. Servir avec des plats +Bon apéro. Servir avec des plats .RW .1 \" Reduce Whitespace between letters to tighten this line indiens ou \%chinois. .RW 0 \" Back to normal spacing between letters .BR -Excellent rapport qualité/prix. +Excellent rapport qualité/prix. .MCX 8p \" Multi-column mode off; advance an extra 8 points .MCO \" Re-invoke multi-columns for next wine description .TB 1 @@ -111,11 +112,11 @@ (Uraguay) .MCR .TB 2 -Rubis foncé, vio\%lacée, presque opaque. +Rubis foncé, vio\%lacée, presque opaque. .MCR .TB 3 -Belles arômes de fruits foncés (prunes, cerises noires, cassis). -Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace +Belles arômes de fruits foncés (prunes, cerises noires, cassis). +Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace exotique de Band-Aid*\*[BU 12]. \# \# The \*[BU 12], above, pulls the period back so that it falls @@ -124,11 +125,11 @@ \# .MCR .TB 4 -Très rond, tannins mûres et veloutés, avec un long finis fruité et +Très rond, tannins mûres et veloutés, avec un long finis fruité et doucement alcoolique. .MCR .TB 5 -Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant. +Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant. .MCX 1v \" Multi-columns off; advance an extra linespace \# \# Now, an example of a hanging indent. This is excessively fussy diff -ruN groff-1.22.2/contrib/mom/groff_mom.man groff-1.22.3/contrib/mom/groff_mom.man --- groff-1.22.2/contrib/mom/groff_mom.man 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/mom/groff_mom.man 2014-11-04 09:38:35.502520534 +0100 @@ -1,21 +1,85 @@ -.ig -This file is part of groff, the GNU roff type-setting system. +.TH GROFF_MOM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_mom \- groff `mom' macros, `mom' is a `roff' language, part of `groff' +. +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2002-2014 Free Software Foundation, Inc. + +This file is part of groff, a free software project. + +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. + +You should have received a copy of the GNU General Public License +along with groff, see the files COPYING and LICENSE in the top +directory of the groff Text source package. -Copyright (C) 2002, 2003, 2005, 2008, 2009, 2011, 2012, 2013 - Free Software Foundation, Inc. -written by Werner Lemberg -revised 2012 by Peter Schaffter - -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. +Or read the manpage +.BR gpl (1). +You can also visit . +.. +. +.de au +mom was written by +.MT peter@schaffter.ca +Peter Schaffter +.ME +and revised by +.MT wl@gnu.org +Werner Lemberg +.ME . + +PDF support was provided by +.MT deri@chuzzlewit.demon.co.uk +Deri James +.ME . -A copy of the Free Documentation License is included as a file called -FDL in the main directory of the groff source package. +The alphabetical documentation of macros and escape seqauences in this +man\-page were written by the +.I mom +team. +.. +. +.\" -------------------------------------------------------------------- +.\" Setup +.\" -------------------------------------------------------------------- +. +.ds Ellipsis \&.\|.\|.\&\" +. +.hw line-space +. +. +.\" -------------------------------------------------------------------- +.\" .FONT ( [ ...]) +.\" +.\" Print in different fonts: R, I, B, CR, CI, CB +.\" +.de FONT +. if (\\n[.$] = 0) \{\ +. nop \&\f[P]\& +. return +. \} +. ds result \& +. while (\\n[.$] >= 2) \{\ +. as result \,\f[\\$1]\\$2 +. if !"\\$1"P" .as result \f[P]\"" +. shift 2 +. \} +. if (\\n[.$] = 1) .as result \,\f[\\$1] +. nh +. nop \\*[result]\& +. hy .. . +. .do nr groff_mom_C \n[.C] .cp 0 . @@ -25,25 +89,20 @@ .TP \\$1 .. . -.TH GROFF_MOM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. . -.SH NAME -. -groff_mom \- groff `mom' macros -. -. -.SH SYNOPSIS +.\" -------------------------------------------------------------------- +.SH "SYNOPSIS" +.\" -------------------------------------------------------------------- . .SY pdfmom .OP \-Tps "\fR[pdfroff options]" [groff options] -.I files .\|.\|. +.I files \*[Ellipsis] .YS . .SY groff .OP \-mom -.I files .\|.\|. +.I files \*[Ellipsis] .YS . .SY groff @@ -51,64 +110,111 @@ .I files .\|.\|. .YS . -.SH DESCRIPTION +. +.\" -------------------------------------------------------------------- +.SH CALLING MOM +.\" -------------------------------------------------------------------- . .B mom -is a macro set for groff, designed primarily to format documents for -PDF and PostScript output. +is a macro set for +.BR groff , +designed primarily to format documents for +.I PDF +and +.I PostScript +output. +. +. .P .B mom provides two categories of macros: macros for typesetting, and macros for document processing. -The typesetting macros provide access to groff's typesetting -capabilities in ways that are simpler to master than groff's +. +The typesetting macros provide access to groff\[aq]s typesetting +capabilities in ways that are simpler to master than groff\[aq]s primitives. +. The document processing macros provide highly customizable markup tags that allow the user to design and output professional-looking documents with a minimum of typesetting intervention. +. +. .P Files processed with -.B pdfmom -(man(@MAN1EXT@) -.BR pdfmom\c -), with or without the -.RI -T ps -option, produce PDF documents. -The documents include a PDF outline that appears in the -\[oq]Contents\[cq] panel of document viewers, and may contain -clickable internal and external links. +.BR pdfmom (@MAN1EXT@) +with or without the +.RI \-T ps +option, produce +.I PDF +documents. +. +The documents include a +.I PDF +outline that appears in the \[oq]Contents\[cq] panel of document +viewers, and may contain clickable internal and external links. +. +. .P When -.RI -T ps +.RI \-T ps is absent, -.B groff's -native PDF driver, -.B gropdf\c -, is used to generate the output. -When given, the output is still PDF, but processing is passed over to -.B pdfroff\c -, which uses -.B groff's +.B groff\[aq]s +native +.I PDF +driver, +.BR gropdf , +is used to generate the output. +. +When given, the output is still +.IR PDF , +but processing is passed over to +.BR pdfroff , +which uses +.B groff\[aq]s PostScript driver, -.B grops\c -\&. -Not all PDF features are available when -.RI -T ps +.BR grops \&. +Not all +.I PDF +features are available when +.RI \-T ps is given; its primary use is to allow processing of files with -embedded PostScript images. +embedded +.I PostScript +images. +. +. .P Files processed with -.B groff -mom +.B groff \-mom (or -.BI "-m " mom -) produce PostScript output by default. +.BI "\-m " mom\c +) produce +.I PostScript +output by default. +. +. .P -mom comes with her own very complete documentation in HTML format. -A separate PDF manual, -.I Producing PDFs with groff and mom\c -, covers full mom/PDF usage. +.B mom +comes with her own very complete documentation in +.I HTML +format. +. +A separate +.IR "PDF manual" , +.I Producing PDFs +with groff and +.BR mom , +covers full +.B mom +or +.I PDF +usage. +. . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B om.tmac \[en] the main macro file @@ -117,12 +223,11 @@ \[en] a wrapper file that calls om.tmac directly. . .TP -.UR \%@HTMLDOCDIR@/\:mom/\:toc.html -.UE +.B \%@HTMLDOCDIR@/\:mom/\:toc.html \[en] entry point to the HTML documentation . .TP -.BR \%@PDFDOCDIR@/\:mom-pdf.pdf +.B \%@PDFDOCDIR@/\:mom-pdf.pdf \[en] the PDF manual, .I Producing PDFs with groff and mom . @@ -131,26 +236,3180 @@ \[en] example files using mom . . -.SH AUTHOR +.\" -------------------------------------------------------------------- +.SH DOCUMENTATION IN ALPHABETICAL ORDER +.\" -------------------------------------------------------------------- . -.B mom -was written by -.MT peter@schaffter.ca -Peter Schaffter -.ME . -.br -PDF support was provided by -.MT deri@chuzzlewit.demon.co.uk -Deri James -.ME . -.sp -Please send bug reports to the -.MT bug-groff@gnu.org -groff-bug mailing list -.ME -or directly to the authors. . -.cp \n[groff_mom_C] +This part of the man-page contains information just as in groff(7), +.I mom macros +and +.I mom escape sequences +in alphabetical order. +. +. +.P +The logical order of +.I mom macros +and +.I mom escape sequences +is very well documented in +. +.TP +.B \%@HTMLDOCDIR@/\:mom/\:toc.html +\[en] entry point to the HTML documentation +. +. +.P +That document is quite good for beginners, but other users should be +happy to have some documentation in reference style. +. +. +.P +So we restrict this part to the alphabetical order of macros and +escape sequences. +. +But, so far, we took all documentation details from the +.I toc.html +file, just in a more useful alphabetical order. +. +. +So this part of the man-page is nothing new, but only a logical +arrangement. +. +. +.\" -------------------------------------------------------------------- +.SH "QUICK REFERENCE" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Quick Reference of Inline Escape Sequences in alphabetical Order" +.\" -------------------------------------------------------------------- +. +.TP +.FONT B \[rs]*[ I B ] +begin using an initialized colour inline +. +. +.TP +.FONT B \[rs]*[BCK I " n" B ] +move backwards in a line +. +. +.TP +.BI \[rs]*[BOLDER] +invoke pseudo bold inline (related to macro +.BR .SETBOLDER ) +. +. +.TP +.BI \[rs]*[BOLDERX] +off pseudo bold inline (related to macro +.BR .SETBOLDER ) +. +. +.TP +.FONT B \[rs]*[BU I " n" B ] +move characters pairs closer together inline (related to macro +.BR \%.KERN ) +. +. +.TP +.BI \[rs]*[COND] +invoke pseudo condensing inline (related to macro +.BR \%.CONDENSE ) +. +. +.TP +.BI \[rs]*[CONDX] +off pseudo condensing inline (related to macro +.BR \%.CONDENSE ) +. +. +.TP +.FONT B \[rs]*[CONDSUP] R \*[Ellipsis] B \[rs]*[CONDSUPX] +pseudo-condensed superscript +. +. +.TP +.FONT B \[rs]*[DOWN I " n" B ] +temporarily move downwards in a line +. +. +.TP +.BI \[rs]*[EN-MARK] +mark initial line of a range of line numbers (for use with line +numbered endnotes) +. +. +.TP +.BI \[rs]*[EXT] +invoke pseudo extending inline (related to macro +.BR \%.EXTEND ) +. +. +.TP +.BI \[rs]*[EXTX] +off pseudo condensing inline (related to macro +.BR \%.EXTEND ) +. +. +.TP +.FONT B \[rs]*[EXTSUP] R \*[Ellipsis] B \[rs]*[EXTSUPX] +pseudo extended superscript +. +. +.TP +.FONT B \[rs]*[FU I " n" B ] +move characters pairs further apart inline (related to macro +.BR \%.KERN ) +. +. +.TP +.FONT B \[rs]*[FWD I " n" B ] +move forward in a line +. +. +.TP +.BI \[rs]*[LEADER] +insert leaders at the end of a line +. +. +.TP +.BI \[rs]*[RULE] +draw a full measure rule +. +. +.TP +.FONT B \[rs]*[SIZE I " n" B ] +change the point size inline (related to macro +.BR \%.PT_SIZE ) +. +. +.TP +.BI \[rs]*[SLANT] +invoke pseudo italic inline (related to macro +.BR \%.SETSLANT ) +. +. +.TP +.BI \[rs]*[SLANTX] +off pseudo italic inline (related to macro +.BR \%.SETSLANT ) +. +. +.TP +.FONT B \[rs]*[ST I B ] R \*[Ellipsis] B \[rs]*[ST I B X] +string tabs (mark tab positions inline) +. +. +.TP +.FONT B \[rs]*[SUP] R \*[Ellipsis] B \[rs]*[SUPX] +superscript +. +. +.TP +.B \[rs]*[TB+] +inline escape for +.B .TN +.RI ( "Tab Next" ) +. +. +.TP +.FONT B \[rs]*[UL] R \*[Ellipsis] B \[rs]*[ULX] +invoke underlining inline (fixed width fonts only) +. +. +.TP +.FONT B \[rs]*[UP I " n" B ] +temporarily move upwards in a line +. +. +.\" -------------------------------------------------------------------- +.SS "Quick Reference of Macros in alphabetical Order" +.\" -------------------------------------------------------------------- +. +.TP +.BI .AUTOLEAD +set the linespacing relative to the point size +. +. +.TP +.BI .B_MARGIN +set a bottom margin +. +. +.TP +.BI .BR +break a justified line +. +. +.TP +.BI .CENTER +set line-by-line quad centre +. +. +.TP +.BI .CONDENSE +set the amount to pseudo condense +. +. +.TP +.BI .EL +break a line without advancing on the page +. +. +.TP +.BI .EXTEND +set the amount to pseudo extend +. +. +.TP +.BI .FALLBACK_FONT +establish a fallback font (for missing fonts) +. +. +.TP +.BI .FAM +alias to +.B .FAMILY +. +. +.TP +.BI ".FAMILY " +set the +.I family type +. +. +.TP +.BI .FT +set the font style (roman, italic, etc.) +. +. +.TP +.BI ".HI [" " " ] +hanging indent +. +. +.TP +.BI .HY +automatic hyphenation on/off +. +. +.TP +.BI .HY_SET +set automatic hyphenation parameters +. +. +.TP +.BI ".IB [" " " ] +indent both +. +. +.TP +.B .IBX [ CLEAR ] +exit indent both +. +. +.TP +.BI ".IL [" " " ] +indent left +. +. +.TP +.B .ILX [ CLEAR ] +exit indent left +. +. +.TP +.B .IQ [ CLEAR ] +quit any/all indents +. +. +.TP +.BI ".IR [" " " ] +indent right +. +. +.TP +.B .IRX [ CLEAR ] +exit indent right +. +. +.TP +.BI .JUSTIFY +justify text to both margins +. +. +.TP +.BI .KERN +automatic character pair kerning on/off +. +. +.TP +.BI .L_MARGIN +set a left margin (page offset) +. +. +.TP +.BI .LEFT +set line-by-line quad left +. +. +.TP +.BI .LL +set a line length +. +. +.TP +.BI .LS +set a linespacing (leading) +. +. +.TP +.BI .PAGE +set explicit page dimensions and margins +. +. +.TP +.BI .PAGEWIDTH +set a custom page width +. +. +.TP +.BI .PAGELENGTH +set a custom page length +. +. +.TP +.BI .PAPER " " +set common paper sizes (letter, A4, etc) +. +. +.TP +.BI .PT_SIZE +set the point size +. +. +.TP +.BI .QUAD +"justify" text left, centre, or right +. +. +.TP +.BI .R_MARGIN +set a right margin +. +. +.TP +.BI .RIGHT +set line-by-line quad right +. +. +.TP +.BI .SETBOLDER +set the amount of emboldening +. +. +.TP +.BI .SETSLANT +set the degree of slant +. +. +.TP +.BI .SPREAD +force justify a line +. +. +.TP +.BI .SS +set the sentence space size +. +. +.TP +.BI .T_MARGIN +set a top margin +. +. +.TP +.BI ".TI [" " " ] +temporary left indent +. +. +.TP +.BI .WS +set the minimum word space size +. +. +.\" -------------------------------------------------------------------- +.SH "DOCUMENTATION OF DETAILS" +.\" -------------------------------------------------------------------- +. +.\" -------------------------------------------------------------------- +.SS "Details of Inline Escape Sequences in alphabetical Order" +.\" -------------------------------------------------------------------- +. +.TP +.FONT B \[rs]*[ I B ] +begin using an initialized colour inline +. +. +.TP +.FONT B \[rs]*[BCK I " n" B ] +move wards in a line +. +. +.\" ====================================================================== +.\" BOLDER +.\" ====================================================================== +.TP +.B \[rs]*[BOLDER] +.TQ +.B \[rs]*[BOLDERX] +Emboldening on/off +. +.RS +. +.P +.B \[rs]*[BOLDER] +begins emboldening type. +. +.B \[rs]*[BOLDERX] +turns the feature off. +. +Both are inline escapes, therefore they should not appear as separate +lines, but rather be embedded in text lines, like this: +.RS +.EX +.FONT R "Not " B \[rs]*[BOLDER] R everything B \[rs]*[BOLDERX] R " is as it seems." +.EE +.RE +. +.P +Alternatively, if you wanted the whole line emboldened, you should do +.RS +.EX +.FONT B \[rs]*[BOLDER] R "Not everything is as it seems." B \[rs]*[BOLDERX] +.EE +.RE +. +Once +.B \[rs]*[BOLDER] +is invoked, it remains in effect until turned off. +. +.P +Note: If you\[aq]re using the document processing macros with +.BR "\%.PRINTSTYLE \%TYPEWRITE" , +.B mom +ignores +.B \[rs]*[BOLDER] +requests. +. +.RE +. +. +.\" ====================================================================== +.\" BU +.\" ====================================================================== +.TP +.FONT B \[rs]*[BU I " n" B ] +move characters pairs closer together inline (related to macro +.BR \%.KERN ) +. +. +.\" ====================================================================== +.\" COND +.\" ====================================================================== +.TP +.B \[rs]*[COND] +.TQ +.BI \[rs]*[CONDX] +Pseudo-condensing on/off +. +.RS +. +.P +.B \[rs]*[COND] +begins pseudo-condensing type. +. +.B \[rs]*[CONDX] +turns the feature off. +. +Both are inline escapes, therefore they should not appear as separate +lines, but rather be embedded in text lines, like this: +.RS +.EX +.FONT B \[rs]*[COND] I "Not everything is as it seems." B \[rs]*[CONDX] +.EE +.RE +.B \%\[rs]*[COND] +remains in effect until you turn it off with +.BR \%\[rs]*[CONDX] . +. +.P +IMPORTANT: You must turn +.B \%\[rs]*[COND] +off before making any changes to the point size of your type, either +via the +.B \%.PT_SIZE +macro or with the +.B \[rs]s +inline escape. +. +If you wish the new point size to be pseudo-condensed, simply reinvoke +.B \%\[rs]*[COND] +afterwards. +. +Equally, +.B \%\[rs]*[COND] +must be turned off before changing the condense percentage with +.BR \%.CONDENSE . +. +.P +Note: If you\[aq]re using the document processing macros with +.BR "\%.PRINTSTYLE \%TYPEWRITE" , +.B mom +ignores +.B \%\[rs]*[COND] +requests. +. +.RE +. +. +.\" ====================================================================== +.\" CONDSUP +.\" ====================================================================== +.TP +.FONT B \[rs]*[CONDSUP] R \*[Ellipsis] B \[rs]*[CONDSUPX] +pseudo-condensed superscript +. +. +.\" ====================================================================== +.\" DOWN +.\" ====================================================================== +.TP +.FONT B \[rs]*[DOWN I " n" B ] +temporarily move downwards in a line +. +. +.\" ====================================================================== +.\" EN-MARK +.\" ====================================================================== +.TP +.BI \[rs]*[EN-MARK] +mark initial line of a range of line numbers (for use with line +numbered endnotes) +. +. +.\" ====================================================================== +.\" EXT +.\" ====================================================================== +.TP +.B \[rs]*[EXT] +.TQ +.B \[rs]*[EXTX] +Pseudo-extending on/off +. +.RS +. +.P +.B \[rs]*[EXT] +begins pseudo-extending type. +. +.B \[rs]*[EXTX] +turns the feature off. +. +Both are inline escapes, therefore they should not appear as separate +lines, but rather be embedded in text lines, like this: +.RS +.EX +.FONT B \[rs]*[EXT] I "Not everything is as it seems." B \[rs]*[EXTX] +.EE +.RE +.B \[rs]*[EXT] +remains in effect until you turn it off with +.BR \[rs]*[EXTX] . +. +.P +IMPORTANT: You must turn +.B \%\[rs]*[EXT] +off before making any changes to the point size of your type, either +via the +.B \%.PT_SIZE +macro or with the +.B \[rs]s +inline escape. +. +If you wish the new point size to be +.IR \%pseudo-extended , +simply reinvoke +.B \%\[rs]*[EXT] +afterwards. +. +Equally, +.B \%\[rs]*[EXT] +must be turned off before changing the extend percentage with +.BR \%.EXTEND . +. +.P +Note: If you are using the document processing macros with +.BR "\%.PRINTSTYLE \%TYPEWRITE" , +.B mom +ignores +.B \%\[rs]*[EXT] +requests. +. +.RE +. +. +.\" ====================================================================== +.\" EXTSUP +.\" ====================================================================== +.TP +.FONT B \[rs]*[EXTSUP] R \*[Ellipsis] B \[rs]*[EXTSUPX] +pseudo extended superscript +. +. +.\" ====================================================================== +.\" FU +.\" ====================================================================== +.TP +.FONT B \[rs]*[FU I " n" B ] +move characters pairs further apart inline (related to macro +.BR .KERN ) +. +. +.\" ====================================================================== +.\" FWD +.\" ====================================================================== +.TP +.FONT B \[rs]*[FWD I " n" B ] +move forward in a line +. +. +.\" ====================================================================== +.\" LEADER +.\" ====================================================================== +.TP +.BI \[rs]*[LEADER] +insert leaders at the end of a line +. +. +.\" ====================================================================== +.\" RULE +.\" ====================================================================== +.TP +.BI \[rs]*[RULE] +draw a full measure rule +. +. +.\" ====================================================================== +.\" PT_SIZE +.\" ====================================================================== +.TP +.FONT B \[rs]*[SIZE I " n" B ] +change the point size inline (related to macro +.BR \%.PT_SIZE ) +. +. +.\" ====================================================================== +.\" SLANT +.\" ====================================================================== +.TP +.B \[rs]*[SLANT] +.TQ +.B \[rs]*[SLANTX] +Pseudo italic on/off +. +.RS +. +.P +.B \%\[rs]*[SLANT] +begins +.I pseudo-italicizing +.IR type . +. +.B \%\[rs]*[SLANTX] +turns the feature off. +. +Both are +.I inline +.IR escapes , +therefore they should not appear as separate lines, but rather be +embedded in text lines, like this: +.RS +.EX +.FONT R "Not " B \[rs]*[SLANT] R everything B \[rs]*[SLANTX] R " is as it seems." +.EE +.RE +. +.P +Alternatively, if you wanted the whole line +.IR pseudo-italicized , +you\[aq]d do +.RS +.EX +.FONT B \[rs]*[SLANT] R "Not everything is as it seems." B \[rs]*[SLANTX] +.EE +.RE +. +.P +Once +.B \[rs]*[SLANT] +is invoked, it remains in effect until turned off. +. +.P +Note: If you\[aq]re using the document processing macros with +.BR "\%.PRINTSTYLE \%TYPEWRITE" , +.B mom +underlines pseudo-italics by default. +. +To change this behaviour, use the special macro +.BR .SLANT_MEANS_SLANT . +. +.RE +. +. +.\" ====================================================================== +.\" ST +.\" ====================================================================== +.TP +.FONT B \[rs]*[ST I B ] R \*[Ellipsis] B \[rs]*[ST I B X] +Mark positions of string tabs +. +.RS +.P +The +.I quad +direction must be +.B LEFT +or +.B \%JUSTIFY +(see +.B \%.QUAD +and +.BR \%.JUSTIFY ) +or the +.I no-fill mode +set to +.B LEFT +in order for these inlines to function properly. +. +Please see +.IR \%IMPORTANT , +below. +. +.P +String tabs need to be marked off with inline escapes before being set +up with the +.B .ST +macro. +. +Any input line may contain string tab markers. +. +.IR , +above, means the numeric identifier of the tab. +. +.P +The following shows a sample input line with string tab markers. +.RS +.EX +.FONT B \[rs]*[ST1] R "Now is the time" B \[rs]*[ST1X] R " for all " B \[rs]*[ST2] R "good men" B \[rs]*ST2X] R " to come to the aid of the party." +.EE +.RE +. +.P +String +.I tab 1 +begins at the start of the line and ends after the word +.IR \%time . +. +String +.I tab 2 +starts at +.I good +and ends after +.IR men . +. +.I Inline escapes +(e.g. +.I font +or +.I point size +.IR changes , +or horizontal movements, including padding) are taken into account +when +.B mom +determines the +.I position +and +.I length +of +.I string +.IR tabs . +. +.P +Up to nineteen string tabs may be marked (not necessarily all on the +same line, of course), and they must be numbered between 1 and 19. +. +.P +Once string tabs have been marked in input lines, they have to be +.I set +with +.BR .ST , +after which they may be called, by number, with +.BR .TAB . +. +.P +Note: Lines with string tabs marked off in them are normal input +lines, i.e.\& they get printed, just like any input line. +. +If you want to set up string tabs without the line printing, use the +.B \%.SILENT +macro. +. +.P +.I IMPORTANT: +Owing to the way +.B groff +processes input lines and turns them into output lines, it is not +possible for +.B mom +to +.I guess +the correct starting position of string tabs marked off in lines that +are centered or set flush right. +. +.P +Equally, she cannot guess the starting position if a line is fully +justified and broken with +.BR \%.SPREAD . +. +.P +In other words, in order to use string tabs, +.B LEFT +must be active, or, if +.B .QUAD LEFT +or +.B \%JUSTIFY +are active, the line on which the +.I string tabs +are marked must be broken +.I manually +with +.B .BR +(but not +.BR \%.SPREAD ). +. +.P +To circumvent this behaviour, I recommend using the +.B PAD +to set up string tabs in centered or flush right lines. +. +Say, for example, you want to use a +.I string tab +to +.I underscore +the text of a centered line with a rule. +. +Rather than this, +.RS +.EX +.B .CENTER +.B \[rs]*[ST1]A line of text\[rs]*[ST1X]\[rs]c +.B .EL +.B .ST 1 +.B .TAB 1 +.B .PT_SIZE 24 +.B .ALD 3p +.B \[rs]*[RULE] +.B .RLD 3p +.B .TQ +.EE +.RE +you should do: +.RS +.EX +.B .QUAD CENTER +.B .PAD """#\[rs]*[ST1]A line of text\[rs]*[ST1X]#""" +.B .EL +.B .ST 1 +.B .TAB 1 +.B .PT_SIZE 24 +.B .ALD 3p +.B \[rs]*[RULE] \[rs]" Note that you can\[aq]t use \[rs]*[UP] or \[rs]*[DOWN] with \[rs]*[RULE]\"" +.B .RLD 3p +.B .TQ +.EE +.RE +. +.RE +. +. +.\" ====================================================================== +.\" SUP +.\" ====================================================================== +.TP +.FONT B \[rs]*[SUP] R \*[Ellipsis] B \[rs]*[SUPX] +superscript +. +. +.\" ====================================================================== +.\" TB+ +.\" ====================================================================== +.TP +.B \[rs]*[TB+] +Inline escape for +.B .TN +.RI ( "Tab Next" ) +. +. +.\" ====================================================================== +.\" UL +.\" ====================================================================== +.TP +.FONT B \[rs]*[UL] R \*[Ellipsis] B \[rs]*[ULX] +invoke underlining inline (fixed width fonts only) +. +. +.\" ====================================================================== +.\" UP +.\" ====================================================================== +.TP +.FONT B \[rs]*[UP I " n" B ] +temporarily move upwards in a line +. +. +.\" -------------------------------------------------------------------- +.SS "Details of Macros in alphabetical Order" +.\" -------------------------------------------------------------------- +. +.\" ====================================================================== +.\" AUTOLEAD +.\" ====================================================================== +.TP +.BI .AUTOLEAD +set the linespacing relative to the point size +. +. +.\" ====================================================================== +.\" Bottom Margin +.\" ====================================================================== +.TP +.BI .B_MARGIN " " +Bottom Margin +. +.RS +. +.P +Requires a unit of measure +. +.P +.B .B_MARGIN +sets a nominal position at the bottom of the page beyond which you +don\[aq]t want your type to go. +. +When the bottom margin is reached, +.B mom +starts a new page. +. +.B .B_MARGIN requires a unit of measure. +. +Decimal fractions are allowed. +. +To set a nominal bottom margin of 3/4 inch, enter +.RS +.EX +.B \&.B_MARGIN \&.75i +.EE +.RE +. +.P +Obviously, if you haven\[aq]t spaced the type on your pages so that the +last lines fall perfectly at the bottom margin, the margin will vary +from page to page. +. +Usually, but not always, the last line of type that fits on a page +before the bottom margin causes mom to start a new page. +. +.P +Occasionally, owing to a peculiarity in +.IR groff , +an extra line will fall below the nominal bottom margin. +. +If you\[aq]re using the document processing macros, this is unlikely to +happen; the document processing macros are very hard-nosed about +aligning bottom margins. +. +.P +Note: The meaning of +.B .B_MARGIN +is slightly different when you\[aq]re using the document processing +macros. +. +.RE +. +. +.\" ====================================================================== +.\" Fallback Font +.\" ====================================================================== +.TP +.BI \%.FALLBACK_FONT " " "[ ABORT | WARN ]" +Fallback Font +. +.RS +. +.P +In the event that you pass an invalid argument to +.B \%.FAMILY +(i.e.\& a non-existent +.IR family ), +.BR mom , +by default, uses the +.IR "fallback font" , +.B Courier Medium Roman +.RB ( CR ), +in order to continue processing your file. +. +.P +If you\[aq]d prefer another +.IR "fallback font" , +pass +.B \%.FALLBACK_FONT +the full +.I family+font name +of the +.I font +you\[aq]d like. +. +For example, if you\[aq]d rather the +.I fallback font +were +.BR "Times Roman Medium Roman" , +.RS +.EX +.B .FALLBACK_FONT TR +.EE +.RE +would do the trick. +. +.P +.B Mom +issues a warning whenever a +.I font style set +with +.B .FT +does not exist, either because you haven\[aq]t registered the style +or because the +.I font style +does not exist in the current +.I family set +with +.BR .FAMILY . +. +By default, +.B \%mom +then aborts, which allows you to correct the problem. +. +.P +If you\[aq]d prefer that +.B \%mom +not abort on non-existent +.IR fonts , +but rather continue processing using a +.IR "fallback font" , +you can pass +.B \%.FALLBACK_FONT +the argument +.BR WARN , +either by itself, or in conjunction with your chosen +.IB "fallback font" . +. +.P +Some examples of invoking +.BR \%.FALLBACK_FONT : +. +.TP +.B .FALLBACK_FONT WARN +.B mom +will issue a warning whenever you try to access a non-existent +.I font +but will continue processing your file with the default +.IR "fallback font" , +.BR "Courier Medium Roman" . +. +. +.TP +.B .FALLBACK_FONT TR WARN +.B \%mom +will issue a warning whenever you try to access a non-existent +.I font +but will continue processing your file with a +.I fallback font +of +.BR "Times Roman Medium Roman" ; +additionally, +.B TR +will be the +.I fallback font +whenever you try to access a +.I family +that does not exist. +. +.TP +.B .FALLBACK_FONT TR ABORT +.B \%mom +will abort whenever you try to access a non-existent +.BR font , +and will use the +.I fallback font +.B TR +whenever you try to access a +.I family +that does not exist. +. +If, for some reason, you want to revert to +.BR ABORT , +just enter +.B \%".FALLBACK_FONT ABORT" +and +.B mom +will once again abort on +.IR "font errors" . +. +.RE +. +. +.\" ====================================================================== +.\" FAM +.\" ====================================================================== +.TP +.BI .FAM " " +Type Family, alias of \fB.FAMILY\fR +. +. +.\" ====================================================================== +.\" FAMILY +.\" ====================================================================== +.TP +.BI .FAMILY " " +Type Family, alias \fB.FAM\fR +. +.RS +. +.P +.B .FAMILY +takes one argument: the name of the +.I family +you want. +. +.I Groff +comes with a small set of basic families, each identified by a 1-, +2- or 3-letter mnemonic. +. +The standard families are: +.RS +.EX +.B "A = Avant Garde" +.B "BM = Bookman" +.B "H = Helvetica" +.B "HN = Helvetica Narrow" +.B "N = New Century Schoolbook" +.B "P = Palatino" +.B "T = Times Roman" +.B "ZCM = Zapf Chancery" +.EE +.RE +. +.P +The argument you pass to +.B .FAMILY +is the identifier at left, above. +. +For example, if you want +.BR Helvetica , +enter +.RS +.EX +.B .FAMILY H +.EE +.RE +. +.P +Note: The font macro +.RB ( .FT ) +lets you specify both the type +.I family +and the desired font with a single macro. +. +While this saves a few +keystrokes, I recommend using +.B .FAMILY for +.IR family , +and +.B .FT for +.IR font , +except where doing so is genuinely inconvenient. +. +.BR ZCM , +for example, +only exists in one style: +.B Italic +.RB ( I ). +. +.P +Therefore, +.RS +.EX +.B .FT ZCMI +.EE +.RE +makes more sense than setting the +.I family +to +.BR ZCM , +then setting the +.I font +to +.IR I . +. +.P +Additional note: If you are running a version of groff lower than +1.19.2, you must follow all +.B .FAMILY +requests with a +.B FT +request, otherwise +.B mom +will set all type up to the next +.B .FT +request in the fallback font. +. +.P +If you are running a version of groff greater than or equal to 1.19.2, +when you invoke the +.B .FAMILY +macro, +.B mom +.I remembers +the font style +.BR ( Roman , +.BR Italic , +etc) currently in use (if the font style exists in the new +.IR family ) +and will continue to use the same font style in the new family. +For example: +.RS +.EX +.BI ".FAMILY BM " "\[rs]"" Bookman family" +.BI ".FT I " "\[rs]"" Medium Italic" +.I \[rs]" Bookman Medium Italic +.BI ".FAMILY H " "\[rs]"" Helvetica family" +.I \[rs]" Helvetica Medium Italic +.EE +.RE +. +.P +However, if the font style does not exist in the new family, +.B mom +will set all subsequent type in the fallback font (by default, +.B Courier Medium +.BR Roman ) +until she encounters a +.B .FT +request that\[aq]s valid for the +.IR family . +. +.P +For example, assuming you don\[aq]t have the font +.B Medium Condensed Roman +.RB ( mom +extension +.IR CD ) +in the +.I Helvetica +.IR family : +.RS +.EX +.BI ".FAMILY UN " "\[rs]"" Univers family" +.BI ".FT CD " "\[rs]"" Medium Condensed" +.I \[rs]" Univers Medium Condensed +.BI ".FAMILY H " "\[rs]"" Helvetica family" +.I \[rs]" Courier Medium Roman! +.EE +.RE +. +.P +In the above example, you must follow +.B .FAMILY H +with a +.B .FT +request that\[aq]s valid for +.BR Helvetica . +. +.P +Please see the Appendices, +.I Adding fonts to +.IR groff , +for information on adding fonts and families to groff, as well as to +see a list of the extensions +.B mom +provides to +.IR groff \[aq]s +basic +.BR R , +.BR I , +.BR B , +.B BI +styles. +. +.P +Suggestion: When adding +.I families to +.IR groff , +I recommend following the established standard for the naming families +and fonts. +. +For example, if you add the +.B Garamond +family, name the font files +.RS +.EX +.B GARAMONDR +.B GARAMONDI +.B GARAMONDB +.B GARAMONDBI +.EE +.RE +. +.B GARAMOND then becomes a valid +.I family name +you can pass to +.BR .FAMILY . +. +(You could, of course, shorten +.B GARAMOND +to just +.BR G , +or +.BR GD .) +.BR R , +.BR I , +.BR B , +and +.B BI +after +.B GARAMOND +are the +.IR roman , +.IR italic , +.I bold +and +.I bold-italic +fonts respectively. +. +.RE +. +. +.\" ====================================================================== +.\" FONT +.\" ====================================================================== +.TP +.BI ".FONT R | B | BI | " "" +Alias to +.B .FT +. +. +.\" ====================================================================== +.\" FT +.\" ====================================================================== +.TP +.BI ".FT R | B | BI | " "" +Set font +. +.RS +. +.P +By default, +.I groff +permits +.B .FT +to take one of four possible arguments specifying the desired font: +.RS +.EX +.B R = (Medium) Roman +.B I = (Medium) Italic +.B B = Bold (Roman) +.B BI = Bold Italic +.EE +.RE +. +.P +For example, if your +.I family +is +.BR Helvetica , +entering +.RS +.EX +.B .FT B +.EE +.RE +will give you the +.I Helvetica bold +.IR font . +. +If your +.I family +were +.BR \%Palatino , +you\[aq]d get the +.I \%Palatino bold +.IR font . +. +.P +.B Mom +considerably extends the range of arguments you can pass to +.BR .FT , +making it more convenient to add and access fonts of differing weights +and shapes within the same family. +. +.P +Have a look here for a list of the weight/style arguments +.B mom +allows. +. +Be aware, though, that you must have the fonts, correctly installed +and named, in order to use the arguments. +. +(See +.I Adding fonts to groff +for instructions and information.) +. +Please also read the +.I ADDITIONAL NOTE +found in the description of the +.B \%.FAMILY +macro. +. +.P +How +.B mom +reacts to an invalid argument to +.B .FT +depends on which version of groff you\[aq]re using. +. +If your +.I groff version +is greater than or equal to 1.19.2, +.B mom +will issue a warning and, depending on how you\[aq]ve set up the fallback +font, either continue processing using the fallback font, or abort +(allowing you to correct the problem). If your +.I groff version +is less than 1.19.2, +.B mom +will silently continue processing, using either the fallback font or +the font that was in effect prior to the invalid +.B .FT +call. +. +.P +.B .FT +will also accept, as an argument, a full +.I family +and +.I font +.IR name . +. +.P +For example, +.RS +.EX +.B .FT HB +.EE +.RE +will set subsequent type in +.I Helvetica +.IR Bold . +. +.P +However, I strongly recommend keeping +.I family +and +.I font +separate except where doing so is genuinely inconvenient. +. +.P +For inline control of +.IR fonts , +see +.I Inline +.IR Escapes , +font control. +. +.RE +. +. +.\" ====================================================================== +.\" Hanging Indent +.\" ====================================================================== +.TP +.BI "\%.HI [" " " ] +Hanging indent \[em] the optional argument requires a unit of measure. +. +.RS +. +.P +A hanging indent looks like this: +.RS +.EX +\fB The thousand injuries of Fortunato I had borne as best I + could, but when he ventured upon insult, I vowed + revenge. You who so well know the nature of my soul + will not suppose, however, that I gave utterance to a + threat, at length I would be avenged\*[Ellipsis] +.EE +.RE +. +The first line of text +.I hangs +outside the +.IR "left margin" . +. +.P +In order to use +.IR "hanging indents" , +you must first have a +.I left indent +active (set with either +.B .IL +or +.BR .IB ). +. +.B Mom +will not hang text outside the +.I left margin set +with +.B \%.L_MARGIN +or outside the +.I left margin +of a +.IR \%tab . +. +.P +The first time you invoke +.BR .HI , +you must give it a +.BR measure . +. +If you want the first line of a paragraph to +.IR "hang by" , +say, +.IR "1 pica" , +do +.RS +.EX +.B ".IL 1P" +.B ".HI 1P" +.EE +.RE +. +Subsequent invocations of +.B \%.HI +do not require you to supply a +.IR measure ; +.B mom +keeps track of the last measure you gave it. +. +.P +Generally speaking, you should invoke +.B .HI +immediately prior to the line you want hung (i.e.\& without any +intervening control lines). +. +And because +.I hanging indents +affect only one line, there\[aq]s no need to turn them off. +. +.P +.I IMPORTANT: +Unlike +.BR IL , +.B IR +and +.BR IB , +measures given to +.B .HI +are NOT additive. +. +Each time you pass a measure to +.B .HI , +the measure is treated literally. +. +.B +.I Recipe: +A numbered list using +.I hanging indents +. +.P +.I Note: +.B mom +has macros for setting lists. +. +This recipe exists to demonstrate the use of +.I hanging indents +only. +.RS +.EX +.B ".PAGE 8.5i 11i 1i 1i 1i 1i" +.B ".FAMILY T" +.B ".FT R" +.B ".PT_SIZE 12" +.B ".LS 14" +.B ".JUSTIFY" +.B ".KERN" +.B ".SS 0" +.B ".IL \[rs]w'\[rs]0\[rs]0.'" +.B ".HI \[rs]w'\[rs]0\[rs]0.'" +\fB1.\[rs]0The most important point to be considered is whether the +answer to the meaning of Life, the Universe, and Everything +really is 42. We have no-one\[aq]s word on the subject except +Mr. Adams\[aq]. +.B .HI +2.\[rs]0If the answer to the meaning of Life, the Universe, +and Everything is indeed 42, what impact does this have on +the politics of representation? 42 is, after all not a +prime number. Are we to infer that prime numbers don\[aq]t +deserve equal rights and equal access in the universe? +.B .HI +3.\[rs]0If 42 is deemed non-exclusionary, how do we present it +as the answer and, at the same time, forestall debate on its +exclusionary implications? +.EE +.RE +. +.P +First, we invoke a left indent with a measure equal to the width of 2 +figures spaces plus a period (using the \[rs]w inline escape). +. +At this point, the left indent is active; text afterwards would +normally be indented. +. +However, we invoke a hanging indent of exactly the same width, which +hangs the first line (and first line only!\&) to the left of the indent +by the same distance (in this case, that means \[lq]out to the left +margin\[rq]). +. +Because we begin the first line with a number, a period, and a figure +space, the actual text +.RI ( "The most important point\*[Ellipsis]" ) +starts at exactly the same spot as the indented lines that follow. +. +.P +Notice that subsequent invocations of +.B .HI +don\[aq]t require a +.I measure +to be given. +. +.P +Paste the example above into a file and preview it with +.RS +.EX +.B pdfmom filename.mom | ps2pdf \- filename.pdf +.EE +.RE +to see hanging indents in action. +. +.RE +. +. +.\" ====================================================================== +.\" IB - INDENT BOTH +.\" ====================================================================== +.TP +.BI "\%.IB [" " " ] +Indent both \[em] the optional argument requires a unit of measure +. +.RS +. +.P +.B .IB +allows you to set or invoke a left and a right indent at the same time. +. +.P +At its first invocation, you must supply a measure for both indents; +at subsequent invocations when you wish to supply a measure, both must +be given again. +. +As with +.B .IL +and +.BR .IR , +the measures are added to the values previously passed to the +macro. +. +Hence, if you wish to change just one of the values, you must give an +argument of zero to the other. +. +.P +.I A word of advice: +If you need to manipulate left and right indents separately, use a +combination of +.B .IL +and +.B .IR +instead of +.BR .IB . +. +You\[aq]ll save yourself a lot of grief. +. +.P +A +.I minus sign +may be prepended to the arguments to subtract from their current +values. +. +The \[rs]w inline escape may be used to specify text-dependent +measures, in which case no unit of measure is required. +. +For example, +.RS +.EX +.B .IB \[rs]w\[aq]margarine\[aq] \[rs]w\[aq]jello\[aq] +.EE +.RE +left indents text by the width of the word +.I margarine +and right indents by the width of +.IR jello . +. +.P +Like +.B .IL +and +.BR .IR , +.B .IB +with no argument indents by its last active values. +. +See the brief explanation of how mom handles indents for more details. +. +.P +.I Note: +Calling a +.I tab +(with +.BR ".TAB " ) +automatically cancels any active indents. +. +.P +.I Additional note: +Invoking +.B .IB +automatically turns off +.B .IL +and +.BR .IR . +. +.RE +. +. +.\" ====================================================================== +.\" IL - INDENT LEFT +.\" ====================================================================== +.TP +.BI "\%.IL [" " " ] +Indent left \[em] the optional argument requires a unit of measure +. +.RS +. +.P +.B .IL +indents text from the left margin of the page, or if you\[aq]re in a +.IR tab , +from the left edge of the +.IR tab +. +Once +.I IL +is on, the +.I left indent +is applied uniformly to every subsequent line of text, even if you +change the line length. +. +.P +The first time you invoke +.BR .IL , +you must give it a measure. +. +Subsequent invocations with a measure add to the previous measure. +. +A minus sign may be prepended to the argument to subtract from the +current measure. +. +The +.B \[rs]w +inline escape may be used to specify a text-dependent measure, in +which case no unit of measure is required. +. +For example, +.RS +.EX +.B .IL \[rs]w'margarine' +.EE +.RE +indents text by the width of the word +.IR margarine . +. +.P +With no argument, +.B .IL +indents by its last active value. +. +See the brief explanation of how +.B mom +handles indents for more details. +. +.P +.I Note: +Calling a +.I tab +(with +.BR ".TAB " ) +automatically cancels any active indents. +. +.P +.I Additional note: +Invoking +.B .IL +automatically turns off +.BR IB . +. +.RE +. +. +.\" ====================================================================== +.\" IQ - quit any/all indents +.\" ====================================================================== +.TP +.BI "\%.IQ [" " " ] +IQ \[em] quit any/all indents +. +.RS +. +.P +.I IMPORTANT NOTE: +The original macro for quitting all indents was +.BR .IX . +. +This usage has been deprecated in favour of +.BR IQ . +. +.B .IX +will continue to behave as before, but +.B mom +will issue a warning to +.I stderr +indicating that you should update your documents. +. +.P +As a consequence of this change, +.BR .ILX , +.B .IRX +and +.B .IBX +may now also be invoked as +.BR .ILQ , +.B .IRQ +and +.BR .IBQ . +. +Both forms are acceptable. +. +.P +Without an argument, the macros to quit indents merely restore your +original margins and line length. +. +The measures stored in the indent macros themselves are saved so you +can call them again without having to supply a measure. +. +.P +If you pass these macros the optional argument +.BR CLEAR , +they not only restore your original left margin and line length, but +also clear any values associated with a particular indent style. +. +The next time you need an indent of the same style, you have to supply +a measure again. +. +.P +.BR ".IQ CLEAR" , +as you\[aq]d suspect, quits and clears the values for all indent +styles at once. +. +.RE +. +. +.\" ====================================================================== +.\" IR - INDENT RIGHT +.\" ====================================================================== +.TP +.BI "\%.IR [" " " ] +Indent right \[em] the optional argument requires a unit of measure +. +.RS +. +.P +.B .IR +indents text from the +.I right margin +of the page, or if you\[aq]re in a +.IR tab , +from the end of the +.IR tab . +. +.P +The first time you invoke +.BR .IR , +you must give it a measure. +. +Subsequent invocations with a measure add to the previous indent +measure. +. +A +.I minus sign +may be prepended to the argument to subtract from the current indent +measure. +. +The \[rs]w inline escape may be used to specify a text-dependent +measure, in which case no +.I unit of measure +is required. +. +For example, +.RS +.EX +.B .IR \[rs]w'jello' +.EE +.RE +indents text by the width of the word +.IR jello . +. +.P +With no argument, +.B .IR +indents by its last active value. +. +See the brief explanation of how +.B mom +handles indents for more details. +. +.P +.I Note: +Calling a +.I tab +(with +.BR "\%.TAB " ) +automatically cancels any active indents. +. +.P +.I Additional note: +Invoking +.B .IR +automatically turns off +.BR IB . +. +.RE +. +. +.\" ====================================================================== +.\" Left Margin +.\" ====================================================================== +.TP +.BI .L_MARGIN " " +Left Margin +. +.RS +. +.P +L_MARGIN establishes the distance from the left edge of the printer +sheet at which you want your type to start. +. +It may be used any time, and remains in effect until you enter a new value. +. +.P +Left indents and tabs are calculated from the value you pass to +.BR .L_MARGIN , +hence it\[aq]s always a good idea to invoke it before starting any serious +typesetting. +. +A unit of measure is required. +. +Decimal fractions are allowed. +. +Therefore, to set the left margin at 3 picas (1/2 inch), you\[aq]d enter either +.RS +.EX +.B .L_MARGIN 3P +.EE +.RE +or +.RS +.EX +.B .L_MARGIN .5i +.EE +.RE +. +.P +If you use the macros +.BR .PAGE , +.B .PAGEWIDTH +or +.B .PAPER +without invoking +.B .L_MARGIN +(either before or afterwards), +.B mom +automatically sets +.B .L_MARGIN +to +.IR "1 inch" . +. +.P +Note: +.B .L_MARGIN +behaves in a special way when you\[aq]re using the document processing +macros. +. +.RE +. +. +.\" ====================================================================== +.\" MCO - BEGIN MULTI-COLUMN SETTING +.\" ====================================================================== +.TP +.B .MCO +Begin multi-column setting. +. +.RS +.P +.B .MCO +.RI ( "Multi-Column On" ) +is the +.I macro +you use to begin +.IR "multi-column setting" . +. +It marks the current baseline as the top of your columns, for use +later with +.BR .MCR . +. +See the introduction to columns for an explanation of +.I multi-columns +and some sample input. +. +.P +.I Note: +Do not confuse +.B .MCO +with the +.B .COLUMNS +macro in the document processing macros. +. +.RE +. +. +.\" ====================================================================== +.\" MCR - RETURN TO TOP OF COLUMN +.\" ====================================================================== +.TP +.B \%.MCR +Once you\[aq]ve turned +.I multi-columns +on (with +.BR \%.MCO ), +.BR .MCR , +at any time, returns you to the +.IR "top of your columns". +. +. +.\" ====================================================================== +.\" MCX - EXIT MULTI-COLUMNS +.\" ====================================================================== +.TP +.BI "\%.MCX [ " "" " ]" +Optional argument requires a unit of measure. +. +.RS +. +.P +.B .MCX +takes you out of any +.I tab +you were in (by silently invoking +.BR .TQ ) +and advances to the bottom of the longest column. +. +.P +Without an argument, +.B .MCX +advances +.I 1 linespace +below the longest column. +. +.P +Linespace, in this instance, is the leading in effect at the moment +.B .MCX +is invoked. +. +.P +If you pass the +.I +argument to +.BR .MCX , +it advances +.I 1 linespace +below the longest column (see above) +.I PLUS +the distance specified by the argument. +. +The argument requires a unit of measure; therefore, to advance an +extra 6 points below where +.B \%.MCX +would normally place you, you\[aq]d enter +.RS +.EX +.B .MCX 6p +.EE +.RE +. +.P +.I Note: +If you wish to advance a precise distance below the baseline of the +longest column, use +.B .MCX +with an argument of +.B 0 +(zero; no +.I unit of measure +required) in conjunction with the +.B \%.ALD +macro, like this: +.RS +.EX +.B .MCX 0 +.B .ALD 24p +.EE +.RE +. +The above advances to precisely +.I 24 points +below the baseline of the longest column. +. +.RE +. +. +.\" ====================================================================== +.\" Start a new Page +.\" ====================================================================== +.TP +.B .NEWPAGE +. +.RS +. +.P +Whenever you want to start a new page, use +.BR .NEWPAGE , +by itself with no argument. +. +.B Mom +will finish up processing the current page and move you to the top of +a new one (subject to the top margin set with +.BR .T_MARGIN ). +. +.RE +. +. +.\" ====================================================================== +.\" Page +.\" ====================================================================== +.TP +.BI ".PAGE " " [ " " [ " " [ " " [ " \ + " [ " " ] ] ] ] ]" +. +.RS +. +.P +All arguments require a unit of measure +. +.P +.I IMPORTANT: +If you\[aq]re using the document processing macros, +.B .PAGE +must come after +.BR .START . +. +Otherwise, it should go at the top of a document, prior to any text. +. +And remember, when you\[aq]re using the document processing macros, top +margin and bottom margin mean something slightly different than when +you\[aq]re using just the typesetting macros (see Top and bottom margins +in document processing). +. +.P +.B .PAGE +lets you establish paper dimensions and page margins with a single +macro. +. +The only required argument is page width. +. +The rest are +optional, but they must appear in order and you can\[aq]t skip over +any. +. +.IR , +.IR , +.I +and +.I +refer to the left, right, top and bottom margins respectively. +. +.P +Assuming your page dimensions are 11 inches by 17 inches, and that\[aq]s +all you want to set, enter +.RS +.EX +.B .PAGE 11i 17i +.EE +.RE +. +If you want to set the left margin as well, say, at 1 inch, +.B PAGE +would look like this: +.RS +.EX +.B .PAGE 11i 17i 1i +.EE +.RE +. +.P +Now suppose you also want to set the top margin, say, at 1\(en1/2 inches. +. +.I +comes after +.I +in the optional arguments, but you can\[aq]t skip over any arguments, +therefore to set the top margin, you must also give a right margin. +. +The +.B .PAGE +macro would look like this: +.RS +.EX +\f[CB].PAGE 11i 17i 1i 1i 1.5i + | | +required right---+ +---top margin + margin\f[R] +.EE +.RE +. +.P +Clearly, +.B .PAGE +is best used when you want a convenient way to tell +.B mom +just the dimensions of your printer sheet (width and length), or when +you want to tell her everything about the page (dimensions and all the +margins), for example +.RS +.EX +.B .PAGE 8.5i 11i 45p 45p 45p 45p +.EE +.RE +. +This sets up an 8\(12 by 11 inch page with margins of 45 points +(5/8-inch) all around. +. +.P +Additionally, if you invoke +.B .PAGE +with a top margin argument, any macros you invoke after +.B .PAGE +will almost certainly move the baseline of the first line of text down +by one linespace. +. +To compensate, do +.RS +.EX +.B .RLD 1v +.EE +.RE +immediately before entering any text, or, if it\[aq]s feasible, make +.B .PAGE +the last macro you invoke prior to entering text. +. +.P +Please read the +.I Important note +on page dimensions and papersize for information on ensuring groff +respects your +.B .PAGE +dimensions and margins. +. +.RE +. +. +.\" ====================================================================== +.\" Page Length +.\" ====================================================================== +.TP +.BI .PAGELENGTH " " +tells +.B mom +how long your printer sheet is. +. +It works just like +.BR .PAGEWIDTH . +. +.RS +. +.P +Therefore, to tell +.B mom +your printer sheet is 11 inches long, you enter +.RS +.EX +.B .PAGELENGTH 11i +.EE +.RE +. +Please read the important note on page dimensions and papersize for +information on ensuring groff respects your +.IR PAGELENGTH . +. +.RE +. +. +.\" ====================================================================== +.\" Page Width +.\" ====================================================================== +.TP +.BI .PAGEWIDTH " " +. +.RS +. +.P +The argument to +.B .PAGEWIDTH +is the width of your printer sheet. +. +.P +.B .PAGEWIDTH +requires a unit of measure. +. +Decimal fractions are allowed. +. +Hence, to tell +.B mom +that the width of your printer sheet is 8\(12 inches, you enter +.RS +.EX +\&.PAGEWIDTH 8.5i +.EE +.RE +. +.P +Please read the Important note on page dimensions and papersize for +information on ensuring groff respects your +.IR PAGEWIDTH . +. +.RE +. +. +.\" ====================================================================== +.\" Paper +.\" ====================================================================== +.TP +.BI .PAPER " " +provides a convenient way to set the page dimensions for some common +printer sheet sizes. +. +The argument +.I +can be one of: +.BR LETTER , +.BR LEGAL , +.BR STATEMENT , +.BR TABLOID , +.BR LEDGER , +.BR FOLIO , +.BR QUARTO , +.BR EXECUTIVE , +.BR 10x14 , +.BR A3 , +.BR A4 , +.BR A5 , +.BR B4 , +.BR B5 . +. +. +.TP +.B .PRINTSTYLE +. +. +.\" ====================================================================== +.\" PT_SIZE - POINT SIZE OF TYPE +.\" ====================================================================== +.TP +.BI .PT_SIZE " " +Point size of type, does not require a +.IR "unit of measure" . +. +.RS +. +.P +.B \%.PT_SIZE +.RI ( "Point Size" ) +takes one argument: the +.I size of type +in +.IR points . +. +Unlike most other macros that establish the +.I size +or +.I measure +of something, +.B \%.PT_SIZE +does not require that you supply a +.I unit of measure +since it\[aq]s a near universal convention that +.I type size +is measured in +.IR points . +. +Therefore, to change the +.I type size +to, say, +.IR "11 points" , +enter +.RS +.EX +.B .PT_SIZE 11 +.EE +.RE +. +.I Point sizes +may be +.I fractional +(e.g.\& +.I 10.25 +or +.IR 12.5 ). +. +.P +You can prepend a +.I plus +or a +.I minus sign +to the argument to +.BR \%.PT_SIZE , +in which case the +.I point size +will be changed by +.I + +or +.I \- +the original value. +. +For example, if the +.I point size +is +.I 12 , +and you want +.I 14 , +you can do +.RS +.EX +.B .PT_SIZE +2 +.EE +.RE +then later reset it to +.I 12 +with +.RS +.EX +.B .PT_SIZE \-2 +.EE +.RE +. +The +.I size of type +can also be changed inline. +. +.P +.I Note: +It is unfortunate that the +.B \%pic +preprocessor has already taken the name, PS, and thus +.IR mom \[aq]s +macro for setting +.I point sizes +can\[aq]t use it. +. +However, if you aren\[aq]t using +.BR pic , +you might want to alias +.B \%.PT_SIZE +as +.BR .PS , +since there\[aq]d be no conflict. +. +For example +.RS +.EX +.B .ALIAS PS PT_SIZE +.EE +.RE +would allow you to set +.I point sizes +with +.BR .PS . +. +.RE +. +. +.\" ====================================================================== +.\" Right Margin +.\" ====================================================================== +.TP +.BI .R_MARGIN " " +Right Margin +. +.RS +. +.P +Requires a unit of measure. +. +.P +IMPORTANT: +.BR .R_MARGIN , +if used, must come after +.BR .PAPER , +.BR .PAGEWIDTH , +.BR .L_MARGIN , +and/or +.B .PAGE +(if a right margin isn\[aq]t given to PAGE). +. +The reason is that +.B .R_MARGIN +calculates line length from the overall page dimensions and the left margin. +. +.P +Obviously, it can\[aq]t make the calculation if it doesn\[aq]t know the page +width and the left margin. +. +.P +.B .R_MARGIN +establishes the amount of space you want between the end of typeset +lines and the right hand edge of the printer sheet. +. +In other words, it sets the line length. +.B .R_MARGIN +requires a unit of measure. +. +Decimal fractions are allowed. +. +.P +The line length macro (LL) can be used in place of +.BR .R_MARGIN . +. +In either case, the last one invoked sets the line length. +. +The choice of which to use is up to you. +. +In some instances, you may find it easier to think of a section of +type as having a right margin. +. +In others, giving a line length may make more sense. +. +.P +For example, if you\[aq]re setting a page of type you know should have +6-pica margins left and right, it makes sense to enter a left and +right margin, like this: +.RS +.EX +.B .L_MARGIN 6P +.B .R_MARGIN 6P +.EE +.RE +. +.P +That way, you don\[aq]t have to worry about calculating the line +length. +. +On the other hand, if you know the line length for a patch of type +should be 17 picas and 3 points, entering the line length with LL is +much easier than calculating the right margin, e.g.\& +.RS +.EX +.B .LL 17P+3p +.EE +.RE +. +.P +If you use the macros +.BR .PAGE , +.B .PAGEWIDTH +or +.B PAPER +without invoking +.B .R_MARGIN +afterwards, +.B mom +automatically sets +.B .R_MARGIN +to +.IR "1 inch" . +. +If you set a line length after these macros (with +.BR .LL ), +the line length calculated by +.B .R_MARGIN +is, of course, overridden. +. +.P +Note: +.B .R_MARGIN +behaves in a special way when you\[aq]re using the document processing +macros. +. +.RE +. +. +.\" ====================================================================== +.\" ST - Set String Tabs +.\" ====================================================================== +.TP +.FONT B .ST I " " B "L | R | C | J [ QUAD ]" +. +.RS +.P +After +.I string tabs +have been marked off on an input line (see +.BR \[rs]*[ST]\*[Ellipsis]\[rs]*[STX] ), +you need to +.I set +them by giving them a direction and, optionally, the +.B \%QUAD +argument. +. +.P +In this respect, +.B .ST +is like +.B \%.TAB_SET +except that you don\[aq]t have to give +.B .ST +an indent or a line length (that\[aq]s already taken care of, inline, +by +.BR \[rs]*[ST]\*[Ellipsis]\[rs]*[STX] ). +. +.P +If you want string +.I tab 1 +to be +.BR \%left , +enter +.RS +.EX +.B .ST 1 L +.EE +.RE +. +If you want it to be +.I \%left +and +.IR \%filled , +enter +.RS +.EX +.B .ST 1 L \%QUAD +.EE +.RE +. +If you want it to be justified, enter +.RS +.EX +.B .ST 1 J +.EE +.RE +. +.RE +. +. +.\" ====================================================================== +.\" TAB - Call Tabs +.\" ====================================================================== +.TP +.BI \%.TAB " " +After +.I tabs +have been defined (either with +.B \%.TAB_SET +or +.BR .ST ), +.B \%.TAB +moves to whatever +.I tab number +you pass it as an argument. +. +.RS +. +.P +For example, +.RS +.EX +.B \%.TAB 3 +.EE +.RE +moves you to +.IR "\%tab 3" . +. +.P +Note: +.B \%.TAB +breaks the line preceding it and advances 1 linespace. +. +Hence, +.RS +.EX +.B .TAB 1 +.B A line of text in tab 1. +.B .TAB 2 +.B A line of text in tab 2. +.EE +.RE +produces, on output +.RS +.EX +.B "A line of text in tab 1." +.B " A line of text in tab 2." +.EE +.RE +. +.P +If you want the tabs to line up, use +.B .TN +.RI ( "Tab Next" ) +or, more conveniently, the inline escape \[rs]*[TB+]: +.RS +.EX +\fB.TAB 1 +A line of text in tab 1.\[rs]*[TB+] +A line of text in tab 2. +.EE +.RE +which produces +.RS +.EX +.B "A line of text in tab 1. A line of text in tab 2." +.EE +.RE +. +.P +If the text in your tabs runs to several lines, and you want the first +lines of each tab to align, you must use the multi-column macros. +. +.P +.I Additional note: +Any indents in effect prior to calling a tab are automatically turned +off by +.BR TAB . +. +If you were happily zipping down the page with a left indent of +.I 2 picas +turned on, and you call a +.I tab +whose indent from the left margin is +.IR "6 picas" , +your new distance from the +.I left margin +will be +.IR "6 picas" , +not +I 6 picas plus the 2 pica +indent. +. +.P +.I \%Tabs +are not by nature columnar, which is to say that if the text inside a +.I tab +runs to several lines, calling another +.I tab +does not automatically move to the baseline of the first line in the +.IR "previous tab" . +. +To demonstrate: +.RS +.EX +\f[B]TAB 1 +Carrots +Potatoes +Broccoli +\&.TAB 2 +$1.99/5 lbs +$0.25/lb +$0.99/bunch +.EE +.RE +produces, on output +.RS +.EX +\fBCarrots +Potatoes +Broccoli + $1.99/5 lbs + $0.25/lb + $0.99/bunch +.EE +.RE +. +.RE +. +.\" ====================================================================== +.\" TB - Call Tabs Alias +.\" ====================================================================== +.TP +.BI .TB " " +Alias to +.B .TAB +. +. +.\" ====================================================================== +.\" TI - TEMPORARY (LEFT) INDENT +.\" ====================================================================== +.TP +.BI "\%.TI [" " " ] +Temporary left indent \[em] the optional argument requires a +.I unit of measure +. +.RS +. +.P +A temporary indent is one that applies only to the first line of text +that comes after it. +. +Its chief use is indenting the first line of paragraphs. +.RB ( Mom\[aq]s +.B .PP +macro, for example, uses a +.IR "temporary indent" .) +. +.P +The first time you invoke +.BR .TI , +you must give it a measure. +. +If you want to +.I indent +the first line of a paragraph by, say, 2 ems, do +.RS +.EX +.B .TI 2m +.EE +.RE +. +.P +Subsequent invocations of +.B .TI +do not require you to supply a measure; +.B mom +keeps track of the last measure you gave it. +. +.P +Because +.I temporary indents +are temporary, there\[aq]s no need to turn them off. +. +.P +.I IMPORTANT: +Unlike +.BR .IL , +.B .IR +and +.BR IB , +measures given to +.B .TI +are NOT additive. +. +In the following example, the second +.B \%".TI 2P" +is exactly +.IR "2 picas" . +.RS +.EX +.B .TI 1P +.B The beginning of a paragraph\*[Ellipsis] +.B .TI 2P +.B The beginning of another paragraph\*[Ellipsis] +.EE +.RE +. +.RE +. +. +. +.\" ====================================================================== +.\" TN - Tab Next +.\" ====================================================================== +.TP +.B .TN +Tab Next +. +.RS +.P +Inline escape +.B \[rs]*[TB+] +. +.P +.B TN +moves over to the +.I next tab +in numeric sequence +.RI ( "tab n+1" ) +without advancing on the page. +. +See the +.I NOTE +in the description of the +.B \%.TAB +macro for an example of how +.B TN +works. +. +.P +In +.I \%tabs +that aren\[aq]t given the +.B QUAD +argument when they\[aq]re set up with +.B \%.TAB_SET +or +.BR ST , +you must terminate the line preceding +.B .TN +with the +.B \[rs]c +inline escape. +. +Conversely, if you did give a +.B QUAD +argument to +.B \%.TAB_SET +or +.BR ST , +the +.B \[rs]c must not be used. +. +.P +If you find remembering whether to put in the +.B \[rs]c +bothersome, you may prefer to use the inline escape alternative +to +.BR .TN , +.BR \[rs]*[TB+] , +which works consistently regardless of the fill mode. +. +.P +.I Note: +You must put text in the input line immediately after +.BR .TN . +. +Stacking of +.BR .TN \[aq]s +is not allowed. +. +In other words, you cannot do +.RS +.EX +\fB.TAB 1 +Some text\[rs]c +\&.TN +Some more text\[rs]c +\&.TN +\&.TN +Yet more text\fR +.EE +.RE +. +The above example, assuming +.I tabs +numbered from +.I 1 +to +.IR 4 , +should be entered +.RS +.EX +\fB.TAB 1 +Some text\[rs]c +\&.TN +Some more text\[rs]c +\&.TN +\[rs]&\[rs]c +\&.TN +Yet more text +.EE +.RE +. +\[rs]& is a zero-width, non-printing character that +.I groff +recognizes as valid input, hence meets the requirement for input text +following +.BR .TN . +. +.RE +. +. +.\" ====================================================================== +.\" Tab Quit +.\" ====================================================================== +.TP +.B .TQ +.B TQ +takes you out of whatever +.I tab +you were in, advances +.IR "1 linespace" , +and restores the +.IR "left margin" , +.IR "line length" , +.I quad direction +and +.I fill mode +that were in effect prior to invoking any +.IR tabs . +. +. +.\" ====================================================================== +.\" Top Margin +.\" ====================================================================== +.TP +.BI .T_MARGIN " " +Top margin +. +.RS +. +.P +Requires a unit of measure +. +.P +.B .T_MARGIN +establishes the distance from the top of the printer sheet at which +you want your type to start. +. +It requires a unit of measure, and decimal fractions are allowed. +. +To set a top margin of 2\(12 centimetres, you\[aq]d enter +.RS +.EX +.B .T_MARGIN 2.5c +.EE +.RE +. +.B .T_MARGIN +calculates the vertical position of the first line of type on a page +by treating the top edge of the printer sheet as a baseline. +Therefore, +.RS +.EX +.B .T_MARGIN 1.5i +.EE +.RE +puts the baseline of the first line of type 1\(12 inches beneath the +top of the page. +. +.P +Note: +.B .T_MARGIN +means something slightly different when you\[aq]re using the document +processing macros. +. +See Top and bottom margins in document processing for an explanation. +. +.P +IMPORTANT: +.B .T_MARGIN +does two things: it establishes the top margin for pages that come +after it and it moves to that position on the current page. +. +Therefore, +.B .T_MARGIN +should only be used at the top of a file (prior to entering text) or +after NEWPAGE, like this: +.RS +.EX +.B .NEWPAGE +.B .T_MARGIN 6P +.I +.EE +.RE +. +.RE +. +. +.\" -------------------------------------------------------------------- +.SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.BR groff (@MAN1EXT@), +.BR groff_mom (@MAN7EXT@), +. +.TP +.B \%@HTMLDOCDIR@/\:mom/\:toc.html +\[en] entry point to the HTML documentation +. +.TP +.UR http://\:www.schaffter.ca/\:mom/\:momdoc/\:toc.html +.UE +\[en] HTML documentation online +. +.TP +.UR http://\:www.schaffter.ca/\:mom/ +.UE +\[en] the mom macros homepage +. +. +.\" -------------------------------------------------------------------- +.SH BUGS +.\" -------------------------------------------------------------------- +. +Please send bug reports to the +.MT bug-groff@gnu.org +groff-bug mailing list +.ME +or directly to the authors. +. +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. +.cp \n[groff_mom_C] +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/contrib/mom/Makefile.sub groff-1.22.3/contrib/mom/Makefile.sub --- groff-1.22.2/contrib/mom/Makefile.sub 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/contrib/mom/Makefile.sub 2014-11-04 09:38:35.502520534 +0100 @@ -1,19 +1,19 @@ -# Copyright (C) 2002-2006, 2009, 2012-2013 -# Free Software Foundation, Inc. +# -*- makefile -*- +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # Written by Werner Lemberg (wl@gnu.org) -# +# # This file is part of groff. -# +# # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 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 . @@ -30,6 +30,7 @@ FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir) +KFLAG=-k GROFF=\ GROFF_COMMAND_PREFIX= \ @@ -40,7 +41,7 @@ GROFF_COMMAND_PREFIX= \ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \ PDFMOM_BIN_PATH="$(top_builddir)/src/devices/gropdf" \ - $(PDFMOMBIN) $(FFLAG) $(TFLAG) + $(PDFMOMBIN) $(FFLAG) $(TFLAG) $(KFLAG) MAN7=\ groff_mom.n @@ -108,82 +109,122 @@ examples/stamp \ om.tmac-s +RM=rm -f + #.SUFFIXES: .mom .ps #.mom.ps: # $(GROFF) -Tps -mom $< >$@ .SUFFIXES: .mom .pdf .mom.pdf: - $(PDFMOM) $< >$@ + LC_ALL=C $(PDFMOM) $< >$@ -all: stamp-strip $(PROCESSEDEXAMPLEFILES) +all: stamp-strip $(make_pdfexamples) $(PROCESSEDEXAMPLEFILES): penguin.ps penguin.pdf examples/stamp +pdfexamples: $(PROCESSEDEXAMPLEFILES) + penguin.ps: cp $(srcdir)/examples/penguin.ps . penguin.pdf: cp $(srcdir)/examples/penguin.pdf . examples/stamp: - test -d examples || $(mkinstalldirs) examples + -test -d examples || $(mkinstalldirs) examples touch $@ -install_data: stamp-strip $(NORMALFILES) $(HTMLDOCFILES) \ - $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) +install_data: install_always \ + $(make_install_pdfdoc) $(make_install_shipped_htmldoc) \ + $(make_install_examples) + +install_always: stamp-strip $(NORMALFILES) -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir) for f in $(NORMALFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(tmacdir)/$$f; \ done for f in $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ $(INSTALL_DATA) $$f-s $(DESTDIR)$(tmacdir)/$$f; \ done + +install_pdfdoc: +# Since this uses examples/, it's in install_pdfexamples + +install_shipped_htmldoc: install_always $(HTMLDOCFILES) -test -d $(DESTDIR)$(htmldocdir)/mom \ || $(mkinstalldirs) $(DESTDIR)$(htmldocdir)/mom for f in $(HTMLDOCFILES_); do \ - rm -f $(DESTDIR)$(htmldocdir)/mom/$$f; \ + $(RM) $(DESTDIR)$(htmldocdir)/mom/$$f; \ $(INSTALL_DATA) $(srcdir)/momdoc/$$f \ $(DESTDIR)$(htmldocdir)/mom/$$f; \ done + + +install_examples: install_examples_always $(make_install_pdfexamples) + +install_examples_always: $(EXAMPLEFILES) -test -d $(DESTDIR)$(exampledir)/mom \ || $(mkinstalldirs) $(DESTDIR)$(exampledir)/mom for f in $(EXAMPLEFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/mom/$$f; \ + $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \ $(INSTALL_DATA) $(srcdir)/examples/$$f \ $(DESTDIR)$(exampledir)/mom/$$f; \ done + +install_pdfexamples: install_examples_always $(PROCESSEDEXAMPLEFILES) for f in $(PROCESSEDEXAMPLEFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/mom/$$f; \ + $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \ $(INSTALL_DATA) examples/$$f $(DESTDIR)$(exampledir)/mom/$$f; \ done -test -d $(DESTDIR)$(pdfdocdir) \ || $(mkinstalldirs) $(DESTDIR)$(pdfdocdir) for f in $(PDFDOCFILE); do \ - rm -f $(DESTDIR)$(pdfdocdir)/$$f; \ + $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \ ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \ done stamp-strip: $(STRIPFILES) for f in $(STRIPFILES); do \ - rm -f $$f-s; \ - sed -f $(top_srcdir)/tmac/strip.sed $(srcdir)/$$f >$$f-s; \ + $(RM) $$f-s; \ + LANG=C LC_ALL=C \ + sed -f $(top_srcdir)/tmac/strip.sed $(srcdir)/$$f >$$f-s; \ done touch $@ -uninstall_sub: +uninstall_sub: uninstall_always \ + $(make_uninstall_pdfdoc) $(make_uninstall_shipped_htmldoc) \ + $(make_uninstall_examples) + +uninstall_always: -for f in $(NORMALFILES) $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ done + +uninstall_pdfdoc: uninstall_always +# Since that used examples/, it's in uninstall_pdfexamples + +uninstall_shipped_htmldoc: uninstall_always -for f in $(HTMLDOCFILES_); do \ - rm -f $(DESTDIR)$(htmldocdir)/mom/$$f; \ + $(RM) $(DESTDIR)$(htmldocdir)/mom/$$f; \ done - -rmdir $(DESTDIR)$(htmldocdir)/mom - -for f in $(EXAMPLEFILES_) $(PROCESSEDEXAMPLEFILES_); do \ - rm -f $(DESTDIR)$(exampledir)/mom/$$f; \ + -test -d $(DESTDIR)$(htmldocdir)/mom && \ + rmdir $(DESTDIR)$(htmldocdir)/mom + +uninstall_examples: uninstall_examples_always $(make_uninstall_pdfexamples) + -test -d $(DESTDIR)$(exampledir)/mom && \ + rmdir $(DESTDIR)$(exampledir)/mom + +uninstall_examples_always: + -for f in $(EXAMPLEFILES_); do \ + $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \ done + +uninstall_pdfexamples: uninstall_examples_always -for f in $(PDFDOCFILE); do \ - rm -f $(DESTDIR)$(pdfdocdir)/$$f; \ + $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \ + done + -for f in $(PROCESSEDEXAMPLEFILES_); do \ + $(RM) $(DESTDIR)$(exampledir)/mom/$$f; \ done - -rmdir $(DESTDIR)$(exampledir)/mom diff -ruN groff-1.22.2/contrib/mom/momdoc/appendices.html groff-1.22.3/contrib/mom/momdoc/appendices.html --- groff-1.22.2/contrib/mom/momdoc/appendices.html 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/appendices.html 2014-11-04 09:38:35.612519159 +0100 @@ -2,8 +2,7 @@ @@ -1288,20 +1262,27 @@ which may be given in any order:
- FAMILY <family> - FONT <font> - SIZE <+|-size> - QUAD <direction> - COLOR <colour> - UNDERSCORE <weight> <gap> | NO_UNDERSCORE - UNDERSCORE2 <weight> <gap1> <gap2> | NO_UNDERSCORE2 - CAPS | NO_CAPS - BASELINE_ADJUST <amount to raise heading from the baseline> - SPACE_AFTER | NO_SPACE_AFTER + FAMILY <family> \ + FONT <font> \ + SIZE <+|-size> \ + QUAD <direction> \ + COLOR <colour> \ + UNDERSCORE <weight> <gap> | NO_UNDERSCORE \ + UNDERSCORE2 <weight> <gap1> <gap2> | NO_UNDERSCORE2 \ + CAPS | NO_CAPS \ + BASELINE_ADJUST <amount to raise heading from the baseline> \ + SPACE_AFTER | NO_SPACE_AFTER \ NUMBER | NO_NUMBER

+

+You may enter your entire argument list on a single line, or, if it +is very long, break it into shorter lines with the +“line-continued” backslash {\), as shown +above. +

+

The arguments to FAMILY, FONT, SIZE, QUAD, and @@ -1361,7 +1342,7 @@ TOC_ENTRY_NUMBERS. Mom also has a special macro to toggle whether to prefix a chapter number to numbered headings and Table of Contents entries, -PREFIX_CHAPTER_NUMBER. +PREFIX_CHAPTER_NUMBER.

@@ -2000,6 +1981,33 @@

+

Keeping QUOTEs and BLOCKQUOTEs together as a block

+ +

+The text of quotes and blockquotes is output immediately, and may therefore +start on one page and finish on the next. If you wish to keep the +text together as a block, deferred to the following page if the +block doesn’t all fit on one page, wrap +(BLOCK)QUOTE / (BLOCK)QUOTE OFF +inside a +float. If you further wish to +force a page break before the floated quote or blockquote (leaving +whitespace at the bottom of the page, pass +FLOAT +the FORCE argument. + + .FLOAT FORCE + .QUOTE + Fly me to the moon + And let me play among the stars + Let me see what life is like + On Jupiter and Mars + .QUOTE END + .FLOAT OFF + + +

+
@@ -2317,7 +2325,7 @@ -

Inserting code snippets

+

Inserting code into a document

-CODE is a convenience macro that facilitates entering code snippets +CODE is a convenience macro that facilitates entering code blocks into documents. Its use is not restricted to documents created using mom’s document processing macros; it can be used for “manually” typeset documents as well. @@ -2344,35 +2352,16 @@

-When you invoke .CODE without an argument, or use the -inline escape, -\*[CODE], -mom changes the font to a +When you invoke the macro, .CODE, or insert \*[CODE] into +running text, mom switches to a fixed-width font (Courier, by default) and turns SMARTQUOTES -off. Additionally, if you invoke .CODE inside -QUOTE -while in -PRINTSTYLE TYPEWRITE -with the default underlining of quotes turned on, it disables the -underlining for the duration of CODE. +off.

-Passing any argument other than BR, BREAK -or SPREAD to CODE (eg OFF, QUIT, END, X, -etc.) turns CODE off and returns the family, font, smartquotes -and (if applicable) underlining of quotes to their former state. -If you’ve used the inline escape, \*[CODE], to -initiate a section of code, \*[CODE OFF] equally returns -things to their former state. -

- -
-

-Note: -If your code snippet includes the backslash character, which is +If your code includes the backslash character, which is groff’s escape character, you will have to change the escape character temporarily to something else with the macro, ESC_CHAR. @@ -2380,11 +2369,27 @@ to use in code snippets, therefore she cannot automatically replace the escape character with something else.

-
-
+

+The correct order for changing the escape character inside +CODE is + + .CODE + .ESC_CHAR character + <code> + .ESC_CHAR . + .CODE OFF + +

+ +

+Alternatively, you can enter the backslash character as +\e, which tells groff to print a literal backslash. +

+ +

-Important: +Note: .CODE does not cause a line break when you’re in a fill mode @@ -2407,7 +2412,7 @@ PP).

-

+

In all likelihood, if you want the situation described above (ie a break before and after CODE), what you probably want is to use QUOTE @@ -2425,15 +2430,66 @@ running text with vertical whitespace.

+
-

-Note: -BR, BREAK and SPREAD have no -effect when used with the inline escape, \*[CODE]. The -assumption behind \*[CODE] is that you’re inserting -a bit of code into a line, not creating a distinct code block. +

+Passing any argument other than BR, BREAK or +SPREAD to CODE (eg OFF, QUIT, END, X, etc.) +turns CODE off and returns the family, font, and smartquotes back to +their former state.

-
+ +

Using \*[CODE] inline

+ +

+\*[CODE] invokes .CODE, allowing you to +bracket code snippets inline. It does not accept the BR, +BREAK, or SPREAD arguments. It is most useful +for short snippets, as in the following example. +
+ + \*[CODE]apropos\*[CODE OFF] and \*[CODE]man -k\*[CODE] are identical. + +

+ +

+\*[CODE] does not permit changing the escape character, +so \e must be used. Furthermore, if your code starts +with a period, you must enter it as “\&.”. +
+ + Registers are created with the \*[CODE]\&.nr\*[CODE OFF] request. + +

+ +

CODE and punctuation

+ +

+.CODE OFF automatically inserts a word space into +running text. If your CODE block is to be followed by punctuation +with the parameters of +running text, +you must terminate the block with “\c” and +enter the punctuation at the beginning of the next input line. If +the punctuation mark is a period, you must precede it with +“\&”. +
+ + ...for example, + .CODE + echo "Hello, world" | sed -e 's/Hello,/Goodbye, cruel/'\c + .CODE OFF + \&. As this demonstrates... + +Use of \*[CODE] inline does not require the +\c, however periods after \*[CODE OFF] +still need to be introduced with \&, as in this example: +
+ + ...append the unit of measure \*[CODE]p\*[CODE OFF]\&. New sentence... + +

+

CODE control macros and defaults

@@ -2642,8 +2698,7 @@

-For example, if you want a list enumerated -with =>, +For example, if you want a list enumerated with =>,
.LIST USER => @@ -2656,6 +2711,25 @@ => A list item +Some useful special groff characters you might want to pass to +USER are: + + \[sq] - square box + \[rh] - pointing hand + \[->] - right arrow + \[rA] - right double arrow + \[OK] - checkmark + +The size and vertical positioning of special characters may be +adjusted with +inline escapes +in the argument passed to USER. For example, to raise the position +of \[sq] slightly, you might do + + .LIST USER "\*[UP .25p]\[sq]\*[DOWN .25p]" + or + .LIST USER \v'-.25p]\[sq]\[\v'.25p'] +

@@ -3045,7 +3119,7 @@
  • Control macros and defaults
  • @@ -3055,14 +3129,15 @@
    • numbers every line of paragraph text; line-numbering is suspended for all other document processing tags (like - docheaders, epigraphs, heads, subheads, etc.) and special + docheaders, epigraphs, headings, quotes, etc.) and special pages (covers, endotes, bibliographies, etc.); be aware, though, that if you turn docheaders off (with DOCHEADER OFF) and create your own docheader, mom - will line-number your custom docheader + will line-number your custom docheader, so turn + line numbering on afterwards
    • doesn’t touch your line length; line numbers are hung outside your current left margin (as set with @@ -3078,12 +3153,14 @@

    -Line numbering may be enabled and disabled for -QUOTE -and/or -BLOCKQUOTE -in one of three styles. See -Line numbering control macros for quotes and blockquotes. +Mom expects that +QUOTEs +and +BLOCKQUOTEs +will not be line-numbered, however control macros +are provided to enable line numbering for either. +See +Line numbering control macros for quotes and blockquotes.

    @@ -3106,19 +3183,36 @@ of paragraph text. One of the chief reasons for wanting numbered lines is in order to identify footnotes or endnotes by line number instead of by a marker in the text. (See -FOOTNOTE_MARKER_STYLE LINE +Footnotes by linenumber for instructions on line-numbered footnotes, and -ENDNOTE_MARKER_STYLE +ENDNOTE_MARKER_STYLE LINE for instructions on line-numbered endnotes.)

    +
    +

    +Note: +Do not use NUMBER_LINES inside +QUOTE +or +BLOCKQUOTE. +By default, mom expects that quotes and blockquotes will not be +line numbered. If you wish to enable line numbering for them, you +must invoke +NUMBER_QUOTE_LINES +or +NUMBER_BLOCKQUOTE_LINES. +

    +
    + +

    The first time you invoke NUMBER_LINES you must, at a minimum, tell it what line number you want the next output line -to have. The optional arguments which lines to number +to have. The optional arguments which lines to number and gutter allow you to state which lines should be numbered (eg every five or every ten lines), and the gutter to place between line numbers and @@ -3283,11 +3377,12 @@

    1. Family/font/size/colour
    2. -
    3. Line numbering control for quotes and blockquotes -
    @@ -3307,184 +3402,127 @@
    -

    2. Line numbering control macros for QUOTE and BLOCKQUOTE

    +

    2. Line numbering control macros for QUOTE and BLOCKQUOTE

    -
    Number QUOTE lines
    +
    • Including QUOTEs and BLOCKQUOTEs in the line numbering scheme

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

    - -

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

    - -

    -If you’d like to change the gutter for quotes line-numbered in -this way, invoke .NUMBER_QUOTE_LINES with a digit -representing the number of -figure spaces -you’d like between the line numbers and the quoted text, like this: -
    +or - .NUMBER_QUOTE_LINES 1 + .NUMBER_BLOCKQUOTE_LINES -With the above, line numbers in quotes (and only quotes) will have -a gutter of 1 figure space. +either before or after NUMBER_LINES. Both behave +identically with respect to the affected macro (ie QUOTE +or BLOCKQUOTE).

    -

    -If you’re using "line numbering style" for footnotes -(FOOTNOTE_MARKER_STYLE LINE), -you may not wish to have quotes visibly line-numbered, but -still want to embed footnotes inside quotes. In order to do that, -mom allows you to say - - .NUMBER_QUOTE_LINES SILENT - -When you invoke .NUMBER_QUOTE_LINES SILENT, -mom continues to increment line numbers while quotes are being -output, but they won’t appear in the output copy. (Compare -this with mom’s default behaviour of suspending -incrementing of line numbers during the output of quotes.) This -allows you to embed line-numbered footnotes inside quotes and have -the line number label in the footnote come out sensibly. -

    +
    • Selectively enabling line numbering for QUOTEs and BLOCKQUOTEs

    -Once having turned NUMBER_QUOTE_LINES on, you may disable it with - - .NUMBER_QUOTE_LINES OFF - -(or QUIT, END, X, etc). +If you’d like to enable line numbering +selectively for quotes and blockquotes only, enable +NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES +first, followed by NUMBER_LINES <n>, where +<n> is the first line number of the quote +or blockquote. Afterwards, enter your QUOTE or +BLOCKQUOTE. When the quote or blockquote is finished (ie +after QUOTE OFF or BLOCKQUOTE OFF), +turn line numbering off. Each subsequent quote or blockquote you +want line numbered requires only NUMBER_LINES <n> +(with a corresponding NUMBER_LINES OFF) until you turn +NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES +off.

    -
    Number BLOCKQUOTE lines
    -

    -If you’d like mom to number lines of output text -in a -BLOCKQUOTE -as part of the same order and sequence as paragraph text, simply -invoke +Here’s a recipe where the first line number of quotes starts +repeatedly at “1”. - .NUMBER_BLOCKQUOTE_LINES + <running text> + .NUMBER_QUOTE_LINES + .NUMBER_LINES 1 + .QUOTE + <text of quote> + .QUOTE OFF + .NUMBER_LINES OFF + <further running text> + .NUMBER_LINES 1 + .QUOTE + <text of quote> + .QUOTE OFF + .NUMBER_LINES OFF + <further running text> -by itself.

    +
    • Changing the line number gutter for QUOTEs and BLOCKQUOTEs
    +

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

    -If you’d like to change the gutter for blockquotes line-numbered in -this way, invoke - - .NUMBER_BLOCKQUOTE_LINES - -with a digit representing the number of +If you’d like to change the line number gutter for +quotes or blockquotes, invoke NUMBER_QUOTE_LINES or +NUMBER_BLOCKQUOTE_LINES with a digit representing the +number of figure spaces -you’d like between the line numbers and the blockquoted text, like -this: +you’d like between the line numbers and the quoted text, like this:
    - .NUMBER_BLOCKQUOTE_LINES 1 + .NUMBER_QUOTE_LINES 3 - -With the above, line numbers in blockquotes (and only blockquotes) -will have a gutter of 1 figure space. +With the above, line numbers in quotes (and only quotes) will have +a gutter of 3 figure spaces.

    +
    • Silently increment line numbers during QUOTE and BLOCKQUOTE
    +

    -If you are using "line numbering style" for footnotes -(FOOTNOTE_MARKER_STYLE LINE), -you may not wish to have blockquotes visibly line-numbered, -but still want to embed footnotes inside blockquotes. In order to -do that, mom allows you to say +If you’ve asked mom not to line number quotes or blockquotes, +but would like line numbering to continue while they’re +being output (as opposed to mom’s default behaviour of +suspending incrementing of line numbers during the output of +quotes and blockquotes), invoke + + .NUMBER_QUOTE_LINES SILENT + +or .NUMBER_BLOCKQUOTE_LINES SILENT -When you invoke .NUMBER_BLOCKQUOTE_LINES SILENT, -mom continues to increment line numbers while blockquotes are being -output, but they won’t appear in the output copy. (Compare -this with mom’s default behaviour of suspending -incrementing of line numbers during the output of blockquotes.) -This allows you to embed line-numbered footnotes inside blockquotes -and have the line number label in the footnote come out sensibly. +With these, mom continues to increment line numbers while quotes +or blockquotes are being output, but the line numbers won’t +appear in the output copy.

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

    - -

    3. Numbering QUOTE and BLOCKQUOTE lines on a case by case basis

    - -

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

    - -

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

    - -

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


    @@ -3838,7 +3876,7 @@

    -• <indent value> requires a unit of measure +• <indent value> requires a unit of measure
    See HYPER-IMPORTANT NOTE.

    @@ -4461,19 +4499,24 @@

    By default, mom starts the endnotes page with a bold, centred, double-underscored head, “ENDNOTES”. -Underneath—flush left, bold, and underscored—she prints -the document title (or, in the case of chapters, the chapter number -or title). She then prints the endnotes. Endnotes are identified +Subsequently, for each section in a +collated +document (eg chapters in a book), she identifies the section in bold +type, flush left and underscored, followed by one-half linespace. +Endnotes pertaining to the section are output underneath, identified by superscript numbers. The text of the endnotes themselves is indented to the right of the numbers.

    -

    -If the endnotes are grouped together at the end of a collated -document, each section of the document that contains endnotes is -identified by its own unique title (or chapter number or title), -bold, flush left, and underscored. +

    +

    +Note: +The one-half linespace between section identifiers and the endnotes +themselves, plus the need to group identifiers and endnotes sensibly, +means that mom cannot guarantee perfectly aligned bottom margins. +This is an unavoidable consequence of the structure of endnotes.

    +

    Of course, all the defaults, as well as the overall style of the @@ -4485,7 +4528,6 @@ of the body of the document.

    -

    Endnotes and columnar documents

    @@ -6277,7 +6319,7 @@ Back to Table of Contents Top - Next: Inserting images + Next: Graphics, floats, and preprocessor support diff -ruN groff-1.22.2/contrib/mom/momdoc/docprocessing.html groff-1.22.3/contrib/mom/momdoc/docprocessing.html --- groff-1.22.2/contrib/mom/momdoc/docprocessing.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/docprocessing.html 2014-11-04 09:38:35.613519146 +0100 @@ -2,8 +2,7 @@ -

    Introduction to document processing

    +

    Introduction to document processing

    Document processing with mom uses markup tags to identify document elements @@ -299,12 +304,7 @@

    For example, say you want to insert an image into a document with -PDF_IMAGE -or PSPIC. -

    - -

    Images and graphics aren’t usually conveniently sized in multiples of the document leading, which means that when you insert the picture, you disrupt mom’s ordered placement of baselines @@ -318,7 +318,7 @@
    <text> - .PDF_IMAGE <args> or .PSPIC <args> + .PSPIC <args> .SHIM <text> @@ -335,8 +335,7 @@

    And say, on previewing the above example, you find the image doesn’t centre nicely between the lines of text, you can -adjust the image position either by passing a baseline adjustment -to PDF_IMAGE, or by using +adjust the image position by using ALD or RLD @@ -344,22 +343,26 @@
    <text> - .PDF_IMAGE <args> -3p - .SHIM - <text> - -and - - <text> .RLD 3p .PSPIC <args> .SHIM <text> -both raise an image slightly within the space allotted for it while -ensuring that text underneath falls exactly where should. +which raises the image slightly and thereby balances the whitespace around it.

    +

    +You may sometimes find the amount of space generated by +SHIM looks too big, whether inserted manually into a +document or as a result of automatic shimming (see immediately +below). The situation occurs when the amount of shimming applied +comes close to the leading currently in effect, making it seem as if +there’s one linespace too much whitespace. The solution is +simply to add .SPACE -1v or .RLD 1v +to the document immediately after .SHIM. (Both +.SPACE -1v and .RLD 1v back up +by one linespace.) +

    Automatic shimming of headings, quotes, blockquotes, PDF images, and floats

    @@ -368,7 +371,7 @@

    • before headings
    • around quotes and blockquotes
    • -
    • after PDF images and floats
    • +
    • after PDF images, floats, and tables

    @@ -391,8 +394,9 @@ QUOTE, BLOCKQUOTE, PDF_IMAGE -or FLOAT. +or +TS.

    @@ -1735,47 +1739,46 @@

    Just as important: -PRINTSTYLE must precede any and all page and style parameters -associated with a document. This applies primarily to, but is by -no means restricted to, PRINTSTYLE TYPESET. PRINTSTYLE -sets up complete templates that include default papersize, margins, -family, fonts, point sizes, and so on. Therefore, changes to any -aspect of document style must come afterwards. -

    -
    - -

    -TYPESET, as the argument implies, typesets -documents (by default in Times Roman; see -TYPESET defaults). -You have full access to all the -typesetting macros -as well as the -style control macros -of document processing. -

    - -

    -As mentioned above, PRINTSTYLE TYPESET must come before -any changes to mom’s default typographic settings. For -example, +PRINTSTYLE must precede any and all page and style +parameters associated with a document with the exception of +PAPER, PAGEWIDTH, and/or +PAGELENGTH, which should be placed at the top of your +file. PRINTSTYLE sets up complete templates that include default +margins, family, fonts, point sizes, and so on. Therefore, changes +to any aspect of document style must come afterwards. For example,
    .PAPER A4 .LS 14 + .QUAD LEFT .PRINTSTYLE TYPESET -will not changes mom’s default paper size to A4, -nor her default document leading 14 points, whereas +will not change mom’s default document leading to 14 points, +nor the default justification style (fully justified) to left +justified, whereas
    - .PRINTSTYLE TYPESET .PAPER A4 + .PRINTSTYLE TYPESET .LS 14 + .QUAD LEFT will.

    + + +

    +TYPESET, as the argument implies, typesets +documents (by default in Times Roman; see +TYPESET defaults). +You have full access to all the +typesetting macros +as well as the +style control macros +of document processing. +

    +

    With TYPEWRITE, mom does her best to reproduce the look and feel of typewritten, double-spaced copy (see @@ -2177,11 +2180,10 @@

    -Note: -Don’t use the macros listed in +Important: +Do not use the macros listed in Changing document-wide typesetting parameters after START -prior to START; they are exclusively for use -afterwards. +prior to START; they are exclusively for use afterwards.

    @@ -2288,10 +2290,11 @@ control macros.
    - .HEAD_FAMILY H - .HEAD_FONT BI - .HEAD_QUAD L - .HEAD_UNDERLINE OFF + .HEADING_STYLE 1 \ + FAMILY H \ + FONT BI \ + QUAD L \ + NO_UNDERSCORE Then, in the preliminary document set-up section of your main file, you’d include the style sheet, or template, like this: @@ -2563,8 +2566,10 @@ you don’t like the way mom does things) and use .DOCHEADER OFF with its optional distance argument to ensure that the body of your document starts where -you want. You can even insert a PostScript image file (see PSPIC). +you want. You can even insert a PDF or PostScript image file (see +PSPIC). +and +PDF_IMAGE).

    @@ -3068,14 +3073,51 @@

    Note: -Mom ignores columns completely -when the +Mom ignores columns completely when the PRINTSTYLE is TYPEWRITE. The notion of typewriter-style output in columns is just too ghastly for her to bear.

    +

    Marking the first page column start position

    + +

    +If you insert or remove space after the docheader, i.e. immediately after +START +in your input file, mom needs to know where your first column begins +in order to align subsequent columns on the first page. +

    + +
    +Macro: COL_MARK +
    + +

    +COL_MARK tells mom where the first column after the +docheader begins, in order for the top of subsequent columns on the +first page to be aligned. Note that if you do not manually add +or remove space after the docheader, there is no need to invoke +COL_MARK. +

    + +
    +

    +Note: +If you add or subtract space after the docheader, e.g. with +ALD +or +SP, +and your +unit of measure +is something other than “v”, be sure to follow the spacing +command with +.SHIM +unless shimming has been disabled with +NO_SHIM. +

    +
    +

    Using tabs when COLUMNS are enabled

    @@ -3292,12 +3334,29 @@ Using LS to temporarily change leading within a document will almost certainly result in a - bottom margin that doesn’t align with - the bottom margin of subsequent pages. You’ll + bottom margin that doesn’t align with the + bottom margin of subsequent pages. You’ll need to use the SHIM macro to get mom back on track when you’re ready to return to the document’s default leading. + + + AUTOLEAD •Invoked before START, sets the overall document + leading as a function of the overall document + point size (ie the point size used in paragraphs); + subsequently disabled after START, except for calls + to DOC_PT_SIZE + + •DOC_LEAD before DOC_PT_SIZE cancels the AUTOLEAD + set before START + + •Invoked after START, remains in effect for all + subsequent point size changes made with PT_SIZE, + but does not affect the leading of the document + element tags (eg HEADING, PP, QUOTE...), or calls + to DOC_PT_SIZE + QUAD •Changes quad for the duration of the current tag only. As soon as another document element tag is entered, the quad reverts to @@ -3412,18 +3471,34 @@ -

    Changing basic type and formatting parameters after START

    +

    Changing document-wide style parameters after START

    -In the normal course of things, you establish the basic type +In the normal course of things, you establish the basic type style parameters of a document prior to invoking START, using the typesetting macros -(L_MARGIN, FAMILY, PT_SIZE, LS, etc). After -START, you must use the following macros to make -global changes to the basic type parameters of a document. +(L_MARGIN, FAMILY, PT_SIZE, LS, etc). After START, you must +use the following macros if you wish to make global changes to the +basic type style parameters, for example changing the overall leading or +the justification style. +

    + +
    +

    +Important: +Because these macros globally update the chosen parameter, they +should only be used immediately prior to +COLLATE +or, if an occasional effect is desired, +NEWPAGE. +DOC_PT_SIZE, +for example, updates the point size of every page element, including +headers, footers, page numbers, and so on, which is almost certainly +not what you want in the middle of a page.

    +

    Post-START global style change macros

    @@ -3459,7 +3534,12 @@
  • the argument is the same as for L_MARGIN
  • -
  • changes all left margins to the new value
  • +
  • changes all left margins, including headers, footers, and page + numbers to the new value +
  • +
  • any document elements that use a left indent calculate + the indent from the new value +
  • the line length remains the same (ie the right margin shifts when you change the left margin)
  • @@ -3485,19 +3565,10 @@
  • the argument is the same as for R_MARGIN
  • -
  • changes all right margins, including - docheaders, - headers (or footers) and page numbering to the new value; - for changing the right margin of - running text - only, use - R_MARGIN - (see - typesetting macros during - document processing, - entry for R_MARGIN) +
  • changes all right margins, including headers, footers, and + page numbers to the new value;
  • -
  • all mom commands that include a right indent calculate +
  • any document elements that use a right indent calculate the indent from the new value
  • @@ -3525,13 +3596,6 @@
  • exactly equivalent to changing the right margin with DOC_RIGHT_MARGIN (see above); - for changing the line length of - running text - only, use - LL - (see - typesetting macros during document processing, - entry for LL)
  • @@ -3601,6 +3665,12 @@ the pertinent document element for instructions on how to do this) +
  • if + AUTOLEAD + was invoked before START; the value of AUTOLEAD will be used + to update the leading of all document element tags except + FOOTNOTE and EPIGRAPH +
  • @@ -3639,21 +3709,13 @@ leading adjustment as explained in DOC_LEAD_ADJUST +
  • if + AUTOLEAD + was invoked before START; the value of that AUTOLEAD will be + cancelled +
  • -
    -

    -Important: -Do not use DOC_LEAD in the middle of a page! It should always and -only be invoked immediately prior to a new page, like this: -
    - - .DOC_LEAD <new value> - .NEWPAGE - -

    -
    -

    Note: diff -ruN groff-1.22.2/contrib/mom/momdoc/goodies.html groff-1.22.3/contrib/mom/momdoc/goodies.html --- groff-1.22.2/contrib/mom/momdoc/goodies.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/goodies.html 2014-11-04 09:38:35.613519146 +0100 @@ -2,8 +2,7 @@

    -

    Pagination control macros and defaults

    +

    Pagination control macros and defaults

    1. Family/font/size/colour
    2. @@ -2108,6 +2107,13 @@

      +
      +

      +Note: +HEADERS must be OFF for PAGENUM_POS TOP to work. +

      +
      +

      3. Enclose page numbers with hyphens (on or off)

      diff -ruN groff-1.22.2/contrib/mom/momdoc/images.html groff-1.22.3/contrib/mom/momdoc/images.html --- groff-1.22.2/contrib/mom/momdoc/images.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/images.html 2014-11-04 09:38:35.614519134 +0100 @@ -2,8 +2,7 @@ +

      PDF_IMAGE

      @@ -142,9 +178,15 @@
      Macro: PDF_IMAGE [ -L | -C | -R | -I <indent> ] \
      -<pdf image> <width> <height> \ +<image-file.pdf> <width> <height> [ SCALE <factor> ] \ +
      +[ ADJUST +|-<vertical adjustment> ] [ NO_SHIM ] \ +
      +[ FRAME ] \ +
      +[ CAPTION "<caption>" ] [ SHORT_CAPTION "<short caption>" ] \
      -[ SCALE <factor> ] [ ADJUST +|-<vertical adjustment> ]
      +[ LABEL "<label>" ]

      •  @@ -158,6 +200,14 @@ unit of measure

      +
      +

      +Note: +Arguments may be broken into several lines using the +“line-continued” backslash (\), as shown above. +

      +
      +

      Unlike PSPIC, @@ -184,9 +234,9 @@

      <pdf image> must be in PDF format, with a .pdf -extension. If it is not, mom will abort with a message. See here for instructions on converting image formats to -PDF. +extension. If it is not, mom will abort with a message. See +here +for instructions on converting image formats to PDF.

      @@ -209,23 +259,86 @@

      -The optional SCALE argument allows you to scale the image -by <factor>. The factor is a percentage of the -image’s original dimensions, thus -
      - - SCALE 50 - +The remaining arguments are optional and may be entered in any +order, although it’s best to put CAPTION, +SHORT_CAPTION, and LABEL last. +

      + +
      'SCALE'
      + +

      +SCALE allows you to scale the image by +<factor>. The factor is a percentage of the +image’s original dimensions, thus SCALE 50 scales the image to 50 percent of its original size. No percent sign or unit of measure should be appended.

      +
      'ADJUST'
      + +

      +ADJUST lets you raise (+) or lower (-) the image +within the space allotted for it +by the amount you specify. This is useful for achieving good +optical centering between surrounding blocks of type. A unit of +measure is required. +

      + +
      'NO_SHIM'
      + +

      +NO_SHIM instructs mom not to apply +shimming +after the image, which she does by default. Shimming ensures that +running text after the image falls properly on the page’s baseline +grid, but usually results in slightly unequal spacing above and +below, which must be corrected with the ADJUST argument. +Mom’s default shimming is generally a good idea since it ensures +properly aligned bottom margins for running text, however if you +have several images on the page, there may be visible differences in +the spacing beneath images. NO_SHIM corrects the +problem, but will result in running text that does not completely +fill the page unless shimming is applied manually elsewhere on the +same page. +

      + +
      'FRAME'
      + +

      +FRAME instructs mom to put a frame around the image. +Parameters for the frame are set with +PDF_IMAGE_FRAME. +

      + +
      'CAPTION'
      + +

      +CAPTION allows you to give the image a caption. By +default, the caption appears above the image, but may be attached to +the label that appears beneath the image. See +CAPTION_AFTER_LABEL +in +Captions and labels. +The text of the caption must be surrounded by double-quotes. +

      + +
      'SHORT_CAPTION'
      + +

      +SHORT_CAPTION allows you to trim long captions for +inclusion in the List of Figures. The text you supply, surrounded +by double-quotes, is what will appear in the List. +

      + +
      'LABEL'
      +

      -The final optional argument is the vertical adjustment to apply to -the image. A plus value raises the image -within the space allotted for it; -a negative value lowers it. The value must have a unit of measure -appended. +LABEL, if given, appears beneath the image. The text you +supply, surrounded by double-quotes, is how the image is labelled +in both the document proper and the List of Figures. Mom provides +an auto-labelling facility for images (see +AUTOLABEL), +which, if enabled, overrides the LABEL argument.

      @@ -239,35 +352,71 @@

      -Note: -Mom automatically applies shimming after PDF_IMAGE. See -SHIM -for a discussion of shimming, and how to disable it. -

      - -

      -Additional note: -Mom treats single, discrete images inserted into a document with -PDF_IMAGE somewhat like +Note: Version 2.0-c change +
      +Mom now treats all pdf images identically to floats, which is to say that if an image doesn’t fit on the output page, she will defer it to the top of the next page while continuing to process running text. -ADJUST is ignored whenever an image is deferred, and a -message is printed to stderr advising you where the deferment has -taken place. +ADJUST is ignored whenever an image is deferred, except +when moving from column to column on the same page, when the image +may need to be optically adjusted. Subsequent images that do not +fit, if any, are output in order immediately after the first.

      -However, if more than one image does not fit on the output page, -mom defers only the first; the remainder are silently ignored. -Therefore, if you insert several images close together in the text, -it is highly recommended that you wrap the images in floats, which -do not have this restriction. +Prior to 2.0-c, it was recommended that images be wrapped inside +FLOAT, +but this is now no longer required, and should, in fact, be avoided.

      + + +
      +

      PDF_IMAGE_FRAME

      +
      + +
      +Macro: PDF_IMAGE_FRAME <inset amount> <rule weight> <color> +
      +

      +• <inset amount> +requires a +unit of measure; +conversely, +<rule weight> +must not have a unit of measure appended +

      + +

      +PDF_IMAGE_FRAME establishes the parameters for subsequent invocations of +PDF_IMAGE +when the FRAME argument is given. Arguments must appear +in order, and any you wish left at the current value should be +entered as two adjacent double-quotes. So, for example, + + .PDF_IMAGE_FRAME "" "" blue + +leaves the inset value and rule weight at their current value and +changes the frame colour to blue. +

      +Frames are drawn outside the image at +its requested dimensions inclusive of scaling. Colours must be +pre-initialized with +XCOLOR +or +NEWCOLOR. +

      + +

      +The default inset is 6 points, the default rule +weight is .5 (points), and the default colour is black. +

      +
      @@ -280,14 +429,9 @@

      PSPIC is not actually part of mom, but rather a macro included with -every groff installation. Although its arguments are identical to -PDF_IMAGE (except for SCALE and ADJUST, which -are missing), its behaviour is slightly different. -

      - -

      -man groff_tmac contains the documentation for PSPIC, but -I’ll repeat it here with a few modifications for clarity. +every groff installation. man groff_tmac contains the +documentation for PSPIC, but I’ll repeat it here with a few +modifications for clarity.

      @@ -298,25 +442,24 @@ width and height of the image as you wish it to appear within the document. The width and height arguments may have units of measure -attached; the default unit of measure is -i. PSPIC will scale the graphic -uniformly in the x and y directions so that it is no more than -width wide and height high. By default, the -graphic will be horizontally centred. The -L and --R options cause the graphic to be left-aligned and -right-aligned, respectively. The -I option causes -the graphic to be indented by <n>; the default unit of -measure is m +attached; the default unit of measure is i. PSPIC will +scale the graphic uniformly in the x and y directions so that +it is no more than width wide and height +high. By default, the graphic will be horizontally centred. The +-L and -R options cause the graphic to be +left-aligned and right-aligned, respectively. The -I +option causes the graphic to be indented by <n>; +the default unit of measure is m (ems).

      -It is not necessary to pass PSPIC the -<width> and <height> arguments unless -you are scaling the image, in which case you will most likely need -the original dimensions of the EPS image’s bounding box. -These can be found with +It is not necessary to pass PSPIC the <width> +and <height> arguments unless you are scaling +the image, in which case you will most likely need the original +dimensions of the EPS image’s bounding box. These can be +found with gs -q -dBATCH -dNOPAUSE -sDEVICE=bbox <image file>.pdf 2>&1 \ | grep "%%BoundingBox" | cut -d " " -f4,5 @@ -336,18 +479,21 @@ ALD and RLD -macros. +macros. Wrapping the image in a +float +and using FLOAT’s ADJUST option can also be used to +correct optical centering.

      -Additionally, EPS images inserted into +Additionally, non-floated EPS images inserted into running text will almost certainly disrupt the baseline placement of running -text. In order to get mom back on track after -invoking .PSPIC, I strongly recommend using the +text. In order to get mom back on track after inserting a +non-floated .PSPIC image, I strongly recommend using the SHIM macro so that the bottom margin of running text falls where it -should. Please note that with PDF_IMAGE, this is not necessary. +should.

      @@ -359,24 +505,36 @@

      +
      +

      +Please note: +PSPIC does not support +autolabelling, +labels, captions, or inclusion in the List of Figures. If you wish +this functionality, +convert your images to pdf +and use +PDF_IMAGE +instead, then process the file with +pdfmom +(without the -Tps option). +

      +

      Introduction to floats

      -Images and graphics (including those created with -tbl and pic) sometimes do not -fit on the output page of a PDF or PostScript document at the -place they’re inserted in the input file. It’s +Non-textual insertions in a document (tables, for example) sometimes +do not fit on the output page of a PDF or PostScript document at +the place they’re inserted in the input file. It’s necessary, therefore, to defer them to the next page while carrying on with running text.

      -Whenever you need this functionality (tables, for example, generally -need only appear near related text, not at a precise location), mom -provides the FLOAT macro. +Whenever you need this functionality, mom provides the FLOAT macro.

      @@ -412,7 +570,23 @@ Floats, therefore, cannot be inserted in the middle of a paragraph without studying the output file and determining where to break or spread -the line before the float. +the line before the float. Furthermore, if you want a float between +paragraphs, the float should come before .PP, like this: +
      + + .FLOAT + ... + .FLOAT OFF + .PP + +not +
      + + .PP + .FLOAT + ... + .FLOAT OFF +

      @@ -420,10 +594,11 @@ preceding them. No additional whitespace surrounds them, above or below. Running text below a float is, however, shimmed, -unless shimming has been disabled with .NO_SHIM. This -usually results in a small amount of extra whitespace after the -float. The ADJUST argument to FLOAT allows you to -fine-tune the vertical centering. +unless shimming has been disabled with .NO_SHIM or the +NO_SHIM argument is given to FLOAT. Shimming +generally results in a small amount of extra whitespace after the +float, which can be equalized with the whitespace beforehand using +the ADJUST argument to FLOAT.

      @@ -441,7 +616,7 @@

      -Macro: FLOAT [ FORCE ] [ ADJUST +|-<amount> ] | <anything> +Macro: FLOAT [ ADJUST +|-<amount> ] [ FORCE ] [ SPAN ] [ NO_SHIM] | <anything>
      @@ -458,19 +633,9 @@

      -The optional FORCE argument instructs mom to output -the float exactly where it occurs in the input file. With -FORCE, mom immediately breaks to a new page to output -the float if it does not fit on the current page. While this is -somewhat contrary to the notion of floats (ie that running text -should continue to fill the page), there are circumstances where it -may be desirable. -

      - -

      -The ADJUST argument tells mom to raise -(+) or lower (-) the float within the space -allotted to it by the specified amount. +The optional ADJUST argument tells mom to raise +(+) or lower (-) the float within +the space allotted to it by the specified amount. <amount> must have a unit of measure appended. ADJUST gives you precise control over @@ -482,10 +647,43 @@

      +The FORCE argument instructs mom to output the float +exactly where it occurs in the input file. With FORCE, +mom immediately breaks to a new page to output the float if it does +not fit on the current page. While this is somewhat contrary to the +notion of floats (ie that running text should continue to fill the +page), there are circumstances where it may be desirable. +

      + +

      ADJUST is ignored whenever a float is deferred to the following page.

      +

      +The SPAN argument tells mom that a float, if deferred, +may carry onto multiple pages. Please note that SPAN may +not be used for floats containing a boxed table; mom will abort with +a warning should this occur. Unboxed tables, on the other hand, are +acceptable within floats that are given the SPAN argument. +

      + +

      +NO_SHIM instructs mom not to apply +shimming +after the float, which she does by default. Shimming ensures that +running text after the float falls properly on the page’s baseline +grid, but usually results in slightly unequal spacing above and +below, which must be corrected with the ADJUST argument. +Mom’s default shimming is generally a good idea since it ensures +properly aligned bottom margins for running text, however if you +have several floats on the page, there may be visible differences in +the spacing beneath them. NO_SHIM corrects the +problem, but will result in running text that does not completely +fill the page unless shimming is applied manually elsewhere on the +same page. +

      +

      Note: @@ -510,29 +708,1437 @@

      -

      Using tbl with FLOAT

      +

      + +

      Preprocessor support

      + +

      +Mom offers full support for the eqn (equations), +pic (diagrams), tbl (tables), and refer +(bibliographies/citations) preprocessors, including captions, +labelling, autolabelling, and inclusion in the Lists of Equations, +Figures, and Tables. +

      + +

      +Other than refer, which is discussed at length in the Bibliographies and references section, it is +beyond the scope of this documentation to cover full preprocessor +usage. Consult the manpages eqn(1), pic(1), and +tbl(1) for instructions. +

      + +
      +

      +Version 2.0-c changes +
      +Preprocessor support has been revised and expanded as of version 2.0-c. +Please read the following sections thoroughly and update any +documents created with versions prior to 2.0-c as necessary. +

      +
      + +

      tbl support

      + +

      +Mom documents can include tables generated with the groff +preprocessor, tbl. If you are unfamiliar with tbl, I +recommend downloading a copy of +Tbl - A Program to Format Tables, +which, in addition to providing a thorough introduction, contains +some fine examples. +

      + +

      +Tables formatted with tbl begin with the macro +.TS (Table Start) and end with +.TE (Table End). Depending on where you +want your tables output in a document, you may need to wrap +your tbl code inside a +float, +or pass the H argument to .TS. +

      + +

      +If you put tbl code inside a float, the table will be +output immediately if it fits on the page, or deferred to the top +of the next page if it doesn’t. If you prefer a table to +begin where you say and span over to the next page, or if you know +for certain a boxed table will run to multiple pages, simply pass the +H argument to .TS, along with a corresponding +TH +and do not wrap the table inside a float. +

      + +
      +

      +Note: +If you use .TS H to create a boxed table that spans +multiple pages, do not attempt to wrap the table inside a float. +For the purposes of boxed, multipage tables, .TS H and +.FLOAT should be considered mutually exclusive. This +restriction is imposed by the tbl preprocessor itself, +not groff or mom. +

      +
      + +

      tbl placement in mom docs

      + +

      +If you use .TS without the H argument (and +therefore no .TH), tables that fit on the page are output +in position. If there is not enough room to output the table, +tbl will abort with message instructing you to use +.TS H/.TH. Given that .TS without TH +may sometimes fail, it is advisable to begin all tbl blocks +with .TS H. +

      + +

      +If you give .TS the H argument (with a +corresponding .TH), tables will be output in position and +span as many pages as necessary to complete output. A table header +will be printed at the top of each page’s table output. In the +event that there is not enough room to print the table header and +at least one row of table data near the bottom of a page, mom will +break to a new page before beginning table output, leaving a blank +in +running text. +

      + +

      +Boxed tables inside +floats +are output in position if they fit on the page. If not, they are +deferred to the top of the next page without a break in running +text. Boxed tables within floats may not, however, span multiple +pages; mom will abort with a message should a boxed table in a float +run longer than the page. +

      -Unboxed tables created with tbl (see man -tbl(1)) may be put in a float with the usual start and end -macros, .TS and .TE. +Unboxed tables inside floats may span multiple pages provided the +SPAN argument has been given to +FLOAT. +

      + +
      +

      +Note: +The vertical spacing around unfloated tables may appear slightly +unequal, especially if there are several tables on the page. This +is a result of +shimming +that mom applies automatically after each table. You may +disable shimming with .NO_SHIM, or by giving the +NO_SHIM argument to .TS. In either case, you +will still likely want to adjust the spacing around with table with +the AJUST argument to .TS. Tables inside +floats should be adjusted with the ADJUST argument to +FLOAT, +not the ADJUST argument to .TS.

      +
      + +
      +

      .TS / .TH / .TE

      +
      + +
      +Macro: TS +
      +Arguments: +
      +  [ H ] +
      +  [ BOXED ] +
      +  [ CENTER ] +
      +  [ NEEDS ] +
      +  [ ADJUST +|-<vertical adjustment>]
      + +(unit of measure +required) + +
      +  [ NO_SHIM ] +
      +  [ CAPTION "<caption>" ] +
      +  [ SHORT_CAPTION "<short caption>" ] +
      +  [ LABEL "<label>" ] +
      +
      +Macro: TH (optional, only if .TS H) +
      +Macro: TE [ SOURCE "<text of table source>" ] +

      -Boxed tables don’t play nice with FLOAT, and require that you -pass the argument BOXED to .TS, otherwise mom -cannot guarantee the vertical spacing of the float will be -as described. +Tables to be formatted with tbl begin with the macro +.TS and end with .TE. Global tbl +options (“flags”), formatting, and data (per +tbl(1)) come between the two macros. +
      + + .TS + <tbl options, formatting, and data> + .TE + +Tables may be wrapped inside a +float, +in which case, the entire table will be output on the current page +if it fits, or deferred to the next page if it doesn’t.
      .FLOAT - .TS BOXED - <tbl commands> + .TS + <tbl options, formatting, and data> .TE .FLOAT OFF -You may put text (or anything else you like) above or below the -table; mom will ensure the float is spaced correctly. +

      + +
      +

      The .TS macro

      +
      + +
      +

      +Note: Version 2.0-c change +
      +2.0-c introduces revisions to the handling of labels and/or +captions, which, along with NO_SHIM, must now be given +as arguments to .TS rather than .TE, as was +the case formerly. Please read this section carefully if you have +documents containing tables as they may need to be updated. +

      +
      + +
      +

      +IMPORTANT: +All arguments to TS must appear on the same line as +.TS. Do not attempt to break them up with the +“line-continued” backslash. You may want to set your +text editor to “wrap” mode in order to see all your +arguments. This annoyance stems from the preprocessor mechanism +itself, not groff or mom. +

      +
      + +

      +The TS macro must be invoked before entering a tbl +block. You may give as many or as few of its arguments as required, +in any order, although it is advisable to put CAPTION, +SHORT_CAPTION, and/or LABEL last. +

      + +
      'H'
      + +

      +With the H argument, a table will span as many pages as +necessary, with or without a running header. The placement of the +corresponding +.TH, +which is required whenever the H argument is given, +determines what, if anything, goes in the header. Compare the +following: + + .TS H .TS H + c s s c s s + c s s c s s + c c c c c c + n n n. n n n. + Percent Increase .TH + 2002-2012 Percent Increase + .TH 2002-2012 + <tbl data> <tbl data> + .TE .TE + +The first example will create a table that spans multiple +pages if necessary, with a running header (“Percent +Increase / 2002-2012”) for that table appearing at +the top of each page until the table ends. The second example, +equally, may run to several pages, but without the running header. +See +TH +for an explanation of .TH placement. +

      + +
      +

      +Tip: +Generally speaking, it’s a good idea to get into the habit +of using .TS H all the time, since there are no +circumstances under which it fails, whereas .TS without +H will fail on tables that exceed the page length. +

      +
      + +
      'BOXED'
      + +

      +If a table is to be boxed (ie tbl is given the flags +'box' or 'allbox') you must pass the argument +BOXED to .TS, as in this example: +
      + + .TS BOXED + allbox; + c s s + c c c + n n n. + <tbl data> + .TE + +

      + +
      'CENTER'
      + +

      +If a table is to be centered on the page, (ie tbl is +given the 'center' flag), you must pass the argument +CENTER to .TS, as in this example, which +creates a (possibly) multipage boxed table, centered on the page, +with a running header. + + .TS H BOXED CENTER + allbox center; + c s s + c s s + c c c + n n n. + Percent Increase + 2002-2012 + .TH + <tbl data> + .TE + +

      + +
      'NEEDS'
      + +

      +If a table is not inside a float and you pass .TS the +H argument (which you should; see the tip +here), +mom begins output immediately where the table occurs in the input +file if there is enough room on the output page for the table +header plus at least one row of table data. If there isn't +enough room, mom breaks to a new page before beginning the table, +leaving a gap in +running text +at the bottom of the previous page. If, for aesthetic reasons, +you would prefer that mom require more than one row of table data +beneath the header near the bottom of a page, you may increase the +number with the NEEDS argument, followed by the desired +number of rows. +

      + +
      'ADJUST'
      + +

      +ADJUST lets you raise (+) or lower (-) the image +within the space allotted for it +by the amount you specify. This is useful for achieving good +optical centering between surrounding blocks of type. A unit of +measure is required. +

      + +
      'NO_SHIM'
      + +

      +NO_SHIM instructs mom not to apply +shimming +after the image, which she does by default. Shimming ensures that +running text after the image falls properly on the page’s baseline +grid, but usually results in slightly unequal spacing above and +below, which must be corrected with the ADJUST argument. +Mom’s default shimming is generally a good idea since it ensures +properly aligned bottom margins for running text, however if you +have several images on the page, there may be visible differences in +the spacing beneath images. NO_SHIM corrects the +problem, but will result in running text that does not completely +fill the page unless shimming is applied manually elsewhere on the +same page. +

      +
      'CAPTION'
      + +

      +CAPTION allows you to give the table a caption. By +default, the caption appears above the table, but may be attached to +the label that appears beneath the table. See +CAPTION_AFTER_LABEL +in +Captions and labels. +The text of the caption must be surrounded by double-quotes. +

      + +

      +Please note that if your table has a caption, you must invoke +TS with the H flag, which also entails the use +of +TH. +

      + +
      'SHORT_CAPTION'
      + +

      +SHORT_CAPTION allows you to trim long captions for +inclusion in the List of Tables. The text you supply, surrounded +by double-quotes, is what will appear in the List. +

      + +
      'LABEL'
      + +

      +LABEL, if given, appears beneath the table. The text you +supply, surrounded by double-quotes, is how the table is labelled +in both the document proper and the List of Tables. Mom provides +an auto-labelling facility for tables (see +AUTOLABEL), +which, if enabled, overrides the LABEL argument. +

      + +
      +

      The .TH macro

      +
      + +

      +The TH macro (Table Header), which is required +when you begin a table with .TS H, allows you to +determine what goes in a table’s running header if it spans +multiple pages. Placing .TH under the first row of +tbl data makes the first row the header. If placed under +the second row, the first and second rows form the header, and so +on. +

      + +

      +As there are sometimes reasons to run .TS H when +you don’t, in fact, want a running header (e.g. when +your table has a caption), you can suppress it by placing +.TH immediately underneath your tbl formatting +specifications, the last line of which always ends with a period +(see tbl(1)).

      +

      + +

      +See the +H +argument to .TS for examples demonstrating .TH +placement. +

      + +
      +

      The .TE macro

      +
      + +

      +tbl blocks must be terminated with .TE, +which, as of version 2.0-c, takes a single, optional argument, +SOURCE. (Formerly, TE took a label/caption +argument along with arguments controlling placement.) The argument +is followed by the text of the table’s source, surrounded by +double-quotes. The source will appear immediately beneath the label +and/or caption underneath the table, or, if +MLA +(Modern Language Association) is enabled, immediately below the +table. +

      + +

      + +

      pic support

      + +

      +Mom documents can include diagrams generated with the groff +preprocessor, pic. If you are unfamiliar with pic, I +recommend downloading a copy of +Making Pictures with GNU PIC +which provides a thorough introduction and contains many examples. +

      + +

      +Diagrams created with pic begin with the macro +.PS (Pic Start) and end with +.PE (Pic End). Everything between them is +intrepreted by the preprocessor as pic instructions. +

      + +

      +Pic diagrams are always centered. Note that this represents a +change from version 2.0-b of mom, where centering diagrams required +passing -mpic to groff or +pdfmom +on the command line. +

      + +

      +In addition, mom treats pic diagrams identically to +floats, +which is to say that if a diagram doesn’t fit on the output +page, she will defer it to the top of the next page while continuing +to process +running text. +ADJUST is ignored whenever a diagram is deferred, except +when moving from column to column on the same page, when the diagram +may need to be optically adjusted. Subsequent diagrams that do not +fit, if any, are output in order immediately after the first. +

      + +

      +Lastly, if your diagrams contain text, you may set all the type +parameters for the text (family, font, size, leading) separately +from the pic block with the macro, +PIC_TEXT_STYLE. +If you need to change the type parameters within the block +on-the-fly, you must use pic’s native facilities for +doing so. +

      + +
      +

      .PS / .PE

      +
      + +
      +Macro: PS + +
      +Arguments: +
      +  [ width ]
      (in inches; no unit of measure required) +
      +  [ height ]
      (in +inches; no unit of measure required) +
      +  [ ADJUST +|-<vertical adjustment>]
      + +(unit of measure +required) + +
      +  [ NO_SHIM ] +
      +  [ CAPTION "<caption>" ] +
      +  [ SHORT_CAPTION "<short caption>" ] +
      +  [ LABEL "<label>" ] +
      +
      +Macro: PE (no arguments; ends +the pic block) +
      + +
      +

      +IMPORTANT: +All arguments to PS must appear on the same line as +.PS. Do not attempt to break them up with the +“line-continued” backslash. You may want to set your +text editor to “wrap” mode in order to see all your +arguments. This annoyance stems from the preprocessor mechanism +itself, not groff or mom. +

      +
      + +
      'width' and 'height'
      + +

      +The width and height arguments to +.PS are idiosyncratic owing to the preprocessor itself. +If a width argument is supplied, the diagram, but not any text it +contains, is scaled to the given width. If a literal width argument +of 0 (zero) is given and a height argument is supplied, +the diagram, but not any text it contains, will be scaled to the +requested height. In the case of two non-zero arguments being +given, only the height scaling is applied. +

      + +
      'ADJUST'
      + +

      +ADJUST lets you raise (+) or lower +(-) a diagram +within the space allotted for it +by the amount you specify. This is useful for achieving good +optical centering between surrounding blocks of type. A unit of +measure is required. +

      + +
      'NO_SHIM'
      + +

      +NO_SHIM instructs mom not to apply +shimming +after the diagram, which she does by default. Shimming ensures that +running text after the diagram falls properly on the page’s baseline +grid, but usually results in slightly unequal spacing above and +below, which must be corrected with the ADJUST argument. +Mom’s default shimming is generally a good idea since it ensures +properly aligned bottom margins for running text, however if you +have several diagrams on the page, there may be visible differences in +the spacing beneath them. NO_SHIM corrects the +problem, but will result in running text that does not completely +fill the page unless shimming is applied manually elsewhere on the +same page. +

      + +
      'CAPTION'
      + +

      +CAPTION allows you to give the diagram a caption. By +default, the caption appears above the diagram, but may be attached to +the label that appears beneath it. See +CAPTION_AFTER_LABEL +in +Captions and labels. +The text of the caption must be surrounded by double-quotes. +

      + +
      'SHORT_CAPTION'
      + +

      +SHORT_CAPTION allows you to trim long captions for +inclusion in the List of Figures. The text you supply, surrounded +by double-quotes, is what will appear in the List. +

      + +
      'LABEL'
      + +

      +LABEL, if given, appears beneath the diagram. The text you +supply, surrounded by double-quotes, is how the diagram is labelled +in both the document proper and the List of Figures. Mom provides +an auto-labelling facility for diagrams (see +AUTOLABEL), +which, if enabled, overrides the LABEL argument. +

      + + + +
      +

      PIC_TEXT_STYLE

      +
      + +
      +Macro: PIC_TEXT_STYLE \ +
      + +  [ FAMILY ] "<family>" \ +
      +  [ FONT ] "<font>" \ +
      +  [ SIZE ] "+|-<size>" \ +
      +  [ AUTOLEAD ] "<value>" +
      +
      + +

      +Diagrams drawn with pic may contain text, and groff +inline escapes +may be used to alter the text parameters. A problem that arises +from so doing is that, in many cases, it clutters up the pic +code unnecessarily. +

      + +

      +PIC_TEXT_STYLE lets you establish the type parameters for text +inside a pic block all at once in cases where so doing +improves the readability of your mom source files. +

      + +

      +The arguments to PIC_TEXT_STYLE behave identically to the arguments +to other control macros, explained +here. +They may be given in any order, and you may use as many or as few as +you like. +

      + +
      +

      +Note: +Text within pic diagrams does not scale when you provide a +scaling argument to .PS. This is a limitation of the +preprocessor itself, not groff or mom. +

      +
      + +

      + +

      eqn support

      + +

      +Support for eqn is provided via extensions to the standard +.EQ/.EN macros. eqn usage itself is beyond +the scope of this documentation, but is covered in the manpage +eqn(1). You can also download a copy of Ted +Harding’s + +A Guide to Typesetting Mathematics Using GNU eqn, +which contains useful examples. +

      + +
      +

      .EQ / .EN

      +
      + +
      +Macro: EQ +
      +Arguments: +
      +  [ -L | -C | -I <ident> ]
      + +(unit of measure +required) + +
      +  [ ADJUST +|-<vertical adjustment>]
      + +(unit of measure +required) + +
      +  [ CAPTION "<caption>" ] +
      +  [ LABEL "<label>" ] +
      +  [ SHIFT_LABEL +|-<vertical adjustment> ] +
      +  [ SHORT_CAPTION "<short caption>" ] +
      +Macro: EN [ CONTINUED | CONT | ... ] +
      + +
      +

      +Note: Version 2.0-c change +
      +2.0-c introduces revisions to EQ, including the addition +of a dash (-) to the positioning arguments +(-L, -C, and -I) and the removal of a +default value for -I. Other changes include passing all +options to .EQ (including the label) such that +.EN takes only a single, optional argument saying whether +the equation is to be continued at the next invocation of +.EQ. Please read this section carefully if you have +documents containing equations as they may need to be updated. +

      +
      + +
      +

      +IMPORTANT: +All arguments to EQ must appear on the same line as +.EQ. Do not attempt to break them up with the +“line-continued” backslash. You may want to set your +text editor to “wrap” mode in order to see all your +arguments. This annoyance stems from the preprocessor mechanism +itself, not groff or mom. +

      +
      + +
      +

      The .EQ macro

      +
      + +

      +Equations to be set with eqn begin with .EQ, +followed by eqn code. Equations are centered by default, +but may be set flush left or indented from the left margin +if -L or -I are passed as arguments to +.EQ. +

      + +
      'ADJUST'
      + +

      +ADJUST lets you raise (+) or lower +(-) an equation +within the space allotted for it +by the amount you specify. This is useful for achieving good +optical centering between surrounding blocks of type. A unit of +measure is required. +

      + +
      'NO_SHIM'
      + +

      +NO_SHIM instructs mom not to apply +shimming +after the equation, which she does by default. Shimming ensures that +running text after the equation falls properly on the page’s baseline +grid, but usually results in slightly unequal spacing above and +below, which must be corrected with the ADJUST argument. +Mom’s default shimming is generally a good idea since it ensures +properly aligned bottom margins for running text, however if you +have several equations on the page, there may be visible differences in +the spacing beneath them. NO_SHIM corrects the +problem, but will result in running text that does not completely +fill the page unless shimming is applied manually elsewhere on the +same page. +

      + +

      +
      'CAPTION'
      + +

      +CAPTION allows you to give the equation a caption. +Equation captions always appear beneath the equation. +

      + +
      'SHORT_CAPTION'
      + +

      +SHORT_CAPTION allows you to trim long captions for +inclusion in the List of Equations. The text you supply, surrounded +by double-quotes, is what will appear in the List. +

      + +
      'LABEL'
      + +

      +LABEL, if given, appears on the same baseline as the last line of the +equation, flush with the left or right margin, depending on the +equation’s horizontal position. The text you supply, surrounded by +double-quotes, is how +the equation is labelled in both the document proper and the List of +Equations. Mom provides an auto-labelling facility for equations (see +AUTOLABEL), +which, if enabled, overrides the LABEL argument. +

      + +
      'SHIFT_LABEL'
      + +

      +SHIFT_LABEL allows you to raise (-) or lower +(+) the equation label. It’s primary use is to +center equation labels vertically on the equation rather than flush +with the last line. Assuming a three-line equation, +.EQ SHIFT_LABEL -1v would raise the label by +one line, thus centering it vertically on the equation. +

      + +
      +

      The .EN macro

      +
      + +

      +A block of eqn code is terminated with .EN. +

      + +

      +If an equation needs to span multiple lines, possibly aligned +with eqn’s 'mark' and 'lineup' +directives, separate invocations of .EQ/.EN are required +for each line, and the optional argument, CONTINUED (or +CONT, or ... [three dots, an ellipsis]), must +be passed to .EN. +

      + +

      +If -L or -I is given to the first +.EQ of a multi-line equation, they remain in effect +until the final .EN, which does not have the +CONTINUED argument. +

      + +

      +Mom does not treat equations as floats, therefore it is possible to +begin an equation on one page and terminate it on the next. If you +wish to keep all lines of an equation together, you must wrap the +equation, including all invocations of .EQ/.EN, inside +a +float. +

      + +

      + +

      refer support

      + +

      +refer support is covered in the section +Bibliographies and references. +

      + +

      + +

      Captions and labels

      + + + +

      +Mom includes facilities for adding captions and labels to figures, +tables, equations, and pdf images, including auto-labelling. If +Lists of Figures, Tables, and Equations are desired, captions (if +any) and labels (if any) are collected and output in the Lists with +the appropriate page number. +

      + +

      +The distinction between a caption and a label is that labels are +identifiers, e.g. “Fig. 1” or “Table 3”, +while captions are descriptive or informative. For most types of +writing, it is usual to provide both. +

      + +

      +By default, mom sets captions above figures (i.e. pic output and +pdf images) and tables. This behaviour may be modified with the +macro +CAPTION_AFTER_LABEL. +Equations always have their captions set underneath. All aspects of +the text style for captions may be set with the macro, +CAPTIONS. +

      + +

      +Labels for tables are set underneath the table unless the +MLA +macro has been invoked, in which case the label and caption appear +above the table, per MLA style, and the source for the table, if +any, appears underneath. Labels for figures are set underneath. +Equation labels, by default, are set on the same baseline as the +last line of the equation. Like captions, all aspects of text style +for labels may be established with a single macro, +LABELS. Furthermore, mom can autolabel +figures, tables, and equations, with or without a prefixed chapter +number. +

      + +
      +

      Autolabel

      +
      + +
      +Macro: AUTOLABEL_EQUATIONS +
      +Macro: AUTOLABEL_IMAGES +
      +Macro: AUTOLABEL_PIC +
      +Macro: AUTOLABEL_TABLES +
      +Arguments: +
      +[ PREFIX "<string>"] [ SUFFIX "<string>"] [ PREFIX_CHAPTER [ <n> ] ] +
      +
      + +

      +AUTOLABEL_<type> takes care of labelling <type> by +identifying each with a separate, incrementing numeric scheme, which +is also collected for output in Lists of Figures, Equations, and +Tables. By default, the label numbers are prefixed, and, in the +case of equations, suffixed, with strings such that they appear for +tables as “Table <n>”, for pic diagrams and +pdf images as “Fig. <n>”, and for equations as +“(<n>)”. +

      + +

      +Use PREFIX <"string"> to change what comes +before the automatic numbering. For example, if you are including +musical excerpts in your document, MLA style requires that they be +labelled “Ex. <n>”. Since musical excerpts +are likely to be scanned images (in pdf format, don’t forget), +you have to change the prefix string for pdf images: +
      + + .AUTOLABEL_IMAGES PREFIX "Ex. " + +If you need a suffix after the automatic numbering, use +SUFFIX <"string">, like this: +
      + + .AUTOLABEL_IMAGES PREFIX "(Fig. " SUFFIX ")" + +Note that the double-quotes around the single-character SUFFIX +string are optional. +

      + +

      Prefixing chapter numbers

      + +

      +If you would like mom to prefix chapter numbers to the label, +pass AUTOLABEL_<type> the argument +PREFIX_CHAPTER. +

      + +

      +If you have not given mom a CHAPTER <n> prior +to invoking AUTOLABEL_<type> PREFIX_CHAPTER, +you must give the chapter number after PREFIX_CHAPTER. +Once done, all subsequent chapters or collated document sections +will increment the chapter number by one automatically. Failure to +provide a chapter number after PREFIX_CHAPTER when it is +required will result in mom aborting with a reminder to do so. +

      + +
      +

      Captions after labels

      +
      + +
      +Macro: CAPTION_AFTER_LABEL IMG | PIC | TBL | ALL [ <anything> ] + +
      + +

      +By default, mom sets captions above figures (pic output +and pdf images) and tables; labels are always underneath. +

      + +

      +.CAPTION_AFTER_LABEL, with one of the required arguments, +instructs mom to attach captions directly to the appropriate +labels, beginning on the same line. Any argument after the first +disables this behaviour, restoring caption placement to mom’s +default. For example, +
      + + .CAPTION_AFTER_LABEL ALL + +would enable captions after labels globally, while a subsequent +
      + + .CAPTION_AFTER_LABEL IMG OFF + +would disable captions after labels for pdf images only. +OFF can be anything you like (X, +NO, etc). +

      + +

      +If +MLA +is enabled, there's no need to invoke CAPTION_AFTER_LABEL +as this is implied. +

      + +
      +

      +Note: +A separate invocation of .CAPTION_AFTER_LABEL is required +for each one of the required first arguments. You cannot, for +example, do +
      + + .CAPTION_AFTER_LABEL IMG TBL + +Rather, you must do +
      + + .CAPTION_AFTER_LABEL IMG + .CAPTION_AFTER_LABEL TBL + +

      +
      + +
      +

      MLA-style captioning and labelling

      +
      + +
      +Macro: MLA [ <anything> ] + +
      + +

      +Modern Language Association style dictates that captions should +always go after labels. Furthermore, labels and captions for tables +should go above the tables, with the source for the table, if +any, underneath. +

      + +

      +Invoking .MLA by itself takes care of these details. If +you need to disable MLA-style captioning and labelling mid-document, +.MLA OFF does the trick. OFF can be +anything you like (X, NO, etc). +

      + +
      +

      Style parameters for captions, labels and sources

      +
      + +
      +Macro: CAPTIONS EQN | IMG | PIC | TBL | ALL +
      +Macro: LABELS EQN | IMG | PIC | TBL | ALL +
      +Macro: SOURCES TBL +
      +Style arguments: +
      +  FAMILY <family> \ +
      +  FONT <font> \ +
      +  SIZE "+|-<size>" \ +
      +  AUTOLEAD "<value>" \ +
      +  COLOR "<color>" \ +
      +  QUAD LEFT | CENTER | RIGHT [ ON_LL ] \ +
      +  ADJUST +|-<vertical adjustment> +
      +
      + +
      +

      +Note: +Arguments may be broken into several lines using the +“line-continued” backslash (\), as shown above. +

      +
      + +
      +

      +Additional note: +Mom’s default style for labels, captions, and sources is +the same as the style used for running text, with two exceptions: +labels are set in bold, except for eqn which is roman medium, and +the autolead value for all three is “2”, effectively +tightening the lead. Furthermore, they are quadded left (except +eqn, which is quadded right.) +

      +
      + +

      +With the exception of ADJUST and QUAD (which +requires a bit of explanation), the style arguments to CAPTIONS, +LABELS, and SOURCES (which is only available +for tables) behave identically to the +arguments to control macros. +

      + +

      +The first, required argument after CAPTIONS, +LABELS, and SOURCES indicates the preprocessor +type for which you are setting the parameters. (For convenience +PDF_IMAGE—argument IMG—is here treated as a +preprocessor.) An argument of ALL sets a unified +style for every preprocessor. If the ALL argument is +given, arguments to subsequent invocations of CAPTIONS, +LABELS, or SOURCES overwrite only the +explicitly named style parameters. +

      + +

      QUAD — quadding of labels, captions, and sources

      + +

      +By default, figures (pic output and pdf images) and tables +have their captions and labels set quad left. Sources (for tables) +are also set quad left. Equations have their labels set quad right, +and their captions centered. Regardless of the quad direction, +captions, labels, and sources are quadded over the width of figures +and tables unless you pass the optional ON_LL argument to +QUAD <direction>. +

      + +

      +Equations behave differently. By default, equation labels are +set flush right with the page’s right margin regardless of +equation positioning, which is, again by default, centered. If the +equation is positioned left, the label will appear at the right +margin regardless of the direction you give to QUAD. If +the equation is indented with the -I <indent> +option, a quad direction of LEFT is observed, but may +overprint the last line of the equation. Note that there is no +CENTER option for equation labels, and that captions are +always quadded over the full line length. +

      + +

      ADJUST

      + +

      +The ADJUST argument allows you to add(+) or +subtract (-) vertical space between labels and captions +and the output to which they are attached. The argument requires a +unit of measure. For +example, if you find that table labels are a bit too close to the +table itself, +
      + + .LABELS TBL ADJUST +3p + +would put three extra points of space between the bottoms of tables +and the labels that appear beneath them. +

      + +

      Lists of Figures, Tables, and Equations

      + +

      +Besides a +Table of Contents, +mom can generate Lists of Figures, Tables, and Equations. Labels +and captions are collected and concatenated, and output in lists +with the appropriate page number, just like a Table of Contents. +Including such lists in a document is as simple as adding whichever +you need of +
      + + .LIST_OF_FIGURES + .LIST_OF_EQUATIONS + .LIST_OF_TABLES + +to the end of your input file. +

      + +

      +Also like the Table of Contents, entries in the Lists' output are +clickable PDF links when a document is viewed at the screen. +

      + +

      Placement of Lists

      + +

      +Lists normally appear after the Table of Contents, and continue +the page numbering scheme used for it. By default, the Table of +Contents begins on roman-numeral page “i”. +

      + +

      +If you are using mom’s +AUTO_RELOCATE_TOC +feature, you have two options for placement of the Lists within the +document. If you want the Lists shifted to the top of the document +along with the Table of Contents, invoke the Lists macros after +.TOC. +If you prefer to have the Lists at the end of the document, invoke +the Lists macros before .TOC. +

      + +

      +Lists shifted with the Table of Contents do not appear in the Table +of Contents itself, but do appear as clickable links in the PDF +outline typically available in the left panel of most PDF viewers. +Lists that are not shifted with the Table of Contents appear in both +the Table of Contents itself and the PDF outline. +

      + +
      +

      Macros to generate Lists

      +
      + +
      +Macro: LIST_OF_EQUATIONS +
      +Macro: LIST_OF_FIGURES +
      +Macro: LIST_OF_TABLES +
      +Arguments: +
      +  [ TITLE_STRING "<string>" ] [ START_PAGENUM <page number> ] +
      + +

      +The first optional argument to the LIST_OF_<type> +macros allows you to change the title that appears at the top of the +page. This is useful not only for internationalization, or to meet +the requirements of various style guides, but is also useful +for, say, documents containing musical examples, which, per +MLA-style, should be labelled “Example ” or +“Ex. ”. When it comes time to output the List of +Figures (to which musical examples, usually scanned pdf images, belong), +
      + + LIST_OF_FIGURES TITLE_STRING "List of Examples" + +ensures that the title of the List is correct. +

      + +

      +The second optional argument allows you to give a starting page +number for a list in cases where mom’s pagination scheme does +not provide the List with the starting page number you want. +

      +

      Formatting and style parameters for Lists

      + +

      +Like the Table of Contents, nearly every aspect of Lists can be +designed independently of a document’s overall style. By +default, Lists follow the formatting and style parameters of the +Table of Contents, both mom’s defaults and any changes you may +have made to the Table of Contents. +

      + +

      +If you wish to make changes to any aspect of Lists formatting +or styling, the macro LISTS_STYLE provides all the +tools necessary. It is unlikely that you’ll want the +formatting of the various list types to differ one from the other, +so LISTS_STYLE applies to all Lists. In the event that +you do need to change some aspect of the formatting for different +list types, simply invoke LISTS_STYLE immediately prior +to each list whose formatting needs to be changed. +

      + +
      +

      Lists style

      +
      + +
      +Macro: LISTS_STYLE +
      +Arguments: +
      +  FAMILY <family> \ +
      +  FONT <font> \ +
      +  PT_SIZE <size> \ +
      +  LEAD <leading> \ +
      +  TITLE_FAMILY <family> \ +
      +  TITLE_FONT <font> \ +
      +  TITLE_SIZE +|-<size> \ +
      +  TITLE_QUAD LEFT | CENTER | RIGHT \ +
      +  TITLE_COLOR <color> \ +
      +  PN_FAMILY <family> \ +
      +  PN_FONT <font> \ +
      +  PN_SIZE +|-<size> \ +
      +  EQN_PN_PADDING <placeholders> \ +
      +  FIG_PN_PADDING <placeholders> \ +
      +  TBL_PN_PADDING <placeholders> \ +
      +  PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha \ +
      +  NO_PAGINATION +
      +
      + +
      +

      +Note: +Arguments may be broken into several lines using the +“line-continued” backslash (\), as shown above. +

      +
      + +

      +FAMILY is the family for the entirety of Lists pages. +

      + +

      +FONT is the font for the entirety of Lists pages. +

      + +

      +PT_SIZE is the base point size for the entirety of Lists +pages. +

      + +

      +LEAD is the base leading for the entirety of Lists pages. +

      + +

      +TITLE_FAMILY is the family for the Lists titles if you +want it different from the family otherwise used for the Lists +pages. +

      + +

      +TITLE_FONT is the font for the Lists titles if you want +it different from the font otherwise used for the Lists pages. +

      + +

      +TITLE_SIZE tells mom by how much to increase +(+) or decrease (-) the point size of the +titles relative to the overall point size of Lists pages. +

      + +

      +TITLE_QUAD tells mom how to position the title +horizontally. +

      + +

      +TITLE_COLOR sets the colour for the titles. The colour +must be pre-initialized with +NEWCOLOR +or +XCOLOR. +

      + +

      +PN_FAMILY sets the family for entry pagenumbers. +

      + +

      +PN_FONT sets the font for entry pagenumbers. +

      + +

      +PN_SIZE tells mom by how much to increase (+) +or decrease (-) the point size of entry pagenumbers +relative to the overall point size of Lists pages. +

      + +

      +EQN_PN_PADDING, FIG_PN_PADDING, and +TBL_PN_PADDING tells mom how many placeholders to reserve +for the entry pagenumbers in their respective Lists. If, for example, +a document with both tables and figures runs to over a hundred +pages, but there are no tables after page 99, +
      + + LISTS_STYLE FIG_PN_PADDING 3 + LISTS_STYLE TBL_PN_PADDING 2 + +would prevent an unneeded, reserved placeholder from putting too +much space between the leader and the entry pagenumber in the List of +Tables. +

      + +

      +The padding in effect, unless you change it, is whatever was set for +the Tables of Contents; mom’s default is “3”. +

      + +

      +PAGENUM_STYLE tells mom which pagination format to use +for the page numbers of the Lists pages themselves. By default, +since Lists observe what is in effect for the Table of Contents, the +pagination format is “roman”. Please note that the +starting page number for any of the Lists is given as an argument to +the +LISTS_0F_<type> +macro. +

      + +

      +NO_PAGINATION disables pagination of Lists pages.


      diff -ruN groff-1.22.2/contrib/mom/momdoc/inlines.html groff-1.22.3/contrib/mom/momdoc/inlines.html --- groff-1.22.2/contrib/mom/momdoc/inlines.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/inlines.html 2014-11-04 09:38:35.614519134 +0100 @@ -2,8 +2,7 @@ - -

      3. Tell mom where you want your references (footnotes/endnotes or a bibliography)

      +

      3. Tell mom where you want your references

      If you want references in footnotes, issue the instruction @@ -291,7 +325,9 @@ .FOOTNOTE_REFS -anywhere before the first citation in your file. +anywhere before the first citation in your file. Footnote markers +will be inserted into the text, and the bibliographic information +for the citation will appear as a footnote.

      @@ -300,18 +336,25 @@ .ENDNOTE_REFS -anywhere before the first citation in your file. +anywhere before the first citation in your file. Endnote markers +will be inserted into the text, and the bibliographic information +for the citation will appear as an endnote entry.

      -If you want your references in a bibliography, issue the instruction -
      - - .BIBLIOGRAPHY - -at the end of your file, before -TOC -(Table of Contents). +Note that if you want references parenthetically inserted +into running text, referring to entries in a works-cited list +(bibliography) that mom and refer assemble +automatically, no special instructions are required. See +Generating a bibliography from parenthetical insertions +for how to output the collected references. +

      + +

      +For outputting an entire refer database, or +generating a comprehensive reading list from a database, see the +macro, +BIBLIOGRAPHY.

      4. Accessing references in the database

      @@ -373,7 +416,7 @@ If FOOTNOTE_REFS is in effect, the reference between the first and second .REF will be treated as a footnote. If ENDNOTE_REFS, it will be treated as an endnote. Endnote references -must be explictly output with +must be explicitly output with ENDNOTES at the end of your file, before TOC. @@ -394,26 +437,48 @@

      -

      6. Creating a bibliography

      +

      6. Parenthetical insertions

      -Bibliographic references come between +See +Inserting parenthetical references into +text. +

      + +

      7. Generating a bibliography from parenthetical insertions

      + +

      +To generate a bibliography from works cited by parenthetical +insertions in the text, put this at the end of your document, before +.TOC. +
      + + .BIBLIOGRAPHY + .[ + $LIST$ + .] + .BIBLIOGRAPHY OFF + +

      + +

      8. Generating a comprehensive bibliography

      + +

      +You can also generate a comprehensive bibliography, which is to say a +bibliography containing more works than are actually cited (a +“reading list”), by placing references between .BIBLIOGRAPHY and .BIBLIOGRAPHY OFF. -They require no .REF’s surrounding the -  .[  and  .]  commands. -Once you have input the desired references, issue the -following, exactly as shown: +Once you have input the desired references, insert
      .[ $LIST$ .] -and follow it with .BIBLIOGRAPHY OFF. -Study the example provided below if you’re having trouble -visualizing this. +and follow it with .BIBLIOGRAPHY OFF. Study the +example below if you’re having trouble visualizing this.

      Example bibliography
      @@ -442,9 +507,9 @@

      -Alternatively, if you wish to output your entire database as a -bibliography, do the following at the end of your document, before -.TOC: +Alternatively, you can output an entire database as a +bibliography. Do the following at the end of your document, before +.TOC.
      .BIBLIOGRAPHY @@ -460,7 +525,7 @@

      -

      7. Invoking groff with mom and refer

      +

      9. Invoking groff with mom and refer

      So, now you’ve got a document formatted properly to use @@ -484,14 +549,14 @@

      MLA (Modern Language Association) style

      -

      Types of references (endnote/footnote or bibliographic)

      +

      Types of references (endnote, footnote, or embedded in text)

      MLA allows for three types of references, or referencing styles:

        -
      • short, parenthetical references in the text, linked to a list - of works cited (a bibliography) at the end of the document
      • +
      • short, parenthetical references in the text, linked to a + works-cited list (bibliography) at the end of the document
      • footnote references
      • endnote references
      @@ -513,61 +578,138 @@ footnote or endnote. -Parenthetical references linked to a bibliography, however, need to -be handled differently. +Parenthetical references, however, need to be handled differently. +See the next section.

      Inserting parenthetical references into the text

      MLA style prefers restricting the information in parenthetical -references to the barest minimum needed to find the cited work in -the bibliography. Human judgment is usually required, therefore -it is generally best to enter the parenthetical references by hand -rather than asking mom and refer to generate them. While -the latter is possible with the macro pair, -.REF( /.REF), -it requires more work to set up your -database -and interrupts the flow of your input file. Consider these two -examples, which accomplish exactly the same thing: -

      -
      - - Ancient writers attributed the invention of the monochord - to Pythagoras, who lived in the sixth century BC (Marcuse, - \*[IT]Survey\*[ROM] 197). Marcone, however, discovered - precursors of the instrument dating at least two centuries - earlier (\*[IT]Plectrum\*[ROM] 98). - -
      -versus -
      - - Ancient writers attributed the invention of the monochord - to Pythagoras, who lived in the sixth century BC - .REF( +references to the barest minimum needed to identify works +in the works-cited list (the bibliography). Typically, a +parenthetical insertion is just the author’s last name +followed by the page number of the cited work (if only one work by +that author is cited), or by the author, a shortened title of the +work, and the page number (if more than one work is cited). +

      + +

      +This necessitates a slightly fiddly way of entering parenthetical +references, though not by any means difficult or hard to make sense +of. +

      + +

      +The refer block suggested +here +for parenthetical references prints only the author’s +last name from the database record identified by your keywords +(the label command), surrounded by parentheses (the +bracket-label command). Therefore, assuming you are +citing Ray Bradbury’s The Martian Chronicles, and it is +the only work by Bradbury mentioned in the text, +
      + + ...end of sentence. .[ - survey - %P 197 + martian chronicles .] - .REF) - . Marcone, however, discovered precursors of the instrument - dating at least two centuries earlier - .REF( + A new sentence... + +will insert “...end of sentence (Bradbury). A new sentence...” into the text. +The Martian Chronicles will be added +to the works-cited list generated at the end of the document if it +is not already present as the result of an earlier reference. +

      + +

      +If you need a page number to identify where in The Martian +Chronicles to find a specific quote +
      + + "...aluminum roaches and iron crickets." .[ - plectrum - %P 98 - .] - .REF) - . + [ martian chronicles + .] 168) + A new sentence... -

      +results in ““...aluminum roaches and iron crickets.” (Bradbury 168) A new sentence...” +(which is excruciatingly correct MLA style). The +“[” before martian chronicles tells +refer to print the opening parenthesis; any text immediately +following the “.]”, including spaces, +replaces the closing parenthesis. (Notice that you have to +add the closing parenthesis yourself after the page number.) +

      + +

      +If your document cites more than one work by Bradbury and you need +a title and page number in addition to the author's name in the +inline reference, +
      + + "...aluminum roaches and iron crickets." + .[ + [ bradbury martian + .], \fIChronicles\fP 168) + A new sentence... + +will produce ““...aluminum roaches and iron crickets.” (Bradbury, Chronicles 168) A new sentence...”. +

      + +
      +

      The ‘label’ and ‘bracket-label’ commands

      -Clearly, the first example takes less work, and is much easier to read. +The label and bracket-label commands in +the refer block allow you to customize what information goes +into parenthetical references, and how they should be formatted. +label dictates which fields from the database record +to print and how to punctuate them. bracket-label +controls the bracketing style. Users are encouraged to consult +man refer for usage.

      +

      +Here’s an example of how to set up APA-style references, which +require the author and date of publication, optionally with a page +number or range of pages. +
      + + .R1 + label "(A.n|Q) ', ' D.y" + bracket-label " (" ")" ", " + join-authors ", and " ", " ", and " + move-punctuation + reverse A1 + sort A1Q1T1B1E1 + database /home/peter/Groff-mom/Testing/Refer/refer-database + .R2 + +Assuming a reference to a work by Ursula Leguin published in 1980 +
      + + .[ + leguin + .] + +produces + +(Leguin, 1980) +. +If a page number is also required +
      + + .[ + [ leguin + .], p. 73) + +produces +(Leguin, 1980, p. 73). +

      +
      +

      The refer database

      @@ -935,17 +1077,9 @@

      The bibliography and reference macros

        -
      • REF – begin/end a refer reference
      • +
      • REF – begin/end a refer reference that will go in a footnote or endnote
      • FOOTNOTE_REFS – instruct mom to put REFs in footnotes
      • ENDNOTE_REFS – instruct mom to put REFs in endnotes
      • -
      • Embed references in the text -
          -
        • REF( – embed a reference in the text between parentheses
        • -
        • REF[ – embed a reference in the text between square brackets
        • -
        • REF{ – embed a reference in the text between braces
        • -
        • REF< – embed a reference in the text between angle brackets
        • -
        • REF_STYLE – bibliography or footnote/endnote
        • -
      • INDENT_REFS – manage indenting of references, per MLA standards
      • HYPHENATE_REFS – enable/disable hyphenation of references
      • BIBLIOGRAPHY – begin a bibliography
      • @@ -957,7 +1091,7 @@
        -

        Begin/end a refer reference

        +

        Begin/end a reference that goes in a footnote or endnote

        @@ -966,18 +1100,17 @@

        The macro, REF, tells mom that what follows is -refer-specific, a keyword-identified reference from a -refer database. Depending on whether you’ve issued +refer-specific, a keyword-identified reference to a +refer database record. Depending on whether you’ve issued a .FOOTNOTE_REFS or .ENDNOTE_REFS -instruction, REF also tells mom where to place the reference. If -FOOTNOTE_REFS, the reference will be formatted and placed in a -footnote. If ENDNOTE_REFS, the reference will be collected for -output as an endnote. If you have issued neither instruction, the -reference will be collected for later output, most likely in a -bibliography. +instruction, the reference will be formatted and placed in a +footnote, or collected for output in the endnotes. Parenthetical +insertion of references into the text do not require +.REF (see +Inserting parenthetical references into the text.)

        @@ -1031,11 +1164,7 @@

        Additional note: -When REF is used with -FOOTNOTE_REFS -or -ENDNOTE_REFS, -it behaves identically to +REF behaves identically to FOOTNOTE or ENDNOTE, @@ -1043,7 +1172,8 @@ for FOOTNOTE and/or -ENDNOTE. +ENDNOTE +for instructions on correct entry of text preceding and following REF.

        @@ -1123,82 +1253,6 @@ at any time.

        - - -
        -

        Embed references in the text

        -
        - -
        -Macro pair: REF(  ...  REF) -
        - -
        -Macro pair: REF[  ...  REF] -
        - -
        -Macro pair: REF{  ...  REF} -
        - -
        -Macro pair: REF<  ...  REF> -
        - -

        -You may sometimes want to embed fairly complete references directly -into the body of your document, typically, but not always, inside -parentheses. An instance where this might be desirable would be -when there are one or two citations in a document where footnotes or -endnotes are inappropriate, and a bibliography just plain silly (as -it would be for just one or two citations). -

        - -

        -Mom allows you to embed references from your database directly into -documents through the use of the REF<bracket type> -macros. -

        - -

        -All four macro pairs, above, are invoked the same way, namely -by introducing the reference with the first (“open”) -macro of the REF<bracket type> -pair, and terminating it with the second (“close”) -REF<bracket type> of the pair. For -example -
        - - .REF( - .[ - keyword(s) - .] - .REF) - -will embed a reference in the body of your document, surrounded -by parentheses. .REF[ / .REF] -will surround the reference with square brackets, etc. -

        - -

        REF_STYLE

        - -

        -When embedding references in the body of text, you’ll need to -tell mom which formatting style to use: footnote/endnote or -bibliography. Footnote/endnote referencing style uses no periods -between fields, only proper nouns and titles are capitalized, and -publication data is enclosed in parentheses. Bibliography -referencing style separates each field with a period, every -field begins with a capital letter, and publication data is not in -parentheses. -

        - -

        -If you want footnote/endnote style, invoke -.REF_STYLE NOTE. If you want bibliographic style, -invoke .REF_STYLE BIBLIO. -

        -
        @@ -1228,11 +1282,11 @@

        By default, the indent for all three types of references is 1/2-inch for -PRINSTYLE TYPEWRITE +PRINTSTYLE TYPEWRITE and 2 ems for -PRINSTYLE TYPESET. +PRINTSTYLE TYPESET.

        @@ -1327,9 +1381,7 @@

        Note: -References embedded in the body of a document with -.REF <bracket type> -are considered part of +References embedded in the body of a document are considered part of running text, and are hyphenated (or not) according to whether hyphenation is turned on or off for running text. Therefore, if you want to @@ -1340,11 +1392,9 @@
        .HY OFF - .REF( .[ keyword(s) .] - .REF) .HY Alternatively, sprinkle your database fields liberally with @@ -1363,12 +1413,16 @@

        -If you want to append a bibliography to your document, all you need +To append a bibliography to your document, whether of references +inserted parenthetically into text or a comprehensive reading list +derived from a large refer database, all you need do is invoke .BIBLIOGRAPHY. .BIBLIOGRAPHY breaks to a new page, prints the title (BIBLIOGRAPHY by default, but that can be changed), and awaits refer instructions. How to create bibliographies is covered in the tutorial section, -Creating bibliography pages. +Generating a bibliography from parenthetical insertions +and +Generating a comprehensive bibliography. When all the required data has been entered, type
        @@ -1410,11 +1464,11 @@

        You may enter the BIBLIOGRAPHY_TYPE either before or after -.BIBLIOGRAPHY. It must, however, always come before -the refer command to output bibliographies. (See the -tutorial section, -Creating bibliography pages, -for instructions on how to output bibliographies.) +.BIBLIOGRAPHY. It must, however, always come before the +any refer commands. See +Generating a bibliography from parenthetical insertions +and +Generating a comprehensive bibliography.

        @@ -1794,11 +1848,11 @@ do so, invoke
        - .HEADER_CENTER "Endnotes" + .HEADER_CENTER "Bibliography" or - .FOOTER_CENTER "Endnotes" + .FOOTER_CENTER "Bibliography" prior to invoking .BIBLIOGRAPHY.

        @@ -1918,7 +1972,7 @@

        -• Argument requires a unit of measusure +• Argument requires a unit of measure

        @@ -1969,7 +2023,7 @@ .BIBLIOGRAPHY_STRING_UNDERSCORE will place a single rule underneath the bibliography’s first-page title. Invoked with the argument, DOUBLE, BIBLIOGRAPHY_STRING_UNDERSCORE will -double-underscore the thtile. Invoked with any other non-numeric +double-underscore the title. Invoked with any other non-numeric argument, (eg OFF, NO, X, etc.) the macro disables underlining of the title.

        diff -ruN groff-1.22.2/contrib/mom/momdoc/reserved.html groff-1.22.3/contrib/mom/momdoc/reserved.html --- groff-1.22.2/contrib/mom/momdoc/reserved.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/reserved.html 2014-11-04 09:38:35.615519121 +0100 @@ -2,8 +2,7 @@
        @@ -326,6 +332,13 @@ for information on ensuring groff respects your PAGELENGTH.

        +
        +

        +Important: PAGELENGTH, +when you need it, should be placed at the top of your files. +

        +
        +
        @@ -333,11 +346,11 @@
        -Macro: PAPER <paper type> +Macro: PAPER <paper type> [ LANDSCAPE ]

        -PAPER provides a convenient way to set the page dimensions for some +PAPER provides a convenient way to set the dimensions for some common printer sheet sizes. <paper type> can be one of:
        @@ -362,11 +375,21 @@ .PAGEWIDTH 595p .PAGELENGTH 842p +If you’d like landscape orientation for your paper type, +pass PAPER the LANDSCAPE argument. +

        Please read the Important note on page dimensions and papersize for information on ensuring groff respects your PAPER size.

        +
        +

        +Important: PAPER when you +need it, should be placed at the top of your files. +

        +
        +
        @@ -637,7 +660,7 @@ IMPORTANT: If you’re using the document processing macros, PAGE must come after -START. +PRINTSTYLE. Otherwise, it should go at the top of a document, prior to any text. And remember, when you’re using the document processing macros, top margin and bottom margin mean something slightly @@ -1087,6 +1110,13 @@

        +If you invoke PT_SIZE without an argument, it reverts to its former +value. For example, if your point size is 10 and you change it to +12 with .PT_SIZE 12, entering .PT_SIZE +(i.e. without an argument) resets the point size to 10. +

        + +

        You can prepend a plus or a minus sign to the argument to PT_SIZE, in which case the point size will be changed by + or - the original value. For example, if the point size is 12, and you want 14, you @@ -1099,6 +1129,10 @@ .PT_SIZE -2 +or, more simply, just + + .PT_SIZE + The size of type can also be changed inline. See Inline Escapes, changing point size.

        @@ -1187,6 +1221,12 @@

        • Does not require a unit of measure +
        +(Please see +here +for information on using +AUTOLEAD during document +processing.)

        @@ -1225,6 +1265,15 @@ LS.

        +
        +

        +Experts: Please note that the groff +primitives, +.vs and .ps, are unaffected by, and have no +effect, on AUTOLEAD. +

        +
        +

        If you give AUTOLEAD the optional FACTOR argument, AUTOLEAD calculates the line space as a factor of the @@ -1770,8 +1819,8 @@

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

        @@ -2083,6 +2132,11 @@ .HY END +A subsequent call to HY restores hyphenation with the parameters for +LINES, MARGIN, or SPACE that were formerly in effect (see below). +

        + +

        HY observes the following default hyphenation rules:

          @@ -3228,7 +3282,7 @@ Try setting this up and processing it it with
          - pdfmom filename.mom | ps2pdf - filename.pdf + pdfmom filename.mom > filename.pdf then previewing the .pdf file. Notice how .TN simply moves over to the next tab, while the combination @@ -3463,7 +3517,7 @@ Try setting this up and processing it with
          - pdfmom filename | ps2pdf - filename.pdf + pdfmom filename.mom > filename.pdf and previewing the .pdf file.

          @@ -4697,7 +4751,7 @@ Paste the example above into a file and preview it with
          - pdfmom filename.mom | ps2pdf - filename.pdf + pdfmom filename.mom > filename.pdf to see hanging indents in action.

          diff -ruN groff-1.22.2/contrib/mom/momdoc/using.html groff-1.22.3/contrib/mom/momdoc/using.html --- groff-1.22.2/contrib/mom/momdoc/using.html 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/contrib/mom/momdoc/using.html 2014-11-04 09:38:35.616519109 +0100 @@ -2,8 +2,7 @@ | in |<-- |<-----------ll------------>| @@ -6252,21 +6084,20 @@ These dimensions are: -`po' +'po' "Page offset" - this is the leftmost position of text on the final output, defining the "left margin". -`in' +'in' "Indentation" - this is the distance from the left margin where text is printed. -`ll' +'ll' "Line length" - this is the distance from the left margin to right margin. A simple demonstration: - .ll 3i This is text without indentation. The line length has been set to 3\~inch. @@ -6280,7 +6111,6 @@ Result: - This is text without indenta- tion. The line length has been set to 3 inch. @@ -6295,20 +6125,19 @@ -- Request: .po +offset -- Request: .po -offset -- Register: \n[.o] - Set horizontal page offset to OFFSET (or increment or decrement - the current value by OFFSET). Note that this request does not - cause a break, so changing the page offset in the middle of text - being filled may not yield the expected result. The initial value - is 1i. For TTY output devices, it is set to 0 in the startup file - `troffrc'; the default scaling indicator is `m' (and not `v' as + Set horizontal page offset to OFFSET (or increment or decrement the + current value by OFFSET). Note that this request does not cause a + break, so changing the page offset in the middle of text being + filled may not yield the expected result. The initial value is 1i. + For TTY output devices, it is set to 0 in the startup file + 'troffrc'; the default scaling indicator is 'm' (and not 'v' as incorrectly documented in the original UNIX troff manual). The current page offset can be found in the read-only number - register `.o'. - - If `po' is called without an argument, the page offset is reset to - the previous value before the last call to `po'. + register '.o'. + If 'po' is called without an argument, the page offset is reset to + the previous value before the last call to 'po'. .po 3i \n[.o] @@ -6320,7 +6149,6 @@ \n[.o] => 720 - -- Request: .in [indent] -- Request: .in +indent -- Request: .in -indent @@ -6329,50 +6157,50 @@ value by INDENT). This request causes a break. Initially, there is no indentation. - If `in' is called without an argument, the indentation is reset to - the previous value before the last call to `in'. The default - scaling indicator is `m'. + If 'in' is called without an argument, the indentation is reset to + the previous value before the last call to 'in'. The default + scaling indicator is 'm'. The indentation is associated with the current environment (*note Environments::). If a negative indentation value is specified (which is not - allowed), `gtroff' emits a warning of type `range' and sets the + allowed), 'gtroff' emits a warning of type 'range' and sets the indentation to zero. - The effect of `in' is delayed until a partially collected line (if + The effect of 'in' is delayed until a partially collected line (if it exists) is output. A temporary indentation value is reset to zero also. - The current indentation (as set by `in') can be found in the - read-only number register `.i'. + The current indentation (as set by 'in') can be found in the + read-only number register '.i'. -- Request: .ti offset -- Request: .ti +offset -- Request: .ti -offset -- Register: \n[.in] - Temporarily indent the next output line by OFFSET. If an - increment or decrement value is specified, adjust the temporary - indentation relative to the value set by the `in' request. + Temporarily indent the next output line by OFFSET. If an increment + or decrement value is specified, adjust the temporary indentation + relative to the value set by the 'in' request. This request causes a break; its value is associated with the current environment (*note Environments::). The default scaling - indicator is `m'. A call of `ti' without an argument is ignored. + indicator is 'm'. A call of 'ti' without an argument is ignored. If the total indentation value is negative (which is not allowed), - `gtroff' emits a warning of type `range' and sets the temporary - indentation to zero. `Total indentation' is either OFFSET if + 'gtroff' emits a warning of type 'range' and sets the temporary + indentation to zero. 'Total indentation' is either OFFSET if specified as an absolute value, or the temporary plus normal indentation, if OFFSET is given as a relative value. - The effect of `ti' is delayed until a partially collected line (if + The effect of 'ti' is delayed until a partially collected line (if it exists) is output. - The read-only number register `.in' is the indentation that applies + The read-only number register '.in' is the indentation that applies to the current output line. - The difference between `.i' and `.in' is that the latter takes - into account whether a partially collected line still uses the old + The difference between '.i' and '.in' is that the latter takes into + account whether a partially collected line still uses the old indentation value or a temporary indentation value is active. -- Request: .ll [length] @@ -6382,25 +6210,25 @@ -- Register: \n[.ll] Set the line length to LENGTH (or increment or decrement the current value by LENGTH). Initially, the line length is set to - 6.5i. The effect of `ll' is delayed until a partially collected + 6.5i. The effect of 'll' is delayed until a partially collected line (if it exists) is output. The default scaling indicator is - `m'. + 'm'. - If `ll' is called without an argument, the line length is reset to - the previous value before the last call to `ll'. If a negative - line length is specified (which is not allowed), `gtroff' emits a - warning of type `range' and sets the line length to zero. + If 'll' is called without an argument, the line length is reset to + the previous value before the last call to 'll'. If a negative + line length is specified (which is not allowed), 'gtroff' emits a + warning of type 'range' and sets the line length to zero. The line length is associated with the current environment (*note Environments::). - The current line length (as set by `ll') can be found in the - read-only number register `.l'. The read-only number register - `.ll' is the line length that applies to the current output line. - - Similar to `.i' and `.in', the difference between `.l' and `.ll' - is that the latter takes into account whether a partially - collected line still uses the old line length value. + The current line length (as set by 'll') can be found in the + read-only number register '.l'. The read-only number register + '.ll' is the line length that applies to the current output line. + + Similar to '.i' and '.in', the difference between '.l' and '.ll' is + that the latter takes into account whether a partially collected + line still uses the old line length value.  File: groff.info, Node: Line Control, Next: Page Layout, Prev: Line Layout, Up: gtroff Reference @@ -6408,13 +6236,12 @@ 5.14 Line Control ================= -It is important to understand how `gtroff' handles input and output +It is important to understand how 'gtroff' handles input and output lines. Many escapes use positioning relative to the input line. For example, this - This is a \h'|1.2i'test. This is a @@ -6422,76 +6249,70 @@ produces - This is a test. This is a test. - The main usage of this feature is to define macros which act exactly + The main usage of this feature is to define macros that act exactly at the place where called. - .\" A simple macro to underline a word .de underline . nop \\$1\l'|0\[ul]' .. -In the above example, `|0' specifies a negative distance from the -current position (at the end of the just emitted argument `\$1') back -to the beginning of the input line. Thus, the `\l' escape draws a line +In the above example, '|0' specifies a negative distance from the +current position (at the end of the just emitted argument '\$1') back to +the beginning of the input line. Thus, the '\l' escape draws a line from right to left. - `gtroff' makes a difference between input and output line + 'gtroff' makes a difference between input and output line continuation; the latter is also called "interrupting" a line. -- Escape: \ -- Escape: \c -- Register: \n[.int] - Continue a line. `\' (this is a backslash at the end of a + Continue a line. '\' (this is a backslash at the end of a line immediately followed by a newline) works on the input level, suppressing the effects of the following newline in the input. - This is a \ .test => This is a .test - The `|' operator is also affected. + The '|' operator is also affected. - `\c' works on the output level. Anything after this escape on the - same line is ignored, except `\R' which works as usual. Anything - before `\c' on the same line is appended to the current partial + '\c' works on the output level. Anything after this escape on the + same line is ignored except '\R', which works as usual. Anything + before '\c' on the same line is appended to the current partial output line. The next non-command line after an interrupted line counts as a new input line. The visual results depend on whether no-fill mode is active. - * If no-fill mode is active (using the `nf' request), the next - input text line after `\c' is handled as a continuation of - the same input text line. - + * If no-fill mode is active (using the 'nf' request), the next + input text line after '\c' is handled as a continuation of the + same input text line. .nf This is a \c test. => This is a test. - * If fill mode is active (using the `fi' request), a word - interrupted with `\c' is continued with the text on the next + * If fill mode is active (using the 'fi' request), a word + interrupted with '\c' is continued with the text on the next input text line, without an intervening space. - This is a te\c st. => This is a test. - - Note that an intervening control line which causes a break is - stronger than `\c', flushing out the current partial line in the + Note that an intervening control line that causes a break is + stronger than '\c', flushing out the current partial line in the usual way. - The `.int' register contains a positive value if the last output - line was interrupted with `\c'; this is associated with the current + The '.int' register contains a positive value if the last output + line was interrupted with '\c'; this is associated with the current environment (*note Environments::).  @@ -6500,7 +6321,7 @@ 5.15 Page Layout ================ -`gtroff' provides some very primitive operations for controlling page +'gtroff' provides some very primitive operations for controlling page layout. -- Request: .pl [length] @@ -6509,68 +6330,68 @@ -- Register: \n[.p] Set the "page length" to LENGTH (or increment or decrement the current value by LENGTH). This is the length of the physical - output page. The default scaling indicator is `v'. + output page. The default scaling indicator is 'v'. The current setting can be found in the read-only number register - `.p'. + '.p'. Note that this only specifies the size of the page, not the top and - bottom margins. Those are not set by `gtroff' directly. *Note + bottom margins. Those are not set by 'gtroff' directly. *Note Traps::, for further information on how to do this. - Negative `pl' values are possible also, but not very useful: No + Negative 'pl' values are possible also, but not very useful: No trap is sprung, and each line is output on a single page (thus suppressing all vertical spacing). - If no argument or an invalid argument is given, `pl' sets the page + If no argument or an invalid argument is given, 'pl' sets the page length to 11i. - `gtroff' provides several operations which help in setting up top -and bottom titles (or headers and footers). + 'gtroff' provides several operations that help in setting up top and +bottom titles (or headers and footers). -- Request: .tl 'left'center'right' Print a "title line". It consists of three parts: a left justified portion, a centered portion, and a right justified portion. The - argument separator `'' can be replaced with any character not - occurring in the title line. The `%' character is replaced with + argument separator ''' can be replaced with any character not + occurring in the title line. The '%' character is replaced with the current page number. This character can be changed with the - `pc' request (see below). + 'pc' request (see below). - Without argument, `tl' is ignored. + Without argument, 'tl' is ignored. Some notes: - * The line length set by the `ll' request is not honoured by - `tl'; use the `lt' request (described below) instead, to - control line length for text set by `tl'. + * The line length set by the 'll' request is not honoured by + 'tl'; use the 'lt' request (described below) instead, to + control line length for text set by 'tl'. * A title line is not restricted to the top or bottom of a page. - * `tl' prints the title line immediately, ignoring a partially + * 'tl' prints the title line immediately, ignoring a partially filled line (which stays untouched). * It is not an error to omit closing delimiters. For example, - `.tl /foo' is equivalent to `.tl /foo///': It prints a title - line with the left justified word `foo'; the centered and + '.tl /foo' is equivalent to '.tl /foo///': It prints a title + line with the left justified word 'foo'; the centered and right justfied parts are empty. - * `tl' accepts the same parameter delimiting characters as the - `\A' escape; see *note Escapes::. + * 'tl' accepts the same parameter delimiting characters as the + '\A' escape; see *note Escapes::. -- Request: .lt [length] -- Request: .lt +length -- Request: .lt -length -- Register: \n[.lt] The title line is printed using its own line length, which is - specified (or incremented or decremented) with the `lt' request. + specified (or incremented or decremented) with the 'lt' request. Initially, the title line length is set to 6.5i. If a negative - line length is specified (which is not allowed), `gtroff' emits a - warning of type `range' and sets the title line length to zero. - The default scaling indicator is `m'. If `lt' is called without an + line length is specified (which is not allowed), 'gtroff' emits a + warning of type 'range' and sets the title line length to zero. + The default scaling indicator is 'm'. If 'lt' is called without an argument, the title length is reset to the previous value before - the last call to `lt'. + the last call to 'lt'. - The current setting of this is available in the `.lt' read-only + The current setting of this is available in the '.lt' read-only number register; it is associated with the current environment (*note Environments::). @@ -6582,14 +6403,14 @@ The only argument is the page number; the request is ignored without a parameter. - The read-only number register `.pn' contains the number of the next - page: either the value set by a `pn' request, or the number of the + The read-only number register '.pn' contains the number of the next + page: either the value set by a 'pn' request, or the number of the current page plus 1. -- Request: .pc [char] - Change the page number character (used by the `tl' request) to a + Change the page number character (used by the 'tl' request) to a different character. With no argument, this mechanism is disabled. - Note that this doesn't affect the number register `%'. + Note that this doesn't affect the number register '%'. *Note Traps::. @@ -6606,11 +6427,10 @@ Stop processing the current page and move to the next page. This request causes a break. It can also take an argument to set (increase, decrease) the page number of the next page (which - actually becomes the current page after `bp' has finished). The - difference between `bp' and `pn' is that `pn' does not cause a + actually becomes the current page after 'bp' has finished). The + difference between 'bp' and 'pn' is that 'pn' does not cause a break or actually eject a page. *Note Page Layout::. - .de newpage \" define macro 'bp \" begin page 'sp .5i \" vertical space @@ -6618,59 +6438,57 @@ 'sp .3i \" vertical space .. \" end macro - `bp' has no effect if not called within the top-level diversion + 'bp' has no effect if not called within the top-level diversion (*note Diversions::). - The read-write register `%' holds the current page number. + The read-write register '%' holds the current page number. - The number register `.pe' is set to 1 while `bp' is active. *Note + The number register '.pe' is set to 1 while 'bp' is active. *Note Page Location Traps::. -- Request: .ne [space] It is often necessary to force a certain amount of space before a new page occurs. This is most useful to make sure that there is - not a single "orphan" line left at the bottom of a page. The `ne' + not a single "orphan" line left at the bottom of a page. The 'ne' request ensures that there is a certain distance, specified by the first argument, before the next page is triggered (see *note Traps::, for further information). The default scaling indicator - for `ne' is `v'; the default value of SPACE is 1v if no argument - is given. + for 'ne' is 'v'; the default value of SPACE is 1v if no argument is + given. For example, to make sure that no fewer than 2 lines get orphaned, do the following before each paragraph: - .ne 2 text text text - `ne' then automatically causes a page break if there is space for + 'ne' then automatically causes a page break if there is space for one line only. -- Request: .sv [space] -- Request: .os - `sv' is similar to the `ne' request; it reserves the specified + 'sv' is similar to the 'ne' request; it reserves the specified amount of vertical space. If the desired amount of space exists before the next trap (or the bottom page boundary if no trap is set), the space is output immediately (ignoring a partially filled - line which stays untouched). If there is not enough space, it is - stored for later output via the `os' request. The default value + line, which stays untouched). If there is not enough space, it is + stored for later output via the 'os' request. The default value is 1v if no argument is given; the default scaling indicator is - `v'. + 'v'. - Both `sv' and `os' ignore no-space mode. While the `sv' request - allows negative values for SPACE, `os' ignores them. + Both 'sv' and 'os' ignore no-space mode. While the 'sv' request + allows negative values for SPACE, 'os' ignores them. -- Register: \n[nl] This register contains the current vertical position. If the vertical position is zero and the top of page transition hasn't - happened yet, `nl' is set to negative value. `gtroff' itself does + happened yet, 'nl' is set to negative value. 'gtroff' itself does this at the very beginning of a document before anything has been printed, but the main usage is to plant a header trap on a page if this page has already started. Consider the following: - .de xxx . sp . tl ''Header'' @@ -6685,7 +6503,6 @@ Result: - First page. ... @@ -6696,11 +6513,11 @@ ... - Without resetting `nl' to a negative value, the just planted trap + Without resetting 'nl' to a negative value, the just planted trap would be active beginning with the _next_ page, not the current one. - *Note Diversions::, for a comparison with the `.h' and `.d' + *Note Diversions::, for a comparison with the '.h' and '.d' registers.  @@ -6709,11 +6526,11 @@ 5.17 Fonts and Symbols ====================== -`gtroff' can switch fonts at any point in the text. +'gtroff' can switch fonts at any point in the text. - The basic set of fonts is `R', `I', `B', and `BI'. These are Times + The basic set of fonts is 'R', 'I', 'B', and 'BI'. These are Times Roman, Italic, Bold, and Bold Italic. For non-TTY devices, there is -also at least one symbol font which contains various special symbols +also at least one symbol font that contains various special symbols (Greek, mathematics). * Menu: @@ -6738,21 +6555,21 @@ -- Escape: \f(fn -- Escape: \f[font] -- Register: \n[.sty] - The `ft' request and the `\f' escape change the current font to + The 'ft' request and the '\f' escape change the current font to FONT (one-character name F, two-character name FN). - If FONT is a style name (as set with the `sty' request or with the - `styles' command in the `DESC' file), use it within the current - font family (as set with the `fam' request, `\F' escape, or with - the `family' command in the `DESC' file). + If FONT is a style name (as set with the 'sty' request or with the + 'styles' command in the 'DESC' file), use it within the current + font family (as set with the 'fam' request, '\F' escape, or with + the 'family' command in the 'DESC' file). - It is not possible to switch to a font with the name `DESC' + It is not possible to switch to a font with the name 'DESC' (whereas this name could be used as a style name; however, this is not recommended). - With no argument or using `P' as an argument, `.ft' switches to - the previous font. Use `\f[]' to do this with the escape. The - old syntax forms `\fP' or `\f[P]' are also supported. + With no argument or using 'P' as an argument, '.ft' switches to the + previous font. Use '\f[]' to do this with the escape. The old + syntax forms '\fP' or '\f[P]' are also supported. Fonts are generally specified as upper-case strings, which are usually 1 to 4 characters representing an abbreviation or acronym @@ -6760,7 +6577,6 @@ The example below produces two identical lines. - eggs, bacon, .ft B spam @@ -6769,44 +6585,40 @@ eggs, bacon, \fBspam\fP and sausage. - Note that `\f' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\f' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the font on the fly: - .mc \f[I]x\f[] The current style name is available in the read-only number - register `.sty' (this is a string-valued register); if the current - font isn't a style, the empty string is returned. It is - associated with the current environment. + register '.sty' (this is a string-valued register); if the current + font isn't a style, the empty string is returned. It is associated + with the current environment. *Note Font Positions::, for an alternative syntax. -- Request: .ftr f [g] - Translate font F to font G. Whenever a font named F is referred - to in a `\f' escape sequence, in the `F' and `S' conditional - operators, or in the `ft', `ul', `bd', `cs', `tkf', `special', - `fspecial', `fp', or `sty' requests, font G is used. If G is + Translate font F to font G. Whenever a font named F is referred to + in a '\f' escape sequence, in the 'F' and 'S' conditional + operators, or in the 'ft', 'ul', 'bd', 'cs', 'tkf', 'special', + 'fspecial', 'fp', or 'sty' requests, font G is used. If G is missing or equal to F the translation is undone. Note that it is not possible to chain font translations. Example: - .ftr XXX TR .ftr XXX YYY .ft XXX => warning: can't find font `XXX' - -- Request: .fzoom f [zoom] -- Register: \n[.zoom] Set magnification of font F to factor ZOOM, which must be a non-negative integer multiple of 1/1000th. This request is useful - to adjust the optical size of a font in relation to the others. - In the example below, font `CR' is magnified by 10% (the zoom - factor is thus 1.1). - + to adjust the optical size of a font in relation to the others. In + the example below, font 'CR' is magnified by 10% (the zoom factor + is thus 1.1). .fam P .fzoom CR 1100 @@ -6823,8 +6635,8 @@ affected font are adjusted accordingly. The zoom factor of the current font is available in the read-only - number register `.zoom', in multiples of 1/1000th. It returns - zero if there is no magnification. + number register '.zoom', in multiples of 1/1000th. It returns zero + if there is no magnification.  File: groff.info, Node: Font Families, Next: Font Positions, Prev: Changing Fonts, Up: Fonts and Symbols @@ -6832,15 +6644,15 @@ 5.17.2 Font Families -------------------- -Due to the variety of fonts available, `gtroff' has added the concept -of "font families" and "font styles". The fonts are specified as the +Due to the variety of fonts available, 'gtroff' has added the concept of +"font families" and "font styles". The fonts are specified as the concatenation of the font family and style. Specifying a font without -the family part causes `gtroff' to use that style of the current family. +the family part causes 'gtroff' to use that style of the current family. - Currently, fonts for the devices `-Tps', `-Tpdf', `-Tdvi', `-Tlj4', -`-Tlbp', and the X11 fonts are set up to this mechanism. By default, -`gtroff' uses the Times family with the four styles `R', `I', `B', and -`BI'. + Currently, fonts for the devices '-Tps', '-Tpdf', '-Tdvi', '-Tlj4', +'-Tlbp', and the X11 fonts are set up to this mechanism. By default, +'gtroff' uses the Times family with the four styles 'R', 'I', 'B', and +'BI'. This way, it is possible to use the basic four fonts and to select a different font family on the command line (*note Groff Options::). @@ -6853,14 +6665,13 @@ -- Register: \n[.fn] Switch font family to FAMILY (one-character name F, two-character name FM). If no argument is given, switch back to the previous - font family. Use `\F[]' to do this with the escape. Note that - `\FP' doesn't work; it selects font family `P' instead. + font family. Use '\F[]' to do this with the escape. Note that + '\FP' doesn't work; it selects font family 'P' instead. - The value at start-up is `T'. The current font family is available - in the read-only number register `.fam' (this is a string-valued + The value at start-up is 'T'. The current font family is available + in the read-only number register '.fam' (this is a string-valued register); it is associated with the current environment. - spam, .fam H \" helvetica family spam, \" used font is family H + style R = HR @@ -6873,72 +6684,66 @@ .ft R \" family T + style R = font TR and spam. - Note that `\F' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\F' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the font family on the fly: - .mc \F[P]x\F[] - The `.fn' register contains the current "real font name" of the + The '.fn' register contains the current "real font name" of the current font. This is a string-valued register. If the current - font is a style, the value of `\n[.fn]' is the proper - concatenation of family and style name. + font is a style, the value of '\n[.fn]' is the proper concatenation + of family and style name. -- Request: .sty n style Associate STYLE with font position N. A font position can be - associated either with a font or with a style. The current font - is the index of a font position and so is also either a font or a + associated either with a font or with a style. The current font is + the index of a font position and so is also either a font or a style. If it is a style, the font that is actually used is the font which name is the concatenation of the name of the current family and the name of the current style. For example, if the - current font is 1 and font position 1 is associated with style `R' - and the current font family is `T', then font `TR' is used. If - the current font is not a style, then the current family is - ignored. If the requests `cs', `bd', `tkf', `uf', or `fspecial' - are applied to a style, they are instead applied to the member of - the current family corresponding to that style. + current font is 1 and font position 1 is associated with style 'R' + and the current font family is 'T', then font 'TR' is used. If the + current font is not a style, then the current family is ignored. + If the requests 'cs', 'bd', 'tkf', 'uf', or 'fspecial' are applied + to a style, they are instead applied to the member of the current + family corresponding to that style. N must be a non-negative integer value. - The default family can be set with the `-f' option (*note Groff - Options::). The `styles' command in the `DESC' file controls - which font positions (if any) are initially associated with styles - rather than fonts. For example, the default setting for POSTSCRIPT - fonts - + The default family can be set with the '-f' option (*note Groff + Options::). The 'styles' command in the 'DESC' file controls which + font positions (if any) are initially associated with styles rather + than fonts. For example, the default setting for POSTSCRIPT fonts styles R I B BI is equivalent to - .sty 1 R .sty 2 I .sty 3 B .sty 4 BI - `fam' and `\F' always check whether the current font position is + 'fam' and '\F' always check whether the current font position is valid; this can give surprising results if the current font position is associated with a style. In the following example, we want to access the POSTSCRIPT font - `FooBar' from the font family `Foo': - + 'FooBar' from the font family 'Foo': .sty \n[.fp] Bar .fam Foo => warning: can't find font `FooR' The default font position at start-up is 1; for the POSTSCRIPT - device, this is associated with style `R', so `gtroff' tries to - open `FooR'. + device, this is associated with style 'R', so 'gtroff' tries to + open 'FooR'. A solution to this problem is to use a dummy font like the following: - .fp 0 dummy TR \" set up dummy font at position 0 .sty \n[.fp] Bar \" register style `Bar' .ft 0 \" switch to font at position 0 @@ -6954,7 +6759,7 @@ --------------------- For the sake of old phototypesetters and compatibility with old versions -of `troff', `gtroff' has the concept of font "positions", on which +of 'troff', 'gtroff' has the concept of font "positions", on which various fonts are mounted. -- Request: .fp pos font [external-name] @@ -6962,46 +6767,44 @@ -- Register: \n[.fp] Mount font FONT at position POS (which must be a non-negative integer). This numeric position can then be referred to with font - changing commands. When `gtroff' starts it is using font + changing commands. When 'gtroff' starts it is using font position 1 (which must exist; position 0 is unused usually at start-up). The current font in use, as a font position, is available in the - read-only number register `.f'. This can be useful to remember the + read-only number register '.f'. This can be useful to remember the current font for later recall. It is associated with the current environment (*note Environments::). - .nr save-font \n[.f] .ft B ... text text text ... .ft \n[save-font] The number of the next free font position is available in the - read-only number register `.fp'. This is useful when mounting a + read-only number register '.fp'. This is useful when mounting a new font, like so: - .fp \n[.fp] NEATOFONT - Fonts not listed in the `DESC' file are automatically mounted on + Fonts not listed in the 'DESC' file are automatically mounted on the next available font position when they are referenced. If a - font is to be mounted explicitly with the `fp' request on an - unused font position, it should be mounted on the first unused - font position, which can be found in the `.fp' register. Although - `gtroff' does not enforce this strictly, it is not allowed to - mount a font at a position whose number is much greater (approx. - 1000 positions) than that of any currently used position. + font is to be mounted explicitly with the 'fp' request on an unused + font position, it should be mounted on the first unused font + position, which can be found in the '.fp' register. Although + 'gtroff' does not enforce this strictly, it is not allowed to mount + a font at a position whose number is much greater (approx. 1000 + positions) than that of any currently used position. - The `fp' request has an optional third argument. This argument + The 'fp' request has an optional third argument. This argument gives the external name of the font, which is used for finding the - font description file. The second argument gives the internal - name of the font which is used to refer to the font in `gtroff' - after it has been mounted. If there is no third argument then the + font description file. The second argument gives the internal name + of the font, which is used to refer to the font in 'gtroff' after + it has been mounted. If there is no third argument then the internal name is used as the external name. This feature makes it possible to use fonts with long names in compatibility mode. - Both the `ft' request and the `\f' escape have alternative syntax + Both the 'ft' request and the '\f' escape have alternative syntax forms to access font positions. -- Request: .ft nnn @@ -7011,11 +6814,10 @@ Change the current font position to NNN (one-digit position N, two-digit position NN), which must be a non-negative integer. - If NNN is associated with a style (as set with the `sty' request - or with the `styles' command in the `DESC' file), use it within - the current font family (as set with the `fam' request, the `\F' - escape, or with the `family' command in the `DESC' file). - + If NNN is associated with a style (as set with the 'sty' request or + with the 'styles' command in the 'DESC' file), use it within the + current font family (as set with the 'fam' request, the '\F' + escape, or with the 'family' command in the 'DESC' file). this is font 1 .ft 2 @@ -7035,357 +6837,347 @@ -------------------- A "glyph" is a graphical representation of a "character". While a -character is an abstract entity containing semantic information, a -glyph is something which can be actually seen on screen or paper. It is +character is an abstract entity containing semantic information, a glyph +is something that can be actually seen on screen or paper. It is possible that a character has multiple glyph representation forms (for -example, the character `A' can be either written in a roman or an italic +example, the character 'A' can be either written in a roman or an italic font, yielding two different glyphs); sometimes more than one character -maps to a single glyph (this is a "ligature" - the most common is `fi'). +maps to a single glyph (this is a "ligature" - the most common is 'fi'). - A "symbol" is simply a named glyph. Within `gtroff', all glyph -names of a particular font are defined in its font file. If the user -requests a glyph not available in this font, `gtroff' looks up an -ordered list of "special fonts". By default, the POSTSCRIPT output -device supports the two special fonts `SS' (slanted symbols) and `S' -(symbols) (the former is looked up before the latter). Other output -devices use different names for special fonts. Fonts mounted with the -`fonts' keyword in the `DESC' file are globally available. To install -additional special fonts locally (i.e. for a particular font), use the -`fspecial' request. + A "symbol" is simply a named glyph. Within 'gtroff', all glyph names +of a particular font are defined in its font file. If the user requests +a glyph not available in this font, 'gtroff' looks up an ordered list of +"special fonts". By default, the POSTSCRIPT output device supports the +two special fonts 'SS' (slanted symbols) and 'S' (symbols) (the former +is looked up before the latter). Other output devices use different +names for special fonts. Fonts mounted with the 'fonts' keyword in the +'DESC' file are globally available. To install additional special fonts +locally (i.e. for a particular font), use the 'fspecial' request. - Here the exact rules how `gtroff' searches a given symbol: + Here the exact rules how 'gtroff' searches a given symbol: - * If the symbol has been defined with the `char' request, use it. + * If the symbol has been defined with the 'char' request, use it. This hides a symbol with the same name in the current font. * Check the current font. - * If the symbol has been defined with the `fchar' request, use it. + * If the symbol has been defined with the 'fchar' request, use it. * Check whether the current font has a font-specific list of special fonts; test all fonts in the order of appearance in the last - `fspecial' call if appropriate. + 'fspecial' call if appropriate. - * If the symbol has been defined with the `fschar' request for the + * If the symbol has been defined with the 'fschar' request for the current font, use it. - * Check all fonts in the order of appearance in the last `special' + * Check all fonts in the order of appearance in the last 'special' call. - * If the symbol has been defined with the `schar' request, use it. + * If the symbol has been defined with the 'schar' request, use it. * As a last resort, consult all fonts loaded up to now for special fonts and check them, starting with the lowest font number. Note that this can sometimes lead to surprising results since the - `fonts' line in the `DESC' file often contains empty positions + 'fonts' line in the 'DESC' file often contains empty positions, which are filled later on. For example, consider the following: - fonts 3 0 0 FOO - This mounts font `foo' at font position 3. We assume that `FOO' - is a special font, containing glyph `foo', and that no font has - been loaded yet. The line - + This mounts font 'foo' at font position 3. We assume that 'FOO' is + a special font, containing glyph 'foo', and that no font has been + loaded yet. The line .fspecial BAR BAZ - makes font `BAZ' special only if font `BAR' is active. We further - assume that `BAZ' is really a special font, i.e., the font - description file contains the `special' keyword, and that it also - contains glyph `foo' with a special shape fitting to font `BAR'. - After executing `fspecial', font `BAR' is loaded at font - position 1, and `BAZ' at position 2. - - We now switch to a new font `XXX', trying to access glyph `foo' - which is assumed to be missing. There are neither font-specific - special fonts for `XXX' nor any other fonts made special with the - `special' request, so `gtroff' starts the search for special fonts + makes font 'BAZ' special only if font 'BAR' is active. We further + assume that 'BAZ' is really a special font, i.e., the font + description file contains the 'special' keyword, and that it also + contains glyph 'foo' with a special shape fitting to font 'BAR'. + After executing 'fspecial', font 'BAR' is loaded at font + position 1, and 'BAZ' at position 2. + + We now switch to a new font 'XXX', trying to access glyph 'foo' + that is assumed to be missing. There are neither font-specific + special fonts for 'XXX' nor any other fonts made special with the + 'special' request, so 'gtroff' starts the search for special fonts in the list of already mounted fonts, with increasing font - positions. Consequently, it finds `BAZ' before `FOO' even for - `XXX' which is not the intended behaviour. + positions. Consequently, it finds 'BAZ' before 'FOO' even for + 'XXX', which is not the intended behaviour. *Note Font Files::, and *note Special Fonts::, for more details. The list of available symbols is device dependent; see the -`groff_char(7)' man page for a complete list of all glyphs. For +'groff_char(7)' man page for a complete list of all glyphs. For example, say - man -Tdvi groff_char > groff_char.dvi -for a list using the default DVI fonts (not all versions of the `man' -program support the `-T' option). If you want to use an additional -macro package to change the used fonts, `groff' must be called directly: - +for a list using the default DVI fonts (not all versions of the 'man' +program support the '-T' option). If you want to use an additional +macro package to change the used fonts, 'groff' must be called directly: groff -Tdvi -mec -man groff_char.7 > groff_char.dvi Glyph names not listed in groff_char(7) are derived algorithmically, -using a simplified version of the Adobe Glyph List (AGL) algorithm which -is described in -`http://partners.adobe.com/public/developer/opentype/index_glyph.html'. -The (frozen) set of glyph names which can't be derived algorithmically -is called "groff glyph list (GGL)". - - * A glyph for Unicode character U+XXXX[X[X]] which is not a - composite character is named `uXXXX[X[X]]'. X must be an - uppercase hexadecimal digit. Examples: `u1234', `u008E', - `u12DB8'. The largest Unicode value is 0x10FFFF. There must be at - least four `X' digits; if necessary, add leading zeroes (after the - `u'). No zero padding is allowed for character codes greater than - 0xFFFF. Surrogates (i.e., Unicode values greater than 0xFFFF - represented with character codes from the surrogate area - U+D800-U+DFFF) are not allowed too. +using a simplified version of the Adobe Glyph List (AGL) algorithm, +which is described in +. +The (frozen) set of glyph names that can't be derived algorithmically is +called "groff glyph list (GGL)". + + * A glyph for Unicode character U+XXXX[X[X]], which is not a + composite character is named 'uXXXX[X[X]]'. X must be an uppercase + hexadecimal digit. Examples: 'u1234', 'u008E', 'u12DB8'. The + largest Unicode value is 0x10FFFF. There must be at least four 'X' + digits; if necessary, add leading zeroes (after the 'u'). No zero + padding is allowed for character codes greater than 0xFFFF. + Surrogates (i.e., Unicode values greater than 0xFFFF represented + with character codes from the surrogate area U+D800-U+DFFF) are not + allowed too. * A glyph representing more than a single input character is named - `u' COMPONENT1 `_' COMPONENT2 `_' COMPONENT3 ... + 'u' COMPONENT1 '_' COMPONENT2 '_' COMPONENT3 ... - Example: `u0045_0302_0301'. + Example: 'u0045_0302_0301'. - For simplicity, all Unicode characters which are composites must be + For simplicity, all Unicode characters that are composites must be decomposed maximally (this is normalization form D in the Unicode - standard); for example, `u00CA_0301' is not a valid glyph name + standard); for example, 'u00CA_0301' is not a valid glyph name since U+00CA (LATIN CAPITAL LETTER E WITH CIRCUMFLEX) can be further decomposed into U+0045 (LATIN CAPITAL LETTER E) and U+0302 - (COMBINING CIRCUMFLEX ACCENT). `u0045_0302_0301' is thus the - glyph name for U+1EBE, LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND - ACUTE. + (COMBINING CIRCUMFLEX ACCENT). 'u0045_0302_0301' is thus the glyph + name for U+1EBE, LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE. * groff maintains a table to decompose all algorithmically derived - glyph names which are composites itself. For example, `u0100' + glyph names that are composites itself. For example, 'u0100' (LATIN LETTER A WITH MACRON) is automatically decomposed into - `u0041_0304'. Additionally, a glyph name of the GGL is preferred + 'u0041_0304'. Additionally, a glyph name of the GGL is preferred to an algorithmically derived glyph name; groff also automatically - does the mapping. Example: The glyph `u0045_0302' is mapped to - `^E'. + does the mapping. Example: The glyph 'u0045_0302' is mapped to + '^E'. * glyph names of the GGL can't be used in composite glyph names; for - example, `^E_u0301' is invalid. + example, '^E_u0301' is invalid. -- Escape: \(nm -- Escape: \[name] -- Escape: \[component1 component2 ...] Insert a symbol NAME (two-character name NM) or a composite glyph - with component glyphs COMPONENT1, COMPONENT2, ... There is no - special syntax for one-character names - the natural form `\N' - would collide with escapes.(1) (*note Using Symbols-Footnote-1::) + with component glyphs COMPONENT1, COMPONENT2, ... There is no + special syntax for one-character names - the natural form '\N' + would collide with escapes.(1) (*note Using Symbols-Footnote-1::) - If NAME is undefined, a warning of type `char' is generated, and + If NAME is undefined, a warning of type 'char' is generated, and the escape is ignored. *Note Debugging::, for information about warnings. - groff resolves `\[...]' with more than a single component as + groff resolves '\[...]' with more than a single component as follows: - * Any component which is found in the GGL is converted to the - `uXXXX' form. + * Any component that is found in the GGL is converted to the + 'uXXXX' form. - * Any component `uXXXX' which is found in the list of + * Any component 'uXXXX' that is found in the list of decomposable glyphs is decomposed. - * The resulting elements are then concatenated with `_' in - between, dropping the leading `u' in all elements but the + * The resulting elements are then concatenated with '_' in + between, dropping the leading 'u' in all elements but the first. - No check for the existence of any component (similar to `tr' + No check for the existence of any component (similar to 'tr' request) is done. Examples: - `\[A ho]' - `A' maps to `u0041', `ho' maps to `u02DB', thus the final - glyph name would be `u0041_02DB'. Note this is not the - expected result: The ogonek glyph `ho' is a spacing ogonek, + '\[A ho]' + 'A' maps to 'u0041', 'ho' maps to 'u02DB', thus the final + glyph name would be 'u0041_02DB'. Note this is not the + expected result: The ogonek glyph 'ho' is a spacing ogonek, but for a proper composite a non-spacing ogonek (U+0328) is - necessary. Looking into the file `composite.tmac' one can - find `.composite ho u0328' which changes the mapping of `ho' - while a composite glyph name is constructed, causing the - final glyph name to be `u0041_0328'. - - `\[^E u0301]' - `\[^E aa]' - `\[E a^ aa]' - `\[E ^ ']' - `^E' maps to `u0045_0302', thus the final glyph name is - `u0045_0302_0301' in all forms (assuming proper calls of the - `composite' request). - - It is not possible to define glyphs with names like `A ho' within - a groff font file. This is not really a limitation; instead, you - have to define `u0041_0328'. + necessary. Looking into the file 'composite.tmac' one can + find '.composite ho u0328', which changes the mapping of 'ho' + while a composite glyph name is constructed, causing the final + glyph name to be 'u0041_0328'. + + '\[^E u0301]' + '\[^E aa]' + '\[E a^ aa]' + '\[E ^ ']' + '^E' maps to 'u0045_0302', thus the final glyph name is + 'u0045_0302_0301' in all forms (assuming proper calls of the + 'composite' request). + + It is not possible to define glyphs with names like 'A ho' within a + groff font file. This is not really a limitation; instead, you + have to define 'u0041_0328'. -- Escape: \C'xxx' - Typeset the glyph named XXX.(2) (*note Using Symbols-Footnote-2::) - Normally it is more convenient to use `\[XXX]', but `\C' has the - advantage that it is compatible with newer versions of AT&T `troff' + Typeset the glyph named XXX.(2) (*note Using Symbols-Footnote-2::) + Normally it is more convenient to use '\[XXX]', but '\C' has the + advantage that it is compatible with newer versions of AT&T 'troff' and is available in compatibility mode. -- Request: .composite from to - Map glyph name FROM to glyph name TO if it is used in `\[...]' - with more than one component. See above for examples. + Map glyph name FROM to glyph name TO if it is used in '\[...]' with + more than one component. See above for examples. This mapping is based on glyph names only; no check for the existence of either glyph is done. A set of default mappings for many accents can be found in the file - `composite.tmac' which is loaded at start-up. + 'composite.tmac', which is loaded at start-up. -- Escape: \N'n' - Typeset the glyph with code N in the current font (`n' is *not* - the input character code). The number N can be any non-negative + Typeset the glyph with code N in the current font ('n' is *not* the + input character code). The number N can be any non-negative decimal integer. Most devices only have glyphs with codes between 0 and 255; the Unicode output device uses codes in the range 0-65535. If the current font does not contain a glyph with that - code, special fonts are _not_ searched. The `\N' escape sequence - can be conveniently used in conjunction with the `char' request: - + code, special fonts are _not_ searched. The '\N' escape sequence + can be conveniently used in conjunction with the 'char' request: .char \[phone] \f[ZD]\N'37' The code of each glyph is given in the fourth column in the font - description file after the `charset' command. It is possible to - include unnamed glyphs in the font description file by using a - name of `---'; the `\N' escape sequence is the only way to use - these. + description file after the 'charset' command. It is possible to + include unnamed glyphs in the font description file by using a name + of '---'; the '\N' escape sequence is the only way to use these. - No kerning is applied to glyphs accessed with `\N'. + No kerning is applied to glyphs accessed with '\N'. Some escape sequences directly map onto special glyphs. -- Escape: \' This is a backslash followed by the apostrophe character, ASCII - character `0x27' (EBCDIC character `0x7D'). The same as `\[aa]', + character '0x27' (EBCDIC character '0x7D'). The same as '\[aa]', the acute accent. -- Escape: \` - This is a backslash followed by ASCII character `0x60' (EBCDIC - character `0x79' usually). The same as `\[ga]', the grave accent. + This is a backslash followed by ASCII character '0x60' (EBCDIC + character '0x79' usually). The same as '\[ga]', the grave accent. -- Escape: \- - This is the same as `\[-]', the minus sign in the current font. + This is the same as '\[-]', the minus sign in the current font. -- Escape: \_ - This is the same as `\[ul]', the underline character. + This is the same as '\[ul]', the underline character. -- Request: .cflags n c1 c2 ... Input characters and symbols have certain properties associated - with it.(3) (*note Using Symbols-Footnote-3::) These properties - can be modified with the `cflags' request. The first argument is + with it.(3) (*note Using Symbols-Footnote-3::) These properties + can be modified with the 'cflags' request. The first argument is the sum of the desired flags and the remaining arguments are the characters or symbols to have those properties. It is possible to omit the spaces between the characters or symbols. Instead of single characters or symbols you can also use character classes (see *note Character Classes:: for more details). - `1' - The character ends sentences (initially characters `.?!' have + '1' + The character ends sentences (initially characters '.?!' have this property). - `2' + '2' Lines can be broken before the character (initially no characters have this property). This only works if both the characters before and after have non-zero hyphenation codes - (as set with the `hcode' request). Use value 64 to override + (as set with the 'hcode' request). Use value 64 to override this behaviour. - `4' + '4' Lines can be broken after the character (initially the - character `-' and the symbols `\[hy]' and `\[em]' have this + character '-' and the symbols '\[hy]' and '\[em]' have this property). This only works if both the characters before and - after have non-zero hyphenation codes (as set with the - `hcode' request). Use value 64 to override this behaviour. + after have non-zero hyphenation codes (as set with the 'hcode' + request). Use value 64 to override this behaviour. - `8' + '8' The character overlaps horizontally if used as a horizontal - line building element. Initially the symbols `\[ul]', - `\[rn]', `\[ru]', `\[radicalex]', and `\[sqrtex]' have this + line building element. Initially the symbols '\[ul]', + '\[rn]', '\[ru]', '\[radicalex]', and '\[sqrtex]' have this property. - `16' + '16' The character overlaps vertically if used as vertical line - building element. Initially symbol `\[br]' has this property. + building element. Initially symbol '\[br]' has this property. - `32' + '32' An end-of-sentence character followed by any number of characters with this property is treated as the end of a sentence if followed by a newline or two spaces; in other words the character is "transparent" for the purposes of end-of-sentence recognition - this is the same as having a - zero space factor in TeX (initially characters `"')]*' and - the symbols `\[dg]' and `\[rq]' have this property). + zero space factor in TeX (initially characters '"')]*' and the + symbols '\[dg]', '\[rq]', and '\[cq]' have this property). - `64' + '64' Ignore hyphenation code values of the surrounding characters. Use this in combination with values 2 and 4 (initially no characters have this property). For example, if you need an automatic break point after the hyphen in number ranges like - `3000-5000', insert - + '3000-5000', insert .cflags 68 - into your document. Note, however, that this can lead to bad layout if done without thinking; in most situations, a better - solution instead of changing the `cflags' value is to insert - `\:' right after the hyphen at the places which really need a + solution instead of changing the 'cflags' value is to insert + '\:' right after the hyphen at the places that really need a break point. - `128' + '128' Prohibit a line break before the character, but allow a line break after the character. This works only in combination with flags 256 and 512 (see below) and has no effect otherwise. - `256' + '256' Prohibit a line break after the character, but allow a line break before the character. This works only in combination with flags 128 and 512 (see below) and has no effect otherwise. - `512' + '512' Allow line break before or after the character. This works only in combination with flags 128 and 256 and has no effect otherwise. Contrary to flag values 2 and 4, the flags 128, 256, and 512 work pairwise. If, for example, the left character has value - 512, and the right character 128, no line break gets - inserted. If we use value 6 instead for the left character, - a line break after the character can't be suppressed since - the right neighbour character doesn't get examined. + 512, and the right character 128, no line break gets inserted. + If we use value 6 instead for the left character, a line break + after the character can't be suppressed since the right + neighbour character doesn't get examined. -- Request: .char g [string] -- Request: .fchar g [string] -- Request: .fschar f g [string] -- Request: .schar g [string] - Define a new glyph G to be STRING (which can be empty).(4) (*note - Using Symbols-Footnote-4::) Every time glyph G needs to be - printed, STRING is processed in a temporary environment and the - result is wrapped up into a single object. Compatibility mode is - turned off and the escape character is set to `\' while STRING is - being processed. Any emboldening, constant spacing or track - kerning is applied to this object rather than to individual - characters in STRING. + Define a new glyph G to be STRING (which can be empty).(4) (*note + Using Symbols-Footnote-4::) Every time glyph G needs to be printed, + STRING is processed in a temporary environment and the result is + wrapped up into a single object. Compatibility mode is turned off + and the escape character is set to '\' while STRING is being + processed. Any emboldening, constant spacing or track kerning is + applied to this object rather than to individual characters in + STRING. A glyph defined by these requests can be used just like a normal glyph provided by the output device. In particular, other - characters can be translated to it with the `tr' or `trin' - requests; it can be made the leader character by the `lc' request; - repeated patterns can be drawn with the glyph using the `\l' and - `\L' escape sequences; words containing the glyph can be - hyphenated correctly if the `hcode' request is used to give the - glyph's symbol a hyphenation code. + characters can be translated to it with the 'tr' or 'trin' + requests; it can be made the leader character by the 'lc' request; + repeated patterns can be drawn with the glyph using the '\l' and + '\L' escape sequences; words containing the glyph can be hyphenated + correctly if the 'hcode' request is used to give the glyph's symbol + a hyphenation code. - There is a special anti-recursion feature: Use of `g' within the + There is a special anti-recursion feature: Use of 'g' within the glyph's definition is handled like normal characters and symbols - not defined with `char'. + not defined with 'char'. - Note that the `tr' and `trin' requests take precedence if `char' + Note that the 'tr' and 'trin' requests take precedence if 'char' accesses the same symbol. - .tr XY X => Y @@ -7396,34 +7188,34 @@ X => Z - The `fchar' request defines a fallback glyph: `gtroff' only checks - for glyphs defined with `fchar' if it cannot find the glyph in the - current font. `gtroff' carries out this test before checking + The 'fchar' request defines a fallback glyph: 'gtroff' only checks + for glyphs defined with 'fchar' if it cannot find the glyph in the + current font. 'gtroff' carries out this test before checking special fonts. - `fschar' defines a fallback glyph for font F: `gtroff' checks for - glyphs defined with `fschar' after the list of fonts declared as - font-specific special fonts with the `fspecial' request, but - before the list of fonts declared as global special fonts with the - `special' request. - - Finally, the `schar' request defines a global fallback glyph: - `gtroff' checks for glyphs defined with `schar' after the list of - fonts declared as global special fonts with the `special' request, + 'fschar' defines a fallback glyph for font F: 'gtroff' checks for + glyphs defined with 'fschar' after the list of fonts declared as + font-specific special fonts with the 'fspecial' request, but before + the list of fonts declared as global special fonts with the + 'special' request. + + Finally, the 'schar' request defines a global fallback glyph: + 'gtroff' checks for glyphs defined with 'schar' after the list of + fonts declared as global special fonts with the 'special' request, but before the already mounted special fonts. *Note Using Symbols::, for a detailed description of the glyph - searching mechanism in `gtroff'. + searching mechanism in 'gtroff'. -- Request: .rchar c1 c2 ... -- Request: .rfschar f c1 c2 ... Remove the definitions of glyphs C1, C2, ... This undoes the - effect of a `char', `fchar', or `schar' request. + effect of a 'char', 'fchar', or 'schar' request. It is possible to omit the whitespace between arguments. - The request `rfschar' removes glyph definitions defined with - `fschar' for glyph f. + The request 'rfschar' removes glyph definitions defined with + 'fschar' for glyph f. *Note Special Characters::. @@ -7431,21 +7223,21 @@ File: groff.info, Node: Using Symbols-Footnotes, Up: Using Symbols (1) Note that a one-character symbol is not the same as an input -character, i.e., the character `a' is not the same as `\[a]'. By -default, `groff' defines only a single one-character symbol, `\[-]'; it -is usually accessed as `\-'. On the other hand, `gtroff' has the -special feature that `\[charXXX]' is the same as the input character -with character code XXX. For example, `\[char97]' is identical to the -letter `a' if ASCII encoding is active. +character, i.e., the character 'a' is not the same as '\[a]'. By +default, 'groff' defines only a single one-character symbol, '\[-]'; it +is usually accessed as '\-'. On the other hand, 'gtroff' has the +special feature that '\[charXXX]' is the same as the input character +with character code XXX. For example, '\[char97]' is identical to the +letter 'a' if ASCII encoding is active. - (2) `\C' is actually a misnomer since it accesses an output glyph. + (2) '\C' is actually a misnomer since it accesses an output glyph. (3) Note that the output glyphs themselves don't have such -properties. For `gtroff', a glyph is a numbered box with a given -width, depth, and height, nothing else. All manipulations with the -`cflags' request work on the input level. +properties. For 'gtroff', a glyph is a numbered box with a given width, +depth, and height, nothing else. All manipulations with the 'cflags' +request work on the input level. - (4) `char' is a misnomer since an output glyph is defined. + (4) 'char' is a misnomer since an output glyph is defined.  File: groff.info, Node: Character Classes, Next: Special Fonts, Prev: Using Symbols, Up: Fonts and Symbols @@ -7459,31 +7251,30 @@ characters share the same properties. -- Request: .class n c1 c2 ... - In `groff', a "character class" (or simply "class") is a set of - characters, grouped by some user aspect. The `class' request + In 'groff', a "character class" (or simply "class") is a set of + characters, grouped by some user aspect. The 'class' request defines such classes so that other requests can refer to all characters belonging to this set with a single class name. - Currently, only the `cflags' request can handle character classes. + Currently, only the 'cflags' request can handle character classes. - A `class' request takes a class name followed by a list of + A 'class' request takes a class name followed by a list of entities. In its simplest form, the entities are characters or symbols: - .class [prepunct] , : ; > } Since class and glyph names share the same namespace, it is - recommended to start and end the class name with `[' and `]', - respectively, to avoid collisions with normal `groff' symbols (and - symbols defined by the user). In particular, the presence of `]' - in the symbol name intentionally prevents the usage of `\[...]', - thus you must use the `\C' escape to access a class with such a + recommended to start and end the class name with '[' and ']', + respectively, to avoid collisions with normal 'groff' symbols (and + symbols defined by the user). In particular, the presence of ']' + in the symbol name intentionally prevents the usage of '\[...]', + thus you must use the '\C' escape to access a class with such a name. You can also use a special character range notation, consisting of - a start character or symbol, followed by `-', and an end character - or symbol. Internally, `gtroff' converts these two symbol names to - Unicode values (according to the groff glyph gist) which then give + a start character or symbol, followed by '-', and an end character + or symbol. Internally, 'gtroff' converts these two symbol names to + Unicode values (according to the groff glyph gist), which then give the start and end value of the range. If that fails, the class definition is skipped. @@ -7491,29 +7282,27 @@ Here is a more complex example: - .class [prepunctx] \C'[prepunct]' \[u2013]-\[u2016] - The class `prepunctx' now contains the contents of the class - `prepunct' as defined above (the set `, : ; > }'), and characters - in the range between `U+2013' and `U+2016'. + The class 'prepunctx' now contains the contents of the class + 'prepunct' as defined above (the set ', : ; > }'), and characters + in the range between 'U+2013' and 'U+2016'. - If you want to add `-' to a class, it must be the first character + If you want to add '-' to a class, it must be the first character value in the argument list, otherwise it gets misinterpreted as a range. Note that it is not possible to use class names within range definitions. - Typical use of the `class' request is to control line-breaking and - hyphenation rules as defined by the `cflags' request. For example, + Typical use of the 'class' request is to control line-breaking and + hyphenation rules as defined by the 'cflags' request. For example, to inhibit line breaks before the characters belonging to the - `prepunctx' class, you can write: - + 'prepunctx' class, you can write: .cflags 2 \C'[prepunctx]' - See the `cflags' request in *note Using Symbols::, for more + See the 'cflags' request in *note Using Symbols::, for more details.  @@ -7522,29 +7311,29 @@ 5.17.6 Special Fonts -------------------- -Special fonts are those that `gtroff' searches when it cannot find the +Special fonts are those that 'gtroff' searches when it cannot find the requested glyph in the current font. The Symbol font is usually a special font. - `gtroff' provides the following two requests to add more special + 'gtroff' provides the following two requests to add more special fonts. *Note Using Symbols::, for a detailed description of the glyph -searching mechanism in `gtroff'. +searching mechanism in 'gtroff'. Usually, only non-TTY devices have special fonts. -- Request: .special [s1 s2 ...] -- Request: .fspecial f [s1 s2 ...] - Use the `special' request to define special fonts. Initially, this + Use the 'special' request to define special fonts. Initially, this list is empty. - Use the `fspecial' request to designate special fonts only when + Use the 'fspecial' request to designate special fonts only when font F is active. Initially, this list is empty. - Previous calls to `special' or `fspecial' are overwritten; without + Previous calls to 'special' or 'fspecial' are overwritten; without arguments, the particular list of special fonts is set to empty. Special fonts are searched in the order they appear as arguments. - All fonts which appear in a call to `special' or `fspecial' are + All fonts that appear in a call to 'special' or 'fspecial' are loaded. *Note Using Symbols::, for the exact search order of glyphs. @@ -7557,9 +7346,9 @@ There are a number of requests and escapes for artificially creating fonts. These are largely vestiges of the days when output devices did -not have a wide variety of fonts, and when `nroff' and `troff' were -separate programs. Most of them are no longer necessary in GNU -`troff'. Nevertheless, they are supported. +not have a wide variety of fonts, and when 'nroff' and 'troff' were +separate programs. Most of them are no longer necessary in GNU 'troff'. +Nevertheless, they are supported. -- Escape: \H'height' -- Escape: \H'+height' @@ -7567,31 +7356,29 @@ -- Register: \n[.height] Change (increment, decrement) the height of the current font, but not the width. If HEIGHT is zero, restore the original height. - Default scaling indicator is `z'. + Default scaling indicator is 'z'. - The read-only number register `.height' contains the font height as - set by `\H'. + The read-only number register '.height' contains the font height as + set by '\H'. - Currently, only the `-Tps' and `-Tpdf' devices support this + Currently, only the '-Tps' and '-Tpdf' devices support this feature. - Note that `\H' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\H' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the font on the fly: - .mc \H'+5z'x\H'0' - In compatibility mode, `gtroff' behaves differently: If an + In compatibility mode, 'gtroff' behaves differently: If an increment or decrement is used, it is always taken relative to the current point size and not relative to the previously selected font height. Thus, - .cp 1 \H'+5'test \H'+5'test - prints the word `test' twice with the same font height (five points + prints the word 'test' twice with the same font height (five points larger than the current font size). -- Escape: \S'slant' @@ -7599,50 +7386,49 @@ Slant the current font by SLANT degrees. Positive values slant to the right. Only integer values are possible. - The read-only number register `.slant' contains the font slant as - set by `\S'. + The read-only number register '.slant' contains the font slant as + set by '\S'. - Currently, only the `-Tps' and `-Tpdf' devices support this + Currently, only the '-Tps' and '-Tpdf' devices support this feature. - Note that `\S' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\S' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the font on the fly: - .mc \S'20'x\S'0' This request is incorrectly documented in the original UNIX troff manual; the slant is always set to an absolute value. -- Request: .ul [lines] - The `ul' request normally underlines subsequent lines if a TTY + The 'ul' request normally underlines subsequent lines if a TTY output device is used. Otherwise, the lines are printed in italics - (only the term `underlined' is used in the following). The single + (only the term 'underlined' is used in the following). The single argument is the number of input lines to be underlined; with no argument, the next line is underlined. If LINES is zero or - negative, stop the effects of `ul' (if it was active). Requests + negative, stop the effects of 'ul' (if it was active). Requests and empty lines do not count for computing the number of underlined - input lines, even if they produce some output like `tl'. Lines + input lines, even if they produce some output like 'tl'. Lines inserted by macros (e.g. invoked by a trap) do count. - At the beginning of `ul', the current font is stored and the - underline font is activated. Within the span of a `ul' request, it + At the beginning of 'ul', the current font is stored and the + underline font is activated. Within the span of a 'ul' request, it is possible to change fonts, but after the last line affected by - `ul' the saved font is restored. + 'ul' the saved font is restored. This number of lines still to be underlined is associated with the - current environment (*note Environments::). The underline font - can be changed with the `uf' request. + current environment (*note Environments::). The underline font can + be changed with the 'uf' request. - The `ul' request does not underline spaces. + The 'ul' request does not underline spaces. -- Request: .cu [lines] - The `cu' request is similar to `ul' but underlines spaces as well + The 'cu' request is similar to 'ul' but underlines spaces as well (if a TTY output device is used). -- Request: .uf font - Set the underline font (globally) used by `ul' and `cu'. By + Set the underline font (globally) used by 'ul' and 'cu'. By default, this is the font at position 2. FONT can be either a non-negative font position or the name of a font. @@ -7656,16 +7442,15 @@ * Imitate a bold font unconditionally. The first argument specifies the font to embolden, and the second is the number - of basic units, minus one, by which the two glyphs are - offset. If the second argument is missing, emboldening is - turned off. - - FONT can be either a non-negative font position or the name - of a font. - - OFFSET is available in the `.b' read-only register if a - special font is active; in the `bd' request, its default unit - is `u'. + of basic units, minus one, by which the two glyphs are offset. + If the second argument is missing, emboldening is turned off. + + FONT can be either a non-negative font position or the name of + a font. + + OFFSET is available in the '.b' read-only register if a + special font is active; in the 'bd' request, its default unit + is 'u'. * Imitate a bold form conditionally. Embolden FONT1 by OFFSET only if font FONT2 is the current font. This command can be @@ -7674,18 +7459,18 @@ emboldening is turned off for this particular current font. This affects special fonts only (either set up with the - `special' command in font files or with the `fspecial' + 'special' command in font files or with the 'fspecial' request). -- Request: .cs font [width [em-size]] Switch to and from "constant glyph space mode". If activated, the width of every glyph is WIDTH/36 ems. The em size is given - absolutely by EM-SIZE; if this argument is missing, the em value - is taken from the current font size (as set with the `ps' request) + absolutely by EM-SIZE; if this argument is missing, the em value is + taken from the current font size (as set with the 'ps' request) when the font is effectively in use. Without second and third argument, constant glyph space mode is deactivated. - Default scaling indicator for EM-SIZE is `z'; WIDTH is an integer. + Default scaling indicator for EM-SIZE is 'z'; WIDTH is an integer.  File: groff.info, Node: Ligatures and Kerning, Prev: Artificial Fonts, Up: Fonts and Symbols @@ -7694,19 +7479,19 @@ ---------------------------- Ligatures are groups of characters that are run together, i.e, producing -a single glyph. For example, the letters `f' and `i' can form a -ligature `fi' as in the word `file'. This produces a cleaner look +a single glyph. For example, the letters 'f' and 'i' can form a +ligature 'fi' as in the word 'file'. This produces a cleaner look (albeit subtle) to the printed output. Usually, ligatures are not available in fonts for TTY output devices. Most POSTSCRIPT fonts support the fi and fl ligatures. The C/A/T -typesetter that was the target of AT&T `troff' also supported `ff', -`ffi', and `ffl' ligatures. Advanced typesetters or `expert' fonts may -include ligatures for `ft' and `ct', although GNU `troff' does not +typesetter that was the target of AT&T 'troff' also supported 'ff', +'ffi', and 'ffl' ligatures. Advanced typesetters or 'expert' fonts may +include ligatures for 'ft' and 'ct', although GNU 'troff' does not support these (yet). Only the current font is checked for ligatures and kerns; neither -special fonts nor entities defined with the `char' request (and its +special fonts nor entities defined with the 'char' request (and its siblings) are taken into account. -- Request: .lg [flag] @@ -7714,7 +7499,7 @@ Switch the ligature mechanism on or off; if the parameter is non-zero or missing, ligatures are enabled, otherwise disabled. Default is on. The current ligature mode can be found in the - read-only number register `.lg' (set to 1 or 2 if ligatures are + read-only number register '.lg' (set to 1 or 2 if ligatures are enabled, 0 otherwise). Setting the ligature mode to 2 enables the two-character ligatures @@ -7724,19 +7509,19 @@ "Pairwise kerning" is another subtle typesetting mechanism that modifies the distance between a glyph pair to improve readability. In most cases (but not always) the distance is decreased. Typewriter-like -fonts and fonts for terminals where all glyphs have the same width -don't use kerning. +fonts and fonts for terminals where all glyphs have the same width don't +use kerning. -- Request: .kern [flag] -- Register: \n[.kern] Switch kerning on or off. If the parameter is non-zero or missing, enable pairwise kerning, otherwise disable it. The read-only - number register `.kern' is set to 1 if pairwise kerning is enabled, + number register '.kern' is set to 1 if pairwise kerning is enabled, 0 otherwise. If the font description file contains pairwise kerning information, glyphs from that font are kerned. Kerning between two glyphs can - be inhibited by placing `\&' between them: `V\&A'. + be inhibited by placing '\&' between them: 'V\&A'. *Note Font File Format::. @@ -7749,13 +7534,13 @@ -- Request: .tkf f s1 n1 s2 n2 Enable track kerning for font F. If the current font is F the width of every glyph is increased by an amount between N1 and N2 - (N1, N2 can be negative); if the current point size is less than - or equal to S1 the width is increased by N1; if it is greater than - or equal to S2 the width is increased by N2; if the point size is + (N1, N2 can be negative); if the current point size is less than or + equal to S1 the width is increased by N1; if it is greater than or + equal to S2 the width is increased by N2; if the point size is greater than or equal to S1 and less than or equal to S2 the increase in width is a linear function of the point size. - The default scaling indicator is `z' for S1 and S2, `p' for N1 and + The default scaling indicator is 'z' for S1 and S2, 'p' for N1 and N2. Note that the track kerning amount is added even to the rightmost @@ -7769,15 +7554,14 @@ -- Escape: \/ Increase 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. For example, if an italic `f' - is immediately followed by a roman right parenthesis, then in many - fonts the top right portion of the `f' overlaps the top left of - the right parenthesis. Use this escape sequence whenever an - italic glyph is immediately followed by a roman glyph without any + following glyph is a roman glyph. For example, if an italic 'f' is + immediately followed by a roman right parenthesis, then in many + fonts the top right portion of the 'f' overlaps the top left of the + right parenthesis. Use this escape sequence whenever an italic + glyph is immediately followed by a roman glyph without any intervening space. This small amount of space is also called "italic correction". - -- Escape: \, Modify the spacing of the following glyph so that the spacing between that glyph and the preceding glyph is correct if the @@ -7787,7 +7571,6 @@ could be called "left italic correction", but this term isn't used widely. - -- Escape: \& Insert a zero-width character, which is invisible. Its intended use is to stop interaction of a character with its surrounding. @@ -7795,7 +7578,6 @@ * It prevents the insertion of extra space after an end-of-sentence character. - Test. Test. => Test. Test. @@ -7806,7 +7588,6 @@ * It prevents interpretation of a control character at the beginning of an input line. - .Test => warning: `Test' not defined \&.Test @@ -7815,17 +7596,16 @@ * It prevents kerning between two glyphs. * It is needed to map an arbitrary character to nothing in the - `tr' request (*note Character Translations::). + 'tr' request (*note Character Translations::). -- Escape: \) - This escape is similar to `\&' except that it behaves like a - character declared with the `cflags' request to be transparent for + This escape is similar to '\&' except that it behaves like a + character declared with the 'cflags' request to be transparent for the purposes of an end-of-sentence character. Its main usage is in macro definitions to protect against arguments starting with a control character. - .de xxx \)\\$1 .. @@ -7841,24 +7621,23 @@ This is a test. =>This is a test.' This is a test. -  File: groff.info, Node: Sizes, Next: Strings, Prev: Fonts and Symbols, Up: gtroff Reference 5.18 Sizes ========== -`gtroff' uses two dimensions with each line of text, type size and +'gtroff' uses two dimensions with each line of text, type size and vertical spacing. The "type size" is approximately the height of the -tallest glyph.(1) (*note Sizes-Footnote-1::) "Vertical spacing" is the -amount of space `gtroff' allows for a line of text; normally, this is +tallest glyph.(1) (*note Sizes-Footnote-1::) "Vertical spacing" is the +amount of space 'gtroff' allows for a line of text; normally, this is about 20% larger than the current type size. Ratios smaller than this can result in hard-to-read text; larger than this, it spreads the text -out more vertically (useful for term papers). By default, `gtroff' -uses 10 point type on 12 point spacing. +out more vertically (useful for term papers). By default, 'gtroff' uses +10 point type on 12 point spacing. The difference between type size and vertical spacing is known, by -typesetters, as "leading" (this is pronounced `ledding'). +typesetters, as "leading" (this is pronounced 'ledding'). * Menu: @@ -7870,10 +7649,10 @@ (1) This is usually the parenthesis. Note that in most cases the real dimensions of the glyphs in a font are _not_ related to its type -size! For example, the standard POSTSCRIPT font families `Times -Roman', `Helvetica', and `Courier' can't be used together at 10pt; to -get acceptable output, the size of `Helvetica' has to be reduced by one -point, and the size of `Courier' must be increased by one point. +size! For example, the standard POSTSCRIPT font families 'Times Roman', +'Helvetica', and 'Courier' can't be used together at 10pt; to get +acceptable output, the size of 'Helvetica' has to be reduced by one +point, and the size of 'Courier' must be increased by one point.  File: groff.info, Node: Changing Type Sizes, Next: Fractional Type Sizes, Prev: Sizes, Up: Sizes @@ -7886,22 +7665,22 @@ -- Request: .ps -size -- Escape: \ssize -- Register: \n[.s] - Use the `ps' request or the `\s' escape to change (increase, + Use the 'ps' request or the '\s' escape to change (increase, decrease) the type size (in points). Specify SIZE as either an - absolute point size, or as a relative change from the current - size. The size 0, or no argument, goes back to the previous size. + absolute point size, or as a relative change from the current size. + The size 0 (for both '.ps' and '\s'), or no argument (for '.ps' + only), goes back to the previous size. - Default scaling indicator of `size' is `z'. If `size' is zero or - negative, it is set to 1u. + Default scaling indicator of 'size' is 'z'. If 'size' is negative, + it is set to 1u. - The read-only number register `.s' returns the point size in points + The read-only number register '.s' returns the point size in points as a decimal fraction. This is a string. To get the point size in - scaled points, use the `.ps' register instead. + scaled points, use the '.ps' register instead. - `.s' is associated with the current environment (*note + '.s' is associated with the current environment (*note Environments::). - snap, snap, .ps +2 grin, grin, @@ -7909,53 +7688,52 @@ wink, wink, \s+2nudge, nudge,\s+8 say no more! .ps 10 - The `\s' escape may be called in a variety of ways. Much like + The '\s' escape may be called in a variety of ways. Much like other escapes there must be a way to determine where the argument ends and the text begins. Any of the following forms are valid: - `\sN' + '\sN' Set the point size to N points. N must be either 0 or in the range 4 to 39. - `\s+N' - `\s-N' + '\s+N' + '\s-N' Increase or decrease the point size by N points. N must be exactly one digit. - `\s(NN' + '\s(NN' Set the point size to NN points. NN must be exactly two digits. - `\s+(NN' - `\s-(NN' - `\s(+NN' - `\s(-NN' + '\s+(NN' + '\s-(NN' + '\s(+NN' + '\s(-NN' Increase or decrease the point size by NN points. NN must be exactly two digits. - Note that `\s' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\s' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the font on the fly: - .mc \s[20]x\s[0] *Note Fractional Type Sizes::, for yet another syntactical form of - using the `\s' escape. + using the '\s' escape. -- Request: .sizes s1 s2 ... sn [0] Some devices may only have certain permissible sizes, in which case - `gtroff' rounds to the nearest permissible size. The `DESC' file + 'gtroff' rounds to the nearest permissible size. The 'DESC' file specifies which sizes are permissible for the device. - Use the `sizes' request to change the permissible sizes for the + Use the 'sizes' request to change the permissible sizes for the current output device. Arguments are in scaled points; the - `sizescale' line in the `DESC' file for the output device provides + 'sizescale' line in the 'DESC' file for the output device provides the scaling factor. For example, if the scaling factor is 1000, then the value 12000 is 12 points. - Each argument can be a single point size (such as `12000'), or a - range of sizes (such as `4000-72000'). You can optionally end the + Each argument can be a single point size (such as '12000'), or a + range of sizes (such as '4000-72000'). You can optionally end the list with a zero. -- Request: .vs [space] @@ -7963,20 +7741,20 @@ -- Request: .vs -space -- Register: \n[.v] Change (increase, decrease) the vertical spacing by SPACE. The - default scaling indicator is `p'. + default scaling indicator is 'p'. - If `vs' is called without an argument, the vertical spacing is - reset to the previous value before the last call to `vs'. + If 'vs' is called without an argument, the vertical spacing is + reset to the previous value before the last call to 'vs'. - `gtroff' creates a warning of type `range' if SPACE is negative; + 'gtroff' creates a warning of type 'range' if SPACE is negative; the vertical spacing is then set to smallest positive value, the - vertical resolution (as given in the `.V' register). + vertical resolution (as given in the '.V' register). - Note that `.vs 0' isn't saved in a diversion since it doesn't + Note that '.vs 0' isn't saved in a diversion since it doesn't result in a vertical motion. You explicitly have to repeat this command before inserting the diversion. - The read-only number register `.v' contains the current vertical + The read-only number register '.v' contains the current vertical spacing; it is associated with the current environment (*note Environments::). @@ -7984,43 +7762,43 @@ Breaking a line causes the following actions (in the given order). * Move the current point vertically by the "extra pre-vertical line - space". This is the minimum value of all `\x' escapes with a + space". This is the minimum value of all '\x' escapes with a negative argument in the current output line. * Move the current point vertically by the vertical line spacing as - set with the `vs' request. + set with the 'vs' request. * Output the current line. * Move the current point vertically by the "extra post-vertical line - space". This is the maximum value of all `\x' escapes with a - positive argument in the line which has just been output. + space". This is the maximum value of all '\x' escapes with a + positive argument in the line that has just been output. * Move the current point vertically by the "post-vertical line - spacing" as set with the `pvs' request. + spacing" as set with the 'pvs' request. - It is usually better to use `vs' or `pvs' instead of `ls' to produce -double-spaced documents: `vs' and `pvs' have a finer granularity for -the inserted vertical space compared to `ls'; furthermore, certain + It is usually better to use 'vs' or 'pvs' instead of 'ls' to produce +double-spaced documents: 'vs' and 'pvs' have a finer granularity for the +inserted vertical space compared to 'ls'; furthermore, certain preprocessors assume single-spacing. - *Note Manipulating Spacing::, for more details on the `\x' escape -and the `ls' request. + *Note Manipulating Spacing::, for more details on the '\x' escape and +the 'ls' request. -- Request: .pvs [space] -- Request: .pvs +space -- Request: .pvs -space -- Register: \n[.pvs] Change (increase, decrease) the post-vertical spacing by SPACE. - The default scaling indicator is `p'. + The default scaling indicator is 'p'. - If `pvs' is called without an argument, the post-vertical spacing - is reset to the previous value before the last call to `pvs'. + If 'pvs' is called without an argument, the post-vertical spacing + is reset to the previous value before the last call to 'pvs'. - `gtroff' creates a warning of type `range' if SPACE is zero or + 'gtroff' creates a warning of type 'range' if SPACE is zero or negative; the vertical spacing is then set to zero. - The read-only number register `.pvs' contains the current + The read-only number register '.pvs' contains the current post-vertical spacing; it is associated with the current environment (*note Environments::). @@ -8031,75 +7809,75 @@ ---------------------------- A "scaled point" is equal to 1/SIZESCALE points, where SIZESCALE is -specified in the `DESC' file (1 by default). There is a new scale -indicator `z' which has the effect of multiplying by SIZESCALE. -Requests and escape sequences in `gtroff' interpret arguments that +specified in the 'DESC' file (1 by default). There is a new scale +indicator 'z', which has the effect of multiplying by SIZESCALE. +Requests and escape sequences in 'gtroff' 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 `z'. -Arguments treated in this way are the argument to the `ps' request, the -third argument to the `cs' request, the second and fourth arguments to -the `tkf' request, the argument to the `\H' escape sequence, and those -variants of the `\s' escape sequence that take a numeric expression as +evaluate each such argument using a default scale indicator of 'z'. +Arguments treated in this way are the argument to the 'ps' request, the +third argument to the 'cs' request, the second and fourth arguments to +the 'tkf' request, the argument to the '\H' escape sequence, and those +variants of the '\s' escape sequence that take a numeric expression as their argument (see below). For example, suppose SIZESCALE is 1000; then a scaled point is -equivalent to a millipoint; the request `.ps 10.25' is equivalent to -`.ps 10.25z' and thus sets the point size to 10250 scaled points, which +equivalent to a millipoint; the request '.ps 10.25' is equivalent to +'.ps 10.25z' and thus sets the point size to 10250 scaled points, which is equal to 10.25 points. - `gtroff' disallows the use of the `z' scale indicator in instances -where it would make no sense, such as a numeric expression whose -default scale indicator was neither `u' nor `z'. Similarly it would -make no sense to use a scaling indicator other than `z' or `u' in a -numeric expression whose default scale indicator was `z', and so -`gtroff' disallows this as well. - - There is also new scale indicator `s' which multiplies by the number -of units in a scaled point. So, for example, `\n[.ps]s' is equal to -`1m'. Be sure not to confuse the `s' and `z' scale indicators. + 'gtroff' disallows the use of the 'z' scale indicator in instances +where it would make no sense, such as a numeric expression whose default +scale indicator was neither 'u' nor 'z'. Similarly it would make no +sense to use a scaling indicator other than 'z' or 'u' in a numeric +expression whose default scale indicator was 'z', and so 'gtroff' +disallows this as well. + + There is also new scale indicator 's', which multiplies by the number +of units in a scaled point. So, for example, '\n[.ps]s' is equal to +'1m'. Be sure not to confuse the 's' and 'z' scale indicators. -- Register: \n[.ps] A read-only number register returning the point size in scaled points. - `.ps' is associated with the current environment (*note + '.ps' is associated with the current environment (*note Environments::). -- Register: \n[.psr] -- Register: \n[.sr] The last-requested point size in scaled points is contained in the - `.psr' read-only number register. The last requested point size in - points as a decimal fraction can be found in `.sr'. This is a + '.psr' read-only number register. The last requested point size in + points as a decimal fraction can be found in '.sr'. This is a string-valued read-only number register. - Note that the requested point sizes are device-independent, - whereas the values returned by the `.ps' and `.s' registers are - not. For example, if a point size of 11pt is requested, and a - `sizes' request (or a `sizescale' line in a `DESC' file) specifies - 10.95pt instead, this value is actually used. + Note that the requested point sizes are device-independent, whereas + the values returned by the '.ps' and '.s' registers are not. For + example, if a point size of 11pt is requested, and a 'sizes' + request (or a 'sizescale' line in a 'DESC' file) specifies 10.95pt + instead, this value is actually used. Both registers are associated with the current environment (*note Environments::). - The `\s' escape has the following syntax for working with fractional + The '\s' escape has the following syntax for working with fractional type sizes: -`\s[N]' -`\s'N'' +'\s[N]' +'\s'N'' Set the point size to N scaled points; N is a numeric expression - with a default scale indicator of `z'. + with a default scale indicator of 'z'. -`\s[+N]' -`\s[-N]' -`\s+[N]' -`\s-[N]' -`\s'+N'' -`\s'-N'' -`\s+'N'' -`\s-'N'' +'\s[+N]' +'\s[-N]' +'\s+[N]' +'\s-[N]' +'\s'+N'' +'\s'-N'' +'\s+'N'' +'\s-'N'' Increase or or decrease the point size by N scaled points; N is a numeric expression (which may start with a minus sign) with a - default scale indicator of `z'. + default scale indicator of 'z'. *Note Font Files::. @@ -8109,13 +7887,13 @@ 5.19 Strings ============ -`gtroff' has string variables, which are entirely for user convenience -(i.e. there are no built-in strings exept `.T', but even this is a +'gtroff' has string variables, which are entirely for user convenience +(i.e. there are no built-in strings exept '.T', but even this is a read-write string variable). - Although the following requests can be used to create strings, -simply using an undefined string will cause it to be defined as empty. -*Note Identifiers::. + Although the following requests can be used to create strings, simply +using an undefined string will cause it to be defined as empty. *Note +Identifiers::. -- Request: .ds name [string] -- Request: .ds1 name [string] @@ -8123,50 +7901,46 @@ -- Escape: \*(nm -- Escape: \*[name arg1 arg2 ...] Define and access a string variable NAME (one-character name N, - two-character name NM). If NAME already exists, `ds' overwrites + two-character name NM). If NAME already exists, 'ds' overwrites the previous definition. Only the syntax form using brackets can - take arguments which are handled identically to macro arguments; - the single exception is that a closing bracket as an argument must - be enclosed in double quotes. *Note Request and Macro - Arguments::, and *note Parameters::. + take arguments that are handled identically to macro arguments; the + single exception is that a closing bracket as an argument must be + enclosed in double quotes. *Note Request and Macro Arguments::, + and *note Parameters::. Example: - .ds foo a \\$1 test . This is \*[foo nice]. => This is a nice test. - The `\*' escape "interpolates" (expands in-place) a + The '\*' escape "interpolates" (expands in-place) a previously-defined string variable. To be more precise, the stored - string is pushed onto the input stack which is then parsed by - `gtroff'. Similar to number registers, it is possible to nest + string is pushed onto the input stack, which is then parsed by + 'gtroff'. Similar to number registers, it is possible to nest strings, i.e., string variables can be called within string variables. - If the string named by the `\*' escape does not exist, it is - defined as empty, and a warning of type `mac' is emitted (see - *note Debugging::, for more details). + If the string named by the '\*' escape does not exist, it is + defined as empty, and a warning of type 'mac' is emitted (see *note + Debugging::, for more details). - *Caution:* Unlike other requests, the second argument to the `ds' + *Caution:* Unlike other requests, the second argument to the 'ds' request takes up the entire line including trailing spaces. This means that comments on a line with such a request can introduce unwanted space into a string. - .ds UX \s-1UNIX\s0\u\s-3tm\s0\d \" UNIX trademark Instead the comment should be put on another line or have the comment escape adjacent with the end of the string. - .ds UX \s-1UNIX\s0\u\s-3tm\s0\d\" UNIX trademark To produce leading space the string can be started with a double - quote. No trailing quote is needed; in fact, any trailing quote - is included in your string. - + quote. No trailing quote is needed; in fact, any trailing quote is + included in your string. .ds sign " Yours in a white wine sauce, @@ -8174,7 +7948,6 @@ span several lines by escaping the newlines with a backslash. The resulting string is stored _without_ the newlines. - .ds foo lots and lots \ of text are on these \ next several lines @@ -8183,12 +7956,11 @@ single double quote character into a string, use two consecutive double quote characters. - The `ds1' request turns off compatibility mode while interpreting a + The 'ds1' request turns off compatibility mode while interpreting a string. To be more precise, a "compatibility save" input token is inserted at the beginning of the string, and a "compatibility restore" input token at the end. - .nr xxx 12345 .ds aa The value of xxx is \\n[xxx]. .ds1 bb The value of xxx ix \\n[xxx]. @@ -8206,7 +7978,6 @@ This has some interesting consequences. For example, it is possible to call a macro with string syntax and vice versa. - .de xxx a funny test. .. @@ -8221,23 +7992,20 @@ In particular, interpolating a string does not hide existing macro arguments. Thus in a macro, a more efficient way of doing - .xx \\$@ is - \\*[xx]\\ Note that the latter calling syntax doesn't change the value of - `\$0', which is then inherited from the calling macro. + '\$0', which is then inherited from the calling macro. Diversions and boxes can be also called with string syntax. Another consequence is that you can copy one-line diversions or boxes to a string. - .di xxx a \fItest\fR .br @@ -8247,13 +8015,12 @@ => This is a test. As the previous example shows, it is possible to store formatted - output in strings. The `\c' escape prevents the insertion of an + output in strings. The '\c' escape prevents the insertion of an additional blank line in the output. Copying diversions longer than a single output line produces unexpected results. - .di xxx a funny .br @@ -8266,15 +8033,14 @@ Usually, it is not predictable whether a diversion contains one or more output lines, so this mechanism should be avoided. With UNIX - `troff', this was the only solution to strip off a final newline + 'troff', this was the only solution to strip off a final newline from a diversion. Another disadvantage is that the spaces in the copied string are already formatted, making them unstretchable. This can cause ugly results. - A clean solution to this problem is available in GNU `troff', using - the requests `chop' to remove the final newline of a diversion, and - `unformat' to make the horizontal spaces stretchable again. - + A clean solution to this problem is available in GNU 'troff', using + the requests 'chop' to remove the final newline of a diversion, and + 'unformat' to make the horizontal spaces stretchable again. .box xxx a funny @@ -8291,14 +8057,13 @@ -- Request: .as name [string] -- Request: .as1 name [string] - The `as' request is similar to `ds' but appends STRING to the + The 'as' request is similar to 'ds' but appends STRING to the string stored as NAME instead of redefining it. If NAME doesn't exist yet, it is created. - .as sign " with shallots, onions and garlic, - The `as1' request is similar to `as', but compatibility mode is + The 'as1' request is similar to 'as', but compatibility mode is switched off while the appended string is interpreted. To be more precise, a "compatibility save" input token is inserted at the beginning of the appended string, and a "compatibility restore" @@ -8310,36 +8075,35 @@ -- Request: .substring str n1 [n2] Replace the string named STR with the substring defined by the indices N1 and N2. The first character in the string has index 0. - If N2 is omitted, it is taken to be equal to the string's length. - If the index value N1 or N2 is negative, it is counted from the - end of the string, going backwards: The last character has - index -1, the character before the last character has index -2, - etc. - + If N2 is omitted, it is implicitly set to the largest valid value + (the string length minus one). If the index value N1 or N2 is + negative, it is counted from the end of the string, going + backwards: The last character has index -1, the character before + the last character has index -2, etc. .ds xxx abcdefgh .substring xxx 1 -4 \*[xxx] => bcde - + .substring xxx 2 + \*[xxx] + => de -- Request: .length reg str - Compute the number of characters of STR and return it in the - number register REG. If REG doesn't exist, it is created. `str' - is read in copy mode. - + Compute the number of characters of STR and return it in the number + register REG. If REG doesn't exist, it is created. 'str' is read + in copy mode. .ds xxx abcd\h'3i'efgh .length yyy \*[xxx] \n[yyy] => 14 - -- Request: .rn xx yy Rename the request, macro, diversion, or string XX to YY. -- Request: .rm xx - Remove the request, macro, diversion, or string XX. `gtroff' + Remove the request, macro, diversion, or string XX. 'gtroff' treats subsequent invocations as if the object had never been defined. @@ -8347,20 +8111,19 @@ Create an alias named NEW for the request, string, macro, or diversion object named OLD. The new name and the old name are exactly equivalent (it is similar to a hard rather than a soft - link). If OLD is undefined, `gtroff' generates a warning of type - `mac' and ignores the request. + link). If OLD is undefined, 'gtroff' generates a warning of type + 'mac' and ignores the request. - To understand how the `als' request works it is probably best to + To understand how the 'als' request works it is probably best to think of two different pools: one pool for objects (macros, - strings, etc.), and another one for names. As soon as an object - is defined, `gtroff' adds it to the object pool, adds its name to - the name pool, and creates a link between them. When `als' - creates an alias, it adds a new name to the name pool which gets - linked to the same object as the old name. + strings, etc.), and another one for names. As soon as an object is + defined, 'gtroff' adds it to the object pool, adds its name to the + name pool, and creates a link between them. When 'als' creates an + alias, it adds a new name to the name pool that gets linked to the + same object as the old name. Now consider this example. - .de foo .. . @@ -8373,21 +8136,21 @@ .bar => input stack limit exceeded - The definition of macro `bar' replaces the old object this name is - linked to. However, the alias to `foo' is still active! In other - words, `foo' is still linked to the same object as `bar', and the - result of calling `bar' is an infinite, recursive loop which - finally leads to an error. + The definition of macro 'bar' replaces the old object this name is + linked to. However, the alias to 'foo' is still active! In other + words, 'foo' is still linked to the same object as 'bar', and the + result of calling 'bar' is an infinite, recursive loop that finally + leads to an error. - To undo an alias, simply call `rm' on the aliased name. The object + To undo an alias, simply call 'rm' on the aliased name. The object itself is not destroyed until there are no more aliases. -- Request: .chop xx Remove (chop) the last character from the macro, string, or diversion named XX. This is useful for removing the newline from - the end of diversions that are to be interpolated as strings. - This command can be used repeatedly; see *note Gtroff Internals::, - for details on nodes inserted additionally by `gtroff'. + the end of diversions that are to be interpolated as strings. This + command can be used repeatedly; see *note Gtroff Internals::, for + details on nodes inserted additionally by 'gtroff'. *Note Identifiers::, and *note Comments::. @@ -8409,33 +8172,32 @@ 5.20.1 Operators in Conditionals -------------------------------- -In `if', `ie', and `while' requests, in addition to ordinary *note +In 'if', 'ie', and 'while' requests, in addition to ordinary *note Expressions::, there are several more operators available: -`e' -`o' +'e' +'o' True if the current page is even or odd numbered (respectively). -`n' +'n' True if the document is being processed in nroff mode (i.e., the - `.nroff' command has been issued). *Note Troff and Nroff Mode::. + '.nroff' command has been issued). *Note Troff and Nroff Mode::. -`t' +'t' True if the document is being processed in troff mode (i.e., the - `.troff' command has been issued). *Note Troff and Nroff Mode::. + '.troff' command has been issued). *Note Troff and Nroff Mode::. -`v' +'v' Always false. This condition is for compatibility with other - `troff' versions only (identifying a `-Tversatec' device). + 'troff' versions only (identifying a '-Tversatec' device). -`'XXX'YYY'' +''XXX'YYY'' True if the output produced by XXX is equal to the output produced by YYY. Other characters can be used in place of the single - quotes; the same set of delimiters as for the `\D' escape is used - (*note Escapes::). `gtroff' formats XXX and YYY in separate + quotes; the same set of delimiters as for the '\D' escape is used + (*note Escapes::). 'gtroff' formats XXX and YYY in separate environments; after the comparison the resulting data is discarded. - .ie "|"\fR|\fP" \ true .el \ @@ -8445,14 +8207,13 @@ The resulting motions, glyph sizes, and fonts have to match,(1) (*note Operators in Conditionals-Footnote-1::) and not the individual motion, size, and font requests. In the previous - example, `|' and `\fR|\fP' both result in a roman `|' glyph with + example, '|' and '\fR|\fP' both result in a roman '|' glyph with the same point size and at the same location on the page, so the - strings are equal. If `.ft I' had been added before the `.ie', - the result would be "false" because (the first) `|' produces an - italic `|' rather than a roman one. - - To compare strings without processing, surround the data with `\?'. + strings are equal. If '.ft I' had been added before the '.ie', the + result would be "false" because (the first) '|' produces an italic + '|' rather than a roman one. + To compare strings without processing, surround the data with '\?'. .ie "\?|\?"\?\fR|\fP\?" \ true @@ -8460,10 +8221,9 @@ false => false - Since data protected with `\?' is read in copy-in mode it is even + Since data protected with '\?' is read in copy-in mode it is even possible to use incomplete input without causing an error. - .ds a \[ .ds b \[ .ie '\?\*a\?'\?\*b\?' \ @@ -8472,38 +8232,37 @@ false => true -`r XXX' +'r XXX' True if there is a number register named XXX. -`d XXX' +'d XXX' True if there is a string, macro, diversion, or request named XXX. -`m XXX' +'m XXX' True if there is a color named XXX. -`c G' +'c G' True if there is a glyph G available(2) (*note Operators in Conditionals-Footnote-2::); G is either an ASCII character or a - special character (`\N'XXX'', `\(GG' or `\[GGG]'); the condition - is also true if G has been defined by the `char' request. + special character ('\N'XXX'', '\(GG' or '\[GGG]'); the condition is + also true if G has been defined by the 'char' request. -`F FONT' +'F FONT' True if a font named FONT exists. FONT is handled as if it was - opened with the `ft' request (this is, font translation and styles + opened with the 'ft' request (this is, font translation and styles are applied), without actually mounting it. This test doesn't load the complete font but only its header to verify its validity. -`S STYLE' +'S STYLE' True if style STYLE has been registered. Font translation is applied. Note that these operators can't be combined with other operators like -`:' or `&'; only a leading `!' (without whitespace between the +':' or '&'; only a leading '!' (without whitespace between the exclamation mark and the operator) can be used to negate the result. - .nr xxx 1 .ie !r xxx \ true @@ -8511,9 +8270,8 @@ false => false - A whitespace after `!' always evaluates to zero (this bizarre -behaviour is due to compatibility with UNIX `troff'). - + A whitespace after '!' always evaluates to zero (this bizarre +behaviour is due to compatibility with UNIX 'troff'). .nr xxx 1 .ie ! r xxx \ @@ -8522,8 +8280,8 @@ false => r xxx true - It is possible to omit the whitespace before the argument to the -`r', `d', and `c' operators. + It is possible to omit the whitespace before the argument to the 'r', +'d', and 'c' operators. *Note Expressions::. @@ -8542,54 +8300,47 @@ 5.20.2 if-else -------------- -`gtroff' has if-then-else constructs like other languages, although the +'gtroff' has if-then-else constructs like other languages, although the formatting can be painful. -- Request: .if expr anything - Evaluate the expression EXPR, and executes ANYTHING (the remainder - of the line) if EXPR evaluates to a value greater than zero - (true). ANYTHING is interpreted as though it was on a line by - itself (except that leading spaces are swallowed). *Note - Operators in Conditionals::, for more info. + Evaluate the expression EXPR, and executes ANYTHING (the remainder + of the line) if EXPR evaluates to a value greater than zero (true). + ANYTHING is interpreted as though it was on a line by itself + (except that leading spaces are swallowed). *Note Operators in + Conditionals::, for more info. .nr xxx 1 .nr yyy 2 .if ((\n[xxx] == 1) & (\n[yyy] == 2)) true => true - -- Request: .nop anything - Executes ANYTHING. This is similar to `.if 1'. + Executes ANYTHING. This is similar to '.if 1'. -- Request: .ie expr anything -- Request: .el anything - Use the `ie' and `el' requests to write an if-then-else. The - first request is the `if' part and the latter is the `else' part. - + Use the 'ie' and 'el' requests to write an if-then-else. The first + request is the 'if' part and the latter is the 'else' part. .ie n .ls 2 \" double-spacing in nroff .el .ls 1 \" single-spacing in troff - -- Escape: \{ -- Escape: \} In many cases, an if (or if-else) construct needs to execute more - than one request. This can be done using the `\{' and `\}' - escapes. The following example shows the possible ways to use - these escapes (note the position of the opening and closing - braces). - + than one request. This can be done using the escapes '\{' (which + must start the first line) and '\}' (which must end the last line). .ie t \{\ . ds lq `` . ds rq '' .\} - .el \ - .\{\ - . ds lq " - . ds rq "\} - + .el \{\ + . ds lq "" + . ds rq "" + .\} *Note Expressions::. @@ -8599,14 +8350,13 @@ 5.20.3 while ------------ -`gtroff' provides a looping construct using the `while' request, which -is used much like the `if' (and related) requests. +'gtroff' provides a looping construct using the 'while' request, which +is used much like the 'if' (and related) requests. -- Request: .while expr anything Evaluate the expression EXPR, and repeatedly execute ANYTHING (the remainder of the line) until EXPR evaluates to 0. - .nr a 0 1 .while (\na < 9) \{\ \n+a, @@ -8616,15 +8366,14 @@ Some remarks. - * The body of a `while' request is treated like the body of a - `de' request: `gtroff' temporarily stores it in a macro which + * The body of a 'while' request is treated like the body of a + 'de' request: 'gtroff' temporarily stores it in a macro that is deleted after the loop has been exited. It can - considerably slow down a macro if the body of the `while' + considerably slow down a macro if the body of the 'while' request (within the macro) is large. Each time the macro is - executed, the `while' body is parsed and stored again as a + executed, the 'while' body is parsed and stored again as a temporary macro. - .de xxx . nr num 10 . while (\\n[num] > 0) \{\ @@ -8633,10 +8382,9 @@ . \} .. - The traditional and ofter better solution (UNIX `troff' - doesn't have the `while' request) is to use a recursive macro - instead which is parsed only once during its definition. - + The traditional and ofter better solution (UNIX 'troff' + doesn't have the 'while' request) is to use a recursive macro + instead that is parsed only once during its definition. .de yyy . if (\\n[num] > 0) \{\ @@ -8652,10 +8400,9 @@ .. Note that the number of available recursion levels is set - to 1000 (this is a compile-time constant value of `gtroff'). - - * The closing brace of a `while' body must end a line. + to 1000 (this is a compile-time constant value of 'gtroff'). + * The closing brace of a 'while' body must end a line. .if 1 \{\ . nr a 0 1 @@ -8664,19 +8411,186 @@ .\}\} => unbalanced \{ \} - -- Request: .break - Break out of a `while' loop. Be sure not to confuse this with the - `br' request (causing a line break). + Break out of a 'while' loop. Be sure not to confuse this with the + 'br' request (causing a line break). -- Request: .continue - Finish the current iteration of a `while' loop, immediately + Finish the current iteration of a 'while' loop, immediately restarting the next iteration. *Note Expressions::. + +File: groff.info, Node: Writing Macros, Next: Page Motions, Prev: Conditionals and Loops, Up: gtroff Reference + +5.21 Writing Macros +=================== + +A "macro" is a collection of text and embedded commands that can be +invoked multiple times. Use macros to define common operations. *Note +Strings::, for a (limited) alternative syntax to call macros. + + Although the following requests can be used to create macros, simply +using an undefined macro will cause it to be defined as empty. *Note +Identifiers::. + + -- Request: .de name [end] + -- Request: .de1 name [end] + -- Request: .dei name [end] + -- Request: .dei1 name [end] + Define a new macro named NAME. 'gtroff' copies subsequent lines + (starting with the next one) into an internal buffer until it + encounters the line '..' (two dots). If the optional second + argument to 'de' is present it is used as the macro closure request + instead of '..'. + + There can be whitespace after the first dot in the line containing + the ending token (either '.' or macro 'END'). Don't insert a tab + character immediately after the '..', otherwise it isn't recognized + as the end-of-macro symbol.(1) (*note Writing Macros-Footnote-1::) + + Here a small example macro called 'P' that causes a break and + inserts some vertical space. It could be used to separate + paragraphs. + + .de P + . br + . sp .8v + .. + + The following example defines a macro within another. Remember + that expansion must be protected twice; once for reading the macro + and once for executing. + + \# a dummy macro to avoid a warning + .de end + .. + . + .de foo + . de bar end + . nop \f[B]Hallo \\\\$1!\f[] + . end + .. + . + .foo + .bar Joe + => Hallo Joe! + + Since '\f' has no expansion, it isn't necessary to protect its + backslash. Had we defined another macro within 'bar' that takes a + parameter, eight backslashes would be necessary before '$1'. + + The 'de1' request turns off compatibility mode while executing the + macro. On entry, the current compatibility mode is saved and + restored at exit. + + .nr xxx 12345 + . + .de aa + The value of xxx is \\n[xxx]. + .. + .de1 bb + The value of xxx ix \\n[xxx]. + .. + . + .cp 1 + . + .aa + => warning: number register `[' not defined + => The value of xxx is 0xxx]. + .bb + => The value of xxx ix 12345. + + The 'dei' request defines a macro indirectly. That is, it expands + strings whose names are NAME or END before performing the append. + + This: + + .ds xx aa + .ds yy bb + .dei xx yy + + is equivalent to: + + .de aa bb + + The 'dei1' request is similar to 'dei' but with compatibility mode + switched off during execution of the defined macro. + + If compatibility mode is on, 'de' (and 'dei') behave similar to + 'de1' (and 'dei1'): A 'compatibility save' token is inserted at the + beginning, and a 'compatibility restore' token at the end, with + compatibility mode switched on during execution. *Note Gtroff + Internals::, for more information on switching compatibility mode + on and off in a single document. + + Using 'trace.tmac', you can trace calls to 'de' and 'de1'. + + Note that macro identifiers are shared with identifiers for strings + and diversions. + + *Note the description of the 'als' request: als, for possible + pitfalls if redefining a macro that has been aliased. + + -- Request: .am name [end] + -- Request: .am1 name [end] + -- Request: .ami name [end] + -- Request: .ami1 name [end] + Works similarly to 'de' except it appends onto the macro named + NAME. So, to make the previously defined 'P' macro actually do + indented instead of block paragraphs, add the necessary code to the + existing macro like this: + + .am P + .ti +5n + .. + + The 'am1' request turns off compatibility mode while executing the + appended macro piece. To be more precise, a "compatibility save" + input token is inserted at the beginning of the appended code, and + a "compatibility restore" input token at the end. + + The 'ami' request appends indirectly, meaning that 'gtroff' expands + strings whose names are NAME or END before performing the append. + + The 'ami1' request is similar to 'ami' but compatibility mode is + switched off during execution of the defined macro. + + Using 'trace.tmac', you can trace calls to 'am' and 'am1'. + + *Note Strings::, for the 'als' and 'rn' request to create an alias +and rename a macro, respectively. + + The 'de', 'am', 'di', 'da', 'ds', and 'as' requests (together with +its variants) only create a new object if the name of the macro, +diversion or string diversion is currently undefined or if it is defined +to be a request; normally they modify the value of an existing object. + + -- Request: .return [anything] + Exit a macro, immediately returning to the caller. + + If called with an argument, exit twice, namely the current macro + and the macro one level higher. This is used to define a wrapper + macro for 'return' in 'trace.tmac'. + +* Menu: + +* Copy-in Mode:: +* Parameters::  -Local Variables: -coding: iso-8859-1 -End: +File: groff.info, Node: Writing Macros-Footnotes, Up: Writing Macros + + (1) While it is possible to define and call a macro '.' with + + .de . + . tm foo + .. + . + .. \" This calls macro `.'! + +you can't use this as the end-of-macro macro: during a macro definition, +'..' is never handled as a call to '.', even if you say '.de foo .' +explicitly. + diff -ruN groff-1.22.2/doc/groff.info-2 groff-1.22.3/doc/groff.info-2 --- groff-1.22.2/doc/groff.info-2 2013-02-07 13:06:21.000000000 +0100 +++ groff-1.22.3/doc/groff.info-2 2014-11-04 09:39:07.761117246 +0100 @@ -1,231 +1,46 @@ -This is groff.info, produced by makeinfo version 4.13 from -./groff.texinfo. +This is groff.info, produced by makeinfo version 5.2dev from +groff.texinfo. -This manual documents GNU `troff' version 1.22.2. +This manual documents GNU 'troff' version 1.22.3. - Copyright (C) 1994-2013 Free Software Foundation, Inc. + Copyright © 1994-2014 Free Software Foundation, Inc. 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 no Invariant Sections, with the Front-Cover texts - being `A GNU Manual," and with the Back-Cover Texts as in (a) + being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled - `GNU Free Documentation License." + "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom." - INFO-DIR-SECTION Typesetting START-INFO-DIR-ENTRY * Groff: (groff). The GNU troff document formatting system. END-INFO-DIR-ENTRY  -File: groff.info, Node: Writing Macros, Next: Page Motions, Prev: Conditionals and Loops, Up: gtroff Reference - -5.21 Writing Macros -=================== - -A "macro" is a collection of text and embedded commands which can be -invoked multiple times. Use macros to define common operations. *Note -Strings::, for a (limited) alternative syntax to call macros. - - Although the following requests can be used to create macros, simply -using an undefined macro will cause it to be defined as empty. *Note -Identifiers::. - - -- Request: .de name [end] - -- Request: .de1 name [end] - -- Request: .dei name [end] - -- Request: .dei1 name [end] - Define a new macro named NAME. `gtroff' copies subsequent lines - (starting with the next one) into an internal buffer until it - encounters the line `..' (two dots). If the optional second - argument to `de' is present it is used as the macro closure - request instead of `..'. - - There can be whitespace after the first dot in the line containing - the ending token (either `.' or macro `END'). Don't insert a tab - character immediately after the `..', otherwise it isn't - recognized as the end-of-macro symbol.(1) (*note Writing - Macros-Footnote-1::) - - Here a small example macro called `P' which causes a break and - inserts some vertical space. It could be used to separate - paragraphs. - - - .de P - . br - . sp .8v - .. - - The following example defines a macro within another. Remember - that expansion must be protected twice; once for reading the macro - and once for executing. - - - \# a dummy macro to avoid a warning - .de end - .. - . - .de foo - . de bar end - . nop \f[B]Hallo \\\\$1!\f[] - . end - .. - . - .foo - .bar Joe - => Hallo Joe! - - Since `\f' has no expansion, it isn't necessary to protect its - backslash. Had we defined another macro within `bar' which takes a - parameter, eight backslashes would be necessary before `$1'. - - The `de1' request turns off compatibility mode while executing the - macro. On entry, the current compatibility mode is saved and - restored at exit. - - - .nr xxx 12345 - . - .de aa - The value of xxx is \\n[xxx]. - .. - .de1 bb - The value of xxx ix \\n[xxx]. - .. - . - .cp 1 - . - .aa - => warning: number register `[' not defined - => The value of xxx is 0xxx]. - .bb - => The value of xxx ix 12345. - - The `dei' request defines a macro indirectly. That is, it expands - strings whose names are NAME or END before performing the append. - - This: - - - .ds xx aa - .ds yy bb - .dei xx yy - - is equivalent to: - - - .de aa bb - - The `dei1' request is similar to `dei' but with compatibility mode - switched off during execution of the defined macro. - - If compatibility mode is on, `de' (and `dei') behave similar to - `de1' (and `dei1'): A `compatibility save' token is inserted at - the beginning, and a `compatibility restore' token at the end, - with compatibility mode switched on during execution. *Note - Gtroff Internals::, for more information on switching - compatibility mode on and off in a single document. - - Using `trace.tmac', you can trace calls to `de' and `de1'. - - Note that macro identifiers are shared with identifiers for - strings and diversions. - - *Note the description of the `als' request: als, for possible - pitfalls if redefining a macro which has been aliased. - - -- Request: .am name [end] - -- Request: .am1 name [end] - -- Request: .ami name [end] - -- Request: .ami1 name [end] - Works similarly to `de' except it appends onto the macro named - NAME. So, to make the previously defined `P' macro actually do - indented instead of block paragraphs, add the necessary code to the - existing macro like this: - - - .am P - .ti +5n - .. - - The `am1' request turns off compatibility mode while executing the - appended macro piece. To be more precise, a "compatibility save" - input token is inserted at the beginning of the appended code, and - a "compatibility restore" input token at the end. - - The `ami' request appends indirectly, meaning that `gtroff' - expands strings whose names are NAME or END before performing the - append. - - The `ami1' request is similar to `ami' but compatibility mode is - switched off during execution of the defined macro. - - Using `trace.tmac', you can trace calls to `am' and `am1'. - - *Note Strings::, for the `als' and `rn' request to create an alias -and rename a macro, respectively. - - The `de', `am', `di', `da', `ds', and `as' requests (together with -its variants) only create a new object if the name of the macro, -diversion or string diversion is currently undefined or if it is -defined to be a request; normally they modify the value of an existing -object. - - -- Request: .return [anything] - Exit a macro, immediately returning to the caller. - - If called with an argument, exit twice, namely the current macro - and the macro one level higher. This is used to define a wrapper - macro for `return' in `trace.tmac'. - -* Menu: - -* Copy-in Mode:: -* Parameters:: - - -File: groff.info, Node: Writing Macros-Footnotes, Up: Writing Macros - - (1) While it is possible to define and call a macro `.' with - - - .de . - . tm foo - .. - . - .. \" This calls macro `.'! - -you can't use this as the end-of-macro macro: during a macro definition, -`..' is never handled as a call to `.', even if you say `.de foo .' -explicitly. - - File: groff.info, Node: Copy-in Mode, Next: Parameters, Prev: Writing Macros, Up: Writing Macros 5.21.1 Copy-in Mode ------------------- -When `gtroff' reads in the text for a macro, string, or diversion, it -copies the text (including request lines, but excluding escapes) into -an internal buffer. Escapes are converted into an internal form, except -for `\n', `\$', `\*', `\\' and `\' which are evaluated and +When 'gtroff' reads in the text for a macro, string, or diversion, it +copies the text (including request lines, but excluding escapes) into an +internal buffer. Escapes are converted into an internal form, except +for '\n', '\$', '\*', '\\' and '\', which are evaluated and inserted into the text where the escape was located. This is known as "copy-in" mode or "copy" mode. What this means is that you can specify when these escapes are to be evaluated (either at copy-in time or at the time of use) by insulating -the escapes with an extra backslash. Compare this to the `\def' and -`\edef' commands in TeX. +the escapes with an extra backslash. Compare this to the '\def' and +'\edef' commands in TeX. The following example prints the numbers 20 and 10: - .nr x 20 .de y .nr x 10 @@ -247,7 +62,7 @@ The number of arguments passed to a macro or string. This is a read-only number register. - Note that the `shift' request can change its value. + Note that the 'shift' request can change its value. Any individual argument can be retrieved with one of the following escapes: @@ -255,8 +70,8 @@ -- Escape: \$n -- Escape: \$(nn -- Escape: \$[nnn] - Retrieve the Nth, NNth or NNNth argument. As usual, the first - form only accepts a single number (larger than zero), the second a + Retrieve the Nth, NNth or NNNth argument. As usual, the first form + only accepts a single number (larger than zero), the second a two-digit number (larger or equal to 10), and the third any positive integer value (larger than zero). Macros and strings can have an unlimited number of arguments. Note that due to copy-in @@ -269,22 +84,21 @@ argument I-N; arguments 1 to N are no longer available. Shifting by negative amounts is currently undefined. - The register `.$' is adjusted accordingly. + The register '.$' is adjusted accordingly. -- Escape: \$* -- Escape: \$@ In some cases it is convenient to use all of the arguments at once (for example, to pass the arguments along to another macro). The - `\$*' escape concatenates all the arguments separated by spaces. - A similar escape is `\$@', which concatenates all the arguments - with each surrounded by double quotes, and separated by spaces. - If not in compatibility mode, the input level of double quotes is + '\$*' escape concatenates all the arguments separated by spaces. A + similar escape is '\$@', which concatenates all the arguments with + each surrounded by double quotes, and separated by spaces. If not + in compatibility mode, the input level of double quotes is preserved (see *note Request and Macro Arguments::). -- Escape: \$^ Handle the parameters of a macro as if they were an argument to the - `ds' or similar requests. - + 'ds' or similar requests. .de foo . tm $1=`\\$1' @@ -300,24 +114,21 @@ => $@=`" This is a " "test""' => $^=`" This is a "test"' - This escape is useful mainly for macro packages like `trace.tmac' + This escape is useful mainly for macro packages like 'trace.tmac', which redefines some requests and macros for debugging purposes. -- Escape: \$0 - The name used to invoke the current macro. The `als' request can + The name used to invoke the current macro. The 'als' request can make a macro have more than one name. If a macro is called as a string (within another macro), the value - of `\$0' isn't changed. - + of '\$0' isn't changed. .de foo . tm \\$0 .. .als foo bar . - - .de aaa . foo .. @@ -331,8 +142,6 @@ \\*[bar]\\ .. . - - .aaa => foo .bbb @@ -342,7 +151,6 @@ .ddd => ddd - *Note Request and Macro Arguments::.  @@ -352,32 +160,29 @@ ================= *Note Manipulating Spacing::, for a discussion of the main request for -vertical motion, `sp'. +vertical motion, 'sp'. -- Request: .mk [reg] -- Request: .rt [dist] - The request `mk' can be used to mark a location on a page, for + The request 'mk' can be used to mark a location on a page, for movement to later. This request takes a register name as an argument in which to store the current page location. With no argument it stores the location in an internal register. The - results of this can be used later by the `rt' or the `sp' request - (or the `\v' escape). + results of this can be used later by the 'rt' or the 'sp' request + (or the '\v' escape). - The `rt' request returns _upwards_ to the location marked with the - last `mk' request. If used with an argument, return to a position + The 'rt' request returns _upwards_ to the location marked with the + last 'mk' request. If used with an argument, return to a position which distance from the top of the page is DIST (no previous call - to `mk' is necessary in this case). Default scaling indicator is - `v'. + to 'mk' is necessary in this case). Default scaling indicator is + 'v'. Here a primitive solution for a two-column macro. - .nr column-length 1.5i .nr column-gap 4m .nr bottom-margin 1m . - - .de 2c . br . mk @@ -386,8 +191,6 @@ . nr right-side 0 .. . - - .de 2c-trap . ie \\n[right-side] \{\ . nr right-side 0 @@ -403,11 +206,9 @@ . \} .. . - - .pl 1.5i .ll 4i - This is a small test which shows how the + This is a small test that shows how the rt request works in combination with mk. .2c @@ -418,8 +219,7 @@ Result: - - This is a small test which shows how the + This is a small test that shows how the rt request works in combination with mk. Starting here, isn't robust @@ -428,21 +228,20 @@ Note that this real two-column implementation macro. - The following escapes give fine control of movements about the page. -- Escape: \v'e' Move vertically, usually from the current location on the page (if - no absolute position operator `|' is used). The argument E + no absolute position operator '|' is used). The argument E specifies the distance to move; positive is downwards and negative - upwards. The default scaling indicator for this escape is `v'. - Beware, however, that `gtroff' continues text processing at the + upwards. The default scaling indicator for this escape is 'v'. + Beware, however, that 'gtroff' continues text processing at the point where the motion ends, so you should always balance motions to avoid interference with text processing. - `\v' doesn't trigger a trap. This can be quite useful; for - example, consider a page bottom trap macro which prints a marker - in the margin to indicate continuation of a footnote or something + '\v' doesn't trigger a trap. This can be quite useful; for + example, consider a page bottom trap macro that prints a marker in + the margin to indicate continuation of a footnote or something similar. There are some special-case escapes for vertical motion. @@ -458,12 +257,12 @@ -- Escape: \h'e' Move horizontally, usually from the current location (if no - absolute position operator `|' is used). The expression E + absolute position operator '|' is used). The expression E indicates how far to move: positive is rightwards and negative - leftwards. The default scaling indicator for this escape is `m'. + leftwards. The default scaling indicator for this escape is 'm'. This horizontal space is not discarded at the end of a line. To - insert discardable space of a certain length use the `ss' request. + insert discardable space of a certain length use the 'ss' request. There are a number of special-case escapes for horizontal motion. @@ -480,7 +279,7 @@ zero). However, if there is a glyph defined in the current font file with - name `\|' (note the leading backslash), the width of this glyph is + name '\|' (note the leading backslash), the width of this glyph is used instead (even for TTYs). -- Escape: \^ @@ -488,7 +287,7 @@ zero). However, if there is a glyph defined in the current font file with - name `\^' (note the leading backslash), the width of this glyph is + name '\^' (note the leading backslash), the width of this glyph is used instead (even for TTYs). -- Escape: \0 @@ -496,7 +295,6 @@ The following string sets the TeX logo: - .ds TeX T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X -- Escape: \w'text' @@ -507,51 +305,51 @@ -- Register: \n[ct] -- Register: \n[ssc] -- Register: \n[skw] - Return the width of the specified TEXT in basic units. This - allows horizontal movement based on the width of some arbitrary - text (e.g. given as an argument to a macro). - + Return the width of the specified TEXT in basic units. This allows + horizontal movement based on the width of some arbitrary text (e.g. + given as an argument to a macro). The length of the string `abc' is \w'abc'u. => The length of the string `abc' is 72u. - Font changes may occur in TEXT which don't affect current settings. + Font changes may occur in TEXT, which don't affect current + settings. - After use, `\w' sets several registers: + After use, '\w' sets several registers: - `st' - `sb' + 'st' + 'sb' The highest and lowest point of the baseline, respectively, in TEXT. - `rst' - `rsb' - Like the `st' and `sb' registers, but takes account of the + 'rst' + 'rsb' + Like the 'st' and 'sb' registers, but takes account of the heights and depths of glyphs. In other words, this gives the highest and lowest point of TEXT. Values below the baseline are negative. - `ct' + 'ct' Defines the kinds of glyphs occurring in TEXT: - 0 + 0 only short glyphs, no descenders or tall glyphs. - 1 + 1 at least one descender. - 2 + 2 at least one tall glyph. - 3 + 3 at least one each of a descender and a tall glyph. - `ssc' - The amount of horizontal space (possibly negative) that - should be added to the last glyph before a subscript. + 'ssc' + The amount of horizontal space (possibly negative) that should + be added to the last glyph before a subscript. - `skw' - How far to right of the center of the last glyph in the `\w' + 'skw' + How far to right of the center of the last glyph in the '\w' argument, the center of an accent from a roman font should be placed over that glyph. @@ -584,7 +382,6 @@ The following is an example of a strike-through macro: - .de ST .nr ww \w'\\$1' \Z@\v'-.25m'\l'\\n[ww]u'@\\$1 @@ -594,46 +391,44 @@ .ST "a test" an actual emergency! -  File: groff.info, Node: Drawing Requests, Next: Traps, Prev: Page Motions, Up: gtroff Reference 5.23 Drawing Requests ===================== -`gtroff' provides a number of ways to draw lines and other figures on +'gtroff' provides a number of ways to draw lines and other figures on the page. Used in combination with the page motion commands (see *note Page Motions::, for more info), a wide variety of figures can be drawn. However, for complex drawings these operations can be quite cumbersome, -and it may be wise to use graphic preprocessors like `gpic' or `ggrn'. +and it may be wise to use graphic preprocessors like 'gpic' or 'ggrn'. *Note gpic::, and *note ggrn::, for more information. All drawing is done via escapes. -- Escape: \l'l' -- Escape: \l'lg' - Draw a line horizontally. L is the length of the line to be - drawn. If it is positive, start the line at the current location - and draw to the right; its end point is the new current location. - Negative values are handled differently: The line starts at the - current location and draws to the left, but the current location - doesn't move. + Draw a line horizontally. L is the length of the line to be drawn. + If it is positive, start the line at the current location and draw + to the right; its end point is the new current location. Negative + values are handled differently: The line starts at the current + location and draws to the left, but the current location doesn't + move. - L can also be specified absolutely (i.e. with a leading `|') which + L can also be specified absolutely (i.e. with a leading '|'), which draws back to the beginning of the input line. Default scaling - indicator is `m'. + indicator is 'm'. The optional second parameter G is a glyph to draw the line with. - If this second argument is not specified, `gtroff' uses the - underscore glyph, `\[ru]'. + If this second argument is not specified, 'gtroff' uses the + underscore glyph, '\[ru]'. - To separate the two arguments (to prevent `gtroff' from + To separate the two arguments (to prevent 'gtroff' from interpreting a drawing glyph as a scaling indicator if the glyph is - represented by a single character) use `\&'. + represented by a single character) use '\&'. Here a small useful example: - .de box \[br]\\$*\[br]\l'|0\[rn]'\l'|0\[ul]' .. @@ -646,38 +441,35 @@ -- Escape: \L'l' -- Escape: \L'lg' - Draw vertical lines. Its parameters are similar to the `\l' - escape, except that the default scaling indicator is `v'. The + Draw vertical lines. Its parameters are similar to the '\l' + escape, except that the default scaling indicator is 'v'. The movement is downwards for positive values, and upwards for negative - values. The default glyph is the box rule glyph, `\[br]'. As with + values. The default glyph is the box rule glyph, '\[br]'. As with the vertical motion escapes, text processing blindly continues where the line ends. - This is a \L'3v'test. - Here the result, produced with `grotty'. - + Here the result, produced with 'grotty'. This is a | | |test. - -- Escape: \D'command arg ...' - The `\D' escape provides a variety of drawing functions. Note that + The '\D' escape provides a variety of drawing functions. Note that on character devices, only vertical and horizontal lines are - supported within `grotty'; other devices may only support a subset + supported within 'grotty'; other devices may only support a subset of the available drawing functions. - The default scaling indicator for all subcommands of `\D' is `m' - for horizontal distances and `v' for vertical ones. Exceptions - are `\D'f ...'' and `\D't ...'' which use `u' as the default, and - `\D'FX ...'' which arguments are treated similar to the `defcolor' + The default scaling indicator for all subcommands of '\D' is 'm' + for horizontal distances and 'v' for vertical ones. Exceptions are + '\D'f ...'' and '\D't ...'', which use 'u' as the default, and + '\D'FX ...'', which arguments are treated similar to the 'defcolor' request. - `\D'l DX DY'' + '\D'l DX DY'' Draw a line from the current location to the relative point specified by (DX,DY), where positive values mean down and right, respectively. The end point of the line is the new @@ -687,7 +479,6 @@ text string; for simplicity, the box margin is taken as a fixed value, 0.2m. - .de BOX . nr @wd \w'\\$1' \h'.2m'\ @@ -701,49 +492,49 @@ \h'.2m' .. - First, the width of the string is stored in register `@wd'. + First, the width of the string is stored in register '@wd'. Then, four lines are drawn to form a box, properly offset by - the box margin. The registers `rst' and `rsb' are set by the - `\w' escape, containing the largest height and depth of the + the box margin. The registers 'rst' and 'rsb' are set by the + '\w' escape, containing the largest height and depth of the whole string. - `\D'c D'' + '\D'c D'' Draw a circle with a diameter of D with the leftmost point at the current position. After drawing, the current location is positioned at the rightmost point of the circle. - `\D'C D'' + '\D'C D'' Draw a solid circle with the same parameters and behaviour as an outlined circle. No outline is drawn. - `\D'e X Y'' + '\D'e X Y'' Draw an ellipse with a horizontal diameter of X and a vertical diameter of Y with the leftmost point at the current position. After drawing, the current location is positioned at the rightmost point of the ellipse. - `\D'E X Y'' - Draw a solid ellipse with the same parameters and behaviour - as an outlined ellipse. No outline is drawn. + '\D'E X Y'' + Draw a solid ellipse with the same parameters and behaviour as + an outlined ellipse. No outline is drawn. - `\D'a DX1 DY1 DX2 DY2'' + '\D'a DX1 DY1 DX2 DY2'' Draw an arc clockwise from the current location through the - two specified relative locations (DX1,DY1) and (DX2,DY2). - The coordinates of the first point are relative to the - current position, and the coordinates of the second point are - relative to the first point. After drawing, the current - position is moved to the final point of the arc. + two specified relative locations (DX1,DY1) and (DX2,DY2). The + coordinates of the first point are relative to the current + position, and the coordinates of the second point are relative + to the first point. After drawing, the current position is + moved to the final point of the arc. - `\D'~ DX1 DY1 DX2 DY2 ...'' + '\D'~ DX1 DY1 DX2 DY2 ...'' Draw a spline from the current location to the relative point (DX1,DY1) and then to (DX2,DY2), and so on. The current position is moved to the terminal point of the drawn curve. - `\D'f N'' + '\D'f N'' Set the shade of gray to be used for filling solid objects to N; N must be an integer between 0 and 1000, where 0 - corresponds solid white and 1000 to solid black, and values - in between correspond to intermediate shades of gray. This + corresponds solid white and 1000 to solid black, and values in + between correspond to intermediate shades of gray. This applies only to solid circles, solid ellipses, and solid polygons. By default, a level of 1000 is used. @@ -752,29 +543,28 @@ Don't use this command! It has the serious drawback that it is always rounded to the next integer multiple of the - horizontal resolution (the value of the `hor' keyword in the - `DESC' file). Use `\M' (*note Colors::) or `\D'Fg ...'' + horizontal resolution (the value of the 'hor' keyword in the + 'DESC' file). Use '\M' (*note Colors::) or '\D'Fg ...'' instead. - `\D'p DX1 DY1 DX2 DY2 ...'' + '\D'p DX1 DY1 DX2 DY2 ...'' Draw a polygon from the current location to the relative position (DX1,DY1) and then to (DX2,DY2) and so on. When the specified data points are exhausted, a line is drawn back to - the starting point. The current position is changed by - adding the sum of all arguments with odd index to the actual + the starting point. The current 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. - `\D'P DX1 DY1 DX2 DY2 ...'' - Draw a solid polygon with the same parameters and behaviour - as an outlined polygon. No outline is drawn. + '\D'P DX1 DY1 DX2 DY2 ...'' + Draw a solid polygon with the same parameters and behaviour as + an outlined polygon. No outline is drawn. Here a better variant of the box macro to fill the box with some color. Note that the box must be drawn before the text - since colors in `gtroff' are not transparent; the filled + since colors in 'gtroff' are not transparent; the filled polygon would hide the text completely. - .de BOX . nr @wd \w'\\$1' \h'.2m'\ @@ -790,13 +580,12 @@ \h'.2m' .. - If you want a filled polygon which has exactly the same size - as an unfilled one, you must draw both an unfilled and a - filled polygon. A filled polygon is always smaller than an - unfilled one because the latter uses straight lines with a - given line thickness to connect the polygon's corners, while - the former simply fills the area defined by the coordinates. - + If you want a filled polygon that has exactly the same size as + an unfilled one, you must draw both an unfilled and a filled + polygon. A filled polygon is always smaller than an unfilled + one because the latter uses straight lines with a given line + thickness to connect the polygon's corners, while the former + simply fills the area defined by the coordinates. \h'1i'\v'1i'\ \# increase line thickness @@ -806,30 +595,29 @@ \# draw filled polygon \Z'\D'P 3 3 -6 0'' - `\D't N'' - Set the current line thickness to N machine units. A value - of zero selects the smallest available line thickness. A + '\D't N'' + Set the current line thickness to N machine units. A value of + zero selects the smallest available line thickness. A negative value makes the line thickness proportional to the current point size (this is the default behaviour of AT&T - `troff'). + 'troff'). Despite of being silly, the current point is moved horizontally to the right by N. - `\D'FSCHEME COLOR_COMPONENTS'' - Change current fill color. SCHEME is a single letter - denoting the color scheme: `r' (rgb), `c' (cmy), `k' (cmyk), - `g' (gray), or `d' (default color). The color components use - exactly the same syntax as in the `defcolor' request (*note - Colors::); the command `\D'Fd'' doesn't take an argument. + '\D'FSCHEME COLOR_COMPONENTS'' + Change current fill color. SCHEME is a single letter denoting + the color scheme: 'r' (rgb), 'c' (cmy), 'k' (cmyk), 'g' + (gray), or 'd' (default color). The color components use + exactly the same syntax as in the 'defcolor' request (*note + Colors::); the command '\D'Fd'' doesn't take an argument. _No_ position changing! Examples: - - \D'Fg .3' \" same gray as \D'f 700' \D'Fr #0000ff' \" - blue + \D'Fg .3' \" same gray as \D'f 700' + \D'Fr #0000ff' \" blue *Note Graphics Commands::. @@ -839,19 +627,18 @@ Here an example how to create a large opening brace: - \b'\[lt]\[bv]\[lk]\[bv]\[lb]' The first glyph is on the top, the last glyph in STRING is at the - bottom. Note that `gtroff' separates the glyphs vertically by 1m, + bottom. Note that 'gtroff' separates the glyphs vertically by 1m, and the whole object is centered 0.5m above the current baseline; the largest glyph width is used as the width for the whole object. This rather unflexible positioning algorithm doesn't work with - `-Tdvi' since the bracket pieces vary in height for this device. - Instead, use the `eqn' preprocessor. + '-Tdvi' since the bracket pieces vary in height for this device. + Instead, use the 'eqn' preprocessor. *Note Manipulating Spacing::, how to adjust the vertical spacing - with the `\x' escape. + with the '\x' escape.  File: groff.info, Node: Traps, Next: Diversions, Prev: Drawing Requests, Up: gtroff Reference @@ -859,10 +646,10 @@ 5.24 Traps ========== -"Traps" are locations, which, when reached, call a specified macro. -These traps can occur at a given location on the page, at a given -location in the current diversion, at a blank line, after a certain -number of input lines, or at the end of input. +"Traps" are locations that, when reached, call a specified macro. These +traps can occur at a given location on the page, at a given location in +the current diversion, at a blank line, after a certain number of input +lines, or at the end of input. Setting a trap is also called "planting". It is also said that a trap is "sprung" if the associated macro is executed. @@ -882,7 +669,7 @@ 5.24.1 Page Location Traps -------------------------- -"Page location traps" perform an action when `gtroff' reaches or passes +"Page location traps" perform an action when 'gtroff' reaches or passes a certain vertical location on the page. Page location traps have a variety of purposes, including: @@ -895,21 +682,21 @@ -- Request: .vpt flag -- Register: \n[.vpt] Enable vertical position traps if FLAG is non-zero, or disables - them otherwise. Vertical position traps are traps set by the `wh' - or `dt' requests. Traps set by the `it' request are not vertical + them otherwise. Vertical position traps are traps set by the 'wh' + or 'dt' requests. Traps set by the 'it' request are not vertical position traps. The parameter that controls whether vertical position traps are enabled is global. Initially vertical position traps are enabled. The current setting of this is available in the - `.vpt' read-only number register. + '.vpt' read-only number register. - Note that a page can't be ejected if `vpt' is set to zero. + Note that a page can't be ejected if 'vpt' is set to zero. -- Request: .wh dist [macro] Set a page location trap. Non-negative values for DIST set the trap relative to the top of the page; negative values set the trap relative to the bottom of the page. Default scaling indicator is - `v'; values of DIST are always rounded to be multiples of the - vertical resolution (as given in register `.V'). + 'v'; values of DIST are always rounded to be multiples of the + vertical resolution (as given in register '.V'). MACRO is the name of the macro to execute when the trap is sprung. If MACRO is missing, remove the first trap (if any) at DIST. @@ -917,7 +704,6 @@ The following is a simple example of how many macro packages set headers and footers. - .de hd \" Page header ' sp .5i . tl 'Title''date' @@ -934,13 +720,12 @@ .wh -1i fo \" trap one inch from bottom A trap at or below the bottom of the page is ignored; it can be - made active by either moving it up or increasing the page length - so that the trap is on the page. + made active by either moving it up or increasing the page length so + that the trap is on the page. Negative trap values always use the _current_ page length; they are not converted to an absolute vertical position: - .pl 5i .wh -1i xx .ptr @@ -951,11 +736,10 @@ It is possible to have more than one trap at the same location; to do so, the traps must be defined at different locations, then moved - together with the `ch' request; otherwise the second trap would + together with the 'ch' request; otherwise the second trap would replace the first one. Earlier defined traps hide later defined - traps if moved to the same position (the many empty lines caused - by the `bp' request are omitted in the following example): - + traps if moved to the same position (the many empty lines caused by + the 'bp' request are omitted in the following example): .de a . nop a @@ -972,68 +756,61 @@ .wh 3i c .bp => a b c - - .ch b 1i .ch c 1i .bp => a - - .ch a 0.5i .bp => a b - -- Register: \n[.t] A read-only number register holding the distance to the next trap. If there are no traps between the current position and the bottom of the page, it contains the distance to the page bottom. In a diversion, the distance to the page bottom is infinite (the - returned value is the biggest integer which can be represented in - `groff') if there are no diversion traps. + returned value is the biggest integer that can be represented in + 'groff') if there are no diversion traps. -- Request: .ch macro [dist] Change the location of a trap. The first argument is the name of - the macro to be invoked at the trap, and the second argument is - the new location for the trap (note that the parameters are - specified in opposite order as in the `wh' request). This is - useful for building up footnotes in a diversion to allow more - space at the bottom of the page for them. - - Default scaling indicator for DIST is `v'. If DIST is missing, - the trap is removed. + the macro to be invoked at the trap, and the second argument is the + new location for the trap (note that the parameters are specified + in opposite order as in the 'wh' request). This is useful for + building up footnotes in a diversion to allow more space at the + bottom of the page for them. + Default scaling indicator for DIST is 'v'. If DIST is missing, the + trap is removed. -- Register: \n[.ne] - The read-only number register `.ne' contains the amount of space - that was needed in the last `ne' request that caused a trap to be - sprung. Useful in conjunction with the `.trunc' register. *Note + The read-only number register '.ne' contains the amount of space + that was needed in the last 'ne' request that caused a trap to be + sprung. Useful in conjunction with the '.trunc' register. *Note Page Control::, for more information. - Since the `.ne' register is only set by traps it doesn't make much + Since the '.ne' register is only set by traps it doesn't make much sense to use it outside of trap macros. -- Register: \n[.trunc] A read-only register containing the amount of vertical space truncated by the most recently sprung vertical position trap, or, - if the trap was sprung by an `ne' request, minus the amount of - vertical motion produced by the `ne' request. In other words, at + if the trap was sprung by an 'ne' request, minus the amount of + vertical motion produced by the 'ne' request. In other words, at the point a trap is sprung, it represents the difference of what the vertical position would have been but for the trap, and what the vertical position actually is. - Since the `.trunc' register is only set by traps it doesn't make + Since the '.trunc' register is only set by traps it doesn't make much sense to use it outside of trap macros. -- Register: \n[.pe] - A read-only register which is set to 1 while a page is ejected with - the `bp' request (or by the end of input). + A read-only register that is set to 1 while a page is ejected with + the 'bp' request (or by the end of input). Outside of traps this register is always zero. In the following - example, only the second call to `x' is caused by `bp'. - + example, only the second call to 'x' is caused by 'bp'. .de x \&.pe=\\n[.pe] @@ -1051,14 +828,13 @@ .pe=1 - An important fact to consider while designing macros is that diversions and traps do not interact normally. For example, if a trap -invokes a header macro (while outputting a diversion) which tries to +invokes a header macro (while outputting a diversion) that tries to change the font on the current page, the effect is not visible before the diversion has completely been printed (except for input protected -with `\!' or `\?') since the data in the diversion is already -formatted. In most cases, this is not the expected behaviour. +with '\!' or '\?') since the data in the diversion is already formatted. +In most cases, this is not the expected behaviour.  File: groff.info, Node: Diversion Traps, Next: Input Line Traps, Prev: Page Location Traps, Up: Traps @@ -1068,13 +844,13 @@ -- Request: .dt [dist macro] Set a trap _within_ a diversion. DIST is the location of the trap - (identical to the `wh' request; default scaling indicator is `v') + (identical to the 'wh' request; default scaling indicator is 'v') and MACRO is the name of the macro to be invoked. If called without arguments, the diversion trap is removed. Note that there exists only a single diversion trap. - The number register `.t' still works within diversions. *Note + The number register '.t' still works within diversions. *Note Diversions::, for more information.  @@ -1085,14 +861,13 @@ -- Request: .it n macro -- Request: .itc n macro - Set an input line trap. N is the number of lines of input which - may be read before springing the trap, MACRO is the macro to be + Set an input line trap. N is the number of lines of input that may + be read before springing the trap, MACRO is the macro to be invoked. Request lines are not counted as input lines. - For example, one possible use is to have a macro which prints the + For example, one possible use is to have a macro that prints the next N lines in a bold font. - .de B . it \\$1 B-end . ft B @@ -1102,8 +877,8 @@ . ft R .. - The `itc' request is identical except that an interrupted text line - (ending with `\c') is not counted as a separate line. + The 'itc' request is identical except that an interrupted text line + (ending with '\c') is not counted as a separate line. Both requests are associated with the current environment (*note Environments::); switching to another environment disables the @@ -1117,7 +892,7 @@ ----------------------- -- Request: .blm macro - Set a blank line trap. `gtroff' executes MACRO when it encounters + Set a blank line trap. 'gtroff' executes MACRO when it encounters a blank line in the input file.  @@ -1129,28 +904,28 @@ -- Request: .lsm macro -- Register: \n[lsn] -- Register: \n[lss] - Set a leading spaces trap. `gtroff' executes MACRO when it + Set a leading spaces trap. 'gtroff' executes MACRO when it encounters leading spaces in an input line; the implicit line break - which normally happens in this case is suppressed. A line + that normally happens in this case is suppressed. A line consisting of spaces only, however, is treated as an empty line, - possibly subject to an empty line macro set with the `blm' request. + possibly subject to an empty line macro set with the 'blm' request. Leading spaces are removed from the input line before calling the leading spaces macro. The number of removed spaces is stored in - register `lsn'; the horizontal space which would be emitted if - there was no leading space macro is stored in register `lss'. - Note that `lsn' and `lss' are available even if no leading space - macro has been set. + register 'lsn'; the horizontal space that would be emitted if there + was no leading space macro is stored in register 'lss'. Note that + 'lsn' and 'lss' are available even if no leading space macro has + been set. The first thing a leading space macro sees is a token. However, - some escapes like `\f' or `\m' are handled on the fly (see *note + some escapes like '\f' or '\m' are handled on the fly (see *note Gtroff Internals::, for a complete list) without creating a token at all. Consider that a line starts with two spaces followed by - `\fIfoo'. While skipping the spaces `\fI' is handled too so that - groff's current font is properly set to `I', but the leading space - macro only sees `foo', without the preceding `\fI'. If the macro - should see the font escape you have to `protect' it with something - which creates a token, for example with `\&\fIfoo'. + '\fIfoo'. While skipping the spaces '\fI' is handled too so that + groff's current font is properly set to 'I', but the leading space + macro only sees 'foo', without the preceding '\fI'. If the macro + should see the font escape you have to 'protect' it with something + that creates a token, for example with '\&\fIfoo'.  File: groff.info, Node: End-of-input Traps, Prev: Leading Spaces Traps, Up: Traps @@ -1162,10 +937,9 @@ Set a trap at the end of input. MACRO is executed after the last line of the input file has been processed. - For example, if the document had to have a section at the bottom - of the last page for someone to approve it, the `em' request could - be used. - + For example, if the document had to have a section at the bottom of + the last page for someone to approve it, the 'em' request could be + used. .de approval \c @@ -1181,30 +955,29 @@ . .em approval - The `\c' in the above example needs explanation. For historical - reasons (and for compatibility with AT&T `troff'), the end macro - exits as soon as it causes a page break and no remaining data is - in the partially collected line. - - Let us assume that there is no `\c' in the above `approval' macro, - and that the page is full and has been ended with, say, a `br' - request. The `ne' request now causes the start of a new page, - which in turn makes `troff' exit immediately for the reasons just + The '\c' in the above example needs explanation. For historical + reasons (and for compatibility with AT&T 'troff'), the end macro + exits as soon as it causes a page break and no remaining data is in + the partially collected line. + + Let us assume that there is no '\c' in the above 'approval' macro, + and that the page is full and has been ended with, say, a 'br' + request. The 'ne' request now causes the start of a new page, + which in turn makes 'troff' exit immediately for the reasons just described. In most situations this is not intended. To always force processing the whole end macro independently of - this behaviour it is thus advisable to insert something which - starts an empty partially filled line (`\c') whenever there is a - chance that a page break can happen. In the above example, the - call of the `ne' request assures that the remaining code stays on - the same page, so we have to insert `\c' only once. + this behaviour it is thus advisable to insert something that starts + an empty partially filled line ('\c') whenever there is a chance + that a page break can happen. In the above example, the call of + the 'ne' request assures that the remaining code stays on the same + page, so we have to insert '\c' only once. The next example shows how to append three lines, then starting a - new page unconditionally. Since `.ne 1' doesn't give the desired + new page unconditionally. Since '.ne 1' doesn't give the desired effect - there is always one line available or we are already at the beginning of the next page - we temporarily increase the page - length by one line so that we can use `.ne 2'. - + length by one line so that we can use '.ne 2'. .de EM .pl +1v @@ -1230,14 +1003,13 @@ page break caused by the end macro; further page breaks emitted by the end macro are handled normally. - Another possible use of the `em' request is to make `gtroff' emit - a single large page instead of multiple pages. For example, one - may want to produce a long plain-text file for reading on-screen. - The idea is to set the page length at the beginning of the - document to a very large value to hold all the text, and - automatically adjust it to the exact height of the document after - the text has been output. - + Another possible use of the 'em' request is to make 'gtroff' emit a + single large page instead of multiple pages. For example, one may + want to produce a long plain-text file for reading on-screen. The + idea is to set the page length at the beginning of the document to + a very large value to hold all the text, and automatically adjust + it to the exact height of the document after the text has been + output. .de adjust-page-length . br @@ -1254,8 +1026,8 @@ Since only one end-of-input trap does exist and other macro packages may already use it, care must be taken not to break the - mechanism. A simple solution would be to append the above macro - to the macro package's end-of-input macro using the `.am' request. + mechanism. A simple solution would be to append the above macro to + the macro package's end-of-input macro using the '.am' request.  File: groff.info, Node: Diversions, Next: Environments, Prev: Traps, Up: gtroff Reference @@ -1263,13 +1035,13 @@ 5.25 Diversions =============== -In `gtroff' it is possible to "divert" text into a named storage area. +In 'gtroff' it is possible to "divert" text into a named storage area. Due to the similarity to defining macros it is sometimes said to be stored in a macro. This is used for saving text for output at a later time, which is useful for keeping blocks of text on the same page, footnotes, tables of contents, and indices. - For orthogonality it is said that `gtroff' is in the "top-level + For orthogonality it is said that 'gtroff' is in the "top-level diversion" if no diversion is active (i.e., the data is diverted to the output device). @@ -1279,26 +1051,25 @@ -- Request: .di macro -- Request: .da macro - Begin a diversion. Like the `de' request, it takes an argument of - a macro name to divert subsequent text into. The `da' macro + Begin a diversion. Like the 'de' request, it takes an argument of + a macro name to divert subsequent text into. The 'da' macro appends to an existing diversion. - `di' or `da' without an argument ends the diversion. + 'di' or 'da' without an argument ends the diversion. The current partially-filled line is included into the diversion. - See the `box' request below for an example. Note that switching to - another (empty) environment (with the `ev' request) avoids the + See the 'box' request below for an example. Note that switching to + another (empty) environment (with the 'ev' request) avoids the inclusion of the current partially-filled line. -- Request: .box macro -- Request: .boxa macro - Begin (or append to) a diversion like the `di' and `da' requests. - The difference is that `box' and `boxa' do not include a + Begin (or append to) a diversion like the 'di' and 'da' requests. + The difference is that 'box' and 'boxa' do not include a partially-filled line in the diversion. Compare this: - Before the box. .box xxx In the box. @@ -1312,7 +1083,6 @@ with this: - Before the diversion. .di yyy In the diversion. @@ -1324,22 +1094,21 @@ .yyy => Before the diversion. In the diversion. - `box' or `boxa' without an argument ends the diversion. + 'box' or 'boxa' without an argument ends the diversion. -- Register: \n[.z] -- Register: \n[.d] - Diversions may be nested. The read-only number register `.z' + Diversions may be nested. The read-only number register '.z' contains the name of the current diversion (this is a string-valued - register). The read-only number register `.d' contains the current + register). The read-only number register '.d' contains the current vertical place in the diversion. If not in a diversion it is the - same as register `nl'. + same as register 'nl'. -- Register: \n[.h] The "high-water mark" on the current page. It corresponds to the text baseline of the lowest line on the page. This is a read-only register. - .tm .h==\n[.h], nl==\n[nl] => .h==0, nl==-1 This is a test. @@ -1349,18 +1118,17 @@ => .h==40, nl==120 As can be seen in the previous example, empty lines are not - considered in the return value of the `.h' register. + considered in the return value of the '.h' register. -- Register: \n[dn] -- Register: \n[dl] - After completing a diversion, the read-write number registers `dn' - and `dl' contain the vertical and horizontal size of the diversion. + After completing a diversion, the read-write number registers 'dn' + and 'dl' contain the vertical and horizontal size of the diversion. Note that only the just processed lines are counted: For the - computation of `dn' and `dl', the requests `da' and `boxa' are - handled as if `di' and `box' had been used - lines which have been + computation of 'dn' and 'dl', the requests 'da' and 'boxa' are + handled as if 'di' and 'box' had been used - lines that have been already stored in a macro are not taken into account. - .\" Center text both horizontally & vertically . .\" Enclose macro definitions in .eo and .ec @@ -1375,8 +1143,6 @@ . nf . di @c .. - - .\" macro .)c terminates centering mode .de )c . br @@ -1397,28 +1163,25 @@ .\" End of macro definitions, restore escape mechanism .ec - -- Escape: \! -- Escape: \?anything\? Prevent requests, macros, and escapes from being interpreted when read into a diversion. Both escapes take the given text and "transparently" embed it into the diversion. This is useful for - macros which shouldn't be invoked until the diverted text is + macros that shouldn't be invoked until the diverted text is actually output. - The `\!' escape transparently embeds text up to and including the - end of the line. The `\?' escape transparently embeds text until - the next occurrence of the `\?' escape. Example: - + The '\!' escape transparently embeds text up to and including the + end of the line. The '\?' escape transparently embeds text until + the next occurrence of the '\?' escape. Example: \?ANYTHING\? - ANYTHING may not contain newlines; use `\!' to embed newlines in - a diversion. The escape sequence `\?' is also recognized in copy + ANYTHING may not contain newlines; use '\!' to embed newlines in a + diversion. The escape sequence '\?' is also recognized in copy mode and turned into a single internal code; it is this code that terminates ANYTHING. Thus the following example prints 4. - .nr x 1 .nf .di d @@ -1437,37 +1200,36 @@ Both escapes read the data in copy mode. - If `\!' is used in the top-level diversion, its argument is - directly embedded into the `gtroff' intermediate output. This can - be used for example to control a postprocessor which processes the + If '\!' is used in the top-level diversion, its argument is + directly embedded into the 'gtroff' intermediate output. This can + be used for example to control a postprocessor that processes the data before it is sent to the device driver. - The `\?' escape used in the top-level diversion produces no output + The '\?' escape used in the top-level diversion produces no output at all; its argument is simply ignored. -- Request: .output string - Emit STRING directly to the `gtroff' intermediate output (subject - to copy mode interpretation); this is similar to `\!' used at the + Emit STRING directly to the 'gtroff' intermediate output (subject + to copy mode interpretation); this is similar to '\!' used at the top level. An initial double quote in STRING is stripped off to allow initial blanks. This request can't be used before the first page has started - if - you get an error, simply insert `.br' before the `output' request. + you get an error, simply insert '.br' before the 'output' request. - Without argument, `output' is ignored. + Without argument, 'output' is ignored. Use with caution! It is normally only needed for mark-up used by a - postprocessor which does something with the output before sending - it to the output device, filtering out STRING again. + postprocessor that does something with the output before sending it + to the output device, filtering out STRING again. -- Request: .asciify div "Unformat" the diversion specified by DIV in such a way that ASCII - characters, characters translated with the `trin' request, space + characters, characters translated with the 'trin' request, space characters, and some escape sequences that were formatted and diverted are treated like ordinary input characters when the diversion is reread. It can be also used for gross hacks; for - example, the following sets register `n' to 1. - + example, the following sets register 'n' to 1. .tr @. .di x @@ -1478,15 +1240,15 @@ .asciify x .x - Note that `asciify' cannot return all items in a diversion back to - their source equivalent, nodes such as `\N[...]' will still remain + Note that 'asciify' cannot return all items in a diversion back to + their source equivalent, nodes such as '\N[...]' will still remain as nodes, so the result cannot be guaranteed to be a pure string. *Note Copy-in Mode::. -- Request: .unformat div - Like `asciify', unformat the specified diversion. However, - `unformat' only unformats spaces and tabs between words. + Like 'asciify', unformat the specified diversion. However, + 'unformat' only unformats spaces and tabs between words. Unformatted tabs are treated as input tokens, and spaces are stretchable again. @@ -1502,14 +1264,13 @@ It happens frequently that some text should be printed in a certain format regardless of what may be in effect at the time, for example, in a trap invoked macro to print headers and footers. To solve this -`gtroff' processes text in "environments". An environment contains -most of the parameters that control text processing. It is possible to -switch amongst these environments; by default `gtroff' processes text -in environment 0. The following is the information kept in an -environment. +'gtroff' processes text in "environments". An environment contains most +of the parameters that control text processing. It is possible to +switch amongst these environments; by default 'gtroff' processes text in +environment 0. The following is the information kept in an environment. - * font parameters (size, family, style, glyph height and slant, - space and sentence space size) + * font parameters (size, family, style, glyph height and slant, space + and sentence space size) * page parameters (line length, title length, vertical spacing, line spacing, indentation, line numbering, centering, right-justifying, @@ -1527,29 +1288,28 @@ * drawing and fill colours These environments may be given arbitrary names (see *note -Identifiers::, for more info). Old versions of `troff' only had -environments named `0', `1', and `2'. +Identifiers::, for more info). Old versions of 'troff' only had +environments named '0', '1', and '2'. -- Request: .ev [env] -- Register: \n[.ev] - Switch to another environment. The argument ENV is the name of - the environment to switch to. With no argument, `gtroff' switches - back to the previous environment. There is no limit on the number - of named environments; they are created the first time that they - are referenced. The `.ev' read-only register contains the name or + Switch to another environment. The argument ENV is the name of the + environment to switch to. With no argument, 'gtroff' switches back + to the previous environment. There is no limit on the number of + named environments; they are created the first time that they are + referenced. The '.ev' read-only register contains the name or number of the current environment. This is a string-valued register. - Note that a call to `ev' (with argument) pushes the previously - active environment onto a stack. If, say, environments `foo', - `bar', and `zap' are called (in that order), the first `ev' - request without parameter switches back to environment `bar' - (which is popped off the stack), and a second call switches back - to environment `foo'. + Note that a call to 'ev' (with argument) pushes the previously + active environment onto a stack. If, say, environments 'foo', + 'bar', and 'zap' are called (in that order), the first 'ev' request + without parameter switches back to environment 'bar' (which is + popped off the stack), and a second call switches back to + environment 'foo'. Here is an example: - .ev footnote-env .fam N .ps 6 @@ -1563,7 +1323,6 @@ \(dg Note the large, friendly letters. .ev - -- Request: .evc env Copy the environment ENV into the current environment. @@ -1574,15 +1333,15 @@ * The status whether the previous line was interrupted. * The number of lines still to center, or to right-justify, or - to underline (with or without underlined spaces); they are - set to zero. + to underline (with or without underlined spaces); they are set + to zero. * The status whether a temporary indentation is active. * Input traps and its associated data. * Line numbering mode is disabled; it can be reactivated with - `.nm +0'. + '.nm +0'. * The number of consecutive hyphenated lines (set to zero). @@ -1590,22 +1349,22 @@ -- Register: \n[.cht] -- Register: \n[.cdp] -- Register: \n[.csk] - The `\n[.w]' register contains the width of the last glyph added to + The '\n[.w]' register contains the width of the last glyph added to the current environment. - The `\n[.cht]' register contains the height of the last glyph added + The '\n[.cht]' register contains the height of the last glyph added to the current environment. - The `\n[.cdp]' register contains the depth of the last glyph added + The '\n[.cdp]' register contains the depth of the last glyph added to the current environment. It is positive for glyphs extending below the baseline. - The `\n[.csk]' register contains the "skew" (how far to the right - of the glyph's center that `gtroff' should place an accent) of the + The '\n[.csk]' register contains the "skew" (how far to the right + of the glyph's center that 'gtroff' should place an accent) of the last glyph added to the current environment. -- Register: \n[.n] - The `\n[.n]' register contains the length of the previous output + The '\n[.n]' register contains the length of the previous output line in the current environment.  @@ -1617,53 +1376,51 @@ -- Escape: \Onum Disable or enable output depending on the value of NUM: - `\O0' + '\O0' Disable any glyphs from being emitted to the device driver, provided that the escape occurs at the outer level (see - `\O[3]' and `\O[4]'). Motion is not suppressed so - effectively `\O[0]' means _pen up_. + '\O[3]' and '\O[4]'). Motion is not suppressed so effectively + '\O[0]' means _pen up_. - `\O1' + '\O1' Enable output of glyphs, provided that the escape occurs at the outer level. - `\O0' and `\O1' also reset the four registers `opminx', `opminy', - `opmaxx', and `opmaxy' to -1. *Note Register Index::. These four + '\O0' and '\O1' also reset the four registers 'opminx', 'opminy', + 'opmaxx', and 'opmaxy' to -1. *Note Register Index::. These four registers mark the top left and bottom right hand corners of a box - which encompasses all written glyphs. + that encompasses all written glyphs. For example the input text: - Hello \O[0]world \O[1]this is a test. produces the following output: - Hello this is a test. - `\O2' + '\O2' Provided that the escape occurs at the outer level, enable - output of glyphs and also write out to `stderr' the page + output of glyphs and also write out to 'stderr' the page number and four registers encompassing the glyphs previously - written since the last call to `\O'. + written since the last call to '\O'. - `\O3' - Begin a nesting level. At start-up, `gtroff' is at outer + '\O3' + Begin a nesting level. At start-up, 'gtroff' is at outer level. The current level is contained within the read-only - register `.O'. *Note Built-in Registers::. + register '.O'. *Note Built-in Registers::. - `\O4' + '\O4' End a nesting level. The current level is contained within - the read-only register `.O'. *Note Built-in Registers::. + the read-only register '.O'. *Note Built-in Registers::. - `\O[5PFILENAME]' - This escape is `grohtml' specific. Provided that this escape - occurs at the outer nesting level write the `filename' to - `stderr'. The position of the image, P, must be specified - and must be one of `l', `r', `c', or `i' (left, right, - centered, inline). FILENAME is associated with the - production of the next inline image. + '\O[5PFILENAME]' + This escape is 'grohtml' specific. Provided that this escape + occurs at the outer nesting level write the 'filename' to + 'stderr'. The position of the image, P, must be specified and + must be one of 'l', 'r', 'c', or 'i' (left, right, centered, + inline). FILENAME is associated with the production of the + next inline image.  File: groff.info, Node: Colors, Next: I/O, Prev: Suppressing output, Up: gtroff Reference @@ -1673,105 +1430,97 @@ -- Request: .color [n] -- Register: \n[.color] - If N is missing or non-zero, activate colors (this is the - default); otherwise, turn it off. + If N is missing or non-zero, activate colors (this is the default); + otherwise, turn it off. - The read-only number register `.color' is 1 if colors are active, + The read-only number register '.color' is 1 if colors are active, 0 otherwise. - Internally, `color' sets a global flag; it does not produce a - token. Similar to the `cp' request, you should use it at the + Internally, 'color' sets a global flag; it does not produce a + token. Similar to the 'cp' request, you should use it at the beginning of your document to control color output. - Colors can be also turned off with the `-c' command line option. + Colors can be also turned off with the '-c' command line option. -- Request: .defcolor ident scheme color_components Define color with name IDENT. SCHEME can be one of the following - values: `rgb' (three components), `cmy' (three components), `cmyk' - (four components), and `gray' or `grey' (one component). + values: 'rgb' (three components), 'cmy' (three components), 'cmyk' + (four components), and 'gray' or 'grey' (one component). Color components can be given either as a hexadecimal string or as positive decimal integers in the range 0-65535. A hexadecimal string contains all color components concatenated. It must start - with either `#' or `##'; the former specifies hex values in the - range 0-255 (which are internally multiplied by 257), the latter - in the range 0-65535. Examples: `#FFC0CB' (pink), `##ffff0000ffff' + with either '#' or '##'; the former specifies hex values in the + range 0-255 (which are internally multiplied by 257), the latter in + the range 0-65535. Examples: '#FFC0CB' (pink), '##ffff0000ffff' (magenta). The default color name value is device-specific - (usually black). It is possible that the default color for `\m' - and `\M' is not identical. + (usually black). It is possible that the default color for '\m' + and '\M' is not identical. - A new scaling indicator `f' has been introduced which multiplies + A new scaling indicator 'f' has been introduced, which multiplies its value by 65536; this makes it convenient to specify color components as fractions in the range 0 to 1 (1f equals 65536u). Example: - .defcolor darkgreen rgb 0.1f 0.5f 0.2f - Note that `f' is the default scaling indicator for the `defcolor' + Note that 'f' is the default scaling indicator for the 'defcolor' request, thus the above statement is equivalent to - .defcolor darkgreen rgb 0.1 0.5 0.2 - -- Request: .gcolor [color] -- Escape: \mc -- Escape: \m(co -- Escape: \m[color] -- Register: \n[.m] - Set (glyph) drawing color. The following examples show how to - turn the next four words red. - + Set (glyph) drawing color. The following examples show how to turn + the next four words red. .gcolor red these are in red .gcolor and these words are in black. - \m[red]these are in red\m[] and these words are in black. - The escape `\m[]' returns to the previous color, as does a call to - `gcolor' without an argument. + The escape '\m[]' returns to the previous color, as does a call to + 'gcolor' without an argument. The name of the current drawing color is available in the - read-only, string-valued number register `.m'. + read-only, string-valued number register '.m'. - The drawing color is associated with the current environment - (*note Environments::). + The drawing color is associated with the current environment (*note + Environments::). - Note that `\m' doesn't produce an input token in `gtroff'. As a - consequence, it can be used in requests like `mc' (which expects a + Note that '\m' doesn't produce an input token in 'gtroff'. As a + consequence, it can be used in requests like 'mc' (which expects a single character as an argument) to change the color on the fly: - .mc \m[red]x\m[] - -- Request: .fcolor [color] -- Escape: \Mc -- Escape: \M(co -- Escape: \M[color] -- Register: \n[.M] Set fill (background) color for filled objects drawn with the - `\D'...'' commands. + '\D'...'' commands. A red ellipse can be created with the following code: - \M[red]\h'0.5i'\D'E 2i 1i'\M[] - The escape `\M[]' returns to the previous fill color, as does a - call to `fcolor' without an argument. + The escape '\M[]' returns to the previous fill color, as does a + call to 'fcolor' without an argument. The name of the current fill (background) color is available in the - read-only, string-valued number register `.M'. + read-only, string-valued number register '.M'. The fill color is associated with the current environment (*note Environments::). - Note that `\M' doesn't produce an input token in `gtroff'. + Note that '\M' doesn't produce an input token in 'gtroff'.  File: groff.info, Node: I/O, Next: Postprocessor Access, Prev: Colors, Up: gtroff Reference @@ -1779,57 +1528,55 @@ 5.29 I/O ======== -`gtroff' has several requests for including files: +'gtroff' has several requests for including files: -- Request: .so file - Read in the specified FILE and includes it in place of the `so' - request. This is quite useful for large documents, e.g. keeping + Read in the specified FILE and includes it in place of the 'so' + request. This is quite useful for large documents, e.g. keeping each chapter in a separate file. *Note gsoelim::, for more information. - Since `gtroff' replaces the `so' request with the contents of - `file', it makes a difference whether the data is terminated with a - newline or not: Assuming that file `xxx' contains the word `foo' + Since 'gtroff' replaces the 'so' request with the contents of + 'file', it makes a difference whether the data is terminated with a + newline or not: Assuming that file 'xxx' contains the word 'foo' without a final newline, this - This is .so xxx bar - yields `This is foobar'. + yields 'This is foobar'. - The search path for FILE can be controlled with the `-I' command + The search path for FILE can be controlled with the '-I' command line option. -- Request: .pso command - Read the standard output from the specified COMMAND and includes - it in place of the `pso' request. + Read the standard output from the specified COMMAND and includes it + in place of the 'pso' request. This request causes an error if used in safer mode (which is the - default). Use `groff''s or `troff''s `-U' option to activate + default). Use 'groff''s or 'troff''s '-U' option to activate unsafe mode. - The comment regarding a final newline for the `so' request is valid - for `pso' also. + The comment regarding a final newline for the 'so' request is valid + for 'pso' also. -- Request: .mso file - Identical to the `so' request except that `gtroff' searches for - the specified FILE in the same directories as macro files for the - the `-m' command line option. If the file name to be included has - the form `NAME.tmac' and it isn't found, `mso' tries to include - `tmac.NAME' and vice versa. If the file does not exist, a warning - of type `file' is emitted. *Note Debugging::, for information + Identical to the 'so' request except that 'gtroff' searches for the + specified FILE in the same directories as macro files for the the + '-m' command line option. If the file name to be included has the + form 'NAME.tmac' and it isn't found, 'mso' tries to include + 'tmac.NAME' and vice versa. If the file does not exist, a warning + of type 'file' is emitted. *Note Debugging::, for information about warnings. -- Request: .trf file -- Request: .cf file Transparently output the contents of FILE. Each line is output as - if it were preceded by `\!'; however, the lines are _not_ subject + if it were preceded by '\!'; however, the lines are _not_ subject to copy mode interpretation. If the file does not end with a - newline, then a newline is added (`trf' only). For example, to - define a macro `x' containing the contents of file `f', use - + newline, then a newline is added ('trf' only). For example, to + define a macro 'x' containing the contents of file 'f', use .ev 1 .di x @@ -1837,28 +1584,28 @@ .di .ev - The calls to `ev' prevent that the current partial input line + The calls to 'ev' prevent that the current partial input line becomes part of the diversion. - Both `trf' and `cf', when used in a diversion, embeds an object in - the diversion which, when reread, causes the contents of FILE to - be transparently copied through to the output. In UNIX `troff', - the contents of FILE is immediately copied through to the output + Both 'trf' and 'cf', when used in a diversion, embeds an object in + the diversion which, when reread, causes the contents of FILE to be + transparently copied through to the output. In UNIX 'troff', the + contents of FILE is immediately copied through to the output regardless of whether there is a current diversion; this behaviour is so anomalous that it must be considered a bug. - While `cf' copies the contents of FILE completely unprocessed, - `trf' disallows characters such as NUL that are not valid `gtroff' + While 'cf' copies the contents of FILE completely unprocessed, + 'trf' disallows characters such as NUL that are not valid 'gtroff' input characters (*note Identifiers::). - For `cf', within a diversion, `completely unprocessed' means that + For 'cf', within a diversion, 'completely unprocessed' means that each line of a file to be inserted is handled as if it were - preceded by `\!\\!'. + preceded by '\!\\!'. Both requests cause a line break. -- Request: .nx [file] - Force `gtroff' to continue processing of the file specified as an + Force 'gtroff' to continue processing of the file specified as an argument. If no argument is given, immediately jump to the end of file. @@ -1867,26 +1614,22 @@ were part of the input file. Text is read until a blank line is encountered. - If standard input is a TTY input device (keyboard), write PROMPT - to standard error, followed by a colon (or send BEL for a beep if - no argument is given). + If standard input is a TTY input device (keyboard), write PROMPT to + standard error, followed by a colon (or send BEL for a beep if no + argument is given). Arguments after PROMPT are available for the input. For example, the line - .rd data foo bar - with the input `This is \$2.' prints - + with the input 'This is \$2.' prints This is bar. - - Using the `nx' and `rd' requests, it is easy to set up form letters. -The form letter template is constructed like this, putting the -following lines into a file called `repeat.let': - + Using the 'nx' and 'rd' requests, it is easy to set up form letters. +The form letter template is constructed like this, putting the following +lines into a file called 'repeat.let': .ce \*(td @@ -1903,9 +1646,8 @@ When this is run, a file containing the following lines should be redirected in. Note that requests included in this file are executed as though they were part of the form letter. The last block of input is -the `ex' request which tells `groff' to stop processing. If this was -not there, `groff' would not know when to stop. - +the 'ex' request, which tells 'groff' to stop processing. If this was +not there, 'groff' would not know when to stop. Trent A. Fisher 708 NW 19th Av., #202 @@ -1922,26 +1664,25 @@ .ex -- Request: .pi pipe - Pipe the output of `gtroff' to the shell command(s) specified by - PIPE. This request must occur before `gtroff' has a chance to + Pipe the output of 'gtroff' to the shell command(s) specified by + PIPE. This request must occur before 'gtroff' has a chance to print anything. - `pi' causes an error if used in safer mode (which is the default). - Use `groff''s or `troff''s `-U' option to activate unsafe mode. + 'pi' causes an error if used in safer mode (which is the default). + Use 'groff''s or 'troff''s '-U' option to activate unsafe mode. - Multiple calls to `pi' are allowed, acting as a chain. For + Multiple calls to 'pi' are allowed, acting as a chain. For example, - .pi foo .pi bar ... - is the same as `.pi foo | bar'. + is the same as '.pi foo | bar'. - Note that the intermediate output format of `gtroff' is piped to - the specified commands. Consequently, calling `groff' without the - `-Z' option normally causes a fatal error. + Note that the intermediate output format of 'gtroff' is piped to + the specified commands. Consequently, calling 'groff' without the + '-Z' option normally causes a fatal error. -- Request: .sy cmds -- Register: \n[systat] @@ -1949,77 +1690,73 @@ saved anyplace, so it is up to the user to do so. This request causes an error if used in safer mode (which is the - default). Use `groff''s or `troff''s `-U' option to activate + default). Use 'groff''s or 'troff''s '-U' option to activate unsafe mode. For example, the following code fragment introduces the current time into a document: - .sy perl -e 'printf ".nr H %d\\n.nr M %d\\n.nr S %d\\n",\ (localtime(time))[2,1,0]' > /tmp/x\n[$$] .so /tmp/x\n[$$] .sy rm /tmp/x\n[$$] \nH:\nM:\nS - Note that this works by having the `perl' script (run by `sy') - print out the `nr' requests which set the number registers `H', - `M', and `S', and then reads those commands in with the `so' - request. - - For most practical purposes, the number registers `seconds', - `minutes', and `hours' which are initialized at start-up of - `gtroff' should be sufficient. Use the `af' request to get a + Note that this works by having the 'perl' script (run by 'sy') + print out the 'nr' requests that set the number registers 'H', 'M', + and 'S', and then reads those commands in with the 'so' request. + + For most practical purposes, the number registers 'seconds', + 'minutes', and 'hours', which are initialized at start-up of + 'gtroff', should be sufficient. Use the 'af' request to get a formatted output: - .af hours 00 .af minutes 00 .af seconds 00 \n[hours]:\n[minutes]:\n[seconds] - The `systat' read-write number register contains the return value - of the `system()' function executed by the last `sy' request. + The 'systat' read-write number register contains the return value + of the 'system()' function executed by the last 'sy' request. -- Request: .open stream file -- Request: .opena stream file Open the specified FILE for writing and associates the specified STREAM with it. - The `opena' request is like `open', but if the file exists, append + The 'opena' request is like 'open', but if the file exists, append to it instead of truncating it. - Both `open' and `opena' cause an error if used in safer mode - (which is the default). Use `groff''s or `troff''s `-U' option to + Both 'open' and 'opena' cause an error if used in safer mode (which + is the default). Use 'groff''s or 'troff''s '-U' option to activate unsafe mode. -- Request: .write stream data -- Request: .writec stream data - Write to the file associated with the specified STREAM. The - stream must previously have been the subject of an open request. - The remainder of the line is interpreted as the `ds' request reads - its second argument: A leading `"' is stripped, and it is read in + Write to the file associated with the specified STREAM. The stream + must previously have been the subject of an open request. The + remainder of the line is interpreted as the 'ds' request reads its + second argument: A leading '"' is stripped, and it is read in copy-in mode. - The `writec' request is like `write', but only `write' appends a + The 'writec' request is like 'write', but only 'write' appends a newline to the data. -- Request: .writem stream xx - Write the contents of the macro or string XX to the file - associated with the specified STREAM. + Write the contents of the macro or string XX to the file associated + with the specified STREAM. XX is read in copy mode, i.e., already formatted elements are ignored. Consequently, diversions must be unformatted with the - `asciify' request before calling `writem'. Usually, this means a + 'asciify' request before calling 'writem'. Usually, this means a loss of information. -- Request: .close stream Close the specified STREAM; the stream is no longer an acceptable - argument to the `write' request. + argument to the 'write' request. Here a simple macro to write an index entry. - .open idx test.idx . .de IX @@ -2030,13 +1767,12 @@ . .close idx - -- Escape: \Ve -- Escape: \V(ev -- Escape: \V[env] Interpolate the contents of the specified environment variable ENV (one-character name E, two-character name EV) as returned by the - function `getenv'. `\V' is interpreted in copy-in mode. + function 'getenv'. '\V' is interpreted in copy-in mode.  File: groff.info, Node: Postprocessor Access, Next: Miscellaneous, Prev: I/O, Up: gtroff Reference @@ -2044,40 +1780,40 @@ 5.30 Postprocessor Access ========================= -There are two escapes which give information directly to the +There are two escapes that give information directly to the postprocessor. This is particularly useful for embedding POSTSCRIPT into the final document. -- Request: .device xxx -- Escape: \X'xxx' - Embeds its argument into the `gtroff' output preceded with `x X'. + Embeds its argument into the 'gtroff' output preceded with 'x X'. - The escapes `\&', `\)', `\%', and `\:' are ignored within `\X', - `\ ' and `\~' are converted to single space characters. All other - escapes (except `\\' which produces a backslash) cause an error. + The escapes '\&', '\)', '\%', and '\:' are ignored within '\X', + '\ ' and '\~' are converted to single space characters. All other + escapes (except '\\', which produces a backslash) cause an error. - Contrary to `\X', the `device' request simply processes its + Contrary to '\X', the 'device' request simply processes its argument in copy mode (*note Copy-in Mode::). - If the `use_charnames_in_special' keyword is set in the `DESC' + If the 'use_charnames_in_special' keyword is set in the 'DESC' file, special characters no longer cause an error; they are simply output verbatim. Additionally, the backslash is represented as - `\\'. + '\\'. - `use_charnames_in_special' is currently used by `grohtml' only. + 'use_charnames_in_special' is currently used by 'grohtml' only. -- Request: .devicem xx -- Escape: \Yn -- Escape: \Y(nm -- Escape: \Y[name] - This is approximately equivalent to `\X'\*[NAME]'' (one-character + This is approximately equivalent to '\X'\*[NAME]'' (one-character name N, two-character name NM). However, the contents of the string or macro NAME are not interpreted; also it is permitted for NAME to have been defined as a macro and thus contain newlines (it - is not permitted for the argument to `\X' to contain newlines). - The inclusion of newlines requires an extension to the UNIX - `troff' output format, and confuses drivers that do not know about - this extension (*note Device Control Commands::). + is not permitted for the argument to '\X' to contain newlines). + The inclusion of newlines requires an extension to the UNIX 'troff' + output format, and confuses drivers that do not know about this + extension (*note Device Control Commands::). *Note Output Devices::. @@ -2087,13 +1823,13 @@ 5.31 Miscellaneous ================== -This section documents parts of `gtroff' which cannot (yet) be +This section documents parts of 'gtroff' that cannot (yet) be categorized elsewhere in this manual. -- Request: .nm [start [inc [space [indent]]]] Print line numbers. START is the line number of the _next_ output line. INC indicates which line numbers are printed. For example, - the value 5 means to emit only line numbers which are multiples + the value 5 means to emit only line numbers that are multiples of 5; this defaults to 1. SPACE is the space to be left between the number and the text; this defaults to one digit space. The fourth argument is the indentation of the line numbers, defaulting @@ -2101,27 +1837,26 @@ spaces; they can be negative also. Without any arguments, line numbers are turned off. - `gtroff' reserves three digit spaces for the line number (which is + 'gtroff' reserves three digit spaces for the line number (which is printed right-justified) plus the amount given by INDENT; the output lines are concatenated to the line numbers, separated by SPACE, and _without_ reducing the line length. Depending on the - value of the horizontal page offset (as set with the `po' - request), line numbers which are longer than the reserved space - stick out to the left, or the whole line is moved to the right. + value of the horizontal page offset (as set with the 'po' request), + line numbers that are longer than the reserved space stick out to + the left, or the whole line is moved to the right. Parameters corresponding to missing arguments are not changed; any non-digit argument (to be more precise, any argument starting with a character valid as a delimiter for identifiers) is also treated as missing. - If line numbering has been disabled with a call to `nm' without an - argument, it can be reactivated with `.nm +0', using the previously + If line numbering has been disabled with a call to 'nm' without an + argument, it can be reactivated with '.nm +0', using the previously active line numbering parameters. - The parameters of `nm' are associated with the current environment + The parameters of 'nm' are associated with the current environment (*note Environments::). The current output line number is - available in the number register `ln'. - + available in the number register 'ln'. .po 1m .ll 2i @@ -2137,7 +1872,6 @@ And here the result: - This test shows how line numbering works 999 with groff. This @@ -2151,14 +1885,13 @@ 1005 line numbering works with groff. - -- Request: .nn [skip] Temporarily turn off line numbering. The argument is the number of lines not to be numbered; this defaults to 1. -- Request: .mc glyph [dist] - Print a "margin character" to the right of the text.(1) (*note - Miscellaneous-Footnote-1::) The first argument is the glyph to be + Print a "margin character" to the right of the text.(1) (*note + Miscellaneous-Footnote-1::) The first argument is the glyph to be printed. The second argument is the distance away from the right margin. If missing, the previously set value is used; default is 10pt). For text lines that are too long (that is, longer than the @@ -2168,11 +1901,10 @@ With no arguments the margin character is turned off. If this occurs before a break, no margin character is printed. - For compatibility with AT&T `troff', a call to `mc' to set the + For compatibility with AT&T 'troff', a call to 'mc' to set the margin character can't be undone immediately; at least one line gets a margin character. Thus - .ll 1i .mc \[br] .mc @@ -2182,11 +1914,10 @@ produces - xxx | xxx - For empty lines and lines produced by the `tl' request no margin + For empty lines and lines produced by the 'tl' request no margin character is emitted. The margin character is associated with the current environment @@ -2194,9 +1925,8 @@ This is quite useful for indicating text that has changed, and, in fact, there are programs available for doing this (they are called - `nrchbar' and `changebar' and can be found in any - `comp.sources.unix' archive). - + 'nrchbar' and 'changebar' and can be found in any + 'comp.sources.unix' archive). .ll 3i .mc | @@ -2211,7 +1941,6 @@ Result: - This paragraph is highlighted | with a margin character. | @@ -2220,7 +1949,6 @@ | But we can fake it with `\&'. | - -- Request: .psbb filename -- Register: \n[llx] -- Register: \n[lly] @@ -2228,13 +1956,13 @@ -- Register: \n[ury] Retrieve the bounding box of the POSTSCRIPT image found in FILENAME. The file must conform to Adobe's "Document Structuring - Conventions" (DSC); the command searches for a `%%BoundingBox' + Conventions" (DSC); the command searches for a '%%BoundingBox' comment and extracts the bounding box values into the number - registers `llx', `lly', `urx', and `ury'. If an error occurs (for - example, `psbb' cannot find the `%%BoundingBox' comment), it sets + registers 'llx', 'lly', 'urx', and 'ury'. If an error occurs (for + example, 'psbb' cannot find the '%%BoundingBox' comment), it sets the four number registers to zero. - The search path for FILENAME can be controlled with the `-I' + The search path for FILENAME can be controlled with the '-I' command line option.  @@ -2245,36 +1973,35 @@  File: groff.info, Node: Gtroff Internals, Next: Debugging, Prev: Miscellaneous, Up: gtroff Reference -5.32 `gtroff' Internals +5.32 'gtroff' Internals ======================= -`gtroff' processes input in three steps. One or more input characters -are converted to an "input token".(1) (*note Gtroff -Internals-Footnote-1::) Then, one or more input tokens are converted to +'gtroff' processes input in three steps. One or more input characters +are converted to an "input token".(1) (*note Gtroff +Internals-Footnote-1::) Then, one or more input tokens are converted to an "output node". Finally, output nodes are converted to the intermediate output language understood by all output devices. - Actually, before step one happens, `gtroff' converts certain escape + Actually, before step one happens, 'gtroff' converts certain escape sequences into reserved input characters (not accessible by the user); such reserved characters are used for other internal processing also - this is the very reason why not all characters are valid input. *Note Identifiers::, for more on this topic. - For example, the input string `fi\[:u]' is converted into a -character token `f', a character token `i', and a special token `:u' -(representing u umlaut). Later on, the character tokens `f' and `i' -are merged to a single output node representing the ligature glyph `fi' -(provided the current font has a glyph for this ligature); the same -happens with `:u'. All output glyph nodes are `processed' which means -that they are invariably associated with a given font, font size, -advance width, etc. During the formatting process, `gtroff' itself -adds various nodes to control the data flow. + For example, the input string 'fi\[:u]' is converted into a character +token 'f', a character token 'i', and a special token ':u' (representing +u umlaut). Later on, the character tokens 'f' and 'i' are merged to a +single output node representing the ligature glyph 'fi' (provided the +current font has a glyph for this ligature); the same happens with ':u'. +All output glyph nodes are 'processed', which means that they are +invariably associated with a given font, font size, advance width, etc. +During the formatting process, 'gtroff' itself adds various nodes to +control the data flow. Macros, diversions, and strings collect elements in two chained -lists: a list of input tokens which have been passed unprocessed, and a +lists: a list of input tokens that have been passed unprocessed, and a list of output nodes. Consider the following the diversion. - .di xxx a \!b @@ -2285,59 +2012,56 @@ It contains these elements. node list token list element number + line start node -- 1 -glyph node `a' -- 2 +glyph node 'a' -- 2 word space node -- 3 --- `b' 4 --- `\n' 5 -glyph node `c' -- 6 +-- 'b' 4 +-- '\n' 5 +glyph node 'c' -- 6 vertical size node -- 7 vertical size node -- 8 --- `\n' 9 +-- '\n' 9 -Elements 1, 7, and 8 are inserted by `gtroff'; the latter two (which -are always present) specify the vertical extent of the last line, -possibly modified by `\x'. The `br' request finishes the current -partial line, inserting a newline input token which is subsequently -converted to a space when the diversion is reread. Note that the word -space node has a fixed width which isn't stretchable anymore. To -convert horizontal space nodes back to input tokens, use the `unformat' -request. +Elements 1, 7, and 8 are inserted by 'gtroff'; the latter two (which are +always present) specify the vertical extent of the last line, possibly +modified by '\x'. The 'br' request finishes the current partial line, +inserting a newline input token, which is subsequently converted to a +space when the diversion is reread. Note that the word space node has a +fixed width that isn't stretchable anymore. To convert horizontal space +nodes back to input tokens, use the 'unformat' request. Macros only contain elements in the token list (and the node list is empty); diversions and strings can contain elements in both lists. - Note that the `chop' request simply reduces the number of elements -in a macro, string, or diversion by one. Exceptions are "compatibility -save" and "compatibility ignore" input tokens which are ignored. The -`substring' request also ignores those input tokens. + Note that the 'chop' request simply reduces the number of elements in +a macro, string, or diversion by one. Exceptions are "compatibility +save" and "compatibility ignore" input tokens, which are ignored. The +'substring' request also ignores those input tokens. - Some requests like `tr' or `cflags' work on glyph identifiers only; + Some requests like 'tr' or 'cflags' work on glyph identifiers only; this means that the associated glyph can be changed without destroying -this association. This can be very helpful for substituting glyphs. -In the following example, we assume that glyph `foo' isn't available by -default, so we provide a substitution using the `fchar' request and map -it to input character `x'. - +this association. This can be very helpful for substituting glyphs. In +the following example, we assume that glyph 'foo' isn't available by +default, so we provide a substitution using the 'fchar' request and map +it to input character 'x'. .fchar \[foo] foo .tr x \[foo] -Now let us assume that we install an additional special font `bar' -which has glyph `foo'. - +Now let us assume that we install an additional special font 'bar' that +has glyph 'foo'. .special bar .rchar \[foo] -Since glyphs defined with `fchar' are searched before glyphs in special -fonts, we must call `rchar' to remove the definition of the fallback -glyph. Anyway, the translation is still active; `x' now maps to the -real glyph `foo'. +Since glyphs defined with 'fchar' are searched before glyphs in special +fonts, we must call 'rchar' to remove the definition of the fallback +glyph. Anyway, the translation is still active; 'x' now maps to the +real glyph 'foo'. Macro and request arguments preserve the compatibility mode: - .cp 1 \" switch to compatibility mode .de xx \\$1 @@ -2346,10 +2070,10 @@ .xx caf\['e] => café -Since compatibility mode is on while `de' is called, the macro `xx' -activates compatibility mode while executing. Argument `$1' can still +Since compatibility mode is on while 'de' is called, the macro 'xx' +activates compatibility mode while executing. Argument '$1' can still be handled properly because it inherits the compatibility mode status -which was active at the point where `xx' is called. +which was active at the point where 'xx' is called. After expansion of the parameters, the compatibility save and restore tokens are removed. @@ -2357,8 +2081,8 @@  File: groff.info, Node: Gtroff Internals-Footnotes, Up: Gtroff Internals - (1) Except the escapes `\f', `\F', `\H', `\m', `\M', `\R', `\s', and -`\S' which are processed immediately if not in copy-in mode. + (1) Except the escapes '\f', '\F', '\H', '\m', '\M', '\R', '\s', and +'\S', which are processed immediately if not in copy-in mode.  File: groff.info, Node: Debugging, Next: Implementation Differences, Prev: Gtroff Internals, Up: gtroff Reference @@ -2366,22 +2090,22 @@ 5.33 Debugging ============== -`gtroff' is not easy to debug, but there are some useful features and +'gtroff' is not easy to debug, but there are some useful features and strategies for debugging. -- Request: .lf line [filename] - Change the line number and optionally the file name `gtroff' shall + Change the line number and optionally the file name 'gtroff' shall use for error and warning messages. LINE is the input line number of the _next_ line. Without argument, the request is ignored. - This is a debugging aid for documents which are split into many - files, then put together with `soelim' and other preprocessors. + This is a debugging aid for documents that are split into many + files, then put together with 'soelim' and other preprocessors. Usually, it isn't invoked manually. - Note that other `troff' implementations (including the original - AT&T version) handle `lf' differently. For them, LINE changes the + Note that other 'troff' implementations (including the original + AT&T version) handle 'lf' differently. For them, LINE changes the line number of the _current_ line. -- Request: .tm string @@ -2392,67 +2116,65 @@ STRING is read in copy mode. - The `tm' request ignores leading spaces of STRING; `tm1' handles - its argument similar to the `ds' request: a leading double quote - in STRING is stripped to allow initial blanks. + The 'tm' request ignores leading spaces of STRING; 'tm1' handles + its argument similar to the 'ds' request: a leading double quote in + STRING is stripped to allow initial blanks. - The `tmc' request is similar to `tm1' but does not append a - newline (as is done in `tm' and `tm1'). + The 'tmc' request is similar to 'tm1' but does not append a newline + (as is done in 'tm' and 'tm1'). -- Request: .ab [string] - Similar to the `tm' request, except that it causes `gtroff' to - stop processing. With no argument it prints `User Abort.' to - standard error. + Similar to the 'tm' request, except that it causes 'gtroff' to stop + processing. With no argument it prints 'User Abort.' to standard + error. -- Request: .ex - The `ex' request also causes `gtroff' to stop processing; see also + The 'ex' request also causes 'gtroff' to stop processing; see also *note I/O::. When doing something involved it is useful to leave the debugging statements in the code and have them turned on by a command line flag. - .if \n(DB .tm debugging output To activate these statements say - groff -rDB=1 file If it is known in advance that there are many errors and no useful -output, `gtroff' can be forced to suppress formatted output with the -`-z' flag. +output, 'gtroff' can be forced to suppress formatted output with the +'-z' flag. -- Request: .pev Print the contents of the current environment and all the currently - defined environments (both named and numbered) on `stderr'. + defined environments (both named and numbered) on 'stderr'. -- Request: .pm - Print the entire symbol table on `stderr'. Names of all defined + Print the entire symbol table on 'stderr'. Names of all defined macros, strings, and diversions are print together with their size - in bytes. Since `gtroff' sometimes adds nodes by itself, the + in bytes. Since 'gtroff' sometimes adds nodes by itself, the returned size can be larger than expected. - This request differs from UNIX `troff': `gtroff' reports the sizes + This request differs from UNIX 'troff': 'gtroff' reports the sizes of diversions, ignores an additional argument to print only the total of the sizes, and the size isn't returned in blocks of 128 characters. -- Request: .pnr Print the names and contents of all currently defined number - registers on `stderr'. + registers on 'stderr'. -- Request: .ptr Print the names and positions of all traps (not including input - line traps and diversion traps) on `stderr'. Empty slots in the + line traps and diversion traps) on 'stderr'. Empty slots in the page trap list are printed as well, because they can affect the priority of subsequently planted traps. -- Request: .fl - Instruct `gtroff' to flush its output immediately. The intent is + Instruct 'gtroff' to flush its output immediately. The intent is for interactive use, but this behaviour is currently not - implemented in `gtroff'. Contrary to UNIX `troff', TTY output is - sent to a device driver also (`grotty'), making it non-trivial to + implemented in 'gtroff'. Contrary to UNIX 'troff', TTY output is + sent to a device driver also ('grotty'), making it non-trivial to communicate interactively. This request causes a line break. @@ -2460,8 +2182,7 @@ -- Request: .backtrace Print a backtrace of the input stack to the standard error stream. - Consider the following in file `test': - + Consider the following in file 'test': .de xxx . backtrace @@ -2472,62 +2193,59 @@ . .yyy - On execution, `gtroff' prints the following: - + On execution, 'gtroff' prints the following: test:2: backtrace: macro `xxx' test:5: backtrace: macro `yyy' test:8: backtrace: file `test' - The option `-b' of `gtroff' internally calls a variant of this + The option '-b' of 'gtroff' internally calls a variant of this request on each error and warning. -- Register: \n[slimit] - Use the `slimit' number register to set the maximum number of - objects on the input stack. If `slimit' is less than or equal + Use the 'slimit' number register to set the maximum number of + objects on the input stack. If 'slimit' is less than or equal to 0, there is no limit set. With no limit, a buggy recursive macro can exhaust virtual memory. The default value is 1000; this is a compile-time constant. -- Request: .warnscale si - Set the scaling indicator used in warnings to SI. Valid values - for SI are `u', `i', `c', `p', and `P'. At startup, it is set to - `i'. + Set the scaling indicator used in warnings to SI. Valid values for + SI are 'u', 'i', 'c', 'p', and 'P'. At startup, it is set to 'i'. -- Request: .spreadwarn [limit] - Make `gtroff' emit a warning if the additional space inserted for + Make 'gtroff' emit a warning if the additional space inserted for each space between words in an output line is larger or equal to LIMIT. A negative value is changed to zero; no argument toggles - the warning on and off without changing LIMIT. The default - scaling indicator is `m'. At startup, `spreadwarn' is - deactivated, and LIMIT is set to 3m. + the warning on and off without changing LIMIT. The default scaling + indicator is 'm'. At startup, 'spreadwarn' is deactivated, and + LIMIT is set to 3m. For example, - .spreadwarn 0.2m - causes a warning if `gtroff' must add 0.2m or more for each + causes a warning if 'gtroff' must add 0.2m or more for each interword space in a line. This request is active only if text is justified to both margins - (using `.ad b'). + (using '.ad b'). - `gtroff' has command line options for printing out more warnings -(`-w') and for printing backtraces (`-b') when a warning or an error -occurs. The most verbose level of warnings is `-ww'. + 'gtroff' has command line options for printing out more warnings +('-w') and for printing backtraces ('-b') when a warning or an error +occurs. The most verbose level of warnings is '-ww'. -- Request: .warn [flags] -- Register: \n[.warn] Control the level of warnings checked for. The FLAGS are the sum of the numbers associated with each warning that is to be enabled; all other warnings are disabled. The number associated with each - warning is listed below. For example, `.warn 0' disables all - warnings, and `.warn 1' disables all warnings except that about + warning is listed below. For example, '.warn 0' disables all + warnings, and '.warn 1' disables all warnings except that about missing glyphs. If no argument is given, all warnings are enabled. - The read-only number register `.warn' contains the current warning + The read-only number register '.warn' contains the current warning level. * Menu: @@ -2540,90 +2258,90 @@ 5.33.1 Warnings --------------- -The warnings that can be given to `gtroff' are divided into the +The warnings that can be given to 'gtroff' are divided into the following categories. The name associated with each warning is used by -the `-w' and `-W' options; the number is used by the `warn' request and -by the `.warn' register. +the '-w' and '-W' options; the number is used by the 'warn' request and +by the '.warn' register. -`char' -`1' - Non-existent glyphs.(1) (*note Warnings-Footnote-1::) This is +'char' +'1' + Non-existent glyphs.(1) (*note Warnings-Footnote-1::) This is enabled by default. -`number' -`2' +'number' +'2' Invalid numeric expressions. This is enabled by default. *Note Expressions::. -`break' -`4' - In fill mode, lines which could not be broken so that their length +'break' +'4' + In fill mode, lines that could not be broken so that their length was less than the line length. This is enabled by default. -`delim' -`8' +'delim' +'8' Missing or mismatched closing delimiters. -`el' -`16' - Use of the `el' request with no matching `ie' request. *Note +'el' +'16' + Use of the 'el' request with no matching 'ie' request. *Note if-else::. -`scale' -`32' +'scale' +'32' Meaningless scaling indicators. -`range' -`64' +'range' +'64' Out of range arguments. -`syntax' -`128' +'syntax' +'128' Dubious syntax in numeric expressions. -`di' -`256' - Use of `di' or `da' without an argument when there is no current +'di' +'256' + Use of 'di' or 'da' without an argument when there is no current diversion. -`mac' -`512' +'mac' +'512' Use of undefined strings, macros and diversions. When an undefined string, macro, or diversion is used, that string is automatically defined as empty. So, in most cases, at most one warning is given for each name. -`reg' -`1024' +'reg' +'1024' Use of undefined number registers. When an undefined number register is used, that register is automatically defined to have a value of 0. So, in most cases, at most one warning is given for use of a particular name. -`tab' -`2048' +'tab' +'2048' Use of a tab character where a number was expected. -`right-brace' -`4096' - Use of `\}' where a number was expected. +'right-brace' +'4096' + Use of '\}' where a number was expected. -`missing' -`8192' +'missing' +'8192' Requests that are missing non-optional arguments. -`input' -`16384' +'input' +'16384' Invalid input characters. -`escape' -`32768' +'escape' +'32768' Unrecognized escape sequences. When an unrecognized escape - sequence `\X' is encountered, the escape character is ignored, and + sequence '\X' is encountered, the escape character is ignored, and X is printed. -`space' -`65536' +'space' +'65536' Missing space between a request or macro and its argument. This warning is given when an undefined name longer than two characters is encountered, and the first two characters of the name make a @@ -2632,36 +2350,36 @@ enabled by default. This warning never occurs in compatibility mode. -`font' -`131072' +'font' +'131072' Non-existent fonts. This is enabled by default. -`ig' -`262144' - Invalid escapes in text ignored with the `ig' request. These are +'ig' +'262144' + Invalid escapes in text ignored with the 'ig' request. These are conditions that are errors when they do not occur in ignored text. -`color' -`524288' +'color' +'524288' Color related warnings. -`file' -`1048576' - Missing files. The `mso' request gives this warning when the +'file' +'1048576' + Missing files. The 'mso' request gives this warning when the requested macro file does not exist. This is enabled by default. -`all' - All warnings except `di', `mac' and `reg'. It is intended that +'all' + All warnings except 'di', 'mac' and 'reg'. It is intended that this covers all warnings that are useful with traditional macro packages. -`w' +'w' All warnings.  File: groff.info, Node: Warnings-Footnotes, Up: Warnings - (1) `char' is a misnomer since it reports missing glyphs - there + (1) 'char' is a misnomer since it reports missing glyphs - there aren't missing input characters, only invalid ones.  @@ -2670,95 +2388,90 @@ 5.34 Implementation Differences =============================== -GNU `troff' has a number of features which cause incompatibilities with -documents written with old versions of `troff'. - - Long names cause some incompatibilities. UNIX `troff' interprets +GNU 'troff' has a number of features that cause incompatibilities with +documents written with old versions of 'troff'. + Long names cause some incompatibilities. UNIX 'troff' interprets .dsabcd -as defining a string `ab' with contents `cd'. Normally, GNU `troff' -interprets this as a call of a macro named `dsabcd'. Also UNIX `troff' -interprets `\*[' or `\n[' as references to a string or number register -called `['. In GNU `troff', however, this is normally interpreted as -the start of a long name. In compatibility mode GNU `troff' interprets +as defining a string 'ab' with contents 'cd'. Normally, GNU 'troff' +interprets this as a call of a macro named 'dsabcd'. Also UNIX 'troff' +interprets '\*[' or '\n[' as references to a string or number register +called '['. In GNU 'troff', however, this is normally interpreted as +the start of a long name. In compatibility mode GNU 'troff' interprets long names in the traditional way (which means that they are not recognized as names). -- Request: .cp [n] -- Request: .do cmd -- Register: \n[.C] - If N is missing or non-zero, turn on compatibility mode; - otherwise, turn it off. + If N is missing or non-zero, turn on compatibility mode; otherwise, + turn it off. - The read-only number register `.C' is 1 if compatibility mode is + The read-only number register '.C' is 1 if compatibility mode is on, 0 otherwise. - Compatibility mode can be also turned on with the `-C' command - line option. + Compatibility mode can be also turned on with the '-C' command line + option. - The `do' request turns off compatibility mode while executing its - arguments as a `gtroff' command. However, it does not turn off + The 'do' request turns off compatibility mode while executing its + arguments as a 'gtroff' command. However, it does not turn off compatibility mode while processing the macro itself. To do that, - use the `de1' request (or manipulate the `.C' register manually). + use the 'de1' request (or manipulate the '.C' register manually). *Note Writing Macros::. - .do fam T - executes the `fam' request when compatibility mode is enabled. + executes the 'fam' request when compatibility mode is enabled. - `gtroff' restores the previous compatibility setting before + 'gtroff' restores the previous compatibility setting before interpreting any files sourced by the CMD. - Two other features are controlled by `-C'. If not in compatibility -mode, GNU `troff' preserves the input level in delimited arguments: - + Two other features are controlled by '-C'. If not in compatibility +mode, GNU 'troff' preserves the input level in delimited arguments: .ds xx ' \w'abc\*(xxdef' -In compatibility mode, the string `72def'' is returned; without `-C' -the resulting string is `168' (assuming a TTY output device). - - Finally, the escapes `\f', `\H', `\m', `\M', `\R', `\s', and `\S' -are transparent for recognizing the beginning of a line only in -compatibility mode (this is a rather obscure feature). For example, -the code +In compatibility mode, the string '72def'' is returned; without '-C' the +resulting string is '168' (assuming a TTY output device). + Finally, the escapes '\f', '\H', '\m', '\M', '\R', '\s', and '\S' are +transparent for recognizing the beginning of a line only in +compatibility mode (this is a rather obscure feature). For example, the +code .de xx Hallo! .. \fB.xx\fP -prints `Hallo!' in bold face if in compatibility mode, and `.xx' in -bold face otherwise. - - GNU `troff' does not allow the use of the escape sequences `\|', -`\^', `\&', `\{', `\}', `\', `\'', `\`', `\-', `\_', `\!', `\%', -and `\c' in names of strings, macros, diversions, number registers, -fonts or environments; UNIX `troff' does. The `\A' escape sequence -(*note Identifiers::) may be helpful in avoiding use of these escape -sequences in names. +prints 'Hallo!' in bold face if in compatibility mode, and '.xx' in bold +face otherwise. - Fractional point sizes cause one noteworthy incompatibility. In -UNIX `troff' the `ps' request ignores scale indicators and thus + GNU 'troff' does not allow the use of the escape sequences '\|', +'\^', '\&', '\{', '\}', '\', '\'', '\`', '\-', '\_', '\!', '\%', and +'\c' in names of strings, macros, diversions, number registers, fonts or +environments; UNIX 'troff' does. The '\A' escape sequence (*note +Identifiers::) may be helpful in avoiding use of these escape sequences +in names. + Fractional point sizes cause one noteworthy incompatibility. In UNIX +'troff' the 'ps' request ignores scale indicators and thus .ps 10u -sets the point size to 10 points, whereas in GNU `troff' it sets the -point size to 10 scaled points. *Note Fractional Type Sizes::, for -more information. +sets the point size to 10 points, whereas in GNU 'troff' it sets the +point size to 10 scaled points. *Note Fractional Type Sizes::, for more +information. - In GNU `troff' there is a fundamental difference between + In GNU 'troff' there is a fundamental difference between (unformatted) input characters and (formatted) output glyphs. Everything that affects how a glyph is output is stored with the glyph node; once a glyph node has been constructed it is unaffected by any -subsequent requests that are executed, including `bd', `cs', `tkf', -`tr', or `fp' requests. Normally glyphs are constructed from input +subsequent requests that are executed, including 'bd', 'cs', 'tkf', +'tr', or 'fp' requests. Normally glyphs are constructed from input characters at the moment immediately before the glyph is added to the current output line. Macros, diversions and strings are all, in fact, the same type of object; they contain lists of input characters and @@ -2767,26 +2480,25 @@ inherit any of the special properties that the input character from which it was constructed might have had. For example, - .di x \\\\ .br .di .x -prints `\\' in GNU `troff'; each pair of input backslashes is turned +prints '\\' in GNU 'troff'; each pair of input backslashes is turned into one output backslash and the resulting output backslashes are not -interpreted as escape characters when they are reread. UNIX `troff' +interpreted as escape characters when they are reread. UNIX 'troff' would interpret them as escape characters when they were reread and -would end up printing one `\'. The correct way to obtain a printable -backslash is to use the `\e' escape sequence: This always prints a +would end up printing one '\'. The correct way to obtain a printable +backslash is to use the '\e' escape sequence: This always prints a single instance of the current escape character, regardless of whether -or not it is used in a diversion; it also works in both GNU `troff' and -UNIX `troff'.(1) (*note Implementation Differences-Footnote-1::) To +or not it is used in a diversion; it also works in both GNU 'troff' and +UNIX 'troff'.(1) (*note Implementation Differences-Footnote-1::) To store, for some reason, an escape sequence in a diversion that is interpreted when the diversion is reread, either use the traditional -`\!' transparent output facility, or, if this is unsuitable, the new -`\?' escape sequence. +'\!' transparent output facility, or, if this is unsuitable, the new +'\?' escape sequence. *Note Diversions::, and *note Gtroff Internals::, for more information. @@ -2794,8 +2506,8 @@  File: groff.info, Node: Implementation Differences-Footnotes, Up: Implementation Differences - (1) To be completely independent of the current escape character, -use `\(rs' which represents a reverse solidus (backslash) glyph. + (1) To be completely independent of the current escape character, use +'\(rs', which represents a reverse solidus (backslash) glyph.  File: groff.info, Node: Preprocessors, Next: Output Devices, Prev: gtroff Reference, Up: Top @@ -2803,8 +2515,8 @@ 6 Preprocessors *************** -This chapter describes all preprocessors that come with `groff' or -which are freely available. +This chapter describes all preprocessors that come with 'groff' or which +are freely available. * Menu: @@ -2821,7 +2533,7 @@  File: groff.info, Node: geqn, Next: gtbl, Prev: Preprocessors, Up: Preprocessors -6.1 `geqn' +6.1 'geqn' ========== * Menu: @@ -2831,13 +2543,13 @@  File: groff.info, Node: Invoking geqn, Prev: geqn, Up: geqn -6.1.1 Invoking `geqn' +6.1.1 Invoking 'geqn' ---------------------  File: groff.info, Node: gtbl, Next: gpic, Prev: geqn, Up: Preprocessors -6.2 `gtbl' +6.2 'gtbl' ========== * Menu: @@ -2847,13 +2559,13 @@  File: groff.info, Node: Invoking gtbl, Prev: gtbl, Up: gtbl -6.2.1 Invoking `gtbl' +6.2.1 Invoking 'gtbl' ---------------------  File: groff.info, Node: gpic, Next: ggrn, Prev: gtbl, Up: Preprocessors -6.3 `gpic' +6.3 'gpic' ========== * Menu: @@ -2863,13 +2575,13 @@  File: groff.info, Node: Invoking gpic, Prev: gpic, Up: gpic -6.3.1 Invoking `gpic' +6.3.1 Invoking 'gpic' ---------------------  File: groff.info, Node: ggrn, Next: grap, Prev: gpic, Up: Preprocessors -6.4 `ggrn' +6.4 'ggrn' ========== * Menu: @@ -2879,24 +2591,24 @@  File: groff.info, Node: Invoking ggrn, Prev: ggrn, Up: ggrn -6.4.1 Invoking `ggrn' +6.4.1 Invoking 'ggrn' ---------------------  File: groff.info, Node: grap, Next: gchem, Prev: ggrn, Up: Preprocessors -6.5 `grap' +6.5 'grap' ========== -A free implementation of `grap', written by Ted Faber, is available as +A free implementation of 'grap', written by Ted Faber, is available as an extra package from the following address: - `http://www.lunabase.org/~faber/Vault/software/grap/' +  File: groff.info, Node: gchem, Next: grefer, Prev: grap, Up: Preprocessors -6.6 `gchem' +6.6 'gchem' =========== * Menu: @@ -2906,13 +2618,13 @@  File: groff.info, Node: Invoking gchem, Prev: gchem, Up: gchem -6.6.1 Invoking `gchem' +6.6.1 Invoking 'gchem' ----------------------  File: groff.info, Node: grefer, Next: gsoelim, Prev: gchem, Up: Preprocessors -6.7 `grefer' +6.7 'grefer' ============ * Menu: @@ -2922,13 +2634,13 @@  File: groff.info, Node: Invoking grefer, Prev: grefer, Up: grefer -6.7.1 Invoking `grefer' +6.7.1 Invoking 'grefer' -----------------------  File: groff.info, Node: gsoelim, Next: preconv, Prev: grefer, Up: Preprocessors -6.8 `gsoelim' +6.8 'gsoelim' ============= * Menu: @@ -2938,13 +2650,13 @@  File: groff.info, Node: Invoking gsoelim, Prev: gsoelim, Up: gsoelim -6.8.1 Invoking `gsoelim' +6.8.1 Invoking 'gsoelim' ------------------------  File: groff.info, Node: preconv, Prev: gsoelim, Up: Preprocessors -6.9 `preconv' +6.9 'preconv' ============= * Menu: @@ -2954,7 +2666,7 @@  File: groff.info, Node: Invoking preconv, Prev: preconv, Up: preconv -6.9.1 Invoking `preconv' +6.9.1 Invoking 'preconv' ------------------------  @@ -2986,12 +2698,12 @@  File: groff.info, Node: grotty, Next: grops, Prev: Special Characters, Up: Output Devices -7.2 `grotty' +7.2 'grotty' ============ -The postprocessor `grotty' translates the output from GNU `troff' into -a form suitable for typewriter-like devices. It is fully documented on -its manual page, `grotty(1)'. +The postprocessor 'grotty' translates the output from GNU 'troff' into a +form suitable for typewriter-like devices. It is fully documented on +its manual page, 'grotty(1)'. * Menu: @@ -3000,74 +2712,73 @@  File: groff.info, Node: Invoking grotty, Prev: grotty, Up: grotty -7.2.1 Invoking `grotty' +7.2.1 Invoking 'grotty' ----------------------- -The postprocessor `grotty' accepts the following command-line options: +The postprocessor 'grotty' accepts the following command-line options: -`-b' - Do not overstrike bold glyphs. Ignored if `-c' isn't used. +'-b' + Do not overstrike bold glyphs. Ignored if '-c' isn't used. -`-B' - Do not underline bold-italic glyphs. Ignored if `-c' isn't used. +'-B' + Do not underline bold-italic glyphs. Ignored if '-c' isn't used. -`-c' +'-c' Use overprint and disable colours for printing on legacy Teletype printers (see below). -`-d' - Do not render lines (this is, ignore all `\D' escapes). +'-d' + Do not render lines (this is, ignore all '\D' escapes). -`-f' +'-f' Use form feed control characters in the output. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font and device description files, given the target device - NAME. +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font and device description files, given the target device NAME. -`-h' +'-h' Use horizontal tabs for sequences of 8 space characters. -`-i' - Request italic glyphs from the terminal. Ignored if `-c' is +'-i' + Request italic glyphs from the terminal. Ignored if '-c' is active. -`-o' +'-o' Do not overstrike. -`-r' - Highlight italic glyphs. Ignored if `-c' is active. +'-r' + Highlight italic glyphs. Ignored if '-c' is active. -`-u' - Do not underline italic glyphs. Ignored if `-c' isn't used. +'-u' + Do not underline italic glyphs. Ignored if '-c' isn't used. -`-U' - Do not overstrike bold-italic glyphs. Ignored if `-c' isn't used. +'-U' + Do not overstrike bold-italic glyphs. Ignored if '-c' isn't used. -`-v' +'-v' Print the version number. - The `-c' mode for TTY output devices means that underlining is done -by emitting sequences of `_' and `^H' (the backspace character) before + The '-c' mode for TTY output devices means that underlining is done +by emitting sequences of '_' and '^H' (the backspace character) before the actual character. Literally, this is printing an underline character, then moving the caret back one character position, and printing the actual character at the same position as the underline character (similar to a typewriter). Usually, a modern terminal can't interpret this (and the original Teletype machines for which this sequence was appropriate are no longer in use). You need a pager -program like `less' which translates this into ISO 6429 SGR sequences -to control terminals. +program like 'less' that translates this into ISO 6429 SGR sequences to +control terminals.  File: groff.info, Node: grops, Next: gropdf, Prev: grotty, Up: Output Devices -7.3 `grops' +7.3 'grops' =========== -The postprocessor `grops' translates the output from GNU `troff' into a +The postprocessor 'grops' translates the output from GNU 'troff' into a form suitable for Adobe POSTSCRIPT devices. It is fully documented on -its manual page, `grops(1)'. +its manual page, 'grops(1)'. * Menu: @@ -3077,55 +2788,55 @@  File: groff.info, Node: Invoking grops, Next: Embedding PostScript, Prev: grops, Up: grops -7.3.1 Invoking `grops' +7.3.1 Invoking 'grops' ---------------------- -The postprocessor `grops' accepts the following command-line options: +The postprocessor 'grops' accepts the following command-line options: -`-bFLAGS' - Use backward compatibility settings given by FLAGS as documented - in the `grops(1)' manual page. Overrides the command `broken' in - the `DESC' file. +'-bFLAGS' + Use backward compatibility settings given by FLAGS as documented in + the 'grops(1)' manual page. Overrides the command 'broken' in the + 'DESC' file. -`-cN' +'-cN' Print N copies of each page. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font, prologue and device description files, given the target +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font, prologue and device description files, given the target device NAME, usually *ps*. -`-g' +'-g' Tell the printer to guess the page length. Useful for printing vertically centered pages when the paper dimensions are determined at print time. -`-IPATH ...' - Consider the directory `PATH' for searching included files +'-IPATH ...' + Consider the directory 'PATH' for searching included files specified with relative paths. The current directory is searched as fallback. -`-l' +'-l' Use landscape orientation. -`-m' +'-m' Use manual feed. -`-pPAPERSIZE' - Set the page dimensions. Overrides the commands `papersize', - `paperlength', and `paperwidth' in the `DESC' file. See the - `groff_font(5)' manual page for details. +'-pPAPERSIZE' + Set the page dimensions. Overrides the commands 'papersize', + 'paperlength', and 'paperwidth' in the 'DESC' file. See the + 'groff_font(5)' manual page for details. -`-PPROLOGUE' +'-PPROLOGUE' Use the PROLOGUE in the font path as the prologue instead of the - default `prologue'. Overrides the environment variable - `GROPS_PROLOGUE'. + default 'prologue'. Overrides the environment variable + 'GROPS_PROLOGUE'. -`-wN' +'-wN' Set the line thickness to N/1000em. Overrides the default value N = 40. -`-v' +'-v' Print the version number.  @@ -3136,28 +2847,28 @@ The escape sequence - `\X'ps: import FILE LLX LLY URX URY WIDTH [HEIGHT]'' + '\X'ps: import FILE LLX LLY URX URY WIDTH [HEIGHT]'' places a rectangle of the specified WIDTH containing the POSTSCRIPT drawing from file FILE bound by the box from LLX LLY to URX URY (in POSTSCRIPT coordinates) at the insertion point. If HEIGHT is not specified, the embedded drawing is scaled proportionally. - *Note Miscellaneous::, for the `psbb' request which automatically + *Note Miscellaneous::, for the 'psbb' request, which automatically generates the bounding box. - This escape sequence is used internally by the macro `PSPIC' (see -the `groff_tmac(5)' manual page). + This escape sequence is used internally by the macro 'PSPIC' (see the +'groff_tmac(5)' manual page).  File: groff.info, Node: gropdf, Next: grodvi, Prev: grops, Up: Output Devices -7.4 `gropdf' +7.4 'gropdf' ============ -The postprocessor `gropdf' translates the output from GNU `troff' into -a form suitable for Adobe PDF devices. It is fully documented on its -manual page, `gropdf(1)'. +The postprocessor 'gropdf' translates the output from GNU 'troff' into a +form suitable for Adobe PDF devices. It is fully documented on its +manual page, 'gropdf(1)'. * Menu: @@ -3167,48 +2878,48 @@  File: groff.info, Node: Invoking gropdf, Next: Embedding PDF, Prev: gropdf, Up: gropdf -7.4.1 Invoking `gropdf' +7.4.1 Invoking 'gropdf' ----------------------- -The postprocessor `gropdf' accepts the following command-line options: +The postprocessor 'gropdf' accepts the following command-line options: -`-d' - Produce uncompressed PDFs which include debugging comments. +'-d' + Produce uncompressed PDFs that include debugging comments. -`-e' - This forces `gropdf' to embed all used fonts in the PDF, even if +'-e' + This forces 'gropdf' to embed all used fonts in the PDF, even if they are one of the 14 base Adobe fonts. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font, prologue and device description files, given the target +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font, prologue and device description files, given the target device NAME, usually *pdf*. -`-yFOUNDRY' +'-yFOUNDRY' This forces the use of a different font foundry. -`-l' +'-l' Use landscape orientation. -`-pPAPERSIZE' - Set the page dimensions. Overrides the commands `papersize', - `paperlength', and `paperwidth' in the `DESC' file. See the - `groff_font(5)' manual page for details. +'-pPAPERSIZE' + Set the page dimensions. Overrides the commands 'papersize', + 'paperlength', and 'paperwidth' in the 'DESC' file. See the + 'groff_font(5)' manual page for details. -`-v' +'-v' Print the version number. -`-s' +'-s' Append a comment line to end of PDF showing statistics, i.e. - number of pages in document. Ghostscript's `ps2pdf(1)' complains + number of pages in document. Ghostscript's 'ps2pdf(1)' complains about this line if it is included, but works anyway. -`-uFILENAME' - `gropdf' normally includes a ToUnicode CMap with any font created - using `text.enc' as the encoding file, this makes it easier to - search for words which contain ligatures. You can include your - own CMap by specifying a FILENAME or have no CMap at all by - omitting the FILENAME. +'-uFILENAME' + 'gropdf' normally includes a ToUnicode CMap with any font created + using 'text.enc' as the encoding file, this makes it easier to + search for words that contain ligatures. You can include your own + CMap by specifying a FILENAME or have no CMap at all by omitting + the FILENAME.  File: groff.info, Node: Embedding PDF, Prev: Invoking gropdf, Up: gropdf @@ -3218,24 +2929,24 @@ The escape sequence - `\X'pdf: pdfpic FILE ALIGNMENT WIDTH [HEIGHT] [LINELENGTH]'' + '\X'pdf: pdfpic FILE ALIGNMENT WIDTH [HEIGHT] [LINELENGTH]'' places a rectangle of the specified WIDTH containing the PDF drawing -from file FILE of desired WIDTH and HEIGHT (if HEIGHT is missing or -zero then it is scaled proportionally). If ALIGNMENT is `-L' the -drawing is left aligned. If it is `-C' or `-R' a LINELENGTH greater -than the width of the drawing is required as well. If WIDTH is -specified as zero then the width is scaled in proportion to the height. +from file FILE of desired WIDTH and HEIGHT (if HEIGHT is missing or zero +then it is scaled proportionally). If ALIGNMENT is '-L' the drawing is +left aligned. If it is '-C' or '-R' a LINELENGTH greater than the width +of the drawing is required as well. If WIDTH is specified as zero then +the width is scaled in proportion to the height.  File: groff.info, Node: grodvi, Next: grolj4, Prev: gropdf, Up: Output Devices -7.5 `grodvi' +7.5 'grodvi' ============ -The postprocessor `grodvi' translates the output from GNU `troff' into +The postprocessor 'grodvi' translates the output from GNU 'troff' into the *DVI* output format compatible with the *TeX* document preparation -system. It is fully documented on its manual page, `grodvi(1)'. +system. It is fully documented on its manual page, 'grodvi(1)'. * Menu: @@ -3244,43 +2955,43 @@  File: groff.info, Node: Invoking grodvi, Prev: grodvi, Up: grodvi -7.5.1 Invoking `grodvi' +7.5.1 Invoking 'grodvi' ----------------------- -The postprocessor `grodvi' accepts the following command-line options: +The postprocessor 'grodvi' accepts the following command-line options: -`-d' +'-d' Do not use *tpic* specials to implement drawing commands. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font and device description files, given the target device - NAME, usually *dvi*. +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font and device description files, given the target device NAME, + usually *dvi*. -`-l' +'-l' Use landscape orientation. -`-pPAPERSIZE' - Set the page dimensions. Overrides the commands `papersize', - `paperlength', and `paperwidth' in the `DESC' file. See - `groff_font(5)' manual page for details. +'-pPAPERSIZE' + Set the page dimensions. Overrides the commands 'papersize', + 'paperlength', and 'paperwidth' in the 'DESC' file. See + 'groff_font(5)' manual page for details. -`-v' +'-v' Print the version number. -`-wN' +'-wN' Set the line thickness to N/1000em. Overrides the default value N = 40.  File: groff.info, Node: grolj4, Next: grolbp, Prev: grodvi, Up: Output Devices -7.6 `grolj4' +7.6 'grolj4' ============ -The postprocessor `grolj4' translates the output from GNU `troff' into +The postprocessor 'grolj4' translates the output from GNU 'troff' into the *PCL5* output format suitable for printing on a *HP LaserJet 4* -printer. It is fully documented on its manual page, `grolj4(1)'. +printer. It is fully documented on its manual page, 'grolj4(1)'. * Menu: @@ -3289,45 +3000,45 @@  File: groff.info, Node: Invoking grolj4, Prev: grolj4, Up: grolj4 -7.6.1 Invoking `grolj4' +7.6.1 Invoking 'grolj4' ----------------------- -The postprocessor `grolj4' accepts the following command-line options: +The postprocessor 'grolj4' accepts the following command-line options: -`-cN' +'-cN' Print N copies of each page. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font and device description files, given the target device - NAME, usually *lj4*. +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font and device description files, given the target device NAME, + usually *lj4*. -`-l' +'-l' Use landscape orientation. -`-pSIZE' - Set the page dimensions. Valid values for SIZE are: `letter', - `legal', `executive', `a4', `com10', `monarch', `c5', `b5', `d1'. +'-pSIZE' + Set the page dimensions. Valid values for SIZE are: 'letter', + 'legal', 'executive', 'a4', 'com10', 'monarch', 'c5', 'b5', 'd1'. -`-v' +'-v' Print the version number. -`-wN' +'-wN' Set the line thickness to N/1000em. Overrides the default value N = 40. - The special drawing command `\D'R DH DV'' draws a horizontal + The special drawing command '\D'R DH DV'' draws a horizontal rectangle from the current position to the position at offset (DH,DV).  File: groff.info, Node: grolbp, Next: grohtml, Prev: grolj4, Up: Output Devices -7.7 `grolbp' +7.7 'grolbp' ============ -The postprocessor `grolbp' translates the output from GNU `troff' into -the *LBP* output format suitable for printing on *Canon CAPSL* -printers. It is fully documented on its manual page, `grolbp(1)'. +The postprocessor 'grolbp' translates the output from GNU 'troff' into +the *LBP* output format suitable for printing on *Canon CAPSL* printers. +It is fully documented on its manual page, 'grolbp(1)'. * Menu: @@ -3336,68 +3047,68 @@  File: groff.info, Node: Invoking grolbp, Prev: grolbp, Up: grolbp -7.7.1 Invoking `grolbp' +7.7.1 Invoking 'grolbp' ----------------------- -The postprocessor `grolbp' accepts the following command-line options: +The postprocessor 'grolbp' accepts the following command-line options: -`-cN' +'-cN' Print N copies of each page. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font, prologue and device description files, given the target +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font, prologue and device description files, given the target device NAME, usually *lbp*. -`-l' +'-l' Use landscape orientation. -`-oORIENTATION' - Use the ORIENTATION specified: `portrait' or `landscape'. +'-oORIENTATION' + Use the ORIENTATION specified: 'portrait' or 'landscape'. -`-pPAPERSIZE' - Set the page dimensions. See `groff_font(5)' manual page for +'-pPAPERSIZE' + Set the page dimensions. See 'groff_font(5)' manual page for details. -`-wN' +'-wN' Set the line thickness to N/1000em. Overrides the default value N = 40. -`-v' +'-v' Print the version number. -`-h' +'-h' Print command-line help.  File: groff.info, Node: grohtml, Next: gxditview, Prev: grolbp, Up: Output Devices -7.8 `grohtml' +7.8 'grohtml' ============= -The `grohtml' front end (which consists of a preprocessor, -`pre-grohtml', and a device driver, `post-grohtml') translates the -output of GNU `troff' to HTML. Users should always invoke `grohtml' -via the `groff' command with a `\-Thtml' option. If no files are -given, `grohtml' will read the standard input. A filename of `-' will -also cause `grohtml' to read the standard input. HTML output is -written to the standard output. When `grohtml' is run by `groff', -options can be passed to `grohtml' using `groff''s `-P' option. - - `grohtml' invokes `groff' twice. In the first pass, pictures, -equations, and tables are rendered using the `ps' device, and in the -second pass HTML output is generated by the `html' device. +The 'grohtml' front end (which consists of a preprocessor, +'pre-grohtml', and a device driver, 'post-grohtml') translates the +output of GNU 'troff' to HTML. Users should always invoke 'grohtml' via +the 'groff' command with a '\-Thtml' option. If no files are given, +'grohtml' will read the standard input. A filename of '-' will also +cause 'grohtml' to read the standard input. HTML output is written to +the standard output. When 'grohtml' is run by 'groff', options can be +passed to 'grohtml' using 'groff''s '-P' option. + + 'grohtml' invokes 'groff' twice. In the first pass, pictures, +equations, and tables are rendered using the 'ps' device, and in the +second pass HTML output is generated by the 'html' device. - `grohtml' always writes output in `UTF-8' encoding and has built-in + 'grohtml' always writes output in 'UTF-8' encoding and has built-in entities for all non-composite unicode characters. In spite of this, -`groff' may issue warnings about unknown special characters if they +'groff' may issue warnings about unknown special characters if they can't be found during the first pass. Such warnings can be safely -ignored unless the special characters appear inside a table or -equation, in which case glyphs for these characters must be defined for -the `ps' device as well. +ignored unless the special characters appear inside a table or equation, +in which case glyphs for these characters must be defined for the 'ps' +device as well. This output device is fully documented on its manual page, -`grohtml(1)'. +'grohtml(1)'. * Menu: @@ -3407,120 +3118,117 @@  File: groff.info, Node: Invoking grohtml, Next: grohtml specific registers and strings, Prev: grohtml, Up: grohtml -7.8.1 Invoking `grohtml' +7.8.1 Invoking 'grohtml' ------------------------ -The postprocessor `grohtml' accepts the following command-line options: +The postprocessor 'grohtml' accepts the following command-line options: -`-aBITS' +'-aBITS' Use this number of BITS (= 1, 2 or 4) for text antialiasing. Default: BITS = 4. -`-a0' +'-a0' Do not use text antialiasing. -`-b' +'-b' Use white background. -`-DDIR' - Store rendered images in the directory `DIR'. +'-DDIR' + Store rendered images in the directory 'DIR'. -`-FDIR' - Put the directory `DIR/devNAME' in front of the search path for - the font, prologue and device description files, given the target +'-FDIR' + Put the directory 'DIR/devNAME' in front of the search path for the + font, prologue and device description files, given the target device NAME, usually *html*. -`-gBITS' - Use this number of BITS (= 1, 2 or 4) for antialiasing of - drawings. Default: BITS = 4. +'-gBITS' + Use this number of BITS (= 1, 2 or 4) for antialiasing of drawings. + Default: BITS = 4. -`-g0' +'-g0' Do not use antialiasing for drawings. -`-h' - Use the `B' element for section headings. +'-h' + Use the 'B' element for section headings. -`-iRESOLUTION' +'-iRESOLUTION' Use the RESOLUTION for rendered images. Default: RESOLUTION = 100dpi. -`-ISTEM' - Set the images' STEM NAME. Default: STEM = `grohtml-XXX' (XXX is +'-ISTEM' + Set the images' STEM NAME. Default: STEM = 'grohtml-XXX' (XXX is the process ID). -`-jSTEM' - Place each section in a separate file called `STEM-N.html' (where - N is a generated section number). +'-jSTEM' + Place each section in a separate file called 'STEM-N.html' (where N + is a generated section number). -`-l' +'-l' Do not generate the table of contents. -`-n' +'-n' Generate simple fragment identifiers. -`-oOFFSET' +'-oOFFSET' Use vertical paddding OFFSET for images. -`-p' - Display the page rendering progress to `stderr'. +'-p' + Display the page rendering progress to 'stderr'. -`-r' +'-r' Do not use horizontal rules to separate headers and footers. -`-sSIZE' - Set the base font size, to be modified using the elements `BIG' - and `SMALL'. +'-sSIZE' + Set the base font size, to be modified using the elements 'BIG' and + 'SMALL'. -`-SLEVEL' +'-SLEVEL' Generate separate files for sections at level LEVEL. -`-v' +'-v' Print the version number. -`-V' +'-V' Generate a validator button at the bottom. -`-y' +'-y' Generate a signature of groff after the validator button, if any.  File: groff.info, Node: grohtml specific registers and strings, Prev: Invoking grohtml, Up: grohtml -7.8.2 `grohtml' specific registers and strings +7.8.2 'grohtml' specific registers and strings ---------------------------------------------- -- Register: \n[ps4html] -- String: \*[www-image-template] - The registers `ps4html' and `www-image-template' are defined by - the `pre-grohtml' preprocessor. `pre-grohtml' reads in the - `troff' input, marks up the inline equations and passes the result - firstly to - + The registers 'ps4html' and 'www-image-template' are defined by the + 'pre-grohtml' preprocessor. 'pre-grohtml' reads in the 'troff' + input, marks up the inline equations and passes the result firstly + to troff -Tps -rps4html=1 -dwww-image-template=TEMPLATE and secondly to - troff -Thtml or - troff -Txhtml The POSTSCRIPT device is used to create all the image files (for - `-Thtml'; if `-Txhtml' is used, all equations are passed to `geqn' - to produce MathML, and the register `ps4html' enables the macro + '-Thtml'; if '-Txhtml' is used, all equations are passed to 'geqn' + to produce MathML, and the register 'ps4html' enables the macro sets to ignore floating keeps, footers, and headings. - The register `www-image-template' is set to the user specified + The register 'www-image-template' is set to the user specified template name or the default name.  File: groff.info, Node: gxditview, Prev: grohtml, Up: Output Devices -7.9 `gxditview' +7.9 'gxditview' =============== * Menu: @@ -3530,7 +3238,7 @@  File: groff.info, Node: Invoking gxditview, Prev: gxditview, Up: gxditview -7.9.1 Invoking `gxditview' +7.9.1 Invoking 'gxditview' --------------------------  @@ -3539,7 +3247,7 @@ 8 File formats ************** -All files read and written by `gtroff' are text files. The following +All files read and written by 'gtroff' are text files. The following two sections describe their format. * Menu: @@ -3550,38 +3258,38 @@  File: groff.info, Node: gtroff Output, Next: Font Files, Prev: File formats, Up: File formats -8.1 `gtroff' Output +8.1 'gtroff' Output =================== -This section describes the intermediate output format of GNU `troff'. -This output is produced by a run of `gtroff' before it is fed into a +This section describes the intermediate output format of GNU 'troff'. +This output is produced by a run of 'gtroff' before it is fed into a device postprocessor program. - As `groff' is a wrapper program around `gtroff' that automatically + As 'groff' is a wrapper program around 'gtroff' that automatically calls a postprocessor, this output does not show up normally. This is -why it is called "intermediate". `groff' provides the option `-Z' to +why it is called "intermediate". 'groff' provides the option '-Z' to inhibit postprocessing, such that the produced intermediate output is -sent to standard output just like calling `gtroff' manually. +sent to standard output just like calling 'gtroff' manually. - Here, the term "troff output" describes what is output by `gtroff', + Here, the term "troff output" describes what is output by 'gtroff', while "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.(1) (*note gtroff +compatibility, otherwise both formats are the same.(1) (*note gtroff Output-Footnote-1::) The main purpose of the 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 `gtroff' language. While the `gtroff' +completely different from the 'gtroff' language. While the 'gtroff' language is a high-level programming language for text processing, the intermediate output language is a kind of low-level assembler language by specifying all positions on the page for writing and drawing. - The intermediate output produced by `gtroff' is fairly readable, -while output from AT&T `troff' is rather hard to understand because of + The intermediate output produced by 'gtroff' is fairly readable, +while output from AT&T 'troff' is rather hard to understand because of strange habits that are still supported, but not used any longer by -`gtroff'. +'gtroff'. * Menu: @@ -3593,9 +3301,9 @@  File: groff.info, Node: gtroff Output-Footnotes, Up: gtroff Output - (1) The parser and postprocessor for intermediate output can be -found in the file -`GROFF-SOURCE-DIR/src/libs/libdriver/input.cpp'. + (1) The parser and postprocessor for intermediate output can be found +in the file +'GROFF-SOURCE-DIR/src/libs/libdriver/input.cpp'.  File: groff.info, Node: Language Concepts, Next: Command Reference, Prev: gtroff Output, Up: gtroff Output @@ -3603,12 +3311,12 @@ 8.1.1 Language Concepts ----------------------- -During the run of `gtroff', the input data is cracked down to the +During the run of 'gtroff', the input data is cracked down to the information on what has to be printed at what position on the intended device. So the language of the intermediate output format can be quite small. Its only elements are commands with and without arguments. In this section, the term "command" always refers to the intermediate -output language, and never to the `gtroff' language used for document +output language, and never to the 'gtroff' language used for document formatting. There are commands for positioning and text writing, for drawing, and for device controlling. @@ -3624,8 +3332,8 @@ 8.1.1.1 Separation .................. -AT&T `troff' output has strange requirements on whitespace. The -`gtroff' output parser, however, is smart about whitespace by making it +AT&T 'troff' output has strange requirements on whitespace. The +'gtroff' output parser, however, is smart about whitespace by making it maximally optional. The whitespace characters, i.e., the tab, space, and newline characters, always have a syntactical meaning. They are never printable because spacing within the output is always done by @@ -3641,25 +3349,24 @@ A line break is a syntactical element, too. Every command argument can be followed by whitespace, a comment, or a newline character. Thus -a "syntactical line break" is defined to consist of optional -syntactical space that is optionally followed by a comment, and a -newline character. +a "syntactical line break" is defined to consist of optional syntactical +space that is optionally followed by a comment, and a newline character. 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 `gtroff''s intermediate output, every command with at +fortunately, in 'gtroff''s intermediate output, every command with at least one argument is followed by a line break, thus providing excellent readability. The other commands - those for drawing and device controlling - have a more complicated structure; some recognize long command names, and -some take a variable number of arguments. So all `D' and `x' commands +some take a variable number of arguments. So all 'D' and 'x' commands were designed to request a syntactical line break after their last -argument. Only one command, `x X', has an argument that can stretch +argument. Only one command, '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. +on the same line as the command, i.e., the arguments may not be split by +a line break. Empty lines (these are lines containing only space and/or a comment), can occur everywhere. They are just ignored. @@ -3673,9 +3380,9 @@ Some commands take integer arguments that are assumed to represent values in a measurement unit, but the letter for the corresponding scale indicator is not written with the output command arguments. Most -commands assume the scale indicator `u', the basic unit of the device, -some use `z', the scaled point unit of the device, while others, such -as the color commands, expect plain integers. +commands assume the scale indicator 'u', the basic unit of the device, +some use 'z', the scaled point unit of the device, while others, such as +the color commands, expect plain integers. Note that single characters can have the eighth bit set, as can the names of fonts and special characters. The names of characters and @@ -3683,7 +3390,7 @@ always in the current font. A string argument is always terminated by the next whitespace -character (space, tab, or newline); an embedded `#' character is +character (space, tab, or newline); an embedded '#' 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 @@ -3699,10 +3406,9 @@ "prologue" and the "body". The task of the prologue is to set the general device parameters -using three exactly specified commands. `gtroff''s prologue is +using three exactly specified commands. 'gtroff''s prologue is guaranteed to consist of the following three lines (in that order): - x T DEVICE x res N H V x init @@ -3714,13 +3420,13 @@ The 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 prologue. Processing is terminated as soon as the first -`x stop' command is encountered; the last line of any `gtroff' +'x stop' command is encountered; the last line of any 'gtroff' intermediate output always contains such a command. Semantically, the body is page oriented. A new page is started by a -`p' command. Positioning, writing, and drawing commands are always -done within the current page, so they cannot occur before the first `p' -command. Absolute positioning (by the `H' and `V' commands) is done +'p' command. Positioning, writing, and drawing commands are always done +within the current page, so they cannot occur before the first 'p' +command. Absolute positioning (by the 'H' and 'V' commands) is done relative to the current page; all other positioning is done relative to the current location within this page. @@ -3731,7 +3437,7 @@ ----------------------- This section describes all intermediate output commands, both from AT&T -`troff' as well as the `gtroff' extensions. +'troff' as well as the 'gtroff' extensions. * Menu: @@ -3747,8 +3453,8 @@ 8.1.2.1 Comment Command ....................... -`#ANYTHING' - A comment. Ignore any characters from the `#' character up to the +'#ANYTHING' + A comment. Ignore any characters from the '#' character up to the next newline character. This command is the only possibility for commenting in the @@ -3772,87 +3478,87 @@ arguments would clash or if the preceding argument ends with a string argument. -`C XXX' +'C XXX' Print a special character named XXX. The trailing syntactical space or 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. + glyph's size is read from the font file. The print position is not + changed. -`c G' +'c G' Print glyph G at the current print position;(1) (*note Simple - Commands-Footnote-1::) the glyph's size is read from the font - file. The print position is not changed. + Commands-Footnote-1::) the glyph's size is read from the font file. + The print position is not changed. -`f N' +'f N' Set font to font number N (a non-negative integer). -`H N' +'H N' Move right to the absolute vertical position N (a non-negative - integer in basic units `u' relative to left edge of current page. + integer in basic units 'u' relative to left edge of current page. -`h N' - Move N (a non-negative integer) basic units `u' horizontally to - the right. The original UNIX troff manual allows negative values - for N also, but `gtroff' doesn't use this. +'h N' + Move N (a non-negative integer) basic units 'u' horizontally to the + right. The original UNIX troff manual allows negative values for N + also, but 'gtroff' doesn't use this. -`m COLOR-SCHEME [COMPONENT ...]' +'m COLOR-SCHEME [COMPONENT ...]' 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 `DF'. The + command for the filling color of graphic objects is 'DF'. The color components are specified as integer arguments between 0 and 65536. The number of color components and their meaning vary for the different color schemes. These commands are generated by - `gtroff''s escape sequence `\m'. No position changing. These - commands are a `gtroff' extension. + 'gtroff''s escape sequence '\m'. No position changing. These + commands are a 'gtroff' extension. - `mc CYAN MAGENTA YELLOW' + 'mc CYAN MAGENTA YELLOW' Set color using the CMY color scheme, having the 3 color components CYAN, MAGENTA, and YELLOW. - `md' + 'md' Set color to the default color value (black in most cases). No component arguments. - `mg GRAY' + 'mg GRAY' Set color to the shade of gray given by the argument, an integer between 0 (black) and 65536 (white). - `mk CYAN MAGENTA YELLOW BLACK' + 'mk CYAN MAGENTA YELLOW BLACK' Set color using the CMYK color scheme, having the 4 color components CYAN, MAGENTA, YELLOW, and BLACK. - `mr RED GREEN BLUE' + 'mr RED GREEN BLUE' Set color using the RGB color scheme, having the 3 color components RED, GREEN, and BLUE. -`N N' +'N N' Print glyph with index N (a non-negative integer) of the current - font. This command is a `gtroff' extension. + font. This command is a 'gtroff' extension. -`n B A' - Inform the device about a line break, but no positioning is done - by this command. In AT&T `troff', the integer arguments B and A +'n B A' + Inform the device about a line break, but no positioning is done by + this command. In AT&T 'troff', the integer arguments B and A informed about the space before and after the current line to make the intermediate output more human readable without performing any - action. In `groff', they are just ignored, but they must be + action. In 'groff', they are just ignored, but they must be provided for compatibility reasons. -`p N' +'p N' Begin a new page in the outprint. The page number is set to 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 `p' command + and drawing is always done relative to a page, so a 'p' command must be issued before any of these commands. -`s N' - Set point size to N scaled points (this is unit `z'). AT&T - `troff' used the unit points (`p') instead. *Note Output Language +'s N' + Set point size to N scaled points (this is unit 'z'). AT&T 'troff' + used the unit points ('p') instead. *Note Output Language Compatibility::. -`t XXX' -`t XXX DUMMY-ARG' +'t XXX' +'t XXX DUMMY-ARG' Print a word, i.e., a sequence of characters XXX representing output glyphs which names are single characters, terminated by a space character or a line break; an optional second integer @@ -3861,38 +3567,38 @@ 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 glyphs are read from the font file, - scaled for the current point size, and rounded to a multiple of - the horizontal resolution. Special characters cannot be printed - using this command (use the `C' command for special characters). - This command is a `gtroff' extension; it is only used for devices - whose `DESC' file contains the `tcommand' keyword (*note DESC File + scaled for the current point size, and rounded to a multiple of the + horizontal resolution. Special characters cannot be printed using + this command (use the 'C' command for special characters). This + command is a 'gtroff' extension; it is only used for devices whose + 'DESC' file contains the 'tcommand' keyword (*note DESC File Format::). -`u N XXX' - Print word with track kerning. This is the same as the `t' command +'u N XXX' + Print word with track kerning. This is the same as the 't' command except that after printing each glyph, the current horizontal position is increased by the sum of the width of that glyph and N - (an integer in basic units `u'). This command is a `gtroff' - extension; it is only used for devices whose `DESC' file contains - the `tcommand' keyword (*note DESC File Format::). + (an integer in basic units 'u'). This command is a 'gtroff' + extension; it is only used for devices whose 'DESC' file contains + the 'tcommand' keyword (*note DESC File Format::). -`V N' +'V N' Move down to the absolute vertical position N (a non-negative - integer in basic units `u') relative to upper edge of current page. + integer in basic units 'u') relative to upper edge of current page. -`v N' - Move N basic units `u' down (N is a non-negative integer). The +'v N' + Move N basic units 'u' down (N is a non-negative integer). The original UNIX troff manual allows negative values for N also, but - `gtroff' doesn't use this. + 'gtroff' doesn't use this. -`w' +'w' Informs about a paddable white space to increase readability. The spacing itself must be performed explicitly by a move command.  File: groff.info, Node: Simple Commands-Footnotes, Up: Simple Commands - (1) `c' is actually a misnomer since it outputs a glyph. + (1) 'c' is actually a misnomer since it outputs a glyph.  File: groff.info, Node: Graphics Commands, Next: Device Control Commands, Prev: Simple Commands, Up: Command Reference @@ -3901,158 +3607,156 @@ ......................... Each graphics or drawing command in the intermediate output starts with -the letter `D', followed by one or two characters that specify a +the letter '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 `D' -command may not be followed by another command on the same line (apart -from a comment), so each `D' command is terminated by a syntactical -line break. - - `gtroff' 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. +arguments that are separated by a single space character. A 'D' command +may not be followed by another command on the same line (apart from a +comment), so each 'D' command is terminated by a syntactical line break. + + 'gtroff' 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. Some graphics commands can take a variable number of arguments. In this case, they are integers representing a size measured in basic units -`u'. The arguments called H1, H2, ..., HN stand for horizontal +'u'. The arguments called H1, H2, ..., HN stand for horizontal distances where positive means right, negative left. The arguments -called V1, V2, ..., VN stand for vertical distances where positive -means down, negative up. All these distances are offsets relative to -the current location. +called V1, V2, ..., VN stand for vertical distances where positive means +down, negative up. All these distances are offsets relative to the +current location. - Each graphics command directly corresponds to a similar `gtroff' -`\D' escape sequence. *Note Drawing Requests::. + Each graphics command directly corresponds to a similar 'gtroff' '\D' +escape sequence. *Note Drawing Requests::. - Unknown `D' commands are assumed to be device-specific. Its + Unknown 'D' commands are assumed to be device-specific. Its arguments are parsed as strings; the whole information is then sent to the postprocessor. - In the following command reference, the syntax element means a syntactical line break as defined above. + In the following command reference, the syntax element +means a syntactical line break as defined above. -`D~ H1 V1 H2 V2 ... HN VN' +'D~ H1 V1 H2 V2 ... HN VN' Draw B-spline from current position to offset (H1,V1), then to - offset (H2,V2), if given, etc. up to (HN,VN). This command takes - a variable number of argument pairs; the current position is moved - to the terminal point of the drawn curve. + offset (H2,V2), if given, etc. up to (HN,VN). This command takes a + variable number of argument pairs; the current position is moved to + the terminal point of the drawn curve. -`Da H1 V1 H2 V2' +'Da H1 V1 H2 V2' Draw arc from current position to (H1,V1)+(H2,V2) with center at (H1,V1); then move the current position to the final point of the arc. -`DC D' -`DC D DUMMY-ARG' +'DC D' +'DC D DUMMY-ARG' Draw a solid circle using the current fill color with diameter D - (integer in basic units `u') with leftmost point at the current + (integer in basic units '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 the formatter to generate an even number of arguments). - This command is a `gtroff' extension. + This command is a 'gtroff' extension. -`Dc D' - Draw circle line with diameter D (integer in basic units `u') with +'Dc D' + Draw circle line with diameter D (integer in basic units 'u') with leftmost point at the current position; then move the current position to the rightmost point of the circle. -`DE H V' +'DE H V' Draw a solid ellipse in the current fill color with a horizontal diameter of H and a vertical diameter of V (both integers in basic - units `u') with the leftmost point at the current position; then + units 'u') with the leftmost point at the current position; then move to the rightmost point of the ellipse. This command is a - `gtroff' extension. + 'gtroff' extension. -`De H V' +'De H V' Draw an outlined ellipse with a horizontal diameter of H and a - vertical diameter of V (both integers in basic units `u') with the + vertical diameter of V (both integers in basic units 'u') with the leftmost point at current position; then move to the rightmost point of the ellipse. -`DF COLOR-SCHEME [COMPONENT ...]' +'DF COLOR-SCHEME [COMPONENT ...]' 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 `m'. The - color components are specified as integer arguments between 0 and - 65536. The number of color components and their meaning vary for - the different color schemes. These commands are generated by - `gtroff''s escape sequences `\D'F ...'' and `\M' (with no other + schemes; the analoguous command for setting the color of text, line + graphics, and the outline of graphic objects is 'm'. The color + components are specified as integer arguments between 0 and 65536. + The number of color components and their meaning vary for the + different color schemes. These commands are generated by + 'gtroff''s escape sequences '\D'F ...'' and '\M' (with no other corresponding graphics commands). No position changing. This - command is a `gtroff' extension. + command is a 'gtroff' extension. - `DFc CYAN MAGENTA YELLOW' + 'DFc CYAN MAGENTA YELLOW' Set fill color for solid drawing objects using the CMY color scheme, having the 3 color components CYAN, MAGENTA, and YELLOW. - `DFd' + 'DFd' Set fill color for solid drawing objects to the default fill color value (black in most cases). No component arguments. - `DFg GRAY' + 'DFg GRAY' Set fill color for solid drawing objects to the shade of gray given by the argument, an integer between 0 (black) and 65536 (white). - `DFk CYAN MAGENTA YELLOW BLACK' + 'DFk 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. - `DFr RED GREEN BLUE' + 'DFr RED GREEN BLUE' Set fill color for solid drawing objects using the RGB color scheme, having the 3 color components RED, GREEN, and BLUE. -`Df N' +'Df N' The argument N must be an integer in the range -32767 to 32767. - 0 <= N <= 1000 + 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 `DFg'. + of gray; this is obsoleted by command 'DFg'. - N < 0 or N > 1000 + 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 `m'. For + used for the text and the outline, see command 'm'. For example, the command sequence - mg 0 0 65536 Df -1 sets all colors to blue. - No position changing. This command is a `gtroff' extension. + No position changing. This command is a 'gtroff' extension. -`Dl H V' +'Dl H V' Draw line from current position to offset (H,V) (integers in basic - units `u'); then set current position to the end of the drawn line. + units 'u'); then set current position to the end of the drawn line. -`Dp H1 V1 H2 V2 ... HN VN' +'Dp H1 V1 H2 V2 ... HN VN' Draw a polygon line from current position to offset (H1,V1), from there to offset (H2,V2), etc. up to offset (HN,VN), and from there back to the starting position. 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. This command is a `gtroff' extension. + vertical position. Although this doesn't make sense it is kept for + compatibility. This command is a 'gtroff' extension. -`Dp H1 V1 H2 V2 ... HN VN' +'Dp H1 V1 H2 V2 ... HN VN' Draw a solid polygon in the current fill color rather than an outlined polygon, using the same arguments and positioning as the - corresponding `Dp' command. This command is a `gtroff' extension. + corresponding 'Dp' command. This command is a 'gtroff' extension. -`Dt N' - Set the current line thickness to N (an integer in basic units - `u') if N>0; if N=0 select the smallest available line thickness; - if N<0 set the line thickness proportional to the point size (this - is the default before the first `Dt' command was specified). For +'Dt N' + Set the current line thickness to N (an integer in basic units 'u') + if N>0; if N=0 select the smallest available line thickness; if N<0 + set the line thickness proportional to the point size (this is the + default before the first 'Dt' command was specified). 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. This command is a `gtroff' extension. + kept for compatibility. This command is a 'gtroff' extension.  File: groff.info, Node: Device Control Commands, Next: Obsolete Command, Prev: Graphics Commands, Up: Command Reference @@ -4060,109 +3764,108 @@ 8.1.2.4 Device Control Commands ............................... -Each device control command starts with the letter `x', followed by a -space character (optional or arbitrary space or tab in `gtroff') and a +Each device control command starts with the letter 'x', followed by a +space character (optional or arbitrary space or tab in 'gtroff') and a subcommand letter or word; each argument (if any) must be preceded by a -syntactical space. All `x' commands are terminated by a syntactical -line break; no device control command can be followed by another -command on the same line (except a comment). +syntactical space. All 'x' commands are terminated by a syntactical +line break; no device control command can be followed by another command +on the same line (except a comment). 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, `gtroff' outputs the initialization command `x i' as `x init' -and the resolution command `x r' as `x res'. +example, 'gtroff' outputs the initialization command 'x i' as 'x init' +and the resolution command 'x r' as 'x res'. - In the following, the syntax element means a -syntactical line break (*note Separation::). + In the following, the syntax element means a syntactical +line break (*note Separation::). -`xF NAME' - The `F' stands for FILENAME. +'xF NAME' + The 'F' stands for FILENAME. Use NAME as the intended name for the current file in error reports. This is useful for remembering the original file name - when `gtroff' uses an internal piping mechanism. The input file - is not changed by this command. This command is a `gtroff' - extension. + when 'gtroff' uses an internal piping mechanism. The input file is + not changed by this command. This command is a 'gtroff' extension. -`xf N S' - The `f' stands for FONT. +'xf N S' + The 'f' stands for FONT. - Mount font position N (a non-negative integer) with font named S - (a text word). *Note Font Positions::. + Mount font position N (a non-negative integer) with font named S (a + text word). *Note Font Positions::. -`xH N' - The `H' stands for HEIGHT. +'xH N' + The 'H' stands for HEIGHT. - Set glyph height to N (a positive integer in scaled points `z'). - AT&T `troff' uses the unit points (`p') instead. *Note Output + Set glyph height to N (a positive integer in scaled points 'z'). + AT&T 'troff' uses the unit points ('p') instead. *Note Output Language Compatibility::. -`xi' - The `i' stands for INIT. +'xi' + The 'i' stands for INIT. Initialize device. This is the third command of the prologue. -`xp' - The `p' stands for PAUSE. +'xp' + The 'p' stands for PAUSE. Parsed but ignored. The original UNIX troff manual writes pause device, can be restarted -`xr N H V' - The `r' stands for RESOLUTION. +'xr N H V' + The 'r' stands for RESOLUTION. Resolution is N, while H is the minimal horizontal motion, and V the minimal vertical motion possible with this device; all - arguments are positive integers in basic units `u' per inch. This + arguments are positive integers in basic units 'u' per inch. This is the second command of the prologue. -`xS N' - The `S' stands for SLANT. +'xS N' + The 'S' stands for SLANT. - Set slant to N (an integer in basic units `u'). + Set slant to N (an integer in basic units 'u'). -`xs' - The `s' stands for STOP. +'xs' + The 's' stands for STOP. Terminates the processing of the current file; issued as the last command of any intermediate troff output. -`xt' - The `t' stands for TRAILER. +'xt' + The 't' stands for TRAILER. Generate trailer information, if any. In GTROFF, this is actually just ignored. -`xT XXX' - The `T' stands for TYPESETTER. +'xT XXX' + The 'T' stands for TYPESETTER. Set name of device to word XXX, a sequence of characters ended by - the next white space character. The possible device names - coincide with those from the `groff' `-T' option. This is the - first command of the prologue. + the next white space character. The possible device names coincide + with those from the 'groff' '-T' option. This is the first command + of the prologue. -`xu N' - The `u' stands for UNDERLINE. +'xu N' + The 'u' stands for UNDERLINE. Configure underlining of spaces. If N is 1, start underlining of spaces; if N is 0, stop underlining of spaces. This is needed for - the `cu' request in nroff mode and is ignored otherwise. This - command is a `gtroff' extension. + the 'cu' request in nroff mode and is ignored otherwise. This + command is a 'gtroff' extension. -`xX ANYTHING' - The `x' stands for X-ESCAPE. +'xX ANYTHING' + The 'x' stands for X-ESCAPE. Send string ANYTHING uninterpreted to the device. If the line - following this command starts with a `+' character this line is - interpreted as a continuation line in the following sense. The `+' + following this command starts with a '+' character this line is + interpreted as a continuation line in the following sense. The '+' 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 - `+' character. This command is generated by the `gtroff' escape - sequence `\X'. The line-continuing feature is a `gtroff' + '+' character. This command is generated by the 'gtroff' escape + sequence '\X'. The line-continuing feature is a 'gtroff' extension.  @@ -4171,28 +3874,28 @@ 8.1.2.5 Obsolete Command ........................ -In AT&T `troff' output, the writing of a single glyph is mostly done by +In AT&T 'troff' output, the writing of a single glyph is mostly done by a very strange command that combines a horizontal move and a single -character giving the glyph name. It doesn't have a command code, but -is represented by a 3-character argument consisting of exactly 2 digits -and a character. +character giving the glyph name. It doesn't have a command code, but is +represented by a 3-character argument consisting of exactly 2 digits and +a character. DDG - Move right DD (exactly two decimal digits) basic units `u', then + Move right DD (exactly two decimal digits) basic units 'u', then print glyph G (represented as a single character). - In `gtroff', arbitrary syntactical space around and within this + In 'gtroff', arbitrary 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 AT&T `troff', large clusters - of these and other commands are used, mostly without spaces; this - made such output almost unreadable. + the same line ends with an argument of variable length a separating + space is obligatory. In AT&T 'troff', large clusters of these and + other commands are used, mostly without spaces; this made such + output almost unreadable. 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 `gtroff', this is only used for the devices `X75', -`X75-12', `X100', and `X100-12'. For other devices, the commands `t' -and `u' provide a better functionality. +digits. In 'gtroff', this is only used for the devices 'X75', 'X75-12', +'X100', and 'X100-12'. For other devices, the commands 't' and 'u' +provide a better functionality.  File: groff.info, Node: Intermediate Output Examples, Next: Output Language Compatibility, Prev: Command Reference, Up: gtroff Output @@ -4201,11 +3904,12 @@ ---------------------------------- This section presents the intermediate output generated from the same -input for three different devices. The input is the sentence `hell -world' fed into `gtroff' on the command line. +input for three different devices. The input is the sentence 'hell +world' fed into 'gtroff' on the command line. -High-resolution device `ps' - This is the standard output of `gtroff' if no `-T' option is given. +High-resolution device 'ps' + + This is the standard output of 'gtroff' if no '-T' option is given. shell> echo "hell world" | groff -Z -T ps @@ -4228,13 +3932,14 @@ V792000 x stop - This output can be fed into `grops' to get its representation as a + This output can be fed into 'grops' to get its representation as a POSTSCRIPT file. -Low-resolution device `latin1' +Low-resolution device 'latin1' + This is similar to the high-resolution device except that the positioning is done at a minor scale. Some comments (lines - starting with `#') were added for clarification; they were not + starting with '#') were added for clarification; they were not generated by the formatter. shell> echo "hell world" | groff -Z -T latin1 @@ -4265,10 +3970,10 @@ V2640 x stop - This output can be fed into `grotty' to get a formatted text + This output can be fed into 'grotty' to get a formatted text document. -AT&T `troff' output +AT&T 'troff' output Since a computer monitor has a very low resolution compared to modern printers the intermediate output for the X Window devices can use the jump-and-write command with its 2-digit displacements. @@ -4291,11 +3996,11 @@ V1100 x stop - This output can be fed into `xditview' or `gxditview' for + This output can be fed into 'xditview' or 'gxditview' for displaying in X. Due to the obsolete jump-and-write command, the text clusters in - the AT&T `troff' output are almost unreadable. + the AT&T 'troff' output are almost unreadable.  File: groff.info, Node: Output Language Compatibility, Prev: Intermediate Output Examples, Up: gtroff Output @@ -4303,56 +4008,55 @@ 8.1.4 Output Language Compatibility ----------------------------------- -The intermediate output language of AT&T `troff' was first documented -in the UNIX troff manual, with later additions documented in `A +The intermediate output language of AT&T 'troff' was first documented in +the UNIX troff manual, with later additions documented in 'A Typesetter-indenpendent TROFF', written by Brian Kernighan. - The `gtroff' intermediate output format is compatible with this + The 'gtroff' intermediate output format is compatible with this specification except for the following features. * The classical quasi device independence is not yet implemented. * The old hardware was very different from what we use today. So the - `groff' devices are also fundamentally different from the ones in - AT&T `troff'. For example, the AT&T POSTSCRIPT device is called - `post' and has a resolution of only 720 units per inch, suitable - for printers 20 years ago, while `groff''s `ps' device has a + 'groff' devices are also fundamentally different from the ones in + AT&T 'troff'. For example, the AT&T POSTSCRIPT device is called + 'post' and has a resolution of only 720 units per inch, suitable + for printers 20 years ago, while 'groff''s 'ps' device has a resolution of 72000 units per inch. Maybe, by implementing some rescaling mechanism similar to the classical quasi device - independence, `groff' could emulate AT&T's `post' device. + independence, 'groff' could emulate AT&T's 'post' device. - * The B-spline command `D~' is correctly handled by the intermediate + * The B-spline command 'D~' is correctly handled by the intermediate output parser, but the drawing routines aren't implemented in some of the postprocessor programs. - * The argument of the commands `s' and `x H' has the implicit unit - scaled point `z' in `gtroff', while AT&T `troff' has point (`p'). + * The argument of the commands 's' and 'x H' has the implicit unit + scaled point 'z' in 'gtroff', while AT&T 'troff' has point ('p'). This isn't an incompatibility but a compatible extension, for both - units coincide for all devices without a `sizescale' parameter in - the `DESC' file, including all postprocessors from AT&T and - `groff''s text devices. The few `groff' devices with a - `sizescale' parameter either do not exist for AT&T `troff', have a - different name, or seem to have a different resolution. So - conflicts are very unlikely. + units coincide for all devices without a 'sizescale' parameter in + the 'DESC' file, including all postprocessors from AT&T and + 'groff''s text devices. The few 'groff' devices with a 'sizescale' + parameter either do not exist for AT&T 'troff', have a different + name, or seem to have a different resolution. So conflicts are + very unlikely. - * The position changing after the commands `Dp', `DP', and `Dt' is - illogical, but as old versions of `gtroff' used this feature it is + * The position changing after the commands 'Dp', 'DP', and 'Dt' is + illogical, but as old versions of 'gtroff' used this feature it is kept for compatibility reasons. -  File: groff.info, Node: Font Files, Prev: gtroff Output, Up: File formats 8.2 Font Files ============== -The `gtroff' font format is roughly a superset of the `ditroff' font -format (as used in later versions of AT&T `troff' and its descendants). -Unlike the `ditroff' font format, there is no associated binary format; -all files are text files.(1) (*note Font Files-Footnote-1::) The font -files for device NAME are stored in a directory `devNAME'. There are -two types of file: a device description file called `DESC' and for each -font F a font file called `F'. +The 'gtroff' font format is roughly a superset of the 'ditroff' font +format (as used in later versions of AT&T 'troff' and its descendants). +Unlike the 'ditroff' font format, there is no associated binary format; +all files are text files.(1) (*note Font Files-Footnote-1::) The font +files for device NAME are stored in a directory 'devNAME'. There are +two types of file: a device description file called 'DESC' and for each +font F a font file called 'F'. * Menu: @@ -4362,154 +4066,151 @@  File: groff.info, Node: Font Files-Footnotes, Up: Font Files - (1) Plan 9 `troff' has also abandoned the binary format. + (1) Plan 9 'troff' has also abandoned the binary format.  File: groff.info, Node: DESC File Format, Next: Font File Format, Prev: Font Files, Up: Font Files -8.2.1 `DESC' File Format +8.2.1 'DESC' File Format ------------------------ -The `DESC' file can contain the following types of line. Except for -the `charset' keyword which must comes last (if at all), the order of -the lines is not important. Later entries in the file, however, -override previous values. +The 'DESC' file can contain the following types of line. Except for the +'charset' keyword, which must comes last (if at all), the order of the +lines is not important. Later entries in the file, however, override +previous values. -`charset' +'charset' This line and everything following in the file are ignored. It is allowed for the sake of backwards compatibility. -`family FAM' +'family FAM' The default font family is FAM. -`fonts N F1 F2 F3 ... FN' +'fonts N F1 F2 F3 ... FN' Fonts F1 ... FN are mounted in the font positions M+1, ..., M+N - where M is the number of styles. This command may extend over - more than one line. A font name of 0 means no font is mounted on - the corresponding font position. + where M is the number of styles. This command may extend over more + than one line. A font name of 0 means no font is mounted on the + corresponding font position. -`hor N' +'hor N' The horizontal resolution is N machine units. All horizontal quantities are rounded to be multiples of this value. -`image_generator STRING' - Needed for `grohtml' only. It specifies the program to generate +'image_generator STRING' + Needed for 'grohtml' only. It specifies the program to generate PNG images from POSTSCRIPT input. Under GNU/Linux this is usually - `gs' but under other systems (notably cygwin) it might be set to + 'gs' but under other systems (notably cygwin) it might be set to another name. -`paperlength N' +'paperlength N' The physical vertical dimension of the output medium in machine - units. This isn't used by `troff' itself but by output devices. - Deprecated. Use `papersize' instead. + units. This isn't used by 'troff' itself but by output devices. + Deprecated. Use 'papersize' instead. -`papersize STRING ...' +'papersize STRING ...' Select a paper size. Valid values for STRING are the ISO paper - types `A0'-`A7', `B0'-`B7', `C0'-`C7', `D0'-`D7', `DL', and the US - paper types `letter', `legal', `tabloid', `ledger', `statement', - `executive', `com10', and `monarch'. Case is not significant for + types 'A0'-'A7', 'B0'-'B7', 'C0'-'C7', 'D0'-'D7', 'DL', and the US + paper types 'letter', 'legal', 'tabloid', 'ledger', 'statement', + 'executive', 'com10', and 'monarch'. Case is not significant for STRING if it holds predefined paper types. Alternatively, STRING - can be a file name (e.g. `/etc/papersize'); if the file can be - opened, `groff' reads the first line and tests for the above paper + can be a file name (e.g. '/etc/papersize'); if the file can be + opened, 'groff' reads the first line and tests for the above paper sizes. Finally, STRING can be a custom paper size in the format - `LENGTH,WIDTH' (no spaces before and after the comma). Both - LENGTH and WIDTH must have a unit appended; valid values are `i' - for inches, `C' for centimeters, `p' for points, and `P' for - picas. Example: `12c,235p'. An argument which starts with a - digit is always treated as a custom paper format. `papersize' - sets both the vertical and horizontal dimension of the output - medium. + 'LENGTH,WIDTH' (no spaces before and after the comma). Both LENGTH + and WIDTH must have a unit appended; valid values are 'i' for + inches, 'C' for centimeters, 'p' for points, and 'P' for picas. + Example: '12c,235p'. An argument that starts with a digit is + always treated as a custom paper format. 'papersize' sets both the + vertical and horizontal dimension of the output medium. - More than one argument can be specified; `groff' scans from left to + More than one argument can be specified; 'groff' scans from left to right and uses the first valid paper specification. -`paperwidth N' +'paperwidth N' The physical horizontal dimension of the output medium in machine - units. This isn't used by `troff' itself but by output devices. - Deprecated. Use `papersize' instead. + units. This isn't used by 'troff' itself but by output devices. + Deprecated. Use 'papersize' instead. -`pass_filenames' - Tell `gtroff' to emit the name of the source file currently being +'pass_filenames' + Tell 'gtroff' to emit the name of the source file currently being processed. This is achieved by the intermediate output command - `F'. Currently, this is only used by the `grohtml' output device. + 'F'. Currently, this is only used by the 'grohtml' output device. -`postpro PROGRAM' +'postpro PROGRAM' Call PROGRAM as a postprocessor. For example, the line - postpro grodvi - in the file `devdvi/DESC' makes `groff' call `grodvi' if option - `-Tdvi' is given (and `-Z' isn't used). + in the file 'devdvi/DESC' makes 'groff' call 'grodvi' if option + '-Tdvi' is given (and '-Z' isn't used). -`prepro PROGRAM' - Call PROGRAM as a preprocessor. Currently, this keyword is used - by `groff' with option `-Thtml' or `-Txhtml' only. +'prepro PROGRAM' + Call PROGRAM as a preprocessor. Currently, this keyword is used by + 'groff' with option '-Thtml' or '-Txhtml' only. -`print PROGRAM' +'print PROGRAM' Use PROGRAM as a spooler program for printing. If omitted, the - `-l' and `-L' options of `groff' are ignored. + '-l' and '-L' options of 'groff' are ignored. -`res N' +'res N' There are N machine units per inch. -`sizes S1 S2 ... SN 0' - This means that the device has fonts at S1, S2, ... SN scaled +'sizes S1 S2 ... SN 0' + This means that the device has fonts at S1, S2, ... SN scaled points. The list of sizes must be terminated by 0 (this is digit zero). Each SI can also be a range of sizes M-N. The list can extend over more than one line. -`sizescale N' +'sizescale N' The scale factor for point sizes. By default this has a value of 1. One scaled point is equal to one point/N. The arguments to - the `unitwidth' and `sizes' commands are given in scaled points. + the 'unitwidth' and 'sizes' commands are given in scaled points. *Note Fractional Type Sizes::, for more information. -`styles S1 S2 ... SM' +'styles S1 S2 ... SM' The first M font positions are associated with styles S1 ... SM. -`tcommand' - This means that the postprocessor can handle the `t' and `u' +'tcommand' + This means that the postprocessor can handle the 't' and 'u' intermediate output commands. -`unicode' +'unicode' Indicate that the output device supports the complete Unicode - repertoire. Useful only for devices which produce _character + repertoire. Useful only for devices that produce _character entities_ instead of glyphs. - If `unicode' is present, no `charset' section is required in the + If 'unicode' is present, no 'charset' section is required in the font description files since the Unicode handling built into - `groff' is used. However, if there are entries in a `charset' + 'groff' is used. However, if there are entries in a 'charset' section, they either override the default mappings for those particular characters or add new mappings (normally for composite characters). - This is used for `-Tutf8', `-Thtml', and `-Txhtml'. + This is used for '-Tutf8', '-Thtml', and '-Txhtml'. -`unitwidth N' +'unitwidth N' Quantities in the font files are given in machine units for fonts whose point size is N scaled points. -`unscaled_charwidths' +'unscaled_charwidths' Make the font handling module always return unscaled character - widths. Needed for the `grohtml' device. + widths. Needed for the 'grohtml' device. -`use_charnames_in_special' - This command indicates that `gtroff' should encode special +'use_charnames_in_special' + This command indicates that 'gtroff' should encode special characters inside special commands. Currently, this is only used - by the `grohtml' output device. *Note Postprocessor Access::. + by the 'grohtml' output device. *Note Postprocessor Access::. -`vert N' +'vert N' The vertical resolution is N machine units. All vertical quantities are rounded to be multiples of this value. - The `res', `unitwidth', `fonts', and `sizes' lines are mandatory. -Other commands are ignored by `gtroff' but may be used by -postprocessors to store arbitrary information about the device in the -`DESC' file. + The 'res', 'unitwidth', 'fonts', and 'sizes' lines are mandatory. +Other commands are ignored by 'gtroff' but may be used by postprocessors +to store arbitrary information about the device in the 'DESC' file. - Here a list of obsolete keywords which are recognized by `groff' but -completely ignored: `spare1', `spare2', `biggestfont'. + Here a list of obsolete keywords that are recognized by 'groff' but +completely ignored: 'spare1', 'spare2', 'biggestfont'.  File: groff.info, Node: Font File Format, Prev: DESC File Format, Up: Font Files @@ -4522,106 +4223,106 @@ 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. -`name F' +'name F' The name of the font is F. -`spacewidth N' +'spacewidth N' The normal width of a space is N. -`slant N' +'slant N' The glyphs of the font have a slant of N degrees. (Positive means forward.) -`ligatures LIG1 LIG2 ... LIGN [0]' +'ligatures LIG1 LIG2 ... LIGN [0]' Glyphs LIG1, LIG2, ..., LIGN are ligatures; possible ligatures are - `ff', `fi', `fl', `ffi' and `ffl'. For backwards compatibility, + 'ff', 'fi', 'fl', 'ffi' and 'ffl'. For backwards compatibility, the list of ligatures may be terminated with a 0. The list of ligatures may not extend over more than one line. -`special' +'special' The font is "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. - Other commands are ignored by `gtroff' but may be used by + Other commands are ignored by 'gtroff' but may be used by postprocessors to store arbitrary information about the font in the font file. - The first section can contain comments which start with the `#' + The first section can contain comments, which start with the '#' character and extend to the end of a line. The second section contains one or two subsections. It must contain -a `charset' subsection and it may also contain a `kernpairs' -subsection. These subsections can appear in any order. Each subsection -starts with a word on a line by itself. +a 'charset' subsection and it may also contain a 'kernpairs' subsection. +These subsections can appear in any order. Each subsection starts with +a word on a line by itself. - The word `charset' starts the character set subsection.(1) (*note -Font File Format-Footnote-1::) The `charset' line is followed by a + The word 'charset' starts the character set subsection.(1) (*note +Font File Format-Footnote-1::) The '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 - NAME METRICS TYPE CODE [ENTITY-NAME] [`--' COMMENT] + NAME METRICS TYPE CODE [ENTITY-NAME] ['--' COMMENT] -NAME identifies the glyph name(2) (*note Font File -Format-Footnote-2::): If NAME is a single character C then it -corresponds to the `gtroff' input character C; if it is of the form -`\C' where C is a single character, then it corresponds to the special -character `\[C]'; otherwise it corresponds to the special character -`\[NAME]'. If it is exactly two characters XX it can be entered as -`\(XX'. Note that single-letter special characters can't be accessed -as `\C'; the only exception is `\-' which is identical to `\[-]'. - - `gtroff' supports 8-bit input characters; however some utilities -have difficulties with eight-bit characters. For this reason, there is -a convention that the entity name `charN' is equivalent to the single -input character whose code is N. For example, `char163' would be -equivalent to the character with code 163 which is the pounds sterling -sign in the ISO Latin-1 character set. You shouldn't use `charN' +NAME identifies the glyph name(2) (*note Font File Format-Footnote-2::): +If NAME is a single character C then it corresponds to the 'gtroff' +input character C; if it is of the form '\C' where C is a single +character, then it corresponds to the special character '\[C]'; +otherwise it corresponds to the special character '\[NAME]'. If it is +exactly two characters XX it can be entered as '\(XX'. Note that +single-letter special characters can't be accessed as '\C'; the only +exception is '\-', which is identical to '\[-]'. + + 'gtroff' supports 8-bit input characters; however some utilities have +difficulties with eight-bit characters. For this reason, there is a +convention that the entity name 'charN' is equivalent to the single +input character whose code is N. For example, 'char163' would be +equivalent to the character with code 163, which is the pounds sterling +sign in the ISO Latin-1 character set. You shouldn't use 'charN' entities in font description files since they are related to input, not output. Otherwise, you get hard-coded connections between input and -output encoding which prevents use of different (input) character sets. +output encoding, which prevents use of different (input) character sets. - The name `---' is special and indicates that the glyph is unnamed; -such glyphs can only be used by means of the `\N' escape sequence in -`gtroff'. + The name '---' is special and indicates that the glyph is unnamed; +such glyphs can only be used by means of the '\N' escape sequence in +'gtroff'. The TYPE field gives the glyph type: -`1' - the glyph has a descender, for example, `p'; +'1' + the glyph has a descender, for example, 'p'; -`2' - the glyph has an ascender, for example, `b'; +'2' + the glyph has an ascender, for example, 'b'; -`3' - the glyph has both an ascender and a descender, for example, `('. +'3' + the glyph has both an ascender and a descender, for example, '('. - The CODE field gives the code which the postprocessor uses to print -the glyph. The glyph can also be input to `gtroff' using this code by -means of the `\N' escape sequence. CODE can be any integer. If it -starts with `0' it is interpreted as octal; if it starts with `0x' or -`0X' it is interpreted as hexadecimal. Note, however, that the `\N' + The CODE field gives the code that the postprocessor uses to print +the glyph. The glyph can also be input to 'gtroff' using this code by +means of the '\N' escape sequence. CODE can be any integer. If it +starts with '0' it is interpreted as octal; if it starts with '0x' or +'0X' it is interpreted as hexadecimal. Note, however, that the '\N' escape sequence only accepts a decimal integer. The ENTITY-NAME field gives an ASCII string identifying the glyph -which the postprocessor uses to print the `gtroff' glyph NAME. This -field is optional and has been introduced so that the `grohtml' device -driver can encode its character set. For example, the glyph `\[Po]' is -represented as `£' in HTML 4.0. +that the postprocessor uses to print the 'gtroff' glyph NAME. This +field is optional and has been introduced so that the 'grohtml' device +driver can encode its character set. For example, the glyph '\[Po]' is +represented as '£' in HTML 4.0. - Anything on the line after the ENTITY-NAME field resp. after `--' is + Anything on the line after the ENTITY-NAME field resp. after '--' is ignored. The METRICS field has the form: - WIDTH[`,'HEIGHT[`,'DEPTH[`,'ITALIC-CORRECTION - [`,'LEFT-ITALIC-CORRECTION[`,'SUBSCRIPT-CORRECTION]]]]] + WIDTH[','HEIGHT[','DEPTH[','ITALIC-CORRECTION + [','LEFT-ITALIC-CORRECTION[','SUBSCRIPT-CORRECTION]]]]] There must not be any spaces between these subfields (it has been split here into two lines for better legibility only). 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 `char' as they are in `ditroff'. The WIDTH +into a variable of type 'char' as they are in 'ditroff'. The WIDTH subfield gives the width of the glyph. The 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 @@ -4632,29 +4333,27 @@ rather than a negative depth. The 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 -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 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. - - A line in the `charset' section can also have the format +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 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. + A line in the 'charset' section can also have the format NAME " -This indicates that NAME is just another name for the glyph mentioned -in the preceding line. +This indicates that NAME is just another name for the glyph mentioned in +the preceding line. - The word `kernpairs' starts the kernpairs section. This contains a + The word 'kernpairs' starts the kernpairs section. This contains a sequence of lines of the form: - C1 C2 N -This means that when glyph C1 appears next to glyph C2 the space -between them should be increased by N. Most entries in the kernpairs -section have a negative value for N. +This means that when glyph C1 appears next to glyph C2 the space between +them should be increased by N. Most entries in the kernpairs section +have a negative value for N.  File: groff.info, Node: Font File Format-Footnotes, Up: Font File Format @@ -4662,9 +4361,9 @@ (1) This keyword is misnamed since it starts a list of ordered glyphs, not characters. - (2) The distinction between input, characters, and output, glyphs, -is not clearly separated in the terminology of `groff'; for example, -the `char' request should be called `glyph' since it defines an output + (2) The distinction between input, characters, and output, glyphs, is +not clearly separated in the terminology of 'groff'; for example, the +'char' request should be called 'glyph' since it defines an output entity.  @@ -4676,13 +4375,13 @@  File: groff.info, Node: Copying This Manual, Next: Request Index, Prev: Installation, Up: Top -Anhang A Copying This Manual -**************************** +Appendix A Copying This Manual +****************************** Version 1.3, 3 November 2008 - Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. - `http://fsf.org/' + Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -4707,21 +4406,21 @@ free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with @@ -4739,12 +4438,12 @@ regarding them. The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice @@ -4755,27 +4454,27 @@ A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the @@ -4813,8 +4512,8 @@ may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. + distribute a large enough number of copies you must also follow the + conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @@ -4828,12 +4527,11 @@ these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit @@ -4841,40 +4539,39 @@ adjacent pages. If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in @@ -4904,31 +4601,30 @@ I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. @@ -4941,11 +4637,11 @@ If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various @@ -4954,15 +4650,15 @@ definition of a standard. You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to @@ -4972,8 +4668,8 @@ You may combine the Document with other documents released under this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. @@ -5000,20 +4696,20 @@ documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. + rules of this License for verbatim copying of each of the documents + in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this @@ -5058,8 +4754,8 @@ 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 + 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. @@ -5071,33 +4767,33 @@ 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, receipt of a copy of some or all of - the same material does not give you any rights to use it. + 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, receipt of a copy of some or all of the + same material does not give you any rights to use it. - 10. FUTURE REVISIONS OF THIS LICENSE + 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. + . Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. If the Document specifies that a proxy - can decide which future versions of this License can be used, that + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. - 11. RELICENSING + 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also @@ -5127,7 +4823,6 @@ site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. - ADDENDUM: How to use this License for your documents ==================================================== @@ -5155,116 +4850,116 @@ situation. If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software.  File: groff.info, Node: Request Index, Next: Escape Index, Prev: Copying This Manual, Up: Top -Anhang B Request Index -********************** +Appendix B Request Index +************************ Requests appear without the leading control character (normally either -`.' or `''). +'.' or '''). [index] * Menu: * ab: Debugging. (line 40) * ad: Manipulating Filling and Adjusting. - (line 52) + (line 50) * af: Assigning Formats. (line 12) -* aln: Setting Registers. (line 118) -* als: Strings. (line 241) -* am: Writing Macros. (line 119) -* am1: Writing Macros. (line 120) -* ami: Writing Macros. (line 121) -* ami1: Writing Macros. (line 122) -* as: Strings. (line 187) -* as1: Strings. (line 188) -* asciify: Diversions. (line 204) -* backtrace: Debugging. (line 98) -* bd: Artificial Fonts. (line 98) +* aln: Setting Registers. (line 112) +* als: Strings. (line 229) +* am: Writing Macros. (line 113) +* am1: Writing Macros. (line 114) +* ami: Writing Macros. (line 115) +* ami1: Writing Macros. (line 116) +* as: Strings. (line 175) +* as1: Strings. (line 176) +* asciify: Diversions. (line 195) +* backtrace: Debugging. (line 96) +* bd: Artificial Fonts. (line 96) * blm: Blank Line Traps. (line 7) * box: Diversions. (line 34) * boxa: Diversions. (line 35) * bp: Page Control. (line 7) * br: Manipulating Filling and Adjusting. (line 12) -* break: while. (line 73) +* break: while. (line 68) * brp: Manipulating Filling and Adjusting. - (line 134) + (line 130) * c2: Character Translations. (line 16) * cc: Character Translations. (line 10) * ce: Manipulating Filling and Adjusting. - (line 211) -* cf: I/O. (line 51) -* cflags: Using Symbols. (line 242) -* ch: Page Location Traps. (line 119) -* char: Using Symbols. (line 329) -* chop: Strings. (line 280) + (line 203) +* cf: I/O. (line 50) +* cflags: Using Symbols. (line 237) +* ch: Page Location Traps. (line 111) +* char: Using Symbols. (line 323) +* chop: Strings. (line 267) * class: Character Classes. (line 12) -* close: I/O. (line 241) +* close: I/O. (line 231) * color: Colors. (line 7) -* composite: Using Symbols. (line 195) -* continue: while. (line 77) +* composite: Using Symbols. (line 191) +* continue: while. (line 72) * cp: Implementation Differences. - (line 23) -* cs: Artificial Fonts. (line 129) -* cu: Artificial Fonts. (line 89) + (line 22) +* cs: Artificial Fonts. (line 126) +* cu: Artificial Fonts. (line 86) * da: Diversions. (line 22) * de: Writing Macros. (line 15) * de1: Writing Macros. (line 16) -* defcolor: Colors. (line 21) +* defcolor: Colors. (line 22) * dei: Writing Macros. (line 17) * dei1: Writing Macros. (line 18) * device: Postprocessor Access. (line 11) * devicem: Postprocessor Access. - (line 29) + (line 30) * di: Diversions. (line 21) * do: Implementation Differences. - (line 24) + (line 23) * ds: Strings. (line 15) * ds1: Strings. (line 16) * dt: Diversion Traps. (line 7) * ec: Character Translations. - (line 49) + (line 47) * ecr: Character Translations. - (line 61) + (line 59) * ecs: Character Translations. - (line 60) -* el: if-else. (line 28) + (line 58) +* el: if-else. (line 27) * em: End-of-input Traps. (line 7) * eo: Character Translations. (line 24) * ev: Environments. (line 38) -* evc: Environments. (line 72) +* evc: Environments. (line 70) * ex: Debugging. (line 45) * fam: Font Families. (line 20) * fc: Fields. (line 18) -* fchar: Using Symbols. (line 330) -* fcolor: Colors. (line 85) +* fchar: Using Symbols. (line 324) +* fcolor: Colors. (line 80) * fi: Manipulating Filling and Adjusting. - (line 30) -* fl: Debugging. (line 89) + (line 28) +* fl: Debugging. (line 87) * fp: Font Positions. (line 11) -* fschar: Using Symbols. (line 331) +* fschar: Using Symbols. (line 325) * fspecial: Special Fonts. (line 18) -* ft <1>: Font Positions. (line 58) * ft: Changing Fonts. (line 7) -* ftr: Changing Fonts. (line 57) -* fzoom: Changing Fonts. (line 73) -* gcolor: Colors. (line 51) +* ft <1>: Font Positions. (line 57) +* ftr: Changing Fonts. (line 55) +* fzoom: Changing Fonts. (line 70) +* gcolor: Colors. (line 50) * hc: Manipulating Hyphenation. (line 105) * hcode: Manipulating Hyphenation. - (line 176) + (line 175) * hla: Manipulating Hyphenation. - (line 254) + (line 255) * hlm: Manipulating Hyphenation. (line 45) * hpf: Manipulating Hyphenation. @@ -5274,102 +4969,103 @@ * hpfcode: Manipulating Hyphenation. (line 116) * hw: Manipulating Hyphenation. - (line 61) + (line 62) * hy: Manipulating Hyphenation. (line 9) * hym: Manipulating Hyphenation. (line 210) * hys: Manipulating Hyphenation. - (line 225) -* ie: if-else. (line 27) + (line 226) +* ie: if-else. (line 26) * if: if-else. (line 10) -* ig: Comments. (line 67) -* in: Line Layout. (line 91) +* ig: Comments. (line 63) +* in: Line Layout. (line 86) * it: Input Line Traps. (line 7) * itc: Input Line Traps. (line 8) * kern: Ligatures and Kerning. (line 41) * lc: Leaders. (line 23) -* length: Strings. (line 221) +* length: Strings. (line 211) * lf: Debugging. (line 10) * lg: Ligatures and Kerning. (line 23) -* linetabs: Tabs and Fields. (line 147) -* ll: Line Layout. (line 145) +* linetabs: Tabs and Fields. (line 137) +* ll: Line Layout. (line 140) * ls: Manipulating Spacing. - (line 69) + (line 63) * lsm: Leading Spaces Traps. (line 7) * lt: Page Layout. (line 64) -* mc: Miscellaneous. (line 76) +* mc: Miscellaneous. (line 75) * mk: Page Motions. (line 10) -* mso: I/O. (line 41) +* mso: I/O. (line 40) * na: Manipulating Filling and Adjusting. - (line 126) -* ne: Page Control. (line 34) + (line 122) +* ne: Page Control. (line 33) * nf: Manipulating Filling and Adjusting. - (line 41) + (line 39) * nh: Manipulating Hyphenation. (line 37) * nm: Miscellaneous. (line 10) -* nn: Miscellaneous. (line 72) -* nop: if-else. (line 24) -* nr <1>: Auto-increment. (line 11) +* nn: Miscellaneous. (line 71) +* nop: if-else. (line 23) * nr: Setting Registers. (line 13) +* nr <1>: Setting Registers. (line 68) +* nr <2>: Auto-increment. (line 11) * nroff: Troff and Nroff Mode. (line 32) * ns: Manipulating Spacing. - (line 131) -* nx: I/O. (line 85) -* open: I/O. (line 209) -* opena: I/O. (line 210) -* os: Page Control. (line 55) -* output: Diversions. (line 189) -* pc: Page Layout. (line 93) -* pev: Debugging. (line 64) -* pi: I/O. (line 149) + (line 121) +* nx: I/O. (line 84) +* open: I/O. (line 199) +* opena: I/O. (line 200) +* os: Page Control. (line 53) +* output: Diversions. (line 180) +* pc: Page Layout. (line 94) +* pev: Debugging. (line 62) +* pi: I/O. (line 143) * pl: Page Layout. (line 10) -* pm: Debugging. (line 68) +* pm: Debugging. (line 66) * pn: Page Layout. (line 81) -* pnr: Debugging. (line 79) -* po: Line Layout. (line 61) +* pnr: Debugging. (line 77) +* po: Line Layout. (line 58) * ps: Changing Type Sizes. (line 7) -* psbb: Miscellaneous. (line 141) -* pso: I/O. (line 30) -* ptr: Debugging. (line 83) -* pvs: Changing Type Sizes. (line 133) -* rchar: Using Symbols. (line 388) -* rd: I/O. (line 90) -* return: Writing Macros. (line 156) -* rfschar: Using Symbols. (line 389) +* psbb: Miscellaneous. (line 135) +* pso: I/O. (line 29) +* ptr: Debugging. (line 81) +* pvs: Changing Type Sizes. (line 134) +* rchar: Using Symbols. (line 381) +* rd: I/O. (line 89) +* return: Writing Macros. (line 147) +* rfschar: Using Symbols. (line 382) * rj: Manipulating Filling and Adjusting. - (line 260) -* rm: Strings. (line 236) -* rn: Strings. (line 233) -* rnn: Setting Registers. (line 114) -* rr: Setting Registers. (line 110) + (line 249) +* rm: Strings. (line 224) +* rn: Strings. (line 221) +* rnn: Setting Registers. (line 108) +* rr: Setting Registers. (line 104) * rs: Manipulating Spacing. - (line 132) + (line 122) * rt: Page Motions. (line 11) -* schar: Using Symbols. (line 332) +* schar: Using Symbols. (line 326) * shc: Manipulating Hyphenation. - (line 241) -* shift: Parameters. (line 30) + (line 243) +* shift: Parameters. (line 31) * sizes: Changing Type Sizes. (line 69) * so: I/O. (line 9) * sp: Manipulating Spacing. (line 7) * special: Special Fonts. (line 17) -* spreadwarn: Debugging. (line 136) +* spreadwarn: Debugging. (line 131) * ss: Manipulating Filling and Adjusting. - (line 156) -* sty: Font Families. (line 61) -* substring: Strings. (line 205) -* sv: Page Control. (line 54) -* sy: I/O. (line 171) + (line 149) +* sty: Font Families. (line 59) +* substring: Strings. (line 192) +* sv: Page Control. (line 52) +* sy: I/O. (line 164) * ta: Tabs and Fields. (line 14) -* tc: Tabs and Fields. (line 139) -* ti: Line Layout. (line 117) +* tc: Tabs and Fields. (line 129) +* ti: Line Layout. (line 112) * tkf: Ligatures and Kerning. (line 60) * tl: Page Layout. (line 35) @@ -5377,132 +5073,133 @@ * tm1: Debugging. (line 26) * tmc: Debugging. (line 27) * tr: Character Translations. - (line 155) -* trf: I/O. (line 50) + (line 148) +* trf: I/O. (line 49) * trin: Character Translations. - (line 156) + (line 149) * trnt: Character Translations. - (line 247) + (line 237) * troff: Troff and Nroff Mode. (line 24) -* uf: Artificial Fonts. (line 93) -* ul: Artificial Fonts. (line 67) -* unformat: Diversions. (line 228) +* uf: Artificial Fonts. (line 90) +* ul: Artificial Fonts. (line 64) +* unformat: Diversions. (line 218) * vpt: Page Location Traps. (line 17) -* vs: Changing Type Sizes. (line 84) -* warn: Debugging. (line 159) -* warnscale: Debugging. (line 131) +* vs: Changing Type Sizes. (line 85) +* warn: Debugging. (line 154) +* warnscale: Debugging. (line 127) * wh: Page Location Traps. (line 29) * while: while. (line 10) -* write: I/O. (line 221) -* writec: I/O. (line 222) -* writem: I/O. (line 232) +* write: I/O. (line 211) +* writec: I/O. (line 212) +* writem: I/O. (line 222)  File: groff.info, Node: Escape Index, Next: Operator Index, Prev: Request Index, Up: Top -Anhang C Escape Index -********************* +Appendix C Escape Index +*********************** -Any escape sequence `\X' with X not in the list below emits a warning, +Any escape sequence '\X' with X not in the list below emits a warning, printing glyph X. [index] * Menu: -* \: Using Symbols. (line 137) -* \!: Diversions. (line 142) +* \: Using Symbols. (line 132) +* \!: Diversions. (line 135) * \": Comments. (line 10) -* \#: Comments. (line 50) +* \#: Comments. (line 48) * \$: Parameters. (line 19) -* \$*: Parameters. (line 38) -* \$0: Parameters. (line 70) -* \$@: Parameters. (line 39) -* \$^: Parameters. (line 48) +* \$*: Parameters. (line 40) +* \$0: Parameters. (line 71) +* \$@: Parameters. (line 41) +* \$^: Parameters. (line 50) * \%: Manipulating Hyphenation. (line 84) * \&: Ligatures and Kerning. - (line 102) -* \': Using Symbols. (line 227) + (line 100) +* \': Using Symbols. (line 222) * \): Ligatures and Kerning. - (line 131) + (line 127) * \*: Strings. (line 17) * \,: Ligatures and Kerning. - (line 92) -* \-: Using Symbols. (line 236) + (line 91) +* \-: Using Symbols. (line 231) * \.: Character Translations. - (line 128) + (line 122) * \/: Ligatures and Kerning. (line 80) -* \0: Page Motions. (line 147) +* \0: Page Motions. (line 138) * \: Manipulating Hyphenation. (line 85) -* \: Line Control. (line 43) -* \: Page Motions. (line 123) -* \?: Diversions. (line 143) -* \\: Character Translations. - (line 70) -* \^: Page Motions. (line 139) -* \_: Using Symbols. (line 239) -* \`: Using Symbols. (line 232) +* \?: Diversions. (line 136) +* \A: Identifiers. (line 53) * \a: Leaders. (line 18) -* \A: Identifiers. (line 55) -* \b: Drawing Requests. (line 239) -* \B: Expressions. (line 84) -* \C: Using Symbols. (line 189) -* \c: Line Control. (line 44) -* \D: Drawing Requests. (line 71) -* \d: Page Motions. (line 109) -* \E: Character Translations. - (line 72) +* \B: Expressions. (line 83) +* \b: Drawing Requests. (line 232) +* \c: Line Control. (line 41) +* \C: Using Symbols. (line 185) +* \d: Page Motions. (line 100) +* \D: Drawing Requests. (line 67) * \e: Character Translations. - (line 71) -* \f: Font Positions. (line 59) -* \F: Font Families. (line 22) + (line 69) +* \E: Character Translations. + (line 70) * \f: Changing Fonts. (line 8) -* \g: Assigning Formats. (line 74) -* \h: Page Motions. (line 112) +* \F: Font Families. (line 22) +* \f <1>: Font Positions. (line 58) +* \g: Assigning Formats. (line 73) * \H: Artificial Fonts. (line 13) -* \k: Page Motions. (line 211) -* \L: Drawing Requests. (line 50) +* \h: Page Motions. (line 103) +* \k: Page Motions. (line 201) * \l: Drawing Requests. (line 16) -* \M: Colors. (line 86) -* \m: Colors. (line 52) -* \N: Using Symbols. (line 205) -* \n <1>: Auto-increment. (line 19) +* \L: Drawing Requests. (line 49) +* \m: Colors. (line 51) +* \M: Colors. (line 81) * \n: Interpolating Registers. (line 9) +* \n <1>: Auto-increment. (line 19) +* \N: Using Symbols. (line 201) +* \o: Page Motions. (line 216) * \O: Suppressing output. (line 7) -* \o: Page Motions. (line 226) * \p: Manipulating Filling and Adjusting. - (line 135) -* \r: Page Motions. (line 103) + (line 131) * \R: Setting Registers. (line 14) +* \R <1>: Setting Registers. (line 70) +* \r: Page Motions. (line 94) +* \: Line Control. (line 40) +* \S: Artificial Fonts. (line 44) * \s: Changing Type Sizes. (line 10) -* \S: Artificial Fonts. (line 46) +* \: Page Motions. (line 114) * \t: Tabs and Fields. (line 10) -* \u: Page Motions. (line 106) -* \V: I/O. (line 259) -* \v: Page Motions. (line 87) -* \w: Page Motions. (line 155) +* \u: Page Motions. (line 97) +* \v: Page Motions. (line 78) +* \V: I/O. (line 247) +* \w: Page Motions. (line 145) +* \x: Manipulating Spacing. + (line 82) * \X: Postprocessor Access. (line 12) -* \x: Manipulating Spacing. - (line 89) * \Y: Postprocessor Access. - (line 30) -* \Z: Page Motions. (line 234) -* \z: Page Motions. (line 230) -* \{: if-else. (line 38) -* \|: Page Motions. (line 131) -* \}: if-else. (line 38) -* \~: Page Motions. (line 127) + (line 31) +* \z: Page Motions. (line 220) +* \Z: Page Motions. (line 224) +* \\: Character Translations. + (line 68) +* \^: Page Motions. (line 130) +* \_: Using Symbols. (line 234) +* \`: Using Symbols. (line 227) +* \{: if-else. (line 35) +* \|: Page Motions. (line 122) +* \}: if-else. (line 35) +* \~: Page Motions. (line 118)  File: groff.info, Node: Operator Index, Next: Register Index, Prev: Escape Index, Up: Top -Anhang D Operator Index -*********************** +Appendix D Operator Index +************************* [index] * Menu: @@ -5510,70 +5207,72 @@ * !: Expressions. (line 21) * %: Expressions. (line 8) * &: Expressions. (line 19) -* (: Expressions. (line 60) -* ): Expressions. (line 60) +* (: Expressions. (line 59) +* ): Expressions. (line 59) * *: Expressions. (line 8) * +: Expressions. (line 8) +* + <1>: Expressions. (line 21) * -: Expressions. (line 8) +* - <1>: Expressions. (line 21) * /: Expressions. (line 8) * <: Expressions. (line 15) * <=: Expressions. (line 15) -* : Expressions. (line 19) * =: Expressions. (line 15) * ==: Expressions. (line 15) * >: Expressions. (line 15) * >=: Expressions. (line 15) -* >?: Expressions. (line 45) +* >?: Expressions. (line 44)  File: groff.info, Node: Register Index, Next: Macro Index, Prev: Operator Index, Up: Top -Anhang E Register Index -*********************** +Appendix E Register Index +************************* The macro package or program a specific register belongs to is appended in brackets. - A register name `x' consisting of exactly one character can be -accessed as `\nx'. A register name `xx' consisting of exactly two -characters can be accessed as `\n(xx'. Register names `xxx' of any -length can be accessed as `\n[xxx]'. + A register name 'x' consisting of exactly one character can be +accessed as '\nx'. A register name 'xx' consisting of exactly two +characters can be accessed as '\n(xx'. Register names 'xxx' of any +length can be accessed as '\n[xxx]'. [index] * Menu: -* $$: Built-in Registers. (line 100) +* $$: Built-in Registers. (line 99) +* %: Page Layout. (line 94) * % <1>: Page Control. (line 10) -* %: Page Layout. (line 93) * .$: Parameters. (line 10) +* .A: Built-in Registers. (line 106) * .a: Manipulating Spacing. - (line 90) -* .A: Built-in Registers. (line 107) -* .b: Artificial Fonts. (line 100) -* .br: Requests. (line 58) + (line 83) +* .b: Artificial Fonts. (line 98) +* .br: Requests. (line 56) +* .c: Built-in Registers. (line 76) * .C: Implementation Differences. - (line 25) -* .c: Built-in Registers. (line 77) -* .cdp: Environments. (line 96) + (line 24) +* .cdp: Environments. (line 94) * .ce: Manipulating Filling and Adjusting. - (line 212) -* .cht: Environments. (line 95) + (line 204) +* .cht: Environments. (line 93) * .color: Colors. (line 8) -* .csk: Environments. (line 97) -* .d: Diversions. (line 71) +* .csk: Environments. (line 95) +* .d: Diversions. (line 69) * .ev: Environments. (line 39) -* .f: Font Positions. (line 12) * .F: Built-in Registers. (line 12) +* .f: Font Positions. (line 12) * .fam: Font Families. (line 21) * .fn: Font Families. (line 25) * .fp: Font Positions. (line 13) -* .g: Built-in Registers. (line 103) -* .h: Diversions. (line 78) +* .g: Built-in Registers. (line 102) * .H: Built-in Registers. (line 15) +* .h: Diversions. (line 76) * .height: Artificial Fonts. (line 16) * .hla: Manipulating Hyphenation. - (line 255) + (line 256) * .hlc: Manipulating Hyphenation. (line 47) * .hlm: Manipulating Hyphenation. @@ -5583,135 +5282,135 @@ * .hym: Manipulating Hyphenation. (line 211) * .hys: Manipulating Hyphenation. - (line 226) -* .i: Line Layout. (line 94) -* .in: Line Layout. (line 120) -* .int: Line Control. (line 45) + (line 227) +* .i: Line Layout. (line 89) +* .in: Line Layout. (line 115) +* .int: Line Control. (line 42) * .j: Manipulating Filling and Adjusting. - (line 53) -* .k: Page Motions. (line 222) + (line 51) +* .k: Page Motions. (line 212) * .kern: Ligatures and Kerning. (line 42) -* .l: Line Layout. (line 148) * .L: Manipulating Spacing. - (line 70) + (line 64) +* .l: Line Layout. (line 143) * .lg: Ligatures and Kerning. (line 24) -* .linetabs: Tabs and Fields. (line 148) -* .ll: Line Layout. (line 149) +* .linetabs: Tabs and Fields. (line 138) +* .ll: Line Layout. (line 144) * .lt: Page Layout. (line 67) -* .M: Colors. (line 89) -* .m: Colors. (line 55) -* .n: Environments. (line 112) -* .ne: Page Location Traps. (line 131) +* .m: Colors. (line 54) +* .M: Colors. (line 84) +* .n: Environments. (line 110) +* .ne: Page Location Traps. (line 122) * .ns: Manipulating Spacing. - (line 133) -* .o: Line Layout. (line 64) + (line 123) * .O: Built-in Registers. (line 112) -* .p: Page Layout. (line 13) +* .o: Line Layout. (line 61) * .P: Built-in Registers. (line 116) -* .pe: Page Location Traps. (line 152) +* .p: Page Layout. (line 13) +* .pe: Page Location Traps. (line 143) * .pn: Page Layout. (line 84) * .ps: Fractional Type Sizes. - (line 35) + (line 37) * .psr: Fractional Type Sizes. - (line 42) -* .pvs: Changing Type Sizes. (line 136) + (line 44) +* .pvs: Changing Type Sizes. (line 137) * .R: Built-in Registers. (line 18) * .rj: Manipulating Filling and Adjusting. - (line 261) + (line 250) * .s: Changing Type Sizes. (line 11) -* .slant: Artificial Fonts. (line 47) +* .slant: Artificial Fonts. (line 45) * .sr: Fractional Type Sizes. - (line 43) + (line 45) * .ss: Manipulating Filling and Adjusting. - (line 157) + (line 150) * .sss: Manipulating Filling and Adjusting. - (line 158) + (line 151) * .sty: Changing Fonts. (line 11) -* .t: Page Location Traps. (line 110) * .T: Built-in Registers. (line 122) +* .t: Page Location Traps. (line 102) * .tabs: Tabs and Fields. (line 15) -* .trunc: Page Location Traps. (line 140) +* .trunc: Page Location Traps. (line 131) +* .U: Built-in Registers. (line 23) * .u: Manipulating Filling and Adjusting. - (line 31) -* .U: Built-in Registers. (line 22) -* .v: Changing Type Sizes. (line 87) -* .V: Built-in Registers. (line 27) + (line 29) +* .V: Built-in Registers. (line 28) +* .v: Changing Type Sizes. (line 88) * .vpt: Page Location Traps. (line 18) -* .w: Environments. (line 94) -* .warn: Debugging. (line 160) -* .x: Built-in Registers. (line 89) -* .Y: Built-in Registers. (line 97) -* .y: Built-in Registers. (line 93) -* .z: Diversions. (line 70) -* .zoom: Changing Fonts. (line 74) -* c.: Built-in Registers. (line 78) -* ct: Page Motions. (line 160) +* .w: Environments. (line 92) +* .warn: Debugging. (line 155) +* .x: Built-in Registers. (line 88) +* .y: Built-in Registers. (line 92) +* .Y: Built-in Registers. (line 96) +* .z: Diversions. (line 68) +* .zoom: Changing Fonts. (line 71) +* c.: Built-in Registers. (line 77) +* ct: Page Motions. (line 150) * DD [ms]: ms Document Control Registers. (line 239) -* dl: Diversions. (line 96) -* dn: Diversions. (line 95) -* dw: Built-in Registers. (line 43) -* dy: Built-in Registers. (line 46) +* dl: Diversions. (line 93) +* dn: Diversions. (line 92) +* dw: Built-in Registers. (line 45) +* dy: Built-in Registers. (line 48) * FAM [ms]: ms Document Control Registers. - (line 110) + (line 111) * FF [ms]: ms Document Control Registers. - (line 184) + (line 185) * FI [ms]: ms Document Control Registers. - (line 177) + (line 178) * FL [ms]: ms Document Control Registers. - (line 170) + (line 171) * FM [ms]: ms Document Control Registers. (line 47) * FPD [ms]: ms Document Control Registers. (line 221) * FPS [ms]: ms Document Control Registers. - (line 204) + (line 205) * FVS [ms]: ms Document Control Registers. - (line 212) + (line 213) * GROWPS [ms]: ms Document Control Registers. - (line 88) + (line 89) * GS [ms]: Differences from AT&T ms. - (line 46) + (line 45) * HM [ms]: ms Document Control Registers. (line 40) * HORPHANS [ms]: ms Document Control Registers. - (line 154) -* hours: Built-in Registers. (line 39) -* hp: Page Motions. (line 219) + (line 155) +* hours: Built-in Registers. (line 41) +* hp: Page Motions. (line 209) * HY [ms]: ms Document Control Registers. - (line 101) + (line 102) * LL [ms]: ms Document Control Registers. (line 25) -* llx: Miscellaneous. (line 142) -* lly: Miscellaneous. (line 143) -* ln: Built-in Registers. (line 83) +* llx: Miscellaneous. (line 136) +* lly: Miscellaneous. (line 137) +* ln: Built-in Registers. (line 82) * lsn: Leading Spaces Traps. (line 8) * lss: Leading Spaces Traps. (line 9) * LT [ms]: ms Document Control Registers. (line 32) -* MINGW [ms] <1>: Additional ms Macros. - (line 28) * MINGW [ms]: ms Document Control Registers. (line 231) -* minutes: Built-in Registers. (line 35) -* mo: Built-in Registers. (line 49) -* nl: Page Control. (line 68) +* MINGW [ms] <1>: Additional ms Macros. + (line 28) +* minutes: Built-in Registers. (line 37) +* mo: Built-in Registers. (line 51) +* nl: Page Control. (line 67) * opmaxx: Suppressing output. (line 19) * opmaxy: Suppressing output. (line 19) * opminx: Suppressing output. (line 19) * opminy: Suppressing output. (line 19) * PD [ms]: ms Document Control Registers. - (line 127) + (line 128) * PI [ms]: ms Document Control Registers. - (line 120) + (line 121) * PO [ms]: ms Document Control Registers. (line 16) * PORPHANS [ms]: ms Document Control Registers. - (line 142) + (line 143) * PS [ms]: ms Document Control Registers. (line 57) * ps4html [grohtml]: grohtml specific registers and strings. @@ -5719,31 +5418,31 @@ * PSINCR [ms]: ms Document Control Registers. (line 77) * QI [ms]: ms Document Control Registers. - (line 134) -* rsb: Page Motions. (line 159) -* rst: Page Motions. (line 158) -* sb: Page Motions. (line 157) -* seconds: Built-in Registers. (line 30) -* skw: Page Motions. (line 162) -* slimit: Debugging. (line 123) -* ssc: Page Motions. (line 161) -* st: Page Motions. (line 156) -* systat: I/O. (line 172) -* urx: Miscellaneous. (line 144) -* ury: Miscellaneous. (line 145) + (line 135) +* rsb: Page Motions. (line 149) +* rst: Page Motions. (line 148) +* sb: Page Motions. (line 147) +* seconds: Built-in Registers. (line 31) +* skw: Page Motions. (line 152) +* slimit: Debugging. (line 119) +* ssc: Page Motions. (line 151) +* st: Page Motions. (line 146) +* systat: I/O. (line 165) +* urx: Miscellaneous. (line 138) +* ury: Miscellaneous. (line 139) * VS [ms]: ms Document Control Registers. (line 67) -* year: Built-in Registers. (line 52) -* yr: Built-in Registers. (line 55) +* year: Built-in Registers. (line 54) +* yr: Built-in Registers. (line 57)  File: groff.info, Node: Macro Index, Next: String Index, Prev: Register Index, Up: Top -Anhang F Macro Index -******************** +Appendix F Macro Index +********************** The macro package a specific macro belongs to is appended in brackets. -They appear without the leading control character (normally `.'). +They appear without the leading control character (normally '.'). [index] * Menu: @@ -5753,20 +5452,20 @@ * [ [ms]: ms Insertions. (line 33) * ] [ms]: ms Insertions. (line 34) * AB [ms]: ms Cover Page Macros. - (line 60) + (line 59) * AE [ms]: ms Cover Page Macros. - (line 65) + (line 64) * AI [ms]: ms Cover Page Macros. - (line 56) -* AM [ms] <1>: Additional ms Macros. - (line 10) + (line 55) * AM [ms]: ms Strings and Special Characters. (line 51) +* AM [ms] <1>: Additional ms Macros. + (line 10) * AT [man]: Miscellaneous man macros. - (line 26) + (line 27) * AU [ms]: ms Cover Page Macros. - (line 38) -* B [man]: Man font macros. (line 48) + (line 39) +* B [man]: Man font macros. (line 47) * B [ms]: Highlighting in ms. (line 10) * B1 [ms]: ms Displays and Keeps. (line 94) @@ -5775,37 +5474,53 @@ * BD [ms]: ms Displays and Keeps. (line 31) * BI [man]: Man font macros. (line 18) -* BI [ms]: Highlighting in ms. (line 39) -* BR [man]: Man font macros. (line 40) +* BI [ms]: Highlighting in ms. (line 38) +* BR [man]: Man font macros. (line 39) * BT [man]: Optional man extensions. (line 21) * BT [ms]: ms Headers and Footers. - (line 40) -* BX [ms]: Highlighting in ms. (line 43) + (line 39) +* BX [ms]: Highlighting in ms. (line 42) * CD [ms]: ms Displays and Keeps. (line 41) * CT [man]: Optional man extensions. (line 36) * CW [man]: Optional man extensions. (line 39) +* CW [ms]: Highlighting in ms. (line 34) * CW [ms] <1>: Additional ms Macros. (line 19) -* CW [ms]: Highlighting in ms. (line 35) * DA [ms]: ms Cover Page Macros. - (line 23) + (line 24) * De [man]: Optional man extensions. (line 45) -* De [ms]: ms Displays and Keeps. - (line 57) * DE [ms]: ms Displays and Keeps. (line 16) +* DE [ms] <1>: ms Displays and Keeps. + (line 24) +* DE [ms] <2>: ms Displays and Keeps. + (line 32) +* DE [ms] <3>: ms Displays and Keeps. + (line 42) +* DE [ms] <4>: ms Displays and Keeps. + (line 50) +* De [ms]: ms Displays and Keeps. + (line 57) * Ds [man]: Optional man extensions. (line 42) -* DS [ms]: Additional ms Macros. +* DS [ms]: ms Displays and Keeps. (line 14) +* DS [ms] <1>: ms Displays and Keeps. + (line 22) +* DS [ms] <2>: ms Displays and Keeps. + (line 30) +* DS [ms] <3>: ms Displays and Keeps. + (line 40) +* DS [ms] <4>: ms Displays and Keeps. + (line 48) * Ds [ms]: ms Displays and Keeps. (line 56) -* DS [ms]: ms Displays and Keeps. +* DS [ms] <5>: Additional ms Macros. (line 14) * DT [man]: Miscellaneous man macros. (line 10) @@ -5828,99 +5543,101 @@ * HB [man]: Optional man extensions. (line 65) * HD [ms]: ms Headers and Footers. - (line 39) -* HP [man]: Man usage. (line 99) -* I [man]: Man font macros. (line 53) -* I [ms]: Highlighting in ms. (line 31) -* IB [man]: Man font macros. (line 28) + (line 38) +* HP [man]: Man usage. (line 98) +* I [man]: Man font macros. (line 52) +* I [ms]: Highlighting in ms. (line 30) +* IB [man]: Man font macros. (line 27) * ID [ms]: ms Displays and Keeps. (line 23) -* IP [man]: Man usage. (line 79) +* IP [man]: Man usage. (line 80) * IP [ms]: Lists in ms. (line 9) -* IR [man]: Man font macros. (line 36) +* IR [man]: Man font macros. (line 35) * IX [ms]: Additional ms Macros. (line 22) * KE [ms]: ms Displays and Keeps. (line 73) +* KE [ms] <1>: ms Displays and Keeps. + (line 78) * KF [ms]: ms Displays and Keeps. (line 77) * KS [ms]: ms Displays and Keeps. (line 72) * LD [ms]: ms Displays and Keeps. (line 15) -* LG [ms]: Highlighting in ms. (line 52) -* LP [man]: Man usage. (line 69) +* LG [ms]: Highlighting in ms. (line 51) +* LP [man]: Man usage. (line 70) * LP [ms]: Paragraphs in ms. (line 12) * MC [ms]: ms Multiple Columns. (line 19) * MS [man]: Optional man extensions. (line 73) * ND [ms]: ms Cover Page Macros. - (line 28) + (line 29) * NE [man]: Optional man extensions. (line 85) * NH [ms]: Headings in ms. (line 13) -* NL [ms]: Highlighting in ms. (line 64) +* NL [ms]: Highlighting in ms. (line 63) * NT [man]: Optional man extensions. (line 78) * OF [ms]: ms Headers and Footers. (line 25) * OH [ms]: ms Headers and Footers. (line 23) -* P [man]: Man usage. (line 71) +* P [man]: Man usage. (line 72) * P1 [ms]: ms Cover Page Macros. - (line 19) + (line 20) * PD [man]: Miscellaneous man macros. (line 15) * PE [ms]: ms Insertions. (line 21) -* Pn [man]: Optional man extensions. - (line 92) * PN [man]: Optional man extensions. (line 88) -* PP [man]: Man usage. (line 70) +* Pn [man]: Optional man extensions. + (line 92) +* PP [man]: Man usage. (line 71) * PP [ms]: Paragraphs in ms. (line 9) * PS [ms]: ms Insertions. (line 20) * PT [man]: Optional man extensions. (line 16) * PT [ms]: ms Headers and Footers. - (line 38) -* PX [ms]: ms TOC. (line 65) + (line 37) +* PX [ms]: ms TOC. (line 62) * QP [ms]: Paragraphs in ms. (line 15) * R [man]: Optional man extensions. (line 98) -* R [ms]: Highlighting in ms. (line 27) -* RB [man]: Man font macros. (line 44) +* R [ms]: Highlighting in ms. (line 26) +* RB [man]: Man font macros. (line 43) * RD [ms]: ms Displays and Keeps. (line 49) -* RE [man]: Man usage. (line 116) +* RE [man]: Man usage. (line 115) * RE [ms]: Indentation values in ms. (line 12) -* RI [man]: Man font macros. (line 32) +* RI [man]: Man font macros. (line 31) * RN [man]: Optional man extensions. (line 101) * RP [ms]: ms Cover Page Macros. (line 10) -* RS [man]: Man usage. (line 107) +* RS [man]: Man usage. (line 106) * RS [ms]: Indentation values in ms. (line 11) * SB [man]: Man font macros. (line 14) -* SH [man]: Man usage. (line 33) -* SH [ms]: Headings in ms. (line 55) +* SH [man]: Man usage. (line 34) +* SH [ms]: Headings in ms. (line 54) * SM [man]: Man font macros. (line 10) -* SM [ms]: Highlighting in ms. (line 58) -* SS [man]: Man usage. (line 42) +* SM [ms]: Highlighting in ms. (line 57) +* SS [man]: Man usage. (line 43) * TA [ms]: Tabstops in ms. (line 10) * TB [man]: Optional man extensions. (line 70) -* TC [ms]: ms TOC. (line 55) +* TC [ms]: ms TOC. (line 52) * TE [ms]: ms Insertions. (line 12) * TH [man]: Man usage. (line 11) * TL [ms]: ms Cover Page Macros. - (line 33) -* TP [man]: Man usage. (line 50) + (line 34) +* TP [man]: Man usage. (line 51) * TS [ms]: ms Insertions. (line 11) * UC [man]: Miscellaneous man macros. - (line 43) -* UL [ms]: Highlighting in ms. (line 47) + (line 44) +* UL [ms]: Highlighting in ms. (line 46) * VE [man]: Optional man extensions. (line 108) * VS [man]: Optional man extensions. @@ -5933,16 +5650,16 @@  File: groff.info, Node: String Index, Next: Glyph Name Index, Prev: Macro Index, Up: Top -Anhang G String Index -********************* +Appendix G String Index +*********************** The macro package or program a specific string belongs to is appended in brackets. - A string name `x' consisting of exactly one character can be -accessed as `\*x'. A string name `xx' consisting of exactly two -characters can be accessed as `\*(xx'. String names `xxx' of any -length can be accessed as `\*[xxx]'. + A string name 'x' consisting of exactly one character can be accessed +as '\*x'. A string name 'xx' consisting of exactly two characters can +be accessed as '\*(xx'. String names 'xxx' of any length can be +accessed as '\*[xxx]'. [index] * Menu: @@ -5973,20 +5690,24 @@ (line 86) * ` [ms]: ms Strings and Special Characters. (line 68) +* { [ms]: Highlighting in ms. (line 67) +* } [ms]: Highlighting in ms. (line 68) +* ~ [ms]: ms Strings and Special Characters. + (line 77) * ABSTRACT [ms]: ms Strings and Special Characters. (line 15) -* Ae [ms]: ms Strings and Special Characters. - (line 128) * ae [ms]: ms Strings and Special Characters. (line 125) +* Ae [ms]: ms Strings and Special Characters. + (line 128) * CF [ms]: ms Headers and Footers. (line 16) * CH [ms]: ms Headers and Footers. (line 11) -* d- [ms]: ms Strings and Special Characters. - (line 119) * D- [ms]: ms Strings and Special Characters. (line 116) +* d- [ms]: ms Strings and Special Characters. + (line 119) * HF [man]: Predefined man strings. (line 12) * LF [ms]: ms Headers and Footers. @@ -6021,10 +5742,10 @@ (line 31) * o [ms]: ms Strings and Special Characters. (line 92) -* q [ms]: ms Strings and Special Characters. - (line 122) * Q [ms]: ms Strings and Special Characters. (line 44) +* q [ms]: ms Strings and Special Characters. + (line 122) * R [man]: Predefined man strings. (line 15) * REFERENCES [ms]: ms Strings and Special Characters. @@ -6040,11 +5761,11 @@ * SN [ms]: Headings in ms. (line 22) * SN-DOT [ms]: Headings in ms. (line 23) * SN-NO-DOT [ms]: Headings in ms. (line 24) -* SN-STYLE [ms]: Headings in ms. (line 37) -* th [ms]: ms Strings and Special Characters. - (line 113) +* SN-STYLE [ms]: Headings in ms. (line 36) * Th [ms]: ms Strings and Special Characters. (line 110) +* th [ms]: ms Strings and Special Characters. + (line 113) * Tm [man]: Predefined man strings. (line 18) * TOC [ms]: ms Strings and Special Characters. @@ -6055,110 +5776,107 @@ (line 83) * www-image-template [grohtml]: grohtml specific registers and strings. (line 8) -* { [ms]: Highlighting in ms. (line 68) -* } [ms]: Highlighting in ms. (line 69) -* ~ [ms]: ms Strings and Special Characters. - (line 77)  File: groff.info, Node: Glyph Name Index, Next: Font File Keyword Index, Prev: String Index, Up: Top -Anhang H Glyph Name Index -************************* +Appendix H Glyph Name Index +*************************** -A glyph name `xx' consisting of exactly two characters can be accessed -as `\(xx'. Glyph names `xxx' of any length can be accessed as `\[xxx]'. +A glyph name 'xx' consisting of exactly two characters can be accessed +as '\(xx'. Glyph names 'xxx' of any length can be accessed as '\[xxx]'.  File: groff.info, Node: Font File Keyword Index, Next: Program and File Index, Prev: Glyph Name Index, Up: Top -Anhang I Font File Keyword Index -******************************** +Appendix I Font File Keyword Index +********************************** [index] * Menu: * #: Font File Format. (line 36) * ---: Font File Format. (line 51) -* biggestfont: DESC File Format. (line 144) -* charset <1>: Font File Format. (line 44) +* biggestfont: DESC File Format. (line 142) * charset: DESC File Format. (line 12) -* family <1>: DESC File Format. (line 16) -* family <2>: Font Positions. (line 61) +* charset <1>: Font File Format. (line 44) * family: Changing Fonts. (line 11) -* fonts <1>: DESC File Format. (line 19) -* fonts <2>: Special Fonts. (line 18) +* family <1>: Font Positions. (line 60) +* family <2>: DESC File Format. (line 16) * fonts: Using Symbols. (line 14) +* fonts <1>: Special Fonts. (line 18) +* fonts <2>: DESC File Format. (line 19) * hor: DESC File Format. (line 25) * image_generator: DESC File Format. (line 29) -* kernpairs: Font File Format. (line 135) +* kernpairs: Font File Format. (line 139) * ligatures: Font File Format. (line 22) * name: Font File Format. (line 12) * paperlength: DESC File Format. (line 35) * papersize: DESC File Format. (line 40) -* paperwidth: DESC File Format. (line 60) -* pass_filenames: DESC File Format. (line 65) -* postpro: DESC File Format. (line 70) -* prepro: DESC File Format. (line 79) -* print: DESC File Format. (line 83) -* res: DESC File Format. (line 87) -* sizes: DESC File Format. (line 90) -* sizescale: DESC File Format. (line 96) +* paperwidth: DESC File Format. (line 59) +* pass_filenames: DESC File Format. (line 64) +* postpro: DESC File Format. (line 69) +* prepro: DESC File Format. (line 77) +* print: DESC File Format. (line 81) +* res: DESC File Format. (line 85) +* sizes: DESC File Format. (line 88) +* sizescale: DESC File Format. (line 95) * slant: Font File Format. (line 18) * spacewidth: Font File Format. (line 15) -* spare1: DESC File Format. (line 144) -* spare2: DESC File Format. (line 144) +* spare1: DESC File Format. (line 142) +* spare2: DESC File Format. (line 142) +* special: Artificial Fonts. (line 115) * special <1>: Font File Format. (line 28) -* special: Artificial Fonts. (line 118) -* styles <1>: DESC File Format. (line 102) -* styles <2>: Font Positions. (line 61) -* styles <3>: Font Families. (line 76) * styles: Changing Fonts. (line 11) -* tcommand: DESC File Format. (line 105) -* unicode: DESC File Format. (line 109) -* unitwidth: DESC File Format. (line 123) -* unscaled_charwidths: DESC File Format. (line 127) -* use_charnames_in_special <1>: DESC File Format. (line 131) +* styles <1>: Font Families. (line 75) +* styles <2>: Font Positions. (line 60) +* styles <3>: DESC File Format. (line 101) +* tcommand: DESC File Format. (line 104) +* unicode: DESC File Format. (line 108) +* unitwidth: DESC File Format. (line 122) +* unscaled_charwidths: DESC File Format. (line 126) * use_charnames_in_special: Postprocessor Access. - (line 21) -* vert: DESC File Format. (line 136) + (line 22) +* use_charnames_in_special <1>: DESC File Format. (line 130) +* vert: DESC File Format. (line 135)  File: groff.info, Node: Program and File Index, Next: Concept Index, Prev: Font File Keyword Index, Up: Top -Anhang J Program and File Index -******************************* +Appendix J Program and File Index +********************************* [index] * Menu: * an.tmac: man. (line 6) -* changebar: Miscellaneous. (line 111) -* composite.tmac: Using Symbols. (line 195) +* changebar: Miscellaneous. (line 108) +* composite.tmac: Using Symbols. (line 191) * cp1047.tmac: Input Encodings. (line 9) -* DESC <1>: Special Fonts. (line 18) -* DESC <2>: Using Symbols. (line 14) -* DESC <3>: Font Positions. (line 61) -* DESC <4>: Font Families. (line 76) * DESC: Changing Fonts. (line 11) +* DESC <1>: Font Families. (line 75) +* DESC <2>: Font Positions. (line 60) +* DESC <3>: Using Symbols. (line 14) +* DESC <4>: Using Symbols. (line 212) +* DESC <5>: Special Fonts. (line 18) * DESC file format: DESC File Format. (line 6) -* DESC, and font mounting: Font Positions. (line 37) -* DESC, and use_charnames_in_special: Postprocessor Access. - (line 21) -* ditroff: History. (line 58) +* DESC, and font mounting: Font Positions. (line 36) +* DESC, and 'use_charnames_in_special': Postprocessor Access. + (line 22) +* ditroff: History. (line 59) * ec.tmac: Input Encodings. (line 46) * eqn: ms Insertions. (line 7) * freeeuro.pfa: Input Encodings. (line 46) * gchem: Groff Options. (line 6) * geqn: Groff Options. (line 6) * geqn, invocation in manual pages: Preprocessors in man pages. - (line 12) + (line 11) * ggrn: Groff Options. (line 6) * gpic: Groff Options. (line 6) * grap: Groff Options. (line 6) * grefer: Groff Options. (line 6) * grefer, invocation in manual pages: Preprocessors in man pages. - (line 12) + (line 11) * groff: Groff Options. (line 6) * grog: grog. (line 6) * grohtml: Miscellaneous man macros. @@ -6166,29 +5884,30 @@ * gsoelim: Groff Options. (line 6) * gtbl: Groff Options. (line 6) * gtbl, invocation in manual pages: Preprocessors in man pages. - (line 12) + (line 11) * gtroff: Groff Options. (line 6) * hyphen.us: Manipulating Hyphenation. - (line 163) + (line 162) * hyphenex.us: Manipulating Hyphenation. - (line 163) + (line 162) * latin1.tmac: Input Encodings. (line 14) * latin2.tmac: Input Encodings. (line 18) +* latin2.tmac <1>: Input Encodings. (line 23) * latin9.tmac: Input Encodings. (line 28) -* less: Invoking grotty. (line 51) +* less: Invoking grotty. (line 50) * makeindex: Indices. (line 10) * man, invocation of preprocessors: Preprocessors in man pages. - (line 12) + (line 11) * man-old.tmac: man. (line 6) +* man.local: Man usage. (line 6) * man.local <1>: Optional man extensions. (line 6) -* man.local: Man usage. (line 6) * man.tmac: man. (line 6) * man.ultrix: Optional man extensions. (line 30) -* nrchbar: Miscellaneous. (line 111) +* nrchbar: Miscellaneous. (line 108) * papersize.tmac: Paper Size. (line 16) -* perl: I/O. (line 182) +* perl: I/O. (line 175) * pic: ms Insertions. (line 7) * post-grohtml: Groff Options. (line 275) * pre-grohtml: Groff Options. (line 275) @@ -6196,24 +5915,2241 @@ * refer: ms Insertions. (line 7) * soelim: Debugging. (line 10) * tbl: ms Insertions. (line 7) -* trace.tmac: Writing Macros. (line 110) -* troffrc <1>: Line Layout. (line 64) -* troffrc <2>: Troff and Nroff Mode. - (line 24) +* trace.tmac: Writing Macros. (line 104) +* trace.tmac <1>: Writing Macros. (line 136) +* troffrc: Groff Options. (line 206) +* troffrc <1>: Paper Size. (line 16) +* troffrc <2>: Manipulating Hyphenation. + (line 162) * troffrc <3>: Manipulating Hyphenation. - (line 163) -* troffrc <4>: Paper Size. (line 16) -* troffrc: Groff Options. (line 208) -* troffrc-end <1>: Troff and Nroff Mode. + (line 256) +* troffrc <4>: Troff and Nroff Mode. (line 24) +* troffrc <5>: Line Layout. (line 61) +* troffrc-end: Groff Options. (line 206) +* troffrc-end <1>: Manipulating Hyphenation. + (line 162) * troffrc-end <2>: Manipulating Hyphenation. - (line 163) -* troffrc-end: Groff Options. (line 208) + (line 256) +* troffrc-end <3>: Troff and Nroff Mode. + (line 24) * tty.tmac: Troff and Nroff Mode. (line 32) -  -Local Variables: -coding: iso-8859-1 -End: +File: groff.info, Node: Concept Index, Prev: Program and File Index, Up: Top + +Appendix K Concept Index +************************ + +[index] +* Menu: + +* '"', at end of sentence: Sentences. (line 18) +* '"', at end of sentence <1>: Using Symbols. (line 275) +* '"', in a macro argument: Request and Macro Arguments. + (line 25) +* '%', as delimiter: Escapes. (line 67) +* '&', as delimiter: Escapes. (line 67) +* ''', as a comment: Comments. (line 42) +* ''', at end of sentence: Sentences. (line 18) +* ''', at end of sentence <1>: Using Symbols. (line 275) +* ''', delimiting arguments: Escapes. (line 29) +* '(', as delimiter: Escapes. (line 67) +* '(', starting a two-character identifier: Identifiers. (line 73) +* '(', starting a two-character identifier <1>: Escapes. (line 16) +* ')', as delimiter: Escapes. (line 67) +* ')', at end of sentence: Sentences. (line 18) +* ')', at end of sentence <1>: Using Symbols. (line 275) +* '*', as delimiter: Escapes. (line 67) +* '*', at end of sentence: Sentences. (line 18) +* '*', at end of sentence <1>: Using Symbols. (line 275) +* '+', and page motion: Expressions. (line 65) +* '+', as delimiter: Escapes. (line 67) +* '-', and page motion: Expressions. (line 65) +* '-', as delimiter: Escapes. (line 67) +* '.', as delimiter: Escapes. (line 67) +* '.h' register, difference to 'nl': Diversions. (line 88) +* '.ps' register, in comparison with '.psr': Fractional Type Sizes. + (line 45) +* '.s' register, in comparison with '.sr': Fractional Type Sizes. + (line 45) +* '.S' register, Plan 9 alias for '.tabs': Tabs and Fields. (line 125) +* '.t' register, and diversions: Diversion Traps. (line 7) +* '.tabs' register, Plan 9 alias ('.S'): Tabs and Fields. (line 125) +* '.V' register, and 'vs': Changing Type Sizes. (line 94) +* '/', as delimiter: Escapes. (line 67) +* 8-bit input: Font File Format. (line 51) +* '<', as delimiter: Escapes. (line 67) +* , as delimiter: Escapes. (line 67) +* '=', as delimiter: Escapes. (line 67) +* '>', as delimiter: Escapes. (line 67) +* '[', macro names starting with, and 'refer': Identifiers. (line 46) +* '[', starting an identifier: Identifiers. (line 75) +* '[', starting an identifier <1>: Escapes. (line 20) +* '\!', and copy-in mode: Diversions. (line 148) +* '\!', and 'output' request: Diversions. (line 179) +* '\!', and 'trnt': Character Translations. + (line 237) +* '\!', in top-level diversion: Diversions. (line 171) +* '\!', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\!', incompatibilities with AT&T 'troff' <1>: Implementation Differences. + (line 106) +* '\!', used as delimiter: Escapes. (line 52) +* '\!', used as delimiter <1>: Escapes. (line 71) +* '\$', when reading text for a macro: Copy-in Mode. (line 6) +* '\%', and translations: Character Translations. + (line 166) +* '\%', following '\X' or '\Y': Manipulating Hyphenation. + (line 98) +* '\%', in '\X': Postprocessor Access. + (line 14) +* '\%', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\%', used as delimiter: Escapes. (line 52) +* '\%', used as delimiter <1>: Escapes. (line 71) +* '\&', and glyph definitions: Using Symbols. (line 326) +* '\&', and translations: Character Translations. + (line 176) +* '\&', at end of sentence: Sentences. (line 24) +* '\&', escaping control characters: Requests. (line 47) +* '\&', in '\X': Postprocessor Access. + (line 14) +* '\&', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\&', used as delimiter: Escapes. (line 52) +* '\'', and translations: Character Translations. + (line 160) +* '\'', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\'', used as delimiter: Escapes. (line 52) +* '\'', used as delimiter <1>: Escapes. (line 71) +* '\(', and translations: Character Translations. + (line 160) +* '\)', in '\X': Postprocessor Access. + (line 14) +* '\)', used as delimiter: Escapes. (line 52) +* '\*', and warnings: Warnings. (line 54) +* '\*', incompatibilities with AT&T 'troff': Implementation Differences. + (line 13) +* '\*', when reading text for a macro: Copy-in Mode. (line 6) +* '\', disabling ('eo'): Character Translations. + (line 24) +* '\,', used as delimiter: Escapes. (line 52) +* '\-', and translations: Character Translations. + (line 160) +* '\-', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\-', used as delimiter: Escapes. (line 52) +* '\-', used as delimiter <1>: Escapes. (line 71) +* '\/', used as delimiter: Escapes. (line 52) +* '\/', used as delimiter <1>: Escapes. (line 71) +* '\0', used as delimiter: Escapes. (line 52) +* '\', in '\X': Postprocessor Access. + (line 14) +* '\', used as delimiter: Escapes. (line 52) +* '\', used as delimiter <1>: Escapes. (line 71) +* '\?', and copy-in mode: Operators in Conditionals. + (line 55) +* '\?', and copy-in mode <1>: Diversions. (line 148) +* '\?', in top-level diversion: Diversions. (line 176) +* '\?', incompatibilities with AT&T 'troff': Implementation Differences. + (line 106) +* '\?', used as delimiter: Escapes. (line 52) +* '\A', allowed delimiters: Escapes. (line 59) +* '\a', and copy-in mode: Leaders. (line 18) +* '\a', and translations: Character Translations. + (line 169) +* '\A', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\a', used as delimiter: Escapes. (line 52) +* '\B', allowed delimiters: Escapes. (line 59) +* '\b', limitations: Drawing Requests. (line 239) +* '\b', possible quote characters: Escapes. (line 37) +* '\C', allowed delimiters: Escapes. (line 59) +* '\c', and fill mode: Line Control. (line 69) +* '\c', and no-fill mode: Line Control. (line 60) +* '\C', and translations: Character Translations. + (line 160) +* '\c', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\c', used as delimiter: Escapes. (line 52) +* '\c', used as delimiter <1>: Escapes. (line 71) +* '\D'f ...'' and horizontal resolution: Drawing Requests. (line 151) +* '\D', allowed delimiters: Escapes. (line 62) +* '\d', used as delimiter: Escapes. (line 52) +* '\E', and copy-in mode: Character Translations. + (line 81) +* '\e', and glyph definitions: Using Symbols. (line 326) +* '\e', and translations: Character Translations. + (line 164) +* '\e', incompatibilities with AT&T 'troff': Implementation Differences. + (line 106) +* '\e', used as delimiter: Escapes. (line 52) +* '\E', used as delimiter: Escapes. (line 52) +* '\e', used as delimiter <1>: Escapes. (line 71) +* '\F', and changing fonts: Changing Fonts. (line 11) +* '\F', and font positions: Font Positions. (line 60) +* '\f', and font translations: Changing Fonts. (line 55) +* '\f', incompatibilities with AT&T 'troff': Implementation Differences. + (line 56) +* '\h', allowed delimiters: Escapes. (line 62) +* '\H', allowed delimiters: Escapes. (line 62) +* '\H', incompatibilities with AT&T 'troff': Implementation Differences. + (line 56) +* '\H', using '+' and '-': Expressions. (line 75) +* '\H', with fractional type sizes: Fractional Type Sizes. + (line 6) +* '\l', allowed delimiters: Escapes. (line 62) +* '\L', allowed delimiters: Escapes. (line 62) +* '\l', and glyph definitions: Using Symbols. (line 326) +* '\L', and glyph definitions: Using Symbols. (line 326) +* '\N', allowed delimiters: Escapes. (line 62) +* '\N', and translations: Character Translations. + (line 160) +* '\n', and warnings: Warnings. (line 61) +* '\n', incompatibilities with AT&T 'troff': Implementation Differences. + (line 13) +* '\n', when reading text for a macro: Copy-in Mode. (line 6) +* '\o', possible quote characters: Escapes. (line 37) +* '\p', used as delimiter: Escapes. (line 52) +* '\p', used as delimiter <1>: Escapes. (line 71) +* '\R', after '\c': Line Control. (line 52) +* '\R', allowed delimiters: Escapes. (line 62) +* '\R', and warnings: Warnings. (line 61) +* '\R', difference to 'nr': Auto-increment. (line 11) +* '\r', used as delimiter: Escapes. (line 52) +* '\R', using '+' and '-': Expressions. (line 75) +* \, when reading text for a macro: Copy-in Mode. (line 6) +* '\s', allowed delimiters: Escapes. (line 62) +* '\S', allowed delimiters: Escapes. (line 62) +* '\s', incompatibilities with AT&T 'troff': Implementation Differences. + (line 56) +* '\S', incompatibilities with AT&T 'troff': Implementation Differences. + (line 56) +* '\s', using '+' and '-': Expressions. (line 75) +* '\s', with fractional type sizes: Fractional Type Sizes. + (line 6) +* '\', difference to '\~': Request and Macro Arguments. + (line 20) +* '\', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\', used as delimiter: Escapes. (line 52) +* '\t', and copy-in mode: Tabs and Fields. (line 10) +* '\t', and translations: Character Translations. + (line 169) +* '\t', and warnings: Warnings. (line 69) +* '\t', used as delimiter: Escapes. (line 52) +* '\u', used as delimiter: Escapes. (line 52) +* '\v', allowed delimiters: Escapes. (line 62) +* '\V', and copy-in mode: I/O. (line 249) +* '\v', internal representation: Gtroff Internals. (line 54) +* '\w', allowed delimiters: Escapes. (line 59) +* '\x', allowed delimiters: Escapes. (line 62) +* '\X', and special characters: Postprocessor Access. + (line 22) +* '\X', followed by '\%': Manipulating Hyphenation. + (line 98) +* '\X', possible quote characters: Escapes. (line 37) +* '\Y', followed by '\%': Manipulating Hyphenation. + (line 98) +* '\Z', allowed delimiters: Escapes. (line 59) +* '\[', and translations: Character Translations. + (line 160) +* '\\', when reading text for a macro: Copy-in Mode. (line 6) +* '\^', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\^', used as delimiter: Escapes. (line 52) +* '\_', and translations: Character Translations. + (line 160) +* '\_', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\_', used as delimiter: Escapes. (line 52) +* '\_', used as delimiter <1>: Escapes. (line 71) +* '\`', and translations: Character Translations. + (line 160) +* '\`', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\`', used as delimiter: Escapes. (line 52) +* '\`', used as delimiter <1>: Escapes. (line 71) +* '\{', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\{', used as delimiter: Escapes. (line 52) +* '\{', used as delimiter <1>: Escapes. (line 71) +* '\|', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\|', used as delimiter: Escapes. (line 52) +* '\}', and warnings: Warnings. (line 73) +* '\}', incompatibilities with AT&T 'troff': Implementation Differences. + (line 69) +* '\}', used as delimiter: Escapes. (line 52) +* '\}', used as delimiter <1>: Escapes. (line 71) +* '\~', and translations: Character Translations. + (line 166) +* '\~', difference to '\': Request and Macro Arguments. + (line 20) +* '\~', used as delimiter: Escapes. (line 52) +* ']', as part of an identifier: Identifiers. (line 41) +* ']', at end of sentence: Sentences. (line 18) +* ']', at end of sentence <1>: Using Symbols. (line 275) +* ']', ending an identifier: Identifiers. (line 75) +* ']', ending an identifier <1>: Escapes. (line 20) +* ']', macro names starting with, and 'refer': Identifiers. (line 46) +* '|', and page motion: Expressions. (line 70) +* aborting ('ab'): Debugging. (line 40) +* absolute position operator ('|'): Expressions. (line 70) +* accent marks ['ms']: ms Strings and Special Characters. + (line 6) +* access of postprocessor: Postprocessor Access. + (line 6) +* accessing unnamed glyphs with '\N': Font File Format. (line 51) +* activating kerning ('kern'): Ligatures and Kerning. + (line 42) +* activating ligatures ('lg'): Ligatures and Kerning. + (line 24) +* activating track kerning ('tkf'): Ligatures and Kerning. + (line 60) +* 'ad' request, and hyphenation margin: Manipulating Hyphenation. + (line 211) +* 'ad' request, and hyphenation space: Manipulating Hyphenation. + (line 227) +* adjusting: Filling and Adjusting. + (line 6) +* adjusting and filling, manipulating: Manipulating Filling and Adjusting. + (line 6) +* adjustment mode register ('.j'): Manipulating Filling and Adjusting. + (line 114) +* adobe glyph list (AGL): Using Symbols. (line 88) +* AGL (adobe glyph list): Using Symbols. (line 88) +* alias, diversion, creating ('als'): Strings. (line 229) +* alias, diversion, removing ('rm'): Strings. (line 263) +* alias, macro, creating ('als'): Strings. (line 229) +* alias, macro, removing ('rm'): Strings. (line 263) +* alias, number register, creating ('aln'): Setting Registers. + (line 112) +* alias, string, creating ('als'): Strings. (line 229) +* alias, string, removing ('rm'): Strings. (line 263) +* 'als' request, and '\$0': Parameters. (line 71) +* 'am', 'am1', 'ami' requests, and warnings: Warnings. (line 54) +* annotations: Footnotes and Annotations. + (line 6) +* appending to a diversion ('da'): Diversions. (line 22) +* appending to a file ('opena'): I/O. (line 200) +* appending to a macro ('am'): Writing Macros. (line 116) +* appending to a string ('as'): Strings. (line 176) +* arc, drawing ('\D'a ...''): Drawing Requests. (line 128) +* argument delimiting characters: Escapes. (line 29) +* arguments to macros, and tabs: Request and Macro Arguments. + (line 6) +* arguments to requests and macros: Request and Macro Arguments. + (line 6) +* arguments, and compatibility mode: Gtroff Internals. (line 91) +* arguments, macro ('\$'): Parameters. (line 21) +* arguments, of strings: Strings. (line 19) +* arithmetic operators: Expressions. (line 8) +* artificial fonts: Artificial Fonts. (line 6) +* 'as', 'as1' requests, and comments: Comments. (line 16) +* 'as', 'as1' requests, and warnings: Warnings. (line 54) +* ASCII approximation output register ('.A'): Groff Options. (line 51) +* ASCII approximation output register ('.A') <1>: Built-in Registers. + (line 106) +* ASCII, output encoding: Groff Options. (line 250) +* 'asciify' request, and 'writem': I/O. (line 222) +* assigning formats ('af'): Assigning Formats. (line 6) +* assignments, indirect: Interpolating Registers. + (line 11) +* assignments, nested: Interpolating Registers. + (line 11) +* AT&T 'troff', 'ms' macro package differences: Differences from AT&T ms. + (line 6) +* auto-increment: Auto-increment. (line 6) +* auto-increment, and 'ig' request: Comments. (line 85) +* available glyphs, list ('groff_char(7)' man page): Using Symbols. + (line 76) +* background color name register ('.M'): Colors. (line 94) +* backslash, printing ('\\', '\e', '\E', '\[rs]'): Escapes. (line 74) +* backslash, printing ('\\', '\e', '\E', '\[rs]') <1>: Implementation Differences. + (line 106) +* backspace character: Identifiers. (line 12) +* backspace character, and translations: Character Translations. + (line 169) +* backtrace of input stack ('backtrace'): Debugging. (line 96) +* baseline: Sizes. (line 6) +* basic unit ('u'): Measurements. (line 6) +* basics of macros: Basics. (line 6) +* 'bd' request, and font styles: Font Families. (line 59) +* 'bd' request, and font translations: Changing Fonts. (line 55) +* 'bd' request, incompatibilities with AT&T 'troff': Implementation Differences. + (line 86) +* begin of conditional block ('\{'): if-else. (line 35) +* beginning diversion ('di'): Diversions. (line 22) +* blank line: Implicit Line Breaks. + (line 10) +* blank line <1>: Requests. (line 27) +* blank line ('sp'): Basics. (line 93) +* blank line macro ('blm'): Implicit Line Breaks. + (line 10) +* blank line macro ('blm') <1>: Requests. (line 27) +* blank line macro ('blm') <2>: Blank Line Traps. (line 7) +* blank line traps: Blank Line Traps. (line 6) +* blank lines, disabling: Manipulating Spacing. + (line 123) +* block, conditional, begin ('\{'): if-else. (line 35) +* block, condititional, end ('\}'): if-else. (line 35) +* bold face ['man']: Man font macros. (line 14) +* bold face, imitating ('bd'): Artificial Fonts. (line 98) +* bottom margin: Page Layout. (line 20) +* bounding box: Miscellaneous. (line 139) +* box rule glyph ('\[br]'): Drawing Requests. (line 50) +* 'box', 'boxa' requests, and warnings: Warnings. (line 54) +* 'boxa' request, and 'dn' ('dl'): Diversions. (line 93) +* 'bp' request, and top-level diversion: Page Control. (line 24) +* 'bp' request, and traps ('.pe'): Page Location Traps. (line 143) +* 'bp' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'bp' request, using '+' and '-': Expressions. (line 75) +* 'br' glyph, and 'cflags': Using Symbols. (line 271) +* break: Basics. (line 48) +* break <1>: Manipulating Filling and Adjusting. + (line 6) +* break ('br'): Basics. (line 118) +* 'break' request, in a 'while' loop: while. (line 68) +* break, implicit: Implicit Line Breaks. + (line 6) +* built-in registers: Built-in Registers. (line 6) +* bulleted list, example markup ['ms']: Lists in ms. (line 21) +* 'c' unit: Measurements. (line 27) +* calling convention of preprocessors: Preprocessors in man pages. + (line 6) +* capabilities of 'groff': groff Capabilities. (line 6) +* 'ce' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'ce' request, difference to '.ad c': Manipulating Filling and Adjusting. + (line 66) +* centered text: Manipulating Filling and Adjusting. + (line 66) +* centering lines ('ce'): Basics. (line 105) +* centering lines ('ce') <1>: Manipulating Filling and Adjusting. + (line 204) +* centimeter unit ('c'): Measurements. (line 27) +* 'cf' request, and copy-in mode: I/O. (line 50) +* 'cf' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* changing font family ('fam', '\F'): Font Families. (line 25) +* changing font position ('\f'): Font Positions. (line 60) +* changing font style ('sty'): Font Families. (line 59) +* changing fonts ('ft', '\f'): Changing Fonts. (line 11) +* changing format, and read-only registers: Assigning Formats. + (line 68) +* changing the font height ('\H'): Artificial Fonts. (line 16) +* changing the font slant ('\S'): Artificial Fonts. (line 45) +* changing the page number character ('pc'): Page Layout. (line 94) +* changing trap location ('ch'): Page Location Traps. (line 111) +* changing type sizes ('ps', '\s'): Changing Type Sizes. (line 11) +* changing vertical line spacing ('vs'): Changing Type Sizes. (line 88) +* 'char' request, and soft hyphen character: Manipulating Hyphenation. + (line 243) +* 'char' request, and translations: Character Translations. + (line 160) +* 'char' request, used with '\N': Using Symbols. (line 201) +* character: Using Symbols. (line 6) +* character class ('class'): Character Classes. (line 12) +* character classes: Character Classes. (line 6) +* character properties ('cflags'): Using Symbols. (line 237) +* character translations: Character Translations. + (line 6) +* character, backspace: Identifiers. (line 12) +* character, backspace, and translations: Character Translations. + (line 169) +* character, control ('.'): Requests. (line 6) +* character, control, changing ('cc'): Character Translations. + (line 6) +* character, defining ('char'): Using Symbols. (line 326) +* character, defining fallback ('fchar', 'fschar', 'schar'): Using Symbols. + (line 326) +* character, escape, changing ('ec'): Character Translations. + (line 47) +* character, escape, while defining glyph: Using Symbols. (line 326) +* character, field delimiting ('fc'): Fields. (line 6) +* character, field padding ('fc'): Fields. (line 6) +* character, hyphenation ('\%'): Manipulating Hyphenation. + (line 85) +* character, leader repetition ('lc'): Leaders. (line 23) +* character, leader, and translations: Character Translations. + (line 169) +* character, leader, non-interpreted ('\a'): Leaders. (line 18) +* character, named ('\C'): Using Symbols. (line 185) +* character, newline: Escapes. (line 69) +* character, newline, and translations: Character Translations. + (line 169) +* character, no-break control ('''): Requests. (line 6) +* character, no-break control, changing ('c2'): Character Translations. + (line 6) +* character, soft hyphen, setting ('shc'): Manipulating Hyphenation. + (line 243) +* character, space: Escapes. (line 69) +* character, special: Character Translations. + (line 160) +* character, tab: Escapes. (line 69) +* character, tab repetition ('tc'): Tabs and Fields. (line 129) +* character, tab, and translations: Character Translations. + (line 169) +* character, tab, non-interpreted ('\t'): Tabs and Fields. (line 10) +* character, tabulator: Tab Stops. (line 6) +* character, transparent: Sentences. (line 18) +* character, transparent <1>: Using Symbols. (line 275) +* character, whitespace: Identifiers. (line 10) +* character, zero width space ('\&'): Requests. (line 47) +* character, zero width space ('\&') <1>: Ligatures and Kerning. + (line 47) +* character, zero width space ('\&') <2>: Drawing Requests. (line 32) +* characters, argument delimiting: Escapes. (line 29) +* characters, end-of-sentence: Using Symbols. (line 247) +* characters, hyphenation: Using Symbols. (line 251) +* characters, input, and output glyphs, compatibility with AT&T 'troff': Implementation Differences. + (line 86) +* characters, invalid for 'trf' request: I/O. (line 73) +* characters, invalid input: Identifiers. (line 15) +* characters, overlapping: Using Symbols. (line 265) +* characters, special: Special Characters. (line 6) +* characters, unnamed, accessing with '\N': Font File Format. (line 51) +* 'chem', the program: gchem. (line 6) +* circle, drawing ('\D'c ...''): Drawing Requests. (line 109) +* circle, solid, drawing ('\D'C ...''): Drawing Requests. (line 114) +* class of characters ('class'): Character Classes. (line 12) +* classes, character: Character Classes. (line 6) +* closing file ('close'): I/O. (line 231) +* code, hyphenation ('hcode'): Manipulating Hyphenation. + (line 175) +* color name, background, register ('.M'): Colors. (line 94) +* color name, drawing, register ('.m'): Colors. (line 67) +* color name, fill, register ('.M'): Colors. (line 94) +* color, default: Colors. (line 26) +* colors: Colors. (line 6) +* colors, fill, unnamed ('\D'F...''): Drawing Requests. (line 216) +* command prefix: Environment. (line 14) +* command-line options: Groff Options. (line 50) +* commands, embedded: Embedded Commands. (line 6) +* comments: Comments. (line 6) +* comments in font files: Font File Format. (line 36) +* comments, lining up with tabs: Comments. (line 21) +* comments, with 'ds': Strings. (line 45) +* common features: Common Features. (line 6) +* common name space of macros, diversions, and strings: Strings. + (line 92) +* comparison of strings: Operators in Conditionals. + (line 47) +* comparison operators: Expressions. (line 15) +* compatibility mode: Warnings. (line 91) +* compatibility mode <1>: Implementation Differences. + (line 6) +* compatibility mode, and parameters: Gtroff Internals. (line 91) +* composite glyph names: Using Symbols. (line 88) +* conditional block, begin ('\{'): if-else. (line 35) +* conditional block, end ('\}'): if-else. (line 35) +* conditional output for terminal (TTY): Operators in Conditionals. + (line 14) +* conditional page break ('ne'): Page Control. (line 33) +* conditionals and loops: Conditionals and Loops. + (line 6) +* consecutive hyphenated lines ('hlm'): Manipulating Hyphenation. + (line 47) +* constant glyph space mode ('cs'): Artificial Fonts. (line 126) +* contents, table of: Table of Contents. (line 6) +* contents, table of <1>: Leaders. (line 29) +* continuation, input line ('\'): Line Control. (line 36) +* continuation, output line ('\c'): Line Control. (line 36) +* 'continue' request, in a 'while' loop: while. (line 68) +* continuous underlining ('cu'): Artificial Fonts. (line 86) +* control character ('.'): Requests. (line 6) +* control character, changing ('cc'): Character Translations. + (line 6) +* control character, no-break ('''): Requests. (line 6) +* control character, no-break, changing ('c2'): Character Translations. + (line 6) +* control sequences, for terminals: Invoking grotty. (line 50) +* control, line: Line Control. (line 6) +* control, page: Page Control. (line 6) +* conventions for input: Input Conventions. (line 6) +* copy mode: Copy-in Mode. (line 6) +* copy-in mode: Copy-in Mode. (line 6) +* copy-in mode, and 'cf' request: I/O. (line 50) +* copy-in mode, and 'device' request: Postprocessor Access. + (line 19) +* copy-in mode, and 'ig' request: Comments. (line 85) +* copy-in mode, and 'length' request: Strings. (line 211) +* copy-in mode, and macro arguments: Parameters. (line 21) +* copy-in mode, and 'output' request: Diversions. (line 179) +* copy-in mode, and 'tm' request: Debugging. (line 30) +* copy-in mode, and 'tm1' request: Debugging. (line 30) +* copy-in mode, and 'tmc' request: Debugging. (line 30) +* copy-in mode, and 'trf' request: I/O. (line 50) +* copy-in mode, and 'write' request: I/O. (line 212) +* copy-in mode, and 'writec' request: I/O. (line 212) +* copy-in mode, and 'writem' request: I/O. (line 225) +* copy-in mode, and '\!': Diversions. (line 148) +* copy-in mode, and '\?': Operators in Conditionals. + (line 55) +* copy-in mode, and '\?' <1>: Diversions. (line 148) +* copy-in mode, and '\a': Leaders. (line 18) +* copy-in mode, and '\E': Character Translations. + (line 81) +* copy-in mode, and '\t': Tabs and Fields. (line 10) +* copy-in mode, and '\V': I/O. (line 249) +* copying environment ('evc'): Environments. (line 70) +* correction between italic and roman glyph ('\/', '\,'): Ligatures and Kerning. + (line 80) +* correction, italic ('\/'): Ligatures and Kerning. + (line 80) +* correction, left italic ('\,'): Ligatures and Kerning. + (line 91) +* cover page macros, ['ms']: ms Cover Page Macros. + (line 6) +* 'cp' request, and glyph definitions: Using Symbols. (line 326) +* cp1047, input encoding: Input Encodings. (line 9) +* cp1047, output encoding: Groff Options. (line 264) +* 'cq' glyph, at end of sentence: Sentences. (line 18) +* 'cq' glyph, at end of sentence <1>: Using Symbols. (line 275) +* creating alias, for diversion ('als'): Strings. (line 229) +* creating alias, for macro ('als'): Strings. (line 229) +* creating alias, for number register ('aln'): Setting Registers. + (line 112) +* creating alias, for string ('als'): Strings. (line 229) +* creating new characters ('char'): Using Symbols. (line 326) +* credits: Credits. (line 6) +* 'cs' request, and font styles: Font Families. (line 59) +* 'cs' request, and font translations: Changing Fonts. (line 55) +* 'cs' request, incompatibilities with AT&T 'troff': Implementation Differences. + (line 86) +* 'cs' request, with fractional type sizes: Fractional Type Sizes. + (line 6) +* current directory: Macro Directories. (line 21) +* current input file name register ('.F'): Built-in Registers. + (line 12) +* current page number ('%'): Page Control. (line 27) +* current time: I/O. (line 175) +* current time, hours ('hours'): Built-in Registers. (line 41) +* current time, minutes ('minutes'): Built-in Registers. (line 37) +* current time, seconds ('seconds'): Built-in Registers. (line 31) +* current vertical position ('nl'): Page Control. (line 67) +* 'da' request, and 'dn' ('dl'): Diversions. (line 93) +* 'da' request, and warnings: Warnings. (line 49) +* 'da' request, and warnings <1>: Warnings. (line 54) +* date, day of the month register ('dy'): Built-in Registers. (line 48) +* date, day of the week register ('dw'): Built-in Registers. (line 45) +* date, month of the year register ('mo'): Built-in Registers. + (line 51) +* date, year register ('year', 'yr'): Built-in Registers. (line 54) +* day of the month register ('dy'): Built-in Registers. (line 48) +* day of the week register ('dw'): Built-in Registers. (line 45) +* 'de' request, and 'while': while. (line 22) +* 'de', 'de1', 'dei' requests, and warnings: Warnings. (line 54) +* debugging: Debugging. (line 6) +* default color: Colors. (line 26) +* default indentation ['man']: Miscellaneous man macros. + (line 6) +* default indentation, resetting ['man']: Man usage. (line 127) +* default units: Default Units. (line 6) +* defining character ('char'): Using Symbols. (line 326) +* defining character class ('class'): Character Classes. (line 12) +* defining fallback character ('fchar', 'fschar', 'schar'): Using Symbols. + (line 326) +* defining glyph ('char'): Using Symbols. (line 326) +* defining symbol ('char'): Using Symbols. (line 326) +* delayed text: Footnotes and Annotations. + (line 10) +* delimited arguments, incompatibilities with AT&T 'troff': Implementation Differences. + (line 47) +* delimiting character, for fields ('fc'): Fields. (line 6) +* delimiting characters for arguments: Escapes. (line 29) +* depth, of last glyph ('.cdp'): Environments. (line 95) +* 'DESC' file, format: DESC File Format. (line 6) +* 'device' request, and copy-in mode: Postprocessor Access. + (line 19) +* device resolution: DESC File Format. (line 85) +* devices for output: Output device intro. (line 6) +* devices for output <1>: Output Devices. (line 6) +* 'dg' glyph, at end of sentence: Sentences. (line 18) +* 'dg' glyph, at end of sentence <1>: Using Symbols. (line 275) +* 'di' request, and warnings: Warnings. (line 49) +* 'di' request, and warnings <1>: Warnings. (line 54) +* differences in implementation: Implementation Differences. + (line 6) +* digit width space ('\0'): Page Motions. (line 138) +* digits, and delimiters: Escapes. (line 65) +* dimensions, line: Line Layout. (line 6) +* directories for fonts: Font Directories. (line 6) +* directories for macros: Macro Directories. (line 6) +* directory, current: Macro Directories. (line 21) +* directory, for tmac files: Macro Directories. (line 11) +* directory, home: Macro Directories. (line 24) +* directory, platform-specific: Macro Directories. (line 26) +* directory, site-specific: Macro Directories. (line 26) +* directory, site-specific <1>: Font Directories. (line 29) +* disabling hyphenation ('\%'): Manipulating Hyphenation. + (line 85) +* disabling '\' ('eo'): Character Translations. + (line 24) +* discardable horizontal space: Manipulating Filling and Adjusting. + (line 183) +* discarded space in traps: Manipulating Spacing. + (line 53) +* displays: Displays. (line 6) +* displays ['ms']: ms Displays and Keeps. + (line 6) +* displays, and footnotes ['ms']: ms Footnotes. (line 24) +* distance to next trap register ('.t'): Page Location Traps. (line 102) +* 'ditroff', the program: History. (line 59) +* diversion name register ('.z'): Diversions. (line 69) +* diversion trap, setting ('dt'): Diversion Traps. (line 7) +* diversion traps: Diversion Traps. (line 6) +* diversion, appending ('da'): Diversions. (line 22) +* diversion, beginning ('di'): Diversions. (line 22) +* diversion, creating alias ('als'): Strings. (line 229) +* diversion, ending ('di'): Diversions. (line 22) +* diversion, nested: Diversions. (line 69) +* diversion, removing ('rm'): Strings. (line 224) +* diversion, removing alias ('rm'): Strings. (line 263) +* diversion, renaming ('rn'): Strings. (line 221) +* diversion, stripping final newline: Strings. (line 157) +* diversion, top-level: Diversions. (line 12) +* diversion, top-level, and 'bp': Page Control. (line 24) +* diversion, top-level, and '\!': Diversions. (line 171) +* diversion, top-level, and '\?': Diversions. (line 176) +* diversion, unformatting ('asciify'): Diversions. (line 195) +* diversion, vertical position in, register ('.d'): Diversions. + (line 69) +* diversions: Diversions. (line 6) +* diversions, and traps: Page Location Traps. (line 166) +* diversions, shared name space with macros and strings: Strings. + (line 92) +* 'dl' register, and 'da' ('boxa'): Diversions. (line 93) +* 'dn' register, and 'da' ('boxa'): Diversions. (line 93) +* documents, multi-file: Debugging. (line 10) +* documents, structuring the source code: Requests. (line 14) +* double quote, in a macro argument: Request and Macro Arguments. + (line 25) +* double-spacing ('ls'): Basics. (line 82) +* double-spacing ('ls') <1>: Manipulating Spacing. + (line 64) +* double-spacing ('vs', 'pvs'): Changing Type Sizes. (line 125) +* drawing a circle ('\D'c ...''): Drawing Requests. (line 109) +* drawing a line ('\D'l ...''): Drawing Requests. (line 80) +* drawing a polygon ('\D'p ...''): Drawing Requests. (line 158) +* drawing a solid circle ('\D'C ...''): Drawing Requests. (line 114) +* drawing a solid ellipse ('\D'E ...''): Drawing Requests. (line 124) +* drawing a solid polygon ('\D'P ...''): Drawing Requests. (line 167) +* drawing a spline ('\D'~ ...''): Drawing Requests. (line 136) +* drawing an arc ('\D'a ...''): Drawing Requests. (line 128) +* drawing an ellipse ('\D'e ...''): Drawing Requests. (line 118) +* drawing color name register ('.m'): Colors. (line 67) +* drawing horizontal lines ('\l'): Drawing Requests. (line 17) +* drawing requests: Drawing Requests. (line 6) +* drawing vertical lines ('\L'): Drawing Requests. (line 50) +* 'ds' request, and comments: Strings. (line 45) +* 'ds' request, and double quotes: Request and Macro Arguments. + (line 69) +* 'ds' request, and leading spaces: Strings. (line 57) +* 'ds', 'ds1' requests, and comments: Comments. (line 16) +* 'ds', 'ds1' requests, and warnings: Warnings. (line 54) +* dumping environments ('pev'): Debugging. (line 62) +* dumping number registers ('pnr'): Debugging. (line 77) +* dumping symbol table ('pm'): Debugging. (line 66) +* dumping traps ('ptr'): Debugging. (line 81) +* EBCDIC encoding: Tab Stops. (line 6) +* EBCDIC encoding of a tab: Tabs and Fields. (line 6) +* EBCDIC encoding of backspace: Identifiers. (line 12) +* EBCDIC, input encoding: Input Encodings. (line 9) +* EBCDIC, output encoding: Groff Options. (line 264) +* 'el' request, and warnings: Warnings. (line 32) +* ellipse, drawing ('\D'e ...''): Drawing Requests. (line 118) +* ellipse, solid, drawing ('\D'E ...''): Drawing Requests. (line 124) +* 'em' glyph, and 'cflags': Using Symbols. (line 258) +* em unit ('m'): Measurements. (line 50) +* embedded commands: Embedded Commands. (line 6) +* embedding PDF: Embedding PDF. (line 6) +* embedding PostScript: Embedding PostScript. + (line 6) +* embolding of special fonts: Artificial Fonts. (line 115) +* empty line: Implicit Line Breaks. + (line 10) +* empty line ('sp'): Basics. (line 93) +* empty space before a paragraph ['man']: Miscellaneous man macros. + (line 15) +* en unit ('n'): Measurements. (line 55) +* enabling vertical position traps ('vpt'): Page Location Traps. + (line 18) +* encoding, EBCDIC: Tab Stops. (line 6) +* encoding, input, cp1047: Input Encodings. (line 9) +* encoding, input, EBCDIC: Input Encodings. (line 9) +* encoding, input, latin-1 (ISO 8859-1): Input Encodings. (line 14) +* encoding, input, latin-2 (ISO 8859-2): Input Encodings. (line 18) +* encoding, input, latin-5 (ISO 8859-9): Input Encodings. (line 23) +* encoding, input, latin-9 (latin-0, ISO 8859-15): Input Encodings. + (line 28) +* encoding, output, ASCII: Groff Options. (line 250) +* encoding, output, cp1047: Groff Options. (line 264) +* encoding, output, EBCDIC: Groff Options. (line 264) +* encoding, output, latin-1 (ISO 8859-1): Groff Options. (line 254) +* encoding, output, utf-8: Groff Options. (line 259) +* end of conditional block ('\}'): if-else. (line 35) +* end-of-input macro ('em'): End-of-input Traps. (line 7) +* end-of-input trap, setting ('em'): End-of-input Traps. (line 7) +* end-of-input traps: End-of-input Traps. (line 6) +* end-of-sentence characters: Using Symbols. (line 247) +* ending diversion ('di'): Diversions. (line 22) +* environment number/name register ('.ev'): Environments. (line 39) +* environment variables: Environment. (line 6) +* environment, copying ('evc'): Environments. (line 70) +* environment, dimensions of last glyph ('.w', '.cht', '.cdp', '.csk'): Environments. + (line 95) +* environment, previous line length ('.n'): Environments. (line 110) +* environment, switching ('ev'): Environments. (line 39) +* environments: Environments. (line 6) +* environments, dumping ('pev'): Debugging. (line 62) +* 'eqn', the program: geqn. (line 6) +* equations ['ms']: ms Insertions. (line 6) +* escape character, changing ('ec'): Character Translations. + (line 47) +* escape character, while defining glyph: Using Symbols. (line 326) +* escapes: Escapes. (line 6) +* escaping newline characters, in strings: Strings. (line 63) +* 'ex' request, use in debugging: Debugging. (line 45) +* 'ex' request, used with 'nx' and 'rd': I/O. (line 122) +* example markup, bulleted list ['ms']: Lists in ms. (line 21) +* example markup, glossary-style list ['ms']: Lists in ms. (line 65) +* example markup, multi-page table ['ms']: Example multi-page table. + (line 6) +* example markup, numbered list ['ms']: Lists in ms. (line 41) +* example markup, title page: ms Cover Page Macros. + (line 66) +* examples of invocation: Invocation Examples. (line 6) +* exiting ('ex'): Debugging. (line 45) +* expansion of strings ('\*'): Strings. (line 19) +* explicit hyphen ('\%'): Manipulating Hyphenation. + (line 47) +* expression, limitation of logical not in: Expressions. (line 27) +* expression, order of evaluation: Expressions. (line 59) +* expressions: Expressions. (line 6) +* expressions, and space characters: Expressions. (line 86) +* extra post-vertical line space ('\x'): Changing Type Sizes. (line 118) +* extra post-vertical line space register ('.a'): Manipulating Spacing. + (line 94) +* extra pre-vertical line space ('\x'): Changing Type Sizes. (line 109) +* extra spaces: Filling and Adjusting. + (line 10) +* extremum operators ('>?', ': Manipulating Filling and Adjusting. + (line 156) +* fill mode <2>: Warnings. (line 23) +* fill mode ('fi'): Manipulating Filling and Adjusting. + (line 29) +* fill mode, and '\c': Line Control. (line 69) +* filling: Filling and Adjusting. + (line 6) +* filling and adjusting, manipulating: Manipulating Filling and Adjusting. + (line 6) +* final newline, stripping in diversions: Strings. (line 157) +* 'fl' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* floating keep: Displays. (line 23) +* flush output ('fl'): Debugging. (line 87) +* font description file, format: DESC File Format. (line 6) +* font description file, format <1>: Font File Format. (line 6) +* font directories: Font Directories. (line 6) +* font families: Font Families. (line 6) +* font family, changing ('fam', '\F'): Font Families. (line 25) +* font file, format: Font File Format. (line 6) +* font files: Font Files. (line 6) +* font files, comments: Font File Format. (line 36) +* font for underlining ('uf'): Artificial Fonts. (line 90) +* font height, changing ('\H'): Artificial Fonts. (line 16) +* font path: Font Directories. (line 14) +* font position register ('.f'): Font Positions. (line 20) +* font position, changing ('\f'): Font Positions. (line 60) +* font positions: Font Positions. (line 6) +* font selection ['man']: Man font macros. (line 6) +* font slant, changing ('\S'): Artificial Fonts. (line 45) +* font style, changing ('sty'): Font Families. (line 59) +* font styles: Font Families. (line 6) +* font translation ('ftr'): Changing Fonts. (line 55) +* font, magnification ('fzoom'): Changing Fonts. (line 71) +* font, mounting ('fp'): Font Positions. (line 13) +* font, optical size: Changing Fonts. (line 71) +* font, previous ('ft', '\f[]', '\fP'): Changing Fonts. (line 23) +* font, zoom factor ('fzoom'): Changing Fonts. (line 71) +* fonts: Fonts and Symbols. (line 6) +* fonts <1>: Changing Fonts. (line 6) +* fonts, artificial: Artificial Fonts. (line 6) +* fonts, changing ('ft', '\f'): Changing Fonts. (line 11) +* fonts, PostScript: Font Families. (line 11) +* fonts, searching: Font Directories. (line 6) +* fonts, special: Special Fonts. (line 6) +* footers: Page Layout. (line 31) +* footers <1>: Page Location Traps. (line 38) +* footers ['ms']: ms Headers and Footers. + (line 6) +* footnotes: Footnotes and Annotations. + (line 6) +* footnotes ['ms']: ms Footnotes. (line 6) +* footnotes, and displays ['ms']: ms Footnotes. (line 24) +* footnotes, and keeps ['ms']: ms Footnotes. (line 24) +* form letters: I/O. (line 106) +* format of font description file: DESC File Format. (line 6) +* format of font description files: Font File Format. (line 6) +* format of font files: Font File Format. (line 6) +* format of register ('\g'): Assigning Formats. (line 75) +* formats, assigning ('af'): Assigning Formats. (line 6) +* formats, file: File formats. (line 6) +* 'fp' request, and font translations: Changing Fonts. (line 55) +* 'fp' request, incompatibilities with AT&T 'troff': Implementation Differences. + (line 86) +* fractional point sizes: Fractional Type Sizes. + (line 6) +* fractional point sizes <1>: Implementation Differences. + (line 76) +* fractional type sizes: Fractional Type Sizes. + (line 6) +* fractional type sizes <1>: Implementation Differences. + (line 76) +* french-spacing: Sentences. (line 12) +* 'fspecial' request, and font styles: Font Families. (line 59) +* 'fspecial' request, and font translations: Changing Fonts. (line 55) +* 'fspecial' request, and glyph search order: Using Symbols. (line 14) +* 'fspecial' request, and imitating bold: Artificial Fonts. (line 115) +* 'ft' request, and font translations: Changing Fonts. (line 55) +* 'gchem', invoking: Invoking gchem. (line 5) +* 'gchem', the program: gchem. (line 6) +* 'geqn', invoking: Invoking geqn. (line 5) +* 'geqn', the program: geqn. (line 6) +* GGL (groff glyph list): Using Symbols. (line 88) +* GGL (groff glyph list) <1>: Character Classes. (line 32) +* 'ggrn', invoking: Invoking ggrn. (line 5) +* 'ggrn', the program: ggrn. (line 6) +* glossary-style list, example markup ['ms']: Lists in ms. (line 65) +* glyph: Using Symbols. (line 6) +* glyph for line drawing: Drawing Requests. (line 50) +* glyph names, composite: Using Symbols. (line 88) +* glyph pile ('\b'): Drawing Requests. (line 232) +* glyph properties ('cflags'): Using Symbols. (line 237) +* glyph, box rule ('\[br]'): Drawing Requests. (line 50) +* glyph, constant space: Artificial Fonts. (line 126) +* glyph, defining ('char'): Using Symbols. (line 326) +* glyph, for line drawing: Drawing Requests. (line 28) +* glyph, for margins ('mc'): Miscellaneous. (line 75) +* glyph, italic correction ('\/'): Ligatures and Kerning. + (line 80) +* glyph, last, dimensions ('.w', '.cht', '.cdp', '.csk'): Environments. + (line 95) +* glyph, leader repetition ('lc'): Leaders. (line 23) +* glyph, left italic correction ('\,'): Ligatures and Kerning. + (line 91) +* glyph, numbered ('\N'): Character Translations. + (line 160) +* glyph, numbered ('\N') <1>: Using Symbols. (line 201) +* glyph, removing definition ('rchar', 'rfschar'): Using Symbols. + (line 382) +* glyph, soft hyphen ('hy'): Manipulating Hyphenation. + (line 243) +* glyph, tab repetition ('tc'): Tabs and Fields. (line 129) +* glyph, underscore ('\[ru]'): Drawing Requests. (line 28) +* glyphs, available, list ('groff_char(7)' man page): Using Symbols. + (line 76) +* glyphs, output, and input characters, compatibility with AT&T 'troff': Implementation Differences. + (line 86) +* glyphs, overstriking ('\o'): Page Motions. (line 216) +* glyphs, unnamed: Using Symbols. (line 212) +* glyphs, unnamed, accessing with '\N': Font File Format. (line 51) +* GNU-specific register ('.g'): Built-in Registers. (line 102) +* 'gpic', invoking: Invoking gpic. (line 5) +* 'gpic', the program: gpic. (line 6) +* 'grap', the program: grap. (line 6) +* gray shading ('\D'f ...''): Drawing Requests. (line 141) +* 'grefer', invoking: Invoking grefer. (line 5) +* 'grefer', the program: grefer. (line 6) +* 'grn', the program: ggrn. (line 6) +* 'grodvi', invoking: Invoking grodvi. (line 6) +* 'grodvi', the program: grodvi. (line 6) +* 'groff' - what is it?: What Is groff?. (line 6) +* 'groff' capabilities: groff Capabilities. (line 6) +* groff glyph list (GGL): Using Symbols. (line 88) +* groff glyph list (GGL) <1>: Character Classes. (line 32) +* 'groff' invocation: Invoking groff. (line 6) +* 'groff', and 'pi' request: I/O. (line 159) +* GROFF_BIN_PATH, environment variable: Environment. (line 10) +* GROFF_COMMAND_PREFIX, environment variable: Environment. (line 14) +* GROFF_ENCODING, environment variable: Environment. (line 25) +* GROFF_FONT_PATH, environment variable: Environment. (line 34) +* GROFF_FONT_PATH, environment variable <1>: Font Directories. + (line 26) +* GROFF_TMAC_PATH, environment variable: Environment. (line 39) +* GROFF_TMAC_PATH, environment variable <1>: Macro Directories. + (line 18) +* GROFF_TMPDIR, environment variable: Environment. (line 44) +* GROFF_TYPESETTER, environment variable: Environment. (line 52) +* 'grohtml', invoking: Invoking grohtml. (line 6) +* 'grohtml', registers and strings: grohtml specific registers and strings. + (line 6) +* 'grohtml', the program: Groff Options. (line 275) +* 'grohtml', the program <1>: grohtml. (line 6) +* 'grolbp', invoking: Invoking grolbp. (line 6) +* 'grolbp', the program: grolbp. (line 6) +* 'grolj4', invoking: Invoking grolj4. (line 6) +* 'grolj4', the program: grolj4. (line 6) +* 'gropdf', invoking: Invoking gropdf. (line 6) +* 'gropdf', the program: gropdf. (line 6) +* 'grops', invoking: Invoking grops. (line 6) +* 'grops', the program: grops. (line 6) +* 'grotty', invoking: Invoking grotty. (line 6) +* 'grotty', the program: grotty. (line 6) +* 'gsoelim', invoking: Invoking gsoelim. (line 5) +* 'gsoelim', the program: gsoelim. (line 6) +* 'gtbl', invoking: Invoking gtbl. (line 5) +* 'gtbl', the program: gtbl. (line 6) +* 'gtroff', identification register ('.g'): Built-in Registers. + (line 102) +* 'gtroff', interactive use: Debugging. (line 87) +* 'gtroff', output: gtroff Output. (line 6) +* 'gtroff', process ID register ('$$'): Built-in Registers. (line 99) +* 'gtroff', reference: gtroff Reference. (line 6) +* 'gxditview', invoking: Invoking gxditview. (line 5) +* 'gxditview', the program: gxditview. (line 6) +* hanging indentation ['man']: Man usage. (line 98) +* 'hcode' request, and glyph definitions: Using Symbols. (line 326) +* headers: Page Layout. (line 31) +* headers <1>: Page Location Traps. (line 38) +* headers ['ms']: ms Headers and Footers. + (line 6) +* height, font, changing ('\H'): Artificial Fonts. (line 16) +* height, of last glyph ('.cht'): Environments. (line 95) +* high-water mark register ('.h'): Diversions. (line 76) +* history: History. (line 6) +* home directory: Macro Directories. (line 24) +* horizontal discardable space: Manipulating Filling and Adjusting. + (line 183) +* horizontal input line position register ('hp'): Page Motions. + (line 209) +* horizontal input line position, saving ('\k'): Page Motions. + (line 203) +* horizontal line, drawing ('\l'): Drawing Requests. (line 17) +* horizontal motion ('\h'): Page Motions. (line 103) +* horizontal output line position register ('.k'): Page Motions. + (line 212) +* horizontal resolution: DESC File Format. (line 25) +* horizontal resolution register ('.H'): Built-in Registers. (line 15) +* horizontal space ('\h'): Page Motions. (line 103) +* horizontal space, unformatting: Strings. (line 157) +* hours, current time ('hours'): Built-in Registers. (line 41) +* 'hpf' request, and hyphenation language: Manipulating Hyphenation. + (line 256) +* 'hw' request, and hyphenation language: Manipulating Hyphenation. + (line 256) +* 'hy' glyph, and 'cflags': Using Symbols. (line 258) +* hyphen, explicit ('\%'): Manipulating Hyphenation. + (line 47) +* hyphenated lines, consecutive ('hlm'): Manipulating Hyphenation. + (line 47) +* hyphenating characters: Using Symbols. (line 251) +* hyphenation: Hyphenation. (line 6) +* hyphenation character ('\%'): Manipulating Hyphenation. + (line 85) +* hyphenation code ('hcode'): Manipulating Hyphenation. + (line 175) +* hyphenation language register ('.hla'): Manipulating Hyphenation. + (line 263) +* hyphenation margin ('hym'): Manipulating Hyphenation. + (line 211) +* hyphenation margin register ('.hym'): Manipulating Hyphenation. + (line 222) +* hyphenation patterns ('hpf'): Manipulating Hyphenation. + (line 116) +* hyphenation restrictions register ('.hy'): Manipulating Hyphenation. + (line 30) +* hyphenation space ('hys'): Manipulating Hyphenation. + (line 227) +* hyphenation space register ('.hys'): Manipulating Hyphenation. + (line 239) +* hyphenation, disabling ('\%'): Manipulating Hyphenation. + (line 85) +* hyphenation, manipulating: Manipulating Hyphenation. + (line 6) +* 'i' unit: Measurements. (line 22) +* i/o: I/O. (line 6) +* IBM cp1047 input encoding: Input Encodings. (line 9) +* IBM cp1047 output encoding: Groff Options. (line 264) +* identifiers: Identifiers. (line 6) +* identifiers, undefined: Identifiers. (line 79) +* 'ie' request, and font translations: Changing Fonts. (line 55) +* 'ie' request, and warnings: Warnings. (line 32) +* 'ie' request, operators to use with: Operators in Conditionals. + (line 6) +* 'if' request, and font translations: Changing Fonts. (line 55) +* 'if' request, and the '!' operator: Expressions. (line 21) +* 'if' request, operators to use with: Operators in Conditionals. + (line 6) +* if-else: if-else. (line 6) +* 'ig' request, and auto-increment: Comments. (line 85) +* 'ig' request, and copy-in mode: Comments. (line 85) +* imitating bold face ('bd'): Artificial Fonts. (line 98) +* implementation differences: Implementation Differences. + (line 6) +* implicit breaks of lines: Implicit Line Breaks. + (line 6) +* implicit line breaks: Implicit Line Breaks. + (line 6) +* 'in' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'in' request, using '+' and '-': Expressions. (line 75) +* inch unit ('i'): Measurements. (line 22) +* including a file ('so'): I/O. (line 9) +* incompatibilities with AT&T 'troff': Implementation Differences. + (line 6) +* increment value without changing the register: Auto-increment. + (line 52) +* increment, automatic: Auto-increment. (line 6) +* indentaion, resetting to default ['man']: Man usage. (line 127) +* indentation ('in'): Line Layout. (line 25) +* index, in macro package: Indices. (line 6) +* indicator, scaling: Measurements. (line 6) +* indirect assignments: Interpolating Registers. + (line 11) +* input and output requests: I/O. (line 6) +* input characters and output glyphs, compatibility with AT&T 'troff': Implementation Differences. + (line 86) +* input characters, invalid: Identifiers. (line 15) +* input conventions: Input Conventions. (line 6) +* input encoding, cp1047: Input Encodings. (line 9) +* input encoding, EBCDIC: Input Encodings. (line 9) +* input encoding, latin-1 (ISO 8859-1): Input Encodings. (line 14) +* input encoding, latin-2 (ISO 8859-2): Input Encodings. (line 18) +* input encoding, latin-2 (ISO 8859-9): Input Encodings. (line 23) +* input encoding, latin-9 (latin-9, ISO 8859-15): Input Encodings. + (line 28) +* input file name, current, register ('.F'): Built-in Registers. + (line 12) +* input level in delimited arguments: Implementation Differences. + (line 47) +* input line continuation ('\'): Line Control. (line 36) +* input line number register ('.c', 'c.'): Built-in Registers. + (line 77) +* input line number, setting ('lf'): Debugging. (line 10) +* input line position, horizontal, saving ('\k'): Page Motions. + (line 203) +* input line trap, setting ('it'): Input Line Traps. (line 8) +* input line traps: Input Line Traps. (line 6) +* input line traps and interrupted lines ('itc'): Input Line Traps. + (line 24) +* input line, horizontal position, register ('hp'): Page Motions. + (line 209) +* input stack, backtrace ('backtrace'): Debugging. (line 96) +* input stack, setting limit: Debugging. (line 119) +* input token: Gtroff Internals. (line 6) +* input, 8-bit: Font File Format. (line 51) +* input, standard, reading from ('rd'): I/O. (line 89) +* inserting horizontal space ('\h'): Page Motions. (line 103) +* installation: Installation. (line 5) +* interactive use of 'gtroff': Debugging. (line 87) +* intermediate output: gtroff Output. (line 16) +* interpolating registers ('\n'): Interpolating Registers. + (line 6) +* interpolation of strings ('\*'): Strings. (line 19) +* interrupted line: Line Control. (line 36) +* interrupted line register ('.int'): Line Control. (line 81) +* interrupted lines and input line traps ('itc'): Input Line Traps. + (line 24) +* introduction: Introduction. (line 6) +* invalid characters for 'trf' request: I/O. (line 73) +* invalid input characters: Identifiers. (line 15) +* invocation examples: Invocation Examples. (line 6) +* invoking 'gchem': Invoking gchem. (line 6) +* invoking 'geqn': Invoking geqn. (line 6) +* invoking 'ggrn': Invoking ggrn. (line 6) +* invoking 'gpic': Invoking gpic. (line 6) +* invoking 'grefer': Invoking grefer. (line 6) +* invoking 'grodvi': Invoking grodvi. (line 6) +* invoking 'groff': Invoking groff. (line 6) +* invoking 'grohtml': Invoking grohtml. (line 6) +* invoking 'grolbp': Invoking grolbp. (line 6) +* invoking 'grolj4': Invoking grolj4. (line 6) +* invoking 'gropdf': Invoking gropdf. (line 6) +* invoking 'grops': Invoking grops. (line 6) +* invoking 'grotty': Invoking grotty. (line 6) +* invoking 'gsoelim': Invoking gsoelim. (line 6) +* invoking 'gtbl': Invoking gtbl. (line 6) +* invoking 'gxditview': Invoking gxditview. (line 6) +* invoking 'preconv': Invoking preconv. (line 6) +* ISO 6249 SGR: Invoking grotty. (line 50) +* ISO 8859-1 (latin-1), input encoding: Input Encodings. (line 14) +* ISO 8859-1 (latin-1), output encoding: Groff Options. (line 254) +* ISO 8859-15 (latin-9, latin-0), input encoding: Input Encodings. + (line 28) +* ISO 8859-2 (latin-2), input encoding: Input Encodings. (line 18) +* ISO 8859-9 (latin-2), input encoding: Input Encodings. (line 23) +* italic correction ('\/'): Ligatures and Kerning. + (line 80) +* italic fonts ['man']: Man font macros. (line 52) +* italic glyph, correction after roman glyph ('\,'): Ligatures and Kerning. + (line 91) +* italic glyph, correction before roman glyph ('\/'): Ligatures and Kerning. + (line 80) +* justifying text: Manipulating Filling and Adjusting. + (line 6) +* justifying text ('rj'): Manipulating Filling and Adjusting. + (line 250) +* keep: Displays. (line 18) +* keep, floating: Displays. (line 23) +* keeps ['ms']: ms Displays and Keeps. + (line 6) +* keeps, and footnotes ['ms']: ms Footnotes. (line 24) +* kerning and ligatures: Ligatures and Kerning. + (line 6) +* kerning enabled register ('.kern'): Ligatures and Kerning. + (line 42) +* kerning, activating ('kern'): Ligatures and Kerning. + (line 42) +* kerning, track: Ligatures and Kerning. + (line 53) +* landscape page orientation: Paper Size. (line 6) +* last glyph, dimensions ('.w', '.cht', '.cdp', '.csk'): Environments. + (line 95) +* last-requested point size registers ('.psr', '.sr'): Fractional Type Sizes. + (line 45) +* latin-1 (ISO 8859-1), input encoding: Input Encodings. (line 14) +* latin-1 (ISO 8859-1), output encoding: Groff Options. (line 254) +* latin-2 (ISO 8859-2), input encoding: Input Encodings. (line 18) +* latin-2 (ISO 8859-9), input encoding: Input Encodings. (line 23) +* latin-9 (latin-0, ISO 8859-15), input encoding: Input Encodings. + (line 28) +* layout, line: Line Layout. (line 6) +* layout, page: Page Layout. (line 6) +* 'lc' request, and glyph definitions: Using Symbols. (line 326) +* leader character: Leaders. (line 12) +* leader character, and translations: Character Translations. + (line 169) +* leader character, non-interpreted ('\a'): Leaders. (line 18) +* leader repetition character ('lc'): Leaders. (line 23) +* leaders: Leaders. (line 6) +* leading: Sizes. (line 17) +* leading spaces: Filling and Adjusting. + (line 10) +* leading spaces macro ('lsm'): Implicit Line Breaks. + (line 15) +* leading spaces macro ('lsm') <1>: Leading Spaces Traps. + (line 9) +* leading spaces traps: Leading Spaces Traps. + (line 6) +* leading spaces with 'ds': Strings. (line 57) +* left italic correction ('\,'): Ligatures and Kerning. + (line 91) +* left margin ('po'): Line Layout. (line 21) +* left margin, how to move ['man']: Man usage. (line 106) +* length of a string ('length'): Strings. (line 211) +* length of line ('ll'): Line Layout. (line 29) +* length of page ('pl'): Page Layout. (line 13) +* length of previous line ('.n'): Environments. (line 110) +* length of title line ('lt'): Page Layout. (line 67) +* 'length' request, and copy-in mode: Strings. (line 211) +* letters, form: I/O. (line 106) +* level of warnings ('warn'): Debugging. (line 155) +* ligature: Using Symbols. (line 6) +* ligatures and kerning: Ligatures and Kerning. + (line 6) +* ligatures enabled register ('.lg'): Ligatures and Kerning. + (line 24) +* ligatures, activating ('lg'): Ligatures and Kerning. + (line 24) +* limitations of '\b' escape: Drawing Requests. (line 239) +* line break: Basics. (line 48) +* line break <1>: Implicit Line Breaks. + (line 6) +* line break <2>: Manipulating Filling and Adjusting. + (line 6) +* line break ('br'): Basics. (line 118) +* line breaks, with vertical space ['man']: Man usage. (line 120) +* line breaks, without vertical space ['man']: Man usage. (line 124) +* line control: Line Control. (line 6) +* line dimensions: Line Layout. (line 6) +* line drawing glyph: Drawing Requests. (line 28) +* line drawing glyph <1>: Drawing Requests. (line 50) +* line indentation ('in'): Line Layout. (line 25) +* line layout: Line Layout. (line 6) +* line length ('ll'): Line Layout. (line 29) +* line length register ('.l'): Line Layout. (line 158) +* line length, previous ('.n'): Environments. (line 110) +* line number, input, register ('.c', 'c.'): Built-in Registers. + (line 77) +* line number, output, register ('ln'): Built-in Registers. (line 82) +* line numbers, printing ('nm'): Miscellaneous. (line 10) +* line space, extra post-vertical ('\x'): Changing Type Sizes. + (line 118) +* line space, extra pre-vertical ('\x'): Changing Type Sizes. (line 109) +* line spacing register ('.L'): Manipulating Spacing. + (line 75) +* line spacing, post-vertical ('pvs'): Changing Type Sizes. (line 122) +* line thickness ('\D't ...''): Drawing Requests. (line 206) +* line, blank: Implicit Line Breaks. + (line 10) +* line, drawing ('\D'l ...''): Drawing Requests. (line 80) +* line, empty ('sp'): Basics. (line 93) +* line, horizontal, drawing ('\l'): Drawing Requests. (line 17) +* line, implicit breaks: Implicit Line Breaks. + (line 6) +* line, input, continuation ('\'): Line Control. (line 36) +* line, input, horizontal position, register ('hp'): Page Motions. + (line 209) +* line, input, horizontal position, saving ('\k'): Page Motions. + (line 203) +* line, interrupted: Line Control. (line 36) +* line, output, continuation ('\c'): Line Control. (line 36) +* line, output, horizontal position, register ('.k'): Page Motions. + (line 212) +* line, vertical, drawing ('\L'): Drawing Requests. (line 50) +* line-tabs mode: Tabs and Fields. (line 138) +* lines, blank, disabling: Manipulating Spacing. + (line 123) +* lines, centering ('ce'): Basics. (line 105) +* lines, centering ('ce') <1>: Manipulating Filling and Adjusting. + (line 204) +* lines, consecutive hyphenated ('hlm'): Manipulating Hyphenation. + (line 47) +* lines, interrupted, and input line traps ('itc'): Input Line Traps. + (line 24) +* list: Displays. (line 13) +* list of available glyphs ('groff_char(7)' man page): Using Symbols. + (line 76) +* 'll' request, using '+' and '-': Expressions. (line 75) +* location, vertical, page, marking ('mk'): Page Motions. (line 11) +* location, vertical, page, returning to marked ('rt'): Page Motions. + (line 11) +* logical not, limitation in expression: Expressions. (line 27) +* logical operators: Expressions. (line 19) +* long names: Implementation Differences. + (line 9) +* loops and conditionals: Conditionals and Loops. + (line 6) +* 'lq' glyph, and 'lq' string ['man']: Predefined man strings. + (line 22) +* 'ls' request, alternative to ('pvs'): Changing Type Sizes. (line 137) +* 'lt' request, using '+' and '-': Expressions. (line 75) +* 'm' unit: Measurements. (line 50) +* 'M' unit: Measurements. (line 62) +* machine unit ('u'): Measurements. (line 6) +* macro arguments: Request and Macro Arguments. + (line 6) +* macro arguments, and compatibility mode: Gtroff Internals. (line 91) +* macro arguments, and tabs: Request and Macro Arguments. + (line 6) +* macro basics: Basics. (line 6) +* macro directories: Macro Directories. (line 6) +* macro files, searching: Macro Directories. (line 11) +* macro name register ('\$0'): Parameters. (line 71) +* macro names, starting with '[' or ']', and 'refer': Identifiers. + (line 46) +* macro packages: Macro Package Intro. (line 6) +* macro packages <1>: Macro Packages. (line 6) +* macro packages, structuring the source code: Requests. (line 14) +* macro, appending ('am'): Writing Macros. (line 116) +* macro, arguments ('\$'): Parameters. (line 21) +* macro, creating alias ('als'): Strings. (line 229) +* macro, end-of-input ('em'): End-of-input Traps. (line 7) +* macro, removing ('rm'): Strings. (line 224) +* macro, removing alias ('rm'): Strings. (line 263) +* macro, renaming ('rn'): Strings. (line 221) +* macros: Macros. (line 6) +* macros for manual pages ['man']: Man usage. (line 6) +* macros, recursive: while. (line 38) +* macros, searching: Macro Directories. (line 6) +* macros, shared name space with strings and diversions: Strings. + (line 92) +* macros, tutorial for users: Tutorial for Macro Users. + (line 6) +* macros, writing: Writing Macros. (line 6) +* magnification of a font ('fzoom'): Changing Fonts. (line 71) +* major quotes: Displays. (line 10) +* major version number register ('.x'): Built-in Registers. (line 88) +* 'man' macros: Man usage. (line 6) +* 'man' macros, bold face: Man font macros. (line 14) +* 'man' macros, custom headers and footers: Optional man extensions. + (line 12) +* 'man' macros, default indentation: Miscellaneous man macros. + (line 6) +* 'man' macros, empty space before a paragraph: Miscellaneous man macros. + (line 15) +* 'man' macros, hanging indentation: Man usage. (line 98) +* 'man' macros, how to set fonts: Man font macros. (line 6) +* 'man' macros, italic fonts: Man font macros. (line 52) +* 'man' macros, line breaks with vertical space: Man usage. (line 120) +* 'man' macros, line breaks without vertical space: Man usage. + (line 124) +* 'man' macros, moving left margin: Man usage. (line 106) +* 'man' macros, resetting default indentation: Man usage. (line 127) +* 'man' macros, tab stops: Miscellaneous man macros. + (line 10) +* 'man' macros, Ultrix-specific: Optional man extensions. + (line 30) +* man pages: man. (line 6) +* manipulating filling and adjusting: Manipulating Filling and Adjusting. + (line 6) +* manipulating hyphenation: Manipulating Hyphenation. + (line 6) +* manipulating spacing: Manipulating Spacing. + (line 6) +* 'man'macros, BSD compatibility: Miscellaneous man macros. + (line 27) +* 'man'macros, BSD compatibility <1>: Miscellaneous man macros. + (line 44) +* manual pages: man. (line 6) +* margin for hyphenation ('hym'): Manipulating Hyphenation. + (line 211) +* margin glyph ('mc'): Miscellaneous. (line 75) +* margin, bottom: Page Layout. (line 20) +* margin, left ('po'): Line Layout. (line 21) +* margin, top: Page Layout. (line 20) +* mark, high-water, register ('.h'): Diversions. (line 76) +* marking vertical page location ('mk'): Page Motions. (line 11) +* MathML: grohtml specific registers and strings. + (line 23) +* maximum values of Roman numerals: Assigning Formats. (line 59) +* 'mdoc' macros: mdoc. (line 6) +* 'me' macro package: me. (line 6) +* measurement unit: Measurements. (line 6) +* measurements: Measurements. (line 6) +* measurements, specifying safely: Default Units. (line 25) +* minimum values of Roman numerals: Assigning Formats. (line 59) +* minor version number register ('.y'): Built-in Registers. (line 92) +* minutes, current time ('minutes'): Built-in Registers. (line 37) +* 'mm' macro package: mm. (line 6) +* mode for constant glyph space ('cs'): Artificial Fonts. (line 126) +* mode, compatibility: Implementation Differences. + (line 6) +* mode, compatibility, and parameters: Gtroff Internals. (line 91) +* mode, copy: Copy-in Mode. (line 6) +* mode, copy-in: Copy-in Mode. (line 6) +* mode, copy-in, and 'cf' request: I/O. (line 50) +* mode, copy-in, and 'device' request: Postprocessor Access. + (line 19) +* mode, copy-in, and 'ig' request: Comments. (line 85) +* mode, copy-in, and 'length' request: Strings. (line 211) +* mode, copy-in, and macro arguments: Parameters. (line 21) +* mode, copy-in, and 'output' request: Diversions. (line 179) +* mode, copy-in, and 'tm' request: Debugging. (line 30) +* mode, copy-in, and 'tm1' request: Debugging. (line 30) +* mode, copy-in, and 'tmc' request: Debugging. (line 30) +* mode, copy-in, and 'trf' request: I/O. (line 50) +* mode, copy-in, and 'write' request: I/O. (line 212) +* mode, copy-in, and 'writec' request: I/O. (line 212) +* mode, copy-in, and 'writem' request: I/O. (line 225) +* mode, copy-in, and '\!': Diversions. (line 148) +* mode, copy-in, and '\?': Operators in Conditionals. + (line 55) +* mode, copy-in, and '\?' <1>: Diversions. (line 148) +* mode, copy-in, and '\a': Leaders. (line 18) +* mode, copy-in, and '\E': Character Translations. + (line 81) +* mode, copy-in, and '\t': Tabs and Fields. (line 10) +* mode, copy-in, and '\V': I/O. (line 249) +* mode, fill: Implicit Line Breaks. + (line 15) +* mode, fill <1>: Manipulating Filling and Adjusting. + (line 156) +* mode, fill <2>: Warnings. (line 23) +* mode, fill ('fi'): Manipulating Filling and Adjusting. + (line 29) +* mode, fill, and '\c': Line Control. (line 69) +* mode, line-tabs: Tabs and Fields. (line 138) +* mode, no-fill ('nf'): Manipulating Filling and Adjusting. + (line 39) +* mode, no-fill, and '\c': Line Control. (line 60) +* mode, no-space ('ns'): Manipulating Spacing. + (line 123) +* mode, nroff: Troff and Nroff Mode. + (line 6) +* mode, safer: Groff Options. (line 214) +* mode, safer <1>: Macro Directories. (line 21) +* mode, safer <2>: Built-in Registers. (line 23) +* mode, safer <3>: I/O. (line 32) +* mode, safer <4>: I/O. (line 147) +* mode, safer <5>: I/O. (line 168) +* mode, safer <6>: I/O. (line 206) +* mode, troff: Troff and Nroff Mode. + (line 6) +* mode, unsafe: Groff Options. (line 292) +* mode, unsafe <1>: Macro Directories. (line 21) +* mode, unsafe <2>: Built-in Registers. (line 23) +* mode, unsafe <3>: I/O. (line 32) +* mode, unsafe <4>: I/O. (line 147) +* mode, unsafe <5>: I/O. (line 168) +* mode, unsafe <6>: I/O. (line 206) +* modifying requests: Requests. (line 61) +* 'mom' macro package: mom. (line 6) +* month of the year register ('mo'): Built-in Registers. (line 51) +* motion operators: Expressions. (line 65) +* motion, horizontal ('\h'): Page Motions. (line 103) +* motion, vertical ('\v'): Page Motions. (line 78) +* motions, page: Page Motions. (line 6) +* mounting font ('fp'): Font Positions. (line 13) +* 'ms' macros: ms. (line 6) +* 'ms' macros, accent marks: ms Strings and Special Characters. + (line 6) +* 'ms' macros, body text: ms Body Text. (line 6) +* 'ms' macros, cover page: ms Cover Page Macros. + (line 6) +* 'ms' macros, creating table of contents: ms TOC. (line 6) +* 'ms' macros, differences from AT&T: Differences from AT&T ms. + (line 6) +* 'ms' macros, displays: ms Displays and Keeps. + (line 6) +* 'ms' macros, document control registers: ms Document Control Registers. + (line 6) +* 'ms' macros, equations: ms Insertions. (line 6) +* 'ms' macros, figures: ms Insertions. (line 6) +* 'ms' macros, footers: ms Headers and Footers. + (line 6) +* 'ms' macros, footnotes: ms Footnotes. (line 6) +* 'ms' macros, general structure: General ms Structure. + (line 6) +* 'ms' macros, headers: ms Headers and Footers. + (line 6) +* 'ms' macros, headings: Headings in ms. (line 6) +* 'ms' macros, highlighting: Highlighting in ms. (line 6) +* 'ms' macros, keeps: ms Displays and Keeps. + (line 6) +* 'ms' macros, lists: Lists in ms. (line 6) +* 'ms' macros, margins: ms Margins. (line 6) +* 'ms' macros, multiple columns: ms Multiple Columns. (line 6) +* 'ms' macros, naming conventions: Naming Conventions. (line 6) +* 'ms' macros, nested lists: Lists in ms. (line 122) +* 'ms' macros, page layout: ms Page Layout. (line 6) +* 'ms' macros, paragraph handling: Paragraphs in ms. (line 6) +* 'ms' macros, references: ms Insertions. (line 6) +* 'ms' macros, special characters: ms Strings and Special Characters. + (line 6) +* 'ms' macros, strings: ms Strings and Special Characters. + (line 6) +* 'ms' macros, tables: ms Insertions. (line 6) +* multi-file documents: Debugging. (line 10) +* multi-line strings: Strings. (line 63) +* multi-page table, example markup ['ms']: Example multi-page table. + (line 6) +* multiple columns ['ms']: ms Multiple Columns. (line 6) +* 'n' unit: Measurements. (line 55) +* name space, common, of macros, diversions, and strings: Strings. + (line 92) +* name, background color, register ('.M'): Colors. (line 94) +* name, drawing color, register ('.m'): Colors. (line 67) +* name, fill color, register ('.M'): Colors. (line 94) +* named character ('\C'): Using Symbols. (line 185) +* names, long: Implementation Differences. + (line 9) +* naming conventions, 'ms' macros: Naming Conventions. (line 6) +* 'ne' request, and the '.trunc' register: Page Location Traps. + (line 131) +* 'ne' request, comparison with 'sv': Page Control. (line 53) +* negating register values: Setting Registers. (line 78) +* nested assignments: Interpolating Registers. + (line 11) +* nested diversions: Diversions. (line 69) +* nested lists ['ms']: Lists in ms. (line 122) +* new page ('bp'): Basics. (line 91) +* new page ('bp') <1>: Page Control. (line 10) +* newline character: Identifiers. (line 10) +* newline character <1>: Escapes. (line 69) +* newline character, and translations: Character Translations. + (line 169) +* newline character, in strings, escaping: Strings. (line 63) +* newline, final, stripping in diversions: Strings. (line 157) +* next file, processing ('nx'): I/O. (line 84) +* next free font position register ('.fp'): Font Positions. (line 30) +* 'nf' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'nl' register, and '.d': Diversions. (line 69) +* 'nl' register, difference to '.h': Diversions. (line 88) +* 'nm' request, using '+' and '-': Expressions. (line 75) +* no-break control character ('''): Requests. (line 6) +* no-break control character, changing ('c2'): Character Translations. + (line 6) +* no-fill mode ('nf'): Manipulating Filling and Adjusting. + (line 39) +* no-fill mode, and '\c': Line Control. (line 60) +* no-space mode ('ns'): Manipulating Spacing. + (line 123) +* node, output: Gtroff Internals. (line 6) +* 'nr' request, and warnings: Warnings. (line 61) +* 'nr' request, using '+' and '-': Expressions. (line 75) +* nroff mode: Troff and Nroff Mode. + (line 6) +* 'nroff', the program: History. (line 22) +* number of arguments register ('.$'): Parameters. (line 10) +* number of registers register ('.R'): Built-in Registers. (line 18) +* number register, creating alias ('aln'): Setting Registers. (line 112) +* number register, removing ('rr'): Setting Registers. (line 104) +* number register, renaming ('rnn'): Setting Registers. (line 108) +* number registers, dumping ('pnr'): Debugging. (line 77) +* number, input line, setting ('lf'): Debugging. (line 10) +* number, page ('pn'): Page Layout. (line 84) +* numbered glyph ('\N'): Character Translations. + (line 160) +* numbered glyph ('\N') <1>: Using Symbols. (line 201) +* numbered list, example markup ['ms']: Lists in ms. (line 41) +* numbers, and delimiters: Escapes. (line 65) +* numbers, line, printing ('nm'): Miscellaneous. (line 10) +* numerals, Roman: Assigning Formats. (line 32) +* numeric expression, valid: Expressions. (line 83) +* offset, page ('po'): Line Layout. (line 21) +* 'open' request, and safer mode: Groff Options. (line 214) +* 'opena' request, and safer mode: Groff Options. (line 214) +* opening file ('open'): I/O. (line 200) +* operator, scaling: Expressions. (line 54) +* operators, arithmetic: Expressions. (line 8) +* operators, as delimiters: Escapes. (line 67) +* operators, comparison: Expressions. (line 15) +* operators, extremum ('>?', ': Built-in Registers. + (line 127) +* output device usage number register ('.T'): Groff Options. (line 281) +* output devices: Output device intro. (line 6) +* output devices <1>: Output Devices. (line 6) +* output encoding, ASCII: Groff Options. (line 250) +* output encoding, cp1047: Groff Options. (line 264) +* output encoding, EBCDIC: Groff Options. (line 264) +* output encoding, latin-1 (ISO 8859-1): Groff Options. (line 254) +* output encoding, utf-8: Groff Options. (line 259) +* output glyphs, and input characters,compatibility with AT&T 'troff': Implementation Differences. + (line 86) +* output line number register ('ln'): Built-in Registers. (line 82) +* output line, continuation ('\c'): Line Control. (line 36) +* output line, horizontal position, register ('.k'): Page Motions. + (line 212) +* output node: Gtroff Internals. (line 6) +* 'output' request, and copy-in mode: Diversions. (line 179) +* 'output' request, and '\!': Diversions. (line 179) +* output, flush ('fl'): Debugging. (line 87) +* output, 'gtroff': gtroff Output. (line 6) +* output, intermediate: gtroff Output. (line 16) +* output, suppressing ('\O'): Suppressing output. (line 7) +* output, transparent ('cf', 'trf'): I/O. (line 50) +* output, transparent ('\!', '\?'): Diversions. (line 136) +* output, transparent, incompatibilities with AT&T 'troff': Implementation Differences. + (line 106) +* output, troff: gtroff Output. (line 16) +* overlapping characters: Using Symbols. (line 265) +* overstriking glyphs ('\o'): Page Motions. (line 216) +* 'p' unit: Measurements. (line 30) +* 'P' unit: Measurements. (line 34) +* packages, macros: Macro Packages. (line 6) +* padding character, for fields ('fc'): Fields. (line 6) +* page break, conditional ('ne'): Page Control. (line 33) +* page control: Page Control. (line 6) +* page ejecting register ('.pe'): Page Location Traps. (line 143) +* page footers: Page Location Traps. (line 38) +* page headers: Page Location Traps. (line 38) +* page layout: Page Layout. (line 6) +* page layout ['ms']: ms Page Layout. (line 6) +* page length ('pl'): Page Layout. (line 13) +* page length register ('.p'): Page Layout. (line 17) +* page location traps: Page Location Traps. (line 6) +* page location, vertical, marking ('mk'): Page Motions. (line 11) +* page location, vertical, returning to marked ('rt'): Page Motions. + (line 11) +* page motions: Page Motions. (line 6) +* page number ('pn'): Page Layout. (line 84) +* page number character ('%'): Page Layout. (line 35) +* page number character, changing ('pc'): Page Layout. (line 94) +* page number register ('%'): Page Control. (line 27) +* page offset ('po'): Line Layout. (line 21) +* page orientation, landscape: Paper Size. (line 6) +* page, new ('bp'): Page Control. (line 10) +* paper formats: Paper Formats. (line 6) +* paper size: Paper Size. (line 6) +* paragraphs: Paragraphs. (line 6) +* parameters: Parameters. (line 6) +* parameters, and compatibility mode: Gtroff Internals. (line 91) +* parentheses: Expressions. (line 59) +* path, for font files: Font Directories. (line 14) +* path, for tmac files: Macro Directories. (line 11) +* patterns for hyphenation ('hpf'): Manipulating Hyphenation. + (line 116) +* PDF, embedding: Embedding PDF. (line 6) +* 'pi' request, and 'groff': I/O. (line 159) +* 'pi' request, and safer mode: Groff Options. (line 214) +* 'pic', the program: gpic. (line 6) +* pica unit ('P'): Measurements. (line 34) +* pile, glyph ('\b'): Drawing Requests. (line 232) +* 'pl' request, using '+' and '-': Expressions. (line 75) +* planting a trap: Traps. (line 11) +* platform-specific directory: Macro Directories. (line 26) +* 'pn' request, using '+' and '-': Expressions. (line 75) +* PNG image generation from PostScript: DESC File Format. (line 29) +* 'po' request, using '+' and '-': Expressions. (line 75) +* point size registers ('.s', '.ps'): Changing Type Sizes. (line 20) +* point size registers, last-requested ('.psr', '.sr'): Fractional Type Sizes. + (line 45) +* point sizes, changing ('ps', '\s'): Changing Type Sizes. (line 11) +* point sizes, fractional: Fractional Type Sizes. + (line 6) +* point sizes, fractional <1>: Implementation Differences. + (line 76) +* point unit ('p'): Measurements. (line 30) +* polygon, drawing ('\D'p ...''): Drawing Requests. (line 158) +* polygon, solid, drawing ('\D'P ...''): Drawing Requests. (line 167) +* position of lowest text line ('.h'): Diversions. (line 76) +* position, absolute, operator ('|'): Expressions. (line 70) +* position, horizontal input line, saving ('\k'): Page Motions. + (line 203) +* position, horizontal, in input line, register ('hp'): Page Motions. + (line 209) +* position, horizontal, in output line, register ('.k'): Page Motions. + (line 212) +* position, vertical, current ('nl'): Page Control. (line 67) +* position, vertical, in diversion, register ('.d'): Diversions. + (line 69) +* positions, font: Font Positions. (line 6) +* post-vertical line spacing: Changing Type Sizes. (line 122) +* post-vertical line spacing register ('.pvs'): Changing Type Sizes. + (line 137) +* post-vertical line spacing, changing ('pvs'): Changing Type Sizes. + (line 137) +* postprocessor access: Postprocessor Access. + (line 6) +* postprocessors: Output device intro. (line 6) +* PostScript fonts: Font Families. (line 11) +* PostScript, bounding box: Miscellaneous. (line 139) +* PostScript, embedding: Embedding PostScript. + (line 6) +* PostScript, PNG image generation: DESC File Format. (line 29) +* 'preconv', invoking: Invoking preconv. (line 5) +* 'preconv', the program: preconv. (line 6) +* prefix, for commands: Environment. (line 14) +* preprocessor, calling convention: Preprocessors in man pages. + (line 6) +* preprocessors: Preprocessor Intro. (line 6) +* preprocessors <1>: Preprocessors. (line 6) +* previous font ('ft', '\f[]', '\fP'): Changing Fonts. (line 23) +* previous line length ('.n'): Environments. (line 110) +* print current page register ('.P'): Groff Options. (line 171) +* printing backslash ('\\', '\e', '\E', '\[rs]'): Escapes. (line 74) +* printing backslash ('\\', '\e', '\E', '\[rs]') <1>: Implementation Differences. + (line 106) +* printing line numbers ('nm'): Miscellaneous. (line 10) +* printing to stderr ('tm', 'tm1', 'tmc'): Debugging. (line 27) +* printing, zero-width ('\z', '\Z'): Page Motions. (line 220) +* printing, zero-width ('\z', '\Z') <1>: Page Motions. (line 224) +* process ID of 'gtroff' register ('$$'): Built-in Registers. (line 99) +* processing next file ('nx'): I/O. (line 84) +* properties of characters ('cflags'): Using Symbols. (line 237) +* properties of glyphs ('cflags'): Using Symbols. (line 237) +* 'ps' request, and constant glyph space mode: Artificial Fonts. + (line 126) +* 'ps' request, incompatibilities with AT&T 'troff': Implementation Differences. + (line 76) +* 'ps' request, using '+' and '-': Expressions. (line 75) +* 'ps' request, with fractional type sizes: Fractional Type Sizes. + (line 6) +* 'pso' request, and safer mode: Groff Options. (line 214) +* 'pvs' request, using '+' and '-': Expressions. (line 75) +* quotes, major: Displays. (line 10) +* quotes, trailing: Strings. (line 57) +* 'radicalex' glyph, and 'cflags': Using Symbols. (line 265) +* ragged-left: Manipulating Filling and Adjusting. + (line 63) +* ragged-right: Manipulating Filling and Adjusting. + (line 59) +* 'rc' request, and glyph definitions: Using Symbols. (line 326) +* read-only register, changing format: Assigning Formats. (line 68) +* reading from standard input ('rd'): I/O. (line 89) +* recursive macros: while. (line 38) +* 'refer', and macro names starting with '[' or ']': Identifiers. + (line 46) +* 'refer', the program: grefer. (line 6) +* reference, 'gtroff': gtroff Reference. (line 6) +* references ['ms']: ms Insertions. (line 6) +* register, creating alias ('aln'): Setting Registers. (line 112) +* register, format ('\g'): Assigning Formats. (line 75) +* register, removing ('rr'): Setting Registers. (line 104) +* register, renaming ('rnn'): Setting Registers. (line 108) +* registers: Registers. (line 6) +* registers specific to 'grohtml': grohtml specific registers and strings. + (line 6) +* registers, built-in: Built-in Registers. (line 6) +* registers, interpolating ('\n'): Interpolating Registers. + (line 6) +* registers, number of, register ('.R'): Built-in Registers. (line 18) +* registers, setting ('nr', '\R'): Setting Registers. (line 6) +* removing alias, for diversion ('rm'): Strings. (line 263) +* removing alias, for macro ('rm'): Strings. (line 263) +* removing alias, for string ('rm'): Strings. (line 263) +* removing diversion ('rm'): Strings. (line 224) +* removing glyph definition ('rchar', 'rfschar'): Using Symbols. + (line 382) +* removing macro ('rm'): Strings. (line 224) +* removing number register ('rr'): Setting Registers. (line 104) +* removing request ('rm'): Strings. (line 224) +* removing string ('rm'): Strings. (line 224) +* renaming diversion ('rn'): Strings. (line 221) +* renaming macro ('rn'): Strings. (line 221) +* renaming number register ('rnn'): Setting Registers. (line 108) +* renaming request ('rn'): Strings. (line 221) +* renaming string ('rn'): Strings. (line 221) +* request arguments: Request and Macro Arguments. + (line 6) +* request arguments, and compatibility mode: Gtroff Internals. + (line 91) +* request, removing ('rm'): Strings. (line 224) +* request, renaming ('rn'): Strings. (line 221) +* request, undefined: Comments. (line 25) +* requests: Requests. (line 6) +* requests for drawing: Drawing Requests. (line 6) +* requests for input and output: I/O. (line 6) +* requests, modifying: Requests. (line 61) +* resolution, device: DESC File Format. (line 85) +* resolution, horizontal: DESC File Format. (line 25) +* resolution, horizontal, register ('.H'): Built-in Registers. + (line 15) +* resolution, vertical: DESC File Format. (line 135) +* resolution, vertical, register ('.V'): Built-in Registers. (line 28) +* returning to marked vertical page location ('rt'): Page Motions. + (line 11) +* revision number register ('.Y'): Built-in Registers. (line 96) +* 'rf', the program: History. (line 6) +* right-justifying ('rj'): Manipulating Filling and Adjusting. + (line 250) +* 'rj' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'rn' glyph, and 'cflags': Using Symbols. (line 265) +* 'roff', the program: History. (line 17) +* roman glyph, correction after italic glyph ('\/'): Ligatures and Kerning. + (line 80) +* roman glyph, correction before italic glyph ('\,'): Ligatures and Kerning. + (line 91) +* Roman numerals: Assigning Formats. (line 32) +* Roman numerals, maximum and minimum: Assigning Formats. (line 59) +* 'rq' glyph, and 'rq' string ['man']: Predefined man strings. + (line 22) +* 'rq' glyph, at end of sentence: Sentences. (line 18) +* 'rq' glyph, at end of sentence <1>: Using Symbols. (line 275) +* 'rt' request, using '+' and '-': Expressions. (line 75) +* 'ru' glyph, and 'cflags': Using Symbols. (line 265) +* 'RUNOFF', the program: History. (line 6) +* 's' unit: Measurements. (line 40) +* 's' unit <1>: Fractional Type Sizes. + (line 6) +* safer mode: Groff Options. (line 214) +* safer mode <1>: Macro Directories. (line 21) +* safer mode <2>: Built-in Registers. (line 23) +* safer mode <3>: I/O. (line 32) +* safer mode <4>: I/O. (line 147) +* safer mode <5>: I/O. (line 168) +* safer mode <6>: I/O. (line 206) +* saving horizontal input line position ('\k'): Page Motions. (line 203) +* scaling indicator: Measurements. (line 6) +* scaling operator: Expressions. (line 54) +* searching fonts: Font Directories. (line 6) +* searching macro files: Macro Directories. (line 11) +* searching macros: Macro Directories. (line 6) +* seconds, current time ('seconds'): Built-in Registers. (line 31) +* sentence space: Sentences. (line 12) +* sentence space size register ('.sss'): Manipulating Filling and Adjusting. + (line 151) +* sentences: Sentences. (line 6) +* setting diversion trap ('dt'): Diversion Traps. (line 7) +* setting end-of-input trap ('em'): End-of-input Traps. (line 7) +* setting input line number ('lf'): Debugging. (line 10) +* setting input line trap ('it'): Input Line Traps. (line 8) +* setting registers ('nr', '\R'): Setting Registers. (line 6) +* shading filled objects ('\D'f ...''): Drawing Requests. (line 141) +* 'shc' request, and translations: Character Translations. + (line 173) +* site-specific directory: Macro Directories. (line 26) +* site-specific directory <1>: Font Directories. (line 29) +* size of sentence space register ('.sss'): Manipulating Filling and Adjusting. + (line 151) +* size of type: Sizes. (line 6) +* size of word space register ('.ss'): Manipulating Filling and Adjusting. + (line 151) +* size, optical, of a font: Changing Fonts. (line 71) +* size, paper: Paper Size. (line 6) +* sizes: Sizes. (line 6) +* sizes, fractional: Fractional Type Sizes. + (line 6) +* sizes, fractional <1>: Implementation Differences. + (line 76) +* skew, of last glyph ('.csk'): Environments. (line 95) +* slant, font, changing ('\S'): Artificial Fonts. (line 45) +* 'soelim', the program: gsoelim. (line 6) +* soft hyphen character, setting ('shc'): Manipulating Hyphenation. + (line 243) +* soft hyphen glyph ('hy'): Manipulating Hyphenation. + (line 243) +* solid circle, drawing ('\D'C ...''): Drawing Requests. (line 114) +* solid ellipse, drawing ('\D'E ...''): Drawing Requests. (line 124) +* solid polygon, drawing ('\D'P ...''): Drawing Requests. (line 167) +* 'sp' request, and no-space mode: Manipulating Spacing. + (line 123) +* 'sp' request, and traps: Manipulating Spacing. + (line 53) +* 'sp' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* space between sentences: Sentences. (line 12) +* space between sentences register ('.sss'): Manipulating Filling and Adjusting. + (line 151) +* space between words register ('.ss'): Manipulating Filling and Adjusting. + (line 151) +* space character: Escapes. (line 69) +* space character, zero width ('\&'): Requests. (line 47) +* space character, zero width ('\&') <1>: Ligatures and Kerning. + (line 47) +* space character, zero width ('\&') <2>: Drawing Requests. (line 32) +* space characters, in expressions: Expressions. (line 86) +* space, discardable, horizontal: Manipulating Filling and Adjusting. + (line 183) +* space, discarded, in traps: Manipulating Spacing. + (line 53) +* space, horizontal ('\h'): Page Motions. (line 103) +* space, horizontal, unformatting: Strings. (line 157) +* space, unbreakable: Page Motions. (line 114) +* space, vertical, unit ('v'): Measurements. (line 58) +* space, width of a digit ('\0'): Page Motions. (line 138) +* spaces with 'ds': Strings. (line 57) +* spaces, in a macro argument: Request and Macro Arguments. + (line 10) +* spaces, leading and trailing: Filling and Adjusting. + (line 10) +* spacing: Basics. (line 82) +* spacing, manipulating: Manipulating Spacing. + (line 6) +* spacing, vertical: Sizes. (line 6) +* special characters: Character Translations. + (line 160) +* special characters <1>: Special Characters. (line 6) +* special characters ['ms']: ms Strings and Special Characters. + (line 6) +* special fonts: Using Symbols. (line 14) +* special fonts <1>: Special Fonts. (line 6) +* special fonts <2>: Font File Format. (line 28) +* special fonts, emboldening: Artificial Fonts. (line 115) +* 'special' request, and font translations: Changing Fonts. (line 55) +* 'special' request, and glyph search order: Using Symbols. (line 14) +* spline, drawing ('\D'~ ...''): Drawing Requests. (line 136) +* springing a trap: Traps. (line 11) +* 'sqrtex' glyph, and 'cflags': Using Symbols. (line 265) +* stacking glyphs ('\b'): Drawing Requests. (line 232) +* standard input, reading from ('rd'): I/O. (line 89) +* stderr, printing to ('tm', 'tm1', 'tmc'): Debugging. (line 27) +* stops, tabulator: Tab Stops. (line 6) +* string arguments: Strings. (line 19) +* string comparison: Operators in Conditionals. + (line 47) +* string expansion ('\*'): Strings. (line 19) +* string interpolation ('\*'): Strings. (line 19) +* string, appending ('as'): Strings. (line 176) +* string, creating alias ('als'): Strings. (line 229) +* string, length of ('length'): Strings. (line 211) +* string, removing ('rm'): Strings. (line 224) +* string, removing alias ('rm'): Strings. (line 263) +* string, renaming ('rn'): Strings. (line 221) +* strings: Strings. (line 6) +* strings specific to 'grohtml': grohtml specific registers and strings. + (line 6) +* strings ['ms']: ms Strings and Special Characters. + (line 6) +* strings, multi-line: Strings. (line 63) +* strings, shared name space with macros and diversions: Strings. + (line 92) +* stripping final newline in diversions: Strings. (line 157) +* structuring source code of documents or macro packages: Requests. + (line 14) +* 'sty' request, and changing fonts: Changing Fonts. (line 11) +* 'sty' request, and font positions: Font Positions. (line 60) +* 'sty' request, and font translations: Changing Fonts. (line 55) +* styles, font: Font Families. (line 6) +* substring ('substring'): Strings. (line 192) +* suppressing output ('\O'): Suppressing output. (line 7) +* 'sv' request, and no-space mode: Page Control. (line 63) +* switching environments ('ev'): Environments. (line 39) +* 'sy' request, and safer mode: Groff Options. (line 214) +* symbol: Using Symbols. (line 14) +* symbol table, dumping ('pm'): Debugging. (line 66) +* symbol, defining ('char'): Using Symbols. (line 326) +* symbols, using: Using Symbols. (line 6) +* 'system()' return value register ('systat'): I/O. (line 195) +* tab character: Tab Stops. (line 6) +* tab character <1>: Escapes. (line 69) +* tab character, and translations: Character Translations. + (line 169) +* tab character, non-interpreted ('\t'): Tabs and Fields. (line 10) +* tab repetition character ('tc'): Tabs and Fields. (line 129) +* tab settings register ('.tabs'): Tabs and Fields. (line 117) +* tab stops: Tab Stops. (line 6) +* tab stops ['man']: Miscellaneous man macros. + (line 10) +* tab stops, for TTY output devices: Tabs and Fields. (line 115) +* tab, line-tabs mode: Tabs and Fields. (line 138) +* table of contents: Table of Contents. (line 6) +* table of contents <1>: Leaders. (line 29) +* table of contents, creating ['ms']: ms TOC. (line 6) +* tables ['ms']: ms Insertions. (line 6) +* tabs, and fields: Tabs and Fields. (line 6) +* tabs, and macro arguments: Request and Macro Arguments. + (line 6) +* tabs, before comments: Comments. (line 21) +* 'tbl', the program: gtbl. (line 6) +* Teletype: Invoking grotty. (line 50) +* terminal control sequences: Invoking grotty. (line 50) +* terminal, conditional output for: Operators in Conditionals. + (line 14) +* text line, position of lowest ('.h'): Diversions. (line 76) +* text, 'gtroff' processing: Text. (line 6) +* text, justifying: Manipulating Filling and Adjusting. + (line 6) +* text, justifying ('rj'): Manipulating Filling and Adjusting. + (line 250) +* thickness of lines ('\D't ...''): Drawing Requests. (line 206) +* three-part title ('tl'): Page Layout. (line 35) +* 'ti' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'ti' request, using '+' and '-': Expressions. (line 75) +* time, current: I/O. (line 175) +* time, current, hours ('hours'): Built-in Registers. (line 41) +* time, current, minutes ('minutes'): Built-in Registers. (line 37) +* time, current, seconds ('seconds'): Built-in Registers. (line 31) +* title line ('tl'): Page Layout. (line 35) +* title line length register ('.lt'): Page Layout. (line 67) +* title line, length ('lt'): Page Layout. (line 67) +* title page, example markup: ms Cover Page Macros. + (line 66) +* titles: Page Layout. (line 31) +* 'tkf' request, and font styles: Font Families. (line 59) +* 'tkf' request, and font translations: Changing Fonts. (line 55) +* 'tkf' request, with fractional type sizes: Fractional Type Sizes. + (line 6) +* 'tl' request, and 'mc': Miscellaneous. (line 102) +* 'tm' request, and copy-in mode: Debugging. (line 30) +* 'tm1' request, and copy-in mode: Debugging. (line 30) +* tmac, directory: Macro Directories. (line 11) +* tmac, path: Macro Directories. (line 11) +* 'tmc' request, and copy-in mode: Debugging. (line 30) +* TMPDIR, environment variable: Environment. (line 44) +* token, input: Gtroff Internals. (line 6) +* top margin: Page Layout. (line 20) +* top-level diversion: Diversions. (line 12) +* top-level diversion, and 'bp': Page Control. (line 24) +* top-level diversion, and '\!': Diversions. (line 171) +* top-level diversion, and '\?': Diversions. (line 176) +* 'tr' request, and glyph definitions: Using Symbols. (line 326) +* 'tr' request, and soft hyphen character: Manipulating Hyphenation. + (line 243) +* 'tr' request, incompatibilities with AT&T 'troff': Implementation Differences. + (line 86) +* track kerning: Ligatures and Kerning. + (line 53) +* track kerning, activating ('tkf'): Ligatures and Kerning. + (line 60) +* trailing quotes: Strings. (line 57) +* trailing spaces: Filling and Adjusting. + (line 10) +* translations of characters: Character Translations. + (line 6) +* transparent characters: Sentences. (line 18) +* transparent characters <1>: Using Symbols. (line 275) +* transparent output ('cf', 'trf'): I/O. (line 50) +* transparent output ('\!', '\?'): Diversions. (line 136) +* transparent output, incompatibilities with AT&T 'troff': Implementation Differences. + (line 106) +* trap, changing location ('ch'): Page Location Traps. (line 111) +* trap, distance, register ('.t'): Page Location Traps. (line 102) +* trap, diversion, setting ('dt'): Diversion Traps. (line 7) +* trap, end-of-input, setting ('em'): End-of-input Traps. (line 7) +* trap, input line, setting ('it'): Input Line Traps. (line 8) +* trap, planting: Traps. (line 11) +* trap, springing: Traps. (line 11) +* traps: Traps. (line 6) +* traps, and discarded space: Manipulating Spacing. + (line 53) +* traps, and diversions: Page Location Traps. (line 166) +* traps, blank line: Blank Line Traps. (line 6) +* traps, diversion: Diversion Traps. (line 6) +* traps, dumping ('ptr'): Debugging. (line 81) +* traps, end-of-input: End-of-input Traps. (line 6) +* traps, input line: Input Line Traps. (line 6) +* traps, input line, and interrupted lines ('itc'): Input Line Traps. + (line 24) +* traps, leading spaces: Leading Spaces Traps. + (line 6) +* traps, page location: Page Location Traps. (line 6) +* traps, sprung by 'bp' request ('.pe'): Page Location Traps. (line 143) +* 'trf' request, and copy-in mode: I/O. (line 50) +* 'trf' request, and invalid characters: I/O. (line 73) +* 'trf' request, causing implicit linebreak: Manipulating Filling and Adjusting. + (line 6) +* 'trin' request, and 'asciify': Diversions. (line 195) +* troff mode: Troff and Nroff Mode. + (line 6) +* troff output: gtroff Output. (line 16) +* truncated vertical space register ('.trunc'): Page Location Traps. + (line 131) +* TTY, conditional output for: Operators in Conditionals. + (line 14) +* tutorial for macro users: Tutorial for Macro Users. + (line 6) +* type size: Sizes. (line 6) +* type size registers ('.s', '.ps'): Changing Type Sizes. (line 20) +* type sizes, changing ('ps', '\s'): Changing Type Sizes. (line 11) +* type sizes, fractional: Fractional Type Sizes. + (line 6) +* type sizes, fractional <1>: Implementation Differences. + (line 76) +* 'u' unit: Measurements. (line 6) +* 'uf' request, and font styles: Font Families. (line 59) +* 'ul' glyph, and 'cflags': Using Symbols. (line 265) +* 'ul' request, and font translations: Changing Fonts. (line 55) +* Ultrix-specific 'man' macros: Optional man extensions. + (line 30) +* unary operators: Expressions. (line 21) +* unbreakable space: Page Motions. (line 114) +* undefined identifiers: Identifiers. (line 79) +* undefined request: Comments. (line 25) +* underline font ('uf'): Artificial Fonts. (line 90) +* underlining ('ul'): Artificial Fonts. (line 64) +* underlining, continuous ('cu'): Artificial Fonts. (line 86) +* underscore glyph ('\[ru]'): Drawing Requests. (line 28) +* unformatting diversions ('asciify'): Diversions. (line 195) +* unformatting horizontal space: Strings. (line 157) +* Unicode: Identifiers. (line 15) +* Unicode <1>: Using Symbols. (line 201) +* unit, 'c': Measurements. (line 27) +* unit, 'f': Measurements. (line 43) +* unit, 'f', and colors: Colors. (line 36) +* unit, 'i': Measurements. (line 22) +* unit, 'm': Measurements. (line 50) +* unit, 'M': Measurements. (line 62) +* unit, 'n': Measurements. (line 55) +* unit, 'p': Measurements. (line 30) +* unit, 'P': Measurements. (line 34) +* unit, 's': Measurements. (line 40) +* unit, 's' <1>: Fractional Type Sizes. + (line 6) +* unit, 'u': Measurements. (line 6) +* unit, 'v': Measurements. (line 58) +* unit, 'z': Measurements. (line 40) +* unit, 'z' <1>: Fractional Type Sizes. + (line 6) +* units of measurement: Measurements. (line 6) +* units, default: Default Units. (line 6) +* unnamed fill colors ('\D'F...''): Drawing Requests. (line 216) +* unnamed glyphs: Using Symbols. (line 212) +* unnamed glyphs, accessing with '\N': Font File Format. (line 51) +* unsafe mode: Groff Options. (line 292) +* unsafe mode <1>: Macro Directories. (line 21) +* unsafe mode <2>: Built-in Registers. (line 23) +* unsafe mode <3>: I/O. (line 32) +* unsafe mode <4>: I/O. (line 147) +* unsafe mode <5>: I/O. (line 168) +* unsafe mode <6>: I/O. (line 206) +* user's macro tutorial: Tutorial for Macro Users. + (line 6) +* user's tutorial for macros: Tutorial for Macro Users. + (line 6) +* using symbols: Using Symbols. (line 6) +* utf-8, output encoding: Groff Options. (line 259) +* 'v' unit: Measurements. (line 58) +* valid numeric expression: Expressions. (line 83) +* value, incrementing without changing the register: Auto-increment. + (line 52) +* variables in environment: Environment. (line 6) +* version number, major, register ('.x'): Built-in Registers. (line 88) +* version number, minor, register ('.y'): Built-in Registers. (line 92) +* vertical line drawing ('\L'): Drawing Requests. (line 50) +* vertical line spacing register ('.v'): Changing Type Sizes. (line 88) +* vertical line spacing, changing ('vs'): Changing Type Sizes. + (line 88) +* vertical line spacing, effective value: Changing Type Sizes. + (line 106) +* vertical motion ('\v'): Page Motions. (line 78) +* vertical page location, marking ('mk'): Page Motions. (line 11) +* vertical page location, returning to marked ('rt'): Page Motions. + (line 11) +* vertical position in diversion register ('.d'): Diversions. (line 69) +* vertical position trap enable register ('.vpt'): Page Location Traps. + (line 18) +* vertical position traps, enabling ('vpt'): Page Location Traps. + (line 18) +* vertical position, current ('nl'): Page Control. (line 67) +* vertical resolution: DESC File Format. (line 135) +* vertical resolution register ('.V'): Built-in Registers. (line 28) +* vertical space unit ('v'): Measurements. (line 58) +* vertical spacing: Sizes. (line 6) +* warnings: Debugging. (line 149) +* warnings <1>: Warnings. (line 6) +* warnings, level ('warn'): Debugging. (line 155) +* what is 'groff'?: What Is groff?. (line 6) +* while: while. (line 6) +* 'while' request, and font translations: Changing Fonts. (line 55) +* 'while' request, and the '!' operator: Expressions. (line 21) +* 'while' request, confusing with 'br': while. (line 68) +* 'while' request, operators to use with: Operators in Conditionals. + (line 6) +* whitespace characters: Identifiers. (line 10) +* width escape ('\w'): Page Motions. (line 152) +* width, of last glyph ('.w'): Environments. (line 95) +* word space size register ('.ss'): Manipulating Filling and Adjusting. + (line 151) +* 'write' request, and copy-in mode: I/O. (line 212) +* 'writec' request, and copy-in mode: I/O. (line 212) +* 'writem' request, and copy-in mode: I/O. (line 225) +* writing macros: Writing Macros. (line 6) +* writing to file ('write', 'writec'): I/O. (line 212) +* year, current, register ('year', 'yr'): Built-in Registers. (line 54) +* 'z' unit: Measurements. (line 40) +* 'z' unit <1>: Fractional Type Sizes. + (line 6) +* zero width space character ('\&'): Requests. (line 47) +* zero width space character ('\&') <1>: Ligatures and Kerning. + (line 47) +* zero width space character ('\&') <2>: Drawing Requests. (line 32) +* zero-width printing ('\z', '\Z'): Page Motions. (line 220) +* zero-width printing ('\z', '\Z') <1>: Page Motions. (line 224) +* zoom factor of a font ('fzoom'): Changing Fonts. (line 71) + Binärdateien groff-1.22.2/doc/groff.info-3 and groff-1.22.3/doc/groff.info-3 sind verschieden. diff -ruN groff-1.22.2/doc/groff.texinfo groff-1.22.3/doc/groff.texinfo --- groff-1.22.2/doc/groff.texinfo 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/groff.texinfo 2014-11-04 09:38:35.560519809 +0100 @@ -24,17 +24,17 @@ @copying -This manual documents GNU @code{troff} version 1.22.2. +This manual documents GNU @code{troff} version 1.22.3. -Copyright @copyright{} 1994-2013 Free Software Foundation, Inc. +Copyright @copyright{} 1994-2014 Free Software Foundation, Inc. @quotation 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 no -Invariant Sections, with the Front-Cover texts being `A GNU Manual,'' +Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is -included in the section entitled `GNU Free Documentation License.'' +included in the section entitled ``GNU Free Documentation License.'' (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in @@ -104,6 +104,10 @@ @c @endDef... @c @c The above is valid for texinfo 4.0f and above. +@c +@c By default, only the first item generates an index entry. To +@c override this, use a variant with a trailing `x' (like +@c `@DefmacItemx'). @c a dummy macro to assure the `@def...' @@ -131,12 +135,23 @@ @macro DefreqItem{name, arg} @deffnx Request @t{.\name\} \arg\ @defdummy +@c +@end macro + +@macro DefreqItemx{name, arg} +@deffnx Request @t{.\name\} \arg\ +@defdummy @rqindex \name\ @c @end macro @macro DefreqListEnd{name, arg} @deffnx Request @t{.\name\} \arg\ +@c +@end macro + +@macro DefreqListEndx{name, arg} +@deffnx Request @t{.\name\} \arg\ @rqindex \name\ @c @end macro @@ -164,12 +179,23 @@ @macro DefescItem{name, delimI, arg, delimII} @deffnx Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\} @defdummy +@c +@end macro + +@macro DefescItemx{name, delimI, arg, delimII} +@deffnx Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\} +@defdummy @esindex \name\ @c @end macro @macro DefescListEnd{name, delimI, arg, delimII} @deffnx Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\} +@c +@end macro + +@macro DefescListEndx{name, delimI, arg, delimII} +@deffnx Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\} @esindex \name\ @c @end macro @@ -197,12 +223,23 @@ @macro DefregItem{name} @deffnx Register @t{\\n[\name\]} @defdummy +@c +@end macro + +@macro DefregItemx{name} +@deffnx Register @t{\\n[\name\]} +@defdummy @vindex \name\ @c @end macro @macro DefregListEnd{name} @deffnx Register @t{\\n[\name\]} +@c +@end macro + +@macro DefregListEndx{name} +@deffnx Register @t{\\n[\name\]} @vindex \name\ @c @end macro @@ -230,12 +267,23 @@ @macro DefmpregItem{name, package} @deffnx Register @t{\\n[\name\]} @defdummy +@c +@end macro + +@macro DefmpregItemx{name, package} +@deffnx Register @t{\\n[\name\]} +@defdummy @vindex \name\ @r{[}\package\@r{]} @c @end macro @macro DefmpregListEnd{name, package} @deffnx Register @t{\\n[\name\]} +@c +@end macro + +@macro DefmpregListEndx{name, package} +@deffnx Register @t{\\n[\name\]} @vindex \name\ @r{[}\package\@r{]} @c @end macro @@ -263,12 +311,23 @@ @macro DefmacItem{name, arg, package} @defmacx @t{.\name\} \arg\ @defdummy +@c +@end macro + +@macro DefmacItemx{name, arg, package} +@defmacx @t{.\name\} \arg\ +@defdummy @maindex \name\ @r{[}\package\@r{]} @c @end macro @macro DefmacListEnd{name, arg, package} @defmacx @t{.\name\} \arg\ +@c +@end macro + +@macro DefmacListEndx{name, arg, package} +@defmacx @t{.\name\} \arg\ @maindex \name\ @r{[}\package\@r{]} @c @end macro @@ -296,12 +355,23 @@ @macro DefstrItem{name, package} @deffnx String @t{\\*[\name\]} @defdummy +@c +@end macro + +@macro DefstrItemx{name, package} +@deffnx String @t{\\*[\name\]} +@defdummy @stindex \name\ @r{[}\package\@r{]} @c @end macro @macro DefstrListEnd{name, package} @deffnx String @t{\\*[\name\]} +@c +@end macro + +@macro DefstrListEndx{name, package} +@deffnx String @t{\\*[\name\]} @stindex \name\ @r{[}\package\@r{]} @c @end macro @@ -358,28 +428,21 @@ @c a <= sign @c -@c A value defined with @set is embedded into three group levels if -@c called with @value, so we need seven \aftergroup to put \le outside -@c of the groups -- this is necessary to get proper mathematical -@c spacing. +@c Since expansion of macros has changed between texinfo 4.x and 5.x, +@c we can't define a macro but have to use @value directly. @tex -\gdef\LEmacro{\aftergroup\aftergroup\aftergroup\aftergroup - \aftergroup\aftergroup\aftergroup\le} +\gdef\LE{\le} @end tex @iftex -@set LEmacro @LEmacro +@set LE @LE @end iftex @ifnottex -@set LEmacro <= +@set LE <= @end ifnottex -@macro LE -@value{LEmacro} -@end macro - @c Special care is required with parentheses, brackets, and braces: @c @@ -481,8 +544,8 @@ @titlepage @title groff @subtitle The GNU implementation of @code{troff} -@subtitle Edition 1.22.2 -@subtitle Spring 2013 +@subtitle Edition 1.22.3 +@subtitle Autumn 2014 @author by Trent A.@tie{}Fisher @author and Werner Lemberg (@email{bug-groff@@gnu.org}) @@ -653,10 +716,10 @@ With @code{troff} came @code{nroff} (they were actually the same program except for some @samp{#ifdef}s), which was for producing output for line printers and character terminals. It understood everything @code{troff} -did, and ignored the commands which were not applicable (e.g.@: font +did, and ignored the commands that were not applicable (e.g.@: font changes). -Since there are several things which cannot be done easily in +Since there are several things that cannot be done easily in @code{troff}, work on several preprocessors began. These programs would transform certain parts of a document into @code{troff}, which made a very natural use of pipes in @acronym{UNIX}. @@ -670,7 +733,7 @@ Unfortunately, Ossanna's @code{troff} was written in @w{PDP-11} assembly language and produced output specifically for the CAT phototypesetter. He rewrote it in C, although it was now 7000@tie{}lines of uncommented -code and still dependent on the CAT. As the CAT became less common, and +code and still dependent on the CAT@. As the CAT became less common, and was no longer supported by the manufacturer, the need to make it support other devices became a priority. However, before this could be done, Ossanna died by a severe heart attack in a hospital while recovering @@ -679,7 +742,7 @@ @pindex ditroff @cindex @code{ditroff}, the program So, Brian Kernighan took on the task of rewriting @code{troff}. The -newly rewritten version produced device independent code which was very +newly rewritten version produced device independent code that was very easy for postprocessors to read and translate to the appropriate printer codes. Also, this new version of @code{troff} (called @code{ditroff} for ``device independent @code{troff}'') had several extensions, which @@ -706,7 +769,7 @@ @item Postprocessors for character devices, @sc{PostScript}, @TeX{} DVI, and X@tie{}Windows. GNU @code{troff} also eliminated the need for a -separate @code{nroff} program with a postprocessor which would produce +separate @code{nroff} program with a postprocessor that would produce @acronym{ASCII} output. @item @@ -714,7 +777,7 @@ @file{man} macros. @end itemize -Also, a front-end was included which could construct the, sometimes +Also, a front-end was included that could construct the, sometimes painfully long, pipelines required for all the post- and preprocessors. Development of GNU @code{troff} progressed rapidly, and saw the @@ -828,7 +891,7 @@ Although @code{groff} provides most functions needed to format a document, some operations would be unwieldy (e.g.@: to draw pictures). -Therefore, programs called @dfn{preprocessors} were written which +Therefore, programs called @dfn{preprocessors} were written that understand their own language and produce the necessary @code{groff} operations. These preprocessors are able to differentiate their own input from the rest of the document via markers. @@ -844,14 +907,14 @@ (@code{tbl}), typesetting equations (@code{eqn}), drawing pictures (@code{pic} and @code{grn}), processing bibliographies (@code{refer}), and drawing chemical structures (@code{chem}). An -associated program which is useful when dealing with preprocessors is +associated program that is useful when dealing with preprocessors is @code{soelim}. A free implementation of @code{grap}, a preprocessor for drawing graphs, can be obtained as an extra package; @code{groff} can use @code{grap} also. -Unique to @code{groff} is the @code{preconv} preprocessor which enables +Unique to @code{groff} is the @code{preconv} preprocessor that enables @code{groff} to handle documents in various input encodings. There are other preprocessors in existence, but, unfortunately, no free @@ -867,7 +930,7 @@ @cindex output devices @cindex devices for output -@code{groff} actually produces device independent code which may be fed +@code{groff} actually produces device independent code that may be fed into a postprocessor to produce output for a particular device. Currently, @code{groff} has postprocessors for @sc{PostScript} devices, character terminals, X@tie{}Windows (for previewing), @TeX{} DVI format, @@ -917,7 +980,7 @@ In this document, we consequently say @samp{gtroff} when talking about the GNU @code{troff} program. All other implementations of @code{troff} -are called @acronym{AT&T} @code{troff} which is the common origin of all +are called @acronym{AT&T} @code{troff}, which is the common origin of all @code{troff} derivates (with more or less compatible changes). Similarly, we say @samp{gpic}, @samp{geqn}, etc. @@ -971,7 +1034,7 @@ groff [ -abceghijklpstvzCEGNRSUVXZ ] [ -d@var{cs} ] [ -D@var{arg} ] [ -f@var{fam} ] [ -F@var{dir} ] [ -I@var{dir} ] [ -K@var{arg} ] [ -L@var{arg} ] [ -m@var{name} ] [ -M@var{dir} ] [ -n@var{num} ] - [ -o@var{list} ] [ -P@var{arg} ] [ -r@var{cn} ] [ -T@var{def} ] + [ -o@var{list} ] [ -P@var{arg} ] [ -r@var{cn} ] [ -T@var{dev} ] [ -w@var{name} ] [ -W@var{name} ] [ @var{files}@dots{} ] @endExample @@ -1168,7 +1231,7 @@ @item -R Preprocess with @code{grefer}. No mechanism is provided for passing arguments to @code{grefer} because most @code{grefer} options have -equivalent commands which can be included in the file. @xref{grefer}, +equivalent commands that can be included in the file. @xref{grefer}, for more details. @pindex troffrc @@ -1243,7 +1306,7 @@ @cindex encoding, output, @w{utf-8} @cindex @w{utf-8}, output encoding @cindex output encoding, @w{utf-8} -For typewriter-like devices which use the Unicode (ISO@tie{}10646) +For typewriter-like devices that use the Unicode (ISO@tie{}10646) character set with @w{UTF-8} encoding. @item cp1047 @@ -1254,7 +1317,7 @@ @cindex cp1047, output encoding @cindex output encoding, cp1047 @cindex IBM cp1047 output encoding -For typewriter-like devices which use the @acronym{EBCDIC} encoding IBM +For typewriter-like devices that use the @acronym{EBCDIC} encoding IBM cp1047. @item lj4 @@ -1333,7 +1396,7 @@ @cindex variables in environment There are also several environment variables (of the operating system, -not within @code{gtroff}) which can modify the behavior of @code{groff}. +not within @code{gtroff}) that can modify the behavior of @code{groff}. @table @code @item GROFF_BIN_PATH @@ -1458,11 +1521,11 @@ @Example /usr/local/lib/groff/site-tmac /usr/local/share/groff/site-tmac -/usr/local/share/groff/1.22.2/tmac +/usr/local/share/groff/1.22.3/tmac @endExample @noindent -assuming that the version of @code{groff} is 1.22.2, and the +assuming that the version of @code{groff} is 1.22.3, and the installation prefix was @file{/usr/local}. It is possible to fine-tune those directories during the installation process. @end itemize @@ -1488,7 +1551,7 @@ @cindex font path @cindex path, for font files -All font files are kept in the @dfn{font directories} which constitute +All font files are kept in the @dfn{font directories}, which constitute the @dfn{font path}. The file search functions always append the directory @code{dev}@var{name}, where @var{name} is the name of the output device. Assuming, say, DVI output, and @file{/foo/bar} as a font @@ -1515,11 +1578,11 @@ @Example /usr/local/share/groff/site-font -/usr/local/share/groff/1.22.2/font +/usr/local/share/groff/1.22.3/font @endExample @noindent -assuming that the version of @code{groff} is 1.22.2, and the +assuming that the version of @code{groff} is 1.22.3, and the installation prefix was @file{/usr/local}. It is possible to fine-tune those directories during the installation process. @end itemize @@ -1543,13 +1606,13 @@ output devices also have a command line option @option{-p} to override the default paper size and option @option{-l} to use landscape orientation. @xref{DESC File Format}, for a description of the -@code{papersize} keyword which takes the same argument as @option{-p}. +@code{papersize} keyword, which takes the same argument as @option{-p}. @pindex papersize.tmac @pindex troffrc A convenient shorthand to set a particular paper size for @code{gtroff} is command line option @option{-dpaper=@var{size}}. This defines string -@code{paper} which is processed in file @file{papersize.tmac} (loaded in +@code{paper}, which is processed in file @file{papersize.tmac} (loaded in the start-up file @file{troffrc} by default). Possible values for @var{size} are the same as the predefined values for the @code{papersize} keyword (but only in lowercase) except @@ -1711,7 +1774,7 @@ Commands}. The word @dfn{argument} is used in this chapter to mean a word or number -which appears on the same line as a request, and which modifies the +that appears on the same line as a request, and which modifies the meaning of that request. For example, the request @Example @@ -1727,7 +1790,7 @@ @noindent spaces four lines. The number@tie{}4 is an argument to the @code{sp} -request which says to space four lines instead of one. Arguments are +request, which says to space four lines instead of one. Arguments are separated from the request and from each other by spaces (@emph{no} tabs). More details on this can be found in @ref{Request and Macro Arguments}. @@ -1763,7 +1826,7 @@ input lines and input lines beginning with a space. Not all input lines are text to be formatted. Some input lines are -requests which describe how to format the text. Requests always have a +requests that describe how to format the text. Requests always have a period (@samp{.}) or an apostrophe (@samp{'}) as the first character of the input line. @@ -1862,11 +1925,11 @@ @cindex features, common @code{gtroff} provides very low-level operations for formatting a -document. There are many common routine operations which are done in +document. There are many common routine operations that are done in all documents. These common operations are written into @dfn{macros} and collected into a @dfn{macro package}. -All macro packages provide certain common capabilities which fall into +All macro packages provide certain common capabilities that fall into the following categories. @menu @@ -1906,7 +1969,7 @@ @endExample @noindent -And there are also indented paragraphs which begin with a tag or label +And there are also indented paragraphs, which begin with a tag or label at the margin and the remaining text indented. @Example @@ -1914,6 +1977,7 @@ line of the resulting paragraph lines up with the other lines in the paragraph. @endExample + @Example longlabel This paragraph had a long label. The first @@ -1980,7 +2044,7 @@ @cindex quotes, major @cindex major quotes -@dfn{Major quotes} are quotes which are several lines long, and hence +@dfn{Major quotes} are quotes that are several lines long, and hence are set in from the rest of the text without quote marks around them. @cindex list @@ -1990,7 +2054,7 @@ used in this paper. @cindex keep -A @dfn{keep} is a display of lines which are kept on a single page if +A @dfn{keep} is a display of lines that are kept on a single page if possible. An example for a keep might be a diagram. Keeps differ from lists in that lists may be broken over a page boundary whereas keeps are not. @@ -1998,7 +2062,7 @@ @cindex keep, floating @cindex floating keep @dfn{Floating keeps} move relative to the text. Hence, they are good -for things which are referred to by name, such as ``See figure@tie{}3''. +for things that are referred to by name, such as ``See figure@tie{}3''. A floating keep appears at the bottom of the current page if it fits; otherwise, it appears at the top of the next page. Meanwhile, the surrounding text `flows' around the keep, thus leaving no blank areas. @@ -2020,7 +2084,7 @@ appear (for example) at the end of each chapter, as is the convention in some disciplines. -Most macro packages which supply this functionality also supply a means +Most macro packages that supply this functionality also supply a means of automatically numbering either type of annotation. @c --------------------------------------------------------------------- @@ -2235,7 +2299,7 @@ @option{-rLL=@var{length}} option, or an equivalent @samp{.nr LL @var{length}} request, in preference to such a @samp{.ll @var{length}} request. In particular, note that in nroff mode, the request @samp{.ll -65n}, (with any @var{length} expression which evaluates equal to +65n}, (with any @var{length} expression that evaluates equal to 65@dmn{n}, i.e., the formatter's default line length in nroff mode), does @emph{not} set the line length to 65@dmn{n} (it is adjusted to the @code{man} macro package's default setting of 78@dmn{n}), whereas the @@ -2273,7 +2337,7 @@ @pindex man.local This section describes the available macros for manual pages. For further customization, put additional macros and requests into the file -@file{man.local} which is loaded immediately after the @file{man} +@file{man.local}, which is loaded immediately after the @file{man} package. @Defmac {TH, title section [@Var{extra1} [@Var{extra2} [@Var{extra3}]]], man} @@ -2339,8 +2403,8 @@ @endDefmac @DefmacList {LP, , man} -@DefmacItem {PP, , man} -@DefmacListEnd {P, , man} +@DefmacItemx {PP, , man} +@DefmacListEndx {P, , man} These macros are mutual aliases. Any of them causes a line break at the current position, followed by a vertical space downwards by the amount specified by the @code{PD} macro. The font size and shape are reset to @@ -2501,7 +2565,7 @@ @cindex @code{man} macros, default indentation @cindex default indentation [@code{man}] The default indentation is 7.2@dmn{n} in troff mode and 7@dmn{n} in -nroff mode except for @code{grohtml} which ignores indentation. +nroff mode except for @code{grohtml}, which ignores indentation. @Defmac {DT, , man} @cindex tab stops [@code{man}] @@ -2594,7 +2658,7 @@ @endDefstr @DefstrList {lq, man} -@DefstrListEnd {rq, man} +@DefstrListEndx {rq, man} @cindex @code{lq} glyph, and @code{lq} string [@code{man}] @cindex @code{rq} glyph, and @code{rq} string [@code{man}] Left and right quote. This is equal to @code{\(lq} and @code{\(rq}, @@ -3034,7 +3098,7 @@ @endDefmpreg @Defmpreg {PORPHANS, ms} -Defines the minimum number of initial lines of any paragraph which +Defines the minimum number of initial lines of any paragraph that should be kept together, to avoid orphan lines at the bottom of a page. If a new paragraph is started close to the bottom of a page, and there is insufficient space to accommodate @code{PORPHANS} lines before an @@ -3047,7 +3111,7 @@ @endDefmpreg @Defmpreg {HORPHANS, ms} -Defines the minimum number of lines of the following paragraph which +Defines the minimum number of lines of the following paragraph that should be kept together with any section heading introduced by the @code{NH} or @code{SH} macros. If a section heading is placed close to the bottom of a page, and there is insufficient space to accommodate @@ -3369,8 +3433,8 @@ @endDefmac @DefstrList {SN, ms} -@DefstrItem {SN-DOT, ms} -@DefstrListEnd {SN-NO-DOT, ms} +@DefstrItemx {SN-DOT, ms} +@DefstrListEndx {SN-NO-DOT, ms} After invocation of @code{NH}, the assigned section number is made available in the strings @code{SN-DOT} (as it appears in a printed section heading with default formatting, followed by a terminating @@ -3391,6 +3455,7 @@ section headings, by defining an appropriate alias for the string @code{SN-STYLE}. The default style, in which the printed section number is followed by a terminating period, is obtained by defining the alias + @Example .als SN-STYLE SN-DOT @endExample @@ -3398,6 +3463,7 @@ @noindent If you prefer to omit the terminating period, from section numbers appearing in numbered section headings, you may define the alias + @Example .als SN-STYLE SN-NO-DOT @endExample @@ -3504,7 +3570,7 @@ @endDefmac @DefstrList {@Lbrace{}, ms} -@DefstrListEnd {@Rbrace{}, ms} +@DefstrListEndx {@Rbrace{}, ms} Text enclosed with @code{\*@{} and @code{\*@}} is printed as a superscript. @endDefstr @@ -3699,7 +3765,7 @@ nested lists. @DefmacList {RS, , ms} -@DefmacListEnd {RE, , ms} +@DefmacListEndx {RE, , ms} These macros begin and end an indented section. The @code{PI} register controls the amount of indentation, allowing the indented text to line up under hanging and indented paragraphs. @@ -3739,8 +3805,8 @@ @dfn{kept} on a single page, or allowed to break across pages. @DefmacList {DS, @t{L}, ms} -@DefmacItem {LD, , ms} -@DefmacListEnd {DE, , ms} +@DefmacItemx {LD, , ms} +@DefmacListEndx {DE, , ms} Left-justified display. The @samp{.DS L} call generates a page break, if necessary, to keep the entire display on one page. The @code{LD} macro allows the display to break across pages. The @code{DE} macro @@ -3748,8 +3814,8 @@ @endDefmac @DefmacList {DS, @t{I}, ms} -@DefmacItem {ID, , ms} -@DefmacListEnd {DE, , ms} +@DefmacItemx {ID, , ms} +@DefmacListEndx {DE, , ms} Indents the display as defined by the @code{DI} register. The @samp{.DS I} call generates a page break, if necessary, to keep the entire display on one page. The @code{ID} macro allows the display to break across @@ -3757,8 +3823,8 @@ @endDefmac @DefmacList {DS, @t{B}, ms} -@DefmacItem {BD, , ms} -@DefmacListEnd {DE, , ms} +@DefmacItemx {BD, , ms} +@DefmacListEndx {DE, , ms} Sets a block-centered display: the entire display is left-justified, but indented so that the longest line in the display is centered on the page. The @samp{.DS B} call generates a page break, if necessary, to @@ -3767,8 +3833,8 @@ @endDefmac @DefmacList {DS, @t{C}, ms} -@DefmacItem {CD, , ms} -@DefmacListEnd {DE, , ms} +@DefmacItemx {CD, , ms} +@DefmacListEndx {DE, , ms} Sets a centered display: each line in the display is centered. The @samp{.DS C} call generates a page break, if necessary, to keep the entire display on one page. The @code{CD} macro allows the display to @@ -3776,8 +3842,8 @@ @endDefmac @DefmacList {DS, @t{R}, ms} -@DefmacItem {RD, , ms} -@DefmacListEnd {DE, , ms} +@DefmacItemx {RD, , ms} +@DefmacListEndx {DE, , ms} Right-justifies each line in the display. The @samp{.DS R} call generates a page break, if necessary, to keep the entire display on one page. The @code{RD} macro allows the display to break across pages. @@ -3785,13 +3851,13 @@ @endDefmac @DefmacList {Ds, , ms} -@DefmacListEnd {De, , ms} +@DefmacListEndx {De, , ms} These two macros were formerly provided as aliases for @code{DS} and @code{DE}, respectively. They have been removed, and should no longer be used. The original implementations of @code{DS} and @code{DE} are -retained, and should be used instead. X11 documents which actually use +retained, and should be used instead. X11 documents that actually use @code{Ds} and @code{De} always load a specific macro file from the X11 -distribution (@file{macros.t}) which provides proper definitions for the +distribution (@file{macros.t}) that provides proper definitions for the two macros. @endDefmac @@ -3802,13 +3868,13 @@ macros for this purpose. @DefmacList {KS, , ms} -@DefmacListEnd {KE, , ms} +@DefmacListEndx {KE, , ms} The @code{KS} macro begins a block of text to be kept on a single page, and the @code{KE} macro ends the block. @endDefmac @DefmacList {KF, , ms} -@DefmacListEnd {KE, , ms} +@DefmacListEndx {KE, , ms} Specifies a @dfn{floating keep}; if the keep cannot fit on the current page, @code{groff} holds the contents of the keep and allows text following the keep (in the source file) to fill in the remainder of the @@ -3826,7 +3892,7 @@ a display). @DefmacList {B1, , ms} -@DefmacListEnd {B2, , ms} +@DefmacListEndx {B2, , ms} Marks the beginning and ending of text that is to have a box drawn around it. The @code{B1} macro begins the box; the @code{B2} macro ends it. Text in the box is automatically placed in a diversion (keep). @@ -3855,7 +3921,7 @@ as follows. @DefmacList {TS, [@code{H}], ms} -@DefmacListEnd {TE, , ms} +@DefmacListEndx {TE, , ms} Denotes a table, to be processed by the @code{tbl} preprocessor. The optional argument@tie{}@code{H} to @code{TS} instructs @code{groff} to create a running header with the information up to the @code{TH} macro. @@ -3865,7 +3931,7 @@ @endDefmac @DefmacList {PS, , ms} -@DefmacListEnd {PE, , ms} +@DefmacListEndx {PE, , ms} Denotes a graphic, to be processed by the @code{pic} preprocessor. You can create a @code{pic} file by hand, using the @acronym{AT&T} @code{pic} manual available on the Web as a reference, or by using a @@ -3873,7 +3939,7 @@ @endDefmac @DefmacList {EQ, [@Var{align}], ms} -@DefmacListEnd {EN, , ms} +@DefmacListEndx {EN, , ms} Denotes an equation, to be processed by the @code{eqn} preprocessor. The optional @var{align} argument can be @code{C}, @code{L}, or@tie{}@code{I} to center (the default), left-justify, or indent the @@ -3881,7 +3947,7 @@ @endDefmac @DefmacList {[, , ms} -@DefmacListEnd {], , ms} +@DefmacListEndx {], , ms} Denotes a reference, to be processed by the @code{refer} preprocessor. The GNU @cite{refer(1)} man page provides a comprehensive reference to the preprocessor and the format of the bibliographic database. @@ -3931,7 +3997,7 @@ @endDefesc @DefmacList {FS, , ms} -@DefmacListEnd {FE, , ms} +@DefmacListEndx {FE, , ms} Specifies the text of the footnote. The default action is to create a numbered footnote; you can create a symbolic footnote by specifying a @dfn{mark} glyph (such as @code{\[dg]} for the dagger glyph) in the body @@ -3988,14 +4054,14 @@ the following strings: @DefstrList {LH, ms} -@DefstrItem {CH, ms} -@DefstrListEnd {RH, ms} +@DefstrItemx {CH, ms} +@DefstrListEndx {RH, ms} Sets the left, center, and right headers. @endDefstr @DefstrList {LF, ms} -@DefstrItem {CF, ms} -@DefstrListEnd {RF, ms} +@DefstrItemx {CF, ms} +@DefstrListEndx {RF, ms} Sets the left, center, and right footers. @endDefstr @@ -4003,9 +4069,9 @@ odd pages, use the following macros: @DefmacList {OH, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} -@DefmacItem {EH, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} -@DefmacItem {OF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} -@DefmacListEnd {EF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} +@DefmacItemx {EH, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} +@DefmacItemx {OF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} +@DefmacListEndx {EF, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}, ms} The @code{OH} and @code{EH} macros define headers for the odd and even pages; the @code{OF} and @code{EF} macros define footers for the odd and even pages. This is more flexible than defining the individual strings. @@ -4018,8 +4084,8 @@ macros: @DefmacList {PT,, ms} -@DefmacItem {HD,, ms} -@DefmacListEnd {BT,, ms} +@DefmacItemx {HD,, ms} +@DefmacListEndx {BT,, ms} The @code{PT} macro defines a custom header; the @code{BT} macro defines a custom footer. These macros must handle odd/even/first page differences if necessary. @@ -4078,8 +4144,8 @@ those headings wrapped in @code{XS} and @code{XE} macros. @DefmacList {XS, [@Var{page}], ms} -@DefmacItem {XA, [@Var{page}], ms} -@DefmacListEnd {XE, , ms} +@DefmacItemx {XA, [@Var{page}], ms} +@DefmacListEndx {XE, , ms} These macros define a table of contents or an individual entry in the table of contents, depending on their use. The macros are very simple; they cannot indent a heading based on its level. The easiest way to @@ -4180,17 +4246,17 @@ @endDefstr @DefstrList {MONTH1, ms} -@DefstrItem {MONTH2, ms} -@DefstrItem {MONTH3, ms} -@DefstrItem {MONTH4, ms} -@DefstrItem {MONTH5, ms} -@DefstrItem {MONTH6, ms} -@DefstrItem {MONTH7, ms} -@DefstrItem {MONTH8, ms} -@DefstrItem {MONTH9, ms} -@DefstrItem {MONTH10, ms} -@DefstrItem {MONTH11, ms} -@DefstrListEnd {MONTH12, ms} +@DefstrItemx {MONTH2, ms} +@DefstrItemx {MONTH3, ms} +@DefstrItemx {MONTH4, ms} +@DefstrItemx {MONTH5, ms} +@DefstrItemx {MONTH6, ms} +@DefstrItemx {MONTH7, ms} +@DefstrItemx {MONTH8, ms} +@DefstrItemx {MONTH9, ms} +@DefstrItemx {MONTH10, ms} +@DefstrItemx {MONTH11, ms} +@DefstrListEndx {MONTH12, ms} Prints the full name of the month in dates. The default is @samp{January}, @samp{February}, etc. @endDefstr @@ -4203,7 +4269,7 @@ @endDefstr @DefstrList {Q, ms} -@DefstrListEnd {U, ms} +@DefstrListEndx {U, ms} Prints typographer's quotes in troff, and plain quotes in nroff. @code{\*Q} is the left quote and @code{\*U} is the right quote. @endDefstr @@ -4224,11 +4290,11 @@ The following accent marks are available after invoking the @code{AM} macro: -@Defstr {\', ms} +@Defstr {', ms} Acute accent. @endDefstr -@Defstr {\`, ms} +@Defstr {`, ms} Grave accent. @endDefstr @@ -4723,6 +4789,7 @@ @cindex character, transparent @cindex @code{dg} glyph, at end of sentence @cindex @code{rq} glyph, at end of sentence +@cindex @code{cq} glyph, at end of sentence @cindex @code{"}, at end of sentence @cindex @code{'}, at end of sentence @cindex @code{)}, at end of sentence @@ -4730,7 +4797,8 @@ @cindex @code{*}, at end of sentence In addition, the following characters and symbols are treated transparently while handling end-of-sentence characters: @samp{"}, -@samp{'}, @samp{)}, @samp{]}, @samp{*}, @code{\[dg]}, and @code{\[rq]}. +@samp{'}, @samp{)}, @samp{]}, @samp{*}, @code{\[dg]}, @code{\[rq]}, and +@code{\[cq]}. See the @code{cflags} request in @ref{Using Symbols}, for more details. @@ -4914,15 +4982,15 @@ @noindent fails if you use the Euro character in the input. Usually, this -limitation is present only for devices which have a limited set of +limitation is present only for devices that have a limited set of output glyphs (e.g.@: @option{-Tascii} and @option{-Tlatin1}); for other -devices it is usually sufficient to install proper fonts which contain +devices it is usually sufficient to install proper fonts that contain the necessary glyphs. @pindex freeeuro.pfa @pindex ec.tmac Due to the importance of the Euro glyph in Europe, the groff package now -comes with a @sc{PostScript} font called @file{freeeuro.pfa} which +comes with a @sc{PostScript} font called @file{freeeuro.pfa}, which provides various glyph shapes for the Euro. In other words, @w{latin-9} encoding is supported for the @option{-Tps} device out of the box (@w{latin-2} isn't). @@ -4951,11 +5019,11 @@ specify various measurements. Most numeric parameters@footnote{those that specify vertical or horizontal motion or a type size} may have a @dfn{measurement unit} attached. These units are specified as a single -character which immediately follows the number or expression. Each of +character that immediately follows the number or expression. Each of these units are understood, by @code{gtroff}, to be a multiple of its @dfn{basic unit}. So, whenever a different measurement unit is specified @code{gtroff} converts this into its @dfn{basic units}. This -basic unit, represented by a @samp{u}, is a device dependent measurement +basic unit, represented by a @samp{u}, is a device dependent measurement, which is quite small, ranging from 1/75@dmn{th} to 1/72000@dmn{th} of an inch. The values may be given as fractional numbers; however, fractional basic units are always rounded to integers. @@ -5009,7 +5077,7 @@ The other measurements understood by @code{gtroff} depend on settings currently in effect in @code{gtroff}. These are very useful for -specifying measurements which should look proper with any size of text. +specifying measurements that should look proper with any size of text. @table @code @item m @@ -5070,7 +5138,7 @@ is assumed that 1@dmn{i} equals@tie{}240@dmn{u}, and 1@dmn{m} equals@tie{}10@dmn{p} (thus 1@dmn{m} equals@tie{}33@dmn{u}). The value 7@dmn{i}/2 is first handled as 7@dmn{i}/2@dmn{m}, then converted to -1680@dmn{u}/66@dmn{u} which is 25@dmn{u}, and this is approximately +1680@dmn{u}/66@dmn{u}, which is 25@dmn{u}, and this is approximately 0.1@dmn{i}. As can be seen, a scaling indicator after a closing parenthesis is simply ignored. @@ -5212,7 +5280,7 @@ @cindex @code{-}, and page motion @cindex motion operators @cindex operators, motion -For many requests which cause a motion on the page, the unary operators +For many requests that cause a motion on the page, the unary operators @samp{+} and @samp{-} work differently if leading an expression. They then indicate a motion relative to the current position (down or up, respectively). @@ -5307,7 +5375,7 @@ Currently, some of these reserved codepoints are used internally, thus making it non-trivial to extend @code{gtroff} to cover Unicode or other -character sets and encodings which use characters of these ranges. +character sets and encodings that use characters of these ranges. Note that invalid characters are removed before parsing; an identifier @code{foo}, followed by an invalid character, followed by @code{bar} is @@ -5327,7 +5395,7 @@ @cindex @code{]}, as part of an identifier @noindent Note that identifiers longer than two characters with a closing bracket -(@samp{]}) in its name can't be accessed with escape sequences which +(@samp{]}) in its name can't be accessed with escape sequences that expect an identifier as a parameter. For example, @samp{\[foo]]} accesses the glyph @samp{foo}, followed by @samp{]}, whereas @samp{\C'foo]'} really asks for glyph @samp{foo]}. @@ -5431,10 +5499,10 @@ implicit line breaking. In order to gain further functionality, @code{gtroff} allows commands to be embedded into the text, in two ways. -The first is a @dfn{request} which takes up an entire line, and does +The first is a @dfn{request} that takes up an entire line, and does some large-scale operation (e.g.@: break lines, start new pages). -The other is an @dfn{escape} which can be usually embedded anywhere in +The other is an @dfn{escape} that can be usually embedded anywhere in the text; most requests can accept it even as an argument. Escapes generally do more minor operations like sub- and superscripts, print a symbol, etc. @@ -5460,7 +5528,7 @@ quote (@samp{'}, the @dfn{no-break control character}) or a period (@samp{.}, the normal @dfn{control character}). These can be changed; see @ref{Character Translations}, for details. After this there may be -optional tabs or spaces followed by an identifier which is the name of +optional tabs or spaces followed by an identifier, which is the name of the request. This may be followed by any number of space-separated arguments (@emph{no} tabs here). @@ -5519,7 +5587,7 @@ character prevents this. @Defreg {.br} -A read-only number register which is set to@tie{}1 if a macro is called +A read-only number register, which is set to@tie{}1 if a macro is called with the normal control character (as defined with the @code{cc} request), and set to@tie{}0 otherwise. @@ -5564,7 +5632,7 @@ support this.} @cindex spaces, in a macro argument -An argument to a macro which is intended to contain spaces can either be +An argument to a macro that is intended to contain spaces can either be enclosed in double quotes, or have the spaces @dfn{escaped} with backslashes. This is @emph{not} true for requests. @@ -5585,13 +5653,13 @@ Mouse Problem}.@footnote{The last solution, i.e., using escaped spaces, is ``classical'' in the sense that it can be found in most @code{troff} documents. Nevertheless, it is not optimal in all situations, since -@w{@samp{\ }} inserts a fixed-width, non-breaking space character which +@w{@samp{\ }} inserts a fixed-width, non-breaking space character that can't stretch. @code{gtroff} provides a different command @code{\~} to insert a stretchable, non-breaking space.} @cindex @code{"}, in a macro argument @cindex double quote, in a macro argument -A double quote which isn't preceded by a space doesn't start a macro +A double quote that isn't preceded by a space doesn't start a macro argument. If not closing a string, it is printed literally. For example, @@ -5659,7 +5727,7 @@ @cindex macros @code{gtroff} has a @dfn{macro} facility for defining a series of lines -which can be invoked by name. They are called in the same manner as +that can be invoked by name. They are called in the same manner as requests -- arguments also may be passed basically in the same manner. @xref{Writing Macros}, and @ref{Request and Macro Arguments}. @@ -5671,11 +5739,11 @@ @cindex escapes Escapes may occur anywhere in the input to @code{gtroff}. They usually -begin with a backslash and are followed by a single character which +begin with a backslash and are followed by a single character, which indicates the function to be performed. The escape character can be changed; see @ref{Character Translations}. -Escape sequences which require an identifier as a parameter accept three +Escape sequences that require an identifier as a parameter accept three possible syntax forms. @itemize @bullet @@ -5722,7 +5790,7 @@ @cindex @code{\b}, possible quote characters @cindex @code{\X}, possible quote characters Note that the quote character can be replaced with any other character -which does not occur in the argument (even a newline or a space +that does not occur in the argument (even a newline or a space character) in the following escapes: @code{\o}, @code{\b}, and @code{\X}. This makes e.g. @@ -5927,7 +5995,7 @@ Test @endExample -To avoid this, it is common to start the line with @code{.\"} which +To avoid this, it is common to start the line with @code{.\"}, which causes the line to be treated as an undefined request and thus ignored completely. @@ -6034,7 +6102,7 @@ set to zero. @DefreqList {nr, ident value} -@DefescListEnd {\\R, ', ident value, '} +@DefescListEndx {\\R, ', ident value, '} Set number register @var{ident} to @var{value}. If @var{ident} doesn't exist, @code{gtroff} creates it. @@ -6054,7 +6122,7 @@ @endExample Note that the complete transparency of @code{\R} can cause surprising -effects if you use number registers like @code{.k} which get evaluated +effects if you use number registers like @code{.k}, which get evaluated at the time they are accessed. @Example @@ -6082,10 +6150,10 @@ In the first input line, since the @code{\R} escape leaves no traces, the check for the overfull line hasn't been done yet at the point where @code{\R} gets handled, and you get a value for the @code{.k} number -register which is even greater than the current line length. +register that is even greater than the current line length. In the second input line, the insertion of @code{\h'0'} to emit an -invisible zero-width space forces @code{troff} to check the line length +invisible zero-width space forces @code{troff} to check the line length, which in turn causes the start of a new output line. Now @code{.k} returns the expected value. @endDefreq @@ -6095,7 +6163,7 @@ @DefreqList {nr, ident @t{+}@Var{value}} @DefreqItem {nr, ident @t{-}@Var{value}} -@DefescItem {\\R, ', ident @t{+}value, '} +@DefescItemx {\\R, ', ident @t{+}value, '} @DefescListEnd {\\R, ', ident @t{-}value, '} Increment (decrement) register @var{ident} by @var{value}. @@ -6378,8 +6446,8 @@ @cindex built-in registers @cindex registers, built-in -The following lists some built-in registers which are not described -elsewhere in this manual. Any register which begins with a @samp{.} is +The following lists some built-in registers that are not described +elsewhere in this manual. Any register that begins with a @samp{.} is read-only. A complete listing of all built-in registers can be found in @ref{Register Index}. @@ -6576,7 +6644,7 @@ @item \*[.T] @stindex .T @cindex output device name string register (@code{.T}) -A single read-write string register which contains the current output +A single read-write string register that contains the current output device (for example, @samp{latin1} or @samp{ps}). This is the only string register defined by @code{gtroff}. @end table @@ -6631,7 +6699,7 @@ the @code{fi} request. @DefreqList {fi, } -@DefregListEnd {.u} +@DefregListEndx {.u} @cindex fill mode (@code{fi}) @cindex mode, fill (@code{fi}) Activate fill mode (which is the default). This request implicitly @@ -6659,7 +6727,7 @@ @endDefreq @DefreqList {ad, [@Var{mode}]} -@DefregListEnd {.j} +@DefregListEndx {.j} Set adjusting mode. Activation and deactivation of adjusting is done implicitly with calls @@ -6680,7 +6748,7 @@ @item c @cindex centered text @cindex @code{ce} request, difference to @samp{.ad@tie{}c} -Center filled text. This is different to the @code{ce} request which +Center filled text. This is different to the @code{ce} request, which only centers text without filling. @item b @@ -6752,7 +6820,7 @@ @endDefreq @DefreqList {brp, } -@DefescListEnd {\\p, , , } +@DefescListEndx {\\p, , , } Adjust the current line and cause a break. In most cases this produces very ugly results since @code{gtroff} @@ -6777,8 +6845,8 @@ @endDefreq @DefreqList {ss, word_space_size [@Var{sentence_space_size}]} -@DefregItem {.ss} -@DefregListEnd {.sss} +@DefregItemx {.ss} +@DefregListEndx {.sss} @cindex word space size register (@code{.ss}) @cindex size of word space register (@code{.ss}) @cindex space between words register (@code{.ss}) @@ -6822,7 +6890,7 @@ @cindex space, discardable, horizontal @cindex horizontal discardable space Another useful application of the @code{ss} request is to insert -discardable horizontal space, i.e., space which is discarded at a line +discardable horizontal space, i.e., space that is discarded at a line break. For example, paragraph-style footnotes could be separated this way: @@ -6848,7 +6916,7 @@ @endDefreq @DefreqList {ce, [@Var{nnn}]} -@DefregListEnd {.ce} +@DefregListEndx {.ce} @cindex centering lines (@code{ce}) @cindex lines, centering (@code{ce}) Center text. While the @w{@samp{.ad c}} request also centers text, it @@ -6861,12 +6929,12 @@ @Example .ll 4i .ce 1000 -This is a small text fragment which shows the differences +This is a small text fragment that shows the differences between the `.ce' and the `.ad c' request. .ce 0 .ad c -This is a small text fragment which shows the differences +This is a small text fragment that shows the differences between the `.ce' and the `.ad c' request. @endExample @@ -6874,11 +6942,11 @@ And here the result: @Example - This is a small text fragment which + This is a small text fragment that shows the differences between the `.ce' and the `.ad c' request. - This is a small text fragment which + This is a small text fragment that shows the differences between the `.ce' and the `.ad c' request. @endExample @@ -6893,7 +6961,7 @@ As can be seen in the previous example, it is a common idiom to turn on centering for a large number of lines, and to turn off centering after -text to be centered. This is useful for any request which takes a +text to be centered. This is useful for any request that takes a number of lines as an argument. The @code{.ce} read-only number register contains the number of lines @@ -6901,7 +6969,7 @@ @endDefreq @DefreqList {rj, [@Var{nnn}]} -@DefregListEnd {.rj} +@DefregListEndx {.rj} @cindex justifying text (@code{rj}) @cindex text, justifying (@code{rj}) @cindex right-justifying (@code{rj}) @@ -6921,10 +6989,10 @@ @cindex manipulating hyphenation @cindex hyphenation, manipulating -Here a description of requests which influence hyphenation. +Here a description of requests that influence hyphenation. @DefreqList {hy, [@Var{mode}]} -@DefregListEnd {.hy} +@DefregListEndx {.hy} Enable hyphenation. The request has an optional numeric argument, @var{mode}, to restrict hyphenation if necessary: @@ -6964,8 +7032,8 @@ @endDefreq @DefreqList {hlm, [@Var{nnn}]} -@DefregItem {.hlm} -@DefregListEnd {.hlc} +@DefregItemx {.hlm} +@DefregListEndx {.hlc} @cindex explicit hyphen (@code{\%}) @cindex hyphen, explicit (@code{\%}) @cindex consecutive hyphenated lines (@code{hlm}) @@ -7060,8 +7128,8 @@ @endDefreq @DefreqList {hpf, pattern_file} -@DefreqItem {hpfa, pattern_file} -@DefreqListEnd {hpfcode, a b [c d @dots{}]} +@DefreqItemx {hpfa, pattern_file} +@DefreqListEndx {hpfcode, a b [c d @dots{}]} @cindex hyphenation patterns (@code{hpf}) @cindex patterns for hyphenation (@code{hpf}) Read in a file of hyphenation patterns. This file is searched for in @@ -7117,9 +7185,9 @@ current list of patterns. Its arguments are pairs of character codes -- integers from 0 to@tie{}255. The request maps character code@tie{}@var{a} to code@tie{}@var{b}, code@tie{}@var{c} to -code@tie{}@var{d}, and so on. You can use character codes which would +code@tie{}@var{d}, and so on. You can use character codes that would be invalid otherwise. By default, everything maps to itself except -letters `A' to `Z' which map to `a' to `z'. +letters `A' to `Z', which map to `a' to `z'. @pindex troffrc @@ -7151,10 +7219,10 @@ @samp{a}-@samp{z} (mapped to themselves) and to the letters @samp{A}-@samp{Z} (mapped to @samp{a}-@samp{z}); all other hyphenation codes are set to zero. Normally, hyphenation patterns contain only -lowercase letters which should be applied regardless of case. In +lowercase letters, which should be applied regardless of case. In other words, the words `FOO' and `Foo' should be hyphenated exactly the same way as the word `foo' is hyphenated, and this is what @code{hcode} -is good for. Words which contain other letters won't be hyphenated +is good for. Words that contain other letters won't be hyphenated properly if the corresponding hyphenation patterns actually do contain them. For example, the following @code{hcode} requests are necessary to assign hyphenation codes to the letters @samp{ÄäÖöÜüß} (this is needed @@ -7171,14 +7239,14 @@ @w{`Kindergärten'} (the plural form of `kindergarten') as two substrings @w{`kinderg'} and @w{`rten'} because the hyphenation code of the umlaut@tie{}a is zero by default. There is a German hyphenation pattern -which covers @w{`kinder'}, so groff finds the hyphenation `kin-der'. +that covers @w{`kinder'}, so groff finds the hyphenation `kin-der'. The other two hyphenation points (`kin-der-gär-ten') are missed. This request is ignored if it has no parameter. @endDefreq @DefreqList {hym, [@Var{length}]} -@DefregListEnd {.hym} +@DefregListEndx {.hym} @cindex hyphenation margin (@code{hym}) @cindex margin for hyphenation (@code{hym}) @cindex @code{ad} request, and hyphenation margin @@ -7199,7 +7267,7 @@ @endDefreq @DefreqList {hys, [@Var{hyphenation_space}]} -@DefregListEnd {.hys} +@DefregListEndx {.hys} @cindex hyphenation space (@code{hys}) @cindex @code{ad} request, and hyphenation space Set the hyphenation space to @var{hyphenation_space}. If the current @@ -7239,7 +7307,7 @@ @endDefreq @DefreqList {hla, language} -@DefregListEnd {.hla} +@DefregListEndx {.hla} @cindex @code{hpf} request, and hyphenation language @cindex @code{hw} request, and hyphenation language @pindex troffrc @@ -7344,7 +7412,7 @@ @endDefreq @DefreqList {ls, [@Var{nnn}]} -@DefregListEnd {.L} +@DefregListEndx {.L} @cindex double-spacing (@code{ls}) Output @w{@var{nnn}@minus{}1} blank lines after each line of text. With no argument, @code{gtroff} uses the previous value before the last @@ -7368,7 +7436,7 @@ alternatives to @code{ls}. @DefescList {\\x, ', spacing, '} -@DefregListEnd {.a} +@DefregListEndx {.a} Sometimes, extra vertical spacing is only needed occasionally, e.g.@: to allow space for a tall construct (like an equation). The @code{\x} escape does this. The escape is given a numerical argument, usually @@ -7414,8 +7482,8 @@ @endDefesc @DefreqList {ns, } -@DefreqItem {rs, } -@DefregListEnd {.ns} +@DefreqItemx {rs, } +@DefregListEndx {.ns} @cindex @code{sp} request, and no-space mode @cindex no-space mode (@code{ns}) @cindex mode, no-space (@code{ns}) @@ -7425,7 +7493,7 @@ or via blank lines) is disabled. The @code{bp} request to advance to the next page is also disabled, except if it is accompanied by a page number (see @ref{Page Control}, for more information). This mode ends -when actual text is output or the @code{rs} request is encountered which +when actual text is output or the @code{rs} request is encountered, which ends no-space mode. The read-only number register @code{.ns} is set to@tie{}1 as long as no-space mode is active. @@ -7459,10 +7527,10 @@ @endDefesc @DefreqList {ta, [@Var{n1} @Var{n2} @dots{} @Var{nn} @t{T} @Var{r1} @Var{r2} @dots{} @Var{rn}]} -@DefregListEnd {.tabs} +@DefregListEndx {.tabs} Change tab stop positions. This request takes a series of tab specifiers as arguments (optionally divided into two groups with the -letter @samp{T}) which indicate where each tab stop is to be (overriding +letter @samp{T}) that indicate where each tab stop is to be (overriding any previous settings). Tab stops can be specified absolutely, i.e., as the distance from the @@ -7473,7 +7541,7 @@ .ta 1i 2i 3i 4i 5i 6i @endExample -Tab stops can also be specified using a leading @samp{+} which means +Tab stops can also be specified using a leading @samp{+}, which means that the specified tab stop is set relative to the previous tab stop. For example, the following is equivalent to the previous example. @@ -7516,7 +7584,7 @@ The default unit of the @code{ta} request is @samp{m}. @item -A tab stop is converted into a non-breakable horizontal movement which +A tab stop is converted into a non-breakable horizontal movement that can be neither stretched nor squeezed. For example, @Example @@ -7526,7 +7594,7 @@ @endExample @noindent -creates a single line which is a bit longer than 10@tie{}inches (a +creates a single line, which is a bit longer than 10@tie{}inches (a string is used to show exactly where the tab characters are). Now consider the following: @@ -7543,8 +7611,8 @@ the user wants. @item -Superfluous tabs (i.e., tab characters which do not correspond to a tab -stop) are ignored except the first one which delimits the characters +Superfluous tabs (i.e., tab characters that do not correspond to a tab +stop) are ignored except the first one, which delimits the characters belonging to the last tab stop for right-justifying or centering. Consider the following example @@ -7573,7 +7641,7 @@ @noindent The first line right-justifies the second `foo' relative to the tab stop. The second line right-justifies `foobar'. The third line finally -right-justifies only `foo' because of the additional tab character which +right-justifies only `foo' because of the additional tab character, which marks the end of the string belonging to the last defined tab stop. @item @@ -7618,7 +7686,7 @@ @endDefreq @DefreqList {linetabs, n} -@DefregListEnd {.linetabs} +@DefregListEndx {.linetabs} @cindex tab, line-tabs mode @cindex line-tabs mode @cindex mode, line-tabs @@ -7672,7 +7740,7 @@ Sometimes it may may be desirable to use the @code{tc} request to fill a particular tab stop with a given glyph (for example dots in a table of contents), but also normal tab stops on the rest of the line. For this -@code{gtroff} provides an alternate tab mechanism, called @dfn{leaders} +@code{gtroff} provides an alternate tab mechanism, called @dfn{leaders}, which does just that. @cindex leader character @@ -7739,7 +7807,7 @@ @cindex character, field padding (@code{fc}) @dfn{Fields} are a more general way of laying out tabular data. A field is defined as the data between a pair of @dfn{delimiting characters}. -It contains substrings which are separated by @dfn{padding characters}. +It contains substrings that are separated by @dfn{padding characters}. The width of a field is the distance on the @emph{input} line from the position where the field starts to the next tab stop. A padding character inserts stretchable space similar to @TeX{}'s @code{\hss} @@ -7844,13 +7912,13 @@ Note that changing the escape character globally likely breaks macro packages since @code{gtroff} has no mechanism to `intern' macros, i.e., -to convert a macro definition into an internal form which is independent +to convert a macro definition into an internal form that is independent of its representation (@TeX{} has this mechanism). If a macro is called, it is executed literally. @endDefreq @DefreqList {ecs, } -@DefreqListEnd {ecr, } +@DefreqListEndx {ecr, } The @code{ecs} request saves the current escape character in an internal register. Use this request in combination with the @code{ec} request to temporarily change the escape character. @@ -7861,8 +7929,8 @@ @endDefreq @DefescList {\\\\, , , } -@DefescItem {\\e, , , } -@DefescListEnd {\\E, , , } +@DefescItemx {\\e, , , } +@DefescListEndx {\\E, , , } Print the current escape character (which is the backslash character @samp{\} by default). @@ -7878,7 +7946,7 @@ @cindex copy-in mode, and @code{\E} @cindex mode, copy-in, and @code{\E} As a consequence, only at top-level or in a diversion a backslash glyph -is printed; in copy-in mode, it expands to a single backslash which then +is printed; in copy-in mode, it expands to a single backslash, which then combines with the following character to an escape sequence. The @code{\E} escape differs from @code{\e} by printing an escape @@ -7955,7 +8023,7 @@ Internals}, for more on this process). @DefreqList {tr, @Var{a}@Var{b}@Var{c}@Var{d}@dots{}} -@DefreqListEnd {trin, @Var{a}@Var{b}@Var{c}@Var{d}@dots{}} +@DefreqListEndx {trin, @Var{a}@Var{b}@Var{c}@Var{d}@dots{}} Translate character @var{a} to glyph@tie{}@var{b}, character @var{c} to glyph@tie{}@var{d}, etc. If there is an odd number of arguments, the last one is translated to an unstretchable space (@w{@samp{\ }}). @@ -8063,7 +8131,7 @@ @item @code{troff} no longer has a hard-coded dependency on @w{Latin-1}; all @code{char@var{XXX}} entities have been removed from the font -description files. This has a notable consequence which shows up in +description files. This has a notable consequence that shows up in warnings like @code{can't find character with input code @var{XXX}} if the @code{tr} request isn't handled properly. @@ -8163,7 +8231,7 @@ condition false) for @code{if}, @code{ie}, and @code{while} conditional requests. This is the default if @code{gtroff} uses a TTY output device; the code for switching to nroff mode is in the file -@file{tty.tmac} which is loaded by the start-up file @code{troffrc}. +@file{tty.tmac}, which is loaded by the start-up file @code{troffrc}. @endDefreq @xref{Conditionals and Loops}, for more details on built-in conditions. @@ -8178,9 +8246,9 @@ @cindex dimensions, line @cindex line dimensions -The following drawing shows the dimensions which @code{gtroff} uses for +The following drawing shows the dimensions that @code{gtroff} uses for placing a line of output onto the page. They are labeled with the -request which manipulates each dimension. +request that manipulates each dimension. @Example -->| in |<-- @@ -8249,7 +8317,7 @@ @DefreqList {po, [@Var{offset}]} @DefreqItem {po, @t{+}@Var{offset}} @DefreqItem {po, @t{-}@Var{offset}} -@DefregListEnd {.o} +@DefregListEndx {.o} @pindex troffrc Set horizontal page offset to @var{offset} (or increment or decrement the current value by @var{offset}). Note that this request does not @@ -8282,7 +8350,7 @@ @DefreqList {in, [@Var{indent}]} @DefreqItem {in, @t{+}@Var{indent}} @DefreqItem {in, @t{-}@Var{indent}} -@DefregListEnd {.i} +@DefregListEndx {.i} Set indentation to @var{indent} (or increment or decrement the current value by @var{indent}). This request causes a break. Initially, there is no indentation. @@ -8309,7 +8377,7 @@ @DefreqList {ti, offset} @DefreqItem {ti, @t{+}@Var{offset}} @DefreqItem {ti, @t{-}@Var{offset}} -@DefregListEnd {.in} +@DefregListEndx {.in} Temporarily indent the next output line by @var{offset}. If an increment or decrement value is specified, adjust the temporary indentation relative to the value set by the @code{in} request. @@ -8338,8 +8406,8 @@ @DefreqList {ll, [@Var{length}]} @DefreqItem {ll, @t{+}@Var{length}} @DefreqItem {ll, @t{-}@Var{length}} -@DefregItem {.l} -@DefregListEnd {.ll} +@DefregItemx {.l} +@DefregListEndx {.ll} Set the line length to @var{length} (or increment or decrement the current value by @var{length}). Initially, the line length is set to 6.5@dmn{i}. The effect of @code{ll} is delayed until a partially @@ -8394,7 +8462,7 @@ This is a test. @endExample -The main usage of this feature is to define macros which act exactly at +The main usage of this feature is to define macros that act exactly at the place where called. @Example @@ -8422,8 +8490,8 @@ continuation; the latter is also called @dfn{interrupting} a line. @DefescList {\\@key{RET}, , ,} -@DefescItem {\\c, , ,} -@DefregListEnd {.int} +@DefescItemx {\\c, , ,} +@DefregListEndx {.int} Continue a line. @code{\@key{RET}} (this is a backslash at the end of a line immediately followed by a newline) works on the input level, suppressing the effects of the following newline in the input. @@ -8438,7 +8506,7 @@ @cindex @code{\R}, after @code{\c} @code{\c} works on the output level. Anything after this escape on the -same line is ignored, except @code{\R} which works as usual. Anything +same line is ignored except @code{\R}, which works as usual. Anything before @code{\c} on the same line is appended to the current partial output line. The next non-command line after an interrupted line counts as a new input line. @@ -8476,7 +8544,7 @@ @endExample @end itemize -Note that an intervening control line which causes a break is stronger +Note that an intervening control line that causes a break is stronger than @code{\c}, flushing out the current partial line in the usual way. @cindex interrupted line register (@code{.int}) @@ -8499,7 +8567,7 @@ @DefreqList {pl, [@Var{length}]} @DefreqItem {pl, @t{+}@Var{length}} @DefreqItem {pl, @t{-}@Var{length}} -@DefregListEnd {.p} +@DefregListEndx {.p} @cindex page length (@code{pl}) @cindex length of page (@code{pl}) Set the @dfn{page length} to @var{length} (or increment or decrement the @@ -8529,7 +8597,7 @@ @cindex headers @cindex footers @cindex titles -@code{gtroff} provides several operations which help in setting up top +@code{gtroff} provides several operations that help in setting up top and bottom titles (or headers and footers). @Defreq {tl, @t{'}@Var{left}@t{'}@Var{center}@t{'}@Var{right}@t{'}} @@ -8575,7 +8643,7 @@ @DefreqList {lt, [@Var{length}]} @DefreqItem {lt, @t{+}@Var{length}} @DefreqItem {lt, @t{-}@Var{length}} -@DefregListEnd {.lt} +@DefregListEndx {.lt} @cindex length of title line (@code{lt}) @cindex title line, length (@code{lt}) @cindex title line length register (@code{.lt}) @@ -8596,7 +8664,7 @@ @DefreqList {pn, page} @DefreqItem {pn, @t{+}@Var{page}} @DefreqItem {pn, @t{-}@Var{page}} -@DefregListEnd {.pn} +@DefregListEndx {.pn} @cindex page number (@code{pn}) @cindex number, page (@code{pn}) Change (increase or decrease) the page number of the @emph{next} page. @@ -8630,7 +8698,7 @@ @DefreqList {bp, [@Var{page}]} @DefreqItem {bp, @t{+}@Var{page}} @DefreqItem {bp, @t{-}@Var{page}} -@DefregListEnd {%} +@DefregListEndx {%} @cindex new page (@code{bp}) @cindex page, new (@code{bp}) Stop processing the current page and move to the next page. This @@ -8689,12 +8757,12 @@ @endDefreq @DefreqList {sv, [@Var{space}]} -@DefreqListEnd {os, } +@DefreqListEndx {os, } @cindex @code{ne} request, comparison with @code{sv} @code{sv} is similar to the @code{ne} request; it reserves the specified amount of vertical space. If the desired amount of space exists before the next trap (or the bottom page boundary if no trap is set), the space -is output immediately (ignoring a partially filled line which stays +is output immediately (ignoring a partially filled line, which stays untouched). If there is not enough space, it is stored for later output via the @code{os} request. The default value is@tie{}1@dmn{v} if no argument is given; the default scaling indicator is @samp{v}. @@ -8767,7 +8835,7 @@ The basic set of fonts is @samp{R}, @samp{I}, @samp{B}, and @samp{BI}. These are Times Roman, Italic, Bold, and Bold Italic. For non-TTY -devices, there is also at least one symbol font which contains various +devices, there is also at least one symbol font that contains various special symbols (Greek, mathematics). @menu @@ -8788,10 +8856,10 @@ @cindex fonts @DefreqList {ft, [@Var{font}]} -@DefescItem {\\f, , f, } +@DefescItemx {\\f, , f, } @DefescItem {\\f, @Lparen{}, fn, } @DefescItem {\\f, @Lbrack{}, font, @Rbrack{}} -@DefregListEnd {.sty} +@DefregListEndx {.sty} @cindex changing fonts (@code{ft}, @code{\f}) @cindex fonts, changing (@code{ft}, @code{\f}) @cindex @code{sty} request, and changing fonts @@ -8885,7 +8953,7 @@ @endDefreq @DefreqList {fzoom, f [@Var{zoom}]} -@DefregListEnd {.zoom} +@DefregListEndx {.zoom} @cindex magnification of a font (@code{fzoom}) @cindex font, magnification (@code{fzoom}) @cindex zoom factor of a font (@code{fzoom}) @@ -8947,11 +9015,11 @@ different font family on the command line (@pxref{Groff Options}). @DefreqList {fam, [@Var{family}]} -@DefregItem {.fam} -@DefescItem {\\F, , f, } +@DefregItemx {.fam} +@DefescItemx {\\F, , f, } @DefescItem {\\F, @Lparen{}, fm, } @DefescItem {\\F, @Lbrack{}, family, @Rbrack{}} -@DefregListEnd {.fn} +@DefregListEndx {.fn} @cindex changing font family (@code{fam}, @code{\F}) @cindex font family, changing (@code{fam}, @code{\F}) Switch font family to @var{family} (one-character name@tie{}@var{f}, @@ -9080,8 +9148,8 @@ on which various fonts are mounted. @DefreqList {fp, pos font [@Var{external-name}]} -@DefregItem {.f} -@DefregListEnd {.fp} +@DefregItemx {.f} +@DefregListEndx {.fp} @cindex mounting font (@code{fp}) @cindex font, mounting (@code{fp}) Mount font @var{font} at position @var{pos} (which must be a @@ -9125,7 +9193,7 @@ The @code{fp} request has an optional third argument. This argument gives the external name of the font, which is used for finding the font description file. The second argument gives the internal name of the -font which is used to refer to the font in @code{gtroff} after it has +font, which is used to refer to the font in @code{gtroff} after it has been mounted. If there is no third argument then the internal name is used as the external name. This feature makes it possible to use fonts with long names in compatibility mode. @@ -9135,7 +9203,7 @@ syntax forms to access font positions. @DefreqList {ft, nnn} -@DefescItem {\\f, , n, } +@DefescItemx {\\f, , n, } @DefescItem {\\f, @Lparen{}, nn, } @DefescListEnd {\\f, @Lbrack{}, nnn, @Rbrack{}} @cindex changing font position (@code{\f}) @@ -9182,7 +9250,7 @@ @cindex ligature A @dfn{glyph} is a graphical representation of a @dfn{character}. While a character is an abstract entity containing semantic information, a -glyph is something which can be actually seen on screen or paper. It is +glyph is something that can be actually seen on screen or paper. It is possible that a character has multiple glyph representation forms (for example, the character `A' can be either written in a roman or an italic font, yielding two different glyphs); sometimes more than one character @@ -9239,7 +9307,7 @@ As a last resort, consult all fonts loaded up to now for special fonts and check them, starting with the lowest font number. Note that this can sometimes lead to surprising results since the @code{fonts} line in -the @file{DESC} file often contains empty positions which are filled +the @file{DESC} file often contains empty positions, which are filled later on. For example, consider the following: @Example @@ -9264,12 +9332,12 @@ at font position@tie{}1, and @code{BAZ} at position@tie{}2. We now switch to a new font @code{XXX}, trying to access glyph -@code{foo} which is assumed to be missing. There are neither +@code{foo} that is assumed to be missing. There are neither font-specific special fonts for @code{XXX} nor any other fonts made special with the @code{special} request, so @code{gtroff} starts the search for special fonts in the list of already mounted fonts, with increasing font positions. Consequently, it finds @code{BAZ} before -@code{FOO} even for @code{XXX} which is not the intended behaviour. +@code{FOO} even for @code{XXX}, which is not the intended behaviour. @end itemize @xref{Font Files}, and @ref{Special Fonts}, for more details. @@ -9302,15 +9370,15 @@ @cindex adobe glyph list (AGL) @cindex AGL (adobe glyph list) Glyph names not listed in groff_char(7) are derived algorithmically, -using a simplified version of the Adobe Glyph List (AGL) algorithm which +using a simplified version of the Adobe Glyph List (AGL) algorithm, which is described in @uref{http://partners.adobe.com@//public@//developer@//opentype@//index_glyph.html}. -The (frozen) set of glyph names which can't be derived algorithmically +The (frozen) set of glyph names that can't be derived algorithmically is called @dfn{groff glyph list (GGL)}. @itemize @bullet @item -A glyph for Unicode character U+@var{XXXX}[@var{X}[@var{X}]] which is +A glyph for Unicode character U+@var{XXXX}[@var{X}[@var{X}]], which is not a composite character is named @code{u@var{XXXX}@r{[}@var{X}@r{[}@var{X}@r{]]}}. @var{X} must be an uppercase hexadecimal digit. Examples: @code{u1234}, @code{u008E}, @@ -9331,7 +9399,7 @@ @noindent Example: @code{u0045_0302_0301}. -For simplicity, all Unicode characters which are composites must be +For simplicity, all Unicode characters that are composites must be decomposed maximally (this is normalization form@tie{}D in the Unicode standard); for example, @code{u00CA_0301} is not a valid glyph name since U+00CA (@sc{latin capital letter e with circumflex}) can be @@ -9342,7 +9410,7 @@ @item groff maintains a table to decompose all algorithmically derived glyph -names which are composites itself. For example, @code{u0100} (@sc{latin +names that are composites itself. For example, @code{u0100} (@sc{latin letter a with macron}) is automatically decomposed into @code{u0041_0304}. Additionally, a glyph name of the GGL is preferred to an algorithmically derived glyph name; groff also automatically does @@ -9379,11 +9447,11 @@ @itemize @bullet @item -Any component which is found in the GGL is converted to the +Any component that is found in the GGL is converted to the @code{u@var{XXXX}} form. @item -Any component @code{u@var{XXXX}} which is found in the list of +Any component @code{u@var{XXXX}} that is found in the list of decomposable glyphs is decomposed. @item @@ -9403,7 +9471,7 @@ expected result: The ogonek glyph @samp{ho} is a spacing ogonek, but for a proper composite a non-spacing ogonek (U+0328) is necessary. Looking into the file @file{composite.tmac} one can find @w{@samp{.composite ho -u0328}} which changes the mapping of @samp{ho} while a composite glyph +u0328}}, which changes the mapping of @samp{ho} while a composite glyph name is constructed, causing the final glyph name to be @code{u0041_0328}. @@ -9440,7 +9508,7 @@ either glyph is done. A set of default mappings for many accents can be found in the file -@file{composite.tmac} which is loaded at start-up. +@file{composite.tmac}, which is loaded at start-up. @endDefreq @Defesc {\\N, ', n, '} @@ -9564,12 +9632,14 @@ @cindex @code{*}, at end of sentence @cindex @code{dg} glyph, at end of sentence @cindex @code{rq} glyph, at end of sentence +@cindex @code{cq} glyph, at end of sentence An end-of-sentence character followed by any number of characters with this property is treated as the end of a sentence if followed by a newline or two spaces; in other words the character is @dfn{transparent} for the purposes of end-of-sentence recognition -- this is the same as having a zero space factor in @TeX{} (initially characters @samp{"')]*} -and the symbols @samp{\[dg]} and @samp{\[rq]} have this property). +and the symbols @samp{\[dg]}, @samp{\[rq]}, and @samp{\[cq]} have this +property). @item 64 Ignore hyphenation code values of the surrounding characters. Use this @@ -9585,7 +9655,7 @@ into your document. Note, however, that this can lead to bad layout if done without thinking; in most situations, a better solution instead of changing the @code{cflags} value is to insert @code{\:} right after the -hyphen at the places which really need a break point. +hyphen at the places that really need a break point. @item 128 Prohibit a line break before the character, but allow a line break after @@ -9611,9 +9681,9 @@ @endDefreq @DefreqList {char, g [@Var{string}]} -@DefreqItem {fchar, g [@Var{string}]} -@DefreqItem {fschar, f g [@Var{string}]} -@DefreqListEnd {schar, g [@Var{string}]} +@DefreqItemx {fchar, g [@Var{string}]} +@DefreqItemx {fschar, f g [@Var{string}]} +@DefreqListEndx {schar, g [@Var{string}]} @cindex defining character (@code{char}) @cindex defining fallback character (@code{fchar}, @code{fschar}, @code{schar}) @cindex character, defining (@code{char}) @@ -9694,7 +9764,7 @@ @endDefreq @DefreqList {rchar, c1 c2 @dots{}} -@DefreqListEnd {rfschar, f c1 c2 @dots{}} +@DefreqListEndx {rfschar, f c1 c2 @dots{}} @cindex removing glyph definition (@code{rchar}, @code{rfschar}) @cindex glyph, removing definition (@code{rchar}, @code{rfschar}) @cindex fallback glyph, removing definition (@code{rchar}, @code{rfschar}) @@ -9752,7 +9822,7 @@ You can also use a special character range notation, consisting of a start character or symbol, followed by @samp{-}, and an end character or symbol. Internally, @code{gtroff} converts these two symbol names to -Unicode values (according to the groff glyph gist) which then give the +Unicode values (according to the groff glyph gist), which then give the start and end value of the range. If that fails, the class definition is skipped. @@ -9804,7 +9874,7 @@ Usually, only non-TTY devices have special fonts. @DefreqList {special, [@Var{s1} @Var{s2} @dots{}]} -@DefreqListEnd {fspecial, f [@Var{s1} @Var{s2} @dots{}]} +@DefreqListEndx {fspecial, f [@Var{s1} @Var{s2} @dots{}]} @kindex fonts @pindex DESC Use the @code{special} request to define special fonts. Initially, this @@ -9817,7 +9887,7 @@ without arguments, the particular list of special fonts is set to empty. Special fonts are searched in the order they appear as arguments. -All fonts which appear in a call to @code{special} or @code{fspecial} +All fonts that appear in a call to @code{special} or @code{fspecial} are loaded. @xref{Using Symbols}, for the exact search order of glyphs. @@ -9839,7 +9909,7 @@ @DefescList {\\H, ', height, '} @DefescItem {\\H, ', @t{+}height, '} @DefescItem {\\H, ', @t{-}height, '} -@DefregListEnd {.height} +@DefregListEndx {.height} @cindex changing the font height (@code{\H}) @cindex font height, changing (@code{\H}) @cindex height, font, changing (@code{\H}) @@ -9877,7 +9947,7 @@ @endDefesc @DefescList {\\S, ', slant, '} -@DefregListEnd {.slant} +@DefregListEndx {.slant} @cindex changing the font slant (@code{\S}) @cindex font slant, changing (@code{\S}) @cindex slant, font, changing (@code{\S}) @@ -9948,7 +10018,7 @@ @DefreqList {bd, font [@Var{offset}]} @DefreqItem {bd, font1 font2 [@Var{offset}]} -@DefregListEnd {.b} +@DefregListEndx {.b} @cindex imitating bold face (@code{bd}) @cindex bold face, imitating (@code{bd}) Artificially create a bold font by printing each glyph twice, slightly @@ -10026,7 +10096,7 @@ siblings) are taken into account. @DefreqList {lg, [@Var{flag}]} -@DefregListEnd {.lg} +@DefregListEndx {.lg} @cindex activating ligatures (@code{lg}) @cindex ligatures, activating (@code{lg}) @cindex ligatures enabled register (@code{.lg}) @@ -10052,7 +10122,7 @@ same width don't use kerning. @DefreqList {kern, [@Var{flag}]} -@DefregListEnd {.kern} +@DefregListEndx {.kern} @cindex activating kerning (@code{kern}) @cindex kerning, activating (@code{kern}) @cindex kerning enabled register (@code{.kern}) @@ -10278,18 +10348,19 @@ @DefreqList {ps, [@Var{size}]} @DefreqItem {ps, @t{+}@Var{size}} @DefreqItem {ps, @t{-}@Var{size}} -@DefescItem {\\s, , size, } -@DefregListEnd {.s} +@DefescItemx {\\s, , size, } +@DefregListEndx {.s} @cindex changing type sizes (@code{ps}, @code{\s}) @cindex type sizes, changing (@code{ps}, @code{\s}) @cindex point sizes, changing (@code{ps}, @code{\s}) Use the @code{ps} request or the @code{\s} escape to change (increase, decrease) the type size (in points). Specify @var{size} as either an absolute point size, or as a relative change from the current size. The -size@tie{}0, or no argument, goes back to the previous size. +size@tie{}0 (for both @code{.ps} and @code{\s}), or no argument (for +@code{.ps} only), goes back to the previous size. Default scaling indicator of @code{size} is @samp{z}. If @code{size} is -zero or negative, it is set to 1@dmn{u}. +negative, it is set to 1@dmn{u}. @cindex type size registers (@code{.s}, @code{.ps}) @cindex point size registers (@code{.s}, @code{.ps}) @@ -10366,7 +10437,7 @@ @DefreqList {vs, [@Var{space}]} @DefreqItem {vs, @t{+}@Var{space}} @DefreqItem {vs, @t{-}@Var{space}} -@DefregListEnd {.v} +@DefregListEndx {.v} @cindex changing vertical line spacing (@code{vs}) @cindex vertical line spacing, changing (@code{vs}) @cindex vertical line spacing register (@code{.v}) @@ -10414,7 +10485,7 @@ @cindex line space, extra post-vertical (@code{\x}) Move the current point vertically by the @dfn{extra post-vertical line space}. This is the maximum value of all @code{\x} escapes with a -positive argument in the line which has just been output. +positive argument in the line that has just been output. @item @cindex post-vertical line spacing @@ -10435,7 +10506,7 @@ @DefreqList {pvs, [@Var{space}]} @DefreqItem {pvs, @t{+}@Var{space}} @DefreqItem {pvs, @t{-}@Var{space}} -@DefregListEnd {.pvs} +@DefregListEndx {.pvs} @cindex @code{ls} request, alternative to (@code{pvs}) @cindex post-vertical line spacing, changing (@code{pvs}) @cindex post-vertical line spacing register (@code{.pvs}) @@ -10474,7 +10545,7 @@ @cindex @code{\s}, with fractional type sizes A @dfn{scaled point} is equal to @math{1/@var{sizescale}} points, where @var{sizescale} is specified in the @file{DESC} file (1@tie{}by -default). There is a new scale indicator @samp{z} which has the effect +default). There is a new scale indicator @samp{z}, which has the effect of multiplying by @var{sizescale}. Requests and escape sequences in @code{gtroff} interpret arguments that represent a point size as being in units of scaled points, but they evaluate each such argument using a @@ -10497,7 +10568,7 @@ @samp{z} or @samp{u} in a numeric expression whose default scale indicator was @samp{z}, and so @code{gtroff} disallows this as well. -There is also new scale indicator @samp{s} which multiplies by the +There is also new scale indicator @samp{s}, which multiplies by the number of units in a scaled point. So, for example, @samp{\n[.ps]s} is equal to @samp{1m}. Be sure not to confuse the @samp{s} and @samp{z} scale indicators. @@ -10510,7 +10581,7 @@ @endDefreg @DefregList {.psr} -@DefregListEnd {.sr} +@DefregListEndx {.sr} @cindex last-requested point size registers (@code{.psr}, @code{.sr}) @cindex point size registers, last-requested (@code{.psr}, @code{.sr}) @cindex @code{.ps} register, in comparison with @code{.psr} @@ -10570,8 +10641,8 @@ @xref{Identifiers}. @DefreqList {ds, name [@Var{string}]} -@DefreqItem {ds1, name [@Var{string}]} -@DefescItem {\\*, , n, } +@DefreqItemx {ds1, name [@Var{string}]} +@DefescItemx {\\*, , n, } @DefescItem {\\*, @Lparen{}, nm, } @DefescListEnd {\\*, @Lbrack{}, name arg1 arg2 @dots{}, @Rbrack{}} @cindex string interpolation (@code{\*}) @@ -10583,7 +10654,7 @@ Define and access a string variable @var{name} (one-character name@tie{}@var{n}, two-character name @var{nm}). If @var{name} already exists, @code{ds} overwrites the previous definition. Only the syntax -form using brackets can take arguments which are handled identically to +form using brackets can take arguments that are handled identically to macro arguments; the single exception is that a closing bracket as an argument must be enclosed in double quotes. @xref{Request and Macro Arguments}, and @ref{Parameters}. @@ -10599,7 +10670,7 @@ The @code{\*} escape @dfn{interpolates} (expands in-place) a previously-defined string variable. To be more precise, the stored -string is pushed onto the input stack which is then parsed by +string is pushed onto the input stack, which is then parsed by @code{gtroff}. Similar to number registers, it is possible to nest strings, i.e., string variables can be called within string variables. @@ -10787,7 +10858,7 @@ @endDefreq @DefreqList {as, name [@Var{string}]} -@DefreqListEnd {as1, name [@Var{string}]} +@DefreqListEndx {as1, name [@Var{string}]} @cindex appending to a string (@code{as}) @cindex string, appending (@code{as}) The @code{as} request is similar to @code{ds} but appends @var{string} @@ -10811,18 +10882,21 @@ @Defreq {substring, str n1 [@Var{n2}]} @cindex substring (@code{substring}) Replace the string named @var{str} with the substring defined by the -indices @var{n1} and@tie{}@var{n2}. The first character in the string -has index@tie{}0. If @var{n2} is omitted, it is taken to be equal to -the string's length. If the index value @var{n1} or @var{n2} is -negative, it is counted from the end of the string, going backwards: The -last character has index@tie{}@minus{}1, the character before the last -character has index@tie{}@minus{}2, etc. +indices @var{n1} and @var{n2}. The first character in the string has +index@tie{}0. If @var{n2} is omitted, it is implicitly set to the +largest valid value (the string length minus one). If the index value +@var{n1} or @var{n2} is negative, it is counted from the end of the +string, going backwards: The last character has index@tie{}@minus{}1, +the character before the last character has index@tie{}@minus{}2, etc. @Example .ds xxx abcdefgh .substring xxx 1 -4 \*[xxx] @result{} bcde +.substring xxx 2 +\*[xxx] + @result{} de @endExample @endDefreq @@ -10891,7 +10965,7 @@ etc.), and another one for names. As soon as an object is defined, @code{gtroff} adds it to the object pool, adds its name to the name pool, and creates a link between them. When @code{als} creates an -alias, it adds a new name to the name pool which gets linked to the same +alias, it adds a new name to the name pool that gets linked to the same object as the old name. Now consider this example. @@ -10915,7 +10989,7 @@ linked to. However, the alias to @code{foo} is still active! In other words, @code{foo} is still linked to the same object as @code{bar}, and the result of calling @code{bar} is an infinite, -recursive loop which finally leads to an error. +recursive loop that finally leads to an error. @cindex alias, string, removing (@code{rm}) @cindex alias, macro, removing (@code{rm}) @@ -11132,7 +11206,7 @@ @endDefreq @DefreqList {ie, expr anything} -@DefreqListEnd {el, anything} +@DefreqListEndx {el, anything} Use the @code{ie} and @code{el} requests to write an if-then-else. The first request is the `if' part and the latter is the `else' part. @@ -11160,19 +11234,18 @@ @cindex block, conditional, begin (@code{\@{}) @cindex block, condititional, end (@code{\@}}) In many cases, an if (or if-else) construct needs to execute more than -one request. This can be done using the @code{\@{} and @code{\@}} -escapes. The following example shows the possible ways to use these -escapes (note the position of the opening and closing braces). +one request. This can be done using the escapes @code{\@{} (which must +start the first line) and @code{\@}} (which must end the last line). @Example .ie t \@{\ . ds lq `` . ds rq '' .\@} -.el \ -.\@{\ -. ds lq " -. ds rq "\@} +.el \@{\ +. ds lq "" +. ds rq "" +.\@} @endExample @c @endDefesc @end deffn @@ -11208,7 +11281,7 @@ @itemize @bullet @item The body of a @code{while} request is treated like the body of a -@code{de} request: @code{gtroff} temporarily stores it in a macro which +@code{de} request: @code{gtroff} temporarily stores it in a macro that is deleted after the loop has been exited. It can considerably slow down a macro if the body of the @code{while} request (within the macro) is large. Each time the macro is executed, the @code{while} body is @@ -11229,7 +11302,7 @@ @noindent The traditional and ofter better solution (@acronym{UNIX} @code{troff} doesn't have the @code{while} request) is to use a recursive macro -instead which is parsed only once during its definition. +instead that is parsed only once during its definition. @Example .de yyy @@ -11287,7 +11360,7 @@ @cindex writing macros @cindex macros, writing -A @dfn{macro} is a collection of text and embedded commands which can be +A @dfn{macro} is a collection of text and embedded commands that can be invoked multiple times. Use macros to define common operations. @xref{Strings}, for a (limited) alternative syntax to call macros. @@ -11296,9 +11369,9 @@ @xref{Identifiers}. @DefreqList {de, name [@Var{end}]} -@DefreqItem {de1, name [@Var{end}]} -@DefreqItem {dei, name [@Var{end}]} -@DefreqListEnd {dei1, name [@Var{end}]} +@DefreqItemx {de1, name [@Var{end}]} +@DefreqItemx {dei, name [@Var{end}]} +@DefreqListEndx {dei1, name [@Var{end}]} Define a new macro named @var{name}. @code{gtroff} copies subsequent lines (starting with the next one) into an internal buffer until it encounters the line @samp{..} (two dots). If the optional second @@ -11324,7 +11397,7 @@ @samp{..} is never handled as a call to @samp{.}, even if you say @samp{.de foo .} explicitly.} -Here a small example macro called @samp{P} which causes a break and +Here a small example macro called @samp{P} that causes a break and inserts some vertical space. It could be used to separate paragraphs. @Example @@ -11356,7 +11429,7 @@ @noindent Since @code{\f} has no expansion, it isn't necessary to protect its -backslash. Had we defined another macro within @code{bar} which takes a +backslash. Had we defined another macro within @code{bar} that takes a parameter, eight backslashes would be necessary before @samp{$1}. The @code{de1} request turns off compatibility mode while executing the @@ -11419,13 +11492,13 @@ diversions. @xref{als,,the description of the @code{als} request}, for possible -pitfalls if redefining a macro which has been aliased. +pitfalls if redefining a macro that has been aliased. @endDefreq @DefreqList {am, name [@Var{end}]} -@DefreqItem {am1, name [@Var{end}]} -@DefreqItem {ami, name [@Var{end}]} -@DefreqListEnd {ami1, name [@Var{end}]} +@DefreqItemx {am1, name [@Var{end}]} +@DefreqItemx {ami, name [@Var{end}]} +@DefreqListEndx {ami1, name [@Var{end}]} @cindex appending to a macro (@code{am}) @cindex macro, appending (@code{am}) Works similarly to @code{de} except it appends onto the macro named @@ -11495,7 +11568,7 @@ When @code{gtroff} reads in the text for a macro, string, or diversion, it copies the text (including request lines, but excluding escapes) into an internal buffer. Escapes are converted into an internal form, except -for @code{\n}, @code{\$}, @code{\*}, @code{\\} and @code{\@key{RET}} +for @code{\n}, @code{\$}, @code{\*}, @code{\\} and @code{\@key{RET}}, which are evaluated and inserted into the text where the escape was located. This is known as @dfn{copy-in} mode or @dfn{copy} mode. @@ -11563,7 +11636,7 @@ @endDefreq @DefescList {\\$*, , , } -@DefescListEnd {\\$@@, , , } +@DefescListEndx {\\$@@, , , } In some cases it is convenient to use all of the arguments at once (for example, to pass the arguments along to another macro). The @code{\$*} escape concatenates all the arguments separated by spaces. A similar @@ -11593,7 +11666,7 @@ @result{} $^=`" This is a "test"' @endExample -This escape is useful mainly for macro packages like @file{trace.tmac} +This escape is useful mainly for macro packages like @file{trace.tmac}, which redefines some requests and macros for debugging purposes. @endDefesc @@ -11654,7 +11727,7 @@ vertical motion, @code{sp}. @DefreqList {mk, [@Var{reg}]} -@DefreqListEnd {rt, [@Var{dist}]} +@DefreqListEndx {rt, [@Var{dist}]} @cindex marking vertical page location (@code{mk}) @cindex page location, vertical, marking (@code{mk}) @cindex location, vertical, page, marking (@code{mk}) @@ -11714,7 +11787,7 @@ @Example .pl 1.5i .ll 4i -This is a small test which shows how the +This is a small test that shows how the rt request works in combination with mk. .2c @@ -11727,7 +11800,7 @@ Result: @Example -This is a small test which shows how the +This is a small test that shows how the rt request works in combination with mk. Starting here, isn't robust @@ -11752,7 +11825,7 @@ avoid interference with text processing. @code{\v} doesn't trigger a trap. This can be quite useful; for -example, consider a page bottom trap macro which prints a marker in the +example, consider a page bottom trap macro that prints a marker in the margin to indicate continuation of a footnote or something similar. @endDefesc @@ -11830,13 +11903,13 @@ @endExample @DefescList {\\w, ', text, '} -@DefregItem {st} -@DefregItem {sb} -@DefregItem {rst} -@DefregItem {rsb} -@DefregItem {ct} -@DefregItem {ssc} -@DefregListEnd {skw} +@DefregItemx {st} +@DefregItemx {sb} +@DefregItemx {rst} +@DefregItemx {rsb} +@DefregItemx {ct} +@DefregItemx {ssc} +@DefregListEndx {skw} @cindex width escape (@code{\w}) Return the width of the specified @var{text} in basic units. This allows horizontal movement based on the width of some arbitrary text @@ -11847,7 +11920,7 @@ @result{} The length of the string `abc' is 72u. @endExample -Font changes may occur in @var{text} which don't affect current +Font changes may occur in @var{text}, which don't affect current settings. After use, @code{\w} sets several registers: @@ -11931,7 +12004,7 @@ glyphs. @endDefesc -@Defesc {\\z, , g, , } +@Defesc {\\z, , g, } @cindex zero-width printing (@code{\z}, @code{\Z}) @cindex printing, zero-width (@code{\z}, @code{\Z}) Print glyph @var{g} with zero width, i.e., without spacing. Use this to @@ -11988,7 +12061,7 @@ and draws to the left, but the current location doesn't move. @var{l} can also be specified absolutely (i.e.@: with a leading -@samp{|}) which draws back to the beginning of the input line. Default +@samp{|}), which draws back to the beginning of the input line. Default scaling indicator is @samp{m}. @cindex underscore glyph (@code{\[ru]}) @@ -12061,8 +12134,8 @@ The default scaling indicator for all subcommands of @code{\D} is @samp{m} for horizontal distances and @samp{v} for vertical ones. -Exceptions are @w{@code{\D'f @dots{}'}} and @w{@code{\D't @dots{}'}} -which use @code{u} as the default, and @w{@code{\D'F@var{x} @dots{}'}} +Exceptions are @w{@code{\D'f @dots{}'}} and @w{@code{\D't @dots{}'}}, +which use @code{u} as the default, and @w{@code{\D'F@var{x} @dots{}'}}, which arguments are treated similar to the @code{defcolor} request. @table @code @@ -12202,7 +12275,7 @@ .. @endExample -If you want a filled polygon which has exactly the same size as an +If you want a filled polygon that has exactly the same size as an unfilled one, you must draw both an unfilled and a filled polygon. A filled polygon is always smaller than an unfilled one because the latter uses straight lines with a given line thickness to connect the polygon's @@ -12245,9 +12318,9 @@ Examples: @Example -@endExample \D'Fg .3' \" same gray as \D'f 700' \D'Fr #0000ff' \" blue +@endExample @end table @endDefesc @@ -12287,7 +12360,7 @@ @section Traps @cindex traps -@dfn{Traps} are locations, which, when reached, call a specified macro. +@dfn{Traps} are locations that, when reached, call a specified macro. These traps can occur at a given location on the page, at a given location in the current diversion, at a blank line, after a certain number of input lines, or at the end of input. @@ -12332,7 +12405,7 @@ @end itemize @DefreqList {vpt, flag} -@DefregListEnd {.vpt} +@DefregListEndx {.vpt} @cindex enabling vertical position traps (@code{vpt}) @cindex vertical position traps, enabling (@code{vpt}) @cindex vertical position trap enable register (@code{.vpt}) @@ -12443,7 +12516,7 @@ If there are no traps between the current position and the bottom of the page, it contains the distance to the page bottom. In a diversion, the distance to the page bottom is infinite (the returned value is the -biggest integer which can be represented in @code{groff}) if there are +biggest integer that can be represented in @code{groff}) if there are no diversion traps. @endDefreg @@ -12498,7 +12571,7 @@ @cindex @code{bp} request, and traps (@code{.pe}) @cindex traps, sprung by @code{bp} request (@code{.pe}) @cindex page ejecting register (@code{.pe}) -A read-only register which is set to@tie{}1 while a page is ejected with +A read-only register that is set to@tie{}1 while a page is ejected with the @code{bp} request (or by the end of input). Outside of traps this register is always zero. In the following @@ -12527,7 +12600,7 @@ @cindex traps, and diversions An important fact to consider while designing macros is that diversions and traps do not interact normally. For example, if a trap invokes a -header macro (while outputting a diversion) which tries to change the +header macro (while outputting a diversion) that tries to change the font on the current page, the effect is not visible before the diversion has completely been printed (except for input protected with @code{\!} or @code{\?}) since the data in the diversion is already formatted. In @@ -12564,15 +12637,15 @@ @cindex traps, input line @DefreqList {it, n macro} -@DefreqItem {itc, n macro} +@DefreqListEndx {itc, n macro} @cindex setting input line trap (@code{it}) @cindex input line trap, setting (@code{it}) @cindex trap, input line, setting (@code{it}) Set an input line trap. @var{n}@tie{}is the number of lines of input -which may be read before springing the trap, @var{macro} is the macro to +that may be read before springing the trap, @var{macro} is the macro to be invoked. Request lines are not counted as input lines. -For example, one possible use is to have a macro which prints the next +For example, one possible use is to have a macro that prints the next @var{n}@tie{}lines in a bold font. @Example @@ -12620,18 +12693,18 @@ @cindex traps, leading spaces @DefreqList {lsm, macro} -@DefregItem {lsn} -@DefregListEnd {lss} +@DefregItemx {lsn} +@DefregListEndx {lss} @cindex leading spaces macro (@code{lsm}) Set a leading spaces trap. @code{gtroff} executes @var{macro} when it encounters leading spaces in an input line; the implicit line break -which normally happens in this case is suppressed. A line consisting +that normally happens in this case is suppressed. A line consisting of spaces only, however, is treated as an empty line, possibly subject to an empty line macro set with the @code{blm} request. Leading spaces are removed from the input line before calling the leading spaces macro. The number of removed spaces is stored in -register @code{lsn}; the horizontal space which would be emitted if +register @code{lsn}; the horizontal space that would be emitted if there was no leading space macro is stored in register @code{lss}. Note that @code{lsn} and @code{lss} are available even if no leading space macro has been set. @@ -12644,7 +12717,7 @@ that groff's current font is properly set to @samp{I}, but the leading space macro only sees @code{foo}, without the preceding @code{\fI}. If the macro should see the font escape you have to `protect' it with -something which creates a token, for example with @code{\&\fIfoo}. +something that creates a token, for example with @code{\&\fIfoo}. @endDefreq @c --------------------------------------------------------------------- @@ -12695,7 +12768,7 @@ just described. In most situations this is not intended. To always force processing the whole end macro independently of this -behaviour it is thus advisable to insert something which starts an +behaviour it is thus advisable to insert something that starts an empty partially filled line (@code{\c}) whenever there is a chance that a page break can happen. In the above example, the call of the @code{ne} request assures that the remaining code stays on the same @@ -12785,7 +12858,7 @@ @xref{Identifiers}. @DefreqList {di, macro} -@DefreqListEnd {da, macro} +@DefreqListEndx {da, macro} @cindex beginning diversion (@code{di}) @cindex diversion, beginning (@code{di}) @cindex ending diversion (@code{di}) @@ -12805,7 +12878,7 @@ @endDefreq @DefreqList {box, macro} -@DefreqListEnd {boxa, macro} +@DefreqListEndx {boxa, macro} Begin (or append to) a diversion like the @code{di} and @code{da} requests. The difference is that @code{box} and @code{boxa} do not include a partially-filled line in the diversion. @@ -12845,7 +12918,7 @@ @endDefreq @DefregList {.z} -@DefregListEnd {.d} +@DefregListEndx {.d} @cindex @code{nl} register, and @code{.d} @cindex nested diversions @cindex diversion, nested @@ -12887,7 +12960,7 @@ @endDefreg @DefregList {dn} -@DefregListEnd {dl} +@DefregListEndx {dl} @cindex @code{dn} register, and @code{da} (@code{boxa}) @cindex @code{dl} register, and @code{da} (@code{boxa}) @cindex @code{da} request, and @code{dn} (@code{dl}) @@ -12896,7 +12969,7 @@ and @code{dl} contain the vertical and horizontal size of the diversion. Note that only the just processed lines are counted: For the computation of @code{dn} and @code{dl}, the requests @code{da} and @code{boxa} are -handled as if @code{di} and @code{box} had been used -- lines which have +handled as if @code{di} and @code{box} had been used -- lines that have been already stored in a macro are not taken into account. @Example @@ -12939,13 +13012,13 @@ @endDefreg @DefescList {\\!, , , } -@DefescListEnd {\\?, , anything, \\?} +@DefescListEndx {\\?, , anything, \\?} @cindex transparent output (@code{\!}, @code{\?}) @cindex output, transparent (@code{\!}, @code{\?}) Prevent requests, macros, and escapes from being interpreted when read into a diversion. Both escapes take the given text and @dfn{transparently} embed it into the diversion. This is useful for -macros which shouldn't be invoked until the diverted text is actually +macros that shouldn't be invoked until the diverted text is actually output. The @code{\!} escape transparently embeds text up to and including the @@ -12994,7 +13067,7 @@ @cindex diversion, top-level, and @code{\!} If @code{\!} is used in the top-level diversion, its argument is directly embedded into the @code{gtroff} intermediate output. This can -be used for example to control a postprocessor which processes the data +be used for example to control a postprocessor that processes the data before it is sent to the device driver. @cindex @code{\?}, in top-level diversion @@ -13021,7 +13094,7 @@ Without argument, @code{output} is ignored. Use with caution! It is normally only needed for mark-up used by a -postprocessor which does something with the output before sending it to +postprocessor that does something with the output before sending it to the output device, filtering out @var{string} again. @endDefreq @@ -13112,7 +13185,7 @@ named @samp{0}, @samp{1}, and @samp{2}. @DefreqList {ev, [@Var{env}]} -@DefregListEnd {.ev} +@DefregListEndx {.ev} @cindex switching environments (@code{ev}) @cindex environment, switching (@code{ev}) @cindex environment number/name register (@code{.ev}) @@ -13182,9 +13255,9 @@ @endDefreq @DefregList {.w} -@DefregItem {.cht} -@DefregItem {.cdp} -@DefregListEnd {.csk} +@DefregItemx {.cht} +@DefregItemx {.cdp} +@DefregListEndx {.csk} @cindex environment, dimensions of last glyph (@code{.w}, @code{.cht}, @code{.cdp}, @code{.csk}) @cindex width, of last glyph (@code{.w}) @cindex height, of last glyph (@code{.cht}) @@ -13246,7 +13319,7 @@ @code{\O0} and @code{\O1} also reset the four registers @samp{opminx}, @samp{opminy}, @samp{opmaxx}, and @samp{opmaxy} to @minus{}1. @xref{Register Index}. These four registers mark the top left and -bottom right hand corners of a box which encompasses all written glyphs. +bottom right hand corners of a box that encompasses all written glyphs. For example the input text: @@ -13295,7 +13368,7 @@ @cindex colors @DefreqList {color, [@Var{n}]} -@DefregListEnd {.color} +@DefregListEndx {.color} If @var{n} is missing or non-zero, activate colors (this is the default); otherwise, turn it off. @@ -13329,7 +13402,7 @@ @cindex @code{f} unit, and colors @cindex unit, @code{f}, and colors -A new scaling indicator@tie{}@code{f} has been introduced which +A new scaling indicator@tie{}@code{f} has been introduced, which multiplies its value by 65536; this makes it convenient to specify color components as fractions in the range 0 to@tie{}1 (1f equals 65536u). Example: @@ -13347,10 +13420,10 @@ @endDefreq @DefreqList {gcolor, [@Var{color}]} -@DefescItem {\\m, , c, } +@DefescItemx {\\m, , c, } @DefescItem {\\m, @Lparen{}, co, } @DefescItem {\\m, @Lbrack{}, color, @Rbrack{}} -@DefregListEnd {.m} +@DefregListEndx {.m} Set (glyph) drawing color. The following examples show how to turn the next four words red. @@ -13387,10 +13460,10 @@ @endDefesc @DefreqList {fcolor, [@Var{color}]} -@DefescItem {\\M, , c, } +@DefescItemx {\\M, , c, } @DefescItem {\\M, @Lparen{}, co, } @DefescItem {\\M, @Lbrack{}, color, @Rbrack{}} -@DefregListEnd {.M} +@DefregListEndx {.M} Set fill (background) color for filled objects drawn with the @code{\D'@dots{}'} commands. @@ -13483,7 +13556,7 @@ @endDefreq @DefreqList {trf, file} -@DefreqListEnd {cf, file} +@DefreqListEndx {cf, file} @cindex transparent output (@code{cf}, @code{trf}) @cindex output, transparent (@code{cf}, @code{trf}) @cindex @code{cf} request, and copy-in mode @@ -13592,7 +13665,7 @@ When this is run, a file containing the following lines should be redirected in. Note that requests included in this file are executed as though they were part of the form letter. The last block of input is -the @code{ex} request which tells @code{groff} to stop processing. If +the @code{ex} request, which tells @code{groff} to stop processing. If this was not there, @code{groff} would not know when to stop. @Example @@ -13643,7 +13716,7 @@ @endDefreq @DefreqList {sy, cmds} -@DefregListEnd {systat} +@DefregListEndx {systat} Execute the shell command(s) specified by @var{cmds}. The output is not saved anyplace, so it is up to the user to do so. @@ -13671,13 +13744,13 @@ @noindent Note that this works by having the @code{perl} script (run by @code{sy}) -print out the @code{nr} requests which set the number registers +print out the @code{nr} requests that set the number registers @code{H}, @code{M}, and @code{S}, and then reads those commands in with the @code{so} request. For most practical purposes, the number registers @code{seconds}, -@code{minutes}, and @code{hours} which are initialized at start-up of -@code{gtroff} should be sufficient. Use the @code{af} request to get a +@code{minutes}, and @code{hours}, which are initialized at start-up of +@code{gtroff}, should be sufficient. Use the @code{af} request to get a formatted output: @Example @@ -13693,7 +13766,7 @@ @endDefreq @DefreqList {open, stream file} -@DefreqListEnd {opena, stream file} +@DefreqListEndx {opena, stream file} @cindex opening file (@code{open}) @cindex file, opening (@code{open}) @cindex appending to a file (@code{opena}) @@ -13714,7 +13787,7 @@ @endDefreq @DefreqList {write, stream data} -@DefreqListEnd {writec, stream data} +@DefreqListEndx {writec, stream data} @cindex copy-in mode, and @code{write} request @cindex @code{write} request, and copy-in mode @cindex mode, copy-in, and @code{write} request @@ -13788,12 +13861,12 @@ @cindex postprocessor access @cindex access of postprocessor -There are two escapes which give information directly to the +There are two escapes that give information directly to the postprocessor. This is particularly useful for embedding @sc{PostScript} into the final document. @DefreqList {device, xxx} -@DefescListEnd {\\X, ', xxx, '} +@DefescListEndx {\\X, ', xxx, '} Embeds its argument into the @code{gtroff} output preceded with @w{@samp{x X}}. @@ -13808,7 +13881,7 @@ @end ifinfo The escapes @code{\&}, @code{\)}, @code{\%}, and @code{\:} are ignored within @code{\X}, @w{@samp{\ }} and @code{\~} are converted to single -space characters. All other escapes (except @code{\\} which produces a +space characters. All other escapes (except @code{\\}, which produces a backslash) cause an error. @cindex @code{device} request, and copy-in mode @@ -13830,7 +13903,7 @@ @endDefesc @DefreqList {devicem, xx} -@DefescItem {\\Y, , n, } +@DefescItemx {\\Y, , n, } @DefescItem {\\Y, @Lparen{}, nm, } @DefescListEnd {\\Y, @Lbrack{}, name, @Rbrack{}} This is approximately equivalent to @samp{\X'\*[@var{name}]'} @@ -13852,7 +13925,7 @@ @node Miscellaneous, Gtroff Internals, Postprocessor Access, gtroff Reference @section Miscellaneous -This section documents parts of @code{gtroff} which cannot (yet) be +This section documents parts of @code{gtroff} that cannot (yet) be categorized elsewhere in this manual. @Defreq {nm, [@Var{start} [@Var{inc} [@Var{space} [@Var{indent}]]]]} @@ -13861,7 +13934,7 @@ @cindex numbers, line, printing (@code{nm}) Print line numbers. @var{start} is the line number of the @emph{next} output line. @var{inc} indicates which line numbers are printed. For -example, the value@tie{}5 means to emit only line numbers which are +example, the value@tie{}5 means to emit only line numbers that are multiples of@tie{}5; this defaults to@tie{}1. @var{space} is the space to be left between the number and the text; this defaults to one digit space. The fourth argument is the indentation of the line numbers, @@ -13874,7 +13947,7 @@ output lines are concatenated to the line numbers, separated by @var{space}, and @emph{without} reducing the line length. Depending on the value of the horizontal page offset (as set with the @code{po} -request), line numbers which are longer than the reserved space stick +request), line numbers that are longer than the reserved space stick out to the left, or the whole line is moved to the right. Parameters corresponding to missing arguments are not changed; any @@ -14004,10 +14077,10 @@ @endDefreq @DefreqList {psbb, filename} -@DefregItem {llx} -@DefregItem {lly} -@DefregItem {urx} -@DefregListEnd {ury} +@DefregItemx {llx} +@DefregItemx {lly} +@DefregItemx {urx} +@DefregListEndx {ury} @cindex PostScript, bounding box @cindex bounding box Retrieve the bounding box of the @sc{PostScript} image found in @@ -14036,7 +14109,7 @@ @code{gtroff} processes input in three steps. One or more input characters are converted to an @dfn{input token}.@footnote{Except the escapes @code{\f}, @code{\F}, @code{\H}, @code{\m}, @code{\M}, -@code{\R}, @code{\s}, and @code{\S} which are processed immediately if +@code{\R}, @code{\s}, and @code{\S}, which are processed immediately if not in copy-in mode.} Then, one or more input tokens are converted to an @dfn{output node}. Finally, output nodes are converted to the intermediate output language understood by all output devices. @@ -14053,13 +14126,13 @@ tokens @samp{f} and @samp{i} are merged to a single output node representing the ligature glyph @samp{fi} (provided the current font has a glyph for this ligature); the same happens with @samp{:u}. All output -glyph nodes are `processed' which means that they are invariably +glyph nodes are `processed', which means that they are invariably associated with a given font, font size, advance width, etc. During the formatting process, @code{gtroff} itself adds various nodes to control the data flow. Macros, diversions, and strings collect elements in two chained lists: a -list of input tokens which have been passed unprocessed, and a list of +list of input tokens that have been passed unprocessed, and a list of output nodes. Consider the following the diversion. @Example @@ -14093,9 +14166,9 @@ Elements 1, 7, and@tie{}8 are inserted by @code{gtroff}; the latter two (which are always present) specify the vertical extent of the last line, possibly modified by @code{\x}. The @code{br} request finishes the -current partial line, inserting a newline input token which is +current partial line, inserting a newline input token, which is subsequently converted to a space when the diversion is reread. Note -that the word space node has a fixed width which isn't stretchable +that the word space node has a fixed width that isn't stretchable anymore. To convert horizontal space nodes back to input tokens, use the @code{unformat} request. @@ -14104,7 +14177,7 @@ Note that the @code{chop} request simply reduces the number of elements in a macro, string, or diversion by one. Exceptions are -@dfn{compatibility save} and @dfn{compatibility ignore} input tokens +@dfn{compatibility save} and @dfn{compatibility ignore} input tokens, which are ignored. The @code{substring} request also ignores those input tokens. @@ -14122,7 +14195,7 @@ @noindent Now let us assume that we install an additional special font @samp{bar} -which has glyph @samp{foo}. +that has glyph @samp{foo}. @Example .special bar @@ -14186,7 +14259,7 @@ Without argument, the request is ignored. -This is a debugging aid for documents which are split into many files, +This is a debugging aid for documents that are split into many files, then put together with @code{soelim} and other preprocessors. Usually, it isn't invoked manually. @@ -14196,8 +14269,8 @@ @endDefreq @DefreqList {tm, string} -@DefreqItem {tm1, string} -@DefreqListEnd {tmc, string} +@DefreqItemx {tm1, string} +@DefreqListEndx {tmc, string} @cindex printing to stderr (@code{tm}, @code{tm1}, @code{tmc}) @cindex stderr, printing to (@code{tm}, @code{tm1}, @code{tmc}) Send @var{string} to the standard error output; this is very useful for @@ -14380,7 +14453,7 @@ or an error occurs. The most verbose level of warnings is @option{-ww}. @DefreqList {warn, [@Var{flags}]} -@DefregListEnd {.warn} +@DefregListEndx {.warn} @cindex level of warnings (@code{warn}) @cindex warnings, level (@code{warn}) Control the level of warnings checked for. The @var{flags} are the sum @@ -14425,7 +14498,7 @@ @itemx 4 @cindex fill mode @cindex mode, fill -In fill mode, lines which could not be broken so that their length was +In fill mode, lines that could not be broken so that their length was less than the line length. This is enabled by default. @item delim @@ -14555,7 +14628,7 @@ @cindex compatibility mode @cindex mode, compatibility -GNU @code{troff} has a number of features which cause incompatibilities +GNU @code{troff} has a number of features that cause incompatibilities with documents written with old versions of @code{troff}. @cindex long names @@ -14580,8 +14653,8 @@ names). @DefreqList {cp, [@Var{n}]} -@DefreqItem {do, cmd} -@DefregListEnd {.C} +@DefreqItemx {do, cmd} +@DefregListEndx {.C} If @var{n} is missing or non-zero, turn on compatibility mode; otherwise, turn it off. @@ -14733,7 +14806,7 @@ escape character, regardless of whether or not it is used in a diversion; it also works in both GNU @code{troff} and @acronym{UNIX} @code{troff}.@footnote{To be completely independent of the current -escape character, use @code{\(rs} which represents a reverse solidus +escape character, use @code{\(rs}, which represents a reverse solidus (backslash) glyph.} To store, for some reason, an escape sequence in a diversion that is interpreted when the diversion is reread, either use the traditional @code{\!} transparent output facility, or, if this is @@ -15082,7 +15155,7 @@ the underline character (similar to a typewriter). Usually, a modern terminal can't interpret this (and the original Teletype machines for which this sequence was appropriate are no longer in use). You need -a pager program like @code{less} which translates this into +a pager program like @code{less} that translates this into ISO@tie{}6429 SGR sequences to control terminals. @@ -15179,7 +15252,7 @@ coordinates) at the insertion point. If @var{height} is not specified, the embedded drawing is scaled proportionally. -@xref{Miscellaneous}, for the @code{psbb} request which automatically +@xref{Miscellaneous}, for the @code{psbb} request, which automatically generates the bounding box. This escape sequence is used internally by the macro @code{PSPIC} @@ -15213,7 +15286,7 @@ @table @option @item -d -Produce uncompressed PDFs which include debugging comments. +Produce uncompressed PDFs that include debugging comments. @item -e This forces @code{gropdf} to embed all used fonts in the PDF, @@ -15246,7 +15319,7 @@ @item -u@var{filename} @code{gropdf} normally includes a ToUnicode CMap with any font created using @file{text.enc} as the encoding file, this makes it easier to -search for words which contain ligatures. You can include your own CMap +search for words that contain ligatures. You can include your own CMap by specifying a @var{filename} or have no CMap at all by omitting the @var{filename}. @end table @@ -15567,7 +15640,7 @@ @cindex @code{grohtml}, registers and strings @DefmpregList {ps4html, grohtml} -@DefstrListEnd {www-image-template, grohtml} +@DefstrListEndx {www-image-template, grohtml} The registers @code{ps4html} and @code{www-image-template} are defined by the @code{pre-grohtml} preprocessor. @code{pre-grohtml} reads in the @code{troff} input, marks up the inline equations and passes the result @@ -16115,7 +16188,7 @@ to 32767. @table @asis -@item @math{0 @LE{} @var{n} @LE{} 1000} +@item @math{0 @value{LE} @var{n} @value{LE} 1000} Set the color for filling solid drawing objects to a shade of gray, where 0 corresponds to solid white, 1000 (the default) to solid black, and values in between to intermediate shades of gray; this is obsoleted @@ -16549,7 +16622,7 @@ @pindex DESC@r{ file format} The @file{DESC} file can contain the following types of line. Except -for the @code{charset} keyword which must comes last (if at all), the +for the @code{charset} keyword, which must comes last (if at all), the order of the lines is not important. Later entries in the file, however, override previous values. @@ -16608,7 +16681,7 @@ Both @var{length} and @var{width} must have a unit appended; valid values are @samp{i} for inches, @samp{C} for centimeters, @samp{p} for points, and @samp{P} for picas. Example: @code{12c,235p}. An argument -which starts with a digit is always treated as a custom paper format. +that starts with a digit is always treated as a custom paper format. @code{papersize} sets both the vertical and horizontal dimension of the output medium. @@ -16683,7 +16756,7 @@ @item unicode @kindex unicode Indicate that the output device supports the complete Unicode -repertoire. Useful only for devices which produce @emph{character +repertoire. Useful only for devices that produce @emph{character entities} instead of glyphs. If @code{unicode} is present, no @code{charset} section is required in @@ -16703,6 +16776,7 @@ @kindex unscaled_charwidths Make the font handling module always return unscaled character widths. Needed for the @code{grohtml} device. + @item use_charnames_in_special @kindex use_charnames_in_special This command indicates that @code{gtroff} should encode special @@ -16725,7 +16799,7 @@ @kindex spare1 @kindex spare2 @kindex biggestfont -Here a list of obsolete keywords which are recognized by @code{groff} +Here a list of obsolete keywords that are recognized by @code{groff} but completely ignored: @code{spare1}, @code{spare2}, @code{biggestfont}. @@ -16781,7 +16855,7 @@ @cindex comments in font files @cindex font files, comments @kindex # -The first section can contain comments which start with the @samp{#} +The first section can contain comments, which start with the @samp{#} character and extend to the end of a line. The second section contains one or two subsections. It must contain a @@ -16820,17 +16894,17 @@ the special character @samp{\[@var{name}]}. If it is exactly two characters @var{xx} it can be entered as @samp{\(@var{xx}}. Note that single-letter special characters can't be accessed as @samp{\@var{c}}; -the only exception is @samp{\-} which is identical to @code{\[-]}. +the only exception is @samp{\-}, which is identical to @code{\[-]}. @code{gtroff} supports 8-bit input characters; however some utilities have difficulties with eight-bit characters. For this reason, there is a convention that the entity name @samp{char@var{n}} is equivalent to the single input character whose code is@tie{}@var{n}. For example, -@samp{char163} would be equivalent to the character with code@tie{}163 +@samp{char163} would be equivalent to the character with code@tie{}163, which is the pounds sterling sign in the ISO@tie{}@w{Latin-1} character set. You shouldn't use @samp{char@var{n}} entities in font description files since they are related to input, not output. Otherwise, you get -hard-coded connections between input and output encoding which prevents +hard-coded connections between input and output encoding, which prevents use of different (input) character sets. The name @samp{---} is special and indicates that the glyph is unnamed; @@ -16850,7 +16924,7 @@ the glyph has both an ascender and a descender, for example, @samp{(}. @end table -The @var{code} field gives the code which the postprocessor uses to +The @var{code} field gives the code that the postprocessor uses to print the glyph. The glyph can also be input to @code{gtroff} using this code by means of the @code{\N} escape sequence. @var{code} can be any integer. If it starts with @samp{0} it is interpreted as octal; if @@ -16859,7 +16933,7 @@ integer. The @var{entity-name} field gives an @acronym{ASCII} string identifying -the glyph which the postprocessor uses to print the @code{gtroff} glyph +the glyph that the postprocessor uses to print the @code{gtroff} glyph @var{name}. This field is optional and has been introduced so that the @code{grohtml} device driver can encode its character set. For example, the glyph @samp{\[Po]} is represented as @samp{£} in diff -ruN groff-1.22.2/doc/Makefile.in groff-1.22.3/doc/Makefile.in --- groff-1.22.2/doc/Makefile.in 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/Makefile.in 2014-11-04 09:38:35.561519796 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 2002-2007, 2009-2011 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # Written by Werner Lemberg -# +# # This file is part of groff. -# +# # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 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 . @@ -37,19 +36,22 @@ # These may be overridden if cross-compiling. TROFFBIN=$(top_builddir)/src/roff/troff/troff GROFFBIN=$(top_builddir)/src/roff/groff/groff -GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'` +GROFF_BIN_PATH=`echo $(groff_bin_dirs) \ + | LANG=C LC_ALL=C sed -e 's| *|:|g'` # info files are distributed with the groff package, so makeinfo is -# usually not needed (however, to build from CVS you NEED it!) +# usually not needed (however, to build from the repo you NEED it!) MAKEINFO=@MAKEINFO@ -# Users who want to print out the groff manual are expected to have -# a working TeX installation. +# Users who want to print out the groff manual are expected to have a +# working TeX installation. Note that texi2dvi properly honours the +# `MAKEINFO' environment variable. TEXI2DVI=texi2dvi groff_bin_dirs=\ $(top_builddir)/src/roff/groff \ $(top_builddir)/src/roff/troff \ + $(top_builddir)/src/preproc/preconv \ $(top_builddir)/src/preproc/pic \ $(top_builddir)/src/preproc/eqn \ $(top_builddir)/src/preproc/tbl \ @@ -74,40 +76,49 @@ TROFF=$(TROFFBIN) $(TFLAG) $(FFLAG) -ww GROFF=\ + LANG=C \ + LC_ALL=C \ sed -e "s;@VERSION@;$(version)$(revision);" $< \ - | GROFF_COMMAND_PREFIX= \ - GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \ - $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww + | GROFF_COMMAND_PREFIX= \ + GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \ + $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww imagedir=img .SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf .xhtml .PHONY: all prepare_examples clean distclean realclean extraclean -# For simplicity, we always call grn and eqn. +# For simplicity, we always call preconv, grn, and eqn. .me.txt: - $(GROFF) -Tascii -ge -me >$@ + $(GROFF) -k -Tutf8 -ge -me >$@ .me.ps: - $(GROFF) -Tps -ge -me >$@ + $(GROFF) -k -Tps -ge -me >$@ .ms.html: $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -P-V -Thtml -ms >$@ + -P-D$(imagedir) -P-V -Thtml -ms >$@ .ms.txt: $(GROFF) -Tascii -ms -mwww >$@ .ms.ps: $(GROFF) -Tps -ms -mwww >$@ .texinfo.txt: - LANG= $(MAKEINFO) --enable-encoding -I$(srcdir) --plaintext -o $@ $< + LANG=C \ + LC_ALL=C \ + $(MAKEINFO) --enable-encoding -I$(srcdir) --plaintext -o $@ $< .texinfo.dvi: + LANG=C \ + LC_ALL=C \ MAKEINFO=$(MAKEINFO) $(TEXI2DVI) -e $< .texinfo.pdf: + LANG=C \ + LC_ALL=C \ MAKEINFO=$(MAKEINFO) $(TEXI2DVI) -e --pdf $< .texinfo.html: - LANG= $(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< \ - && $(SHELL) $(srcdir)/fixinfo.sh $@ - + LANG=C \ + LC_ALL=C \ + $(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< \ + && $(SHELL) $(srcdir)/fixinfo.sh $@ all: prepare_examples @@ -123,37 +134,44 @@ pic.html: pic.ms $(GROFF) -P-p -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \ - -Thtml -P-V -ms >$@ + -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \ + -Thtml -P-V -ms >$@ webpage.html: webpage.ms gnu.eps groff.css $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \ - -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -Thtml -ms >$@ + -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \ + -P-D$(imagedir) -Thtml -ms >$@ webpage.ps: gnu.eps grnexmpl.ps: grnexmpl.me grnexmpl.g split-html: - LANG= $(MAKEINFO) --enable-encoding -I$(srcdir) --html groff.texinfo \ - && for f in groff/*; do \ - $(SHELL) $(srcdir)/fixinfo.sh $$f; \ - done - + LANG=C \ + LC_ALL=C \ + $(MAKEINFO) --enable-encoding -I$(srcdir) --html groff.texinfo \ + && for f in groff/*; do $(SHELL) $(srcdir)/fixinfo.sh $$f; done clean: - -rm -f *.ps *.html *.txt core - -rm -f *.aux *.dvi *.pdf *.log *.toc texput.log - -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \ - *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \ - *.tp *.tps *.tr *.vr *.vrs *.xhtml + rm -f *.ps *.html *.txt core + rm -f *.aux *.dvi *.pdf *.log *.toc texput.log + rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \ + *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \ + *.tp *.tps *.tr *.vr *.vrs *.xhtml -rm -rf img distclean: clean realclean: distclean - -rm -f *.png *.eps + rm -f *.png *.eps extraclean: distclean - -rm -f core *~ \#* junk temp grot + rm -f core *~ \#* junk temp grot + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/doc/Makefile.sub groff-1.22.3/doc/Makefile.sub --- groff-1.22.2/doc/Makefile.sub 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/Makefile.sub 2014-11-04 09:38:35.561519796 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 2002-2007, 2009, 2011, 2013 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # Written by Werner Lemberg -# +# # This file is part of groff. -# +# # groff is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 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 . @@ -24,6 +23,7 @@ groff_bin_dirs=\ $(top_builddir)/src/roff/groff \ $(top_builddir)/src/roff/troff \ + $(top_builddir)/src/preproc/preconv \ $(top_builddir)/src/preproc/pic \ $(top_builddir)/src/preproc/eqn \ $(top_builddir)/src/preproc/tbl \ @@ -47,11 +47,13 @@ DOCFILES=\ meref.me \ meintro.me \ + meintro_fr.me \ pic.ms PROCESSEDDOCFILES=\ meref.ps \ meintro.ps \ + meintro_fr.ps \ pic.ps HTMLDOCFILES=\ @@ -106,25 +108,33 @@ groff-*.info \ gnu.eps +RM=rm -f + .SUFFIXES: .me .ms .ps .html -# For simplicity, we always call grn and eqn. +# For simplicity, we always call preconv, grn, and eqn. .me.ps: - $(GROFF) -Tps -ge -me >$@ + $(GROFF) -k -Tps -ge -me >$@ .ms.html: $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -P-V -Thtml -ms >$@ + -P-D$(imagedir) -P-V -Thtml -ms >$@ .ms.ps: $(GROFF) -Tps -ms -mwww >$@ +all: $(make_otherdoc) \ + $(make_infodoc) \ + $(make_htmldoc) \ + $(make_examples) \ + $(make_htmlexamples) + +otherdoc: $(PROCESSEDDOCFILES) +infodoc: groff.info +htmldoc: $(HTMLDOCFILES) -all: groff.info $(PROCESSEDDOCFILES) prepare_examples \ - $(PROCESSEDEXAMPLEFILES) $(make_html) - -html: $(HTMLDOCFILES) $(HTMLEXAMPLEFILES) +examples: examples.stamp $(PROCESSEDEXAMPLEFILES) -prepare_examples: examples.stamp +html_examples: $(HTMLEXAMPLEFILES) examples.stamp: grnexmpl.g groff.css gnu.eps test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g . @@ -142,18 +152,18 @@ $(MAKEINFO) --enable-encoding -I$(srcdir) $(srcdir)/groff.texinfo gnu.eps: gnu.xpm - xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | \ - $(pnmtops_nosetpage) -noturn -rle >$@ + xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 \ + | $(pnmtops_nosetpage) -noturn -rle >$@ pic.html: pic.ms $(GROFF) -P-p -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \ - -Thtml -P-V -ms >$@ + -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \ + -Thtml -P-V -ms >$@ webpage.html: webpage.ms gnu.eps groff.css $(GROFF) -P-j`basename $< | sed -e 's|.ms$$||'` \ - -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \ - -P-D$(imagedir) -Thtml -ms >$@ + -P-nrpb -P-I`basename $< | sed -e 's|.ms$$||'` \ + -P-D$(imagedir) -Thtml -ms >$@ webpage.ps: gnu.eps @@ -161,87 +171,126 @@ distfiles: groff.info gnu.eps -install_data: groff.info gnu.eps $(DOCFILES) $(PROCESSEDDOCFILES) \ - $(make_install_html) $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) +install_data: install_always $(make_install_otherdoc) \ + $(make_install_infodoc) $(make_install_htmldoc) \ + $(make_install_examples) + +install_always: + -test -d $(DESTDIR)$(docdir) || $(mkinstalldirs) $(DESTDIR)$(docdir) + +install_otherdoc: install_always $(DOCFILES) $(PROCESSEDDOCFILES) + for f in $(DOCFILES); do \ + $(RM) $(DESTDIR)$(docdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(docdir)/$$f; \ + done + for f in $(PROCESSEDDOCFILES); do \ + $(RM) $(DESTDIR)$(docdir)/$$f; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ + done + +install_infodoc: install_always groff.info # Prefer info files in builddir over srcdir; we test for # the existence of `groff.info'. -test -d $(DESTDIR)$(infodir) || $(mkinstalldirs) $(DESTDIR)$(infodir) - d=.; \ - test -f "groff.info" || d=$(srcdir); \ + d=.; test -f "groff.info" || d=$(srcdir); \ for p in $$d/groff.info `ls $$d/groff.info*`; do \ f=`basename $$p`; \ - rm -f $(DESTDIR)$(infodir)/$$f; \ + $(RM) $(DESTDIR)$(infodir)/$$f; \ $(INSTALL_DATA) $$p $(DESTDIR)$(infodir)/$$f; \ done $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) \ $(DESTDIR)$(infodir)/groff.info - -test -d $(DESTDIR)$(docdir) || $(mkinstalldirs) $(DESTDIR)$(docdir) - for f in $(DOCFILES); do \ - rm -f $(DESTDIR)$(docdir)/$$f; \ - $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(docdir)/$$f; \ - done - for f in $(PROCESSEDDOCFILES); do \ - rm -f $(DESTDIR)$(docdir)/$$f; \ - $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f; \ - done -# Prefer gnu.eps in builddir over srcdir. - -test -d $(DESTDIR)$(exampledir) \ - || $(mkinstalldirs) $(DESTDIR)$(exampledir) - d=.; \ - test -f "gnu.eps" || d=$(srcdir); \ - rm -f $(DESTDIR)$(exampledir)/gnu.eps; \ - $(INSTALL_DATA) $$d/gnu.eps $(DESTDIR)$(exampledir)/gnu.eps - for f in $(EXAMPLEFILES); do \ - rm -f $(DESTDIR)$(exampledir)/$$f; \ - $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(exampledir)/$$f; \ - done - for f in $(PROCESSEDEXAMPLEFILES); do \ - rm -f $(DESTDIR)$(exampledir)/$$f; \ - $(INSTALL_DATA) $$f $(DESTDIR)$(exampledir)/$$f; \ - done -install_html: $(HTMLDOCFILES) $(HTMLEXAMPLEFILES) +install_htmldoc: install_always $(HTMLDOCFILES) -test -d $(DESTDIR)$(htmldocdir) \ || $(mkinstalldirs) $(DESTDIR)$(htmldocdir) for f in `ls $(HTMLDOCFILESALL)`; do \ - rm -f $(DESTDIR)$(htmldocdir)/$$f; \ + $(RM) $(DESTDIR)$(htmldocdir)/$$f; \ $(INSTALL_DATA) $$f $(DESTDIR)$(htmldocdir)/$$f; \ done -test -d $(DESTDIR)$(htmldocimagedir) \ || $(mkinstalldirs) $(DESTDIR)$(htmldocimagedir) - rm -f $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES) + $(RM) $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES) $(INSTALL_DATA) $(imagedir)/$(HTMLDOCIMAGEFILES) \ $(DESTDIR)$(htmldocimagedir) + +install_examples: install_always install_examples_always \ + $(make_install_htmlexamples) + +install_examples_always: gnu.eps $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) +# Prefer gnu.eps in builddir over srcdir. -test -d $(DESTDIR)$(exampledir) \ || $(mkinstalldirs) $(DESTDIR)$(exampledir) + d=.; test -f "gnu.eps" || d=$(srcdir); \ + $(RM) $(DESTDIR)$(exampledir)/gnu.eps; \ + $(INSTALL_DATA) $$d/gnu.eps $(DESTDIR)$(exampledir)/gnu.eps + for f in $(EXAMPLEFILES); do \ + $(RM) $(DESTDIR)$(exampledir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(exampledir)/$$f; \ + done + for f in $(PROCESSEDEXAMPLEFILES); do \ + $(RM) $(DESTDIR)$(exampledir)/$$f; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(exampledir)/$$f; \ + done + +install_htmlexamples: install_examples_always $(HTMLEXAMPLEFILES) for f in `ls $(HTMLEXAMPLEFILESALL)`; do \ - rm -f $(DESTDIR)$(exampledir)/$$f; \ + $(RM) $(DESTDIR)$(exampledir)/$$f; \ $(INSTALL_DATA) $$f $(DESTDIR)$(exampledir)/$$f; \ done -test -d $(DESTDIR)$(exampleimagedir) \ || $(mkinstalldirs) $(DESTDIR)$(exampleimagedir) - rm -f $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES) + $(RM) $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES) $(INSTALL_DATA) $(imagedir)/$(HTMLEXAMPLEIMAGEFILES) \ $(DESTDIR)$(exampleimagedir) -uninstall_sub: - $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)$(infodir) \ +uninstall_sub: uninstall_always \ + $(make_uninstall_infodoc) $(make_uninstall_htmldoc) \ + $(make_uninstall_examples) + +uninstall_always: + -for f in $(DOCFILES) $(PROCESSEDDOCFILES); do \ + $(RM) $(DESTDIR)$(docdir)/$$f; \ + done + +uninstall_infodoc: uninstall_always + -$(INSTALL_INFO) --remove --info-dir=$(DESTDIR)$(infodir) \ $(DESTDIR)$(infodir)/groff.info -for f in groff `ls groff.info*`; do \ - rm -f $(DESTDIR)$(infodir)/$$f; \ - done - -for f in $(DOCFILES) $(PROCESSEDDOCFILES); do \ - rm -f $(DESTDIR)$(docdir)/$$f; \ + $(RM) $(DESTDIR)$(infodir)/$$f; \ done + +uninstall_htmldoc: uninstall_always -for f in `ls $(HTMLDOCFILESALL)`; do \ - rm -f $(DESTDIR)$(htmldocdir)/$$f; \ + $(RM) $(DESTDIR)$(htmldocdir)/$$f; \ + done + $(RM) $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES) + -test -d $(DESTDIR)$(htmldocimagedir) && \ + rmdir $(DESTDIR)$(htmldocimagedir) + +uninstall_examples: uninstall_always uninstall_examples_always \ + $(make_uninstall_htmlexamples) + -test -d $(DESTDIR)$(exampledir) && \ + rmdir $(DESTDIR)$(exampledir) + +uninstall_examples_always: + -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \ + $(RM) $(DESTDIR)$(exampledir)/$$f; \ + done + $(RM) $(DESTDIR)$(exampledir)/gnu.eps + +uninstall_htmlexamples: uninstall_examples_always + -for f in `ls $(HTMLEXAMPLEFILESALL)`; do \ + $(RM) $(DESTDIR)$(exampledir)/$$f; \ done - -rm -f $(DESTDIR)$(htmldocimagedir)/$(HTMLDOCIMAGEFILES) - -rmdir $(DESTDIR)$(htmldocimagedir) - -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) \ - `ls $(HTMLEXAMPLEFILESALL)`; do \ - rm -f $(DESTDIR)$(exampledir)/$$f; \ - done - -rm -f $(DESTDIR)$(exampledir)/gnu.eps - -rm -f $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES) - -rmdir $(DESTDIR)$(exampleimagedir) + $(RM) $(DESTDIR)$(exampleimagedir)/$(HTMLEXAMPLEIMAGEFILES) + -test -d $(DESTDIR)$(exampleimagedir) && \ + rmdir $(DESTDIR)$(exampleimagedir) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/doc/meintro_fr.me groff-1.22.3/doc/meintro_fr.me --- groff-1.22.2/doc/meintro_fr.me 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/doc/meintro_fr.me 2014-11-04 09:38:35.561519796 +0100 @@ -0,0 +1,2268 @@ +.\" -*- mode: nroff; coding: utf-8; -*- +.\" +.\" Copyright (c) 1986 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" @(#)intro.me 6.4 (Berkeley) 7/17/89 +.\" +.\" Modified for groff by jjc@jclark.com. +.\" +.\" Translated to French by Grégoire Babey +.\"UC 7 +.ll 6.5i +.lt 6.5i +.ds MO @VERSION@ +.nr si 3n +.he 'GROFF EN OPTION \-ME''%' +.\"eh 'USD:22-%''Writing Papers with NROFF using \-me' +.\"oh 'Writing Papers with NROFF using \-me''USD:22-%' +.ds U \s-1UNIX\s0 +.ds N \s-1NROFF\s0 +.ds T \s-1TROFF\s0 +.ds G \s-1GROFF\s0 +.+c +.(l C +.sz 14 +.b "Rédiger des documents avec GROFF \-me" +.sz +.sp 2 +.ul +Eric P. Allman +.sp +Projet INGRES +Electronics Research Laboratory +University of California, Berkeley +Berkeley, California 94720 +.sp 2 +.i "Modifié pour \*G by James Clark" +.sp 2 +.i "Adapté au français par Grégoire Babey" +.)l +.sp 2 +.pp +Ce document décrit les outils de traitement de texte +sur un système \*U\(lz +.(f +\(lz\*U est une marque déposée de AT&T Bell Laboratories +.)f +fournis par \*G +et le +paquet de macros +\-me. +Il présuppose que le lecteur +est déjà familiarisé avec les systèmes \*U +et un éditeur de texte +(tel que par exemple +.b ex +). +Son intention est d'être une introduction +simple et concrète, et par conséquent, +il ne traitera pas toute la matière disponible. +En particulier, +de nombreuses variantes et fonctionnalités supplémentaires +du paquet de macros \-me ne seront pas décrites. +Pour une discussion plus complète de telle ou telle fonctionnalité, voyez +.ul +The \-me Reference Manual +et +.ul +The \*N/\*T Reference Manual. +.pp +\*G, est un logiciel +fonctionnant sur le système d'exploitation \*U. +Il lit un fichier d'entrée +préparé par l'utilisateur +et sort un texte formaté, +prêt à être publié ou mis en page. +Le fichier d'entrée est formé de +.i texte , +les mots destinés à être imprimés, +et de +.i requêtes , +qui donnent des instructions au programme \*G +et lui indiquent quelle forme donner à la copie imprimée. +.br +.sp +Chapitre 1: décrit les éléments de base du traitement de texte. + +Chapitre 2: décrit les requêtes de base. + +Chapitre 3: introduit les mises en évidence: citations, tableaux, figures. + +Chapitre 4: annotations (notes en bas de page, texte différé, index). + +Chapitre 5: requêtes plus complexes, n'ayant pu être traitées au chapitre 2. + +Chapitre 6: les choses que vous devez savoir pour pouvoir rédiger des documents. +.sp 2 +.br +Si vous êtes novice, vous ne voudrez sans doute pas attendre d'avoir lu jusqu'au chapitre 4 pour tester par vous mêmes les fonctions de base du programme. +Quand votre texte sera prêt à être traité, +appelez le formateur \*G en tapant +cette commande dans votre shell \*U (ou terminal): +.(b +groff \-me \-k \ foo > \ foo.ps +.)b +L'option -k tient compte des caractères accentués propres au français. +.br +Remplacez foo par le nom de votre fichier qui devra être en un mot. +.br +Le fichier devra être placé dans votre répertoire personnel, sinon remplacez foo par le chemin du fichier. +.br +À la place de .ps, vous pouvez mettre .pdf ou le format que vous désirez obtenir. +.sp +Vous trouverez un description plus complète des options pour la commande \*G en tapant +.b "man groff" +dans votre terminal ou console. +.pp +Le mot +.i argument +est utilisé dans ce manuel +pour décrire un mot ou un nombre +qui apparait sur la même ligne qu'une requête +en modifiant le sens de cette requête. +Par exemple, +la requête +.(b +\&.sp +.)b +met un espace après une ligne, +mais +.(b +\&.sp 4 +.)b +met 4 espaces après une ligne. +Le nombre +.b 4 +est un +.i argument +de la requête +.b .sp +qui lui dit d'espacer de quatre lignes +au lieu d'une. +Les arguments sont séparés de la requête et des autres arguments +par un espacement. +.sh 1 "Éléments de base du traitement de texte" +.pp +La fonction primaire +de \*G +est de +.i collecter +des mots sur les lignes du fichier d'entrée, de +.i remplir +de ces mots les lignes du ficher de sortie, de +.i justifier +le texte sur la marge de droite +en insérant des espaces supplémentaires entre les mots, +et de rendre le fichier de sortie. +Par exemple, +l'entrée: +.(b +Maintenant il est temps +pour tous les hommes bons +de venir en aide +à leur parti. +Il y a quatre-vingt-sept ans... +.)b +sera lu, +rendu dans des lignes de sortie, +et justifié, +ce qui produira: +.(b F +Maintenant il est temps +pour tous les hommes bons +de venir en aide +à leur parti. +Il y a quatre-vingt-sept ans... +.)b +Parfois, vous désirerez commencer une nouvelle ligne, même si la ligne actuelle n'est pas encore pleine; +par exemple, +à la fin d'un paragraphe. +Pour y parvenir, +vous pouvez provoquer une +.i interruption: +une ligne d'entrée vide, ou une nouvelle ligne commençant par un espacement +provoquent le début d'une nouvelle ligne. +Certaines requêtes provoquent automatiquement une interruption. +.pp +Les lignes d'entrée ne sont pas toutes destinées à être formatées (voir plus bas). +Certaines lignes sont des +.i requêtes +qui décrivent +comment le texte doit être formaté. +Les requêtes commencent toujours par un point ou une apostrophe +(\c +.q "\|\(aa\|" ). +.pp +Le formateur de texte effectue aussi des tâches plus complexes, +comme la numérotation automatique des pages, +le saut de page automatique, +le placement des notes en bas de page au bon endroit, +et ainsi de suite. +.pp +Je peux vous donner quelques conseils +comment préparer votre texte d'entrée pour \*G. +Premièrement, +écrivez des lignes d'entrée courtes. +Des lignes d'entrée courtes seront plus faciles à modifier, +et de toutes façons, \*G les saisira pour vous en lignes plus longues. +En accord avec cette idée, +il est pratique de commencer une +nouvelle ligne après +chaque virgule ou point, +puisque habituellement les corrections consistent à +modifier ou supprimer des propositions ou des phrases. +Deuxièmement, +n'ajoutez pas d'espacements à la fin des lignes, +ceci pourrait en certains cas induire en erreur le processeur \*N. +Troisièmement, +ne séparez pas vous-même les mots en fin de ligne avec des traits d'union +(excepté les mots qui en contiennent naturellement, +comme +.q belle-mère ); +\*G est assez futé pour séparer pour vous les mots qui doivent l'être, +mais il ne l'est pas assez pour réunir les syllabes +que vous auriez séparées vous-même. +Ainsi, +des mots tels que +.q belle-mère +ne devraient pas être écrit sur deux lignes, +sinon vous obtiendrez un espacement là ou vous n'en vouliez pas, +comme ici par exemple: +.tr @- +.nh +.q "belle@\ mère" . +.br +.tr @@ +.hy 14 +.sh 1 "Requêtes de base" +.sh 2 "Paragraphes" +.pp +On commence un nouveau paragraphe +en utilisant la requête +.b .pp . +Par exemple, +l'entrée: +.(b +\&.pp +Maintenant il est temps pour tous les hommes bons +de venir en aide à leur parti. +Il y a quatre-vingt-sept ans... +.)b +donne un ligne d'espacement, suivie d'une ligne indentée. +Le résultat est: +.(b F +.ti +\n(piu +Maintenant il est temps pour tous les hommes bons +de venir en aide à leur parti. +Il y a quatre-vingt-sept ans... +.)b +.pp +Notez que les phrases d'un paragraphes ne +.i "devront pas" +commencer par un espacement, +puisque une ligne d'espacement ou un espace en début de ligne +provoque une interruption. +Par exemple, +si je tapais: +.(b +\&.pp +Maintenant il est temps pour tous les hommes bons + de venir en aide à leur parti. +Il y a quatre-vingt-sept ans... +.)b +La sortie serait: +.(b F +.ti +\n(piu +Maintenant il est temps pour tous les hommes bons + de venir en aide à leur parti. +Il y a quatre-vingt-sept ans... +.)b +Une nouvelle ligne commence après le mot +.q bons +parce que la deuxième ligne d'entrée a été commencée avec un espacement. +.pp +Il existe beaucoup de types de paragraphes plus élaborés, +qui seront décrits plus tard. +.sh 2 "En-têtes et pied de page " +.pp +On peut ajouter si on veut des en-têtes et des pieds de page. +Deux requêtes +ayant la forme de +.b .he \ \c +.i titre +and +.b .fo \ \c +.i titre +définissent les titres à mettre respectivement en haut et en pied de page. +Ces titres sont appelés titres +.i "en trois parties" +: +une première partie est justifiée sur la gauche, la deuxième est centrée, la troisième justifiée sur la droite. Les trois parties sont séparées par des apostrophes. +Le signe %, si il est présent dans le titre, sera automatiquement remplacé par le numéro de page courant. +Par exemple l'entrée: +.(b +\&.he \(aa\(aa%\(aa\(aa +.)b +donnera le numéro de page courant centré sur chaque page. +.(b +\&.he \(aa\(aa\(aa%\(aa +.)b +donnera le numéro de page jusifié à droite sur chaque page. +.(b +\&.he \(aaGroff -me\(aaTraduction\(aa%\(aa +.)b +donnera à gauche "Groff -me", au centre "Traduction" et à droite le numéro de page courant. +.br +Les éléments de l'en-tête peuvent débuter par n'importe quelle lettre, mais antislash et guillemets sont à éviter. +La commande +.b .fo +fonctionne de manière analogue. +.sh 2 "Double espacement" +.pp +.ls 2 +\*G insère un double espacement vertical dans le texe de sortie +si vous utilisez la requête +.b ".ls\ 2" , +comme cela a été fait ici. +Vous pouvez retourner à l'espacement vertical simple en tapant +.b ".ls\ 1" . +.ls 1 +.sh 2 "Layout de la page" +.pp +Un certain nombre de requêtes vous permettent de modifier la présentation de la copie imprimée, ce qu'on appelle le +.i layout +de la page de sortie. +La plupart de ces requêtes ajustent dans le texte des +.q "espaces blancs" +(espacement, espacement vertical). +Dans les explications qui suivent, les caractères en italique +doivent être remplacés par les valeurs que vous souhaitez; +les caractères gras +devront être tapés tels quels. +.pp +La requête +.b .bp +commence une nouvelle page. +.pp +La requête +.b .sp \ \c +.i N +laisse +.i N +lignes d'espacement vertical. +.i N +peut être négligé +(dans ce cas, il n'y aura qu'une ligne d'espacement), +ou peut prendre la forme +.i N \^\c +.b i +(pour +.i N +pouces) +or +.i N \^\c +.b c +(pour +.i N +centimètres). +Par exemple, l'entrée: +.(b +\&.sp 3.5c +Mes pensées sur le sujet +\&.sp +.)b +laissera trois centimètres et demi d'espace sur la gauche, +suivis de la ligne +.q "Mes pensées sur le sujet" , +suivie elle-même d'un espacement vertical. +.pp +La requête +.b .in \ \c +.i +N +change le nombre d'espacements sur la gauche de la page +(l' +.i indentation). +L'argument +.i N +peut avoir la forme +.b + \c +.i N +(ce qui veut dire +.i N +espacements de plus que ce qu'il y avait avant), +.b \- \c +.i N +(ce qui veut dire +.i N +espacements de moins que ce qu'il y avait avant), +ou juste +.i N +(ce qui veut dire exactement +.i N +espacements). +.i N +peut aussi avoir la forme +.i N \^\c +.b i +ou +.i N \^\c +.b c . +Par exemple, +l'entrée: +.(b +texte initial +\&.in 5 +plus de texte +\&.in +1i +encore plus de texte +\&.in \-2c +fin du texte +.)b +produit +.q "texte initial" +justifié à gauche +.q "plus de texte" +indenté à 5 espacements +de la marge de gauche, +.q "encore plus d texte" +indenté à 5 espacements +plus un pouce +de la marge de gauche +(15 espacements sur une machine à écrire à picas), +et +.q "fin du texte" +à 5 espacements +plus un pouce +moins deux centimètres +de la marge de gauche. +C'est à dire la sortie suivante: +.(b +texte initial +.in +5 +plus de texte +.in +1i +encore plus de texte +.in -2c +fin du texte +.)b +.pp +La requête +.b .ti \ \c +.i +N +(indentation temporaire) +est utilisée de la même manière que +.b .in \ \c +.i +N +quand l'indentation ne concerne qu'une seule ligne, +après quoi on retourne à l'indentation initiale. +Par exemple, +l'entrée: +.(b +\&.in 1i +\&.ti 0 +Ware, James R. The Best of Confucius, +Halcyon House, 1950. +Un livre excellent, +qui présente en traduction (anglaise) +les phrases les plus délicieuses de Confucius. +Décidément un passage obligé +pour tous ceux qui s'intéressent +au fondements primitifs de la philosophie chinoise. +.)b +produira: +.sp 2 +.in 1i+\n($iu +.ti \n($iu +Ware, James R. The Best of Confucius, +Halcyon House, 1950. +Un livre excellent, qui présente +en traduction (anglaise) les phrases les plus délicieuses de Confucius. +Décidément un passage obligé pour tous ceux qui s'intéressent au fondements primitifs de la philosophie chinoise. +.pp +Les lignes de texte peuvent être centrées en utilisant la requête +.b .ce . +La ligne qui suit +.b .ce +est centrée (horizontalement) +sur la page. +Pour centrer plus qu'une ligne, +utilisez +.b .ce \ \c +.i N +(où +.i N +est le nombre de lignes à centrer), +suivi de +.i N +lignes. +Si vous voulez centrer plusieurs lignes, mais vous vous refusez à les compter, +tapez: +.(b +\&.ce 1000 +lignes à centrer +\&.ce 0 +.)b +Cette requête +.b ".ce\ 0" +dit à \*G de ne centrer plus que 0 lignes, +c'est à dire, +d'arrêter de centrer. +.pp +Toutes ces requêtes provoquent une interruption; +c'est à dire qu'elles commencent toutes une nouvelle ligne. +Si vous voulez commencer une nouvelle ligne sans rien faire d'autre, +utilisez +.b .br . +.sh 1 "Mises en évidences" +.pp +Les mises en évidences sont des passages de textes sortis du corps de texte. +Citations, +tableaux +et figures +sont des types de mise en évidence, +comme le sont tous les exemples +exposés dans ce document. +Toutes les mises en évidence, +exceptés les blocs centrés, +sont précédés et suivis en sortie d'un seul espacement vertical. +.sh 2 "Citations longues" +.pp +Les citations longues +sont des citations qui s'étalent sur plusieurs lignes, +elles sont donc sorties du corps de texte +et ne sont pas entourées de guillemets. +Cela peut être réalisé +en utilisant les commandes +.b .(q +et +.b .)q +entourant la citation. +Par exemple, +l'entrée: +.(b +Comme l'indique Weizenbaum: +\&.(q +On dit qu'expliquer, c'est expliquer en s'éloignant. +Cette maxime ne s'accomplit nulle part aussi bien +que dans le domaine de la programmation informatique,... +\&.)q +.)b +génère comme sortie: +.lp +Comme l'indique Weizenbaum: +.(q +On dit qu'expliquer, c'est expliquer en s'éloignant. +Cette maxime ne s'accomplit nulle part aussi bien +que dans le domaine de la programmation informatique,... +.)q +.sh 2 "Listes" +.pp +Une +.i liste +est une mise en évidence +indentée, +à espacements simples, +non justifiée. +On devrait utiliser une liste +quand le matériel à imprimer +ne doit pas être justifié comme un texte normal, +tels les colonnes de figures +ou les exemples utilisés dans ce document. +Les listes sont encadrées par les requêtes +.b .(l +et +.b .)l . +Par exemple, +tapez: +.(b +La famille des Équidés comprend: +\&.(l +les chevaux +les ânes +les hémiones +les zèbres +\&.)l +.)b +cela produira: +.br +La famille des Équidés comprend: +.(l +les chevaux +les ânes +les hémiones +les zèbres +.)l +.sh 2 "Clos" +.pp +Un +.i clos +est un ensemble de lignes mises en évidences +que l'on désire garder sur la même page +si possible. +Par exemple un diagramme. +Les clos diffèrent des listes. +Les listes peuvent être réparties sur plusieurs pages, +tandis que les clos ne peuvent pas l'être. +.pp +Les blocs sont un genre primitif de clos. +Ils débutent avec la requête +.b .(b +et se terminent avec la requête +.b .)b . +Si il n'y a pas de place sur la page courante +pour y placer le bloc entier, +il sera placé sur une nouvelle page. +Cela a pour effet déplaisant de laisser +un espace blanc en fin de page. +Quand cela n'est pas approprié, +vous pouvez user d'une alternative +appelée +.i "clos flottants" . +.pp +Les +.i "clos flottants" +se déplacent dans le texte. +Donc, +il sont appropriés pour les choses +auxquelles on se réfère nommément, comme +.q "voir Figure 3" . +Un clos flottant apparaîtra +au bas de la page courante +si il y a la place; +autrement, +il apparaîtra +sur la page suivante. +Les clos flottants commencent par +.b .(z +et finissent par +.b .)z . +Comme exemple de clos flottant, +voir figure 1. +.(z +.in 1i +.xl -1i +.hl +\&.(z +\&.hl +Texte du clos flottant +\&.sp +\&.ce +Figure 1. Exemple de clos flottant. +\&.hl +\&.)z +.sp +.ce +Figure 1. Exemple de clos flottant. +.hl +.)z +La requête +.b .hl +est utilisée +pour dessiner une ligne horizontale +de sorte que la figure +soit séparée du texte. +.sp 15 +.sh 2 "Mises en évidences plus élaborées" +.pp +Les clos et les listes sont normalement collectés en mode +.i non-justifié . +Ils sont donc propres à contenir des tableaux et autres. +Si vous voulez obtenir une mise en évidence +en mode justifié +(pour du texte), +tapez +.b ".(l\ F" +[Tout au long de ce chapitre, +les remarques s'appliquant à +.b .(l +s'appliquent aussi à +.b .(b +et +.b .(z ]. +Cette espèce de mise en évidence +sera indentée des deux côtés. +Par exemple, +l'entrée: +.(b +\&.(l F +Et maintenant les garçons et les filles, +un jouet plus grand, plus beau que tout ce qui a existé auparavant! +Soyez le premier, la première de votre quartier +à posséder votre propre ordinateur! +Oui les enfants, vous aussi vous pouvez posséder +une de ces machines à gérer les informations. +Vous aussi vous pouvez produire de beaux papiers formatés +sans même remuer le petit doigt! +\&.)l +.)b +donnera en sortie: +.(b F +Et maintenant les garçons et les filles, +un jouet plus grand, plus beau que tout ce qui a existé auparavant! +Soyez le premier, la première de votre quartier +à posséder votre propre ordinateur! +Oui les enfants, vous aussi vous pouvez posséder +une de ces machines à gérer les informations. +Vous aussi vous pouvez produire de beaux papiers formatés +sans même remuer le petit doigt! +.)b +.pp +Par exemple, +pour obtenir une liste justifiée, +alignée sur la gauche, entrez: +.(b +\&.(l L F +Et maintenant les garçons et les filles, +un jouet plus grand, plus beau que tout ce qui a existé auparavant! +Soyez le premier, la première de votre quartier +à posséder votre propre ordinateur! +Oui les enfants, vous aussi vous pouvez posséder +une de ces machines à gérer les informations. +Vous aussi vous pouvez produire de beaux papiers formatés +sans même remuer le petit doigt! +\&.)l +.)b +Ce qui donnera: +.(l L F +Et maintenant les garçons et les filles, +un jouet plus grand, plus beau que tout ce qui a existé avant! +Soyez le premier, la première de votre quartier +à posséder votre propre ordinateur! +Oui les enfants, vous aussi vous pouvez posséder +une de ces machines à gérer les informations. +Vous aussi vous pouvez produire de beaux papiers formatés +sans même remuer le petit doigt! +.)l +.pp +Normalement, les listes et les blocs sont indentés +(les clos flottant sont normalement alignés sur la gauche). +Pour obtenir une liste +alignée sur la gauche, +tapez +.b ".(l\ L" . +Pour obtenir une ligne centrée +ligne après ligne, +tapez +.b ".(l C" . +L'entrée: +.(b +\&.(l +première ligne d'une mise en évidence non-justifiée +lignes suivantes +\&.)l +.)b +produit un texte indenté: +.(b +première ligne d'une mise en évidence non-justifiée +lignes suivantes +.)b +En tapant +.b L +après la requête +.b .(l +cela produira le même résultat, mais aligné à gauche: +.(b L +première ligne d'une mise en évidence non-justifiée +lignes suivantes +.)b +Si vous utilisez +.b C +à la place de +.b L +vous obtenez une liste centrée: +.(b C +première ligne d'une mise en évidence non-justifiée +lignes suivantes +.)b +.pp +Parfois, +vous voudrez centrer +plusieurs lignes en groupe +plutôt que de centrer ligne par ligne. +Pour le faire, +utilisez les blocs centrés +qui sont produits par les requêtes +.b .(c +et +.b .)c . +Toutes les lignes sont centrées en tant que groupe. +La ligne la plus longue est centrée par rapport aux marges +et les lignes plus courtes sont alignées sur la plus longue. +Notez que si vous utilisez un bloc centré, +les lignes ne bougent pas les unes par rapport aux autres, +tandis qu'elles le feront si vous utilisez l'argument +.b C +pour les clos. +.pp +Les blocs centrés ne sont +.i pas +des clos, +et peuvent même être combinés +avec eux comme nous allons le voir. +Par exemple, +pour centrer des lignes +en groupe +et les garder +sur une même page, +utilisez: +.(b +\&.(b L +\&.(c +première ligne d'une mise en évidence non-justifiée +lignes suivantes +\&.)c +\&.)b +.)b +ce qui produira: +.(b L +.(c +première ligne d'une mise en évidence non-justifiée +lignes suivantes +.)c +.)b +Sans les requêtes +(\c +.b .(b +et +.b .)b ) +le résultat aurait été le même, +mais sans garantie +que les lignes du bloc centré +aient été sur la même page. +Notez l'usage de l'argument +.b L +après +.b .(b . +Il fait en sorte +que le bloc se centre +sur toute la longueur de la ligne +plutôt que sur la longueur de ligne raccourcie de l'indentation. +Aussi, +la requête demandant de centrer +doit être placée +.i à \ l'intérieur +de la requête formant le clos. +.sh 1 "Annotations" +.pp +Un certain nombre de requêtes +servent à mettre du texte de côté +pour l'imprimer plus tard, comme les +.i "notes en bas de page" +qui sont imprimées au bas de la page courante. +.br +Le +.i "texte différé" +est en quelque sorte une variante de la +note en bas de page; +le texte n'est imprimé +qu'au moment où on fait appel à lui, +par exemple à la fin de chaque chapitre. +.br +Les +.i Index +sont un genre de texte différé +ayant un numéro de rappel +(habituellement le numéro de la page) +attaché à chaque entrée +après une rangée de points. +Les Index sont aussi mis de côté +jusqu'à ce qu'on fasse explicitement appel à eux. +.sh 2 "Notes en bas de page" +.pp +Une note en bas de page commence avec la requête +.b .(f +et se termine avec la requête +.b .)f . +La note en bas de page courante +est maintenue automatiquement, +et peut être utilisée en tapant \e**, +ce qui produira un numéro de note\**. +.(f +\**Comme celui-ci. +.)f +Le numéro est automatiquement incrémenté +après chaque note en bas de page. +Par exemple, +l'entrée: +.(b +\&.(q +Un homme qui n'est pas honnête +et qui, en même temps, est présomptueux; +un homme qui n'est pas attentif +et qui, en même temps, est ignorant; +un homme qui est rempli de mensonge +et qui, en même temps, est incompétent; +un tel homme ne fait pas partie de mes relations.\e** +\&.(f +\e**Traduit de :James R. Ware, +\&.ul +The Best of Confucius, +Halcyon House, 1950. +Page 77. +\&.)f +\&.)q +.)b +génère le résultat suivant: +.(q +Un homme qui n'est pas honnête +et qui, en même temps, est présomptueux; +un homme qui n'est pas attentif +et qui, en même temps, est ignorant; +un homme qui est rempli de mensonge +et qui, en même temps, est incompétent; +un tel homme ne fait pas partie de mes relations.\** +.(f +\**Traduit de: James R. Ware, +.ul +The Best of Confucius, +Halcyon House, 1950. +Page 77. +.)f +.)q +Il est important que la note en bas de page +apparaisse +.i "à l'intérieur" +de la citation, +ainsi vous serez sûr +qu'elle +apparaîtra +sur la même page +que la citation. +.sh 2 "Texte différé" +.pp +Le texte différé +ressemble beaucoup à la note en bas de page +sauf qu'il est imprimé seulement +si on fait explicitement appel à lui. +Cela permet de faire apparaître par exemple +une liste de références +à la fin de chaque chapitre, +ce qui est une convention dans certaines disciplines. +Utilisez +.b \e*# +pour le texte différé +en lieu et place du +.b \e** +des notes en bas de page. +.pp +Si vous faites du texte différé +votre moyen habituel de noter les références, +vous pourrez toujours utiliser en parallèle +les notes en bas de page, +mais, comme référence, +vous utiliserez alors des signes spéciaux* +.(f +*comme un astérisque (!) +.)f +plutôt que des numéros. +.br +Pour faire apparaître une note en bas de page munie d'un signe spécial comme celle que vous admirez ci- dessus, entrez: +.br +\&...vous utiliserez alors des signes spéciaux*. +.br +Suivi de: +.(b +\&.(f +.br +*comme un astérisque (!). +.br +\&.)f +.)b +.sh 2 "Index" +.pp +Un +.q index +(ou plutôt table des matières +puisque les éléments ne sont pas classés +par ordre alphabétique) +ressemble au texte différé, +par le fait qu'il est gardé en réserve +jusqu'à ce qu'on fasse appel à lui. +Cependant, +chaque élément de l'index +a un numéro de page +(ou un autre signe distinctif) +à la fin de la dernière ligne le décrivant, +à la suite d'une rangée de points (voir ci-dessous). +.pp +Les entrées pour l'index +commencent avec +.b .(x +et finissent avec +.b .)x . +Dans chaque chapitre +dont vous voulez qu'il apparaisse dans l'index, +introduisez une telle requête +en répétant l'énoncé du titre**. +.(f +**Voir aussi le plan de thèse exposé au chapitre 5.3. +.)f +La requête +.b .)x +peut avoir un argument, +quand on veut formuler soi-même +une valeur prenant la place du +.q "numéro de page" . +Sans argument, c'est le numéro de page où se trouve la requête qui sera utilisé automatiquement. +Si le numéro de page donné est un trait de soulignage +(\c +.q _ ) +aucun numéro de page +ou ligne de points ne sera imprimé. +Pour obtenir une ligne de points +sans numéro de page, +tapez +.b ".)x """"" , +ce qui signifie qu'il n'y a pas de numéro de page. +.pp +La requête +.b .xp +imprime l'index. +.pp +Par exemple, +l'entrée: +.(b +\&.(x +Cire à cacheter +\&.)x +\&.(x +Des choux et des rois +\&.)x _ +\&.(x +Pourquoi la mer bout +\&.)x 2.5a +\&.(x +Si les cochons avaient des ailes +\&.)x "" +\&.(x +Ceci est une entrée d'index terriblement longue, +comme on pourrait en avoir besoin pour +une liste d'illustrations, de tableaux, ou de figures; +je m'attends à ce qu'elle fasse au moins deux lignes. +\&.)x +\&.xp +.)b +génère: +.(x +Cire à cacheter +.)x +.(x +Des choux et des rois +.)x _ +.(x +Pourquoi la mer bout +.)x 2.5a +.(x +Si les cochons avaient des ailes +.)x "" +.(x +Ceci est une entrée d'index terriblement longue, +comme on pourrait en avoir besoin pour +une liste d'illustrations, de tableaux, ou de figures; je m'attends à ce qu'elle fasse au moins deux lignes. +.)x +.xp +.pp +La requête +.b .(x +peut avoir comme argument +un caractère unique, +qui spécifie le +.q nom +de l'index; +l'index normal répond à la requête +.b x . +Donc, +on peut maintenir plusieurs +.q indices +simultanément** +.(f +**Voir aussi le plan de thèse exposé au chapitre 5.3 +.)f +(un pour la liste des tableaux, un pour la table des matières, etc.). +.pp +Notez que l'index doit +être imprimé à la +.i fin +du document, +plutôt qu'au début +où il apparaîtra sans doute +(en temps que table des matières); +les pages devront peut-être être réarrangées physiquement après impression. +.sh 1 "Fonctionnalités plus complexes" +.pp +Il existe un grand nombre d'autres possibilités, +notamment des requêtes +qui fournissent d'autres types de paragraphes, +des chapitres numérotés en forme +.b 1.2.3 +(comme ils le sont dans le présent document), +et l'impression sur plusieurs colonnes. +.sh 2 "Autres types de paragraphes" +.pp +Généralement, les paragraphes +commencent par un espacement vertical et +la première ligne est indentée. +On peut obtenir des paragraphes justifiés +et alignés à gauche +en utilisant +.b .lp +au lieu de +.b .pp , +comme démontré au paragraphe suivant. +.lp +Parfois, vous voudrez utiliser des paragraphes dont le +.i corps +est indenté +et la première ligne +non-indentée +et munie d'un label. +Cela peut être réalisé grâce à la requête +.b .ip . +Un mot spécifié sur la même ligne que +.b .ip +est imprimé dans la marge, +et le corps du paragraphe est aligné +sur une position prédéfinie +(normalement cinq espacements). +Par exemple, +l'entrée: +.(b +\&.ip un +Ceci est le premier paragraphe. +Notez comment le reste de la première +ligne s'aligne +sur les autres lignes du paragraphe. +\&.ip deux +Et ici nous sommes déjà au second paragraphe. +Vous noterez que l'argument de \c +.b .ip +apparaît dans la marge. +\&.lp +Nous pouvons poursuivre ce texte... +.)b +produit comme sortie: +.ip un +Ceci est le premier paragraphe. +Notez comment le reste de la première +ligne s'aligne +sur les autres lignes du paragraphe. +.ip deux +Et ici nous sommes déjà au second paragraphe. +Vous noterez que l'argument de +.b .ip +apparaît dans la marge +.lp +Nous pouvons poursuivre ce texte sans +commencer un nouveau paragraphe indenté +en utilisant la requête +.b .lp . +.pp +Si vous avez des espacements +dans le label de la requête +.b .ip , +vous devrez utiliser un +.q "espacement inremplissable" +au lieu d'un espacement normal. +On crée celui-ci à l'aide d'un caractère antislash +(\c +.q \e ) +suivi d'un espacement. +Par exemple, +pour imprimer le label +.q "Partie 1" , +entrer: +.(b +\&.ip "Partie\e 1" +.)b +.pp +Si le label prévu pour un paragraphe indenté +(c'est à dire l'argument de +.b .ip ) +est plus long que l'espace prévu pour le label (cinq espacements), +.b .ip +commencera une nouvelle ligne après le label. +Par exemple, +l'entrée: +.(b +\&.ip label\ long +Ce paragraphe a un label long. +Le premier caractère du texte de la première ligne +ne s'alignera pas sur le texte de la seconde ligne et suivantes, +bien que celles-ci soient alignées entre elles. +.)b +produira: +.ip label\ long +Ce paragraphe a un label long. +Le premier caractère du texte de la première ligne +ne s'alignera pas sur le texte de la seconde ligne et suivantes, +bien que celles-ci soient alignées entre elles. +.pp +Il est possible de changer la taille du label +en utilisant un second argument +qui définit la taille du label. +Par exemple, +on pourra écrire l'exemple ci-dessus correctement +en disant: +.(b +\&.ip label\ long 10 +.)b +qui rendra l'indentation du paragraphe longue de +10 espacements pour ce paragraphe seulement. +Si vous avez plusieurs paragraphes à indenter +de la même longueur, +utilisez un +.i "registre de nombres" +.b ii . +Par exemple, pour laisser un pouce d'espace +avant le label, +tapez: +.(b +\&.nr ii 1i +.)b +quelque part avant le premier appel de +.b .ip . +Pour plus d'informations, voyez le +.i "Manuel de Référence" . +.pp +Si +.b .ip +est utilisé +sans aucun argument +aucun label ne sera imprimé. +Par exemple, +l'entrée: +.(b +\&.ip [a] +Ceci est le premier paragraphe de l'exemple. +Nous avons déjà vu ce genre d'exemples auparavant. +\&.ip +Ce paragraphe est aligné sur le précédent, +mais il n'a pas de label dans la marge. +.)b +produit la sortie: +.ip [a] +Ceci est le premier paragraphe de l'exemple. +Nous avons déjà vu ce genre d'exemples auparavant. +.ip +Ce paragraphe est aligné sur le précédent, +mais il n'a pas de label dans la marge. +.pp +Un cas spécial de +.b .ip +est +.b .np , +qui numérote automatiquement +les paragraphes de manière séquentielle à partir de 1. +La numérotation repart de 1 à la prochaine requête +.b .pp , +.b .lp , +or +.b .sh +(cette dernière est décrite au chapitre suivant). +Par exemple, +l'entrée: +.(b +\&.np +Ceci est le premier point. +\&.np +Ceci est le second point. +Les "points" sont juste des paragraphes normaux +auxquels on donne automatiquement un numéro +à l'aide de la requête .np. +\&.pp +Ce paragraphe remet la numérotation par .np à 1. +\&.np +Là par exemple, +nous avons recommencé la numérotation à 1. +.)b +génère: +.np +Ceci est le premier point. +.np +Ceci est le second point. +Les "points" sont juste des paragraphes normaux +auxquels on donne automatiquement un numéro +à l'aide de la requête .np. +.pp +Ce paragraphe remet la numérotation à 1 à cause de .pp. +.np +Là par exemple, +nous avons recommencé la numérotation à 1. +.pp +La requête +.b .bu +donne des listes de ce type, +qui sont identifiées par des puces +plutôt que par des numéros. +Les paragraphes sont aussi regroupés verticalement. +Par exemple, +l'entrée: +.(b +\&.bu +\&Un jaune d'oeuf +\&.bu +\&Une c.-à-s. de crème +\&.bu +\&Sel, poivre de Cayenne et jus de citron pour assaisonner +\&.bu +\&Deux bonnes c.-à-s. de beurre +.)b +produit\**: +.(f +\**Par ailleurs, +si vous mettez ces trois ingrédients +dans une cocotte assez haute, +et que vous remuez le tout comme un cinglé à feu moyen +(ne lâchez jamais l'anse de la cocotte) jusqu'à ce que le mélange ait la consistance d'une béchamel (ce qui prend juste une à deux minutes), si ensuite, vous retirez la cocotte du feu et vous incorporez le beurre, vous obtiendrez une délicieuse sauce hollandaise. +.)f +.bu +Un jaune d'oeuf +.bu +Une c.-à-s. de crème +.bu +Sel, poivre de Cayenne et jus de citron pour assaisonner +.bu +Deux bonnes c.-à-s. de beurre +.sh 2 "Titres de chapitres" +.pp +Les titres de chapitre +(comme ceux utilisés dans ce document) +peuvent être générés automatiquement +pa la requête +.b .sh . +Vous devez indiquer à la requête +.b .sh +la +.i profondeur +du numéro de chapitre +et le titre du chapitre. +La profondeur indique +combien de nombres doivent apparaître +(séparés par des points décimaux) +dans le numéro de chapitre. +Par exemple, +le numéro de chapitre +.b 4.2.5 +a une profondeur de trois. +.pp +Les numéros de chapitres +sont incrémentés +de façon assez intuitive. +Si vous ajoutez un numéro +(ce faisant, vous augmentez la profondeur), +le nouveau numéro commencera à 1. +Si vous enlevez un numéro de chapitre +(vous réduisez la profondeur) +ou que vous gardez +le même nombre de chapitre +(vous gardez la même profondeur), +le numéro final sera incrémenté. +Par exemple, +l'entrée: +.(b +\&.sh 1 "Le Préprocesseur" +\&.sh 2 "Concepts de base" +\&.sh 2 "Entrées de contrôle" +\&.sh 3 +\&.sh 3 +\&.sh 1 "Produire du code" +\&.sh 3 +.)b +donnera comme résultat: +.(b +.b +1. Le Préprocesseur +1.1. Concepts de base +1.2. Entrées de contrôle +1.2.1. +1.2.2. +2. Produire du code +2.1.1. +.)b +.pp +Vous pouvez spécifier le numéro de chapitre dès le départ +en plaçant le numéro de chapitre après le titre de chapitre, +en utilisant des espacements à la place des points. +Par exemple, +la requête: +.(b +\&.sh 3 "un autre chapitre" 7 3 4 +.)b +commencera par le chapitre ayant le numéro +.b 7.3.4 ; +toutes les requêtes +.b .sh +suivantes seront numérotées relativement à ce chapitre. +.pp +Il y a des fonctionnalités encore plus complexes +qui vont indenter le titre de chaque chapitre, +sous-chapitre, ou sous-sous-chapitre +relativement à sa profondeur. +Par exemple, si vous entrez: +.(b +\&.nr si \c +.i N +.)b +chaque titre et sous-titre sera indenté d'une quantité +.i N . +.i N +a un facteur d'échelle attaché, +c'est à dire qu'il doit avoir la forme +.i Nx , +où +.i x +indique de quelle unité est +.i N . +Les valeurs courantes pour +.i x +.b i +pour les pouces (inches), +.b c +pour les centimètres, +et +.b n +pour les +.i ens +(= une largeur de caractère). +Par exemple, +pour indenter chaque sous-chapitre +d'un demi-pouce, +tapez: +.(b +\&.nr si 0.5i +.)b +après cette requête, +les titre de chapitres seront indentés +d'un demi-pouce +par niveau de profondeur. +Par exemple, +le présent document a écrit +en ayant recours à la requête +.(b +\&.nr si 3n +.)b +au début du fichier d'entrée, +ce qui donne trois espacements d'indentation +par niveau de profondeur du chapitre. +.pp +Des numéros de chapitre +sans indentation automatique +peuvent être créés +grâce à la requête: +.(b +\&.uh "Titre" +.)b +qui fera un titre de chapitre, +sans numérotation. +.sh 2 "Les parties du document" +.pp +Certaines requêtes sont là pour +aider à mettre en forme le document. +La requête +.b .tp +initialise une page de titre. +Sur une page de titre, +il n'y a ni en-tête ni pied de page, et, +contrairement à ce qui se passe sur les autres pages, +vous pouvez laisser des grands espaces blancs +en haut de la page. +Par exemple, +une page de titre typique aura cette apparence: +.(b +\&.tp +\&.sp 7c +\&.(l C +LA CROISSANCE DES ONGLES D'ORTEILS +CHEZ LES PRIMATES SUPÉRIEURS +\&.sp +par +\&.sp +Frank N. Furter +\&.)l +\&.bp +.)b +.pp +La requête +.b .+c \ \c +.i T +peut être utilisée pour +commencer un nouveau chapitre. +Chaque nouveau chapitre sera numéroté automatiquement +à partir de 1, +et le titre sera imprimé au début de chaque chapitre +avec le numéro de chapitre +et le nom du chapitre +.i T . +Par exemple, +pour commencer un chapitre s'intitulant +.q Conclusions, +utilisez la requête: +.(b +\&.+c "CONCLUSIONS" +.)b +qui produira sur une nouvelle page, +les lignes +.(b C +CHAPITRE 5 +CONCLUSIONS +.)b +avec des espacements appropriés pour une thèse. +L'en-tête aussi est déplacé en bas de page +sur la première page d'un chapitre\** . +.(f +\**Voir la première page de ce document +.)f +.pp +Si on omet le paramètre de titre +.i T +après la requête +.b .+c +, +Le chapitre résultant sera un chapitre sans titre. +cela peut être utilisé au commencement d'un document; +par exemple, +.b .+c +a été utilisé pour créer la page 1 +du présent document. +.pp +Même si traditionnellement +les documents ont le résumé, +la table des matières, +etc... au début du document, +si vous utilisez +\*G, +il sera plus pratique +de les rédiger en dernier. +Il faut vous dire que les entrées d'index +peuvent être collectées en amont +et être imprimées +dans la table des matières +(ou d'autres index). +À la fin du document, +utilisez la requête +.b ".++ P" , +qui commence la partie préliminaire du document. +Après cette requête, +la requête +.b .+c +commencera une section préliminaire +pour votre document. +Remarquez que, +cela imprime le numéro de la page +en repartant de 1 +en chiffres romains minuscules. +.b .+c +peut être utilisé plusieurs fois d'affilée +pour ébaucher les différentes parties du document. +Par exemple, +le résumé, +la table des matières, +les remerciements, +la liste des illustrations, +etc. +La requête +.b ".++ B" +peut aussi être employée +pour commencer le chapitre de bibliographie +à la fin du document. +.pp +Une ébauche peut être organisée +comme le montre la figure 2 ci-dessous. +(Dans cette figure, +les commentaires débutent par la requête +.b \e" .) +.(z +.hl +.if t .in 0.5i +.if t .ta 2i +.if n .ta 3i +\&.fo \(aa\(aaÉBAUCHE\(aa\(aa \e" définir un pied de page pour chaque page. +\&.tp \e" commencer la page de titre +\&.(l C \e" liste centrée +LA CROISSANCE +DES ONGLES D'ORTEILS +CHEZ LES PRIMATES SUPÉRIEURS +\&.sp +par +\&.sp +Frank Furter +\&.)l \e" fin de la liste centrée +\&.+c INTRODUCTION \e" début du chapitre intitulé "INTRODUCTION" +\&.(x t \e" faire une entrée pour l'index `t' +Introduction +\&.)x \e" fin de l'entrée d'index +texte du chapitre 1 \e" =Introduction +\&.+c "CHAPITRE SUIVANT" \e" commencer un nouveau chapitre +\&.(x t \e" faire un entrée pour 'index `t' +Chapitre suivant +\&.)x +texte du chapitre 2 \e" =chapitre suivant +\&.+c CONCLUSIONS +\&.(x t +Conclusions +\&.)x +texte du chapitre 3 \e" =Conclusions +\&.++ B \e" commencer la bibliographie +\&.+c BIBLIOGRAPHIE \e" commencer un nouveau `chapitre' +\&.(x t +Bibliographie +\&.)x +texte de la bibliographie +\&.++ P \e" commencer la partie préliminaire du document +\&.+c "TABLE DES MATIÈRES" +\&.xp t \e" imprimer l'index `t' collecté en amont +\&.+c PREFACE \e" commencer un nouveau chapitre dans la partie préliminaire. +texte de la préface +.sp 2 +.in 0 +.ce +Figure 2. Ébauche d'un exemple de document. +.hl +.)z +.sh 2 "Équations et Tableaux" +.pp +Il existe deux programmes \*U spécialement conçus +pour formater les types de matières spéciaux. +.b Eqn +imprime les équations. +.b Tbl +permet d'imprimer +de très jolis tableaux +dans toute une variété de formats. +Le présent document décrira seulement comment +rendre plus jolie +leur fonctionnalités standard. +Pour savoir +comment ces deux programmes fonctionnent +consultez les manuels de référence de ces processeurs\**. +.(f +\**N.d.tr. +.b "man eqn" +et +.b "man tbl" +.)f +.pp +Le logiciel +.b eqn +est décrit complètement +dans le document +.ul +Typesetting Mathematics \- User's Guide +par Brian W. Kernighan +and Lorinda L. Cherry\**. +.(f +\**Disponible sur la toile +.)f +Les équations sont centrées +et restent sur une page. +On les introduit dans le texte par la requête +.b .EQ +et on les termine par la requête +.b .E . +.pp +La requête +.b .EQ +peut avoir un numéro d'équation comme +argument optionnel. +Ce numéro sera imprimé centré +à droite de l'équation. +Si l'équation devient trop longue, +on devra l'imprimer sur deux lignes. +Pour faire ceci, tapez: +.(b +\&.EQ (eq 34) +texte de l'équation 34 +\&.EN C +\&.EQ +continuation de l'équation 34 +\&.EN +.)b +Le +.b C +après la requête +.b .EN +spécifie que l'équation +sera continuée. +.pp +Le programme +.b tbl +produit des tableaux. +Il est décrit complètement +(avec des exemples numériques) +dans le document +.ul +Tbl \- A Program to Format Tables +par M. E. Lesk\**. +.(f +\**Également disponible sur la toile +.)f +Les tableaux commencent par la requête +.b .TS +et se terminent par la requête +.b .TE . +Normalement, les tableaux restent sur la même page. +Si vous avez un tableau trop grand +pour tenir sur une seule page, +et dont vous savez +qu'il lui en faudra plusieurs, +commencez le tableau avec la requête +.b ".TS\ H" +et mettez la requête +.b .TH +après la ligne du tableau +que vous voulez +imprimer au début de chaque page +contenant le tableau. +Par exemple, la définition +d'un long tableau +pourrait être: +.ds TA \|\h'.4n'\v'-.2n'\s-4\zT\s0\v'.2n'\h'-.4n'\(ci\| +.if n .ds TA \ \o'-T'\ \" +.(b +\&.TS H +c s s +n n n. +TITRE DU TABLEAU +\&.TH +texte du tableau +\&.TE +.)b +.pp +.sh 2 "Sortie sur deux colonnes" +.pp +Vous pouvez rédiger votre texte sur deux colonnes +automatiquement +grâce à la requête +.b .2c . +Cela rendra tout contenu +suivant cette requête +sur deux colonnes. +La requête +.b .bc +commencera une nouvelle colonne; +elle diffère de +.b .bp +en ce que +.b .bp +peut laisser une colonne totalement +vide quand il commence une nouvelle page. +Pour revenir à l'impression sur une colonne, +utilisez +.b .1c . +.sh 2 "Définir un macro" +.pp +Un +.i macro +est un ensemble formé de requêtes et de texte +qui peut être résumé +en une seule requête. +Les macros commencent par la ligne +.b ".de" \ \c +.i xx +(où +.i xx +est le nom du macro que l'on va définir) +et elle finit par une ligne consistant en 2 points. +Après avoir défini le macro, +écrire la ligne +.b . \c +.i xx +revient à écrire toutes les autres lignes. +Par exemple, +pour définir un macro +qui espace de trois lignes +et centre les lignes qui suivent, +entrez: +.(b +\&.de SS +\&.sp 3 +\&.ce +\&.. +.)b +et utilisez en rédigeant: +.(b +\&.SS +\&Ligne de titre +(début du texte) +.)b +.pp +Les noms des macros peuvent être formés d'un ou deux caractères. +Pour éviter les conflits avec des noms de requêtes +dans \-me, +utilisez toujours des majuscules. +Les seuls noms à éviter sont +.b TS , +.b TH , +.b TE , +.b EQ , +and +.b EN . +.sh 2 "Annotations à l'intérieur d'un clos" +.pp +Parfois, vous voudrez insérer +une note en bas de page +ou une entrée d'index +à l'intérieur d'un clos. +Par exemple, +si vous vouliez maintenir une +.q "liste des figures" +vous pourriez vouloir faire quelque chose comme: +.(b +\&.(z +\&.(c +texte de la figure +\&.)c +\&.ce +Figure 5. +\&.(x f +Figure 5 +\&.)x +\&.)z +.)b +et vous pourriez espérer +que ça donne une figure +avec un label +et une entrée d'index +.b f +(probablement une liste des figures). +Par malheur, +l'entrée d'index +est lue et interprétée +lorsque le clos est lu, +et non pas lorsqu'il est imprimé, +et donc le numéro de page dans l'index sera probablement erroné. +La solution est d'utiliser la chaîne magique +.b \e! +au début de chaque ligne se rapportant à l'index. +Autrement dit, +vous utiliserez: +.(b +\&.(z +\&.(c +Texte de la figure +\&.)c +\&.ce +Figure 5. +\e!.(x f +\e!Figure 5 +\e!.)x +\&.)z +.)b +qui différera l'indexation +jusqu'à ce que la figure soit en sortie. +Cela garantira +que le numéro de la page dans l'index soit correct. +Le même commentaire s'applique aussi +aux blocs (avec +.b .(b +et +.b .)b ) +. +.sh 1 "\*T et le photocompositeur" +.pp +Avec un peu de soin, +vous pouvez préparer +des documents +qui seront joliment imprimés +sur un terminal normal, +ou, si vous avez besoin d'un photocompositeur, +en utilisant le programme de formatage \*T . +.sh 2 "Polices" +.pp +Une +.i police +est un style de caractères. +Trois polices sont +disponibles simultanément, +Times Roman, +Times italique, +et Times en gras, +plus la police spéciale pour les maths. +La police normale est Roman. +.pp +On peut à tout instant +changer de police. +Les requêtes +.b .r , +.b .i , +.b .b , +et +.b .bi +changent respectivement sur Roman, +italique, +gras, +et italique gras. +Vous pouvez mettre un seul mot +dans une certaine police +en tapant (par exemple): +.(b +\&.i mot +.)b +ce qui mettra ce +.i mot +en italique, +mais n'affectera pas le texte environnant. +.pp +Notez que si vous voulez mettre plus d'un mot à la fois +dans une police de votre choix, +vous devez entourer ces mots de guillemets +(`\|"\|') +ainsi, pour le processeur \*G, ils apparaîtront comme un seul mot. +Les guillemets n'apparaîtront pas dans le texte. +Si vous voulez que des guillemets apparaissent dans le texte, +vous devrez mettre toute la chaîne de caractères entre guillemets +(même si il s'agit d'un seul mot), +et utiliser +.i deux +paires de guillemets, +quand vous voulez qu'une paire apparaisse. +Par exemple, +si vous voulez produire le texte: +.(b +.i """poisson d'avril\|""" +.)b +en italique, vous devez taper: +.(b +\&.i """poisson d'avril\e|""" +.)b +Le +.b \e| +produit un petit espacement +de sorte que +.q l +d' +.i avril +ne soit pas trop proche des guillemets dans \*G, +comme cela l'est ici: +.(b +.i """poisson d'avril""" +.)b +.pp +Quelques +.q pseudo-polices +sont disponibles. +L'entrée: +.(b +\&.(b +\&.u souligné +\&.bx "mots dans un cadre" +\&.)b +.)b +génère +.(b +.u souligné +.bx "mots dans un cadre" +.)b +Notez que les requêtes de pseudo-police +ne mettent qu'un seul paramètre dans la pseudo-police; +les requêtes de police ordinaire (.r, .i, .b, et .bi) +vont commencer à mettre +tout le texte qui suit +dans la police spéciale +si vous ne fournissez pas de paramètre précis\**. +.(f +\**N.d.tr. Pour cela, commencer une nouvelle ligne directement après la requête. +La police spéciale sera maintenue jusqu'à la fin du paragraphe. +.)f +Si vous utilisez ces requêtes de pseudo-polices (.u, .bx) +au milieu des lignes, +elles ne devraient porter vraiment que sur un seul mot. +Ceci à cause de la manière +de laquelle \*G justifie le texte. +Par exemple, +si vous voulez utiliser les requêtes: +.(b +\&.u "italiques gras" +et +\&.bx "mots dans un cadre" +.)b +au milieu d'une ligne, +\*G produirait +.u "italiques gras" +et +.bx "mots dans un cadre" ,\p +ce qui, vous l'admettrez sans peine, n'est pas très joli. +.pp +Le second paramètre +de toutes les requêtes de police +est dans la police d'origine. +Par exemple, +la requête de police: +.(b +\&.b hardi petit +.)b +génère +.q hardi +en caractères gras, +mais mettra +.q petit +dans la police du texte environnant, +ce qui donne: +.(b +.b hardi petit. +.)b +Pour avoir les deux mots +.b hardi +et +.b petit +en gras +.b "hardi petit" , +tapez: +.(b +\&.b "hardi petit" +.)b +.pp +Vous pouvez panacher les polices à l'intérieur d'un seul mot en utilisant +une séquence spéciale +.b \ec +en fin de ligne +pour indiquer +.q "continuer à traiter le texte" ; +cela permet aux lignes d'entrée +d'être mises bout à bout +sans être interrompues par un espacement. +Par exemple, l'entrée: +.(b +\&.u sou \ec +\&.i ligné +.)b +génère +.u sou \c +.i ligné , +mais si nous avions tapé: +.(b +\&.u sou +\&.i ligné +.)b +le résultat aurait été +.u sou +.i ligné +en deux mots. +.sh 2 "Tailles de caractères" +.pp +Le photocompositeur +supporte différentes tailles de caractères, +mesurées en points. +La taille de caractères par défaut +est 10 points +pour le corps de texte, +8 points pour les notes en bas de page. +Pour changer la taille des caractères, +tapez: +.(b +\&.sz \c +.i N +.)b +où +.i N +est la taille souhaitée exprimée en points. +Vous pouvez aussi +.q "ajouter de la taille" +avec la requête +.(b +\&.sz \c +.i +N +.)b +ou en +.q enlever +en utilisant le signe - à la place de + . +.br +L' +.i "espacement vertical"\** +.(f +\**Distance entre le bas de la plupart des lettre +(la +.i "ligne de base") +de deux lignes adjacentes. +.)f +sera proportionnel à +la taille des caractères. +.pp +Avec +.b \&.sz +, ces changements de tailles de caractères sont +.i temporaires !!! +Pour revenir à la taille par défaut, tapez simplement +.(b +\& .sz +.)b +Si vous voulez influencer systématiquement la taille des éléments de votre texte, utilisez les commandes +.b \&.nr: +.(b +\&.nr pp 12 +.)b +met tout corps de texte se trouvant après cette commande à 12 pts. +.(b +\&.nr sp 12 +.)b +met tous les titres de chapitre suivant cette commande à 12 pts. +.(b +\&.nr tp 12 +.)b +met tous les en-têtes et pieds de page suivant cette commande à 12 pts. +Vous la placerez avantageusement directement après la commande .he (ou .fo). +.pp +On peut donner à un seul mot ou phrase +une taille plus petite +que celle du texte environnant +en utilisant la requête +.b .sm . +Cela convient spécialement aux mots écrits en capitales, +à cause d'une illusion d'optique qui les fait paraître +plus grandes qu'elles ne le sont vraiment. +Par exemple: +.(b +\&.sm UNIX +.)b +s'imprime +.sm UNIX , +ce qui est plus joli que UNIX. +.pp +Avertissement: +changer les tailles de caractères +sur le photocompositeur +est une opération mécanique lente. +Sur les imprimantes laser, il faudra peut-être recharger de nouvelles polices. +Dès lors les changements de tailles de caractères devraient être utilisés avec prudence. +.sh 2 "Guillemets" +.pp +En typographie, +pour créer des guillemets, +il est habituel +d'utiliser deux accents graves et deux accents aigus, +plutôt que les guillemets +(`\|"\|'). +C'est parce que +deux accents graves et deux accents aigus +donnent un meilleur résultat optique. +Par exemple, comparez +"guillemets" à +``guillemets''. +.pp +Vous pourrez aussi utiliser la séquence +.b \e*(lq +et +.b \e*(rq +pour mettre les guillemets respectivement à gauche et à droite +du mot ou de l'expression concernés. +Par exemple, +utilisez: +.(b +\e*(lqCertaines choses ne sont pas vraies, +même si elles ont eu lieu.\e*(rq +.)b +génère le résultat: +.(b +.q "Certaines choses ne sont pas vraies, même si elles ont eu lieu" +.)b +Plus rapide, la requête: +.(b +\&.q "texte entre guillemets" +.)b +générera +.q "texte entre guillemets" . +Notez que vous devez entourer +le texte concerné de guillemets +s'il est formé de plusieurs mots. +.sh 0 +.sp 1i +.b Remerciements +.pp +J'aimerais remercier +Bob Epstein, +Bill Joy, +et Larry Rowe +pour avoir eu le courage +d'utiliser les macros \-me +pour écrire des documents inhabituels +durant la phase de développement; +Ricki Blau, +Pamela Humphrey, +et Jim Joyce +pour leur aide durant la phase de documentation; +Peter Kessler +pour ses nombreux griefs, +des années après que j'aie considéré le projet comme +.q achevé , +le plus souvent accompagnés de propositions de solutions +(qui m'ont donc forcé à réparer plusieurs petits bogues); +et la foule de gens qui ont contribué à ce projet +par leurs idées ou leur soutien. +.sp 1i +Ce document a été +.sm GROFF é +le 27 octobre 2001 et s'applique à la version des macros \-me +inclus dans la version 1.17.2 de \*G. +.sp 1i +La traduction française a été +.sm GROFF ée +le 20 octobre 2013, toutes les commandes ont été testées sur la version 1.21 de \*G. +.(b +.uh "Annexe: petit lexique des noms de requêtes" +Par ordre d'apparition dans le texte +.sp +.TS +tab(|); +l l l . +\&.sp|space|espacement +\&.pp|paragraph|nouveau paragraphe +\&.he|header|en-tête +\&.fo|footer|pied de page +\&.ls|line spacing|espacement vertical (entre les lignes) +\&.in|indent|indentation +\&.ce|center|centrer +\&.br|break|interruption (commence une nouvelle ligne) +\&.(q|quote|citation (début) +\&.)q|quote|citation (fin) +\&.(l|list|liste (début) +\&.)l|list|liste (fin) +\&.(b|bloc|bloc (début) +\&.)b|bloc|bloc (fin) +\&.(z|floating keep|clos flottant (début) +\&.)z|floating keep|clos flottant (fin) +\&.hl|horizontal line|ligne horizontale +\&.(c|centered block|bloc centré (début) +\&.)c|centered block|bloc centré (fin) +\&.(f|footnote|note en bas de page (début) +\&.)f|footnote|note en bas de page (fin) +\&.(x|index|faire apparaître dans l'index (début) +\&.)x|index|faire apparaître dans l'index (fin) +\&.xp|print index|imprimer l'index +\&.lp|lined up paragraph|paragraphe aligné (à 1e ligne non-indentée) +\&.ip|indented paragraph|paragraphe indenté, sauf en sa première ligne +\&.np|numbered paragraph|paragraphe numéroté +\&.sh|set header|faire un titre +\&.uh|unnumbered header|titre non-numéroté +\&.tp|title page|page de titre +\&.+c|add chapter|ajouter un chapitre +\&.EQ|equation|équation (début) +\&.EN|equation|équation (fin) +\&.TS|table start|tableau (début) +\&.TE|table end|tableau (fin) +\&.2c|2 column|écrire sur 2 colonnes +\&.1c|1 columns|écrire sur 1 colonne +\&.de xx|define macro|définir un macro +\&.r|roman|roman +\&.i|italic|italique +\&.b|bold|gras +\&.bi|bold italic|italique gras +\&.u|underlined|souligné +\&.bx|box|encadré +\&.sz|size|taille de police +\&.sm|small|plus petit que le texte environnant +\&.q|quoted|entre guillemets +.TE +.)b diff -ruN groff-1.22.2/doc/pic.ms groff-1.22.3/doc/pic.ms --- groff-1.22.2/doc/pic.ms 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/pic.ms 2014-11-04 09:38:35.562519784 +0100 @@ -1,5 +1,4 @@ -.\" Copyright (C) 2006-2011 -.\" Free Software Foundation, Inc. +.\" Copyright (C) 2006-2014 Free Software Foundation, Inc. .\" Written by Eric S. Raymond .\" .\" This file is part of groff. @@ -30,7 +29,6 @@ .\" Eric S. Raymond in August 1995. It has been put .\" under the GPL in March 2006. .\" -.\" $Id: pic.ms,v 1.49 2011/07/26 17:11:10 wl Exp $ . . .\" Set a proper TeX and LaTeX diff -ruN groff-1.22.2/doc/texinfo.tex groff-1.22.3/doc/texinfo.tex --- groff-1.22.2/doc/texinfo.tex 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/texinfo.tex 2014-11-04 09:38:35.563519771 +0100 @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2013-02-01.11} +\def\texinfoversion{2014-10-29.10} % % Copyright 1985, 1986, 1988, 1990, 1991, 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. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -281,9 +281,9 @@ \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% - \the\toks0 \the\toks2 - \noexpand\or \the\toks4 \the\toks6 - \noexpand\else \the\toks8 + \the\toks0 \the\toks2 % 0: top marks (\last...) + \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) + \noexpand\else \the\toks8 % 2: color marks }% } % \topmark doesn't work for the very first chapter (after the title @@ -322,10 +322,13 @@ % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} + % \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi - \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + % \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi - \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to @@ -1135,10 +1138,12 @@ \ifpdf % - % Color manipulation macros based on pdfcolor.tex, + % Color manipulation macros using ideas from pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead - % of actual black. + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % @@ -1248,10 +1253,9 @@ % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % - % by default, use a color that is dark enough to print on paper as - % nearly black, but still distinguishable for online viewing. - \def\urlcolor{\rgbDarkRed} - \def\linkcolor{\rgbDarkRed} + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines @@ -2142,7 +2146,7 @@ \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} + \resetmathfonts \setleading{17pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc @@ -2377,8 +2381,10 @@ \ifx\next,% \else\ifx\next-% \else\ifx\next.% + \else\ifx\next\.% + \else\ifx\next\comma% \else\ptexslash - \fi\fi\fi + \fi\fi\fi\fi\fi \aftersmartic } @@ -2475,14 +2481,14 @@ } % We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate at a dash. -% -- rms. +% and arrange explicitly to hyphenate at a dash. -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active @@ -2499,14 +2505,35 @@ \let-\normaldash \let_\realunder \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % \codex } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + % we need the space after the = for the case when \next itself is a + % space token; it would get swallowed otherwise. As in @code{- a}. + \global\let\codedashprev= \next + } } - +\def\normaldash{-} +% \def\codex #1{\tclose{#1}\endgroup} -\def\normaldash{-} -\def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) @@ -2548,37 +2575,21 @@ \let\file=\code \let\option=\code -% @uref (abbreviation for `urlref') takes an optional (comma-separated) -% second argument specifying the text to display and an optional third -% arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. -% (This \urefnobreak definition isn't used now, leaving it for a while -% for comparison.) -\def\urefnobreak#1{\dourefnobreak #1,,,\finish} -\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup - \unsepspaces - \pdfurl{#1}% - \setbox0 = \hbox{\ignorespaces #3}% - \ifdim\wd0 > 0pt - \unhbox0 % third arg given, show only that - \else - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it - \else - \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url - \fi - \else - \code{#1}% only url given, so show it - \fi - \fi - \endlink -\endgroup} - -% This \urefbreak definition is the active one. +% @uref (abbreviation for `urlref') aka @url takes an optional +% (comma-separated) second argument specifying the text to display and +% an optional third arg as text to display instead of (rather than in +% addition to) the url itself. First (mandatory) arg is the url. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak +% \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces @@ -2587,12 +2598,19 @@ \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else - \setbox0 = \hbox{\ignorespaces #2}% + \setbox0 = \hbox{\ignorespaces #2}% look for second arg \ifdim\wd0 > 0pt \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi \else - \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url \fi \else \urefcode{#1}% only url given, so show it @@ -2632,8 +2650,10 @@ % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. -\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } -\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} @@ -2868,6 +2888,15 @@ \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } +% +% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if +% FMTNAME is tex, else ELSE-TEXT. +\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} +\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi +} +% % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being @@ -2884,6 +2913,23 @@ \endgroup % close group opened by \tex. } +% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. +% +\long\def\inlineifset#1{\doinlineifset #1,\finish} +\long\def\doinlineifset#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax + \else\ignorespaces#2\fi +} + +% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. +% +\long\def\inlineifclear#1{\doinlineifclear #1,\finish} +\long\def\doinlineifclear#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi +} + \message{glyphs,} % and logos. @@ -3639,7 +3685,7 @@ \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % - % Try typesetting the item mark that if the document erroneously says + % Try typesetting the item mark so that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if @@ -3889,19 +3935,23 @@ } % multitable-only commands. -% -% @headitem starts a heading row, which we typeset in bold. -% Assignments have to be global since we are inside the implicit group -% of an alignment entry. \everycr resets \everytab so we don't have to +% +% @headitem starts a heading row, which we typeset in bold. Assignments +% have to be global since we are inside the implicit group of an +% alignment entry. \everycr below resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % +% default for tables with no headings. +\let\headitemcrhook=\relax +% % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. @@ -3932,15 +3982,15 @@ % \everycr = {% \noalign{% - \global\everytab={}% + \global\everytab={}% Reset from possible headitem. \global\colcount=0 % Reset the column counter. - % Check for saved footnotes, etc. + % + % Check for saved footnotes, etc.: \checkinserts - % Keeps underfull box messages off when table breaks over pages. - %\filbreak - % Maybe so, but it also creates really weird page breaks when the - % table breaks over pages. Wouldn't \vfil be better? Wait until the - % problem manifests itself, so it can be fixed for real --karl. + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax }% }% % @@ -4179,7 +4229,7 @@ \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { - \catcode`\- = \active \catcode`\_ = \active + \catcode`\-=\active \catcode`\_=\active % \gdef\makevalueexpandable{% \let\value = \expandablevalue @@ -4199,7 +4249,12 @@ % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). -% +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% @@ -4211,8 +4266,9 @@ % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. -% -% To get special treatment of `@end ifset,' call \makeond and the redefine. +% +% To get the special treatment we need for `@end ifset,' we call +% \makecond and then redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} @@ -4376,7 +4432,7 @@ % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we - % should define @lbrace and @rbrace commands a la @comma. + % should use @lbracechar and @rbracechar? \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % @@ -4397,8 +4453,7 @@ % @end macro % ... % @funindex commtest - % - % The above is not enough to reproduce the bug, but it gives the flavor. + % This is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} @@ -4599,8 +4654,21 @@ \definedummyword\verb \definedummyword\w \definedummyword\xref + % + % Consider: + % @macro mkind{arg1,arg2} + % @cindex \arg2\ + % @end macro + % @mkind{foo, bar} + % The space after the comma will end up in the temporary definition + % that we make for arg2 (see \parsemargdef ff.). We want all this to be + % expanded for the sake of the index, so we end up just seeing "bar". + \let\xeatspaces = \eatspaces } +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string @@ -4629,11 +4697,16 @@ % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. - \def\{{|a}% - \def\lbracechar{|a}% + \ifusebracesinindexes + \def\lbracechar{\lbracecmd}% + \def\rbracechar{\rbracecmd}% + \else + \def\lbracechar{|a}% + \def\rbracechar{|b}% + \fi + \let\{=\lbracechar + \let\}=\rbracechar % - \def\}{|b}% - \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% @@ -5666,13 +5739,16 @@ % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. % % To test against our argument. \def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} % \def\chapmacro#1#2#3{% + \checkenv{}% chapters, etc., should not start inside an environment. + % % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs @@ -5818,22 +5894,28 @@ % Print any size, any type, section title. % -% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the -% section number. +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #4 is the section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% - \checkenv{}% should not be in an environment. + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % - \def\sectionlevel{#2}% - \def\temptype{#3}% - % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword @@ -5885,7 +5967,7 @@ % % Now the second mark, after the heading break. No break points % between here and the heading. - \let\prevsectiondefs=\lastsectiondefs + \global\let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. @@ -6252,8 +6334,8 @@ \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other - \catcode`\`=\other - \catcode`\'=\other + \catcode `\`=\other + \catcode `\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our @@ -6277,7 +6359,7 @@ \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext - \expandafter \let\csname top\endcsname=\ptextop % outer + \expandafter \let\csname top\endcsname=\ptextop % we've made it outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% @@ -6361,8 +6443,6 @@ % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can @@ -6402,7 +6482,7 @@ \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak - \hfuzz = 12pt % Don't be fussy + \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output @@ -6529,9 +6609,13 @@ % @raggedright does more-or-less normal line breaking but no right -% justification. From plain.tex. +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. \envdef\raggedright{% - \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% } \let\Eraggedright\par @@ -7424,7 +7508,7 @@ % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH -% in the params list to some hook where the argument si to be expanded. If +% in the params list to some hook where the argument is to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. @@ -8286,6 +8370,7 @@ \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent + % \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % @@ -8309,6 +8394,11 @@ % \gdef\dofootnote{% \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnote + % % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. @@ -8346,13 +8436,19 @@ } }%end \catcode `\@=11 +\def\errfootnote{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. - +% % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. @@ -8769,20 +8865,20 @@ { \catcode`\_ = \active \globaldefs=1 -\parseargdef\documentlanguage{\begingroup - \let_=\normalunderscore % normal _ character for filenames +\parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. + \let_ = \normalunderscore % normal _ character for filename test \openin 1 txi-#1.tex \ifeof 1 - \documentlanguagetrywithoutunderscore{#1_\finish}% + \documentlanguagetrywithoutunderscore #1_\finish \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX -\endgroup} +} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. @@ -9920,11 +10016,9 @@ \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote -\catcode`\~=\active -\def~{{\tt\char126}} +\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde \chardef\hat=`\^ -\catcode`\^=\active -\def^{{\tt \hat}} +\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} @@ -9934,16 +10028,26 @@ \catcode`\|=\active \def|{{\tt\char124}} + \chardef \less=`\< -\catcode`\<=\active -\def<{{\tt \less}} +\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless \chardef \gtr=`\> -\catcode`\>=\active -\def>{{\tt \gtr}} -\catcode`\+=\active -\def+{{\tt \char 43}} -\catcode`\$=\active -\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix +\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr +\catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix + +% used for headline/footline in the output routine, in case the page +% breaks in the middle of an @tex block. +\def\texinfochars{% + \let< = \activeless + \let> = \activegtr + \let~ = \activetilde + \let^ = \activehat + \markupsetuplqdefault \markupsetuprqdefault + \let\b = \strong + \let\i = \smartitalic + % in principle, all other definitions in \tex have to be undone too. +} % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. diff -ruN groff-1.22.2/doc/txi-en.tex groff-1.22.3/doc/txi-en.tex --- groff-1.22.2/doc/txi-en.tex 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/txi-en.tex 2014-11-04 09:38:35.563519771 +0100 @@ -1,4 +1,4 @@ -% $Id: txi-en.tex,v 1.1 2009/01/04 11:51:50 wl Exp $ +% $Id: txi-en.tex 5191 2013-02-23 00:11:18Z karl $ % txi.en.tex -- English non-translations for texinfo.tex. This is read % when a source document says @documentlanguage en (which might happen % after another @documentlanguage). The actual values are the same as @@ -25,6 +25,7 @@ \gdef\putwordAppendix{Appendix} \gdef\putwordChapter{Chapter} +\gdef\putworderror{error} \gdef\putwordfile{file} \gdef\putwordin{in} \gdef\putwordIndexIsEmpty{(Index is empty)} diff -ruN groff-1.22.2/doc/webpage.ms groff-1.22.3/doc/webpage.ms --- groff-1.22.2/doc/webpage.ms 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/doc/webpage.ms 2014-11-04 09:38:35.563519771 +0100 @@ -1,9 +1,9 @@ -.\" This file gives a small example how a web page could look like if created -.\" with groff. +.\" This file gives a small example how a web page could look like if +.\" created with groff. .\" .\" -.\" To make it work with other output devices also, we include www.tmac -.\" directly. +.\" To make it work with other output devices also, we include +.\" www.tmac directly. .\" .nr PS 10 .nr VS 12 @@ -56,48 +56,64 @@ .DC T HIS mydarkred is the home page for groff (\c .URL http://\:www.gnu.org/ GNU -Troff). +Troff), which is a software typesetting package +that reads plain text mixed with formatting commands +and produces formatted output. . -Groff is a software typesetting package which reads plain text mixed with -formatting commands and produces formatted output. +Output may be PostScript or PDF, html, +or ASCII/UTF8 for display at the terminal. . +Formatting commands may be either low-level typesetting requests +(\[lq]primitives\[rq]) or macros from a supplied set. +. +Users may also write their own macros. +. +All three may be combined. + +Present on most Unix systems owing to its long association +with Unix manuals (manpages), +groff is capable of producing typographically sophisticated documents +while consuming only minimal system resources. + The source code of the currently released versions of groff is -available at the -.URL "http://\:groff.ffii.org/\:groff/" "FFII host (Germany)" , -.URL "ftp://\:ftp.gnu.org/\:gnu/\:groff/" "GNU host (USA)" , -and its mirrors. -. -The USA site also contains older, obsolete versions. - -The development version is available from a CVS repository, see below. -. -Development snapshots (produced twice a day from the CVS repository) -can be downloaded from -.URL "http://\:groff.ffii.org/\:groff/\:devel" here . +available at the +.URL "http://\:ftp.gnu.org/\:gnu/\:groff/" "GNU host" +and its mirrors; +the current development version is available from a +.URL "https://\:savannah.gnu.org/\:git/\:?group=groff" "git repository" . +. +The current version is 1.22.3 (04-Nov-2014). + +To view the git repository in your browser, use +.URL "http://\:git.savannah.gnu.org/\:cgit/\:groff.git" \ + "Savannah's cgit interface" . +. +There you can also download snapshots; +simply click on a commit entry line to get the URL. + +Additional contributions can be found +.URL "http://\:groff.ffii.org/\:groff/\:contrib/" here . For a special version of groff on the Microsoft operating systems, see -.URL "http://\:gnuwin32.sf.net/\:packages/\:groffl.htm" "Groff for Windows" . +.URL "https://\:sf.net/\:projects/\:ezwinports/\:files/" \ + "Groff for Windows" +(version 1.21). -Groff was originally written and maintained by James Clark, however it +Groff was originally written and maintained by James Clark; it is now maintained by .MTO Ted.Harding@\:nessie.mcc.ac.uk "Ted Harding" and .MTO wl@\:gnu.org "Werner Lemberg" . - -User issues lead: -.MTO Ted.Harding@\:nessie.mcc.ac.uk "Ted Harding" . -.br -Technical issues lead: -.MTO wl@\:gnu.org "Werner Lemberg" . . .HR . \s[-4]\f[I]This document was produced using -.URL http://groff.ffii.org/ groff-\n[.x].\n[.y].\n[.Y] . +.URL http://\:www.gnu.org/\:software/\:groff groff-\n[.x].\n[.y].\n[.Y] . .br The image at the top has been contributed by Imogen Mulley, based on a similar picture found on the -.URL http://www.gnu.org "GNU server" . +.URL http://\:www.gnu.org "GNU server" . +. . .SH License @@ -106,8 +122,7 @@ .URL http://\:www.gnu.org/\:copyleft/\:gpl.html "GNU Copyright License" . The documentation is released under the .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "Free Documentation License" . -Groff is an official GNU project as defined on -.URL http://\:savannah.gnu.org savannah . +. . .SH README @@ -115,104 +130,58 @@ This is the GNU groff document formatting system. The version number is given in the file VERSION. -Included in this release are implementations of troff, pic, eqn, tbl, grn, -refer, \-man, \-mdoc, \-mom, and \-ms macros, and drivers for PostScript, -PDF, TeX DVI format, HP LaserJet\~4 printers, Canon CAPSL printers, HTML and -XHTML formats (beta status), and typewriter-like devices. -Also included is a modified version of the Berkeley \-me macros, the enhanced -version gxditview of the X11 xditview previewer, and an implementation of the -\-mm macros contributed by -.MTO jh@\:axis.se "J\[:o]rgen H\[:a]gg" . +Included in this release are implementations of `troff', `pic', `eqn', +`tbl', `grn', `refer', `\-man', `\-mdoc', `\-mom', and `\-ms' macros, and +drivers for `PostScript', `PDF', `TeX DVI' format, `HP LaserJet\~4' +printers, `Canon CAPSL' printers, `HTML' and `XHTML' formats (beta status), +and typewriter-like devices. Also included is a modified version of the +Berkeley `\-me' macros, the enhanced version `gxditview' of the X11 +`xditview' previewer, and an implementation of the `\-mm' macros contributed +by J\[:o]rgen H\[:a]gg. -See the file INSTALL for installation instructions. +See the file `INSTALL' for installation instructions on how to install from +a release. You require a C++ compiler. -The file NEWS describes recent user-visible changes to groff. +The file `INSTALL.REPO' contains supplementary instructions for building +directly from a clone of the repository or a snapshot tarball. + +The file `NEWS' describes recent user-visible changes to `groff'. -Groff is free software. -See the file COPYING for copying permission. +`groff' is free software. +See the file `COPYING' for copying permission. -The file PROBLEMS describes various problems that have been encountered in -compiling, installing, and running groff. +The file `PROBLEMS' describes various problems that have been encountered in +compiling, installing, and running `groff'. -The file MORE.STUFF contains information about add-on packages useful for -groff. +The file `MORE.STUFF' contains information about add-on packages useful for +`groff'. +. . .SH -CVS and FTP access +Repository and FTP access .LP -The most recent released version of groff is always available by +The most recent released version of `groff' is always available by .URL "ftp://\:ftp.gnu.org/\:gnu/\:groff" "anonymous ftp" . -The current development version of groff is available from a -.URL "http://\:savannah.gnu.org/\:cvs/\:?group=groff" "CVS repository" . -You can access it by first selecting a parent directory in -which to create a working copy (call it, say, ~/cvswork), and then -executing the commands - -.in 2m -.nf -.ft C -cd ~/cvswork -cvs -d:pserver:anonymous@cvs.savannah.gnu.org/sources/groff -z5 co groff -.ft P -.fi -.in - -This creates a subdirectory, ~/cvswork/groff, with a `checked out' -copy of the CVS repository. -An update of this working copy may be -achieved, at any later time by invoking the commands - -.in 2m -.nf -.ft C -cd ~/cvswork/groff -cvs -z5 update -dP -.ft P -.fi -.in - -Please read the CVS info pages for further details. +The current development version of `groff' is available from a +.URL http://\:savannah.gnu.org/\:git/\:?group=groff "git repository" . -Finally, it is possible to access the CVS with a -.URL http://\:savannah.gnu.org/\:cvs/\:?group=groff "web browser" . - -Alternatively, you can download snapshots (which are updated twice a day). -The complete groff source as a single file is available -.URL http://\:groff.ffii.org/\:groff/\:devel/\:groff-current.tar.gz here . - -A diff file relative to groff-\[la]version\[ra], the latest official groff -release, is available at - -.in 2m -.ft C -http://groff.ffii.org/groff/devel/groff-\[la]version\[ra]-current.diff.gz -.ft P -.in - -Assuming that groff-\[la]version\[ra].tar.gz and -groff-\[la]version\[ra]-current.diff.gz are in the same directory, do the -following to apply the diff file: - -.in 2m -.nf -.ft C -tar xzvf groff-\[la]version\[ra].tar.gz -cd groff-\[la]version\[ra] -gunzip -c ../groff-\[la]version\[ra]-current.diff.gz | patch -p1 -.ft P -.fi -.in +To view the git repository in your browser, go to its +.URL http://\:git.savannah.gnu.org/\:cgit/\:groff.git "browser interface" . +There you can also download snapshots; simply click on a commit entry +line to get the URL. +. . .SH Groff dependencies .LP Depending on your requirements, you may need at least some of the -following tools to build groff directly from its source: +following tools to build `groff' directly from its source: .in 2m .nf +perl >= v5.6.1 (see macro GROFF_PERL in file `m4/groff.m4') ghostscript the psutils package the netpbm package @@ -221,45 +190,52 @@ .fi .in -Note that texinfo and bison or byacc are required only for building from -CVS sources (either a checked out working copy, or a daily snapshot). +Note that `texinfo' and `bison' or `byacc' are required only for building +from repository sources (either a checked out working copy, or a commit +snapshot). They are not required for building from a stable release tarball. Also note that the version numbers stated are the minimum supported. -No version of texinfo < 4.8 works, and the original release of bison -1.875 is known not to work; you \fImay\fP find that bison releases < 1.875 +No version of `texinfo' < 4.8 works, and the original release of `bison' +1.875 is known not to work; you \fImay\fP find that `bison' releases < 1.875 work, but in case of difficulty, please update to a later version \fIbefore\fP posting a bug report. - -For \fIall\fP sources, you need ghostscript for creation of either PDF or -HTML output; the netpbm and psutils packages are required only for HTML -output. +For \fIall\fP sources, you need `ghostscript' for creation of either `PDF' +or `HTML' output; the `netpbm' and `psutils' packages are required only for +`HTML' output. If you don't intend to produce output in either of these formats, then these packages are unnecessary. -Additionally, producing `PDF' output directly with the `gropdf' device -needs a working installation of Perl. +Additionally, producing `PDF' output directly with the `gropdf' device needs +a working installation of `perl'. +The same is true for some other preprocessors like `chem'. + +In Linux Debian, the installation of `texinfo' is dangerous, for it creates +a file `install-info' that blocks the system installation. +So the created `/usr/local/bin/install-info' must be renamed. -In Linux Debian, the installation of texinfo is dangerous, for it creates a -file install-info that blocks the system installation. -So the created /usr/local/bin/install-info must be renamed. - -The groff configure script searches for the X11 headers and libraries Xaw -and Xmu. +The `groff' configure script searches for the X11 headers and libraries +`Xaw' and `Xmu'. So the corresponding developer packages of your system must be installed, -otherwise groff does not install gxditview and the -TX* devices. -In Debian, the developer packages are libxaw7-dev and libxmu-dev. +otherwise `groff' does not install `gxditview' and the `-TX*' devices. +In Debian, the developer packages are `libxaw7-dev' and `libxmu-dev'. +. . .SH Bug reports .LP -Please report bugs using the form in the file BUG-REPORT; the idea of this -is to make sure that FSF has all the information it needs to fix the bug. -At the very least, read the BUG-REPORT form and make sure that you supply +Please report bugs using the project's +.URL https://\:savannah.gnu.org/\:projects/\:groff "bug tracker" . + +Alternatively, but less preferable, you may use the form in the file +`BUG-REPORT'; the idea of this is to make sure that FSF has all the +information it needs to fix the bug. +At the very least, read the `BUG-REPORT' form and make sure that you supply all the information that it asks for. Even if you are not sure that something is a bug, report it using -BUG-REPORT: this enables us to determine whether it really is a bug or +`BUG-REPORT': this enables us to determine whether it really is a bug or not. . +. .SH Mailing lists .LP @@ -268,7 +244,7 @@ .ULS .LI .MTO bug-groff@gnu.org bug-groff@gnu.org -for reporting bugs +for reporting bugs and following bug reports .LI .MTO groff@gnu.org groff@gnu.org @@ -276,10 +252,10 @@ .LI .MTO groff-commit@gnu.org groff-commit@gnu.org -a read-only list showing commitments to the CVS repository +a read-only list showing commits to the git repository .ULE -To subscribe, send e-mail to \[la]list\[ra]-request@\[la]domain\[ra] +To subscribe, send a mail to \[la]list\[ra]-request@\[la]domain\[ra] (example: .MTO groff-request@\:gnu.org groff-request@\:gnu.org for the `groff' list) with the word `subscribe' in either the @@ -299,6 +275,112 @@ . . .SH +NEWS VERSION 1.22.3 +.LP +.SH 2 +gxditview + +.ULS +.LI +X11 resources for gxditview, which were previously installed in +/usr/X11/lib/X11/app-defaults no matter which `prefix' was set, are +now installed in appresdir=$prefix/lib/X11/app-defaults. +If `appresdir' is not a standard X11 resource directory, the environment +variable XFILESEARCHPATH should be set to this path. +The standard default directories depends on the system `libXt'. +Common directories include: + +.in 2m +.nf +/usr/lib/X11/app-defaults +/usr/share/X11/app-defaults +/etc/X11/app-defaults +.fi +.in + +Note that if the option `\-\-with\-appresdir' is passed to `configure', the +`prefix' will not be added to `appresdir'. +.ULE +. +. +.SH 2 +glilypond + +.ULS +.LI +This new preprocessor (contributed by Bernd Warken) allows embedding of code +for +.URL http://\:www.lilypond.org "GNU LilyPond" , +a music typesetter. +The data gets automatically processed and embedded as EPS images. +.ULE +. +. +.SH 2 +gperl + +.ULS +.LI +Bernd Warken contributed a new preprocessor to handle Perl code that can be +evaluated and then processed by groff. +.ULE +. +. +.SH 2 +gpinyin + +.ULS +.LI +Another preprocessor from Bernd Warken to pretty-print Pinyin syllables like +`guo2wang2' as `gu\['o]w\['a]ng'. +.ULE +. +. +.SH 2 +pdfroff + +.ULS +.LI +The pdfroff utility script now activates its `\-\-no\-toc\-relocation' +option by default, unless a request similar to: + +.in 2m +.nf +\&.if !\en[PHASE] .tm pdfroff-option:set toc_relocation=enabled +.fi +.in + +is invoked during input file processing; (`.if !\en[PHASE] ...' ensures +that the effect of the `.tm' request is restricted to the document setup +phase of processing, as pdfroff sets it to 1 or\~2 in the output phase, +but leaves it unset in the setup phase). + +The bundled `spdf.tmac' macro package, which implicitly activates +`\-mpdfmark' for `ms' macro users, ensures that TOC relocation is +appropriately enabled, when the `.TC' macro is invoked. +.ULE +. +. +.SH 2 +macro packages + +.ULS +.LI +The \-mom macro package now has full support for eqn, pic, and tbl, as well +as captioning and labelling of pdf images and preprocessor output. +Lists of Figures, Equations, and Tables can now be autogenerated. +PDF_IMAGE has a new FRAME option. + +.LI +A French introduction to the \-me macro package has been added (file +`meintro_fr.me'). + +.LI +In -mdoc, command %C is now available, providing a city or place reference. +.ULE +. +. +.SH NEWS VERSION 1.22.2 .LP .SH 2 @@ -540,7 +622,7 @@ .in 2m .nf -.ft C +.ft C \&.als bp@orig bp \&.de bp \&. tm before bp @@ -779,7 +861,7 @@ .in 2m .nf -.ft C +.ft C \&.TBL cols=2 \&. TR .TD 1*1 .TD 1*2 \&. TR .TD 2*1 .TD 2*2 @@ -793,7 +875,7 @@ .in 2m .nf -.ft C +.ft C \&.TBL cols=2 \&. TR \&. TD 1*1 @@ -1371,8 +1453,8 @@ .LI Composite glyphs are now supported. To do this, a subset of the Adobe Glyph List (AGL) Algorithm as described in -.URL http://partners.adobe.com/public/developer/opentype/index_glyph.html \ - http://partners.adobe.com/public/developer/opentype/index_glyph.html +.URL http://\:partners.adobe.com/\:public/\:developer/\:opentype/\:index_glyph.html \ + 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. @@ -1438,7 +1520,7 @@ point horizontally. Despite of being silly, this change has been reverted for backwards compatibility. -Consequently, the intermediate output command `Df' also moves the +Consequently, the intermediate output command `Df' also moves the position horizontally again. \eD'f\~...'\& is deprecated since it depends on the horizontal resolution diff -ruN groff-1.22.2/font/devascii/Makefile.sub groff-1.22.3/font/devascii/Makefile.sub --- groff-1.22.2/font/devascii/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devascii/Makefile.sub 2014-11-04 09:38:35.401521797 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `font devascii' +# +# File position: /font/devascii/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=ascii FONTS=R I B BI DEVFILES=$(FONTS) DESC @@ -7,25 +34,35 @@ CPI=10 LPI=6 +RM=rm -f + $(FONTS): R.proto @echo Making $@ - @-rm -f $@ - @(charwidth=`expr $(RES) / $(CPI)` ; \ - sed -e "s/^name [A-Z]*$$/name $@/" \ - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ + @$(RM) $@ + @charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ + -e \ + "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ -e "s/^internalname .*$$/internalname $@/" \ -e "/^internalname/s/BI/3/" \ -e "/^internalname/s/B/2/" \ -e "/^internalname/s/I/1/" \ -e "/^internalname .*[^ 0-9]/d" \ - $(srcdir)/R.proto >$@) + $(srcdir)/R.proto >$@ DESC: DESC.proto @echo Making $@ - @-rm -f $@ @sed -e "s/^res .*$$/res $(RES)/" \ - -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ - -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ - $(srcdir)/DESC.proto >$@ + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ + $(srcdir)/DESC.proto >$@ + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devcp1047/Makefile.sub groff-1.22.3/font/devcp1047/Makefile.sub --- groff-1.22.2/font/devcp1047/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/font/devcp1047/Makefile.sub 2014-11-04 09:38:35.414521634 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `font devcp1047' +# +# File position: /font/devcp1047/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=cp1047 FONTS=R I B BI DEVFILES=$(FONTS) DESC @@ -7,26 +34,35 @@ CPI=10 LPI=6 +RM=rm -f + $(FONTS): R.proto @echo Making $@ - @-rm -f $@ - @(charwidth=`expr $(RES) / $(CPI)` ; \ - sed -e "s/^name [A-Z]*$$/name $@/" \ - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ + @$(RM) $@ + @charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ + -e \ + "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ -e "s/^internalname .*$$/internalname $@/" \ -e "/^internalname/s/BI/3/" \ -e "/^internalname/s/B/2/" \ -e "/^internalname/s/I/1/" \ -e "/^internalname .*[^ 0-9]/d" \ - $(srcdir)/R.proto >$@) + $(srcdir)/R.proto >$@ DESC: DESC.proto @echo Making $@ - @-rm -f $@ @sed -e "s/^res .*$$/res $(RES)/" \ - -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ - -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ - $(srcdir)/DESC.proto >$@ + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ + $(srcdir)/DESC.proto >$@ +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devdvi/generate/Makefile groff-1.22.3/font/devdvi/generate/Makefile --- groff-1.22.2/font/devdvi/generate/Makefile 2013-02-07 13:06:10.000000000 +0100 +++ groff-1.22.3/font/devdvi/generate/Makefile 2014-11-04 09:38:35.549519946 +0100 @@ -1,3 +1,7 @@ +# Makefile for `font devdvi/generate' +# +# File position: /font/devdvi/generate/Makefile +# # Copyright (C) 1989-2002, 2009 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # @@ -34,8 +38,9 @@ MI S SC EX SA SB SPECIALFLAG=-s -all: $(FONTS) +RM=rm -f +all: $(FONTS) #### CM fonts #### @@ -109,7 +114,6 @@ $(TFMTODIT) $(SPECIALFLAG) \ $(tfmdir)/msbm10.tfm $(srcdir)/msbm.map $@ - #### EC fonts #### TREC: $(srcdir)/ec.map @@ -150,7 +154,6 @@ $(TFMTODIT) -g $(gfdir)/ecso1000.300gf \ $(tfmdir)/ecso1000.tfm $(srcdir)/ec.map $@ - #### TC fonts #### TRTC: $(srcdir)/tc.map @@ -193,13 +196,20 @@ $(TFMTODIT) $(SPECIALFLAG) -g $(gfdir)/tcso1000.300gf \ $(tfmdir)/tcso1000.tfm $(srcdir)/tc.map $@ - clean: realclean: - -rm -f $(FONTS) + $(RM) $(FONTS) extraclean: realclean - -rm -f core *~ "#*" + $(RM) core *~ "#*" .PHONY: clean realclean extraclean all + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devdvi/Makefile.sub groff-1.22.3/font/devdvi/Makefile.sub --- groff-1.22.2/font/devdvi/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devdvi/Makefile.sub 2014-11-04 09:38:35.350522434 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `font devdvi' +# +# File position: /font/devdvi/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=dvi DEVFILES=DESC \ TR TI TB TBI CW CWI HR HI HB HBI \ @@ -21,3 +48,11 @@ echo "papersize letter" >>DESC; \ fi test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devhtml/Makefile.sub groff-1.22.3/font/devhtml/Makefile.sub --- groff-1.22.2/font/devhtml/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devhtml/Makefile.sub 2014-11-04 09:38:35.356522359 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `font devhtml' +# +# File position: /font/devhtml/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=html PROTOFONTS=R I B BI CR CI CB CBI FONTS=$(PROTOFONTS) S @@ -8,27 +35,37 @@ CPI=10 LPI=6 +RM=rm -f + $(FONTS): R.proto @echo Making $@ - @-rm -f $@ - @(charwidth=`expr $(RES) / $(CPI)` ; \ - sed -e "s/^name [A-Z]*$$/name $@/" \ - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ + @$(RM) $@ + @charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ + -e \ + "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ -e "s/^internalname .*$$/internalname $@/" \ -e "/^internalname/s/CR/4/" \ -e "/^internalname/s/BI/3/" \ -e "/^internalname/s/B/2/" \ -e "/^internalname/s/I/1/" \ -e "/^internalname .*[^ 0-9]/d" \ - $(srcdir)/R.proto >$@) + $(srcdir)/R.proto >$@ DESC: DESC.proto @echo Making $@ - @-rm -f $@ @sed -e "s/^res .*$$/res $(RES)/" \ - -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ - -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ - $(srcdir)/DESC.proto >$@ + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ + $(srcdir)/DESC.proto >$@ @echo "image_generator $(GHOSTSCRIPT)" >> $@ + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devlatin1/Makefile.sub groff-1.22.3/font/devlatin1/Makefile.sub --- groff-1.22.2/font/devlatin1/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devlatin1/Makefile.sub 2014-11-04 09:38:35.405521747 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `font devlatin1' +# +# File position: /font/devlatin1/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=latin1 FONTS=R I B BI DEVFILES=$(FONTS) DESC @@ -7,26 +31,35 @@ CPI=10 LPI=6 +RM=rm -f + $(FONTS): R.proto @echo Making $@ - @-rm -f $@ - @(charwidth=`expr $(RES) / $(CPI)` ; \ - sed -e "s/^name [A-Z]*$$/name $@/" \ - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ + @$(RM) $@ + @charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ + -e \ + "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ -e "s/^internalname .*$$/internalname $@/" \ -e "/^internalname/s/BI/3/" \ -e "/^internalname/s/B/2/" \ -e "/^internalname/s/I/1/" \ -e "/^internalname .*[^ 0-9]/d" \ - $(srcdir)/R.proto >$@) + $(srcdir)/R.proto >$@ DESC: DESC.proto @echo Making $@ - @-rm -f $@ @sed -e "s/^res .*$$/res $(RES)/" \ - -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ - -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ - $(srcdir)/DESC.proto >$@ + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ + $(srcdir)/DESC.proto >$@ +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devlbp/Makefile.sub groff-1.22.3/font/devlbp/Makefile.sub --- groff-1.22.2/font/devlbp/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devlbp/Makefile.sub 2014-11-04 09:38:35.396521859 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `font devlbp' +# +# File position: /font/devlbp/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=lbp LBPPRINT=$(PSPRINT) DEVFILES=DESC \ @@ -10,8 +37,7 @@ MOSTLYCLEANADD=DESC DESC: DESC.in - -rm -f DESC - cat $(srcdir)/DESC.in >>DESC + cat $(srcdir)/DESC.in >DESC if test "$(PAGE)" = A4; then \ echo "papersize a4" >>DESC; \ else \ @@ -19,3 +45,10 @@ fi test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devlj4/generate/Makefile groff-1.22.3/font/devlj4/generate/Makefile --- groff-1.22.2/font/devlj4/generate/Makefile 2013-02-07 13:06:10.000000000 +0100 +++ groff-1.22.3/font/devlj4/generate/Makefile 2014-11-04 09:38:35.554519884 +0100 @@ -1,5 +1,9 @@ -# Copyright (C) 1994, 2002, 2003, 2004, 2009 Free Software Foundation, Inc. -# Written by James Clark (jjc@jclark.com) +# Makefile for `font devlj4 generate' +# +# File position: /font/devlj4/generate/Makefile +# +# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Written by James Clark (jjc@jclark.com) # # This file is part of groff. # @@ -59,6 +63,8 @@ CLARENDON CORONET MARIGOLD S \ SYMBOL WINGDINGS +RM=rm -f + all: $(FONTS) # @@ -253,13 +259,12 @@ WINGDINGS: $(AUTOFONT)/9nb00095.tfm $(WINGDINGSMAP) $(HPFTODIT) $(AUTOFONT)/9nb00095.tfm $(WINGDINGSMAP) $@ - clean: realclean: - -rm -f $(FONTS) + $(RM) $(FONTS) extraclean: realclean - -rm -f core *~ "#*" + $(RM) core *~ "#*" .PHONY: clean realclean extraclean all diff -ruN groff-1.22.2/font/devlj4/Makefile.sub groff-1.22.3/font/devlj4/Makefile.sub --- groff-1.22.2/font/devlj4/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devlj4/Makefile.sub 2014-11-04 09:38:35.387521972 +0100 @@ -1,3 +1,32 @@ +# Makefile.sub for `font devlj4' +# +# File position: /font/devlj4/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# Written by Werner Lemberg and +# Bernd Warken . +# +# Last update: 2 Sep 2014 +# +# This file is part of `groffer' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=lj4 LJ4RES=1200 LJ4PRINT=$(PSPRINT) @@ -25,7 +54,6 @@ MOSTLYCLEANADD=DESC DESC: DESC.in - -rm -f DESC echo "res $(LJ4RES)" >DESC echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC cat $(srcdir)/DESC.in >>DESC @@ -39,3 +67,11 @@ fonts: $(MAKE) -f $(srcdir)/generate/Makefile srcdir=$(srcdir)/generate \ HPFTODIT=$(top_builddir)/src/utils/hpftodit/hpftodit + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devpdf/Makefile.sub groff-1.22.3/font/devpdf/Makefile.sub --- groff-1.22.2/font/devpdf/Makefile.sub 2013-02-07 13:06:09.000000000 +0100 +++ groff-1.22.3/font/devpdf/Makefile.sub 2014-11-04 09:38:35.427521472 +0100 @@ -1,4 +1,8 @@ -# Copyright (C) 2011, 2013 Free Software Foundation, Inc. +# Makefile.sub for `font devpdf' +# +# File position: /font/devpdf/Makefile.sub +# +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # Written by Deri James # # This file is part of groff. @@ -18,7 +22,7 @@ DEV=pdf GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \ - && find * -maxdepth 0 -type f ! -name Makefile.sub \ + && find * -maxdepth 0 -type f ! -name 'Makefile.sub*' \ -exec grep -l internalname {} \;` ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*` MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*` @@ -43,22 +47,19 @@ $(DEVFILES) \ $(DEVSCRIPTS) - -# Some `makes' don't predefine RM... RM=rm -f - all: DESC DESC: DESC.in - -rm -f DESC + $(RM) DESC cat $(srcdir)/DESC.in >$(top_builddir)/font/devpdf/DESC if test "$(PAGE)" = A4; then \ echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \ else \ echo "papersize letter" >>$(top_builddir)/font/devpdf/DESC; \ fi - -rm -f Foundry + $(RM) Foundry cat $(srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry -test -d $(top_builddir)/font/devpdf/enc \ || $(mkinstalldirs) $(top_builddir)/font/devpdf/enc @@ -76,27 +77,27 @@ $(top_builddir)/font/devpdf/map -test -d util || $(mkinstalldirs) util $(RM) util/BuildFoundries - if test -n "$(PERLPATH)"; then \ + if test -n "$(PERL)"; then \ sed -f $(SH_DEPS_SED_SCRIPT) \ - -e "s|/usr/bin/perl|$(PERLPATH)|" \ - -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(GHOSTSCRIPT)|" \ - -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \ - $(srcdir)/util/BuildFoundries.pl \ - >$(top_builddir)/font/devpdf/util/BuildFoundries ;\ + -e "s|/usr/bin/perl|$(PERL)|" \ + -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(GHOSTSCRIPT)|" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \ + $(srcdir)/util/BuildFoundries.pl \ + >$(top_builddir)/font/devpdf/util/BuildFoundries ;\ else \ - sed -f $(SH_DEPS_SED_SCRIPT) \ - -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \ - $(srcdir)/util/BuildFoundries.pl \ - >$(top_builddir)/font/devpdf/util/BuildFoundries ;\ + sed -f $(SH_DEPS_SED_SCRIPT) \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \ + $(srcdir)/util/BuildFoundries.pl \ + >$(top_builddir)/font/devpdf/util/BuildFoundries ;\ fi chmod +x util/BuildFoundries echo "# foundry ps name psfile" > $(top_builddir)/font/devpdf/download - PATH="$(top_builddir)/src/utils/afmtodit:${GROFF_PATH_SEPARATOR}${PATH}" \ + PATH="$(top_builddir)/src/utils/afmtodit:$(GROFF_PATH_SEPARATOR)$(PATH)" \ util/BuildFoundries $(top_builddir)/font/devpdf \ '$(top_srcdir)/font/devps : $(top_builddir)/font/devps' \ - >> $(top_builddir)/font/devpdf/download + >> $(top_builddir)/font/devpdf/download install_data: -test -d $(DESTDIR)$(fontsubdir) \ @@ -105,6 +106,8 @@ || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/enc -test -d $(DESTDIR)$(fontsubdir)/map \ || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/map + -test -d $(DESTDIR)$(fontsubdir)/util \ + || $(mkinstalldirs) $(DESTDIR)$(fontsubdir)/util for f in $(MOSTLYCLEANADD); do \ $(RM) $(DESTDIR)$(fontsubdir)/$$f; \ if test -f $$f; then \ @@ -113,17 +116,24 @@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \ fi; \ done - $(RM) $@ uninstall_sub: - for f in $(MOSTLYCLEANADD); do \ + -for f in $(MOSTLYCLEANADD); do \ $(RM) $(DESTDIR)$(fontsubdir)/$$f; \ done - -test -d $(DESTDIR)$(fontsubdir)/enc \ - && rmdir $(DESTDIR)$(fontsubdir)/enc - -test -d $(DESTDIR)$(fontsubdir)/map \ - && rmdir $(DESTDIR)$(fontsubdir)/map - -test -d $(DESTDIR)$(fontsubdir)/util \ - && rmdir $(DESTDIR)$(fontsubdir)/util - -test -d $(DESTDIR)$(fontsubdir) \ - && rmdir $(DESTDIR)$(fontsubdir) + -d=$(DESTDIR)$(fontsubdir)/enc; \ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir)/map; \ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir)/util; \ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir); \ + if test -d $$d; then rmdir $$d; fi + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devps/generate/Makefile groff-1.22.3/font/devps/generate/Makefile --- groff-1.22.2/font/devps/generate/Makefile 2013-02-07 13:06:10.000000000 +0100 +++ groff-1.22.3/font/devps/generate/Makefile 2014-11-04 09:38:35.545519996 +0100 @@ -1,5 +1,6 @@ -# Copyright (C) 1989-2000, 2002, 2003, 2006, 2009 -# Free Software Foundation, Inc. +# Location: /font/devps/generate/Makefile +# +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -56,6 +57,8 @@ TEXTMAP=$(srcdir)/textmap AFMNAME=$(srcdir)/afmname +RM=rm -f + all: $(FONTS) TR: @@ -215,21 +218,20 @@ fontforge -script $(srcdir)/sfdtopfa.pe $(srcdir)/freeeuro.sfd symbol.afm: $(srcdir)/symbol.sed - -rm -f $@ + $(RM) $@ sed -f $(srcdir)/symbol.sed `$(AFMNAME) $(afmdir)/Symbol.afm` >$@ symbolsl.afm: $(srcdir)/symbolsl.awk $(srcdir)/../symbolsl.ps - -rm -f $@ - -rm -f Fontmap + $(RM) $@ Fontmap echo "/Symbol-Slanted ($(srcdir)/../symbolsl.ps) ;" > Fontmap echo "/Symbol ($(symbolfont)) ;" >> Fontmap $(PRINTAFM) Symbol-Slanted > tmp.afm awk -f $(srcdir)/symbolsl.awk -v SYMAFM=`$(AFMNAME) \ $(afmdir)/Symbol.afm` tmp.afm >$@ - -rm -f Fontmap tmp.afm + $(RM) Fontmap tmp.afm zapfdr.afm: $(srcdir)/zapfdr.sed - -rm -f $@ + $(RM) $@ sed -f $(srcdir)/zapfdr.sed \ `$(AFMNAME) $(afmdir)/ZapfDingbats.afm` >$@ @@ -247,13 +249,20 @@ cat $(TEXTMAP) $(srcdir)/symbolchars >>$@ clean: - -rm -f symbolmap symbol.afm + $(RM) symbolmap symbol.afm realclean: clean - -rm -f $(FONTS) + $(RM) $(FONTS) extraclean: realclean - -rm -f core *~ "#*" + $(RM) core *~ "#*" .PHONY: all clean realclean extraclean +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devps/Makefile.sub groff-1.22.3/font/devps/Makefile.sub --- groff-1.22.2/font/devps/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devps/Makefile.sub 2014-11-04 09:38:35.340522559 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `font devps' + +# File position: /font/devps/Makefile.sub + +# Copyright (C) 2014 Free Software Foundation, Inc. + +# This file is part of `groffer' which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + +######################################################################## + DEV=ps DISTFILES=\ S SS \ @@ -35,8 +59,9 @@ MOSTLYCLEANADD=DESC $(PSFILES) +RM=rm -f + DESC: DESC.in - -rm -f DESC cat $(srcdir)/DESC.in >DESC echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC if test "$(PAGE)" = A4; then \ @@ -55,5 +80,13 @@ symbolsl.pfa: symbolsl.ps $(PSFILES): - -rm -f $@ + $(RM) $@ sed -f $(srcdir)/psstrip.sed $? >$@ + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devutf8/Makefile.sub groff-1.22.3/font/devutf8/Makefile.sub --- groff-1.22.2/font/devutf8/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devutf8/Makefile.sub 2014-11-04 09:38:35.410521684 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `font devutf8' +# +# File position: /font/devutf8/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=utf8 FONTS=R I B BI DEVFILES=$(FONTS) DESC @@ -7,26 +31,35 @@ CPI=10 LPI=6 +RM=rm -f + $(FONTS): R.proto @echo Making $@ - @-rm -f $@ - @(charwidth=`expr $(RES) / $(CPI)` ; \ - sed -e "s/^name [A-Z]*$$/name $@/" \ - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ + @$(RM) $@ + @charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ + -e \ + "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ -e "s/^internalname .*$$/internalname $@/" \ -e "/^internalname/s/BI/3/" \ -e "/^internalname/s/B/2/" \ -e "/^internalname/s/I/1/" \ -e "/^internalname .*[^ 0-9]/d" \ - $(srcdir)/R.proto >$@) + $(srcdir)/R.proto >$@ DESC: DESC.proto @echo Making $@ - @-rm -f $@ @sed -e "s/^res .*$$/res $(RES)/" \ - -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ - -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ - $(srcdir)/DESC.proto >$@ + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \ + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \ + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \ + $(srcdir)/DESC.proto >$@ +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devX100/Makefile.sub groff-1.22.3/font/devX100/Makefile.sub --- groff-1.22.2/font/devX100/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devX100/Makefile.sub 2014-11-04 09:38:35.373522147 +0100 @@ -1,2 +1,37 @@ +# Makefile.sub for `font devX100' +# +# File position: /font/devX100/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=X100 DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devX100-12/Makefile.sub groff-1.22.3/font/devX100-12/Makefile.sub --- groff-1.22.2/font/devX100-12/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devX100-12/Makefile.sub 2014-11-04 09:38:35.379522072 +0100 @@ -1,2 +1,37 @@ +# Makefile.sub for `font devX100-12' +# +# File position: /font/devX100-12/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=X100-12 DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devX75/Makefile.sub groff-1.22.3/font/devX75/Makefile.sub --- groff-1.22.2/font/devX75/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devX75/Makefile.sub 2014-11-04 09:38:35.361522297 +0100 @@ -1,2 +1,37 @@ +# Makefile.sub for `font devX75' +# +# File position: /font/devX75/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=X75 DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/font/devX75-12/Makefile.sub groff-1.22.3/font/devX75-12/Makefile.sub --- groff-1.22.2/font/devX75-12/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/font/devX75-12/Makefile.sub 2014-11-04 09:38:35.367522222 +0100 @@ -1,2 +1,37 @@ +# Makefile.sub for `font devX75-12' +# +# File position: /font/devX75-12/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + DEV=X75-12 DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/FOR-RELEASE groff-1.22.3/FOR-RELEASE --- groff-1.22.2/FOR-RELEASE 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/FOR-RELEASE 2014-11-04 09:38:35.143525022 +0100 @@ -0,0 +1,13 @@ + Copyright 2013-2014 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 how to prepare `groff' for a new release. + + +######################################################################## + +The file `INSTALL.gen' shall *never* be changed manually! It is a +generic file provided from GNU (normally called `INSTALL'). diff -ruN groff-1.22.2/gendef.sh groff-1.22.3/gendef.sh --- groff-1.22.2/gendef.sh 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/gendef.sh 2014-11-04 09:38:35.143525022 +0100 @@ -1,7 +1,6 @@ #! /bin/sh # -# Copyright (C) 1991, 2000, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2014 Free Software Foundation, Inc. # # This file is part of groff. # diff -ruN groff-1.22.2/INSTALL groff-1.22.3/INSTALL --- groff-1.22.2/INSTALL 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/INSTALL 2014-11-04 09:38:35.144525010 +0100 @@ -1,5 +1,4 @@ - Copyright 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. + Copyright 1997-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -94,6 +93,11 @@ using the malloc that comes with GNU Emacs version 20 can give a worthwhile (and sometimes spectacular) performance improvement. +Many programs within the `groff' system are written in the Perl +language. So you need a `perl' program with the least version of +`v5.6.1'. + + If you want A4 or letter paper format and the configure script produces an incorrect guess, say @@ -121,4 +125,16 @@ 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. +and you need support, please contact the `groff' mailing list. If you +think that you have found a bug, please submit a report in our bug +tracker at + + https://savannah.gnu.org/projects/groff + +Alternative, but less preferable, you may send a bug report using the +form in the file BUG-REPORT. + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/INSTALL.gen groff-1.22.3/INSTALL.gen --- groff-1.22.2/INSTALL.gen 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/INSTALL.gen 2014-11-04 09:38:35.144525010 +0100 @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented diff -ruN groff-1.22.2/INSTALL.REPO groff-1.22.3/INSTALL.REPO --- groff-1.22.2/INSTALL.REPO 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/INSTALL.REPO 2014-11-04 09:38:35.144525010 +0100 @@ -0,0 +1,66 @@ + Copyright 2013-2014 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'. It is meant for +people building directly from the development repository, rather than +a release or snapshot tarball. + +If you want to start compiling the `groff' system with an existing +script `configure' you won't need the information in this file. + +But if you want to use the `GNU autotools' (`aclocal', `autoreconf') +for creating the following and some more files: + + aclocal.m4 + configure + Makefile + +To update file `aclocal.m4', run the shell command + + $ aclocal -I m4 + +To recreate the files `configure' and `Makefile', use the shell +command + + $ autoreconf -I m4 + +The option `-I m4' is necessary. It refers to the subdirectory `m4' +that has files with m4 macro definitions needed by the `autotools'. + +If you use an old `autoreconf' version < 2.69, there might be an error +warning like: + + /usr/share/aclocal/gtkglextmm-1.2.m4:225: + warning: underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD + /usr/share/aclocal/gtkglextmm-1.2.m4:225: + run info '(automake)Extending aclocal' + /usr/share/aclocal/gtkglextmm-1.2.m4:225: + or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal + +Just ignore this. It doesn't occur in the actual versions of +`autoreconf'. + +You may even use the shell command + + $ autoconf -I m4 + +instead of `autoreconf', but that will ignore some features. So +`autoreconf' is better. + +`automake' is not used currently, however, we plan to convert the +build system accordingly. If you have experience in creating +`Makefile.am' files we would be glad if you could help us in the +conversion process. Please contact the groff mailing list. + +After the use of the `GNU autotools', the usual compilation should +work. If the run of `configure' produces error reports you have +produced errors in the `autotools' modification. + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/install-sh groff-1.22.3/install-sh --- groff-1.22.2/install-sh 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/install-sh 2014-11-04 09:38:35.144525010 +0100 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -ruN groff-1.22.2/LICENSES groff-1.22.3/LICENSES --- groff-1.22.2/LICENSES 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/LICENSES 2014-11-04 09:38:35.144525010 +0100 @@ -1,5 +1,4 @@ - Copyright 2003, 2006, 2007, 2009 - Free Software Foundation, Inc. + Copyright 2003-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -117,6 +116,7 @@ tmac/e.tmac tmac/groff_me.man doc/meintro.me + doc/meintro_fr.me doc/meref.me diff -ruN groff-1.22.2/m4/ax_compare_version.m4 groff-1.22.3/m4/ax_compare_version.m4 --- groff-1.22.2/m4/ax_compare_version.m4 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/m4/ax_compare_version.m4 2014-11-04 09:38:35.568519709 +0100 @@ -0,0 +1,177 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_compare_version.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# +# DESCRIPTION +# +# This macro compares two version strings. Due to the various number of +# minor-version numbers that can exist, and the fact that string +# comparisons are not compatible with numeric comparisons, this is not +# necessarily trivial to do in a autoconf script. This macro makes doing +# these comparisons easy. +# +# The six basic comparisons are available, as well as checking equality +# limited to a certain number of minor-version levels. +# +# The operator OP determines what type of comparison to do, and can be one +# of: +# +# eq - equal (test A == B) +# ne - not equal (test A != B) +# le - less than or equal (test A <= B) +# ge - greater than or equal (test A >= B) +# lt - less than (test A < B) +# gt - greater than (test A > B) +# +# Additionally, the eq and ne operator can have a number after it to limit +# the test to that number of minor versions. +# +# eq0 - equal up to the length of the shorter version +# ne0 - not equal up to the length of the shorter version +# eqN - equal up to N sub-version levels +# neN - not equal up to N sub-version levels +# +# When the condition is true, shell commands ACTION-IF-TRUE are run, +# otherwise shell commands ACTION-IF-FALSE are run. The environment +# variable 'ax_compare_version' is always set to either 'true' or 'false' +# as well. +# +# Examples: +# +# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) +# AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) +# +# would both be true. +# +# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) +# AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) +# +# would both be false. +# +# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) +# +# would be true because it is only comparing two minor versions. +# +# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) +# +# would be true because it is only comparing the lesser number of minor +# versions of the two values. +# +# Note: The characters that separate the version numbers do not matter. An +# empty string is the same as version 0. OP is evaluated by autoconf, not +# configure, so must be a string, not a variable. +# +# The author would like to acknowledge Guido Draheim whose advice about +# the m4_case and m4_ifvaln functions make this macro only include the +# portions necessary to perform the specific comparison specified by the +# OP argument in the final configure script. +# +# LICENSE +# +# Copyright (c) 2008 Tim Toolan +# +# 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 is offered as-is, without any +# warranty. + +#serial 11 + +dnl ######################################################################### +AC_DEFUN([AX_COMPARE_VERSION], [ + AC_REQUIRE([AC_PROG_AWK]) + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + AS_VAR_PUSHDEF([A],[ax_compare_version_A]) + A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/[[^0-9]]//g'` + + AS_VAR_PUSHDEF([B],[ax_compare_version_B]) + B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ + -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ + -e 's/[[^0-9]]//g'` + + dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary + dnl # then the first line is used to determine if the condition is true. + dnl # The sed right after the echo is to remove any indented white space. + m4_case(m4_tolower($2), + [lt],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` + ], + [gt],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` + ], + [le],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` + ], + [ge],[ + ax_compare_version=`echo "x$A +x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` + ],[ + dnl Split the operator from the subversion count if present. + m4_bmatch(m4_substr($2,2), + [0],[ + # A count of zero means use the length of the shorter version. + # Determine the number of characters in A and B. + ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` + ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` + + # Set A to no more than B's length and B to no more than A's length. + A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` + B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` + ], + [[0-9]+],[ + # A count greater than zero means use only that many subversions + A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` + B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` + ], + [.+],[ + AC_WARNING( + [illegal OP numeric parameter: $2]) + ],[]) + + # Pad zeros at end of numbers to make same length. + ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" + B="$B`echo $A | sed 's/./0/g'`" + A="$ax_compare_version_tmp_A" + + # Check for equality or inequality as necessary. + m4_case(m4_tolower(m4_substr($2,0,2)), + [eq],[ + test "x$A" = "x$B" && ax_compare_version=true + ], + [ne],[ + test "x$A" != "x$B" && ax_compare_version=true + ],[ + AC_WARNING([illegal OP parameter: $2]) + ]) + ]) + + AS_VAR_POPDEF([A])dnl + AS_VAR_POPDEF([B])dnl + + dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. + if test "$ax_compare_version" = "true" ; then + m4_ifvaln([$4],[$4],[:])dnl + m4_ifvaln([$5],[else $5])dnl + fi +]) dnl AX_COMPARE_VERSION diff -ruN groff-1.22.2/m4/ax_prog_perl_version.m4 groff-1.22.3/m4/ax_prog_perl_version.m4 --- groff-1.22.2/m4/ax_prog_perl_version.m4 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/m4/ax_prog_perl_version.m4 2014-11-04 09:38:35.568519709 +0100 @@ -0,0 +1,70 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_prog_perl_version.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PROG_PERL_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE]) +# +# DESCRIPTION +# +# Makes sure that perl supports the version indicated. If true the shell +# commands in ACTION-IF-TRUE are executed. If not the shell commands in +# ACTION-IF-FALSE are run. Note if $PERL is not set (for example by +# running AC_CHECK_PROG or AC_PATH_PROG) the macro will fail. +# +# Example: +# +# AC_PATH_PROG([PERL],[perl]) +# AX_PROG_PERL_VERSION([5.8.0],[ ... ],[ ... ]) +# +# This will check to make sure that the perl you have supports at least +# version 5.8.0. +# +# NOTE: This macro uses the $PERL variable to perform the check. +# AX_WITH_PERL can be used to set that variable prior to running this +# macro. The $PERL_VERSION variable will be valorized with the detected +# version. +# +# LICENSE +# +# Copyright (c) 2009 Francesco Salvestrini +# +# 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 is offered as-is, without any +# warranty. + +#serial 12 + +AC_DEFUN([AX_PROG_PERL_VERSION],[ + AC_REQUIRE([AC_PROG_SED]) + AC_REQUIRE([AC_PROG_GREP]) + + AS_IF([test -n "$PERL"],[ + ax_perl_version="$1" + + AC_MSG_CHECKING([for perl version]) + changequote(<<,>>) + perl_version=`$PERL --version 2>&1 \ + | $SED -n -e '/This is perl/b inspect +b +: inspect +s/.* (\{0,1\}v\([0-9]*\.[0-9]*\.[0-9]*\))\{0,1\} .*/\1/;p'` + changequote([,]) + AC_MSG_RESULT($perl_version) + + AC_SUBST([PERL_VERSION],[$perl_version]) + + AX_COMPARE_VERSION([$ax_perl_version],[le],[$perl_version],[ + : + $2 + ],[ + : + $3 + ]) + ],[ + AC_MSG_WARN([could not find the perl interpreter]) + $3 + ]) +]) diff -ruN groff-1.22.2/m4/codeset.m4 groff-1.22.3/m4/codeset.m4 --- groff-1.22.2/m4/codeset.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/codeset.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2014 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. diff -ruN groff-1.22.2/m4/fcntl-o.m4 groff-1.22.3/m4/fcntl-o.m4 --- groff-1.22.2/m4/fcntl-o.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/fcntl-o.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,5 +1,5 @@ # fcntl-o.m4 serial 4 -dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2014 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. @@ -50,7 +50,18 @@ #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) result |= 2; else { diff -ruN groff-1.22.2/m4/glibc21.m4 groff-1.22.3/m4/glibc21.m4 --- groff-1.22.2/m4/glibc21.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/glibc21.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 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, diff -ruN groff-1.22.2/m4/groff.m4 groff-1.22.3/m4/groff.m4 --- groff-1.22.2/m4/groff.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/groff.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,6 +1,5 @@ # Autoconf macros for groff. -# Copyright (C) 1989-1995, 2001-2007, 2009, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # # This file is part of groff. # @@ -56,50 +55,159 @@ AC_DEFUN([GROFF_PROG_YACC], [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])]) + +# We need Perl 5.6.1 or newer. + +AC_DEFUN([GROFF_PERL], + [PERLVERSION=v5.6.1 + AC_PATH_PROG([PERL], [perl], [no]) + if test "x$PERL" = "xno"; then + AC_MSG_ERROR([perl binary not found], 1) + fi + AX_PROG_PERL_VERSION([$PERLVERSION], true, \ + AC_MSG_ERROR([perl version is too old], 1))]) + + +# It is possible to fine-tune generation of documentation. + +AC_DEFUN([GROFF_DOC_CHECK], + [AC_ARG_WITH([doc], + [AS_HELP_STRING([--with-doc[[=TYPE]]], + [choose which manuals (beside man pages) are desirable. \ + TYPE can be `yes' or `no', or a comma-separated list of \ + one or multiple of `html', `info', `other', `pdf', and \ + `examples', to restrict what is produced])], + [doc="$withval"], + [doc=yes]) + test "x$doc" = xno && doc='' + if test "x$doc" = xyes; then + doc_dist_target_ok=yes + docadd_html=yes + docadd_info=yes + docadd_other=yes + docadd_pdf=yes + docadd_examples=yes + else + # Don't use case/esac, verify input. + doc_dist_target_ok=no + docadd_html=no + docadd_info=no + docadd_other=no + docadd_pdf=no + docadd_examples=no + OFS=$IFS + IFS=',' + set -- $doc + IFS=$OFS + for i + do + test "x$i" = xhtml && { docadd_html=yes; continue; } + test "x$i" = xinfo && { docadd_info=yes; continue; } + test "x$i" = xother && { docadd_other=yes; continue; } + test "x$i" = xpdf && { docadd_pdf=yes; continue; } + test "x$i" = xexamples && { docadd_examples=yes; continue; } + AC_MSG_WARN([Invalid `--with-doc' argument:] $i) + done + fi + if test $docadd_html = yes; then + make_install_shipped_htmldoc=install_shipped_htmldoc + make_uninstall_shipped_htmldoc=uninstall_shipped_htmldoc + else + make_install_shipped_htmldoc= + make_uninstall_shipped_htmldoc= + fi + if test $docadd_other = yes; then + make_otherdoc=otherdoc + make_install_otherdoc=install_otherdoc + make_uninstall_otherdoc=uninstall_otherdoc + else + make_otherdoc= + make_install_otherdoc= + make_uninstall_otherdoc= + fi + if test $docadd_examples = yes; then + make_examples=examples + make_install_examples=install_examples + make_uninstall_examples=uninstall_examples + else + make_examples= + make_install_examples= + make_uninstall_examples= + fi + AC_SUBST([doc_dist_target_ok]) + AC_SUBST([make_install_shipped_htmldoc]) + AC_SUBST([make_uninstall_shipped_htmldoc]) + AC_SUBST([make_otherdoc]) + AC_SUBST([make_install_otherdoc]) + AC_SUBST([make_uninstall_otherdoc]) + AC_SUBST([make_examples]) + AC_SUBST([make_install_examples]) + AC_SUBST([make_uninstall_examples])]) + + # 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." + [if test $docadd_info = yes; then + 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 - fi - if test -n "$missing"; then - infofile=doc/groff.info - test -f ${infofile} || infofile=${srcdir}/${infofile} - if test ! -f ${infofile} \ + 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 + AC_MSG_ERROR($missing [Get the `texinfo' package version 4.8 or newer.]) - else - AC_MSG_WARN($missing + 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 + + make_infodoc=infodoc + make_install_infodoc=install_infodoc + make_uninstall_infodoc=uninstall_infodoc + else + make_infodoc= + make_install_infodoc= + make_uninstall_infodoc= + MAKEINFO= fi - AC_SUBST([MAKEINFO])]) + AC_SUBST([MAKEINFO]) + AC_SUBST([make_infodoc]) + AC_SUBST([make_install_infodoc]) + AC_SUBST([make_uninstall_infodoc])]) + # 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 + [make_htmldoc= + make_install_htmldoc= + make_uninstall_htmldoc= + make_htmlexamples= + make_install_htmlexamples= + make_uninstall_htmlexamples= + AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH]) missing= AC_FOREACH([groff_prog], @@ -111,7 +219,18 @@ test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'" - if test -n "$missing"; then + if test -z "$missing"; then + if test $docadd_html = yes; then + make_htmldoc=htmldoc + make_install_htmldoc=install_htmldoc + make_uninstall_htmldoc=uninstall_htmldoc + if test $docadd_examples = yes; then + make_htmlexamples=html_examples + make_install_htmlexamples=install_htmlexamples + make_uninstall_htmlexamples=uninstall_htmlexamples + fi + fi + else plural=`set $missing; test $[#] -gt 1 && echo s` missing=`set $missing missing="" @@ -126,55 +245,79 @@ done echo $missing` - make_html= - make_install_html= + docnote=. + test $docadd_html = yes && docnote='; + therefore, it will neither be possible to prepare, nor to install, + documentation in HTML format.' 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. + Consequently, groff's HTML backend (grohtml) will not work properly$docnote ]) + doc_dist_target_ok=no fi + AC_SUBST([make_htmldoc]) + AC_SUBST([make_install_htmldoc]) + AC_SUBST([make_uninstall_htmldoc]) + AC_SUBST([make_htmlexamples]) + AC_SUBST([make_install_htmlexamples]) + AC_SUBST([make_uninstall_htmlexamples])]) - 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]) + [make_pdfdoc= + make_install_pdfdoc= + make_uninstall_pdfdoc= + make_pdfexamples= + make_install_pdfexamples= + make_uninstall_pdfexamples= + 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 + if test -z "$missing"; then + if test $docadd_pdf = yes; then + make_pdfdoc=pdfdoc + make_install_pdfdoc=install_pdfdoc + make_uninstall_pdfdoc=uninstall_pdfdoc + if test $docadd_examples = yes; then + make_pdfexamples=pdfexamples + make_install_pdfexamples=install_pdfexamples + make_uninstall_pdfexamples=uninstall_pdfexamples + fi + fi + else 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= + docnote=. + test $docadd_pdf = yes && docnote='; + therefore, it will neither be possible to prepare, nor to install, + documentation and most of the examples in PDF format.' 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. + Consequently, groff's PDF formatter (pdfroff) will not work properly$docnote ]) + doc_dist_target_ok=no fi - AC_SUBST([make_pdfdoc]) - AC_SUBST([make_install_pdfdoc])]) + AC_SUBST([make_install_pdfdoc]) + AC_SUBST([make_uninstall_pdfdoc]) + AC_SUBST([make_pdfexamples]) + AC_SUBST([make_install_pdfexamples]) + AC_SUBST([make_uninstall_pdfexamples])]) + # Check whether pnmtops can handle the -nosetpage option. @@ -189,6 +332,7 @@ fi AC_SUBST([pnmtops_nosetpage])]) + # Check location of `gs'; allow `--with-gs=PROG' option to override. AC_DEFUN([GROFF_GHOSTSCRIPT_PATH], @@ -211,6 +355,7 @@ [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], @@ -222,6 +367,7 @@ [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. @@ -233,6 +379,7 @@ [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], @@ -255,6 +402,7 @@ fi rm -f conftest.sh]) + # From udodo!hans@relay.NL.net (Hans Zuidam) AC_DEFUN([GROFF_ISC_SYSV3], @@ -284,6 +432,7 @@ [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], @@ -303,6 +452,7 @@ [AC_MSG_RESULT([int])]) AC_LANG_POP([C++])]) + # In April 2005, autoconf's AC_TYPE_SIGNAL is still broken. AC_DEFUN([GROFF_TYPE_SIGNAL], @@ -345,6 +495,7 @@ (`int' or `void').]) fi]) + AC_DEFUN([GROFF_SYS_NERR], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for sys_nerr in , , or ]) @@ -413,6 +564,7 @@ [AC_MSG_RESULT([no])]) AC_LANG_POP([C++])]) + AC_DEFUN([GROFF_LIMITS_H], [AC_LANG_PUSH([C++]) AC_MSG_CHECKING([C++ ]) @@ -547,12 +699,14 @@ [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 @@ -609,6 +763,7 @@ AC_MSG_RESULT([$PAGE]) AC_SUBST([PAGE])]) + AC_DEFUN([GROFF_CXX_CHECK], [AC_REQUIRE([AC_PROG_CXX]) AC_LANG_PUSH([C++]) @@ -680,6 +835,7 @@ you should install libg++)])]) AC_LANG_POP([C++])]) + AC_DEFUN([GROFF_TMAC], [AC_MSG_CHECKING([for prefix of system macro packages]) sys_tmac_prefix= @@ -745,6 +901,7 @@ 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 @@ -756,6 +913,7 @@ fi AC_SUBST([g])]) + # We need the path to install-sh to be absolute. AC_DEFUN([GROFF_INSTALL_SH], @@ -763,10 +921,14 @@ 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], [:])]) + [if test $docadd_info = yes; then + AC_CHECK_PROGS([INSTALL_INFO], [install-info], [:]) + fi]) + # At least one UNIX system, Apple Macintosh Rhapsody 5.5, # does not have -lm ... @@ -775,6 +937,7 @@ [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. @@ -782,6 +945,7 @@ [AC_CHECK_LIB([c], [main], [LIBC=-lc]) AC_SUBST([LIBC])]) + # Check for EBCDIC -- stolen from the OS390 Unix LYNX port AC_DEFUN([GROFF_EBCDIC], @@ -810,6 +974,7 @@ 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. @@ -825,6 +990,28 @@ esac fi]) + +# Check whether Windows scripts like `afmtodit.cmd' should be installed. + +AC_DEFUN([GROFF_CMD_FILES], + [AC_MSG_CHECKING([whether to install .cmd wrapper scripts for Windows]) + case "$host_os" in + *mingw*) + make_winscripts=winscripts + make_install_winscripts=install_winscripts + make_uninstall_winscripts=uninstall_winscripts + AC_MSG_RESULT([yes]) ;; + *) + make_winscripts= + make_install_winscripts= + make_uninstall_winscripts= + AC_MSG_RESULT([no]) ;; + esac + AC_SUBST([make_winscripts]) + AC_SUBST([make_install_winscripts]) + AC_SUBST([make_uninstall_winscripts])]) + + # Check whether we need a declaration for a function. # # Stolen from GNU bfd. @@ -874,6 +1061,7 @@ fi AC_LANG_POP([C++])]) + # If mkstemp() isn't available, use our own mkstemp.cpp file. AC_DEFUN([GROFF_MKSTEMP], @@ -900,6 +1088,7 @@ _AC_LIBOBJ([mkstemp])]) AC_LANG_POP([C++])]) + # Test whether exists, doesn't clash with , # and declares uintmax_t. Taken from the fileutils package. @@ -926,6 +1115,7 @@ 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], @@ -950,6 +1140,7 @@ 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. @@ -965,6 +1156,7 @@ 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=';'). @@ -995,6 +1187,7 @@ AC_MSG_RESULT([$GROFF_PATH_SEPARATOR]) AC_SUBST(GROFF_PATH_SEPARATOR)]) + # Check for X11. AC_DEFUN([GROFF_X11], @@ -1055,6 +1248,7 @@ AC_SUBST([XPROGDIRS]) AC_SUBST([XLIBDIRS])]) + # Set up the `--with-appresdir' command line option. # Don't quote AS_HELP_STRING! @@ -1063,133 +1257,58 @@ 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'. +# By default if --with-appresdir is not used, we will install the +# gxditview resources in $prefix/lib/X11/app-defaults. # -# Based on autoconf's AC_PATH_X macro. +# Note that if --with-appresdir was passed to `configure', no prefix is +# added to `appresdir'. 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 + if test "x$prefix" = "xNONE"; then + appresdir=$ac_default_prefix/lib/X11/app-defaults + else + appresdir=$prefix/lib/X11/app-defaults + fi 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 (GXditview and + GXditview-color) will be installed in: - The application resource files for gxditview will be installed as - - $appresdir/GXditview - - and - - $appresdir/GXditview-color + $appresdir (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. + To install them into a different directory, say, + `/etc/X11/app-defaults', add + `--with-appresdir=/etc/X11/app-defaults' to the configure script + command line options and rerun it (`prefix' value has no effect on + a --with-appresdir option). + + If the gxditview resources are installed in a directory that is not + one of the default X11 resources directories (common default + directories are /usr/lib/X11/app-defaults, + /usr/share/X11/app-defaults and /etc/X11/app-defaults), you will + have to set the environment variable XFILESEARCHPATH to this + path. More details can be found in the X(7) manual page, or in "X + Toolkit Intrinsics - C Language Interface manual" ]) fi fi]) @@ -1202,10 +1321,35 @@ 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 + groffer_dir=$libprogramdir/groffer else groffer_dir=$with_grofferdir fi AC_SUBST([groffer_dir])]) + + +AC_DEFUN([GROFF_LIBPROGRAMDIR_DEFAULT], + libprogramdir=$libdir/groff + AC_SUBST([libprogramdir])) + + +AC_DEFUN([GROFF_GLILYPONDDIR_DEFAULT], + glilypond_dir=$libprogramdir/glilypond + AC_SUBST([glilypond_dir])) + + +AC_DEFUN([GROFF_GPINYINDIR_DEFAULT], + gpinyin_dir=$libprogramdir/gpinyin + AC_SUBST([gpinyin_dir])) + + +AC_DEFUN([GROFF_GROGDIR_DEFAULT], + grog_dir=$libprogramdir/grog + AC_SUBST([grog_dir])) + +AC_DEFUN([GROFF_REFERDIR_DEFAULT], + referdir=$libprogramdir/refer + AC_SUBST([referdir])) diff -ruN groff-1.22.2/m4/iconv.m4 groff-1.22.3/m4/iconv.m4 --- groff-1.22.2/m4/iconv.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/iconv.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,5 +1,5 @@ -# iconv.m4 serial 18 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2007-2012 Free Software Foundation, Inc. +# iconv.m4 serial 19 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2014 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. @@ -72,27 +72,33 @@ if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ #include #include -int main () -{ - int result = 0; + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[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 */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; @@ -105,14 +111,14 @@ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; @@ -124,14 +130,14 @@ 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 ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; @@ -144,14 +150,14 @@ 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"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_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, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; @@ -171,17 +177,14 @@ && 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 - ]) +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in diff -ruN groff-1.22.2/m4/lib-ld.m4 groff-1.22.3/m4/lib-ld.m4 --- groff-1.22.2/m4/lib-ld.m4 2013-02-07 13:06:11.000000000 +0100 +++ groff-1.22.3/m4/lib-ld.m4 2014-11-04 09:38:35.568519709 +0100 @@ -1,33 +1,39 @@ -# lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc. +# lib-ld.m4 serial 6 +dnl Copyright (C) 1996-2003, 2009-2014 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 with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +dnl From libtool-2.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. +[# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1; do + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname 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" @@ -78,23 +85,26 @@ fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do + IFS="$acl_save_ifs" 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. + # but apparently some variants of GNU ld 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 + case `"$acl_cv_path_LD" -v 2>&1 . # @@ -24,3 +24,11 @@ all: $(SHELL) configure $(MAKE) all + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.ccpg groff-1.22.3/Makefile.ccpg --- groff-1.22.2/Makefile.ccpg 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.ccpg 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1992, 1995, 2001, 2004, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2014 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 . # @@ -44,10 +43,19 @@ Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep -$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION \ + $(top_srcdir)/REVISION pure: $(PROG).pure $(PROG).pure: $(OBJS) $(XLIBS) $(PURIFY) $(PURIFYCCFLAGS) \ $(LINK.cpp) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.comm groff-1.22.3/Makefile.comm --- groff-1.22.2/Makefile.comm 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.comm 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1989-2000, 2002-2004, 2006-2011 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 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 . # @@ -67,30 +66,26 @@ .PHONY: pure fonts mostlyclean: - -rm -f $(MOSTLYCLEANFILES) + rm -f $(MOSTLYCLEANFILES) -rm -rf $(MOSTLYCLEANDIRADD) - -@if test `cd $(srcdir); pwd` = `pwd`; then \ - :; \ - else \ + -@if test "`cd $(srcdir); pwd`" != "`pwd`"; then \ rm -f $(MOSTLYCLEANNOTSRCDIRADD); \ fi clean: mostlyclean - -rm -f $(CLEANFILES) + rm -f $(CLEANFILES) distclean: clean - -rm -f $(DISTCLEANFILES) - -@if test `cd $(srcdir); pwd` = `pwd`; then \ - :; \ - else \ + rm -f $(DISTCLEANFILES) + -@if test "`cd $(srcdir); pwd`" != "`pwd`"; then \ rm -f $(YTABC) $(YTABH); \ fi realclean: distclean - -rm -f $(REALCLEANFILES) + rm -f $(REALCLEANFILES) extraclean: distclean - -rm -f \#* *~ =* core junk grot old temp tmp tem *.new *.old *.orig + rm -f \#* *~ =* core junk grot temp tmp tem *.new *.old *.orig .SUFFIXES: .SUFFIXES: .o .obj .cpp .c .y .man .n @@ -117,7 +112,7 @@ -test -f y.tab.c && mv y.tab.c y_tab.c sed "s/^#line \(.*\) \"y.tab.c\"/#line \1 \"$(YTABC)\"/" \ < y_tab.c > $(YTABC) - -rm -f y_tab.c + rm -f y_tab.c test -z "$(YTABH)" || mv y_tab.h $(YTABH) # The next rule is needed for make of Solaris 2.5.1 to override its @@ -136,88 +131,90 @@ .man.n: @echo Making $@ from $< - @-rm -f $@ - @sed -e "s|@APPRESDIR@|$(appresdir)|g" \ - -e "s|@BINDIR@|$(bindir)|g" \ - -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \ - -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \ - -e "s|@DATASUBDIR@|$(datasubdir)|g" \ - -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ - -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ - -e "s|@DEVICE@|$(DEVICE)|g" \ - -e "s|@DOCDIR@|$(docdir)|g" \ - -e "s|@EXAMPLEDIR@|$(exampledir)|g" \ - -e "s|@FONTDIR@|$(fontdir)|g" \ - -e "s|@g@|$(g)|g" \ - -e "s!@G@!`echo $(g) | tr [a-z] [A-Z]`!g" \ - -e "s|@HTMLDOCDIR@|$(htmldocdir)|g" \ - -e "s|@INDEX_SUFFIX@|$(indexext)|g" \ - -e "s|@LEGACYFONTDIR@|$(legacyfontdir)|g" \ - -e "s|@LOCALFONTDIR@|$(localfontdir)|g" \ - -e "s|@LOCALMACRODIR@|$(localtmacdir)|g" \ - -e "s|@MACRODIR@|$(tmacdir)|g" \ - -e "s|@MAN1EXT@|$(man1ext)|g" \ - -e "s|@MAN5EXT@|$(man5ext)|g" \ - -e "s|@MAN7EXT@|$(man7ext)|g" \ - -e "s|@MDATE@|`$(SHELL) $(top_srcdir)/mdate.sh $<`|g" \ - -e "s|@OLDFONTDIR@|$(oldfontdir)|g" \ - -e "s|@PDFDOCDIR@|$(pdfdocdir)|g" \ - -e "s|@SYSTEMMACRODIR@|$(systemtmacdir)|g" \ - -e "s|@TMAC_AN_PREFIX@|$(tmac_an_prefix)|g" \ - -e "s|@TMAC_M_PREFIX@|$(tmac_m_prefix)|g" \ - -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \ - -e "s|@TMAC_S_PREFIX@|$(tmac_s_prefix)|g" \ - -e "s|@VERSION@|$(version)$(revision)|g" \ - $< >$@ + @rm -f $@ + @LC_ALL=C \ + sed -e "s|@APPRESDIR@|$(appresdir)|g" \ + -e "s|@BINDIR@|$(bindir)|g" \ + -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \ + -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \ + -e "s|@DATASUBDIR@|$(datasubdir)|g" \ + -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ + -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ + -e "s|@DEVICE@|$(DEVICE)|g" \ + -e "s|@DOCDIR@|$(docdir)|g" \ + -e "s|@EXAMPLEDIR@|$(exampledir)|g" \ + -e "s|@FONTDIR@|$(fontdir)|g" \ + -e "s|@g@|$(g)|g" \ + -e "s!@G@!`echo $(g) | tr [a-z] [A-Z]`!g" \ + -e "s|@HTMLDOCDIR@|$(htmldocdir)|g" \ + -e "s|@INDEX_SUFFIX@|$(indexext)|g" \ + -e "s|@LEGACYFONTDIR@|$(legacyfontdir)|g" \ + -e "s|@LOCALFONTDIR@|$(localfontdir)|g" \ + -e "s|@LOCALMACRODIR@|$(localtmacdir)|g" \ + -e "s|@MACRODIR@|$(tmacdir)|g" \ + -e "s|@MAN1EXT@|$(man1ext)|g" \ + -e "s|@MAN5EXT@|$(man5ext)|g" \ + -e "s|@MAN7EXT@|$(man7ext)|g" \ + -e "s|@MDATE@|`$(SHELL) $(top_srcdir)/mdate.sh $<`|g" \ + -e "s|@OLDFONTDIR@|$(oldfontdir)|g" \ + -e "s|@PDFDOCDIR@|$(pdfdocdir)|g" \ + -e "s|@SYSTEMMACRODIR@|$(systemtmacdir)|g" \ + -e "s|@TMAC_AN_PREFIX@|$(tmac_an_prefix)|g" \ + -e "s|@TMAC_M_PREFIX@|$(tmac_m_prefix)|g" \ + -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \ + -e "s|@TMAC_S_PREFIX@|$(tmac_s_prefix)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + $< >$@ .PHONY: install_man install_man: -test -d $(DESTDIR)$(manroot) || $(mkinstalldirs) $(DESTDIR)$(manroot) -test -d $(DESTDIR)$(man1dir) || $(mkinstalldirs) $(DESTDIR)$(man1dir) @-pages="$(MAN1)"; \ - for p in $$pages; do \ - prog=`basename $$p .n`; \ - target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX)$$prog.$(man1ext); \ - rm -f $$target; \ - echo $(INSTALL_DATA) $$p $$target; \ - $(INSTALL_DATA) $$p $$target; \ + for p in $$pages; do \ + prog=`basename $$p .n`; \ + target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX)$$prog.$(man1ext); \ + rm -f $$target; \ + echo $(INSTALL_DATA) $$p $$target; \ + $(INSTALL_DATA) $$p $$target; \ done -test -d $(DESTDIR)$(man5dir) || $(mkinstalldirs) $(DESTDIR)$(man5dir) @-pages="$(MAN5)"; \ - for p in $$pages; do \ - target=$(DESTDIR)$(man5dir)/`basename $$p .n`.$(man5ext); \ - rm -f $$target; \ - echo $(INSTALL_DATA) $$p $$target; \ - $(INSTALL_DATA) $$p $$target; \ + for p in $$pages; do \ + target=$(DESTDIR)$(man5dir)/`basename $$p .n`.$(man5ext); \ + rm -f $$target; \ + echo $(INSTALL_DATA) $$p $$target; \ + $(INSTALL_DATA) $$p $$target; \ done -test -d $(DESTDIR)$(man7dir) || $(mkinstalldirs) $(DESTDIR)$(man7dir) @-pages="$(MAN7)"; \ - for p in $$pages; do \ - target=$(DESTDIR)$(man7dir)/`basename $$p .n`.$(man7ext); \ - rm -f $$target; \ - echo $(INSTALL_DATA) $$p $$target; \ - $(INSTALL_DATA) $$p $$target; \ + for p in $$pages; do \ + target=$(DESTDIR)$(man7dir)/`basename $$p .n`.$(man7ext); \ + rm -f $$target; \ + echo $(INSTALL_DATA) $$p $$target; \ + $(INSTALL_DATA) $$p $$target; \ done .PHONY: uninstall_man uninstall_man: @-pages="$(MAN1)"; \ - for p in $$pages; do \ - target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX)`basename $$p .n`.$(man1ext); \ - echo rm -f $$target; \ - rm -f $$target; \ - done + for p in $$pages; do \ + target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX); \ + target=$$target`basename $$p .n`.$(man1ext); \ + echo rm -f $$target; \ + rm -f $$target; \ + done @-pages="$(MAN5)"; \ - for p in $$pages; do \ - target=$(DESTDIR)$(man5dir)/`basename $$p .n`.$(man5ext); \ - echo rm -f $$target; \ - rm -f $$target; \ - done + for p in $$pages; do \ + target=$(DESTDIR)$(man5dir)/`basename $$p .n`.$(man5ext); \ + echo rm -f $$target; \ + rm -f $$target; \ + done @-pages="$(MAN7)"; \ - for p in $$pages; do \ - target=$(DESTDIR)$(man7dir)/`basename $$p .n`.$(man7ext); \ - echo rm -f $$target; \ - rm -f $$target; \ + for p in $$pages; do \ + target=$(DESTDIR)$(man7dir)/`basename $$p .n`.$(man7ext); \ + echo rm -f $$target; \ + rm -f $$target; \ done .PHONY: install_prog @@ -228,7 +225,7 @@ .PHONY: uninstall_prog uninstall_prog: - -rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)$(PROG) + rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)$(PROG) .PHONY: install_dev install_dev: @@ -268,23 +265,24 @@ || for f in ""$(DEVFILES); do \ rm -f $(DESTDIR)$(fontsubdir)/$$f; \ if test -f $$f; then \ - $(INSTALL_DATA) $$f $(DESTDIR)$(fontsubdir)/$$f; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(fontsubdir)/$$f; \ else \ - $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \ fi; \ done -test -z "$(OLDDEVFILES)" \ || for f in ""$(OLDDEVFILES); do \ rm -f $(DESTDIR)$(oldfontsubdir)/$$f; \ - $(INSTALL_DATA) $(srcdir)/old/$$f $(DESTDIR)$(oldfontsubdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/old/$$f \ + $(DESTDIR)$(oldfontsubdir)/$$f; \ done -test -z "$(DEVSCRIPTS)" \ || for f in ""$(DEVSCRIPTS); do \ rm -f $(DESTDIR)$(fontsubdir)/$$f; \ if test -f $$f; then \ - $(INSTALL_SCRIPT) $$f $(DESTDIR)$(fontsubdir)/$$f; \ + $(INSTALL_SCRIPT) $$f $(DESTDIR)$(fontsubdir)/$$f; \ else \ - $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(fontsubdir)/$$f; \ fi; \ done @@ -298,30 +296,33 @@ || for f in ""$(OLDDEVFILES); do \ rm -f $(DESTDIR)$(oldfontsubdir)/$$f; \ done - -test -d $(DESTDIR)$(fontsubdir)/generate \ - && rmdir $(DESTDIR)$(fontsubdir)/generate - -test -d $(DESTDIR)$(fontsubdir)/enc \ - && rmdir $(DESTDIR)$(fontsubdir)/enc - -test -d $(DESTDIR)$(fontsubdir)/map \ - && rmdir $(DESTDIR)$(fontsubdir)/map - -test -d $(DESTDIR)$(fontsubdir)/util \ - && rmdir $(DESTDIR)$(fontsubdir)/util - -rmdir $(DESTDIR)$(fontsubdir) - -rmdir $(DESTDIR)$(oldfontsubdir) + -d=$(DESTDIR)$(fontsubdir)/generate;\ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir)/enc;\ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir)/map;\ + if test -d $$d; then rmdir $$d; fi + -d=$(DESTDIR)$(fontsubdir)/util;\ + if test -d $$d; then rmdir $$d; fi + -test -d $(DESTDIR)$(fontsubdir) $$ \ + rmdir $(DESTDIR)$(fontsubdir) + -d=$(DESTDIR)$(oldfontsubdir);\ + if test -d $$d; then rmdir $$d; fi .PHONY: depend_src depend_src: depend.temp mv depend.temp Makefile.dep depend.temp: FORCE - > depend.temp; + > depend.temp if test -f "$(srcdir)/$(YTABC)"; then \ ytabc="$(srcdir)/$(YTABC)"; \ else \ ytabc="$(YTABC)"; \ fi; \ test -z "$(CCSRCS)$(YTABC)" \ - || $(CCC) $(ALL_CCFLAGS) $(EXTRA_CCFLAGS) -MM $(CCSRCS) $$ytabc >>depend.temp + || $(CCC) $(ALL_CCFLAGS) $(EXTRA_CCFLAGS) -MM $(CCSRCS) $$ytabc \ + >>depend.temp test -z "$(CSRCS)" \ || $(CC) $(ALL_CFLAGS) $(EXTRA_CFLAGS) -MM $(CSRCS) >>depend.temp test -z "$(YTABH)" \ @@ -336,11 +337,18 @@ # This rule is only considered for the subdir_Makefile target. Makefile: - -rm -f Makefile - echo srcdir=$(srcdir) >>Makefile + echo srcdir=$(srcdir) >Makefile echo VPATH=$(VPATH) >>Makefile cat $(MAKEFILEPARTS) /dev/null >>Makefile FORCE: .NOEXPORT: + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.cpg groff-1.22.3/Makefile.cpg --- groff-1.22.2/Makefile.cpg 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.cpg 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1992, 1995, 2001, 2004, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2014 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 . # @@ -44,4 +43,13 @@ Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep -$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION \ + $(top_srcdir)/REVISION + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.dev groff-1.22.3/Makefile.dev --- groff-1.22.2/Makefile.dev 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.dev 2014-11-04 09:38:35.145524997 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 1989-2000, 2003, 2009 Free Software Foundation, Inc. -# Written by James Clark (jjc@jclark.com) -# +# Copyright (C) 1989-2014 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 . # @@ -22,3 +22,11 @@ install_data: install_dev uninstall_sub: uninstall_dev install_dev: $(DEVFILES) $(DEVSCRIPTS) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.in groff-1.22.3/Makefile.in --- groff-1.22.2/Makefile.in 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.in 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1989-2006, 2009-2013 -# Free Software Foundation, Inc. -# Written by James Clark (jjc@jclark.com) -# +# Copyright (C) 1989-2014 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 . # @@ -188,7 +187,12 @@ # gxditview. appresdir=@appresdir@ +glilypond_dir=@glilypond_dir@ +gpinyin_dir=@gpinyin_dir@ groffer_dir=@groffer_dir@ +grog_dir=@grog_dir@ +libprogramdir=@libprogramdir@ +referdir=@referdir@ # `tmacpath' says where to look for macro files. # The current directory will be prepended in unsafe mode only; the home @@ -259,15 +263,55 @@ man7ext=7 man7dir=$(manroot)/man$(man7ext) +# `dist' target is disallowed in some `configure' combinations. +doc_dist_target_ok=@doc_dist_target_ok@ + +# The configure script checks whether the user wants the info documentation. +# For the repo version this mechanism also suppresses building via `makeinfo'. +make_infodoc=@make_infodoc@ +make_install_infodoc=@make_install_infodoc@ +make_uninstall_infodoc=@make_uninstall_infodoc@ + # The configure script checks whether all necessary utility programs for # grohtml are available -- only then we can build the HTML documentation. -make_html=@make_html@ -make_install_html=@make_install_html@ +make_htmldoc=@make_htmldoc@ +make_install_htmldoc=@make_install_htmldoc@ +make_uninstall_htmldoc=@make_uninstall_htmldoc@ + +make_htmlexamples=@make_htmlexamples@ +make_install_htmlexamples=@make_install_htmlexamples@ +make_uninstall_htmlexamples=@make_uninstall_htmlexamples@ + +# However, there may always be some prebuild HTML documentation +make_install_shipped_htmldoc=@make_install_shipped_htmldoc@ +make_uninstall_shipped_htmldoc=@make_uninstall_shipped_htmldoc@ # The configure script also checks whether all necessary utility programs # for pdfroff are available -- only then we can build PDF documentation. make_pdfdoc=@make_pdfdoc@ make_install_pdfdoc=@make_install_pdfdoc@ +make_uninstall_pdfdoc=@make_uninstall_pdfdoc@ + +make_pdfexamples=@make_pdfexamples@ +make_install_pdfexamples=@make_install_pdfexamples@ +make_uninstall_pdfexamples=@make_uninstall_pdfexamples@ + +# `other' documentation, e.g., `meref.me' and `pic.ms', as well as their +# generated counterparts.. +make_otherdoc=@make_otherdoc@ +make_install_otherdoc=@make_install_otherdoc@ +make_uninstall_otherdoc=@make_uninstall_otherdoc@ + +# `examples' -- a generic switch, but the generated examples are furtherly +# subdivided to catch HTML and PDF production availability. +make_examples=@make_examples@ +make_install_examples=@make_install_examples@ +make_uninstall_examples=@make_uninstall_examples@ + +# Windows `.cmd' files +make_winscripts=@make_winscripts@ +make_install_winscripts=@make_install_winscripts@ +make_uninstall_winscripts=@make_uninstall_winscripts@ # All the previous installation directories, when used, are prefixed with # $(DESTDIR) during install and uninstall, to support staged installations. @@ -348,7 +392,7 @@ # # -DICONV_CONST=const if declaration of iconv() needs const # -DLONG_FOR_TIME_T if localtime() takes a long * not a time_t * -# -DRETSIGTYPE=int if signal handlers return int not void +# -DRETSIGTYPE=int if signal handlers return int not void # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int # # -DWCOREFLAG=0200 if the 0200 bit of the status returned by @@ -402,6 +446,7 @@ YACC=@YACC@ YACCFLAGS=-v +GREP=@GREP@ EGREP=@EGREP@ MAKEINFO=@MAKEINFO@ @@ -425,7 +470,8 @@ # Flag that tells etags to assume C++. ETAGSCCFLAG=-C # Full path to perl. -PERLPATH=@PERLPATH@ +PERL=@PERL@ +PERLVERSION=@PERLVERSION@ # Sed command with which to edit sh scripts. SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@ # Sed script to deal with OS dependencies in sh scripts. @@ -462,6 +508,7 @@ "ETAGSFLAGS=$(ETAGSFLAGS)" \ "EXEEXT=$(EXEEXT)" \ "GLIBC21=$(GLIBC21)" \ + "GREP=$(GREP)" \ "HOST=$(HOST)" \ "INSTALL_DATA=$(INSTALL_DATA)" \ "INSTALL_INFO=$(INSTALL_INFO)" \ @@ -478,8 +525,9 @@ "OBJEXT=$(OBJEXT)" \ "OTHERDEVDIRS=$(OTHERDEVDIRS)" \ "PAGE=$(PAGE)" \ + "PERL=$(PERL)" \ + "PERLVERSION=$(PERLVERSION)" \ "GHOSTSCRIPT=$(GHOSTSCRIPT)" \ - "PERLPATH=$(PERLPATH)" \ "PSPRINT=$(PSPRINT)" \ "PURIFY=$(PURIFY)" \ "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \ @@ -501,6 +549,10 @@ "YACCFLAGS=$(YACCFLAGS)" \ "appresdir=$(appresdir)" \ "groffer_dir=$(groffer_dir)" \ + "gpinyin_dir=$(gpinyin_dir)" \ + "glilypond_dir=$(glilypond_dir)" \ + "grog_dir=$(grog_dir)" \ + "referdir=$(referdir)" \ "bindir=$(bindir)" \ "common_words_file=$(common_words_file)" \ "datadir=$(datadir)" \ @@ -523,10 +575,32 @@ "libprogramdir=$(libprogramdir)" \ "localfontdir=$(localfontdir)" \ "localtmacdir=$(localtmacdir)" \ - "make_html=$(make_html)" \ - "make_install_html=$(make_install_html)" \ + "make_infodoc=$(make_infodoc)" \ + "make_install_infodoc=$(make_install_infodoc)" \ + "make_uninstall_infodoc=$(make_uninstall_infodoc)" \ + "make_htmldoc=$(make_htmldoc)" \ + "make_install_htmldoc=$(make_install_htmldoc)" \ + "make_uninstall_htmldoc=$(make_uninstall_htmldoc)" \ + "make_htmlexamples=$(make_htmlexamples)" \ + "make_install_htmlexamples=$(make_install_htmlexamples)" \ + "make_uninstall_htmlexamples=$(make_uninstall_htmlexamples)" \ + "make_install_shipped_htmldoc=$(make_install_shipped_htmldoc)" \ + "make_uninstall_shipped_htmldoc=$(make_uninstall_shipped_htmldoc)" \ "make_pdfdoc=$(make_pdfdoc)" \ "make_install_pdfdoc=$(make_install_pdfdoc)" \ + "make_uninstall_pdfdoc=$(make_uninstall_pdfdoc)" \ + "make_pdfexamples=$(make_pdfexamples)" \ + "make_install_pdfexamples=$(make_install_pdfexamples)" \ + "make_uninstall_pdfexamples=$(make_uninstall_pdfexamples)" \ + "make_otherdoc=$(make_otherdoc)" \ + "make_install_otherdoc=$(make_install_otherdoc)" \ + "make_uninstall_otherdoc=$(make_uninstall_otherdoc)" \ + "make_examples=$(make_examples)" \ + "make_install_examples=$(make_install_examples)" \ + "make_uninstall_examples=$(make_uninstall_examples)" \ + "make_winscripts=$(make_winscripts)" \ + "make_install_winscripts=$(make_install_winscripts)" \ + "make_uninstall_winscripts=$(make_uninstall_winscripts)" \ "man1dir=$(man1dir)" \ "man1ext=$(man1ext)" \ "man5dir=$(man5dir)" \ @@ -558,7 +632,6 @@ esac; \ done` - INCDIRS=\ src/include LIBDIRS=\ @@ -566,6 +639,11 @@ src/libs/libdriver \ src/libs/libbib \ $(XLIBDIRS) +ALLLIBDIRS=\ + src/libs/libgroff \ + src/libs/libdriver \ + src/libs/libbib \ + src/libs/libxutil CCPROGDIRS=\ src/roff/groff \ src/roff/troff \ @@ -591,13 +669,23 @@ src/utils/addftinfo CPROGDIRS=\ src/utils/pfbtops +SHPROGDIRS=\ + src/devices/gropdf PROGDEPDIRS=\ arch/misc PROGDIRS=\ $(PROGDEPDIRS) \ $(CCPROGDIRS) \ $(CPROGDIRS) \ + $(SHPROGDIRS) \ $(XPROGDIRS) +ALLPROGDIRS=\ + $(PROGDEPDIRS) \ + $(CCPROGDIRS) \ + $(CPROGDIRS) \ + $(SHPROGDIRS) \ + src/devices/xditview \ + src/utils/xtotroff DEVDIRS=\ font/devps \ font/devdvi \ @@ -608,27 +696,32 @@ font/devutf8 \ font/devcp1047 # `doc' must be processed before `contrib/pdfmark', -# pdf stuff must be processed before `contrib/mom +# pdf stuff must be processed before `contrib/mom', +# devpdf fonts depends on `afmtodit' OTHERDIRS=\ - man \ - tmac \ src/utils/afmtodit \ - src/roff/grog \ - src/roff/nroff \ - doc \ - contrib/mm \ + font/devpdf \ + arch/mingw \ contrib/chem \ - contrib/pic2graph \ contrib/eqn2graph \ + contrib/gdiffmk \ + contrib/glilypond \ + contrib/gperl \ + contrib/gpinyin \ contrib/grap2graph \ + contrib/groff_filenames \ contrib/groffer \ contrib/hdtbl \ + contrib/mm \ contrib/pdfmark \ - src/devices/gropdf \ - font/devpdf \ + contrib/pic2graph \ contrib/mom \ - contrib/gdiffmk - + doc \ + man \ + src/roff/grog \ + src/roff/nroff \ + tmac + # OTHERDIRS is handled specially in the `$(TARGETS)' rule to avoid # dependency problems with parallel builds. ALLDIRS=\ @@ -650,8 +743,6 @@ arch/djgpp \ contrib/chem/examples \ contrib/chem/examples/122 \ - contrib/groffer/perl \ - contrib/groffer/shell \ contrib/hdtbl/examples \ contrib/mm/examples \ contrib/mm/mm \ @@ -672,8 +763,8 @@ src/libs/gnulib DISTDIRS=\ $(INCDIRS) \ - $(LIBDIRS) \ - $(PROGDIRS) \ + $(ALLLIBDIRS) \ + $(ALLPROGDIRS) \ $(DEVDIRS) \ $(XDEVDIRS) \ $(OTHERDEVDIRS) \ @@ -706,11 +797,19 @@ # Default target for subdir_Makefile subdir=src/roff/troff - $(TARGETS): @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) do=$@ $(ALLDIRS) @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) do=$@ $(OTHERDIRS) dot +clean: clean-gnulib +clean-gnulib: + @$(ENVSETUP); cd src/libs/gnulib; $(MAKE) $(MAKE_K_FLAG) clean + +distclean: distclean-gnulib +distclean-gnulib: + @$(ENVSETUP); cd src/libs/gnulib; $(MAKE) $(MAKE_K_FLAG) distclean + rm -rf src/libs/gnulib/autom4te.cache + dot: FORCE @$(ENVSETUP); \ $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$(srcdir) VPATH=$(srcdir) \ @@ -765,7 +864,8 @@ -f $(top_srcdir)/Makefile.ccpg \ -f Makefile.dep $(do) -$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) +$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE \ + $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) @$(ENVSETUP); \ if test $(srcdir) = .; then \ srcdir=.; \ @@ -792,13 +892,13 @@ cd $@; \ args=`$(top_builddir)/config.status --config`; \ test -f Makefile \ - || eval $$srcdir/configure "$$args" --srcdir=$$srcdir; \ + || eval $$srcdir/configure "$$args" --srcdir=$$srcdir; \ $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \ esac -$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) +$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) $(SHPROGDIRS) -$(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE +$(INCDIRS) $(PROGDEPDIRS) $(SHPROGDIRS) $(OTHERDIRS): FORCE @$(ENVSETUP); \ if test $(srcdir) = .; then \ srcdir=.; \ @@ -814,36 +914,49 @@ .PHONY: dist dist: + if test "${doc_dist_target_ok}" != yes; then \ + echo "The \`dist' target is not applicable to this configuration"; \ + exit 1; \ + fi -rm -fr tmp rm -f groff-$(version)$(revision).tar.gz mkdir tmp for d in $(DISTDIRS); do \ $(mkinstalldirs) tmp/$$d; \ done - cd tmp; \ - cp ../Makefile .; \ - cp $(top_srcdir)/* . 2>/dev/null || true; \ - rm -rf CVS; \ - for d in $(DISTDIRS); do \ - (cd $$d; \ - cp $(top_srcdir)/$$d/* . 2>/dev/null; \ - rm -rf CVS || true); \ - done; \ - $(MAKE) srcdir=. VPATH=. distfiles; \ - $(MAKE) srcdir=. VPATH=. extraclean; \ + cp Makefile tmp + -cp * tmp 2>/dev/null + -for d in $(DISTDIRS); do \ + (cd tmp/$$d; \ + cp $(top_srcdir)/$$d/* . 2>/dev/null;); \ + done + cd tmp; $(MAKE) srcdir=. VPATH=. distfiles + cd tmp; $(MAKE) srcdir=. VPATH=. extraclean for d in $(EXTRADIRS); do \ - (cd $$d; \ + (cd tmp/$$d; \ if test -f Makefile; then \ $(MAKE) extraclean; \ else \ $(MAKE) -f $(top_builddir)/$$d/Makefile extraclean; \ fi); \ - done; \ - rm -f Makefile; \ - cp $(top_srcdir)/Makefile.init Makefile + done + for d in $(GNULIBDIRS); do \ + (cd tmp/$$d; \ + if test -f config.status; then \ + ./config.status; \ + fi; \ + if test -f Makefile; then \ + $(MAKE) distclean; \ + else \ + $(MAKE) -f $(top_builddir)/$$d/Makefile distclean; \ + fi; \ + rm -rf autom4te.cache); \ + done + rm -f tmp/Makefile + cp Makefile.init tmp/Makefile mv tmp groff-$(version)$(revision) - tar cfh - groff-$(version)$(revision) | \ - gzip -c >groff-$(version)$(revision).tar.gz + tar cfh - groff-$(version)$(revision) \ + | gzip -c >groff-$(version)$(revision).tar.gz rm -fr groff-$(version)$(revision) # $(PROGDIRS): libgroff @@ -874,8 +987,8 @@ @$(ENVSETUP); $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) \ do=do_install $(dodirs) cd $(DESTDIR)$(dataprogramdir); \ - rm -f current; \ - $(LN_S) $(version)$(revision) current + rm -f current; \ + $(LN_S) $(version)$(revision) current .PHONY: uninstall uninstall: uninstall_sub uninstall_dirs @@ -883,14 +996,31 @@ .PHONY: uninstall_dirs # Use `rmdir' here so that the directories are only removed if they are empty. uninstall_dirs: - -rm -f $(dataprogramdir)/current - -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \ - $(tmacdir) $(systemtmacdir) $(localtmacdir) \ - $(fontdir) $(localfontdir) $(oldfontdir) $(bindir) \ - $(datasubdir) $(dataprogramdir) $(infodir) \ - $(exampledir) $(htmldocdir) $(pdfdocdir) $(docdir) \ - $(libprogramdir) $(libdir) \ - $(datadir)/doc/groff $(datadir)/doc $(datadir) 2>/dev/null || : + rm -f $(DESTDIR)$(dataprogramdir)/current + -rmdir \ + $(DESTDIR)$(man1dir) \ + $(DESTDIR)$(man5dir) \ + $(DESTDIR)$(man7dir) \ + $(DESTDIR)$(manroot) \ + $(DESTDIR)$(tmacdir) \ + $(DESTDIR)$(systemtmacdir) \ + $(DESTDIR)$(localtmacdir) \ + $(DESTDIR)$(fontdir) \ + $(DESTDIR)$(localfontdir) \ + $(DESTDIR)$(oldfontdir) \ + $(DESTDIR)$(bindir) \ + $(DESTDIR)$(datasubdir) \ + $(DESTDIR)$(dataprogramdir) \ + $(DESTDIR)$(libprogramdir) \ + $(DESTDIR)$(libdir) \ + $(DESTDIR)$(infodir) \ + $(DESTDIR)$(exampledir) \ + $(DESTDIR)$(htmldocdir) \ + $(DESTDIR)$(pdfdocdir) \ + $(DESTDIR)$(docdir) \ + $(DESTDIR)$(datadir)/doc/groff \ + $(DESTDIR)$(datadir)/doc \ + $(DESTDIR)$(datadir) 2>/dev/null || : .PHONY: check check: @@ -919,10 +1049,18 @@ # @echo "## All variables above are generated by configure. Do not edit! ##" >> site.tmp # @test ! -f site.exp \ # || sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp -# @-rm -f site.bak +# @rm -f site.bak # @test ! -f site.exp || mv site.exp site.bak # @mv site.tmp site.exp FORCE: .NOEXPORT: + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.init groff-1.22.3/Makefile.init --- groff-1.22.2/Makefile.init 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.init 2014-11-04 09:38:35.145524997 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 1989-2000, 2009 Free Software Foundation, Inc. +# Copyright (C) 1989-2014 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 . # @@ -24,3 +24,11 @@ all: $(SHELL) configure $(MAKE) all + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.lib groff-1.22.3/Makefile.lib --- groff-1.22.2/Makefile.lib 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.lib 2014-11-04 09:38:35.145524997 +0100 @@ -1,18 +1,18 @@ -# Copyright (C) 1989-2000, 2003, 2009 Free Software Foundation, Inc. +# Copyright (C) 1989-2014 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 . # @@ -38,3 +38,11 @@ Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.man groff-1.22.3/Makefile.man --- groff-1.22.2/Makefile.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.man 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1992, 2001, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2014 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 . # @@ -23,4 +22,13 @@ install_data: install_man install_man: $(MANPAGES) uninstall_sub: uninstall_man -$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION \ + $(top_srcdir)/REVISION + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/Makefile.sub groff-1.22.3/Makefile.sub --- groff-1.22.2/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/Makefile.sub 2014-11-04 09:38:35.145524997 +0100 @@ -1,19 +1,18 @@ -# Copyright (C) 1989-2000, 2001-2004, 2006, 2009, 2013 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 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 . # @@ -37,6 +36,8 @@ conftest* M4MACROS=\ + $(srcdir)/m4/ax_compare_version.m4 \ + $(srcdir)/m4/ax_prog_perl_version.m4 \ $(srcdir)/m4/codeset.m4 \ $(srcdir)/m4/fcntl-o.m4 \ $(srcdir)/m4/glibc21.m4 \ @@ -63,7 +64,7 @@ $(srcdir)/stamp-h.in: configure.ac $(srcdir)/aclocal.m4 cd $(srcdir) && autoheader echo timestamp > $(srcdir)/stamp-h.in - + config.h: stamp-h stamp-h: config.hin config.status $(SHELL) config.status @@ -72,3 +73,11 @@ install_data: -test -d $(DESTDIR)$(localfontdir) \ || $(mkinstalldirs) $(DESTDIR)$(localfontdir) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/man/ditroff.man groff-1.22.3/man/ditroff.man --- groff-1.22.2/man/ditroff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/ditroff.man 2014-11-04 09:38:35.517520346 +0100 @@ -1,34 +1,38 @@ -.ig -ditroff.man +.\" Emacs mode: -*- nroff -*- +.TH DITROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +ditroff \- classical device independent roff +. +.\" ditroff.man +. +. +.de co +Copyright \[co] 2001-2014 Free Software Foundation, Inc. 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 +any later version published by the Free Software Foundation; 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. +FDL in the main directory of the groff source package, it is also +available on-line at the +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU copyleft site +.UE . +.. +.de au +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 . .. -. -. -.\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH DITROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -ditroff \- classical device independent roff -. . .\" -------------------------------------------------------------------- .SH DESCRIPTION @@ -58,31 +62,33 @@ .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 +Kernighan\[aq]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 +In order to distinguish it from Ossanna\[aq]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. +on some systems, though this naming isn\[aq]t mentioned in the +classical documentation. +. . .P -Today, any existing roff system is based on Kernighan's multi-device -troff. +Today, any existing roff system is based on Kernighan\[aq]s +multi-device troff. . The distinction between .I troff and .I ditroff -isn't necessary any longer, for each modern +isn\[aq]t necessary any longer, for each modern .I troff provides already the complete functionality of .IR ditroff . @@ -92,6 +98,7 @@ is used to denote .IR ditroff . . +. .P The easiest way to use ditroff is the GNU roff system, .IR groff . @@ -109,7 +116,7 @@ .TP .I [CSTR\~#54] The 1992 revision of the -.I Nroff/Troff User's Manual +.I Nroff/Troff User\[aq]s Manual by .I J.\& F.\& Ossanna and @@ -151,41 +158,10 @@ . . .\" -------------------------------------------------------------------- -.SH "AUTHORS" +.SH "COPYING" .\" -------------------------------------------------------------------- -. -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 . -. -. +.co .\" -------------------------------------------------------------------- -.\" Emacs settings +.SH "AUTHORS" .\" -------------------------------------------------------------------- -.\" -.\" Local Variables: -.\" mode: nroff -.\" End: +.au diff -ruN groff-1.22.2/man/groff_char.man groff-1.22.3/man/groff_char.man --- groff-1.22.2/man/groff_char.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff_char.man 2014-11-04 09:38:35.517520346 +0100 @@ -1,42 +1,58 @@ -.\" t +'\" 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). . +.\" groff_char(7): +.\" Source file position: /man/groff_char.man +.\" Installed position: /share/man/man7/groff_char.7 +. . .\" -------------------------------------------------------------------- .\" Legal terms .\" -------------------------------------------------------------------- . -.ig -groff_char(7) - -This file is part of groff (GNU roff). - -File position: /man/groff_char.man +.de co +Copyright \(co 1989-2014 Free Software Foundation, Inc. -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 +This file is part of groff (GNU roff), which is a free software project. -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. +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. -A copy of the Free Documentation License is included as a file called -FDL in the main directory of the groff source package. +You should have received a copy of the GNU General Public License +along with this program. +. +If not, see +.UR http://www.gnu.org/licenses/gpl-2.0.html +GPL2 +.UE . .. -.ig -A copy of the GNU Free Documentation License is also available in this -Debian package as /usr/share/doc/groff/copyright. +. +.de au +This document 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 . +. +This document was revised to use real tables by +.MT esr@thyrsus.com +Eric S. Raymond +.ME . .. . .\" -------------------------------------------------------------------- @@ -61,24 +77,24 @@ . . .\" -------------------------------------------------------------------- -.\" .SH DESCRIPTION +.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 +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)'. +Glyphs not available for the device that is being used to print or +view this manual page are marked with +.ie \n(.g \[oq](N/A)\[cq]; the device currently used is \[oq]\*(.T\[cq]. +.el \[oq](N/A)\[cq]. . . .P @@ -87,9 +103,10 @@ 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 +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. @@ -124,14 +141,15 @@ 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 +They include \[oq]\f(CW\e\e\fP\[cq], \[oq]\f(CW\e\'\fP\[cq], +\[oq]\f(CW\e`\fP\[cq], \[oq]\f(CW\e-\fP\[cq], \[oq]\f(CW\e.\fP\[cq], +and \[oq]\f(CW\ee\fP\[cq]; 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. +tested positively with the \[oq]\f(CW.if\ c\fP\[cq] conditional. . . .\" -------------------------------------------------------------------- @@ -175,6 +193,16 @@ .I "Unicode" is the glyph name used in composite glyph names. . +The names in the Unicode column look like +.B u0021 +or +.BR u0041_0300 . +. +In groff, the corresponding Unicode characters can be constructed +by adding a backslash and a pair of square brackets, for example +.B \e[u0021] +or +.BR \e[u0041_0300] . . . .\" -------------------------------------------------------------------- @@ -187,7 +215,8 @@ 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'. +The glyph names used in composite glyph names are \[oq]u0020\[cq] up +to \[oq]u007E\[cq]. . . .P @@ -224,72 +253,78 @@ . .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'. +the ISO \%latin1 \[oq]Grave Accent\[cq] (code\ 96) prints as \[oq], a +left single quotation mark; the original character can be obtained +with \[oq]\f(CW\e`\fP\[cq]. . . .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'. +the ISO \%latin1 \[oq]Apostrophe\[cq] (code\ 39) prints as ', a right +single quotation mark; the original character can be obtained with +\[oq]\f(CW\e(aq\fP\[cq]. . . .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'. +the ISO \%latin1 \[oq]Hyphen, Minus Sign\[cq] (code\ 45) prints as a +hyphen; a minus sign can be obtained with \[oq]\f(CW\e-\fP\[cq]. . . .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'. +the ISO \%latin1 \[oq]Tilde\[cq] (code\ 126) is reduced in size to be +usable as a diacritic; a larger glyph can be obtained with +\[oq]\f(CW\e(ti\fP\[cq]. . . .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'. +the ISO \%latin1 \[oq]Circumflex Accent\[cq] (code\ 94) is reduced in +size to be usable as a diacritic; a larger glyph can be obtained with +\[oq]\f(CW\e(ha\fP\[cq]. . . .P +.na .TS -l l l l l l. +l l l l l lx. 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 +\[char33] \[char33] 33 exclam u0021 exclamation mark (bang) +\[char34] \[char34] 34 quotedbl u0022 double quote +\[char35] \[char35] 35 numbersign u0023 number sign +\[char36] \[char36] 36 dollar u0024 currency dollar sign +\[char37] \[char37] 37 percent u0025 percent +\[char38] \[char38] 38 ampersand u0026 ampersand +\[char39] \[char39] 39 quoteright u0027 right quote +\[char40] \[char40] 40 parenleft u0028 parentheses left +\[char41] \[char41] 41 parenright u0029 parentheses right +\[char42] \[char42] 42 asterisk u002A asterisk +\[char43] \[char43] 43 plus u002B plus +\[char44] \[char44] 44 comma u002C comma +\[char45] \[char45] 45 hyphen u2010 hyphen +\[char46] \[char46] 46 period u002E period, dot +\[char47] \[char47] 47 slash u002F slash +\[char58] \[char58] 58 colon u003A colon +\[char59] \[char59] 59 semicolon u003B semicolon +\[char60] \[char60] 60 less u003C less than +\[char61] \[char61] 61 equal u003D equal +\[char62] \[char62] 62 greater u003E greater than +\[char63] \[char63] 63 question u003F question mark +\[char64] \[char64] 64 at u0040 at +\[char91] \[char91] 91 bracketleft u005B square bracket left +\[char92] \[char92] 92 backslash u005C backslash +\[char93] \[char93] 93 bracketright u005D square bracket right \[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 +\[char95] \[char95] 95 underscore u005F underscore +\[char96] \[char96] 96 quoteleft u0060 quote left +\[char123] \[char123] 123 braceleft u007B curly brace left +\[char124] \[char124] 124 bar u007C bar +\[char125] \[char125] 125 braceright u007D curly brace right \[char126] \[char126] 126 tilde u007E tilde accent .TE +.ad . . .\" -------------------------------------------------------------------- @@ -304,8 +339,8 @@ . . .P -Input characters in range 128\-159 (on non-EBCDIC hosts) are not printable -characters. +Input characters in range 128\-159 (on non-EBCDIC hosts) are not +printable characters. . . .TP @@ -313,7 +348,8 @@ . the ISO \%latin1 .I no-break space -is mapped to `\f(CW\e~\fP', the stretchable space character. +is mapped to \[oq]\f(CW\e\(ti\fP\[cq], the stretchable space +character. . . .TP @@ -322,8 +358,8 @@ 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'. +never uses this character for output (thus it is omitted in the table +below); the input character\ 173 is mapped onto \[oq]\f(CW\e%\fP\[cq]. . . .P @@ -335,105 +371,107 @@ see next section. . .P +.na .TS -l l l l l l. +l l l l l lx. 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 +\[char162] \[char162] 162 cent u00A2 currency unit +\[char163] \[char163] 163 sterling u00A3 pound sterling +\[char164] \[char164] 164 currency u00A4 generic currency symbol +\[char165] \[char165] 165 yen u00A5 Japanese currency symbol +\[char166] \[char166] 166 brokenbar u00A6 broken bar +\[char167] \[char167] 167 section u00A7 section sign +\[char168] \[char168] 168 dieresis u00A8 dieresis (umlaut) +\[char169] \[char169] 169 copyright u00A9 copyright symbol +\[char170] \[char170] 170 ordfeminine u00AA feminine ordinal (Spanish) +\[char171] \[char171] 171 guillemotleft u00AB left guillemet [sic] +\[char172] \[char172] 172 logicalnot u00AC logical not +\[char174] \[char174] 174 registered u00AE registered mark symbol +\[char175] \[char175] 175 macron u00AF overbar accent +\[char176] \[char176] 176 degree u00B0 degree sign +\[char177] \[char177] 177 plusminus u00B1 plus-minus sign +\[char178] \[char178] 178 twosuperior u00B2 superscript 2 +\[char179] \[char179] 179 threesuperior u00B3 superscript 3 \[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 +\[char182] \[char182] 182 paragraph u00B6 end of paragraphs marker +\[char183] \[char183] 183 periodcentered u00B7 centered period +\[char184] \[char184] 184 cedilla u00B8 cedilla accent +\[char185] \[char185] 185 onesuperior u00B9 superscript 1 +\[char186] \[char186] 186 ordmasculine u00BA masculine ordinal (Spanish) +\[char187] \[char187] 187 guillemotright u00BB right guillemet [sic] +\[char188] \[char188] 188 onequarter u00BC 1/4 symbol +\[char189] \[char189] 189 onehalf u00BD 1/2 symbol +\[char190] \[char190] 190 threequarters u00BE 3/4 symbol +\[char191] \[char191] 191 questiondown u00BF inverted question mark +\[char192] \[char192] 192 Agrave u0041_0300 A grave +\[char193] \[char193] 193 Aacute u0041_0301 A acute +\[char194] \[char194] 194 Acircumflex u0041_0302 A circumflex +\[char195] \[char195] 195 Atilde u0041_0303 A tilde +\[char196] \[char196] 196 Adieresis u0041_0308 A dieresis (umlaut) +\[char197] \[char197] 197 Aring u0041_030A A ring +\[char198] \[char198] 198 AE u00C6 A+E combined +\[char199] \[char199] 199 Ccedilla u0043_0327 C cedilla +\[char200] \[char200] 200 Egrave u0045_0300 E grave +\[char201] \[char201] 201 Eacute u0045_0301 E acute +\[char202] \[char202] 202 Ecircumflex u0045_0302 E circumflex +\[char203] \[char203] 203 Edieresis u0045_0308 E dieresis (umlaut) +\[char204] \[char204] 204 Igrave u0049_0300 I grave +\[char205] \[char205] 205 Iacute u0049_0301 I acute +\[char206] \[char206] 206 Icircumflex u0049_0302 I circumflex +\[char207] \[char207] 207 Idieresis u0049_0308 I dieresis +\[char208] \[char208] 208 Eth u00D0 E th +\[char209] \[char209] 209 Ntilde u004E_0303 N tilde +\[char210] \[char210] 210 Ograve u004F_0300 O grave +\[char211] \[char211] 211 Oacute u004F_0301 O acute +\[char212] \[char212] 212 Ocircumflex u004F_0302 O circumflex +\[char213] \[char213] 213 Otilde u004F_0303 O tilde +\[char214] \[char214] 214 Odieresis u004F_0308 O dieresis (umlaut) +\[char215] \[char215] 215 multiply u00D7 multiply +\[char216] \[char216] 216 Oslash u00D8 O slash +\[char217] \[char217] 217 Ugrave u0055_0300 U grave +\[char218] \[char218] 218 Uacute u0055_0301 U acute +\[char219] \[char219] 219 Ucircumflex u0055_0302 U circumflex +\[char220] \[char220] 220 Udieresis u0055_0308 U dieresis (umlaut) +\[char221] \[char221] 221 Yacute u0059_0301 Y acute +\[char222] \[char222] 222 Thorn u00DE Thorn +\[char223] \[char223] 223 germandbls u00DF German double s (sharp s) +\[char224] \[char224] 224 agrave u0061_0300 a grave +\[char225] \[char225] 225 aacute u0061_0301 a acute +\[char226] \[char226] 226 acircumflex u0061_0302 a circumflex +\[char227] \[char227] 227 atilde u0061_0303 a tilde +\[char228] \[char228] 228 adieresis u0061_0308 a dieresis (umlaut) +\[char229] \[char229] 229 aring u0061_030A a ring +\[char230] \[char230] 230 ae u00E6 a+e combined +\[char231] \[char231] 231 ccedilla u0063_0327 c cedilla +\[char232] \[char232] 232 egrave u0065_0300 e grave +\[char233] \[char233] 233 eacute u0065_0301 e acute +\[char234] \[char234] 234 ecircumflex u0065_0302 e circumflex +\[char235] \[char235] 235 edieresis u0065_0308 e dieresis (umlaut) +\[char236] \[char236] 236 igrave u0069_0300 i grave +\[char237] \[char237] 237 iacute u0069_0301 i acute +\[char238] \[char238] 238 icircumflex u0069_0302 i circumflex +\[char239] \[char239] 239 idieresis u0069_0308 i dieresis (umlaut) +\[char240] \[char240] 240 eth u00F0 e th +\[char241] \[char241] 241 ntilde u006E_0303 n tilde +\[char242] \[char242] 242 ograve u006F_0300 o grave +\[char243] \[char243] 243 oacute u006F_0301 o acute +\[char244] \[char244] 244 ocircumflex u006F_0302 o circumflex +\[char245] \[char245] 245 otilde u006F_0303 o tilde +\[char246] \[char246] 246 odieresis u006F_0308 o dieresis (umlaut) +\[char247] \[char247] 247 divide u00F7 divide +\[char248] \[char248] 248 oslash u00F8 o slash +\[char249] \[char249] 249 ugrave u0075_0300 u grave +\[char250] \[char250] 250 uacute u0075_0301 u acute +\[char251] \[char251] 251 ucircumflex u0075_0302 u circumflex +\[char252] \[char252] 252 udieresis u0075_0308 u dieresis (umlaut) +\[char253] \[char253] 253 yacute u0079_0301 y acute +\[char254] \[char254] 254 thorn u00FE thorn +\[char255] \[char255] 255 ydieresis u0079_0308 y dieresis (umlaut) .TE +.ad . . .\" -------------------------------------------------------------------- @@ -460,24 +498,25 @@ \f(CW\e[\fP\,\fIchar_name\/\fP\f(CW]\fP A glyph having the name .I char_name -(having length 1, 2, 3, .\|.\|.). +(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'. +Note that \[oq]\fIc\fP\[cq] is not the same as +\[oq]\f(CW\e[\fP\,\fIc\/\fP\f(CW]\fP\[cq] (\,\fIc\fP\ a single +character): The latter is internally mapped to glyph name +\[oq]\e\fIc\fP\[cq]. +. +By default, groff defines a single glyph name starting with a +backslash, namely \%\[oq]\e-\[cq], which can be either accessed as +\[oq]\f(CW\e\-\fP\[cq] or \[oq]\f(CW\e[-]\fP\[cq]. . .TP -\f(CW\e[\fP\,\fIbase_glyph composite_1 composite_2 .\|.\|.\/\fP\f(CW]\fP +\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 +\[oq]\f(CW\e[char\fP\,\fIn\/\fP\f(CW]\fP\[cq] where .I n is the decimal code of the character, a number between 0 and\ 255 without leading zeros (those entities are @@ -486,40 +525,55 @@ . They are normally mapped onto glyphs using the \f(CW.trin\fP request. . +. +.P Another special convention is the handling of glyphs with names directly -derived from a Unicode code point; this is discussed below. +derived from a Unicode code point; this is shown in the +\[oq]Unicode\[cq] column of the table below. . +In general, all glyphs not having a name as listed in this manual page can +be accessed with the \[oq]\f(CW\e[u\fP\,\fIXXXX\/\fP\f(CW]\fP\[cq] +construct; please go to section \[oq]Using Symbols\[cq] in the groff info +manual for more details. +. +. +.P 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. +In the following, a plus sign in the \[oq]Notes\[cq] 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. +Entries marked with \[oq]***\[cq] denote glyphs for mathematical +purposes (mainly used for DVI output). +. +Normally, such glyphs have metrics which make them unusable in normal +text. . . .P +.na .TS -l l l l l. +l l l l lx. 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 +\[ss] \e[ss] germandbls u00DF German double s (sharp s) .TE +.ad . .P .I Ligatures and Other Latin Glyphs .P +.na .TS -l l l l l. +l l l l lx. Output Input PostScript Unicode Notes _ \[ff] \e[ff] ff u0066_0066 ff ligature + @@ -527,88 +581,91 @@ \[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) +\[/L] \e[/L] Lslash u0141 L slash (Polish) +\[/l] \e[/l] lslash u0142 l slash (Polish) +\[/O] \e[/O] Oslash u00D8 O slash (Scandinavian) +\[/o] \e[/o] oslash u00F8 o slash (Scandinavian) +\[AE] \e[AE] AE u00C6 A+E combined +\[ae] \e[ae] ae u00E6 a+e combined +\[OE] \e[OE] OE u0152 O+E combined +\[oe] \e[oe] oe u0153 o+e combined +\[IJ] \e[IJ] IJ u0132 I+J combined (Dutch) +\[ij] \e[ij] ij u0133 i+j combined(Dutch) +\[.i] \e[.i] dotlessi u0131 i without a dot (Turkish) \[.j] \e[.j] dotlessj u0237 j without a dot .TE +.ad . .P .I Accented Characters .P +.na .TS -l l l l l. +l l l l lx. 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 +\['A] \e['A] Aacute u0041_0301 A acute +\['C] \e['C] Cacute u0043_0301 C acute +\['E] \e['E] Eacute u0045_0301 E acute +\['I] \e['I] Iacute u0049_0301 I acute +\['O] \e['O] Oacute u004F_0301 O acute +\['U] \e['U] Uacute u0055_0301 U acute +\['Y] \e['Y] Yacute u0059_0301 Y acute +\['a] \e['a] aacute u0061_0301 a acute +\['c] \e['c] cacute u0063_0301 c acute +\['e] \e['e] eacute u0065_0301 e acute +\['i] \e['i] iacute u0069_0301 i acute +\['o] \e['o] oacute u006F_0301 o acute +\['u] \e['u] uacute u0075_0301 u acute +\['y] \e['y] yacute u0079_0301 y acute +\[:A] \e[:A] Adieresis u0041_0308 A dieresis (umlaut) +\[:E] \e[:E] Edieresis u0045_0308 E dieresis (umlaut) +\[:I] \e[:I] Idieresis u0049_0308 I dieresis (umlaut) +\[:O] \e[:O] Odieresis u004F_0308 O dieresis (umlaut) +\[:U] \e[:U] Udieresis u0055_0308 U dieresis (umlaut) +\[:Y] \e[:Y] Ydieresis u0059_0308 Y dieresis (umlaut) +\[:a] \e[:a] adieresis u0061_0308 a dieresis (umlaut) +\[:e] \e[:e] edieresis u0065_0308 e dieresis (umlaut) +\[:i] \e[:i] idieresis u0069_0308 i dieresis (umlaut) +\[:o] \e[:o] odieresis u006F_0308 o dieresis (umlaut) +\[:u] \e[:u] udieresis u0075_0308 u dieresis (umlaut) +\[:y] \e[:y] ydieresis u0079_0308 y dieresis (umlaut) +\[^A] \e[^A] Acircumflex u0041_0302 A circumflex +\[^E] \e[^E] Ecircumflex u0045_0302 E circumflex +\[^I] \e[^I] Icircumflex u0049_0302 I circumflex +\[^O] \e[^O] Ocircumflex u004F_0302 O circumflex +\[^U] \e[^U] Ucircumflex u0055_0302 U circumflex +\[^a] \e[^a] acircumflex u0061_0302 a circumflex +\[^e] \e[^e] ecircumflex u0065_0302 e circumflex +\[^i] \e[^i] icircumflex u0069_0302 i circumflex +\[^o] \e[^o] ocircumflex u006F_0302 o circumflex +\[^u] \e[^u] ucircumflex u0075_0302 u circumflex +\[`A] \e[`A] Agrave u0041_0300 A grave +\[`E] \e[`E] Egrave u0045_0300 E grave +\[`I] \e[`I] Igrave u0049_0300 I grave +\[`O] \e[`O] Ograve u004F_0300 O grave +\[`U] \e[`U] Ugrave u0055_0300 U grave +\[`a] \e[`a] agrave u0061_0300 a grave +\[`e] \e[`e] egrave u0065_0300 e grave +\[`i] \e[`i] igrave u0069_0300 i grave +\[`o] \e[`o] ograve u006F_0300 o grave +\[`u] \e[`u] ugrave u0075_0300 u grave +\[~A] \e[~A] Atilde u0041_0303 A tilde +\[~N] \e[~N] Ntilde u004E_0303 N tilde +\[~O] \e[~O] Otilde u004F_0303 O tilde +\[~a] \e[~a] atilde u0061_0303 a tilde +\[~n] \e[~n] ntilde u006E_0303 n tilde +\[~o] \e[~o] otilde u006F_0303 o tilde +\[vS] \e[vS] Scaron u0053_030C S caron +\[vs] \e[vs] scaron u0073_030C s caron +\[vZ] \e[vZ] Zcaron u005A_030C Z caron +\[vz] \e[vz] zcaron u007A_030C z caron +\[,C] \e[,C] Ccedilla u0043_0327 C cedilla +\[,c] \e[,c] ccedilla u0063_0327 c cedilla +\[oA] \e[oA] Aring u0041_030A A ring +\[oa] \e[oa] aring u0061_030A a ring .TE +.ad . .P .I Accents @@ -619,61 +676,75 @@ the values given in parentheses are the original (spacing) ones. . .P +.na .TS -l l l l l. +l l l l lx. 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) +\[a"] \e[a"] hungarumlaut u030B (u02DD) Hungarian umlaut +\[a-] \e[a-] macron u0304 (u00AF) overbar accent +\[a.] \e[a.] dotaccent u0307 (u02D9) dot accent +\[a^] \e[a^] circumflex u0302 (u005E) circumflex accent +\[aa] \e[aa] acute u0301 (u00B4) acute accent +\[ga] \e[ga] grave u0300 (u0060) grave accent +\[ab] \e[ab] breve u0306 (u02D8) breve accent +\[ac] \e[ac] cedilla u0327 (u00B8) cedilla accent +\[ad] \e[ad] dieresis u0308 (u00A8) umlaut accent +\[ah] \e[ah] caron u030C (u02C7) caron accent +\[ao] \e[ao] ring u030A (u02DA) small circle, ring accent +\[a~] \e[a~] tilde u0303 (u007E) tilde accent +\[ho] \e[ho] ogonek u0328 (u02DB) hook accent +\[ha] \e[ha] asciicircum u005E T{ +high circumflex, ASCII character, in mathematics the power sign +T} +\[ti] \e[ti] asciitilde u007E T{ +tilde in vertical middle, ASCII, in Unix-like the home directory +T} .TE +.ad . .P .I Quotes .P +.na .TS -l l l l l. +l l l l lx. 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 +\[lq] \e[lq] quotedblleft u201C left double quote +\[rq] \e[rq] quotedblright u201D right double quote +\[oq] \e[oq] quoteleft u2018 single open (left) quote +\[cq] \e[cq] quoteright u2019 single closing (right) 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 +\[Fo] \e[Fo] guillemotleft u00AB left guillemet [sic] +\[Fc] \e[Fc] guillemotright u00BB right guillemet [sic] +\[fo] \e[fo] guilsinglleft u2039 T{ +single left-pointing angle quotation mark +T} +\[fc] \e[fc] guilsinglright u203A T{ +single right-pointing angle quotation mark +T} .TE +.ad . .P .I Punctuation .P +.na .TS -l l l l l. -Output Input PostScript Unicode Notes +l l l l lx. +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 + +\[r!] \e[r!] exclamdown u00A1 inverted exclamation mark +\[r?] \e[r?] questiondown u00BF inverted question mark +\[em] \e[em] emdash u2014 em-dash symbol +\[en] \e[en] endash u2013 en-dash symbol +\[hy] \e[hy] hyphen u2010 hyphen symbol .TE +.ad . .P .I Brackets @@ -681,14 +752,14 @@ The extensible bracket pieces are font-invariant glyphs. . In classical troff only one glyph was available to vertically extend -brackets, braces, and parentheses: `bv'. +brackets, braces, and parentheses: \[oq]bv\[cq]. . 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. +be piled up with \[oq]\f(CW\eb\fP\[cq] due to the restrictions of the +escape\[aq]s piling algorithm. . A general solution to build brackets out of pieces is the following macro: @@ -697,10 +768,10 @@ .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' +\&.\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 @@ -711,16 +782,16 @@ \&. 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" +\&. 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" +\&. 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 @@ -728,14 +799,17 @@ .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. +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 \[oq]lf\[cq] and \[oq]rf\[cq] which provide +the \[oq]floor\[cq] operator. +. +Other devices (most notably for DVI output) don\[aq]t unify such +glyphs. +. +For this reason, the four glyphs \[oq]lf\[cq], \[oq]rf\[cq], +\[o]lc\[cq], and \[oq]rc\[cq] are not unified with similarly looking +bracket pieces. . In .BR groff , @@ -743,294 +817,393 @@ devices (provided those glyphs exist). . .P - +.na .TS -expand; -l l l l l. +l l l l lx. 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 +\[lB] \e[lB] bracketleft u005B T{ +left square bracket +T} +\[rB] \e[rB] bracketright u005D T{ +right square bracket +T} +\[lC] \e[lC] braceleft u007B T{ +left curly brace +T} +\[rC] \e[rC] braceright u007D T{ +right curly brace +T} +\[la] \e[la] angleleft u27E8 T{ +left angle bracket +T} +\[ra] \e[ra] angleright u27E9 T{ +right angle bracket +T} -\[bv] \e[bv] braceex u23AA vertical extension *** + -\[braceex] \e[braceex] braceex u23AA +\[bv] \e[bv] braceex u23AA T{ +curly brace vertical extension +T} +\[braceex] \e[braceex] braceex u23AA T{ +curly brace vertical extension +T} -\[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 +\[bracketlefttp] \e[bracketlefttp] bracketlefttp u23A1 T{ +left square bracket top +T} +\[bracketleftbt] \e[bracketleftbt] bracketleftbt u23A3 T{ +left square bracket bottom +T} +\[bracketleftex] \e[bracketleftex] bracketleftex u23A2 T{ +left square bracket extension +T} +\[bracketrighttp] \e[bracketrighttp] bracketrighttp u23A4 T{ +right square bracket top +T} +\[bracketrightbt] \e[bracketrightbt] bracketrightbt u23A6 T{ +right square bracket bottom +T} +\[bracketrightex] \e[bracketrightex] bracketrightex u23A5 T{ +right square bracket extension +T} -\[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 +\[lt] \e[lt] bracelefttp u23A7 T{ +left curly brace top +T} +\[bracelefttp] \e[bracelefttp] bracelefttp u23A7 T{ +left curly brace top +T} +\[lk] \e[lk] braceleftmid u23A8 T{ +left curly brace middle +T} +\[braceleftmid] \e[braceleftmid] braceleftmid u23A8 T{ +left curly brace middle +T} +\[lb] \e[lb] braceleftbt u23A9 T{ +left curly brace bottom +T} +\[braceleftbt] \e[braceleftbt] braceleftbt u23A9 T{ +left curly brace bottom +T} +\[braceleftex] \e[braceleftex] braceleftex u23AA T{ +left curly brace extension +T} +\[rt] \e[rt] bracerighttp u23AB T{ +right curly brace top +T} +\[bracerighttp] \e[bracerighttp] bracerighttp u23AB T{ +right curly brace top +T} +\[rk] \e[rk] bracerightmid u23AC T{ +right curly brace middle +T} +\[bracerightmid] \e[bracerightmid] bracerightmid u23AC T{ +right curly brace middle +T} +\[rb] \e[rb] bracerightbt u23AD T{ +right curly brace bottom +T} +\[bracerightbt] \e[bracerightbt] bracerightbt u23AD T{ +right curly brace bottom +T} +\[bracerightex] \e[bracerightex] bracerightex u23AA T{ +right curly brace extension +T} +\[parenlefttp] \e[parenlefttp] parenlefttp u239B T{ +left parenthesis top +T} +\[parenleftbt] \e[parenleftbt] parenleftbt u239D T{ +left parenthesis bottom +T} +\[parenleftex] \e[parenleftex] parenleftex u239C T{ +left parenthesis extension +T} +\[parenrighttp] \e[parenrighttp] parenrighttp u239E T{ +right parenthesis top +T} +\[parenrightbt] \e[parenrightbt] parenrightbt u23A0 T{ +right parenthesis bottoom +T} +\[parenrightex] \e[parenrightex] parenrightex u239F T{ +right parenthesis extension +T} .TE +.ad . .P .I Arrows .P +.na .TS -expand; -l l l l l. +l l l l lx. 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 +\[<-] \e[<-] arrowleft u2190 horizontal arrow left +\[->] \e[->] arrowright u2192 horizontal arrow right +\[<>] \e[<>] arrowboth u2194 T{ +horizontal arrow in both directions +T} +\[da] \e[da] arrowdown u2193 vertical arrow down +\[ua] \e[ua] arrowup u2191 vertical arrow up +\[va] \e[va] arrowupdn u2195 T{ +vertical arrow in both directions +T} +\[lA] \e[lA] arrowdblleft u21D0 horizontal double arrow left +\[rA] \e[rA] arrowdblright u21D2 horizontal double arrow right +\[hA] \e[hA] arrowdblboth u21D4 T{ +horizontal double arrow in both directions +T} +\[dA] \e[dA] arrowdbldown u21D3 vertical double arrow down +\[uA] \e[uA] arrowdblup u21D1 vertical double arrow up +\[vA] \e[vA] uni21D5 u21D5 T{ +vertical double arrow in both directions +T} \[an] \e[an] arrowhorizex u23AF horizontal arrow extension .TE +.ad . .P .I Lines .P -The font-invariant glyphs `br', `ul', and `rn' form corners; -they can be used to build boxes. +The font-invariant glyphs \[oq]br\[cq], \[oq]ul\[cq], and \[oq]rn\[cq] +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. +\[oq]rn\[cq] 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. +\[oq]ru\[cq] is a font-invariant glyph, namely a rule of length 0.5m. . .P +.na .TS -expand; -l l l l l. +l l l l lx. 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 +\[ba] \e[ba] bar u007C bar +\[br] \e[br] SF110000 u2502 box rule +\[ul] \e[ul] underscore u005F underscore +\[rn] \e[rn] overline u203E overline +\[ru] \e[ru] --- --- baseline rule +\[bb] \e[bb] brokenbar u00A6 broken bar +\[sl] \e[sl] slash u002F slash, solidus +\[rs] \e[rs] backslash u005C reverse slash, reverse solidus .TE +.ad +. .P -Use `\f(CW\e[radicalex]\fP', not `\f(CW\e[overline]\fP', for -continuation of square root. +Use \[oq]\f(CW\e[radicalex]\fP\[cq], not +\[oq]\f(CW\e[overline]\fP\[cq], for continuation of square root. . .P .I Text markers .P +.na .TS -expand; -l l l l l. +l l l l lx. 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 +\[ci] \e[ci] circle u25CB circle +\[bu] \e[bu] bullet u2022 bullet +\[dd] \e[dd] daggerdbl u2021 double dagger sign +\[dg] \e[dg] dagger u2020 dagger +\[lz] \e[lz] lozenge u25CA lozenge, diamond, pound key +\[sq] \e[sq] uni25A1 u25A1 white square +\[ps] \e[ps] paragraph u00B6 end of paragraphs marker +\[sc] \e[sc] section u00A7 section sign +\[lh] \e[lh] uni261C u261C hand pointing left +\[rh] \e[rh] a14 u261E hand pointing right +\[at] \e[at] at u0040 at +\[sh] \e[sh] numbersign u0023 number sign +\[CR] \e[CR] carriagereturn u21B5 carriage return \[OK] \e[OK] a19 u2713 check mark, tick .TE +.ad . .P .I Legal Symbols .P +.na .TS -expand; -l l l l l. +l l l l lx. Output Input PostScript Unicode Notes _ -\[co] \e[co] copyright u00A9 + -\[rg] \e[rg] registered u00AE + -\[tm] \e[tm] trademark u2122 +\[co] \e[co] copyright u00A9 copyright sign +\[rg] \e[rg] registered u00AE registered mark +\[tm] \e[tm] trademark u2122 trademark symbol \[bs] \e[bs] --- --- AT&T Bell Labs logo + .TE +.ad +. .P The Bell Labs logo is not supported in groff. . .P .I Currency symbols .P +.na .TS -expand; -l l l l l. +l l l l lx. Output Input PostScript Unicode Notes _ -\[Do] \e[Do] dollar u0024 -\[ct] \e[ct] cent u00A2 + +\[Do] \e[Do] dollar u0024 dollar +\[ct] \e[ct] cent u00A2 cent \[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 +\[Ye] \e[Ye] yen u00A5 Japanese Yen +\[Po] \e[Po] sterling u00A3 pound sterling (British) \[Cs] \e[Cs] currency u00A4 Scandinavian currency sign \[Fn] \e[Fn] florin u0192 Dutch currency sign .TE +.ad . .P .I Units .P +.na .TS -expand; -l l l l l. +l l l l lx. Output Input PostScript Unicode Notes _ -\[de] \e[de] degree u00B0 + +\[de] \e[de] degree u00B0 degree \[%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 +\[fm] \e[fm] minute u2032 arc minute sign +\[sd] \e[sd] second u2033 acr second sign +\[mc] \e[mc] mu u00B5 mu, micro sign +\[Of] \e[Of] ordfeminine u00AA feminine ordinal (Spanish) +\[Om] \e[Om] ordmasculine u00BA masculine ordinal (Spanish) .TE +.ad . .P .I Logical Symbols .P +.na .TS -expand; -l l l l l. +l l l l lx. 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' +\[AN] \e[AN] logicaland u2227 logical and +\[OR] \e[OR] logicalor u2228 logical or +\[no] \e[no] logicalnot u00AC logical not +\[tno] \e[tno] logicalnot u00AC text variant of \[oq]no\[cq] \[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) + +\[st] \e[st] suchthat u220B sucht that +\[3d] \e[3d] therefore u2234 therefore +\[tf] \e[tf] therefore u2234 therefore +\[or] \e[or] bar u007C T{ +bitwise OR operator (as used in\ C) +T} .TE +.ad . .P .I Mathematical Symbols .P +.na .TS -expand; -l l l l l. +l l l l lx. 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 +\[12] \e[12] onehalf u00BD 1/2 symbol +\[14] \e[14] onequarter u00BC 1/4 symbol +\[34] \e[34] threequarters u00BE 3/4 symbol +\[18] \e[18] oneeighth u215B 1/8 symbol +\[38] \e[38] threeeighths u215C 3/8 symbol +\[58] \e[58] fiveeighths u215D 5/8 symbol +\[78] \e[78] seveneighths u215E 7/8 symbol +\[S1] \e[S1] onesuperior u00B9 superscript 1 +\[S2] \e[S2] twosuperior u00B2 superscript 2 +\[S3] \e[S3] threesuperior u00B3 superscript 3 -\[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 +\[pl] \e[pl] plus u002B plus in special font +\[mi] \e[mi] minus u2212 minus in special font +\[-+] \e[-+] uni2213 u2213 minus-plus +\[+-] \e[+-] plusminus u00B1 plus-minus +\[t+-] \e[t+-] plusminus u00B1 text variant of \e[+-] +\[pc] \e[pc] periodcentered u00B7 period centered \[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' +\[mu] \e[mu] multiply u00D7 multiply sign +\[tmu] \e[tmu] multiply u00D7 text variant of \e[mu] +\[c*] \e[c*] circlemultiply u2297 multiply sign in circle +\[c+] \e[c+] circleplus u2295 plus sign in circle +\[di] \e[di] divide u00F7 division sign +\[tdi] \e[tdi] divide u00F7 text variant of \e[di] \[f/] \e[f/] fraction u2044 bar for fractions -\[**] \e[**] asteriskmath u2217 + +\[**] \e[**] asteriskmath u2217 mathematical asterisk -\[<=] \e[<=] lessequal u2264 + -\[>=] \e[>=] greaterequal u2265 + +\[<=] \e[<=] lessequal u2264 less or equal +\[>=] \e[>=] greaterequal u2265 greater or equal \[<<] \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 + +\[eq] \e[eq] equal u003D equals in special font +\[!=] \e[!=] notequal u003D_0338 not equal +\[==] \e[==] equivalence u2261 equivalent +\[ne] \e[ne] uni2262 u2261_0338 not equivalent +\[=~] \e[=~] congruent u2245 T{ +congruent, approx. equal +T} +\[|=] \e[|=] uni2243 u2243 asymptot. equal to +\[ap] \e[ap] similar u223C similar \[~~] \e[~~] approxequal u2248 almost equal to -\[~=] \e[~=] approxequal u2248 -\[pt] \e[pt] proportional u221D + +\[~=] \e[~=] approxequal u2248 almost equal to +\[pt] \e[pt] proportional u221D proportional -\[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 + +\[es] \e[es] emptyset u2205 empty set +\[mo] \e[mo] element u2208 element of a set +\[nm] \e[nm] notelement u2208_0338 not element of set +\[sb] \e[sb] propersubset u2282 proper subset +\[nb] \e[nb] notsubset u2282_0338 not supset +\[sp] \e[sp] propersuperset u2283 proper superset \[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 + +\[ib] \e[ib] reflexsubset u2286 subset or equal +\[ip] \e[ip] reflexsuperset u2287 superset or equal +\[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 --- *** +\[/_] \e[/_] angle u2220 angle +\[pp] \e[pp] perpendicular u22A5 perpendicular +\[is] \e[is] integral u222B integral +\[integral] \e[integral] integral u222B integral +\[sum] \e[sum] summation u2211 summation +\[product] \e[product] product u220F product +\[coproduct] \e[coproduct] uni2210 u2210 coproduct +\[gr] \e[gr] gradient u2207 gradient +\[sr] \e[sr] radical u221A square root +\[sqrt] \e[sqrt] radical u221A square root +\[radicalex] \e[radicalex] radicalex --- T{ +square root continuation +T} +\[sqrtex] \e[sqrtex] radicalex --- T{ +square root continuation +T} -\[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 + +\[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 +\[if] \e[if] infinity u221E infinity +\[Ah] \e[Ah] aleph u2135 aleph \[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 +\[wp] \e[wp] weierstrass u2118 Weierstrass\~p +\[pd] \e[pd] partialdiff u2202 T{ +partial differentiation +T} +\[-h] \e[-h] uni210F u210F T{ +Planck\ constant\ /\ 2pi (h-bar) +T} +\[hbar] \e[hbar] uni210F u210F T{ +Planck\ constant\ /\ 2pi (h-bar) +T} .TE +.ad . .P .I Greek glyphs @@ -1049,84 +1222,86 @@ 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 +Unfortunately, most font vendors didn\[aq]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. +At the time of this writing (January 2006), it is not clear yet +whether the Adobe Glyph Names \[oq]phi\[cq] and \[oq]phi1\[cq] also +change its meaning if used for mathematics, thus compatibility +problems are likely to happen \[en] being conservative, groff +currently assumes that \[oq]phi\[cq] 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. +In groff, symbol \[oq]\f(CW\e[*f]\fP\[cq] always denotes the stroked +version of phi, and \[oq]\f(CW\e[+f]\fP\[cq] the curly variant. .P +.na .TS -expand; -l l l l l. +l l l l lx. 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 + +\[*A] \e[*A] Alpha u0391 Alpha +\[*B] \e[*B] Beta u0392 Beta +\[*G] \e[*G] Gamma u0393 Gamma +\[*D] \e[*D] Delta u0394 Delta +\[*E] \e[*E] Epsilon u0395 Epsilon +\[*Z] \e[*Z] Zeta u0396 Zeta +\[*Y] \e[*Y] Eta u0397 Eta +\[*H] \e[*H] Theta u0398 Theta +\[*I] \e[*I] Iota u0399 Iota +\[*K] \e[*K] Kappa u039A Kappa +\[*L] \e[*L] Lambda u039B Lamda +\[*M] \e[*M] Mu u039C Mu +\[*N] \e[*N] Nu u039D Nu +\[*C] \e[*C] Xi u039E Xi +\[*O] \e[*O] Omicron u039F Omicron +\[*P] \e[*P] Pi u03A0 Pi +\[*R] \e[*R] Rho u03A1 Rho +\[*S] \e[*S] Sigma u03A3 Sigma +\[*T] \e[*T] Tau u03A4 Tau +\[*U] \e[*U] Upsilon u03A5 Upsilon +\[*F] \e[*F] Phi u03A6 Phi +\[*X] \e[*X] Chi u03A7 Chi +\[*Q] \e[*Q] Psi u03A8 Psi +\[*W] \e[*W] Omega u03A9 Omega +\[*a] \e[*a] alpha u03B1 alpha +\[*b] \e[*b] beta u03B2 beta +\[*g] \e[*g] gamma u03B3 gamma +\[*d] \e[*d] delta u03B4 delta +\[*e] \e[*e] epsilon u03B5 epsilon +\[*z] \e[*z] zeta u03B6 zeta +\[*y] \e[*y] eta u03B7 eta +\[*h] \e[*h] theta u03B8 theta +\[*i] \e[*i] iota u03B9 iota +\[*k] \e[*k] kappa u03BA kappa +\[*l] \e[*l] lambda u03BB lambda +\[*m] \e[*m] mu u03BC mu +\[*n] \e[*n] nu u03BD nu +\[*c] \e[*c] xi u03BE xi +\[*o] \e[*o] omicron u03BF omicron +\[*p] \e[*p] pi u03C0 pi +\[*r] \e[*r] rho u03C1 rho +\[ts] \e[ts] sigma1 u03C2 terminal sigma +\[*s] \e[*s] sigma u03C3 sigma +\[*t] \e[*t] tau u03C4 tau +\[*u] \e[*u] upsilon u03C5 upsilon +\[*f] \e[*f] phi u03D5 phi oked glyph) +\[*x] \e[*x] chi u03C7 chi +\[*q] \e[*q] psi u03C8 psi +\[*w] \e[*w] omega u03C9 omega \[+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 +.ad . .P .I Card symbols .P +.na .TS -expand; -l l l l l. +l l l l lx. Output Input PostScript Unicode Notes _ \[CL] \e[CL] club u2663 black club suit @@ -1136,41 +1311,7 @@ \[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 . +.ad . . .\" -------------------------------------------------------------------- @@ -1197,8 +1338,20 @@ The Unicode Standard .UE . +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au +. +. .cp \n[groff_char_C] . +. .\" -------------------------------------------------------------------- .\" Emacs settings .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/man/groff_diff.man groff-1.22.3/man/groff_diff.man --- groff-1.22.2/man/groff_diff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff_diff.man 2014-11-04 09:38:35.517520346 +0100 @@ -1,26 +1,48 @@ '\" e .\" The above line should force the use of eqn as a preprocessor -.ig -groff_diff.man - +.TH GROFF_DIFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_diff \- differences between GNU troff and classical troff +. +.\" groff_diff.man: +.\" Source file position: /man/groff_diff.man +.\" Installed position: /share/man/man7/groff_diff.7 +. +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. +. +.P 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 - +.P 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 +any later version published by the Free Software Foundation; with no Front-Cover Texts, and with no Back-Cover Texts. - +.P A copy of the Free Documentation License is included as a file called -FDL in the main directory of the groff source package. +FDL in the main directory of the groff source package, it is also +available in the internet at +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU FDL license +.UE . +.. +. +.de au +This document was written by +.MT jjc@jclark.com +James Clark +.ME , +was modified by +.MT wl@gnu.org +Werner Lemberg +.ME +and +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . .. . . @@ -39,14 +61,8 @@ .el \ . ds ic \^ . -. -.\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH GROFF_DIFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_diff \- differences between GNU troff and classical troff +.\" ellipsis +.ds ellipsis \&.\|.\|.\& . . .\" -------------------------------------------------------------------- @@ -61,14 +77,16 @@ .I roff formatter of the freely available Unix\~7 of the 1970s, documented in the -.I Troff User's Manual +.I Troff User\[aq]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 @@ -97,9 +115,10 @@ 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. +In escape sequences, additionally to the classical +\[oq]\fB(\fP\fIxx\fP\[cq] construction for a two-character glyph name, +you can use \[oq]\fB[\fP\,\fIxxx\/\fP\fB]\fP\[cq] for a name of +arbitrary length. . .TP .BI \[rs][ xxx ] @@ -107,11 +126,11 @@ .IR xxx . . .TP -.BI \[rs][ "comp1 comp2 .\|.\|." ] +.BI \[rs][ "comp1 comp2 \*[ellipsis]" ] 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'. +Example: \[oq]\[rs][A\~ho]\[cq] is capital letter A with ogonek which +finally maps to glyph name \[oq]u0041_0328\[cq]. . See the .I groff info file @@ -131,13 +150,13 @@ i.e., to return to the previous font. . .TP -.BI \[rs]*[ "xxx arg1 arg2 .\|.\|." ] +.BI \[rs]*[ "xxx arg1 arg2 \*[ellipsis]" ] Interpolate string .IR xxx , taking .IR arg1 , .IR arg2 , -.IR .\|.\|. , +.IR \*[ellipsis] , as arguments. . .TP @@ -180,6 +199,7 @@ .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 @@ -189,6 +209,7 @@ 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] @@ -198,6 +219,7 @@ .B \[rs]n[.ps] that returns the point size in scaled points. . +. .P It would make no sense to use the .BR z \~\c @@ -242,6 +264,7 @@ . Spaces are permitted in a number expression within parentheses. . +. .P .B M indicates a scale of 100ths of an em. @@ -295,6 +318,7 @@ .I anything is or is not acceptable as the name of a string, macro, diversion, number register, environment, font, or color. +. It returns\~\c .B 0 if @@ -372,7 +396,7 @@ .B \[rs]F[] switches back to the previous font family (note that .B \[rs]FP -won't work; it selects font family `P' instead). +won\[aq]t work; it selects font family \[oq]P\[cq] instead). . .TP .BI \[rs]m x @@ -391,7 +415,7 @@ .TQ .BI \[rs]M[ xxx ] Set background color for filled objects drawn with the -.BI \[rs]D' .\|.\|. ' +.BI \[rs]D' \*[ellipsis] ' commands. .B \[rs]M[] switches back to the previous color. @@ -749,7 +773,7 @@ recognition. . .TP -.B \[rs]~ +.B \[rs]\[ti] This produces an unbreakable space that stretches like a normal inter-word space when a line is adjusted. . @@ -823,12 +847,12 @@ .TP .BI .am1\ xx\ yy Similar to -.BR .am , +.BR .am , but compatibility mode is switched off during execution. . -To be more precise, a `compatibility save' token is inserted at the -beginning of the macro addition, and a `compatibility restore' token at -the end. +To be more precise, a \[oq]compatibility save\[cq] token is inserted +at the beginning of the macro addition, and a \[oq]compatibility +restore\[cq] token at the end. . As a consequence, the requests .BR am , @@ -859,11 +883,12 @@ .TP .BI .as1\ xx\ yy Similar to -.BR .as , +.BR .as , but compatibility mode is switched off during expansion. . -To be more precise, a `compatibility save' token is inserted at the -beginning of the string, and a `compatibility restore' token at the end. +To be more precise, a \[oq]compatibility save\[cq] token is inserted +at the beginning of the string, and a \[oq]compatibility restore\[cq] +token at the end. . As a consequence, the requests .BR as , @@ -879,7 +904,7 @@ . .TP .BI .asciify\ xx -This request `unformats' the diversion +This request \[oq]unformats\[cq] the diversion .I xx in such a way that .SM ASCII @@ -964,11 +989,11 @@ .BR \[rs]p . . .TP -.BI .cflags\ "n c1 c2 .\|.\|." +.BI .cflags\ "n c1 c2 \*[ellipsis]" Characters .IR c1 , .IR c2 , -.IR .\|.\|. , +.IR \*[ellipsis] , have properties determined by .IR n , which is ORed from the following: @@ -1012,7 +1037,7 @@ newline or two spaces; in other words the character is transparent for the purposes of end-of-sentence recognition; this is the same as having a zero space factor in \*[tx] (initially characters -.B \[dq]')]*\[rs][dg]\[rs][rq] +.B \[dq]')]*\[rs][dg]\[rs][rq]\[rs][cq] have this property). . .IP 64 @@ -1039,12 +1064,14 @@ .RE . .IP -Contrary to flag values 2 and\~4, the flags 128, 256, and 512 work pairwise. -If, for example, the left character has value 512, and the right character -128, no line break gets inserted. -If we use value\~6 instead for the left character, a line break after the -character can't be suppressed since the right neighbour character doesn't -get examined. +Contrary to flag values 2 and\~4, the flags 128, 256, and 512 work +pairwise. +. +If, for example, the left character has value 512, and the right +character 128, no line break gets inserted. If we use value\~6 +instead for the left character, a line break after the character +can\[aq]t be suppressed since the right neighbour character +doesn\[aq]t get examined. . .TP .BI .char\ c\ string @@ -1101,8 +1128,7 @@ . .IP There is a special anti-recursion feature: Use of glyph within the -glyph's definition is handled like normal glyphs not -defined with +glyph\[aq]s definition is handled like normal glyphs not defined with .BR char . .IP A glyph definition can be removed with the @@ -1117,18 +1143,20 @@ that are to be interpolated as strings. . .TP -.BI .class\ "name c1 c2 .\|.\|." +.BI .class\ "name c1 c2 \*[ellipsis]" Assign .I name to a set of characters .IR c1 , .IR c2 , -.IR .\|.\|. , +.IR \*[ellipsis] , so that they can be referred to from other requests easily (currently .B .cflags only). -Character ranges (indicated by an intermediate `-') and nested classes -are possible also. +. +Character ranges (indicated by an intermediate \[oq]\-\[cq]) and +nested classes are possible also. +. This is useful to assign properties to a large set of characters. . .TP @@ -1151,7 +1179,7 @@ to glyph name .I glyph2 if it is used in -.BI \[rs][ .\|.\|. ] +.BI \[rs][ \*[ellipsis] ] with more than one component. . .TP @@ -1243,7 +1271,7 @@ .IP The color named .B default -(which is device-specific) can't be redefined. +(which is device-specific) can\[aq]t be redefined. . It is possible that the default color for .B \[rs]M @@ -1254,7 +1282,7 @@ .TP .BI .de1\ xx\ yy Similar to -.BR .de , +.BR .de , but compatibility mode is switched off during execution. . On entry, the current compatibility mode is saved and restored at exit. @@ -1306,7 +1334,7 @@ This is the same as the .B \[rs]Y escape (to embed the contents of a macro into the intermediate -output preceded with `x\~X'). +output preceded with \[oq]x\~X\[cq]). . .TP .BI .do\ xxx @@ -1344,11 +1372,12 @@ .TP .BI .ds1\ xx\ yy Similar to -.BR .ds , +.BR .ds , but compatibility mode is switched off during expansion. . -To be more precise, a `compatibility save' token is inserted at the -beginning of the string, and a `compatibility restore' token at the end. +To be more precise, a \[oq]compatibility save\[cq] token is inserted +at the beginning of the string, and a \[oq]compatibility restore\[cq] +token at the end. . .TP .B .ecs @@ -1360,7 +1389,7 @@ .BR ecs . Without a previous call to .BR ecs , -.RB ` \[rs] ' +.RB \[oq] \[rs] \[cq] will be the new escape character. . .TP @@ -1380,7 +1409,7 @@ .I xx is missing, switch back to previous font family. . -The value at start-up is `T'. +The value at start-up is \[oq]T\[cq]. . See the description of the .B sty @@ -1400,7 +1429,8 @@ hides the glyph with the same name in the current font, whereas a glyph defined with .B fchar -is checked only if the particular glyph isn't found in the current font. +is checked only if the particular glyph isn\[aq]t found in the current +font. . This test happens before checking special fonts. . @@ -1433,13 +1463,13 @@ .BR .special . . .TP -.BI .fspecial\ "f s1 s2 .\|.\|." +.BI .fspecial\ "f s1 s2 \*[ellipsis]" When the current font is\~\c .IR f , fonts .IR s1 , .IR s2 , -.IR .\|.\|. , +.IR \*[ellipsis] , are special, that is, they are searched for glyphs not in the current font. . @@ -1510,7 +1540,7 @@ switch to the previous glyph color. . .TP -.BI .hcode\ "c1 code1 c2 code2 .\|.\|." +.BI .hcode\ "c1 code1 c2 code2 \*[ellipsis]" Set the hyphenation code of character .I c1 to @@ -1523,8 +1553,8 @@ A hyphenation code must be a single input character (not a special character) other than a digit or a space. . -Initially each lower-case letter \%a-z has a hyphenation code, which is -itself, and each upper-case letter \%A-Z has a hyphenation code which is +Initially each lower-case letter \%a\[en]z has a hyphenation code, which is +itself, and each upper-case letter \%A\[en]Z has a hyphenation code which is the lower-case version of itself. . See also the @@ -1586,7 +1616,7 @@ preceded by a backslash. . .IP \[bu] -No support for `digraphs' like +No support for \[oq]digraphs\[cq] like .BR \[rs]$ . . .IP \[bu] @@ -1606,7 +1636,7 @@ .IP \[bu] .B hpf checks for the expression -.BR \[rs]patterns{ .\|.\|. } +.BR \[rs]patterns{ \*[ellipsis] } (possibly with whitespace before and after the braces). . Everything between the braces is taken as hyphenation patterns. @@ -1619,7 +1649,7 @@ . .IP \[bu] Similarly, -.BR \[rs]hyphenation{ .\|.\|. } +.BR \[rs]hyphenation{ \*[ellipsis] } gives a list of hyphenation exceptions. . .IP \[bu] @@ -1639,11 +1669,11 @@ Use the .B hpfcode request to map the encoding used in hyphenation patterns files to -.BR groff 's +.BR groff \[aq]s input encoding. . -By default, everything maps to itself except letters `A' to `Z' which -map to `a' to `z'. +By default, everything maps to itself except letters \[oq]A\[cq] to +\[oq]Z\[cq] which map to \[oq]a\[cq] to \[oq]z\[cq]. . .IP The set of hyphenation patterns is associated with the current language @@ -1666,7 +1696,7 @@ are appended to the patterns already loaded in the current language. . .TP -.BI .hpfcode\ "a b c d .\|.\|." +.BI .hpfcode\ "a b c d \*[ellipsis]" After reading a hyphenation patterns file with the .B hpf or @@ -1721,7 +1751,7 @@ .IR n : When the current adjustment mode is\~\c .B b -don't hyphenate the line if the line can be justified by adding no +don\[aq]t hyphenate the line if the line can be justified by adding no more than .I n extra space to each word space. @@ -1837,7 +1867,7 @@ . If the file name to be included has the form .IB name .tmac -and it isn't found, +and it isn\[aq]t found, .B mso tries to include .BI tmac. name @@ -1847,13 +1877,13 @@ .B file is generated if .I file -can't be loaded, and the request is ignored. +can\[aq]t be loaded, and the request is ignored. . .TP .BI .nop \ anything Execute .IR anything . -This is similar to `.if\ 1'. +This is similar to \[oq].if\ 1\[cq]. . .TP .B .nroff @@ -1881,7 +1911,7 @@ .B write requests. . -.TP +.TP .BI .opena\ stream\ filename Like .BR open , @@ -1916,8 +1946,9 @@ .BI .psbb \ filename Get the bounding box of a PostScript image .IR filename . -This file must conform to Adobe's Document Structuring Conventions; -the command looks for a +. +This file must conform to Adobe\[aq]s Document Structuring +Conventions; the command looks for a .B \%%%BoundingBox comment to extract the bounding box values. . @@ -1971,11 +2002,11 @@ with a positive value which are applied after the line is output. . .TP -.BI .rchar\ "c1 c2 .\|.\|." +.BI .rchar\ "c1 c2 \*[ellipsis]" Remove the definitions of glyphs .IR c1 , .IR c2 , -.I .\|.\|. +.I \*[ellipsis] This undoes the effect of a .B char request. @@ -1990,11 +2021,11 @@ No effect otherwise. . .TP -.BI .rfschar\ "c1 c2 .\|.\|." +.BI .rfschar\ "c1 c2 \*[ellipsis]" Remove the font-specific definitions of glyphs .IR c1 , .IR c2 , -.I .\|.\|. +.I \*[ellipsis] This undoes the effect of a .B fschar request. @@ -2082,7 +2113,7 @@ Shifting by negative amounts is currently undefined. . .TP -.BI .sizes\ s1\ s2\ .\|.\|.\ sn\ [0] +.BI .sizes\ s1\ s2\ \*[ellipsis]\ sn\ [0] This command is similar to the .B sizes command of a @@ -2092,7 +2123,7 @@ It sets the available font sizes for the current font to .IR s1 , .IR s2 , -.IR .\|.\|.\| ,\~ sn +.IR \*[ellipsis]\| ,\~ sn scaled points. . The list of sizes can be terminated by an optional\~\c @@ -2103,15 +2134,15 @@ can also be a range of sizes .IR m \(en n . . -Contrary to the font file command, the list can't extend over more +Contrary to the font file command, the list can\[aq]t extend over more than a single line. . .TP -.BI .special\ "s1 s2 .\|.\|." +.BI .special\ "s1 s2 \*[ellipsis]" Fonts .IR s1 , .IR s2 , -.IR .\|.\|. , +.IR \*[ellipsis] , are special and are searched for glyphs not in the current font. . @@ -2206,7 +2237,7 @@ . If .I n2 -is omitted, it is taken to be equal to the string's length. +is omitted, it is taken to be equal to the string\[aq]s length. . If the index value .I n1 @@ -2372,15 +2403,16 @@ . .TP .BI .unformat\ xx -This request `unformats' the diversion +This request \[oq]unformats\[cq] the diversion .IR xx . +. Contrary to the .B asciify request, which tries to convert formatted elements of the diversion back to input tokens as much as possible, .B .unformat -only handles tabs and spaces between words (usually caused by -spaces or newlines in the input) specially. +only handles tabs and spaces between words (usually caused by spaces +or newlines in the input) specially. . The former are treated as if they were input tokens, and the latter are stretchable again. @@ -2517,8 +2549,8 @@ .\" -------------------------------------------------------------------- . .TP -.BR \[rs]D' .\|.\|. ' -All drawing commands of groff's intermediate output are accepted. +.BR \[rs]D' \*[ellipsis] ' +All drawing commands of groff\[aq]s intermediate output are accepted. . See subsection .B "Drawing Commands" @@ -2556,9 +2588,9 @@ .BR .ds1 , and .BR .as1 , -respectively: A `compatibility save' token is inserted at the -beginning, and a `compatibility restore' token at the end, with -compatibility mode switched on during execution. +respectively: A \[oq]compatibility save\[cq] token is inserted at the +beginning, and a \[oq]compatibility restore\[cq] token at the end, +with compatibility mode switched on during execution. . .TP .BI .ev\ xx @@ -2608,21 +2640,21 @@ with either a newline or two spaces. . .TP -.BI .ta\ "n1 n2 .\|.\|. nn " "T " "r1 r2 .\|.\|. rn" +.BI .ta\ "n1 n2 \*[ellipsis] nn " "T " "r1 r2 \*[ellipsis] rn" Set tabs at positions .IR n1 , .IR n2 , -.IR .\|.\|. , +.IR \*[ellipsis] , .I nn and then set tabs at .IR nn \|+\| r1 , .IR nn \|+\| r2 , -.IR .\|.\|. , +.IR \*[ellipsis] , .IR nn \|+\| rn and then at .IR nn \|+\| rn \|+\| r1 , .IR nn \|+\| rn \|+\| r2 , -.IR .\|.\|. , +.IR \*[ellipsis] , .IR nn \|+\| rn \|+\| rn , and so on. For example, @@ -2647,7 +2679,9 @@ .TP .B \[rs]n[.br] Within a macro call, it is set to\~1 if the macro is called with the -`normal' control character (`.' by default), and set to\~0 otherwise. +\[oq]normal\[cq] control character (\[oq].\[cq] by default), and set +to\~0 otherwise. +. This allows to reliably modify requests. . .RS @@ -3131,7 +3165,7 @@ is . .IP -.BI \[rs]\[rs]*[ xx ]\[rs]\[rs] +.BI \[rs]\[rs]*[ xx ]\[rs]\[rs] . .P If the font description file contains pairwise kerning information, @@ -3248,7 +3282,7 @@ The .B tr request can now map characters onto -.BR \[rs]~ . +.BR \[rs]\[ti] . . .P The space width emitted by the @@ -3261,7 +3295,7 @@ or .BR \[rs]^ , respectively (note the leading backslash), defined in the current font file, -use this glyph's width instead of the default value. +use this glyph\[aq]s width instead of the default value. . .P It is now possible to have whitespace between the first and second dot @@ -3274,7 +3308,7 @@ .EX \&.if t \[rs]{\[rs] \&. de bar -\&. nop Hello, I'm `bar'. +\&. nop Hello, I\[aq]m \[oq]bar\[cq]. \&. . \&.\[rs]} .EE @@ -3420,7 +3454,7 @@ option is given. . .TP -\f[B]Df \f[I]n\f[R]\*[ic]\[rs]n +\f[B]Df \f[I]n\/\f[R]\*[ic]\[rs]n Set the shade of gray to be used for filling solid objects to .IR n ; .I n @@ -3445,19 +3479,19 @@ . .IP The corresponding -.BI \[rs]D'f .\|.\|. ' -command shouldn't be used since its argument is always rounded to an +.BI \[rs]D'f \*[ellipsis] ' +command shouldn\[aq]t be used since its argument is always rounded to an integer multiple of the horizontal resolution which can lead to surprising results. . .TP -\f[B]DC \f[I]d\f[R]\*[ic]\[rs]n +\f[B]DC \f[I]\/d\f[R]\*[ic]\[rs]n Draw a solid circle with a diameter of .I d with the leftmost point at the current position. . .TP -\f[B]DE \f[I]dx dy\f[R]\*[ic]\[rs]n +\f[B]DE \f[I]dx dy\/\f[R]\*[ic]\[rs]n Draw a solid ellipse with a horizontal diameter of .I dx and a vertical diameter of @@ -3471,7 +3505,7 @@ \f[B]Dp\f[R] $dx sub 1$ $dy sub 1$ $dx sub 2$ $dy sub 2$ $...$ $dx sub n$ $dy sub n$\[rs]n Draw a polygon with, for $i = 1 ,..., n+1$, the .IR i -th -vertex at the current position +vertex at the current position . $+ sum from j=1 to i-1 ( dx sub j , dy sub j )$. . @@ -3486,7 +3520,7 @@ but draw a solid rather than outlined polygon. . .TP -\f[B]Dt \f[I]n\f[R]\*[ic]\[rs]n +\f[B]Dt \f[I]n\/\f[R]\*[ic]\[rs]n Set the current line thickness to .IR n \~\c machine units. @@ -3522,7 +3556,7 @@ .BR l , .BR a , or\~\c -.BR ~ , +.BR \[ti] , Unix troff treats each of the $x sub i$ as a horizontal quantity, and each of the $y sub i$ as a vertical quantity and assumes that the width of the drawn object is $sum from i=1 to n x sub i$, @@ -3569,7 +3603,7 @@ .TQ \f[B]DFd\f[R]\*[ic]\[rs]n .TQ -\f[B]DFg \f[I]gray\f[R]\*[ic]\[rs]n +\f[B]DFg \f[I]gray\/\f[R]\*[ic]\[rs]n .TQ \f[B]DFk \f[I]cyan magenta yellow black\f[R]\*[ic]\[rs]n .TQ @@ -3579,7 +3613,8 @@ commands above. . .P -The current position isn't changed by those colour commands (contrary to +The current position isn\[aq]t changed by those colour commands +(contrary to .BR Df ). . . @@ -3707,7 +3742,7 @@ (opening brace), .B \[rs]} (closing brace), -.RB ` \[rs]\ ' +.RB \[oq] \[rs]\ \[cq] (space), .B \[rs]' (single quote), @@ -3807,21 +3842,19 @@ .I GNU troff this is printed as .BR \[rs]\[rs] . -So each pair of input backslashes -\&`\[rs]\[rs]' -is turned into a single output backslash glyph -\&`\[rs]' -and the resulting output backslashes are not interpreted as escape -characters when they are reread. +So each pair of input backslashes \&\[oq]\[rs]\[rs]\[cq] is turned +into a single output backslash glyph \&\[oq]\[rs]\[cq] and the +resulting output backslashes are not interpreted as escape characters +when they are reread. . .P .I Classical troff would interpret them as escape characters when they were reread and -would end up printing a single backslash `\[rs]'. +would end up printing a single backslash \[oq]\[rs]\[cq]. . .P In GNU, the correct way to get a printable version of the backslash -character `\[rs]' +character \[cq]\[rs]\[cq] is the .B \[rs](rs escape sequence, but classical troff does not provide a clean feature @@ -3866,51 +3899,8 @@ . .IP \[bu] 2m The intermediate output cannot be rescaled to other devices as -classical `device-independent' troff did. -. -. -.\" -------------------------------------------------------------------- -.SH AUTHORS -.\" -------------------------------------------------------------------- -. -Copyright (C) 1989, 2001\-2004, 2006\-2010, 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 . -. -This document was written by James Clark, with modifications by -.MT wl@gnu.org -Werner Lemberg -.ME -and -.MT groff-bernd.warken-72@web.de -Bernd Warken -.ME . -. -.P -This document is part of -.IR groff , -the GNU roff distribution. +classical \[oq]device-independent\[cq] troff did. . -Formerly, the contents of this document was kept in the manual -page -.BR @g@troff (@MAN1EXT@). -Only the parts dealing with the language aspects of the different -.I roff -systems were carried over into this document. -. -The -.I troff -command line options and warnings are still documented in -.BR @g@troff (@MAN1EXT@). . .\" -------------------------------------------------------------------- .SH "SEE ALSO" @@ -3953,7 +3943,7 @@ .TP .RI [ CSTR\~#54\/ ] The -.I Nroff/\:Troff User's Manual +.I Nroff/\:Troff User\[aq]s Manual by .I J.\& F.\& Ossanna of 1976 in the revision of @@ -3963,6 +3953,17 @@ classical troff documentation .UE . . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. +. .\" -------------------------------------------------------------------- .\" Emacs variables .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/man/groff_font.man groff-1.22.3/man/groff_font.man --- groff-1.22.2/man/groff_font.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff_font.man 2014-11-04 09:38:35.518520334 +0100 @@ -1,23 +1,34 @@ -.ig -Copyright (C) 1989-1995, 2001-2004, 2006-2009, 2012 - Free Software Foundation, Inc. +.\" Emacs mode: -*- nroff -*- +.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_font \- format of groff device and font description files +. +. +.\" -------------------------------------------------------------------- +.\" License +.\" -------------------------------------------------------------------- +. +.de co +Copyright \(co 1989\-2014 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. +This file is part of groff (GNU roff), which is a free software project. -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. +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. -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. +You should have received a copy of the GNU General Public License +along with this program. If not, see +.UR http://www.gnu.org/licenses/gpl-2.0.html +GPL2 +.UE . .. . +.\" -------------------------------------------------------------------- +.\" Macro definitions +.\" -------------------------------------------------------------------- +. .do nr groff_font_C \n[.C] .cp 0 . @@ -29,15 +40,10 @@ . 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. . @@ -47,8 +53,7 @@ .BI dev name\c \&. . -There are two types of file: a -device description file called +There are two types of file: a device description file called .B DESC and for each font\~\c .I F @@ -60,7 +65,9 @@ there is no associated binary format. . . +.\" -------------------------------------------------------------------- .SS DESC file format +.\" -------------------------------------------------------------------- . The DESC file can contain the following types of line as shown below. . @@ -119,7 +126,7 @@ .BI "paperlength " n The physical vertical dimension of the output medium in machine units. . -This isn't used by +This isn\[aq]t used by .B troff itself but by output devices. . @@ -146,7 +153,8 @@ . Alternatively, .I string -can be a file name (e.g.\& `/etc/papersize'); if the file can be opened, +can be a file name (e.g.\& \[oq]/etc/papersize\[cq]); if the file can +be opened, .B groff reads the first line and tests for the above paper sizes. . @@ -160,8 +168,9 @@ .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. +must have a unit appended; valid values are \[oq]i\[cq] for inches, +\[oq]c\[cq] for centimeters, \[oq]p\[cq] for points, and \[oq]P\[cq] +for picas. . Example: .BR 12c,235p . @@ -187,7 +196,7 @@ .B papersize instead. . -This isn't used by +This isn\[aq]t used by .BR troff itself but by output devices. . @@ -244,7 +253,7 @@ Each .I si can also be a range of sizes -.IR m \- n . +.IR m \(en n . . The list can extend over more than one line. . @@ -363,16 +372,16 @@ .BR biggestfont . . . +.\" -------------------------------------------------------------------- .SS Font file format +.\" -------------------------------------------------------------------- . -A font file has two sections; -empty lines are ignored in both of them. +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. +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] @@ -488,9 +497,10 @@ it can be entered as .BI \[rs]( xx\fR. . -Note that single-letter special characters can't be accessed as +Note that single-letter special characters can\[aq]t be accessed as .BI \[rs] c\fR; -the only exception is `\[rs]\-' which is identical to `\[rs][\-]'. +the only exception is \[oq]\[rs]\-\[cq] which is identical to +\[oq]\[rs][\-]\[cq]. . The name .B \-\-\- @@ -507,16 +517,16 @@ . .TP 1 -means the glyph has a descender, for example, `p'; +means the glyph has a descender, for example, \[oq]p\[cq]; . .TP 2 -means the glyph has an ascender, for example, `b'; +means the glyph has an ascender, for example, \[oq]b\[cq]; . .TP 3 means the glyph has both an ascender and a descender, for example, -`('. +\[oq](\[cq]. . .LP The @@ -545,21 +555,23 @@ .LP The .I entity_name -field gives an ASCII string identifying the glyph which the postprocessor -uses to print that glyph. +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. +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 \[aq]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. +Anything on the line after the encoding field or \[oq]\-\-\[cq] are +ignored. . .LP The @@ -629,8 +641,7 @@ A line in the charset section can also have the format . .IP -.I -name \fB" +.I name \fB\[dq] . .LP This indicates that @@ -660,7 +671,9 @@ .IR n . . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .Tp \w'@FONTDIR@/devname/DESC'u+3n .BI @FONTDIR@/dev name /DESC @@ -675,13 +688,39 @@ .IR name . . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- . .BR groff_out (@MAN5EXT@), -.BR @g@troff (@MAN1EXT@). +.BR @g@troff (@MAN1EXT@), +.BR addftinfo (@MAN1EXT@), +.BR afmtodit (@MAN1EXT@) . -.cp \n[groff_font_C] . -.\" Local Variables: -.\" mode: nroff -.\" End: +.P +A man\-page +.IR name ( n ) +of section +.I n +can be viewed either with +.RS +\[Do] +.BI man " n name" +.RE +for text mode or +.RS +\[Do] +.BI "groffer " n name" +.RE +for graphical mode (default is PDF mode). +.RE +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. +.cp \n[groff_font_C] diff -ruN groff-1.22.2/man/groff.man groff-1.22.3/man/groff.man --- groff-1.22.2/man/groff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff.man 2014-11-04 09:38:35.518520334 +0100 @@ -1,22 +1,41 @@ '\" t -.ig -groff.man - +.TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff \- a short reference for the GNU roff language +. +.\" Before installation: /man/groff.man +.\" After installation: /share/man/man7/groff.7 +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co 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 +Copyright \[co] 2000-2014 Free Software Foundation, Inc. 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 +any later version published by the Free Software Foundation; 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. +FDL in the main directory of the groff source package. It is also +available in the internet at +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +.UE . +.. +. +.de au +This documentation was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME +and is appended and maintained by +.MT wl@gnu.org +Werner Lemberg +.ME . .. . .\" -------------------------------------------------------------------- @@ -105,7 +124,7 @@ .\" Result : prints \namearg, where `name' is in CB, `arg' in I .\" .de ESC -. Text "\f[CB]\[rs]\\$1\,\f[I]\\$2\/\fR" +. Text "\f[CB]\e\\$1\,\f[I]\\$2\/\fR" .. .\" --------------------------------------------------------------------- .\" .ESC[] name arg @@ -117,7 +136,7 @@ .\" 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[]" +. Text "\f[CB]\e\\$1\[lB]\f[]\,\f[I]\\$2\/\f[]\f[CB]\[rB]\f[]" .. .\" --------------------------------------------------------------------- .\" .ESCq name arg @@ -129,7 +148,7 @@ .\" 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[]" +. Text "\f[CB]\e\\$1\[cq]\f[]\,\f[I]\\$2\/\f[]\f[CB]\[cq]\f[]" .. .\" --------------------------------------------------------------------- .\" .ESC? arg @@ -140,7 +159,7 @@ .\" Result : prints `\?arg?', where the `?' are in CB, `arg' in I .\" .de ESC? -. Text "\f[CB]\[rs]?\,\f[I]\\$1\/\f[CB]?\f[R]" +. Text "\f[CB]\e?\,\f[I]\\$1\/\f[CB]?\f[R]" .. .\" --------------------------------------------------------------------- .\" .esc name [punct] @@ -152,7 +171,7 @@ .\" Result : prints \name, where `name' is in B, `punct' in R .\" .de esc -. BR "\[rs]\\$1" \\$2 +. BR "\e\\$1" \\$2 .. .\" --------------------------------------------------------------------- .\" .escarg name arg [punct] @@ -165,7 +184,7 @@ .\" `name' is in B, `arg' in I .\" .de escarg -. Text \f[B]\[rs]\\$1\f[]\,\f[I]\\$2\/\f[]\\$3 +. Text \f[B]\e\\$1\f[]\,\f[I]\\$2\/\f[]\\$3 .. .\" --------------------------------------------------------------------- .\" .esc[] name arg [punct] @@ -177,7 +196,7 @@ .\" 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 +. Text \f[CB]\e\\$1\[lB]\f[]\,\f[CI]\\$2\/\f[]\f[CB]\[rB]\f[]\\$3 .. . .\" --------------------------------------------------------------------- @@ -190,7 +209,7 @@ .\" 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 +. Text \f[CB]\e\\$1\[cq]\f[]\,\f[CI]\\$2\/\f[]\f[CB]\[cq]\f[]\\$3 .. . .\" --------- strings --------- @@ -222,15 +241,6 @@ . . .\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH GROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff \- a short reference for the GNU roff language -. -. -.\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- . @@ -244,12 +254,14 @@ .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 @@ -274,6 +286,7 @@ .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 @@ -285,6 +298,7 @@ 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. . @@ -296,6 +310,7 @@ .dquoted_char \[aq] ; all other lines are text lines. . +. .P .B Control lines represent commands, optionally with arguments. @@ -306,16 +321,17 @@ 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. @@ -334,6 +350,7 @@ and .squoted_char ] . . +. .P The roff language provides flexible instruments for writing language extension, such as macros. @@ -342,6 +359,7 @@ 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. @@ -363,6 +381,7 @@ 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. @@ -370,6 +389,7 @@ 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. @@ -384,6 +404,7 @@ 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 @@ -397,6 +418,7 @@ backslash .squoted_char \[rs] . . +. .P The user can define her own formatting commands using the .request de @@ -409,9 +431,10 @@ Macro packages are pre-defined sets of macros written in the groff language. . -A user's possibilities to create escape sequences herself is very +A user\[aq]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. @@ -419,6 +442,7 @@ There are pre-defined variables, but the user can define her own variables as well. . +. .P .B String variables store character sequences. @@ -431,6 +455,7 @@ . Strings can have variables. . +. .P .B Register variables can store numerical values, numbers with a scale unit, and @@ -442,6 +467,7 @@ .esc n escape sequences. . +. .P .B Environments allow the user to temporarily store global formatting parameters like @@ -451,6 +477,7 @@ .request ev request. . +. .P .B Fonts are identified either by a name or by an internal number. @@ -485,6 +512,7 @@ .BR CB . On text devices, all glyphs have a constant width anyway. . +. .P .B Glyphs are visual representation forms of @@ -493,14 +521,15 @@ 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 +colour and are taken from a specific font; they can\[aq]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. +In this man page, we use either \[oq]glyph\[cq] or +\[oq]character\[cq], whatever is more appropriate. +. . .P Moreover, there are some advanced roff elements. @@ -517,6 +546,7 @@ 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. @@ -546,6 +576,7 @@ making the dot .squoted_char . a non-special character. +. .IP "" In all other positions, it just means a dot character. . @@ -560,7 +591,7 @@ 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. +additional property that this request doesn\[aq]t cause a linebreak. . By using the .request c2 @@ -603,7 +634,7 @@ escape sequence. . .TP -\&\f[CB]\[rs]\f[] +\&\f[CB]\e\f[] The backslash usually introduces an escape sequence (this can be changed with the .request ec @@ -613,6 +644,7 @@ .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 @@ -620,18 +652,21 @@ 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. @@ -639,7 +674,7 @@ They separate the arguments in requests, macros, and strings, and the words in text lines. . -They are subject to groff's horizontal spacing calculations. +They are subject to groff\[aq]s horizontal spacing calculations. . To get a defined space width, escape sequences like .squoted_char "\[rs]\ " @@ -657,6 +692,7 @@ 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. @@ -682,6 +718,7 @@ By default, numerical values do not have a scaling indicator, i.e., they are normal numbers. . +. .P The .I roff @@ -711,7 +748,7 @@ .TPx .B m Em\ \[eq]\ \f[R]the font size in points (approx.\& width of letter -`\f[CR]m\f[R]') +\[oq]\f[CR]m\f[R]\[cq]) . .TPx .B M @@ -737,11 +774,13 @@ .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 @@ -813,11 +852,13 @@ .RE .PD . +. .P Moreover, .I groff added the following operators for numerical expressions: . +. .P .PD 0 .RS @@ -847,6 +888,7 @@ .RE .PD . +. .P For details see the groff info file. . @@ -866,6 +908,7 @@ The following table characterizes the different types of conditions. . .P +. .PD 0 .RS . @@ -948,6 +991,8 @@ . .RE .PD +. +. .P Note that the .B ! @@ -967,12 +1012,14 @@ . No bracketing or marking of long names is needed. . +. .P Most requests take one or more arguments. . The arguments are separated by space characters (no tabs!); there is no inherent limit for their length or number. . +. .P Some requests have optional arguments with a different behaviour. . @@ -982,12 +1029,14 @@ .BR groff_diff (@MAN7EXT@) for all details. . +. .P In the following request specifications, most argument names were chosen to be descriptive. . Only the following denotations need clarification. . +. .P .PD 0 .RS @@ -1022,6 +1071,7 @@ .RE .PD . +. .P If an expression defined as .I \[+-]N @@ -1035,6 +1085,7 @@ .squoted_char - the value of the expression is subtracted from the request value. . +. .P Without a sign, .I N @@ -1057,11 +1108,11 @@ Useful for structuring documents. . .TPx -.REQ .\[rs]\[dq] "anything" +.REQ .\e\[dq] "anything" Complete line is a comment. . .TPx -.REQ .ab "string +.REQ .ab "string" Print .I string on standard error, exit program. @@ -1426,7 +1477,7 @@ .BR # . The color .B default -can't be redefined. +can\[aq]t be redefined. . .TPx .REQ .dei "macro" @@ -1676,7 +1727,7 @@ . .TPx .REQ .fzoom "font" -Don't magnify +Don\[aq]t magnify .IR font . . .TPx @@ -2540,6 +2591,7 @@ . .PD . +. .P Besides these standard groff requests, there might be further macro calls. @@ -2547,11 +2599,13 @@ .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 (@); @@ -2559,15 +2613,25 @@ CfCB | CfCB | CfCB. preprocessor@start macro@ end macro = +chem@.cstart@.cend eqn@.EQ@.EN +gideal@.IS@.IE grap@.G1@.G2 grn@.GS@.GE +@@.IF pic@.PS@.PE refer@.R1@.R2 soelim@\f[I]none@\f[I]none tbl@.TS@.TE +_ +glilypond@.lilypond start@.lilypond stop +gperl@.Perl start@.Perl stop +gpinyin@.pinyin start@.pinyin stop .TE +. +. .P +Note that the \[oq]ideal\[cq] preprocessor is not available in groff yet. . . .\" -------------------------------------------------------------------- @@ -2585,6 +2649,7 @@ 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 @@ -2593,6 +2658,7 @@ apostrophes (ASCII 0x27) like .BI \[cq] constant \[cq] \f[R]. . +. .P There are abbreviations for short names. . @@ -2612,16 +2678,18 @@ 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. +\[oq]Special Characters\[cq] in the classical documentation. . Escapes sequences of the form .esc[] "" name @@ -2730,7 +2798,7 @@ .\" --------- escaped characters --------- . .TP -.ESC \[rs] +.ESC \e reduces to a single backslash; useful to delay its interpretation as escape character in copy mode. . @@ -2741,13 +2809,13 @@ to be independent from the current escape character. . .TP -.ESC \[cq] +.ESC \[aa] The acute accent \[aa]; same as .esc (aa . Unescaped: apostrophe, right quotation mark, single quote (ASCII 0x27). . .TP -.ESC ` +.ESC \[ga] The grave accent \[ga]; same as .esc (ga . Unescaped: left quote, backquote (ASCII 0x60). @@ -2764,9 +2832,8 @@ . .TP .ESC . -The same as a dot (`.'). -Necessary in nested macro definitions so that `\[rs]\[rs]..' expands to -`..'. +The same as a dot (\[oq].\[cq]). Necessary in nested macro +definitions so that \[oq]\[rs]\[rs]..\[cq] expands to \[oq]..\[cq]. . .TP .ESC % @@ -3267,6 +3334,7 @@ .I anything may not contain tabs or leaders. . +. .PD .P The escape sequences @@ -3283,6 +3351,7 @@ .escarg \& newline are interpreted in copy mode. . +. .P Escape sequences starting with .esc ( @@ -3291,6 +3360,7 @@ 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 @@ -3301,93 +3371,264 @@ .SS "Special Characters" .\" -------------------------------------------------------------------- . -[Note: `Special Characters' is a misnomer; those entities are (output) -glyphs, not (input) characters.] +[Note: \[oq]Special Characters\[cq] 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 +.BI \e( 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. +In +.IR groff , +it is also possible to use the writing +.BI \e[ xy ] +as well. . -Below you can find a selection of the most important glyphs; a complete -list can be found in +. +.P +Some of these special characters exist in the usual font while most of +them are only available in the special font. +. +Below you can see a small selection of the most important glyphs; a +complete list can be found in .BR groff_char (@MAN7EXT@). .RS .P .PD 0 . .TP +.ESC (Do +Dollar +.B \(Do +. +.TP +.ESC (Eu +Euro +.B \(Eu +. +.TP +.ESC (Po +British pound sterling +.B \(Po +. +.TP +.ESC (aq +Apostrophe quote +.B \(aq +. +.TP .ESC (bu Bullet sign +.B \(bu +. .TP .ESC (co Copyright +.B \(co +. +.TP +.ESC (cq +Single closing quote (right) +.B \(cq .TP .ESC (ct Cent +.B \(ct +. .TP .ESC (dd Double dagger +.B \(dd +. .TP .ESC (de Degree +.B \(de +. .TP .ESC (dg Dagger +.B \(dg +. .TP -.ESC (rq -Printable double quote +.ESC (dq +Double quote (ASCII 34) +.B \(dq +. .TP .ESC (em Em-dash +.B \(em +. +.TP +.ESC (en +En-dash +.B \(en +. .TP .ESC (hy Hyphen +.B \(hy +. +.TP +.ESC (lq +Double quote left +.B \(lq +. +.TP +.ESC (oq +Single opening quote (left) +.B \(oq +. .TP .ESC (rg Registered sign +.B \(rg +. +.TP +.ESC (rq +Double quote right +.B \(rq +. .TP .ESC (rs Printable backslash character +.B \(rs +. .TP .ESC (sc Section sign +.B \(sc +. +.TP +.ESC (tm +Trademark symbol +.B \(tm +. .TP .ESC (ul Underline character +.B \(ul +. .TP .ESC (== Identical +.B \(== +. .TP .ESC (>= Larger or equal +.B \(>= +. .TP .ESC (<= Less or equal +.B \(<= +. .TP .ESC (!= Not equal +.B \(!= +. .TP .ESC (-> Right arrow +.B \(-> +. .TP .ESC (<- Left arrow +.B \(<- +. .TP .ESC (+- Plus-minus sign +.B \(+- +. .PD .RE . . .\" -------------------------------------------------------------------- +.SS "Unicode Characters" +.\" -------------------------------------------------------------------- +. +There is the extended escape +.B u +that allows to include all available Unicode characters into some +.I roff +file. +. +. +.TP +.BI \e[u xxxx ] +.B u +is the escape name. +. +.I xxxx +is a hexadecimal number of 4 hex digits, such as +.B 0041 +for the letter +.BR A , +see +.BR \e[u0041] . +. +. +.TP +.BI \e[u yyyyy ] +.B u +is the escape name. +. +.I yyyyy +is a hexadecimal number of 5 hex digits, such as +.B 2FA1A +for a Chinese looking character for +.IR "CJK Compatibility Ideographs Supplement" , +see +.BR \e[u2FA1A] . +. +. +.P +Both hexadecimal collections mean the corresponding Unicode code for a +character. +. +. +.TP +.BI \e[u hex1 _ hex2 ] +.TQ +.BI \e[u hex1 _ hex2 _ hex3 ] +.IR hex1 , +.IR hex2 , +and +.I hex3 +are all Unicode hexadecimal codes (4 or 5 hex digits) that are used +for overstriking, e.g. +.B \e[u0041_0301] +is +.I "A acute" +.BR \['A] . +. +. +.P +The availability of the Unicode characters depends on the used font. +. +For text mode, the device +.B -Tutf8 +is quite complete, for +.I troff +modes it might happen that some or many characters will not be +displayed. +. +Please check your fonts. +. +. +.\" -------------------------------------------------------------------- .SS "Strings" .\" -------------------------------------------------------------------- . @@ -3397,6 +3638,7 @@ .esc * escape sequence. . +. .P Strings share their name space with macros. . @@ -3422,17 +3664,20 @@ .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. . @@ -3458,6 +3703,7 @@ Mostly, they provide information on the current settings or store results from request calls. . +. .P .PD 0 . @@ -3492,8 +3738,8 @@ . .TPx .REG .br -Within a macro, set to\~1 if macro called with the `normal' control -character, and to\~0 otherwise. +Within a macro, set to\~1 if macro called with the \[oq]normal\[cq] +control character, and to\~0 otherwise. . .TPx .REG .c @@ -3756,7 +4002,7 @@ .TPx .REG .slant The slant of the current font as set with -.request \[rs]S . +.request \eS . . .TPx .REG .sr @@ -3867,6 +4113,7 @@ They have predefined default values, but these can be modified for customizing a document. . +. .P .PD 0 .TPx @@ -4046,6 +4293,221 @@ . . .\" -------------------------------------------------------------------- +.SH UNDERLINING +.\" -------------------------------------------------------------------- +. +In the +.I RUNOFF +language, the underlining was quite easy. +. +But in +.I roff +this is much more difficult. +. +. +.\" -------------------------------------------------------------------- +.SS Underlining with .ul +.\" -------------------------------------------------------------------- +. +There exists a +.I groff +request +.B .ul +(see above) that can underline the next or further source lines in +.BR nroff , +but in +.B troff +it produces only a font change into +.IR italic . +. +So this request is not really useful. +. +. +.\" -------------------------------------------------------------------- +.SS Underlining with .UL from ms +.\" -------------------------------------------------------------------- +. +In the \[oq]ms\[cq] macro package in tmac/s.tmac +.BR groff_ms (@MAN7EXT@), +there is the macro +.BR .UL . +. +But this works only in +.BR troff , +not in +.BR nroff . +. +. +.\" -------------------------------------------------------------------- +.SS Underlining macro definitions +.\" -------------------------------------------------------------------- +. +So one can use the +.I italic +.B nroff +idea from +.B .ul +and the +.B troff +definition +in +.I ms +for writing a useful new macro, something like +. +.RS +.EX +\&.de UNDERLINE +\&. ie n \[rs]\[rs]$1\[rs]f[I]\[rs]\[rs]$2\[rs]f[P]\[rs]\[rs]$3 +\&. el \[rs]\[rs]$1\[rs]Z\[aq]\[rs]\[rs]$2\[aq]\[rs]v\[aq].25m\[aq]\ +\[rs]D\[aq]l \[rs]w\[aq]\[rs]\[rs]$2\[aq]u 0\[aq]\[rs]v\[aq]-.25m\ +\[aq]\\[rs]\[rs]$3 +\&.. +.EE +.RE +. +If +.B doclifter (1) +makes trouble, change the macro name +.B UNDERLINE +into some 2-letter word, like +.BR Ul . +. +Moreover change the font writing from +.B \[rs]f[P] +to +.BR \[rs]fP . +. +. +.\" -------------------------------------------------------------------- +.SS Underlining without macro definitions +.\" -------------------------------------------------------------------- +. +If one does not want to use macro definitions, e.g. when +.B doclifter +gets lost, use the following: +. +.RS +.EX +\&.ds u1 before +\&.ds u2 in +\&.ds u3 after +\&.ie n \[rs]*[u1]\[rs]f[I]\[rs]*[u2]\[rs]f[P]\[rs]*[u3] +\&.el \[rs]*[u1]\[rs]Z\[aq]\[rs]*[u2]\[aq]\[rs]v\[aq].25m\[aq]\[rs]D\ +\[aq]l \[rs]w\[aq]\[rs]*[u2]\[aq]u 0\[aq]\[rs]v\[aq]-.25m\[aq]\[rs]*[u3] +.EE +.RE +. +Due to +.BR doclifter , +it might be necessary to change the variable writing +.B \e[xy] +and +.B \e*[xy] +into the strange ancient writing +.B \e*(xy +and +.BR \e(xy , +and so on. +. +. +.P +Then these lines could look like +.RS +.EX +\&.ds u1 before +\&.ds u2 in +\&.ds u3 after +\&.ie n \[rs]*[u1]\[rs]fI\[rs]*(u2\[rs]fP\[rs]*(u3 +\&.el \[rs]*(u1\[rs]Z\[aq]\[rs]*(u2\[aq]\[rs]v\[aq].25m'\[rs]D\[aq]l \ +\[rs]w\[aq]\[rs]*(u2\[aq]u 0\[aq]\[rs]v\[aq]-.25m\[aq]\[rs]*(u3 +.EE +.RE +. +. +.P +The result looks like +.RS +.ft CR +before +\z\[ul]i\ +\z\[ul]n +after +.ft R +.RE +. +. +.\" -------------------------------------------------------------------- +.SS Underlining with Overstriking \ez and \e(ul +.\" -------------------------------------------------------------------- +. +There is another possibility for underlining by using overstriking +with +.BI \ez c +(print +.I c +with zero width without spacing) and +.B \e(ul +(underline character). +. +This produces the underlining of 1 character, both in +.B nroff +and in +.BR troff . +. +. +.P +For example the underlining of a character say +.B t +looks like +.B \ez\e[ul]t +or +.B \ez\e(ult +. +. +.P +Longer words look then a bit strange, but a useful mode is to write +each character into a whole own line. +. +To underlines the 3 character part "tar" of the word "start": +. +.RS +.EX +.br +before s\[rs] +\[rs]z\[rs][ul]t\[rs] +\[rs]z\[rs][ul]a\[rs] +\[rs]z\[rs][ul]r\[rs] +t after +.EE +.RE +. +or +. +.RS +.EX +.br +before s\[rs] +\[rs]z\[rs](ult\[rs] +\[rs]z\[rs](ula\[rs] +\[rs]z\[rs](ulr\[rs] +t after +.EE +.RE +. +. +.P +The result looks like +.RS +.ft CR +before s\ +\z\[ul]t\ +\z\[ul]a\ +\z\[ul]r\ +t after +.ft R +.RE +. +.\" -------------------------------------------------------------------- .SH COMPATIBILITY .\" -------------------------------------------------------------------- . @@ -4055,6 +4517,7 @@ are documented in .BR groff_diff (@MAN7EXT@). . +. .P The groff system provides a compatibility mode, see .BR groff (@MAN1EXT@) @@ -4074,42 +4537,9 @@ . . .\" -------------------------------------------------------------------- -.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) @@ -4145,12 +4575,23 @@ .TP .I [CSTR\~#54] .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz -Nroff/\:Troff User's Manual by Ossanna & Kernighan +Nroff/\:Troff User\[aq]s Manual by Ossanna & Kernighan .UE \[em] the bible for classical troff. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. .cp \n[groff_C] . +. .\" -------------------------------------------------------------------- .\" Emacs Setup .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/man/groff_out.man groff-1.22.3/man/groff_out.man --- groff-1.22.2/man/groff_out.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff_out.man 2014-11-04 09:38:35.518520334 +0100 @@ -1,25 +1,46 @@ '\" 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. +.TH GROFF_OUT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_out \- groff intermediate output format +. +.\" groff_out(5): +.\" Source file position: /man/groff_out.man +.\" Installed position: /share/man/man5/groff_out.5 +. +. +.\" -------------------------------------------------------------------- +.\" License and authors +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. -Copyright (C) 1989, 2001-2009, 2011 -Free Software Foundation, Inc. -rewritten from scrach 2001 by Bernd Warken - +This file is part of groff, the GNU roff type-setting system, which is +a free software project. 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. +any later version published by the Free Software Foundation; with no +Invariant Sections, 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. +FDL in the main directory of the groff source package, it is also +available in the internet at +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU FDL license +.UE . +.. +. +.de au +In 2001, this document was rewritten from scrach by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . .. . +. .\" -------------------------------------------------------------------- .\" Setup .\" -------------------------------------------------------------------- @@ -50,7 +71,7 @@ .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 +.offset \fI\\$1\/\fP\d\s-3\\$2\s+3\u\x'\n[.v]/4' \fI\\$3\/\fP\d\s-3\\$4\s+3\u\x'\n[.v]/4' \\$5\x'\n[.v]/4' .. .\" format: .command "" .de command @@ -61,12 +82,12 @@ \fBD\\$1\fP\ \fI\,\\$2\/\fP\|\*[@linebreak] .. . -.\" We set these as troff micromotions rather than eqn because \d and \u +.\" 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 +.ds hv1 \fIh\d\s-3\&1\s+3\u\~v\d\s-3\&1\s+3\u\fP\x'\n[.v]/4' +.ds hv2 \fIh\d\s-3\&2\s+3\u\~v\d\s-3\&2\s+3\u\fP\x'\n[.v]/4' +.ds hvn \fIh\d\s-3\&n\s+3\u\~v\d\s-3\&n\s+3\u\fP\x'\n[.v]/4' . .de Da-command \fBDa\fP\ \*[hv1] \*[hv2]\|\*[@linebreak] @@ -84,17 +105,7 @@ .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 +.\" End of macro definitions . . .\" -------------------------------------------------------------------- @@ -135,7 +146,7 @@ The .B groff program provides the option -.B -Z +.B \-Z to inhibit postprocessing, such that the produced .I intermediate output is sent to standard output just like calling @@ -202,7 +213,7 @@ .\" -------------------------------------------------------------------- . During the run of -.BR @g@troff , +.BR @g@troff , the .I roff input is cracked down to the information on what has to be printed at @@ -307,7 +318,7 @@ after their last argument. . Only one command, -.RB ` x\ X ' +.RB \[oq] x\ X \[cq] 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. @@ -335,7 +346,7 @@ Most commands assume the scale indicator\~\c .BR u , the basic unit of the device, some use\~\c -.BR z , +.BR z , the .I scaled point unit of the device, while others, such as the color commands expect plain @@ -586,7 +597,7 @@ .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 +graphic objects using different color schemes; the analogous command for the filling color of graphic objects is .BR DF . . @@ -860,13 +871,13 @@ units\~\c .BR u . . -The +The .I h arguments stand for horizontal distances where positive means right, negative left. . -The +The .I v arguments stand for vertical distances where positive means down, negative up. @@ -902,7 +913,7 @@ . . .TP -.D-multiarg ~ +.D-multiarg \[ti] Draw B-spline from current position to offset .indexed_offset h 1 v 1 , then to offset @@ -984,7 +995,7 @@ .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 +schemes; the analogous command for setting the color of text, line graphics, and the outline of graphic objects is .BR m . . @@ -1048,7 +1059,7 @@ .D-command f n The argument .I n -must be an integer in the range -32767 to 32767. +must be an integer in the range \-32767 to 32767. . .RS .TP @@ -1070,7 +1081,7 @@ .IP .EX mg 0 0 \n[@maxcolor] -Df -1 +Df \-1 .EE .RE . @@ -1519,7 +1530,7 @@ on the command line. . . -.IP \[bu] 2m +.IP \[bu] 2m High-resolution device .I ps . @@ -1527,7 +1538,7 @@ .RS .P .EX -\fBshell>\fP echo "hell world" | groff -Z -T ps +\fBshell>\fP echo "hell world" | groff \-Z \-T ps .EE . . @@ -1565,7 +1576,7 @@ to output directly to PDF. . . -.IP \[bu] 2m +.IP \[bu] 2m Low-resolution device .I latin1 . @@ -1583,7 +1594,7 @@ . .P .EX -\fBshell>\fP "hell world" | groff -Z -T latin1 +\fBshell>\fP "hell world" | groff \-Z \-T latin1 .EE . . @@ -1606,13 +1617,13 @@ .ft CB V40 H0 -.I "# write text `hell'" +.I "# write text \[oq]hell\[cq]" .ft CB thell .I "# inform about a space, and do it by a horizontal jump" .ft CB wh24 -.I "# write text `world'" +.I "# write text \[oq]world\[cq]" .ft CB tworld .I "# announce line break, but do nothing because ..." @@ -1634,7 +1645,7 @@ to get a formatted text document. . . -.IP \[bu] 2m +.IP \[bu] 2m Classical style output . . @@ -1649,7 +1660,7 @@ . .P .EX -\fBshell>\fP "hell world" | groff -Z -T X100 +\fBshell>\fP "hell world" | groff \-Z \-T X100 .EE . . @@ -1696,7 +1707,7 @@ . The .I intermediate output -language of the +language of the .I classical troff was first documented in .IR [CSTR\~#97] . @@ -1707,11 +1718,11 @@ features. . . -.IP \[bu] 2m +.IP \[bu] 2m The classical quasi device independence is not yet implemented. . . -.IP \[bu] 2m +.IP \[bu] 2m The old hardware was very different from what we use today. . So the @@ -1734,16 +1745,16 @@ .IR groff . . . -.IP \[bu] 2m +.IP \[bu] 2m The B-spline command -.B D~ +.B D\[ti] 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 +.IP \[bu] 2m The argument of the commands .B s and @@ -1773,7 +1784,7 @@ . . .ie \n[@STUPID_DRAWING_POSITIONING]=1 \{\ -.IP \[bu] 2m +.IP \[bu] 2m The position changing after the commands .BR Dp , .BR DP , @@ -1873,7 +1884,7 @@ .TP .BR groff (@MAN1EXT@) option -.B -Z +.B \-Z and further readings on groff. . . @@ -1982,43 +1993,14 @@ . . .\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- .SH "AUTHORS" .\" -------------------------------------------------------------------- +.au . -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 diff -ruN groff-1.22.2/man/groff_tmac.man groff-1.22.3/man/groff_tmac.man --- groff-1.22.2/man/groff_tmac.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/groff_tmac.man 2014-11-04 09:38:35.518520334 +0100 @@ -1,29 +1,46 @@ -.ig -groff_tmac.5 - -File position: /man/groff_tmac.man +.\" Emacs mode: -*- nroff -*- +.TH GROFF_TMAC @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_tmac \- macro files in the roff typesetting system +. +.\" groff_tmac(5): +.\" Source file position: /man/groff_tmac.man +.\" Installed position: /share/man/man5/groff_tmac.5 +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2000-2014 Free Software Foundation, Inc. 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 +any later version published by the Free Software Foundation; 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. +FDL in the main directory of the groff source package, it is also +available on\-line at the +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU copyleft site +.UE . .. -.ds Ellipsis \&.\|.\|.\&\" . -.TH GROFF_TMAC @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff_tmac \- macro files in the roff typesetting system +.de au +This file was written by +.ME groff-bernd.warken-72@web.de +Bernd Warken +.ME +and +.MT wl@gnu.org +Werner Lemberg +.ME . +.. +. +.ds Ellipsis \&.\|.\|.\&\" . . .\" -------------------------------------------------------------------- @@ -36,12 +53,14 @@ special kinds of documents. . Each macro package stores its macros and definitions in a file called -the package's +the package\[aq]s .BR "tmac file" . +. The name is deduced from -.RB ` T\c +.RB \[oq] T\c .IB roff MAC\c -.IR ros '. +.IR ros \[cq]. +. . .P The tmac files are normal roff source documents, except that they @@ -69,6 +88,7 @@ \fIsh#\fP groff \-m man \-m ms foo .EE . +. .P or . @@ -79,6 +99,7 @@ . .P fails. +. Exception to this is the use of man pages written with either the .B mdoc or the @@ -114,7 +135,7 @@ .B andoc .TQ .B mandoc -Use this file in case you don't know whether the +Use this file in case you don\[aq]t know whether the .B man macros or the .B mdoc @@ -197,7 +218,8 @@ .B de.tmac selects hyphenation patterns for traditional orthography, and .B den.tmac -does the same for the new orthography (`Recht\%schreib\%reform'). +does the same for the new orthography +(\[oq]Recht\%schreib\%reform\[cq]). . It should be used as the last macro package on the command line. . @@ -212,15 +234,15 @@ .RS .IP .EX -\fIsh#\fP groff -ms -mfr foo.ms > foo.ps +\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. +sets the input encoding to latin-9 to get proper support of the +\[oq]oe\[cq] ligature. . . .TP @@ -254,7 +276,7 @@ .B @g@roff loads latin1 by default at start-up. . -Note that these macro packages don't work on EBCDIC hosts. +Note that these macro packages don\[aq]t work on EBCDIC hosts. . . .TP @@ -265,7 +287,7 @@ . Due to different character ranges used in .B @g@roff -it doesn't work on architectures which are based on ASCII. +it doesn\[aq]t work on architectures which are based on ASCII. . . .P @@ -276,7 +298,7 @@ . .P .EX -groff -Tlatin1 -mlatin9 ... +groff \-Tlatin1 \-mlatin9 ... .EE . .P @@ -300,9 +322,9 @@ . . .TP -.B 60bit +.B 62bit Provide some macros for addition, multiplication, and division of 60bit -integers (allowing safe multiplication of 30bit integers, for example). +integers (allowing safe multiplication of 31bit integers, for example). . . .TP @@ -311,17 +333,17 @@ . To be used with .BR \%grodvi (@MAN1EXT@) -\[en] this man page also gives more details of how to use it. +\[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. +so it isn\[aq]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[]. +the option \f[B]\%\-dpaper=\f[]\,\f[I]size\f[]. . Possible values for .I size @@ -330,7 +352,7 @@ values in the DESC file (only lowercase; see .BR groff_font (@MAN5EXT@) for more) except -.BR a7 - d7 . +.BR a7 \[en] d7 . . An appended .B l @@ -371,8 +393,8 @@ . 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). +Use it only if your macro package doesn\[aq]t provide proper +definitions for those two macros (actually, most of them already do). . . .TP @@ -392,7 +414,7 @@ . This macro file is already loaded at start-up by .B @g@troff -so it isn't necessary to call it explicitly. +so it isn\[aq]t necessary to call it explicitly. . .IP Syntax: @@ -403,7 +425,7 @@ |\|\fB\-R\fP\|\ |\|\fB\-C\fP\|\ |\|\fB\-I\fP\ \fIn\fP] \ -\fI\|file\fP [\fIwidth\fP [\fIheight\fP]] +\fI\|file\fP [\fIwidth\fP [\,\fIheight\/\fP]] .RE . .IP @@ -418,9 +440,9 @@ .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. +argument is specified, the image\[aq]s natural width (as given in the +file\[aq]s bounding box) or the current line length is used as the +width, whatever is smaller. . The .I width @@ -459,9 +481,9 @@ .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. +within a diversion it is recommended to extend it with the following +code, assuring that the diversion\[aq]s width completely covers the +image\[aq]s width. . .RS .IP @@ -469,7 +491,7 @@ \&.am PSPIC \&.\ \ vpt 0 \&\[rs]h'(\[rs]\[rs]n[ps-offset]u + \[rs]\[rs]n[ps-deswid]u)' -\&.\ \ sp -1 +\&.\ \ sp \-1 \&.\ \ vpt 1 \&.. .EE @@ -480,7 +502,7 @@ .B ptx A single macro is provided in this file, .BR xx , -for formatting permuted index entries as produces by the GNU +for formatting permuted index entries as produced by the GNU .BR ptx (1) program. . @@ -520,16 +542,19 @@ .\" -------------------------------------------------------------------- . Classical roff systems were designed before the conventions of the -modern C +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 +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', +macro packages used names that started with the letter \[oq]m\[cq], which was omitted in the naming of the macro file. . . @@ -548,10 +573,9 @@ . . .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 +For similar reasons, macro packages that did not start with an +\[oq]m\[cq] had a leading \[oq]m\[cq] added in the documentation and +in speech; for example, the package corresponding to .I tmac.doc was called .I mdoc @@ -566,7 +590,7 @@ 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' +for the inflicted macro packages; one with a leading \[oq]m\[cq] the other one without it. . So in @@ -585,9 +609,8 @@ . . .P -Recent packages that do not start with `m' -do not use an additional `m' -in the documentation. +Recent packages that do not start with \[oq]m\[cq] do not use an +additional \[oq]m\[cq] in the documentation. . For example, the .I www @@ -608,7 +631,7 @@ . .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 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. . @@ -635,8 +658,7 @@ .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. +with a leading \[oq]m\[cq] for the classical packages. . . .\" -------------------------------------------------------------------- @@ -775,23 +797,23 @@ when formatting the document. . Mostly, only the letters corresponding to the options for the -preprocessors are recognized, -`e' +preprocessors are recognized, +\[oq]e\[cq] (for .BR eqn ), .\" `G', .\" `g', -`p` +\[oq]p\[cq] (for .BR pic ), -`R' +\[oq]R\[cq] (for .BR refer ), -`s' +\[oq]s\[cq] (for .BR soelim ), and -`t' +\[oq]t\[cq] (for .BR tbl ). (see @@ -810,7 +832,7 @@ .I man program handles some preprocessors automatically, such that in man\~pages only the following characters should be used: -`e', `p', and `t'. +\[oq]e\[cq], \[oq]p\[cq], and \[oq]t\[cq]. . . .. @@ -887,7 +909,7 @@ 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', +the macro to the terminal, define a macro named \[oq].print_args\[cq], say. . . @@ -924,33 +946,33 @@ . . .P -Let's analyze each backslash in the macro definition. +Let\[aq]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]$* +.RI \[rs]\[rs] $* and -.IR \[rs]\[rs][.$] . +.RI \[rs]\[rs] [.$] . The same applies to the macro name because it could be called with an alias name, so -.IR \[rs]\[rs]$0 . +.RI \[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] . +.RI \[rs] *[midpart] . The -.I \[rs]f +.RI \[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] +.RI \[rs] f[I] and -.IR \[rs]f[] . +.RI \[rs] f[] . . . .\" -------------------------------------------------------------------- @@ -1047,8 +1069,8 @@ 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). +To increase readability, use groff\[aq]s indentation facility for +requests and macro calls (arbitrary whitespace after the leading dot). . . .\" -------------------------------------------------------------------- @@ -1130,7 +1152,7 @@ The search sequence for macro files is (in that order): . .IP \(bu -the directories specified with troff/groff's +the directories specified with troff/groff\[aq]s .B \-M command line option . @@ -1194,38 +1216,6 @@ . . .\" -------------------------------------------------------------------- -.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" .\" -------------------------------------------------------------------- . @@ -1270,6 +1260,12 @@ FHS web site .UE . . -.\" Local Variables: -.\" mode: nroff -.\" End: +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHOR +.\" -------------------------------------------------------------------- +.au diff -ruN groff-1.22.2/man/Makefile.sub groff-1.22.3/man/Makefile.sub --- groff-1.22.2/man/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/Makefile.sub 2014-11-04 09:38:35.518520334 +0100 @@ -1,3 +1,30 @@ +# Makefile.sub for `man' +# +# File position: /man/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + MAN5=\ groff_font.n \ groff_out.n \ @@ -8,3 +35,11 @@ groff_diff.n \ groff.n \ roff.n + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/man/roff.man groff-1.22.3/man/roff.man --- groff-1.22.2/man/roff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/man/roff.man 2014-11-04 09:38:35.518520334 +0100 @@ -1,24 +1,42 @@ '\" t -.ig -roff.man - -This file is part of groff, the GNU roff type-setting system. - -Copyright (C) 2000-2004, 2006-2009, 2011 -Free Software Foundation, Inc. -written by Bernd Warken -maintained by Werner Lemberg +.TH ROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +roff \- concepts and history of roff typesetting +. +.\" this is man-page roff.7 +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2000-2014 Free Software Foundation, Inc. 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. +under the terms of the FDL (GNU Free Documentation License) Version +1.3 or any later version published by the Free Software Foundation. +with the Invariant Sections being the .au and .co macro definitions, +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. + +The license text is also available on-line at the +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU copyleft site +.UE . .. . +.de au +This man-page was written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME +and is maintained by +.MT wl@gnu.org +Werner Lemberg +.ME . +.. . .\" -------------------------------------------------------------------- .\" Local macros @@ -34,20 +52,10 @@ .de QuotedChar . ds @1 \\$1 . shift -. nop `\f[B]\\*[@1]\f[]'\\$* +. nop \[oq]\f[B]\\*[@1]\f[]\[cq]\\$* . rm @1 .. . -. -.\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH ROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -roff \- concepts and history of roff typesetting -. -. .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- @@ -70,6 +78,7 @@ .I roff system as a core package. . +. .P The most common .I roff @@ -81,6 +90,7 @@ implements the look-and-feel and functionality of its ancestors, with many extensions. . +. .P The ancestry of .I roff @@ -93,11 +103,12 @@ .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\/ ), +.RI ( man\~pages ), many software books, system documentation, standards, and corporate documents are written in roff. . @@ -107,6 +118,7 @@ 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 @@ -115,6 +127,7 @@ .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" ; @@ -145,7 +158,7 @@ .SS "The Predecessor RUNOFF" .\" -------------------------------------------------------------------- . -.BR roff 's +.BR roff \[aq]s ancestor .B RUNOFF was written in the MAD language by @@ -156,8 +169,8 @@ 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 +In 1965, MIT\[aq]s Project MAC teamed with Bell Telephone Laboratories +(BTL) and General Electric to begin the .UR http://\:www.multicians.org .I Multics system @@ -170,6 +183,7 @@ .IR "Doug McIlroy" , and other members of the Multics team. . +. .P Like its CTSS ancestor, Multics .B runoff @@ -185,6 +199,7 @@ formatting; it became the main format for Multics documentation and text processing. . +. .P BCPL and .B runoff @@ -192,6 +207,32 @@ Multics. . . +.P +There is a free archive about +.I historical RUNOFF +documents. +. +You can get it anonymously by the shell command +.RS +.EX +$git clone https://github.com/bwarken/RUNOFF_historical.git +.EE +.RE +. +. +.P +As well, there is a new project for writing a program that can read +.I "RUNOFF files" , +but it does not yet work so far. +. +You can get an early version anonymously by the shell command +.RS +.EX +$git clone https://github.com/bwarken/runoff.git +.EE +.RE +. +. .\" -------------------------------------------------------------------- .SS "The Classical nroff/troff System" .\" -------------------------------------------------------------------- @@ -207,14 +248,15 @@ .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 +The greatly enlarged language of Ossanna\[aq]s version already +included all elements of a full .IR "roff system" . . All modern @@ -225,6 +267,7 @@ .I roff systems. . +. .P This first .I roff system @@ -254,9 +297,10 @@ .I troff/\:nroff system as a whole. . +. .P -Ossanna's first version was written in the PDP-11 assembly language and -released in 1973. +Ossanna\[aq]s first version was written in the PDP-11 assembly +language and released in 1973. . .I Brian Kernighan joined the @@ -265,11 +309,12 @@ . 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]" , +.IR "Troff User\[aq]s Manual [CSTR\~#54]" , first published in 1976, with further revisions up to 1992 by Brian Kernighan. . @@ -280,8 +325,9 @@ .I roff systems tried to establish compatibility with this specification. . +. .P -After Ossanna's death in 1977, Kernighan went on with developing +After Ossanna\[aq]s death in 1977, Kernighan went on with developing .IR troff . . In the late 1970s, Kernighan equipped @@ -320,7 +366,7 @@ . The source code of both the ancient Unix and classical .I troff -weren't available for two decades. +weren\[aq]t available for two decades. . Meanwhile, it is accessible again (on-line) for non-commercial use, cf.\& section @@ -328,7 +374,7 @@ . . .\" -------------------------------------------------------------------- -.SS "Free roff" +.SS "groff \[em] free GNU roff" .\" -------------------------------------------------------------------- . The most important free @@ -351,6 +397,7 @@ .BR groff (@MAN1EXT@) for an overview. . +. .P The .I groff @@ -362,8 +409,8 @@ . It is the first .I roff -system that is available on almost all operating systems \[en] and it is -free. +system that is available on almost all operating systems \[em] and it +is free. . This makes .I groff @@ -371,22 +418,39 @@ .I roff standard today. . -.P +. +.\" -------------------------------------------------------------------- +.SS "Free Heirloom roff" +.\" -------------------------------------------------------------------- +. An alternative is -.IR "Gunnar Ritter" 's -.UR http://\:heirloom.sf.net -Heirloom Documentation Tools +.UR https://\:github.com/\:n-t-roff/\:heirloom-doctools +.I Gunnar Ritter\[aq]s Heirloom roff project .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. . +You can get this package with the shell command: +.RS +.EX +\[Do] git clone https://github.com/n-t-roff/heirloom-doctools +.EE +.RE +. +. +.P +Moreover, one finds there the +.UR https://github.com/n-t-roff/DWB3.3 +.I Original Documenter\[aq]s Workbench Release 3.3 +.UE . +. . .\" -------------------------------------------------------------------- .SH "USING ROFF" .\" -------------------------------------------------------------------- . -Most people won't even notice that they are actually using +Most people won\[aq]t even notice that they are actually using .IR roff . . When you read a system manual page (man page) @@ -401,7 +465,8 @@ . But using .I roff -explicitly isn't difficult either. +explicitly isn\[aq]t difficult either. +. . .P Some @@ -455,6 +520,7 @@ | \f[I]postproc\f[P] .RE . +. .P The preprocessors generate .I roff @@ -467,6 +533,7 @@ 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. @@ -476,6 +543,7 @@ macro packages that were tailored for special purposes can be included. . +. .P Most .I roff @@ -522,12 +590,13 @@ 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 +Some of them aren\[aq]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. @@ -539,7 +608,7 @@ tab (@); lb l. tbl@for tables. -eqn@for mathematical formul\[ae]. +eqn@for mathematical formulae. pic@for drawing diagrams. refer@for bibliographic references. soelim@for including macro files from standard locations. @@ -547,6 +616,7 @@ .TE .RE . +. .P Other known preprocessors that are not available on all systems include @@ -560,6 +630,7 @@ .TE .RE . +. .\" -------------------------------------------------------------------- .SS "Formatter Programs" .\" -------------------------------------------------------------------- @@ -580,6 +651,7 @@ The documents must have been run through all necessary preprocessors before. . +. .P The output produced by a .I roff @@ -601,6 +673,7 @@ The generated intermediate output is optimized for a special device, but the language is the same for every device. . +. .P The .I roff @@ -616,6 +689,7 @@ .B troff for graphical devices. . +. .P Often, the name .I troff @@ -630,6 +704,7 @@ terminals, etc., or software interfaces such as a conversion into a different text or graphical format. . +. .P A .I roff @@ -641,6 +716,7 @@ .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. @@ -648,6 +724,7 @@ 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 @@ -657,23 +734,25 @@ .I [CSTR\~#54] have greatly changed since the classical times. . -The old hardware doesn't exist any longer and the old graphical +The old hardware doesn\[aq]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 +.IR groff \[aq]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 +printer-like hardware, so it isn\[aq]t necessary to write a special hardware postprocessor for each printer. . . @@ -727,6 +806,7 @@ 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 @@ -739,6 +819,7 @@ language, see .BR groff (@MAN7EXT@). . +. .P Famous classical macro packages are .I man @@ -766,7 +847,7 @@ The classical .I roff formatting language is documented in the -.I Troff User's Manual +.I Troff User\[aq]s Manual .IR "[CSTR\~#54]" . . The @@ -775,6 +856,7 @@ 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 @@ -790,6 +872,7 @@ 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 @@ -810,6 +893,7 @@ .Esc \[rs] , and many other features. . +. .P .I Strings are variables that can store a string. @@ -822,6 +906,7 @@ .B \[rs]* escape sequence. . +. .P .I Registers store numbers and sizes. @@ -842,6 +927,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 @@ -860,6 +946,7 @@ files, etc. . +. .P But there is no general naming scheme for .I roff @@ -873,6 +960,7 @@ .I roff files. . +. .P File name extensions can be very handy in conjunction with the .BR less (1) @@ -891,12 +979,20 @@ .EE .RE . +. .P where .B lesspipe is either a system supplied command or a shell script of your own. . . +.P +More details for +.I file name extensions +can be found at +.BR groff_filenames (7). +. +. .\" -------------------------------------------------------------------- .SH "EDITING ROFF" .\" -------------------------------------------------------------------- @@ -914,9 +1010,10 @@ . 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" ', +.RI \[oq] "M-x nroff-mode" \[cq], where .B M-x means to hold down the @@ -927,6 +1024,7 @@ .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. @@ -938,9 +1036,9 @@ .RS .IP .EX -\&.\[rs]" Local Variables: -\&.\[rs]" mode: nroff -\&.\[rs]" End: +\&.\[rs]" Local Variables:\"" +\&.\[rs]" mode: nroff\"" +\&.\[rs]" End:\"" .EE .RE . @@ -956,7 +1054,7 @@ .RS .IP .EX -\&.\[rs]" \%-*-\ nroff\ -*- +\&.\[rs]" \%-*-\ nroff\ -*-\"" .EE .RE . @@ -969,6 +1067,7 @@ .B man program are confused by this; so this is deprecated. . +. .P All .I roff @@ -984,12 +1083,12 @@ . Instead, use the empty request (a line consisting of a dot only) or a line comment -.B .\[rs]" +.B .\[rs]"\"" if a structuring element is needed. . .IP \(bu -Never start a line with whitespace because this can lead to -unexpected behavior. +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 @@ -1008,6 +1107,7 @@ .I roff request (a line consisting of a dot only) after each sentence. . +. .P The following example shows how optimal .I roff @@ -1016,22 +1116,18 @@ .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. +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 \[oq]cf.\[cq] 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 @@ -1114,7 +1210,7 @@ .TP runoff .UR http://\:web.mit.edu/\:Saltzer/\:www/\:publications/\:pubs.html -Jerry Saltzer's home page +Jerry Saltzer\[aq]s home page .UE . stores some documents using the ancient RUNOFF formatting language. @@ -1157,9 +1253,9 @@ . .TP [CSTR\~#54] -J. F. Ossanna, +J.\& F.\& Ossanna, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:54.ps.gz -.I "Nroff/\:Troff User's Manual" +.I "Nroff/\:Troff User\[aq]s Manual" .UE ; . Bell Labs, 1976; revised by Brian Kernighan, 1992. @@ -1180,7 +1276,7 @@ . .TP [CSTR\~#114] -Jon L. Bentley and Brian W. Kernighan, +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 ; @@ -1189,7 +1285,7 @@ . .TP [CSTR\~#116] -Brian W. Kernighan, +Brian W.\& Kernighan, .UR http://\:cm.bell-labs.com/\:cm/\:cs/\:cstr/\:116.ps.gz .I "PIC \[en] A Graphics Language for Typesetting" .UE ; @@ -1198,7 +1294,7 @@ . .TP [CSTR\~#122] -J. L. Bentley, L. W. Jelinski, and B. W. Kernighan, +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" @@ -1207,6 +1303,22 @@ Bell Labs, April 1986. . . +.P +You can get an archive with most +.I classical roff documentation +as reasonable +.I PDF files +at +.I github +using the +.I shell command +.RS +.EX +$ git clone https://github.com/bwarken/roff_classical.git +.EE +.RE +. +. .\" -------------------------------------------------------------------- .SS "Manual Pages" .\" -------------------------------------------------------------------- @@ -1221,6 +1333,7 @@ .I roff implementations. . +. .P In .IR groff , @@ -1229,6 +1342,7 @@ contains a survey of all documentation available in .IR groff . . +. .P On other systems, you are on your own, but .BR troff (1) @@ -1236,37 +1350,14 @@ . . .\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- .SH AUTHORS .\" -------------------------------------------------------------------- +.au . -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 diff -ruN groff-1.22.2/MANIFEST groff-1.22.3/MANIFEST --- groff-1.22.2/MANIFEST 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/MANIFEST 2014-11-04 09:38:35.145524997 +0100 @@ -1,5 +1,4 @@ - Copyright 2001-2006, 2009-2013 - Free Software Foundation, Inc. + Copyright 2001-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -44,6 +43,11 @@ graphical formats. gdiffmk An improved implementation of the diffmk command to mark differences between groff/nroff/troff files. + glilypond A preprocessor that handles `lilypond' parts in a `roff' + file. + gperl A preprocessor that handles `perl' parts in a `roff' + file. + gpinyin A preprocessor providing simpler Pinyin input. grap2graph Convert grap diagraps into different graphical formats. groffer A wrapper to conveniently view roff files. hdtbl A sophisticated table macro package. @@ -171,3 +175,9 @@ The parser for the intermediate output and the postprocessing is in `src/libs/libdriver/input.cpp'. This is used by all postprocessors. + + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/mdate.sh groff-1.22.3/mdate.sh --- groff-1.22.2/mdate.sh 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/mdate.sh 2014-11-04 09:38:35.145524997 +0100 @@ -1,7 +1,6 @@ #! /bin/sh # -# Copyright (C) 1991, 1992, 2001, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2014 Free Software Foundation, Inc. # # This file is part of groff. # diff -ruN groff-1.22.2/MORE.STUFF groff-1.22.3/MORE.STUFF --- groff-1.22.2/MORE.STUFF 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/MORE.STUFF 2014-11-04 09:38:35.145524997 +0100 @@ -1,5 +1,4 @@ - Copyright 2000, 2001, 2002, 2007, 2009 - Free Software Foundation, Inc. + Copyright 2000-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -122,7 +121,7 @@ or omit headers for sentence analysis tools. It can further generate cpp-style #line lines. - http://www.moria.de/deroff/ + http://www.moria.de/~michael/deroff/ Version 1.6 compiled with DJGPP (for MS-DOS and all Windows 32 systems, i.e. Windows 95, Windows 98, Windows NT) is available from @@ -255,3 +254,9 @@ http://www.cs.bell-labs.com/cm/cs/cstr.html http://www.cs.bell-labs.com/cm/cs/papers.html + http://troff.org + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/NEWS groff-1.22.3/NEWS --- groff-1.22.2/NEWS 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/NEWS 2014-11-04 09:38:35.146524985 +0100 @@ -1,5 +1,4 @@ - Copyright (C) 1989-2013 - Free Software Foundation, Inc. + Copyright (C) 1992-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -8,6 +7,82 @@ 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.3 +============== + +Gxditview +--------- + +o X11 resources for `gxditview', which were previously installed in + /usr/X11/lib/X11/app-defaults no matter which `prefix' was set, are + now installed in appresdir=$prefix/lib/X11/app-defaults. If + `appresdir' is not a standard X11 resource directory, the environment + variable XFILESEARCHPATH should be set to this path. The standard + default directories depends on the system `libXt'. Common directories + include: + + /usr/lib/X11/app-defaults + /usr/share/X11/app-defaults + /etc/X11/app-defaults + + Note that if the option `--with-appresdir' is passed to `configure', + the `prefix' will not be added to `appresdir'. + + +Glilypond +--------- + +o This new preprocessor (contributed by Bernd Warken) allows embedding of + code for GNU LilyPond (http://www.lilypond.org), a music typesetter. The + data gets automatically processed and embedded as EPS images. + + +Gperl +----- + +o Bernd Warken contributed a new preprocessor to handle Perl code that can + be evaluated and then processed by groff. + + +Gpinyin +------- + +o Another preprocessor from Bernd Warken to pretty-print Pinyin syllables + like `guo2wang2' as `guówáng'. + + +Pdfroff +------- + +o The pdfroff utility script now activates its `--no-toc-relocation' option + by default, unless a request similar to: + + .if !\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled + + is invoked during input file processing; (`.if !\n[PHASE] ...' ensures + that the effect of the `.tm' request is restricted to the document setup + phase of processing, as pdfroff sets it to 1 or 2 in the output phase, + but leaves it unset in the setup phase). + + The bundled `spdf.tmac' macro package, which implicitly activates + `-mpdfmark' for `ms' macro users, ensures that TOC relocation is + appropriately enabled, when the `.TC' macro is invoked. + + +Macro Packages +-------------- + +o The -mom macro package now has full support for eqn, pic, and tbl, as well + as captioning and labelling of pdf images and preprocessor output. Lists + of Figures, Equations, and Tables can now be autogenerated. PDF_IMAGE has + a new FRAME option. + +o A French introduction to the -me macro package has been added (file + `meintro_fr.me'). + +o In -mdoc, command %C is now available, providing a city or place + reference. + VERSION 1.22.2 ============== @@ -1905,7 +1980,7 @@ VERSION 1.12 ============ -Finally, there are new maintainers for groff. Mailing lists and a CVS +Finally, there are new maintainers for groff. Mailing lists and a development 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. @@ -2717,7 +2792,9 @@ been removed, and the tweaks it provided are now provided by `char' definitions. +##### Emacs Local Variables: version-control: never coding: latin-1 +mode: text End: diff -ruN groff-1.22.2/PROBLEMS groff-1.22.3/PROBLEMS --- groff-1.22.2/PROBLEMS 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/PROBLEMS 2014-11-04 09:38:35.146524985 +0100 @@ -1,5 +1,4 @@ - Copyright 1989-2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright 1989-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -118,7 +117,7 @@ * Processing mdoc man pages like `groff_mdoc.n' fails if I use `test-groff'. Why? -The mdoc package works only after installation, not with test-groff. +The mdoc package works only after installation, not with test-groff. Reason is that the macro files of mdoc get stripped off the `doc-' prefix before they are copied to the final destination. @@ -296,20 +295,20 @@ $line1 .= if $line1 =~ /argv/; $line2 = ; ! next if $line2 eq "'di';\n"; - + # Pull the old switcheroo. - + --- 35,41 ---- $line1 .= if $line1 =~ /eval/; $line1 .= if $line1 =~ /argv/; $line2 = ; ! next if $line2 eq "'di ';\n" || $line2 eq "'di';\n"; - + # Pull the old switcheroo. - + *************** *** 49,56 **** - + print OUT $line1; print OUT <. + Here are some things that would be useful additions to groff: - ideal preprocessor + ideal preprocessor - Bernd Warken I + started the programming of `ideal' language and `gideal' + preprocessor, which will eventually be added to the groff + distribution. + + refer: `refer' database directory under /usr/local/share. + There maybe create a default database `Ind' or others for + storing books and documents for `groff' man pages. + Write the following `groff' programs from Heirloom and + `refer' history: + - addbib + - roffbib + - sortbib -mv macros (for typesetting viewgraphs and slides) @@ -12,3 +42,9 @@ If you want to work on one of these, you should probably post to gnu.groff.bug (or send email to bug-groff@gnu.org) to see if anyone else has gotten there first. + + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/README groff-1.22.3/README --- groff-1.22.2/README 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/README 2014-11-04 09:38:35.146524985 +0100 @@ -1,9 +1,8 @@ - Copyright (C) 1989-2006, 2008, 2009, 2012-2013 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 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. + 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 is the GNU `groff' document formatting system. The version number is given in the file VERSION. @@ -15,10 +14,14 @@ status), and typewriter-like devices. Also included is a modified version of the Berkeley `-me' macros, the enhanced version `gxditview' of the X11 `xditview' previewer, and an implementation of the `-mm' -macros contributed by Joergen Haegg (jh@axis.se). +macros contributed by Joergen Haegg. -See the file `INSTALL' for installation instructions. You require -a C++ compiler. +See the file `INSTALL' for instructions on how to install from a +release. You will require a C++ compiler. + +The file `INSTALL.REPO' contains supplementary instructions for +building directly from a clone of the repository or a snapshot +tarball. The file `NEWS' describes recent user-visible changes to `groff'. @@ -29,54 +32,27 @@ encountered in compiling, installing, and running `groff'. The file `MORE.STUFF' contains information about add-on packages -useful for groff. +useful for `groff'. The most recent released version of `groff' is always available by anonymous ftp from `ftp.gnu.org' in the directory `gnu/groff'. -The current development version of `groff' is available from a `CVS' -repository. You can access it by first selecting a parent directory -in which to create a working copy (call it, say, `~/cvswork'), and -then executing the commands - - cd ~/cvswork - cvs -d:pserver:anonymous@cvs.savannah.gnu.org/sources/groff -z5 co groff - -This creates a subdirectory, `~/cvswork/groff', with a `checked out' -copy of the `CVS' repository. An update of this working copy may be -achieved, at any later time by invoking the commands - - cd ~/cvswork/groff - cvs -z5 update -dP - -Please read the `CVS' info pages for further details. - -Finally, it is possible to access the `CVS' with a web browser by -pointing it to - - http://savannah.gnu.org/cvs/?group=groff +The current development version of `groff' is available from a git +repository at -Alternatively, you can download snapshots (which are updated twice a -day). The complete `groff' source as a single file is available at + https://savannah.gnu.org/git/?group=groff - http://groff.ffii.org/groff/devel/groff-current.tar.gz +To view the git repository in your browser, go to -A diff file relative to `groff-', the latest official `groff' -release, is available at + http://git.savannah.gnu.org/cgit/groff.git - http://groff.ffii.org/groff/devel/groff--current.diff.gz - -Assuming that `groff-.tar.gz' and -`groff--current.diff.gz' are in the same directory, do the -following to apply the diff file: - - tar xzvf groff-.tar.gz - cd groff- - gunzip -c ../groff--current.diff.gz | patch -p1 +There you can also download snapshots; simply click on a commit entry +line to get the URL. Depending on your requirements, you may need at least some of the following tools to build `groff' directly from its source: + perl >= v5.6.1 (see macro GROFF_PERL in file `m4/groff.m4') ghostscript the psutils package the netpbm package @@ -84,23 +60,23 @@ bison >= 1.875b or byacc Note that `texinfo' and `bison' or `byacc' are required only for -building from `CVS' sources (either a checked out working copy, or a -daily snapshot). They are not required for building from a stable -release tarball. Also note that the version numbers stated are the -minimum supported. No version of `texinfo' < 4.8 works, and the +building from repository sources (either a checked out working copy, +or a commit snapshot). They are not required for building from a +stable release tarball. Also note that the version numbers stated are +the minimum supported. No version of `texinfo' < 4.8 works, and the original release of `bison' 1.875 is known not to work; you *may* find that `bison' releases < 1.875 work, but in case of difficulty, please update to a later version *before* posting a bug report. -For *all* sources, you need ghostscript for creation of either `PDF' or -`HTML' output; the `netpbm' and `psutils' packages are required only -for `HTML' output (and for compilation from the CVS). If you don't -intend to produce output in either of these formats, then these -packages are unnecessary. - -Additionally, producing `PDF' output directly with the `gropdf' device -needs a working installation of Perl. The same is true for the `chem' -preprocessor. +For *all* sources, you need `ghostscript' for creation of either `PDF' +or `HTML' output; the `netpbm' and `psutils' packages are required +only for `HTML' output (and for compilation from the repository). If +you don't intend to produce output in either of these formats, then +these packages are unnecessary. + +Additionally, producing `PDF' output directly with the `gropdf' device needs +a working installation of `perl'. The same is true for some other +preprocessors like `chem'. In Linux Debian, the installation of `texinfo' is dangerous. For it creates a file `install-info' that blocks the system installation. So @@ -112,24 +88,30 @@ `gxditview' and the `-TX*' devices. In Debian, the developer packages are `libxaw7-dev' and `libxmu-dev'. -Please report bugs using the form in the file `BUG-REPORT'; the idea -of this is to make sure that FSF has all the information it needs to -fix the bug. At the very least, read the `BUG-REPORT' form and make -sure that you supply all the information that it asks for. Even if -you are not sure that something is a bug, report it using -`BUG-REPORT': this enables us to determine whether it really is a bug -or not. +Please report bugs using the bug tracker available from the project +page at + + https://savannah.gnu.org/projects/groff + +Alternatively, but less preferable, you may use the form in the file +`BUG-REPORT'; the idea of this is to make sure that FSF has all the +information it needs to fix the bug. At the very least, read the +`BUG-REPORT' form and make sure that you supply all the information +that it asks for. Even if you are not sure that something is a bug, +report it using `BUG-REPORT': this enables us to determine whether it +really is a bug or not. Three mailing lists are available: - bug-groff@gnu.org for reporting bugs + bug-groff@gnu.org for reporting bugs and following bug + reports groff@gnu.org for general discussion of groff - groff-commit@gnu.org a read-only list showing commitments - to the CVS repository + groff-commit@gnu.org a read-only list to follow commits + to the git repository To subscribe, send a mail to -request@ (example: groff-request@gnu.org for the `groff' list) with the word `subscribe' -in either the subject or body of the email (don't include the quotes). +in either the subject or body of the e-mail (don't include the quotes). Alternatively, you may subscribe by visiting the web pages at http://lists.gnu.org/mailman/listinfo/bug-groff @@ -142,3 +124,9 @@ GNU `groff' was written by James Clark . It is now maintained by Ted Harding and Werner Lemberg . + + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/README.MinGW groff-1.22.3/README.MinGW --- groff-1.22.2/README.MinGW 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/README.MinGW 2014-11-04 09:38:35.146524985 +0100 @@ -1,5 +1,4 @@ - Copyright (C) 2003, 2004, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -299,3 +298,9 @@ same way it does on a UNIX system; the cat executable provided with MSYS does seem to trap the end-of-file condition, and properly signals groff that the input stream has terminated. + + +##### Emacs settings +Local Variables: +mode: text +End: diff -ruN groff-1.22.2/REVISION groff-1.22.3/REVISION --- groff-1.22.2/REVISION 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/REVISION 2014-11-04 09:38:35.146524985 +0100 @@ -1 +1 @@ -2 +3 diff -ruN groff-1.22.2/src/devices/grodvi/dvi.cpp groff-1.22.3/src/devices/grodvi/dvi.cpp --- groff-1.22.2/src/devices/grodvi/dvi.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grodvi/dvi.cpp 2014-11-04 09:38:35.269523447 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2006, - 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/devices/grodvi/grodvi.man groff-1.22.3/src/devices/grodvi/grodvi.man --- groff-1.22.2/src/devices/grodvi/grodvi.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grodvi/grodvi.man 2014-11-04 09:38:35.270523434 +0100 @@ -1,6 +1,11 @@ -.ig -Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +.\" -*- nroff -*- +.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grodvi \- convert groff output to TeX dvi format +. +.\" copying (license) +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -41,13 +46,13 @@ . if '\\*(.T'dvi' .ft \\$1 .. . -. -.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -grodvi \- convert groff output to TeX dvi format +.ad l . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B grodvi [ .B \-dlv @@ -65,7 +70,10 @@ parameter. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B grodvi is a driver for .B groff @@ -182,12 +190,12 @@ all characters in the tfm file can be accessed this way. . .LP -By design, the DVI format doesn't care about physical dimensions of the +By design, the DVI format doesn\[aq]t care about physical dimensions of the output medium. . Instead, .B grodvi -emits the equivalent to \*(tx's +emits the equivalent to \*[tx]\[aq]s .BI \[rs]special{papersize= width , length } on the first page; .B dvips @@ -197,7 +205,10 @@ is output. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .B \-d Do not use tpic specials to implement drawing commands. @@ -245,10 +256,15 @@ Set the default line thickness to .I n thousandths of an em. -If this option isn't specified, the line thickness defaults to 0.04\~em. +. +If this option isn\[aq]t specified, the line thickness defaults to +0.04\~em. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- +. There are styles called .BR R , .BR I , @@ -374,8 +390,8 @@ . Note that .B ec.tmac -must be called before any language-specific files; it doesn't take care of -hcode values. +must be called before any language-specific files; it doesn\[aq]t take +care of hcode values. . . .SH ENVIRONMENT @@ -393,7 +409,10 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B @FONTDIR@/devdvi/DESC Device description file. @@ -413,7 +432,10 @@ Macros to switch to EC fonts. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. Dvi files produced by .B grodvi use a different resolution (57816 units per inch) to those produced by @@ -434,7 +456,10 @@ and widths of rules be rounded. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR tfmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), @@ -443,8 +468,11 @@ .BR groff_char (@MAN7EXT@), .BR groff_tmac (@MAN5EXT@) . -.cp \n[grodvi_C] . -.\" Local Variables: -.\" mode: nroff -.\" End: +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +. +. +.cp \n[grodvi_C] diff -ruN groff-1.22.2/src/devices/grodvi/Makefile.sub groff-1.22.3/src/devices/grodvi/Makefile.sub --- groff-1.22.2/src/devices/grodvi/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grodvi/Makefile.sub 2014-11-04 09:38:35.270523434 +0100 @@ -1,6 +1,41 @@ +# Makefile.sub for `grodvi' +# +# File position: /src/devices/grodvi/Makefile.sub +# +# Copyright (C) 2014 +# Free Software Foundation, Inc. +# +# Last update: 2 Sep 2014 +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grodvi$(EXEEXT) MAN1=grodvi.n XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU) MLIB=$(LIBM) OBJS=dvi.$(OBJEXT) CCSRCS=$(srcdir)/dvi.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/grohtml/grohtml.man groff-1.22.3/src/devices/grohtml/grohtml.man --- groff-1.22.2/src/devices/grohtml/grohtml.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/grohtml.man 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,11 @@ -.ig -Copyright (C) 1999-2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2010 - Free Software Foundation, Inc. +.TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grohtml \- html driver for groff +. +. +.\" license +.de co +Copyright \[co] 1999-2014 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 @@ -18,7 +23,6 @@ the original English. .. . -. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp @@ -26,15 +30,10 @@ . el .TP "\\$1" .. . -. -.TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -grohtml \- html driver for groff -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i @@ -64,7 +63,10 @@ .ad \na . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. The .B grohtml front end (which consists of a preprocessor, @@ -74,20 +76,25 @@ translates the output of GNU .B troff to html. +. Users should always invoke .B grohtml via the groff command with a .B \-Thtml option. +. If no files are given, .B grohtml will read the standard input. +. A filename of .B \- will also cause .B grohtml to read the standard input. +. Html output is written to the standard output. +. When .B grohtml is run by @@ -95,10 +102,11 @@ options can be passed to .B grohtml using -.BR groff 's +.BR groff \[aq]s .B \-P option. . +. .PP .B grohtml invokes @@ -111,23 +119,31 @@ .B html device. . +. .PP .B grohtml -always writes output in \%UTF-8 encoding and has built-in -entities for all non-composite unicode characters. +always writes output in \%UTF-8 encoding and has built-in entities for +all non-composite unicode characters. +. In spite of this, groff may issue warnings about unknown special -characters if they can't be found during the first pass. +characters if they can\[aq]t be found during the first pass. +. Such warnings can be safely ignored unless the special characters appear inside a table or equation. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .BI \-a aa-text-bits Number of bits of antialiasing information to be used by .I text when generating png images. +. The default is\~4 but valid values are 0, 1, 2, and\~4. +. Note your version of .B gs needs to support the @@ -135,6 +151,7 @@ and .B \%\-dGraphicAlphaBits options in order to exploit antialiasing. +. A value of\~0 stops .B grohtml from issuing antialiasing commands to @@ -153,8 +170,8 @@ . .TP .B \-e -This option should not be directly invoked by the user as it is -an internal option utilized by +This option should not be directly invoked by the user as it is an +internal option utilized by .B groff when .B \-Thtml @@ -183,7 +200,9 @@ Number of bits of antialiasing information to be used by .I graphics when generating png images. +. The default is\~4 but valid values are 0, 1, 2, and\~4. +. Note your version of .B gs needs to support the @@ -191,6 +210,7 @@ and .B \%\-dGraphicAlphaBits options in order to exploit antialiasing. +. A value of\~0 stops .B grohtml from issuing antialiasing commands to @@ -209,7 +229,9 @@ .TP .BI \-i resolution Select the resolution for all images. +. By default this is 100 pixels per inch. +. Example: .B \-i200 indicates 200 pixels per inch. @@ -217,6 +239,7 @@ .TP .BI \-I stem Determine the image stem name. +. If omitted grohtml uses .BI \%grohtml- XXX .RI ( XXX @@ -227,10 +250,11 @@ Inform .B grohtml to split the html output into multiple files. +. The .I filename -is the stem and specified section headings -(default is level one) start a new file, named +is the stem and specified section headings (default is level one) +start a new file, named .IR filename-n.html . . .TP @@ -240,10 +264,14 @@ . .TP .B \-n -Generate simple heading anchors whenever a section/number heading is found. +Generate simple heading anchors whenever a section/number heading is +found. +. Without the option the anchor value is the textual heading. -This can cause problems when a heading contains a `?' on older versions of -some browsers (Netscape). +. +This can cause problems when a heading contains a \[oq]?\[cq] on older +versions of some browsers (Netscape). +. This flag is automatically turned on if a heading contains an image. . .TP @@ -263,8 +291,10 @@ .TP .B \-s size Set the base point size of the source file. -Thereafter when this point size is used in the source it will correspond -to the html base size. +. +Thereafter when this point size is used in the source it will +correspond to the html base size. +. Every increase of two points in the source will yield a .B tag, and conversely when a decrease of two points is seen a @@ -289,6 +319,7 @@ .TP .BI \-x dialect Select HTML dialect. +. Currently, .I dialect should be either the digit\~\c @@ -298,6 +329,7 @@ which indicates whether .B grohtml should generate HTML\~4 or XHTML, respectively. +. This option should not be directly invoked by the user as it is an internal option utilized by .B groff @@ -310,12 +342,16 @@ .TP .B \-y Produce a right-justified groff signature at the end of the document. +. This is only generated if the .B \-V flag is also specified. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- +. There are styles called .BR R , .BR I , @@ -325,7 +361,10 @@ mounted at font positions 1 to\~4. . . +.\" -------------------------------------------------------------------- .SH DEPENDENCIES +.\" -------------------------------------------------------------------- +. .B grohtml is dependent upon the png utilities .RB ( \%pnmcut , @@ -333,29 +372,39 @@ .BR \%pnmtopng ) and GhostScript .RB ( gs ). +. .B \%pnmtopng (version 2.37.6 or greater) and .B \%pnmcut from the netpbm package (version 9.16 or greater) will work also. +. It is also dependent upon .B \%psselect from the .B PSUtils package. +. Images are generated whenever a table, picture, equation or line is encountered. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .B grohtml uses temporary files. +. See the .BR groff (@MAN1EXT@) man page for details where such files are created. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .SM .B GROFF_FONT_PATH @@ -370,13 +419,20 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. .B Grohtml has been completely redesigned and rewritten. +. It is still beta code. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), @@ -385,6 +441,13 @@ .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@) . +. +.\" -------------------------------------------------------------------- +.SH "LICENSE" +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/devices/grohtml/html.h groff-1.22.3/src/devices/grohtml/html.h --- groff-1.22.2/src/devices/grohtml/html.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/html.h 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/devices/grohtml/html-table.cpp groff-1.22.3/src/devices/grohtml/html-table.cpp --- groff-1.22.2/src/devices/grohtml/html-table.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/html-table.cpp 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 -* Free Software Foundation, Inc. +/* Copyright (C) 2002-2018 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-table.cpp * diff -ruN groff-1.22.2/src/devices/grohtml/html-table.h groff-1.22.3/src/devices/grohtml/html-table.h --- groff-1.22.2/src/devices/grohtml/html-table.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/html-table.h 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 - * Free Software Foundation, Inc. +/* Copyright (C) 2002-2018 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-table.h * diff -ruN groff-1.22.2/src/devices/grohtml/html-text.cpp groff-1.22.3/src/devices/grohtml/html-text.cpp --- groff-1.22.2/src/devices/grohtml/html-text.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/html-text.cpp 2014-11-04 09:38:35.279523322 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000-2005, 2007, 2009, 2011 +/* Copyright (C) 2000-2014 * Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.cpp diff -ruN groff-1.22.2/src/devices/grohtml/html-text.h groff-1.22.3/src/devices/grohtml/html-text.h --- groff-1.22.2/src/devices/grohtml/html-text.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/html-text.h 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 - * Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.h * diff -ruN groff-1.22.2/src/devices/grohtml/Makefile.sub groff-1.22.3/src/devices/grohtml/Makefile.sub --- groff-1.22.2/src/devices/grohtml/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/Makefile.sub 2014-11-04 09:38:35.279523322 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `grohtml' +# +# File position: /src/devices/grohtml/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=post-grohtml$(EXEEXT) MAN1=grohtml.n XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU) @@ -16,3 +40,11 @@ $(srcdir)/html.h \ $(srcdir)/html-table.h \ $(srcdir)/html-text.h + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/grohtml/output.cpp groff-1.22.3/src/devices/grohtml/output.cpp --- groff-1.22.2/src/devices/grohtml/output.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/output.cpp 2014-11-04 09:38:35.279523322 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2009 - * Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote output.cpp * but it owes a huge amount of ideas and raw code from diff -ruN groff-1.22.2/src/devices/grohtml/post-html.cpp groff-1.22.3/src/devices/grohtml/post-html.cpp --- groff-1.22.2/src/devices/grohtml/post-html.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grohtml/post-html.cpp 2014-11-04 09:38:35.280523309 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000-2007, 2009-2011 - * Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. * * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cpp * but it owes a huge amount of ideas and raw code from diff -ruN groff-1.22.2/src/devices/grolbp/charset.h groff-1.22.3/src/devices/grolbp/charset.h --- groff-1.22.2/src/devices/grolbp/charset.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolbp/charset.h 2014-11-04 09:38:35.284523259 +0100 @@ -1,10 +1,8 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Francisco Andrés Verdú with many ideas taken from the other groff drivers. - This file is part of groff. groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/src/devices/grolbp/grolbp.man groff-1.22.3/src/devices/grolbp/grolbp.man --- groff-1.22.2/src/devices/grolbp/grolbp.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolbp/grolbp.man 2014-11-04 09:38:35.284523259 +0100 @@ -1,10 +1,16 @@ '\" t .\" The above line should force the use of tbl as a preprocessor -.\" vim: set syntax=nroff : +.\" vim: set syntax=nroff : .\" The above line should set vim into nroff mode -.ig -Copyright (C) 1994-2000, 2002, 2006, 2009, 2010 - Free Software Foundation, Inc. +.TH GROLBP @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grolbp \- groff driver for Canon CAPSL printers (LBP-4 and LBP-8 \ +series laser printers). +. +. +.\" license +.de co +Copyright \[co] 1994-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -40,22 +46,17 @@ . el .TP "\\$1" .. . -. -.TH GROLBP @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -grolbp \- groff driver for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nh .nr i \n(.i .in +\w'\fBgrolbp 'u .ti \niu -.B grolpb +.B grolbp .de OP .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" .el .RB "[\ " "\\$1" "\ ]" @@ -83,13 +84,17 @@ .hy . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B grolbp is a driver for .B groff that produces output in CAPSL and VDM format suitable for Canon LBP\-4 and LBP\-8 printers. . +. .LP For compatibility with grolj4 there is an additional drawing command available: @@ -101,10 +106,13 @@ .RI +( dh , dv ). . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. Note that there can be whitespace between a one-letter option and its argument; on the other hand, there must be whitespace and/or an equal sign -(`=') between a long-name option and its argument. +(\[oq]=\[cq]) between a long-name option and its argument. . .TP .BI \-c numcopies @@ -135,7 +143,7 @@ .BI \-\-orientation= orientation Print the document with .I orientation -orientation, which must be `portrait' or `landscape'. +orientation, which must be \[oq]portrait\[cq] or \[oq]landscape\[cq]. . .TP .BI \-w width @@ -144,7 +152,8 @@ Set the default line thickness to .I width thousandths of an em. -If this option isn't specified, the line thickness defaults to 0.04\~em. +. +If this option isn\[aq]t specified, the line thickness defaults to 0.04\~em. . .TP .B \-v @@ -170,17 +179,23 @@ Print a short help text. . . +.\" -------------------------------------------------------------------- .SH TYPEFACES +.\" -------------------------------------------------------------------- +. The driver supports the Dutch, Swiss and Swiss-Narrow scalable typefaces, each one in the Regular, Bold, Italic and Bold-Italic styles. +. Additionally, the Courier and Elite monospaced typefaces at the sizes 8 and -12 points (for Courier) resp. 8 and 10 points (for Elite) are supported, +12 points (for Courier) resp.\& 8 and 10 points (for Elite) are supported, each one in the Regular, Bold and Italic styles. . +. .PP The following chart summarizes the font names you can use to access these fonts: . +. .PP .TS tab(|) allbox center; @@ -196,7 +211,10 @@ .TE . . +.\" -------------------------------------------------------------------- .SH PAPER SIZES +.\" -------------------------------------------------------------------- +. The paper size can be set in the .B DESC file or with command line options to @@ -206,6 +224,7 @@ .B DESC file (this applies to the page orientation too). . +. .PP See .BR groff_font (@MAN5EXT@) @@ -213,6 +232,7 @@ .B DESC file. . +. .PP To set the paper size in the command line, add .sp 1 @@ -234,13 +254,17 @@ .B DESC file. . +. .PP If no paper size is specified in the .B DESC file or the command line, a default size of A4 is used. . . +.\" -------------------------------------------------------------------- .SH PAGE ORIENTATION +.\" -------------------------------------------------------------------- +. As with the page size, the orientation of the printed page .RB ( portrait or @@ -248,8 +272,10 @@ can be set in the .B DESC file or with command line options. +. It is also case insensitive. . +. .PP To set the orientation in the .B DESC @@ -260,10 +286,12 @@ .RB [ portrait | landscape ] .in -2m .sp 1 +. Only the first valid orientation command in the .B DESC file is used. . +. .PP To set the page orientation with command line options you can use the .B \-o @@ -281,13 +309,17 @@ option to force the pages to be printed in landscape. . . +.\" -------------------------------------------------------------------- .SH FONT FILE FORMAT +.\" -------------------------------------------------------------------- +. In addition to the usual commands described in .BR groff_font (@MAN5EXT@), .B grolbp provides the command .I lbpname which sets the font name sent to the printer when requesting this font. +. The syntax of this command is: .sp 1 .in +2m @@ -304,7 +336,7 @@ .RI N\(la base_fontname \(ra\(la font_style \(ra .in -2m .sp 1 -.I base_fontname +.I base_fontname is the font name as it appears in the printers font listings without the first letter, up to (but not including) the font size. .I font_style @@ -316,10 +348,10 @@ indicating the font styles Roman, Italic and Bold respectively. . .IP -For instance, if the printer's +For instance, if the printer\[aq]s .I font listing A -shows font `Nelite12I.ISO_USA', the corresponding entry in the font -description file is +shows font \[oq]Nelite12I.ISO_USA\[cq], the corresponding entry in the +font description file is .sp 1 .in +2m .B lbpname NeliteI @@ -335,14 +367,14 @@ .IP \(bu For scalable fonts, .I printer_font_name -is identical to the font name as it appears in the printer's +is identical to the font name as it appears in the printer\[aq]s .IR "font listing A" . . .IP -For instance, to select the `Swiss' font in bold style, which appears in -the printer's +For instance, to select the \[oq]Swiss\[cq] font in bold style, which +appears in the printer\[aq]s .I font listing A -as `Swiss-Bold', the required +as \[oq]Swiss-Bold\[cq], the required .B lbpname command line is .sp 1 @@ -357,7 +389,10 @@ is case sensitive. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .SM .B GROFF_FONT_PATH @@ -372,7 +407,10 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B @FONTDIR@/devlbp/DESC Device description file. @@ -388,12 +426,24 @@ .BR grolbp . . . +.\" -------------------------------------------------------------------- .SH SEE ALSO +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR groff_out (@MAN5EXT@), .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@) +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +. +.co +. +. .\" .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/src/devices/grolbp/lbp.cpp groff-1.22.3/src/devices/grolbp/lbp.cpp --- groff-1.22.2/src/devices/grolbp/lbp.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolbp/lbp.cpp 2014-11-04 09:38:35.284523259 +0100 @@ -1,10 +1,8 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1994-2014 Free Software Foundation, Inc. Written by Francisco Andrés Verdú with many ideas taken from the other groff drivers. - This file is part of groff. groff is free software; you can redistribute it and/or modify it under @@ -719,6 +717,7 @@ do_file("-"); while (optind < argc) do_file(argv[optind++]); - lbpputs("\033c\033<"); + if (lbpoutput) + lbpputs("\033c\033<"); return 0; } diff -ruN groff-1.22.2/src/devices/grolbp/lbp.h groff-1.22.3/src/devices/grolbp/lbp.h --- groff-1.22.2/src/devices/grolbp/lbp.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolbp/lbp.h 2014-11-04 09:38:35.284523259 +0100 @@ -1,6 +1,5 @@ // -*- C -*- -/* Copyright (C) 1994, 2000, 2001, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1994-2014 Free Software Foundation, Inc. Written by Francisco Andrés Verdú groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/src/devices/grolbp/Makefile.sub groff-1.22.3/src/devices/grolbp/Makefile.sub --- groff-1.22.2/src/devices/grolbp/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolbp/Makefile.sub 2014-11-04 09:38:35.284523259 +0100 @@ -1,6 +1,38 @@ +# Makefile.sub for `grolbp' +# +# File position: /src/devices/grolbp/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grolbp$(EXEEXT) MAN1=grolbp.n XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU) MLIB=$(LIBM) OBJS=lbp.$(OBJEXT) CCSRCS=$(srcdir)/lbp.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/grolj4/grolj4.man groff-1.22.3/src/devices/grolj4/grolj4.man --- groff-1.22.2/src/devices/grolj4/grolj4.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolj4/grolj4.man 2014-11-04 09:38:35.274523384 +0100 @@ -1,6 +1,12 @@ -.ig -Copyright (C) 1994-2000, 2001, 2002, 2004, 2006, 2009 - Free Software Foundation, Inc. +.\" -*- nroff -*- +.TH GROLJ4 @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grolj4 \- groff driver for HP Laserjet 4 family +. +. +.\" license +.de co +Copyright \[co] 1994-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,6 +23,7 @@ translations approved by the Free Software Foundation instead of in the original English. .. +. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp @@ -24,14 +31,10 @@ . el .TP "\\$1" .. . -. -.TH GROLJ4 @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -.SH NAME -grolj4 \- groff driver for HP Laserjet 4 family -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i @@ -55,33 +58,41 @@ .ad \na . . -. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B grolj4 is a driver for .B groff -that produces output in PCL5 format suitable for an HP Laserjet 4 printer. +that produces output in PCL5 format suitable for an HP Laserjet 4 +printer. +. . .LP There is an additional drawing command available: . .TP .BI \eD'R\ dh\ dv ' -Draw a rule (solid black rectangle), with one corner -at the current position, and the diagonally opposite corner -at the current position +Draw a rule (solid black rectangle), with one corner at the current +position, and the diagonally opposite corner at the current position .RI +( dh , dv ). -Afterwards the current position will be at the opposite corner. This -generates a PCL fill rectangle command, and so will work on +. +Afterwards the current position will be at the opposite corner. +. +This generates a PCL fill rectangle command, and so will work on printers that do not support HPGL/2 unlike the other .B \eD commands. . . +.\" -------------------------------------------------------------------- .SH OPTIONS -.PP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. +. .TP .BI \-c n Print @@ -115,7 +126,9 @@ Set the default line thickness to .I n thousandths of an em. -If this option isn't specified, the line thickness defaults to 0.04\~em. +. +If this option isn\[aq]t specified, the line thickness defaults to +0.04\~em. . .TP .BI \-F dir @@ -126,6 +139,7 @@ is the name of the device, usually .BR lj4 . . +. .LP The following four commands are available additionally in the font description files: @@ -134,7 +148,7 @@ .BI pclweight \ N The integer value .I N -must be in the range -7 to +7; default is\~0. +must be in the range \-7 to +7; default is\~0. . .TP .BI pclstyle \ N @@ -153,7 +167,10 @@ must be in the range 0 to 65535; default is\~0. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .SM .B GROFF_FONT_PATH @@ -168,7 +185,10 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B @FONTDIR@/devlj4/DESC Device description file. @@ -188,7 +208,10 @@ Small dots. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR lj4_font (@MAN5EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), @@ -196,6 +219,8 @@ .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@) . -.\" Local Variables: -.\" mode: nroff -.\" End: +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co diff -ruN groff-1.22.2/src/devices/grolj4/lj4.cpp groff-1.22.3/src/devices/grolj4/lj4.cpp --- groff-1.22.2/src/devices/grolj4/lj4.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolj4/lj4.cpp 2014-11-04 09:38:35.274523384 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1994-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/devices/grolj4/lj4_font.man groff-1.22.3/src/devices/grolj4/lj4_font.man --- groff-1.22.2/src/devices/grolj4/lj4_font.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolj4/lj4_font.man 2014-11-04 09:38:35.274523384 +0100 @@ -1,6 +1,12 @@ .tr ~ -.ig -Copyright (C) 2004, 2009 Free Software Foundation, Inc. +.TH LJ4_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +lj4_font \- groff fonts for use with devlj4 +. +. +.\" license +.de co +Copyright \[co] 2004-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,134 +23,177 @@ translations approved by the Free Software Foundation instead of in the original English. .. +. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. +. .tr ~ -.TH LJ4_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" -.\" -------------------------------------------------------------------------- -.SH NAME -.\" -------------------------------------------------------------------------- -lj4_font \- groff fonts for use with devlj4 -.\" -------------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .SH DESCRIPTION -.\" -------------------------------------------------------------------------- +.\" -------------------------------------------------------------------- +. Nominally, all Hewlett-Packard LaserJet~4\(enseries and newer printers have the same internal fonts: 45 scalable fonts and one bitmapped Lineprinter font. -The scalable fonts are available in sizes between 0.25 point and 999.75 -points, in 0.25-point increments; the Lineprinter font is available only -in 8.5-point size. +. +The scalable fonts are available in sizes between 0.25 point and +999.75 points, in 0.25-point increments; the Lineprinter font is +available only in 8.5-point size. +. +. .LP The LaserJet font files included with .B groff assume that all printers since the LaserJet~4 are identical. -There are some differences between fonts in the earlier and more recent -printers, however. +. +There are some differences between fonts in the earlier and more +recent printers, however. +. The LaserJet~4 printer used Agfa Intellifont technology for 35 of the -internal scalable fonts; the remaining 10 scalable fonts were TrueType. -Beginning with the LaserJet~4000\(enseries printers introduced in 1997, -all scalable internal fonts have been TrueType. -The number of printable glyphs differs slightly between Intellifont and -TrueType fonts (generally, the TrueType fonts include more glyphs), and -there are some minor differences in glyph metrics. +internal scalable fonts; the remaining 10 scalable fonts were +TrueType. +. +Beginning with the LaserJet~4000\(enseries printers introduced in +1997, all scalable internal fonts have been TrueType. +. +The number of printable glyphs differs slightly between Intellifont +and TrueType fonts (generally, the TrueType fonts include more +glyphs), and there are some minor differences in glyph metrics. +. Differences among printer models are described in the .I "PCL~5 Comparison Guide" and the .I "PCL~5 Comparison Guide Addendum" (for printers introduced since approximately 2001). +. +. .LP LaserJet printers reference a glyph by a combination of a 256-glyph symbol set and an index within that symbol set. +. Many glyphs appear in more than one symbol set; all combinations of symbol set and index that reference the same glyph are equivalent. +. For each glyph, .BR hpftodit (@MAN1EXT@) -searches a list of symbol sets, and selects the first set that contains -the glyph. +searches a list of symbol sets, and selects the first set that +contains the glyph. +. The printing code generated by .BR hpftodit (@MAN1EXT@) is an integer that encodes a numerical value for the symbol set in the high byte(s), and the index in the low byte. +. See .BR groff_font (@MAN5EXT@) for a complete description of the font file format; symbol sets are described in greater detail in the .IR "PCL~5 Printer Language Technical Reference Manual" . +. +. .LP Two of the scalable fonts, Symbol and Wingdings, are bound to 256-glyph symbol sets; the remaining scalable fonts, as well as the Lineprinter font, support numerous symbol sets, sufficient to enable printing of more than 600 glyphs. +. +. .LP The metrics generated by .BR hpftodit (@MAN1EXT@) assume that the DESC file contains values of 1200 for res and 6350 for unitwidth (or any combination (e.g., 2400 and 3175) for which res~\(mu~unitwidth~=~7\|620\|000). +. Although HP PCL~5 LaserJet printers support an internal resolution of 7200 units per inch, they use a 16-bit signed integer for cursor positioning; if .B devlj4 -is to support U.S. ledger paper (11\(sd~\(mu~17\(sd), the maximum usable -resolution is 32\|767~/~17, or 1927, units per inch, which rounds down to -1200 units per inch. -If the largest required paper size is less (e.g., 8.5\(sd~\(mu~11\(sd or +is to support U.S.\& ledger paper (11"~\(mu~17"), the maximum usable +resolution is 32\|767~/~17, or 1927, units per inch, which rounds down +to 1200 units per inch. +. +If the largest required paper size is less (e.g., 8.5"~\(mu~11" or A5), a greater resolution (and lesser unitwidth) can be specified. -.\" -------------------------------------------------------------------------- +. +. +.\" -------------------------------------------------------------------- .SH LIMITATIONS -.\" -------------------------------------------------------------------------- +.\" -------------------------------------------------------------------- +. Font metrics for Intellifont fonts were provided by Tagged Font Metric (TFM) files originally developed by Agfa/Compugraphic. +. The TFM files provided for these fonts supported 600+ glyphs and contained extensive lists of kern pairs. +. +. .LP To accommodate developers who had become accustomed to TFM files, HP also provided TFM files for the 10 TrueType fonts included in the LaserJet~4. +. The TFM files for TrueType fonts generally included less information than the Intellifont TFMs, supporting fewer glyphs, and in most cases, providing no kerning information. +. By the time the LaserJet~4000 printer was introduced, most developers had migrated to other means of obtaining font metrics, and support for new TFM files was very limited. +. The TFM files provided for the TrueType fonts in the LaserJet~4000 support only the Latin 2 (ISO 8859-2) symbol set, and include no kerning information; consequently, they are of little value for any but the most rudimentary documents. +. +. .LP -Because the Intellifont TFM files contain considerably more information, -they generally are preferable to the TrueType TFM files even for use -with the TrueType fonts in the newer printers. +Because the Intellifont TFM files contain considerably more +information, they generally are preferable to the TrueType TFM files +even for use with the TrueType fonts in the newer printers. +. The metrics for the TrueType fonts are very close, though not identical, to those for the earlier Intellifont fonts of the same names. +. Although most output using the Intellifont metrics with the newer printers is quite acceptable, a few glyphs may fail to print as expected. +. The differences in glyph metrics may be particularly noticeable with composite parentheses, brackets, and braces used by .BR eqn (@MAN1EXT@) . +. A script, located in .BR @FONTDIR@/devlj4/generate , can be used to adjust the metrics for these glyphs in the special font S for use with printers that have all TrueType fonts. +. +. .LP At the time HP last supported TFM files, only Version 1 of the Unicode standard was available. +. Consequently, many glyphs lacking assigned code points were assigned by HP to the Private Use Area (PUA). +. Later versions of the Unicode standard included code points outside the PUA for many of these glyphs. +. The HP-supplied TrueType TFM files use the PUA assignments; TFM files generated from more recent TrueType font files require the later Unicode values to access the same glyphs. +. Consequently, two different mapping files may be required: one for the HP-supplied TFM files, and one for more recent TFM files. +. +. .\" -------------------------------------------------------------------------- .SH FILES .\" -------------------------------------------------------------------------- +. .Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n .B @FONTDIR@/devlj4/DESC Device description file. @@ -152,9 +201,11 @@ .BI @FONTDIR@/devlj4/ F Font description file for font .IR F . -.\" -------------------------------------------------------------------------- +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -.\" -------------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .ad 0 .BR groff (@MAN1EXT@), .BR groff_diff (@MAN1EXT@), @@ -162,6 +213,13 @@ .BR grolj4 (@MAN1EXT@), .BR groff_font (@MAN5EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/devices/grolj4/Makefile.sub groff-1.22.3/src/devices/grolj4/Makefile.sub --- groff-1.22.2/src/devices/grolj4/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grolj4/Makefile.sub 2014-11-04 09:38:35.274523384 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `grolj4' +# +# File position: /src/devices/grolj4/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grolj4$(EXEEXT) MAN1=grolj4.n MAN5=lj4_font.n @@ -5,3 +29,11 @@ MLIB=$(LIBM) OBJS=lj4.$(OBJEXT) CCSRCS=$(srcdir)/lj4.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/gropdf/gropdf.man groff-1.22.3/src/devices/gropdf/gropdf.man --- groff-1.22.2/src/devices/gropdf/gropdf.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/devices/gropdf/gropdf.man 2014-11-04 09:38:35.319522822 +0100 @@ -1,6 +1,12 @@ -.ig -Copyright (C) 2011-2013 - Free Software Foundation, Inc. +.\" -*- nroff -*- +.TH GROPDF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +gropdf \- PDF driver for groff +. +. +.\" license +.de co +Copyright \[co] 2011-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,7 +24,6 @@ the original English. .. . -. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp @@ -31,16 +36,9 @@ . if '\\*(.T'pdf' .ft \\$1 .. . -. -.TH GROPDF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -. -gropdf \- PDF driver for groff -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY gropdf .OP \-delvs @@ -54,12 +52,15 @@ .IR .\|.\|. ] .YS . +. .LP It is possible to have whitespace between a command line option and its parameter. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . .B gropdf translates the output of GNU @@ -92,10 +93,11 @@ options can be passed to .B gropdf using -.BR groff 's +.BR groff \[aq]s .B \-P option. . +. .LP See section .B FONT INSTALLATION @@ -103,11 +105,14 @@ .BR gropdf . . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . .TP .B \-d Include debug information as comments within the PDF. +. Also produces an uncompressed PDF. . .TP @@ -196,8 +201,9 @@ .TP .B \-s Append a comment line to end of PDF showing statistics, -i.e. number of pages in document. -Ghostscript's +i.e.\& number of pages in document. +. +Ghostscript\[aq]s .B ps2pdf complains about this line if it is included, but works anyway. . @@ -210,12 +216,15 @@ .B text.enc as the encoding file, this makes it easier to search for words which contain ligatures. +. You can include your own CMap by specifying a .I cmapfilename or have no CMap at all by omitting the argument. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . The input to .B gropdf @@ -225,6 +234,7 @@ This is described in .BR groff_out (@MAN5EXT@). . +. .LP In addition, the device and font description files for the device used must meet certain requirements: @@ -236,6 +246,7 @@ .B pdf device uses a resolution of 72000 and a sizescale of 1000. . +. .LP The device description file must contain a valid paper size; see .BR groff_font (@MAN5EXT@) @@ -246,14 +257,17 @@ .B grops device driver. . -Although the PDF Standard allows the use of other font types (like TrueType) -this implementation only accepts the Type\~1 postscript font. +Although the PDF Standard allows the use of other font types (like +TrueType) this implementation only accepts the Type\~1 postscript +font. . -Fewer Type\~1 fonts are supported natively in PDF documents than -the standard 35 fonts supported by +Fewer Type\~1 fonts are supported natively in PDF documents than the +standard 35 fonts supported by .B grops and all postscript printers, but all the fonts are available since any -which aren't supported natively are automatically embedded in the PDF. +which aren\[aq]t supported natively are automatically embedded in the +PDF. +. . .LP .B gropdf @@ -266,6 +280,7 @@ .B groff fonts from the files it discovers on your system. . +. .LP Each font description file must contain a command . @@ -294,12 +309,14 @@ the widths given in the font file must match the widths used in the PostScript font. . +. .LP Note that .B gropdf is currently only able to display the first 256 glyphs in any font. This restriction will be lifted in a later version. . +. .\" .LP .\" Note that .\" .B grops @@ -311,6 +328,7 @@ .\" .B grops .\" produces on the fly. . +. .LP .B gropdf can automatically include the downloadable fonts necessary @@ -342,7 +360,10 @@ lines beginning with .B # and blank lines are ignored; -fields must be separated by tabs; +fields must be separated by tabs +(spaces are +.B not +allowed); .I filename is searched for using the same mechanism that is used for groff font metric files. @@ -352,13 +373,14 @@ file itself is also searched for using this mechanism; currently, only the first found file in the font path is used. . -Foundry names are usually a single character (such as `U' for the URW -Foundry) or blank for the default foundry. +Foundry names are usually a single character (such as \[oq]U\[cq] for +the URW Foundry) or blank for the default foundry. . This default uses the same fonts as .B ghostscript uses when it embeds fonts in a PDF file. . +. .LP In the default setup there are styles called .BR R , @@ -574,6 +596,7 @@ .FT .RE . +. .LP There is also the following font which is not a member of a family: . @@ -585,34 +608,39 @@ .FT .RE . +. .LP There are also some special fonts called .B S -for the PS Symbol font. The lower case greek characters are automatically -slanted (to match the SymbolSlanted font (SS) available to postscript). +for the PS Symbol font. +. +The lower case greek characters are automatically slanted (to match +the SymbolSlanted font (SS) available to postscript). . Zapf Dingbats is available as .BR ZD , -the "hand pointing left" glyph (\[rs]lh) is available since it -has been defined using the \[rs]X'pdf: xrev' extension which reverses the +the "hand pointing left" glyph (\[rs][lh]) is available since it has +been defined using the \[rs]X'pdf: xrev' extension which reverses the direction of letters within words. . +. .LP The default color for .B \[rs]m and .B \[rs]M -is black; for colors defined in the `rgb' color space +is black; for colors defined in the \[oq]rgb\[cq] color space .B setrgbcolor -is used, for `cmy' and `cmyk' +is used, for \[oq]cmy\[cq] and \[oq]cmyk\[cq] .BR setcmykcolor , -and for `gray' +and for \[oq]gray\[cq] .BR setgray . . Note that .B setcmykcolor -is a PostScript LanguageLevel\~2 command and thus not available on some -older printers. +is a PostScript LanguageLevel\~2 command and thus not available on +some older printers. +. . .LP .B gropdf @@ -670,26 +698,30 @@ .br 2 = Projecting square cap . +. .LP .TP .B "\[rs]X'ps: ... pdfmark'" All the .I pdfmark macros installed by using -.I -m pdfmark +.I \-m pdfmark or -.I -m mspdf -(see documentation in `pdfmark.pdf'). +.I \-m mspdf +(see documentation in \[oq]pdfmark.pdf\[cq]). +. A subset of these macros are installed automatically when you use -.B -Tpdf -so you should not need to use `-m pdfmark' for using most of the PDF -functionality. +.B \-Tpdf +so you should not need to use \[oq]\-m pdfmark\[cq] for using most of +the PDF functionality. +. . .LP All other .B ps: tags are silently ignored. . +. .LP One .B \[rs]X @@ -706,6 +738,7 @@ See .BR groff_font (@MAN5EXT@) for details. +. This means that you can alter the page size at will within the PDF file being created by .BR gropdf . @@ -774,17 +807,19 @@ . .TP .BI "\[rs]X'pdf: markstart " "/ANN definition" ' -The macros which support PDF Bookmarks use this call internally to start the -definition of bookmark hotspot (user will have called -`.pdfhref\~L' with the text which will become the `hot spot' region). +The macros which support PDF Bookmarks use this call internally to +start the definition of bookmark hotspot (user will have called +\[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot +spot\[cq] region). . Normally this is never used except from within the pdfmark macros. . .TP .B \[rs]X'pdf: markend' -The macros which support PDF Bookmarks use this call internally to stop the -definition of bookmark hotspot (user will have called -`.pdfhref\~L' with the text which will become the `hot spot' region). +The macros which support PDF Bookmarks use this call internally to +stop the definition of bookmark hotspot (user will have called +\[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot +spot\[cq] region). . Normally this is never used except from within the pdfmark macros. . @@ -792,32 +827,36 @@ .B \[rs]X'pdf: marksuspend' .TQ .B \[rs]X'pdf: markrestart' -If you are using page traps to produce headings, footings, etc., you need to -use these in case a `hot spot' crosses a page boundary, otherwise any text -output by the heading or footing macro will be marked as part of the `hot -spot'. +If you are using page traps to produce headings, footings, etc., you +need to use these in case a \[oq]hot spot\[cq] crosses a page +boundary, otherwise any text output by the heading or footing macro +will be marked as part of the \[oq]hot spot\[cq]. . -To stop this happening just place -`.pdfmarksuspend' and `.pdfmarkrestart' at the start and end of the page trap macro, +To stop this happening just place \[oq].pdfmarksuspend\[cq] and +\[oq].pdfmarkrestart\[cq] at the start and end of the page trap macro, respectively. . (These are just convenience macros which emit the \[rs]X code. . These macros must only be used within page traps.) . +. +.\" -------------------------------------------------------------------- .SS Importing graphics +.\" -------------------------------------------------------------------- . .B gropdf only supports importing other PDF files as graphics. . -But that PDF file may contain any of the graphic formats supported by the PDF -standard (such as JPEG, PNG, GIF, etc.). +But that PDF file may contain any of the graphic formats supported by +the PDF standard (such as JPEG, PNG, GIF, etc.). . -So any application which outputs PDF can be used as an embedded file in +So any application which outputs PDF can be used as an embedded file +in .BR gropdf . . -The PDF file you wish to insert must be a single page and the drawing must -just fit inside the media size of the PDF file. +The PDF file you wish to insert must be a single page and the drawing +must just fit inside the media size of the PDF file. . So, in .BR inkscape (1) @@ -825,18 +864,20 @@ .BR gimp (1) (for example) make sure the canvas size just fits the image. . +. .LP The PDF parser used in .B gropdf -has not been rigorously tested with all possible applications which produce -PDFs. +has not been rigorously tested with all possible applications which +produce PDFs. . -If you find a single page PDF which fails to import properly, it is worth -running it through the +If you find a single page PDF which fails to import properly, it is +worth running it through the . .BR pdftk (1) program by issuing the command: . +. .RS .LP .B pdftk @@ -845,17 +886,24 @@ .I newfile.pdf .RE . +. .LP You may find that .I newfile.pdf will now load successfully. . +. +.\" -------------------------------------------------------------------- .SS TrueType and other font formats +.\" -------------------------------------------------------------------- . .B gropdf does not support any other fonts except Adobe Type 1 (PFA or PFB). . +. +.\" -------------------------------------------------------------------- .SH FONT INSTALLATION +.\" -------------------------------------------------------------------- . This section gives a summary of the above explanations; it can serve as a step-by-step font installation guide for @@ -897,21 +945,21 @@ .RE . .IP -which converts the metric file `Foo-Bar-Bold.afm' to the groff -font `FBB'. +which converts the metric file \[oq]Foo-Bar-Bold.afm\[cq] to the groff +font \[oq]FBB\[cq]. . -If you have a font family which comes with normal, bold, italic, -and bold italic faces, it is recommended to use the letters +If you have a font family which comes with normal, bold, italic, and +bold italic faces, it is recommended to use the letters .BR R , .BR B , .BR I , and .BR BI , -respectively, as postfixes in the groff font names to make groff's -`.fam' request work. +respectively, as postfixes in the groff font names to make groff\[aq]s +\[oq].fam\[cq] request work. . -An example is groff's built-in Times-Roman font: The font family name -is +An example is groff\[aq]s built-in Times-Roman font: The font family +name is .BR T , and the groff font names are .BR TR , @@ -922,7 +970,7 @@ . .LI Install both the groff font description files and the fonts in a -`devpdf' subdirectory of the font path which groff finds. +\[oq]devpdf\[cq] subdirectory of the font path which groff finds. . See the .B ENVIRONMENT @@ -930,35 +978,39 @@ .BR troff (@MAN1EXT@) man page which lists the actual value of the font path. . -Note that groff doesn't use the AFM files (but it is a good idea to +Note that groff doesn\[aq]t use the AFM files (but it is a good idea to store them anyway). . .LI Register all fonts which must be downloaded to the printer in the -`devpdf/download' file. +\[oq]devpdf/download\[cq] file. . Only the first occurrence of this file in the font path is read. . -This means that you should copy the default `download' file to the -first directory in your font path and add your fonts there. +This means that you should copy the default \[oq]download\[cq] file to +the first directory in your font path and add your fonts there. . To continue the above example we assume that the PS font name for -Foo-Bar-Bold.pfa is `XY-Foo-Bar-Bold' (the PS font name is stored in the +Foo-Bar-Bold.pfa is \[oq]XY-Foo-Bar-Bold\[cq] (the PS font name is +stored in the .B internalname -field in the `FBB' file) and belongs to foundry `F', thus the following -line should be added to `download': +field in the \[oq]FBB\[cq] file) and belongs to foundry \[oq]F\[]cq] +thus the following line should be added to \[oq]download\[cq]: . .RS .IP .B F XY-Foo-Bar-Bold Foo-Bar-Bold.pfa . +. .LP -Use a tab character to separate the fields, and the -`foundry' field should be null for the default foundry. +Use a tab character to separate the fields, and the \[oq]foundry\[cq] +field should be null for the default foundry. .RE . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- . .TP .SM @@ -967,7 +1019,7 @@ .BI dev name directory in addition to the default ones. . -If, in the `download' file, the +If, in the \[oq]download\[cq] file, the font file has been specified with a full path, no directories are searched. . See @@ -977,7 +1029,9 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .Tp \w'\fB@FONTDIR@/devpdf/download'u+2n .B @FONTDIR@/devpdf/DESC @@ -1025,7 +1079,11 @@ .\" . . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.ad l . .BR \%afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), @@ -1039,6 +1097,11 @@ .BR \%groff_tmac (@MAN5EXT@) . . +.\" -------------------------------------------------------------------- +.SH LICENSE +.\" -------------------------------------------------------------------- +.co +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/src/devices/gropdf/gropdf.pl groff-1.22.3/src/devices/gropdf/gropdf.pl --- groff-1.22.2/src/devices/gropdf/gropdf.pl 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/devices/gropdf/gropdf.pl 2014-11-04 09:38:35.319522822 +0100 @@ -1,10 +1,8 @@ -#!@PERLPATH@ -w +#!@PERL@ -w # # gropdf : PDF post processor for groff -# Deri James : 4th May 2009 # - -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # Written by Deri James # # This file is part of groff. @@ -711,6 +709,7 @@ { my $pdfmark=$1; $pdfmark=~s((\d{4,6}) u)(sprintf("%.1f",$1/$desc{sizescale}))eg; + $pdfmark=~s(\\\[u00(..)\])(chr(hex($1)))eg; if ($pdfmark=~m/(.+) \/DOCINFO/) { @@ -1125,6 +1124,7 @@ $l=~s/Color/C/; $l=~s/Action/A/; $l=~s'/Subtype /URI'/S /URI'; + $l=~s(\\\[u00(..)\])(chr(hex($1)))eg; my @xwds=split(' ',"<< $l >>"); my $annotno=BuildObj(++$objct,ParsePDFValue(\@xwds)); my $annot=$obj[$objct]; @@ -1622,7 +1622,7 @@ return('') if !defined($wd); - if ($wd=~m/^(.*?)(<<|>>|\[|\])(.*)/) + if ($wd=~m/^(.*?)(<<|>>|(?:(?{DATA}; $pages->{'Count'}++; $stream="q 1 0 0 1 0 0 cm\n$linejoin J\n$linecap j\n"; + $stream.=$strkcol."\n", $curstrk=$strkcol if $strkcol ne ''; $mode='g'; $curfill=''; # @mediabox=@defaultmb; @@ -3068,7 +3069,7 @@ $xpos+=($pendmv-$nomove)/$unitwidth; $stream.="% == '$par'=$wid 'xpos=$xpos\n" if $debug; - $par=~s/\\/\\\\/g; + $par=~s/\\(?!\d\d\d)/\\\\/g; $par=~s/\)/\\)/g; $par=~s/\(/\\(/g; @@ -3198,7 +3199,7 @@ my $ch=$fnt->{GNM}->{$chnm}; $ch=RemapChr($ch,$fnt,$chnm) if ($ch > 255); - return(chr($ch),$fnt->{WID}->[$ch]*$cftsz); + return(($ch<32)?sprintf("\\%03o",$ch):chr($ch),$fnt->{WID}->[$ch]*$cftsz); } else { @@ -3274,3 +3275,11 @@ @lin=(); PutHotSpot($xpos) if defined($mark); } + + +1; +######################################################################## +### Emacs settings +# Local Variables: +# mode: CPerl +# End: diff -ruN groff-1.22.2/src/devices/gropdf/Makefile.sub groff-1.22.3/src/devices/gropdf/Makefile.sub --- groff-1.22.2/src/devices/gropdf/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/devices/gropdf/Makefile.sub 2014-11-04 09:38:35.319522822 +0100 @@ -1,4 +1,8 @@ -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Makefile.sub for `gropdf' +# +# File position: /src/devices/gropbf/Makefile.sub +# +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # Written by Deri James # # This file is part of groff. @@ -15,6 +19,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# +######################################################################## MAN1=\ gropdf.n \ @@ -29,10 +35,8 @@ pdfmom \ $(MAN1) -# Some `makes' don't predefine RM... RM=rm -f - all: gropdf pdfmom @@ -40,7 +44,7 @@ $(RM) $@ sed -f $(SH_DEPS_SED_SCRIPT) \ -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@PERLPATH@|$(PERLPATH)|" \ + -e "s|@PERL@|$(PERL)|" \ -e "s|@GROFF_FONT_DIR@|$(fontpath)|" \ -e "s|@RT_SEP@|$(RT_SEP)|" $(srcdir)/gropdf.pl >$@ chmod +x $@ @@ -49,7 +53,7 @@ $(RM) $@ sed -f $(SH_DEPS_SED_SCRIPT) \ -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@PERLPATH@|$(PERLPATH)|" $(srcdir)/pdfmom.pl >$@ + -e "s|@PERL@|$(PERL)|" $(srcdir)/pdfmom.pl >$@ chmod +x $@ install_data: @@ -60,6 +64,12 @@ done uninstall_sub: - for f in $(CMDFILES); do \ - $(RM) $(DESTDIR)$(bindir)/$$f; \ - done + -for f in $(CMDFILES); do $(RM) $(DESTDIR)$(bindir)/$$f; done + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/gropdf/pdfmom.man groff-1.22.3/src/devices/gropdf/pdfmom.man --- groff-1.22.2/src/devices/gropdf/pdfmom.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/devices/gropdf/pdfmom.man 2014-11-04 09:38:35.319522822 +0100 @@ -1,8 +1,14 @@ -.ig -Copyright (C) 2012 - Free Software Foundation, Inc. -written by Deri James -and Peter Schaffter # # This file is part of groff. @@ -23,13 +24,19 @@ # along with this program. If not, see . use strict; +use File::Temp qw/tempfile/; my @cmd; my $dev='pdf'; +my $preconv=''; +my $readstdin=1; $ENV{PATH}=$ENV{GROFF_BIN_PATH}.':'.$ENV{PATH} if exists($ENV{GROFF_BIN_PATH}); +$ENV{TMPDIR}=$ENV{GROFF_TMPDIR} if exists($ENV{GROFF_TMPDIR}); while (my $c=shift) { + $c=~s/(? 2) @@ -40,7 +47,24 @@ { $dev=shift; } - + next; + } + elsif (substr($c,0,2) eq '-K') + { + if (length($c) > 2) + { + $preconv=$c; + } + else + { + $preconv=$c; + $preconv.=shift; + } + next; + } + elsif (substr($c,0,2) eq '-k') + { + $preconv=$c; next; } elsif ($c eq '-z' or $c eq '-Z') @@ -48,21 +72,57 @@ $dev=$c; next; } - elsif ($c eq '-v') { print "GNU pdfmom (groff) version @VERSION@\n"; exit; } + elsif (substr($c,0,1) eq '-') + { + if (length($c) > 1) + { + push(@cmd,"\"$c\""); + push(@cmd,"'".(shift)."'") if length($c)==2 and index('dDfFIKLmMnoPrwW',substr($c,-1)) >= 0; + } + else + { + # Just a '-' + + push(@cmd,$c); + $readstdin=2; + } + } + else + { + # Got a filename? + + push(@cmd,"\"$c\""); + $readstdin=0 if $readstdin == 1; + + } - push(@cmd,$c); } -my $cmdstring=join(' ',@cmd); +my $cmdstring=' '.join(' ',@cmd).' '; + +if ($readstdin) +{ + my ($fh,$tmpfn)=tempfile('pdfmom-XXXXX', UNLINK=>1); + + while () + { + print $fh ($_); + } + + close($fh); + + $cmdstring=~s/ - / $tmpfn / if $readstdin == 2; + $cmdstring.=" $tmpfn " if $readstdin == 1; +} if ($dev eq 'pdf') { - system("groff -Tpdf -dPDF.EXPORT=1 -mom -z $cmdstring 2>&1 | grep '^.ds' | groff -Tpdf -mom - $cmdstring"); + system("groff -Tpdf -dPDF.EXPORT=1 -mom -z $cmdstring 2>&1 | grep '^\.ds' | groff -Tpdf -mom - $preconv $cmdstring"); } elsif ($dev eq 'ps') { diff -ruN groff-1.22.2/src/devices/grops/grops.man groff-1.22.3/src/devices/grops/grops.man --- groff-1.22.2/src/devices/grops/grops.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grops/grops.man 2014-11-04 09:38:35.259523572 +0100 @@ -1,6 +1,11 @@ -.ig -Copyright (C) 1989-2006, 2008-2011 - Free Software Foundation, Inc. +.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grops \- PostScript driver for groff +. +. +.\" license +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -31,16 +36,9 @@ . if '\\*(.T'pdf' .ft \\$1 .. . -. -.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -. -grops \- PostScript driver for groff -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY grops .OP \-glmv @@ -56,7 +54,9 @@ .YS . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . .B grops translates the output of GNU @@ -65,8 +65,7 @@ . Normally .B grops -should be invoked by using the groff command -with a +should be invoked by using the groff command with a .B \-Tps option. . @@ -91,15 +90,17 @@ options can be passed to .B grops using -.BR groff 's +.BR groff \[aq]s .B \-P option. . +. .LP Note that .B grops -doesn't produce a valid document structure (conforming to the Document -Structuring Convention) if called with multiple file arguments. +doesn\[aq]t produce a valid document structure (conforming to the +Document Structuring Convention) if called with multiple file +arguments. . To print such concatenated output it is necessary to deactivate DSC handling in the printing program or previewer. @@ -110,8 +111,10 @@ .BR grops . . . +.\" -------------------------------------------------------------------- .SH OPTIONS -.LP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. . @@ -125,7 +128,8 @@ produces output at PostScript LanguageLevel\~2 that conforms to the Document Structuring Conventions version 3.0. . -Some older printers, spoolers, and previewers can't handle such output. +Some older printers, spoolers, and previewers can\[aq]t handle such +output. . The value of\~\c .I n @@ -151,7 +155,8 @@ .IP Add\~2 if lines in included files beginning with .B %!\& -should be stripped out; this is needed for Sun's pageview previewer. +should be stripped out; this is needed for Sun\[aq]s pageview +previewer. . .IP Add\~4 if @@ -161,7 +166,7 @@ .B %%End\%Prolog comments should be stripped out of included files; this is needed for spoolers that -don't understand the +don\[aq]t understand the .B %%Begin\%Document and .B %%End\%Document @@ -172,19 +177,20 @@ .B %!PS-Adobe-2.0 rather than .BR %!PS-Adobe-3.0 ; -this is needed when using Sun's Newsprint with a printer that requires -page reversal. +this is needed when using Sun\[aq]s Newsprint with a printer that +requires page reversal. . .IP -Add\~16 if no media size information should be included in the document -(this is, neither use +Add\~16 if no media size information should be included in the +document (this is, neither use .B %%Document\%Media nor the .B setpagedevice PostScript command). . -This was the behaviour of groff version 1.18.1 and earlier; it is needed -for older printers which don't understand PostScript LanguageLevel\~2. +This was the behaviour of groff version 1.18.1 and earlier; it is +needed for older printers which don\[aq]t understand PostScript +LanguageLevel\~2. . It is also necessary if the output is further processed to get an encapsulated PS (EPS) file \[en] see below. @@ -301,7 +307,9 @@ Print the version number. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . The input to .B grops @@ -322,11 +330,13 @@ .B ps device uses a resolution of 72000 and a sizescale of 1000. . +. .LP The device description file must contain a valid paper size; see .BR groff_font (@MAN5EXT@) for more information. . +. .LP Each font description file must contain a command .IP @@ -381,6 +391,7 @@ it can make use of such a character to generate more efficient and compact PostScript output. . +. .LP Note that .B grops @@ -392,6 +403,7 @@ .B grops produces on the fly. . +. .LP .B grops can automatically include the downloadable fonts necessary @@ -413,6 +425,7 @@ .I font filename . +. .LP where .I font @@ -433,6 +446,7 @@ file itself is also searched for using this mechanism; currently, only the first found file in the font path is used. . +. .LP If the file containing a downloadable font or imported document conforms to the Adobe Document Structuring Conventions, @@ -448,20 +462,18 @@ . It is also able to handle inter-resource dependencies. . -For example, suppose that you have a downloadable font called Garamond, -and also a downloadable font called Garamond-Outline -which depends on Garamond -(typically it would be defined to copy Garamond's font dictionary, -and change the PaintType), -then it is necessary for Garamond to appear before Garamond-Outline -in the PostScript document. +For example, suppose that you have a downloadable font called +Garamond, and also a downloadable font called Garamond-Outline which +depends on Garamond (typically it would be defined to copy +Garamond\[aq]s font dictionary, and change the PaintType), then it is +necessary for Garamond to appear before Garamond-Outline in the +PostScript document. . .B grops -handles this automatically -provided that the downloadable font file for Garamond-Outline -indicates its dependence on Garamond by means of -the Document Structuring Conventions, -for example by beginning with the following lines +handles this automatically provided that the downloadable font file +for Garamond-Outline indicates its dependence on Garamond by means of +the Document Structuring Conventions, for example by beginning with +the following lines . .IP .B @@ -476,6 +488,7 @@ .B %%IncludeResource: font Garamond . +. .LP In this case both Garamond and Garamond-Outline would need to be listed in the @@ -486,6 +499,7 @@ .B %%Document\%Supplied\%Resources comment. . +. .LP .B grops does not interpret @@ -510,6 +524,7 @@ comments) should be used. . +. .LP In the default setup there are styles called @@ -726,6 +741,7 @@ .FT .RE . +. .LP There is also the following font which is not a member of a family: . @@ -737,6 +753,7 @@ .FT .RE . +. .LP There are also some special fonts called .B S @@ -752,16 +769,17 @@ most characters in these fonts are unnamed and must be accessed using .BR \[rs]N . . +. .LP The default color for .B \[rs]m and .B \[rs]M -is black; for colors defined in the `rgb' color space +is black; for colors defined in the \[oq]rgb\[cq] color space .B setrgbcolor -is used, for `cmy' and `cmyk' +is used, for \[oq]cmy\[cq] and \[oq]cmyk\[cq] .BR setcmykcolor , -and for `gray' +and for \[oq]gray\[cq] .BR setgray . . Note that @@ -769,6 +787,7 @@ is a PostScript LanguageLevel\~2 command and thus not available on some older printers. . +. .LP .B grops understands various X\~commands produced using the @@ -794,9 +813,8 @@ . A procedure\~\c .B u -is defined that converts groff units -to the coordinate system in effect (provided the user doesn't change the -scale). +is defined that converts groff units to the coordinate system in +effect (provided the user doesn\[aq]t change the scale). . For example, . @@ -854,18 +872,19 @@ .LP is another way to draw a horizontal line one inch long. . -Note the single backslash before `nx' \[en] the only reason to use a number -register while defining the macro `y' is to convert a user-specified -dimension `1i' to internal groff units which are in turn converted to PS -units with the +Note the single backslash before \[oq]nx\[cq] \[en] the only reason to +use a number register while defining the macro \[oq]y\[cq] is to +convert a user-specified dimension \[oq]1i\[cq] to internal groff +units which are in turn converted to PS units with the .B u procedure. . +. .LP .B grops wraps user-specified PostScript code into a dictionary, nothing more. . -In particular, it doesn't start and end the inserted code with +In particular, it doesn\[aq]t start and end the inserted code with .B save and .BR restore , @@ -1013,6 +1032,7 @@ .B \[rs]X commands. . +. .RS .LP For example, @@ -1032,6 +1052,7 @@ .ft .fi . +. .LP In this case, .B \%gxditview @@ -1051,17 +1072,19 @@ .BR \%gxditview ). .RE . +. .LP If a PostScript procedure .B BPhook has been defined via a -.RB ` ps:\ def ' +.RB \[oq] ps:\ def \[cq] or -.RB ` ps:\ mdef ' -device command, it is executed at the beginning -of every page (before anything is drawn or written by groff). +.RB \[oq] ps:\ mdef \[cq] +device command, it is executed at the beginning of every page (before +anything is drawn or written by groff). +. For example, to underlay the page contents with the word -`DRAFT' in light gray, you might use +\[oq]DRAFT\[cq] in light gray, you might use .RS .LP .nf @@ -1104,29 +1127,33 @@ drawn unconnected). . . +.\" -------------------------------------------------------------------- .SS Encapsulated PostScript +.\" -------------------------------------------------------------------- +. .B grops -itself doesn't emit bounding box information. +itself doesn\[aq]t emit bounding box information. . With the help of Ghostscript the following simple script, .BR groff2eps , produces an encapsulated PS file. . +. .RS .LP .nf .ft B #! /bin/sh -groff \-P\-b16 $1 >$1.ps -gs \-dNOPAUSE \-sDEVICE=bbox \-\- $1.ps 2>$1.bbox -cat $1.ps \[rs] -| sed \-e "/\[ha]%%Orientation/r$1.bbox" \[rs] - \-e "/\[ha]%!PS-Adobe-3.0/s/$/ EPSF-3.0/" >$1.eps +groff \-P\-b16 $1 > $1.ps +gs \-dNOPAUSE \-sDEVICE=bbox \-\- $1.ps 2> $1.bbox +sed \-e "/\[ha]%%Orientation/r $1.bbox" \[rs] + \-e "/\[ha]%!PS-Adobe-3.0/s/$/ EPSF-3.0/" $1.ps > $1.eps rm $1.ps $1.bbox .ft R .fi .RE . +. .LP Just say . @@ -1141,20 +1168,24 @@ .BR foo.eps . . . +.\" -------------------------------------------------------------------- .SS TrueType and other font formats +.\" -------------------------------------------------------------------- +. TrueType fonts can be used with .B grops if converted first to .B "Type\~42" -format, a special PostScript wrapper equivalent to the -PFA format mentioned in +format, a special PostScript wrapper equivalent to the PFA format +mentioned in .BR \%pfbtops (@MAN1EXT@). . -There are several different methods to generate a type42 -wrapper and most of them involve the use of a PostScript -interpreter such as Ghostscript \[en] see +There are several different methods to generate a type42 wrapper and +most of them involve the use of a PostScript interpreter such as +Ghostscript \[en] see .BR gs (1). . +. .LP Yet, the easiest method involves the use of the application .BR ttftot42 (1). @@ -1176,6 +1207,7 @@ ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ .UE . . +. .LP Another solution for creating type42 wrappers is to use FontForge, available from @@ -1185,7 +1217,9 @@ This font editor can convert most outline font formats. . . -.SH FONT INSTALLATION +.\" -------------------------------------------------------------------- +.SH "FONT INSTALLATION" +.\" -------------------------------------------------------------------- . This section gives a summary of the above explanations; it can serve as a step-by-step font installation guide for @@ -1199,8 +1233,8 @@ .LI Convert your font to something groff understands. . -This is either a PostScript Type\~1 font in PFA format or a -PostScript Type\~42 font, together with an AFM file. +This is either a PostScript Type\~1 font in PFA format or a PostScript +Type\~42 font, together with an AFM file. . .IP The very first characters in a PFA file look like this: @@ -1225,12 +1259,12 @@ .IP This is a wrapper format for TrueType fonts. . -Old PS printers might not support it (this is, they don't have a +Old PS printers might not support it (this is, they don\[aq]t have a built-in TrueType font interpreter). . .IP -If your font is in PFB format (such fonts normally have `.pfb' as -the file extension), you might use groff's +If your font is in PFB format (such fonts normally have \[oq].pfb\[cq] +as the file extension), you might use groff\[aq]s .BR \%pfbtops (@MAN1EXT@) program to convert it to PFA. . @@ -1255,8 +1289,8 @@ .RE . .IP -which converts the metric file `Foo-Bar-Bold.afm' to the groff -font `FBB'. +which converts the metric file \[oq]Foo-Bar-Bold.afm\[cq] to the groff +font \[oq]FBB\[cq]. . If you have a font family which comes with normal, bold, italic, and bold italic faces, it is recommended to use the letters @@ -1265,11 +1299,11 @@ .BR I , and .BR BI , -respectively, as postfixes in the groff font names to make groff's -`.fam' request work. +respectively, as postfixes in the groff font names to make groff\[aq]s +\[oq].fam\[cq] request work. . -An example is groff's built-in Times-Roman font: The font family name -is +An example is groff\[aq]s built-in Times-Roman font: The font family +name is .BR T , and the groff font names are .BR TR , @@ -1280,7 +1314,7 @@ . .LI Install both the groff font description files and the fonts in a -`devps' subdirectory of the font path which groff finds. +\[oq]devps\[cq] subdirectory of the font path which groff finds. . See the .B ENVIRONMENT @@ -1288,23 +1322,24 @@ .BR troff (@MAN1EXT@) man page which lists the actual value of the font path. . -Note that groff doesn't use the AFM files (but it is a good idea to -store them anyway). +Note that groff doesn\[aq]t use the AFM files (but it is a good idea +to store them anyway). . .LI Register all fonts which must be downloaded to the printer in the -`devps/download' file. +\[oq]devps/download\[cq] file. . Only the first occurrence of this file in the font path is read. . -This means that you should copy the default `download' file to the -first directory in your font path and add your fonts there. +This means that you should copy the default \[oq]download\[cq] file to +the first directory in your font path and add your fonts there. . To continue the above example we assume that the PS font name for -Foo-Bar-Bold.pfa is `XY-Foo-Bar-Bold' (the PS font name is stored in the +Foo-Bar-Bold.pfa is \[oq]XY-Foo-Bar-Bold\[cq] (the PS font name is +stored in the .B internalname -field in the `FBB' file), thus the following line should be added to -`download'. +field in the \[oq]FBB\[cq] file), thus the following line should be +added to \[cq]download\[cq]. . .RS .IP @@ -1313,11 +1348,13 @@ .RE . . +.\" -------------------------------------------------------------------- .SH OLD FONTS +.\" -------------------------------------------------------------------- . groff versions 1.19.2 and earlier contain a slightly different set of -the 35 Adobe core fonts; the difference is mainly the lack of the `Euro' -glyph and a reduced set of kerning pairs. +the 35 Adobe core fonts; the difference is mainly the lack of the +\[oq]Euro\[cq] glyph and a reduced set of kerning pairs. . For backwards compatibility, these old fonts are installed also in the . @@ -1327,6 +1364,7 @@ .LP directory. . +. .LP To use them, make sure that .B grops @@ -1340,13 +1378,15 @@ .B groff \-Tps \-P\-F \-P@OLDFONTDIR@ .\|.\|. . .LP -or add the directory to groff's font path environment variable +or add the directory to groff\[aq]s font path environment variable . .IP .B GROFF_FONT_PATH=@OLDFONTDIR@ . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- . .TP .SM @@ -1379,7 +1419,9 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .Tp \w'\fB@FONTDIR@/devps/download'u+2n .B @FONTDIR@/devps/DESC @@ -1416,7 +1458,7 @@ .TP .B @MACRODIR@/psold.tmac Macros to disable use of characters not present in older -PostScript printers (e.g., `eth' or `thorn'). +PostScript printers (e.g., \[oq]eth\[cq] or \[oq]thorn\[cq]). . .TP .BI /tmp/grops XXXXXX @@ -1426,7 +1468,9 @@ for details on the location of temporary files. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- . .BR \%afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), @@ -1437,12 +1481,19 @@ .BR \%groff_char (@MAN7EXT@), .BR \%groff_tmac (@MAN5EXT@) . +. .LP .UR http://\:partners.adobe.com/\:public/\:developer/\:en/\:ps/\:5001.DSC_Spec.pdf PostScript Language Document Structuring Conventions Specification .UE . . +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/devices/grops/Makefile.sub groff-1.22.3/src/devices/grops/Makefile.sub --- groff-1.22.2/src/devices/grops/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grops/Makefile.sub 2014-11-04 09:38:35.260523559 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `grops' +# +# File position: /src/devices/grops/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grops$(EXEEXT) MAN1=grops.n XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU) @@ -10,3 +34,11 @@ $(srcdir)/psrm.cpp HDRS=\ $(srcdir)/ps.h + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/grops/ps.cpp groff-1.22.3/src/devices/grops/ps.cpp --- groff-1.22.2/src/devices/grops/ps.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grops/ps.cpp 2014-11-04 09:38:35.260523559 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/devices/grops/ps.h groff-1.22.3/src/devices/grops/ps.h --- groff-1.22.2/src/devices/grops/ps.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grops/ps.h 2014-11-04 09:38:35.260523559 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -53,14 +52,16 @@ return fp; } +// this must stay in sync with `resource_table' in `psrm.cpp' enum resource_type { RESOURCE_FONT, + RESOURCE_FONTSET, RESOURCE_PROCSET, RESOURCE_FILE, RESOURCE_ENCODING, RESOURCE_FORM, RESOURCE_PATTERN - }; +}; struct resource; diff -ruN groff-1.22.2/src/devices/grops/psrm.cpp groff-1.22.3/src/devices/grops/psrm.cpp --- groff-1.22.2/src/devices/grops/psrm.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grops/psrm.cpp 2014-11-04 09:38:35.260523559 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -87,8 +85,10 @@ const int NEXTENSIONS = sizeof(extension_table)/sizeof(extension_table[0]); +// this must stay in sync with `resource_type' in `ps.h' const char *resource_table[] = { "font", + "fontset", "procset", "file", "encoding", @@ -566,7 +566,7 @@ int ri; for (ri = 0; ri < NRESOURCES; ri++) if (strlen(resource_table[ri]) == size_t(*ptr - name) - && memcmp(resource_table[ri], name, *ptr - name) == 0) + && strncasecmp(resource_table[ri], name, *ptr - name) == 0) break; if (ri >= NRESOURCES) { error("unknown resource type"); @@ -840,7 +840,7 @@ current_lineno++; } if (cc != EOF) - ungetc(c, fp); + ungetc(cc, fp); } else if (c == '\n') { linecount++; diff -ruN groff-1.22.2/src/devices/grotty/grotty.man groff-1.22.3/src/devices/grotty/grotty.man --- groff-1.22.2/src/devices/grotty/grotty.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grotty/grotty.man 2014-11-04 09:38:35.264523509 +0100 @@ -1,6 +1,12 @@ -.ig -Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 - Free Software Foundation, Inc. +.\" -*- nroff -*- +.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grotty \- groff driver for typewriter-like devices +. +. +.\" license +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -21,13 +27,11 @@ .do nr grotty_C \n[.C] .cp 0 . -.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -.SH NAME -grotty \- groff driver for typewriter-like devices -. . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B grotty [ .B \-bBcdfhioruUv @@ -42,18 +46,20 @@ option and its parameter. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . .B grotty translates the output of GNU .B troff into a form suitable for typewriter-like devices. +. Normally .B grotty should be invoked by using the .B groff -command -with a +command with a .BR \-Tascii , .B \-Tlatin1 or @@ -63,32 +69,40 @@ and .B \-Tutf8 on EBCDIC based hosts. +. If no files are given, .B grotty reads the standard input. +. A filename of .B \- also causes .B grotty to read the standard input. +. Output is written to the standard output. . +. .LP By default, .B grotty -emits SGR escape sequences (from ISO 6429, also called ANSI color escapes) -to change text attributes (bold, italic, colors). +emits SGR escape sequences (from ISO 6429, also called ANSI color +escapes) to change text attributes (bold, italic, colors). +. This makes it possible to have eight different background and -foreground colors; additionally, bold and italic -attributes can be used \f[BI]at the same time\f[] (by using the BI font). +foreground colors; additionally, bold and italic attributes can be +used \f[BI]at the same time\f[] (by using the BI font). +. . .LP The following colors are defined in .BR tty.tmac : black, white, red, green, blue, yellow, magenta, cyan. -Unknown colors are mapped to the default color (which is dependent on the -settings of the terminal; in most cases, this is black for the foreground -and white for the background). +. +Unknown colors are mapped to the default color (which is dependent on +the settings of the terminal; in most cases, this is black for the +foreground and white for the background). +. . .LP Use the @@ -105,10 +119,13 @@ .RB ` _ .SM BACKSPACE .IR c '. +. At the same time, color output is disabled. +. The same effect can be achieved by setting either the .B GROFF_NO_SGR -environment variable or using the `sgr' X command (see below). +environment variable or using the \[oq]sgr\[cq] X command (see below). +. . .LP For SGR support, it is necessary to use the @@ -116,11 +133,13 @@ option of .BR less (1) to disable the interpretation of -.BR grotty 's +.BR grotty \[aq]s old output format. +. Consequently, all programs which use .B less as the pager program have to pass this option to it. +. For .BR man (1) in particular, either add @@ -131,7 +150,7 @@ . .RS .LP -.B PAGER="/usr/bin/less -R" +.B PAGER="/usr/bin/less \-R" .br .B export PAGER .RE @@ -141,18 +160,20 @@ .B \-P option of .B man -to set the pager executable and its options, or modify the configuration -file of +to set the pager executable and its options, or modify the +configuration file of .B man in a similar fashion. +. Note that with some .BR man (1) versions, you have to use the .B $MANPAGER environment variable instead. . +. .LP -.BR grotty 's +.BR grotty \[aq]s old output format can be displayed on a terminal by piping through .BR ul (1). @@ -177,6 +198,7 @@ .B grotty never outputs reverse line feeds. . +. .LP The font description file may contain a command . @@ -187,19 +209,23 @@ where .I n is a decimal integer. +. If the 01 bit in .I n is set, then the font is treated as an italic font; if the 02 bit is set, then it is treated as a bold font. -The code field in the font description field gives the -code which is used to output the character. +. +The code field in the font description field gives the code which is +used to output the character. +. This code can also be used in the .B \[rs]N escape sequence in .BR troff . . +. .LP If the .B DESC @@ -207,33 +233,38 @@ .BR unicode , .B grotty emits Unicode characters in UTF-8 encoding. -Otherwise, it emits characters in a single-byte encoding depending -on the data in the font description files. +. +Otherwise, it emits characters in a single-byte encoding depending on +the data in the font description files. +. See the .BR groff_font (@MAN5EXT@) man page for more details. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . .TP .B \-b Suppress the use of overstriking for bold characters. +. Ignored if .B \-c -isn't used. +isn\[aq]t used. . .TP .B \-B Use only overstriking for bold-italic characters. Ignored if .B \-c -isn't used. +isn\[aq]t used. . .TP .B \-c Use -.BR grotty 's +.BR grotty \[aq]s old output format (see above). This also disables color output. . @@ -242,6 +273,7 @@ Ignore all .B \[rs]D commands. +. Without this .B grotty renders @@ -254,6 +286,7 @@ and .B + characters. +. In a similar way, .B grotty handles @@ -264,8 +297,9 @@ .TP .B \-f Use form feeds in the output. -A form feed is output at the end of each page that has no output -on its last line. +. +A form feed is output at the end of each page that has no output on +its last line. . .TP .BI \-F dir @@ -283,13 +317,16 @@ .TP .B \-h Use horizontal tabs in the output. +. Tabs are assumed to be set every 8 columns. . .TP .B \-i Use escape sequences to set the italic text attribute instead of the -underline attribute for italic fonts (`I' and `BI'). -Note that most terminals (including xterm) don't support this. +underline attribute for italic fonts (\[oq]I\[cq] and \[oq]BI\[cq]). +. +Note that most terminals (including xterm) don\[aq]t support this. +. Ignored if .B \-c is active. @@ -303,7 +340,8 @@ .TP .B \-r Use escape sequences to set the reverse text attribute instead of the -underline attribute for italic fonts (`I' and `BI'). +underline attribute for italic fonts (\[oq]I\[cq] and \[oq]BI\[cq]). +. Ignored if .B \-c is active. @@ -311,23 +349,27 @@ .TP .B \-u Suppress the use of underlining for italic characters. +. Ignored if .B \-c -isn't used. +isn\[aq]t used. . .TP .B \-U Use only underlining for bold-italic characters. +. Ignored if .B \-c -isn't used. +isn\[aq]t used. . .TP .B \-v Print the version number. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . .B grotty understands a single X command produced using the @@ -336,19 +378,23 @@ . .TP .BI \[rs]X'tty:\ sgr\ n ' +. If .I n -is non-zero or missing, enable SGR output (this is the default), otherwise -use the old drawing scheme for bold and underline. +is non-zero or missing, enable SGR output (this is the default), +otherwise use the old drawing scheme for bold and underline. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- . .TP .SM .B GROFF_NO_SGR If set, the old drawing scheme for bold and underline (using the backspace character) is active. +. Colors are disabled. . . @@ -366,7 +412,9 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .TP .B @FONTDIR@/devascii/DESC @@ -431,7 +479,7 @@ . .TP .B @MACRODIR@/tty-char.tmac -Additional klugdey character definitions for use with +Additional kludgy character definitions for use with .BR grotty . . .LP @@ -440,37 +488,42 @@ device is installed. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- . -.LP .B grotty is intended only for simple documents. . +. .LP There is no support for fractional horizontal or vertical motions. . +. .LP There is no support for .B \[rs]D -commands -other than horizontal and vertical lines. +commands other than horizontal and vertical lines. +. . .LP -Characters above the first line (ie with a vertical position of\~0) -cannot be printed. +Characters above the first line (i.e.\& with a vertical position +of\~0) cannot be printed. +. . .LP Color handling is different compared to .BR grops (@MAN1EXT@). .B \[rs]M -doesn't set the fill color for closed graphic objects (which +doesn\[aq]t set the fill color for closed graphic objects (which .B grotty -doesn't support anyway) but changes the background color of the character -cell, affecting all subsequent operations. +doesn\[aq]t support anyway) but changes the background color of the +character cell, affecting all subsequent operations. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -. +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR groff_out (@MAN5EXT@), @@ -481,8 +534,11 @@ .BR man (1), .BR less (1) . -.cp \n[grotty_C] . -.\" Local Variables: -.\" mode: nroff -.\" End: +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. +.cp \n[grotty_C] diff -ruN groff-1.22.2/src/devices/grotty/Makefile.sub groff-1.22.3/src/devices/grotty/Makefile.sub --- groff-1.22.2/src/devices/grotty/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grotty/Makefile.sub 2014-11-04 09:38:35.265523497 +0100 @@ -1,6 +1,38 @@ +# Makefile.sub for `grotty' +# +# File position: /src/devices/grotty/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grotty$(EXEEXT) MAN1=grotty.n XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU) MLIB=$(LIBM) OBJS=tty.$(OBJEXT) CCSRCS=$(srcdir)/tty.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/devices/grotty/tty.cpp groff-1.22.3/src/devices/grotty/tty.cpp --- groff-1.22.2/src/devices/grotty/tty.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/grotty/tty.cpp 2014-11-04 09:38:35.265523497 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009-2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/devices/xditview/gxditview.man groff-1.22.3/src/devices/xditview/gxditview.man --- groff-1.22.2/src/devices/xditview/gxditview.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/xditview/gxditview.man 2014-11-04 09:38:35.326522734 +0100 @@ -1,20 +1,50 @@ .TH GXDITVIEW @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. .SH NAME gxditview \- display groff intermediate output files . . +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989, Massachusetts Institute of Technology. +.br +See +.BR X (7) +for a full statement of rights and permissions. +.. +. +.de au +Keith Packard (MIT X Consortium) +.br +Richard L.\& Hyde (Purdue) +.br +David Slattengren (Berkeley) +.br +Malcolm Slaney (Schlumberger Palo Alto Research) +.br +Mark Moraes (University of Toronto) +.br +James Clark +.. +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B \%gxditview .RI [\fB\- toolkitoption\ .\|.\|.\|] .RI [\fB\- option\ .\|.\|.\|] .RI [ filename ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. The -.B \%gxditview +.B \%gxditview program displays the .I groff intermediate .IR output , @@ -34,9 +64,10 @@ .I groff intermediate output can be generated by .BR groff\~\-Z . -This can be viewed by explicity calling +This can be viewed by explicitly calling .B \%gxditview .IR \%filename . +. If .I filename is @@ -74,6 +105,7 @@ . They are especially built for .BR \%gxditview . +. When using one of them .B groff generates the @@ -87,6 +119,7 @@ .IP .B groff \-TX100\-12 \-man \-rS12 gxditview.@MAN1EXT@ . +. .PP (option .BI \-rS XX @@ -94,6 +127,7 @@ .BR groff_man (@MAN7EXT@) man page). . +. .PP .BR groff 's option @@ -112,11 +146,11 @@ .IP .BI "groff \-X \-P\-resolution \-P100 " document . +. .PP yields acceptable results. . . -. .PP During the run of .BR \%gxditview , @@ -153,6 +187,7 @@ The file should contain some .I groff intermediate .IR output . +. If the filename starts with .B | it will be taken to be a command to read from. @@ -243,7 +278,10 @@ .BR \%gxditview . . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. The .B \%gxditview program accepts all of the standard X\~Toolkit command line options @@ -265,11 +303,12 @@ window can take up to a second or so, this option causes the server to save the window contents so that when it is scrolled around the viewport, the window is painted from contents saved in backing store. +. .I backing-store-type can be one of .BR Always , .B WhenMapped -or +or .BR NotUseful . . .TP @@ -308,13 +347,13 @@ . . .PP -The following standard X\~Toolkit command line arguments are commonly used -with +The following standard X\~Toolkit command line arguments are commonly +used with .BR \%gxditview : . .TP 8 .BI \-bg\ color -This option specifies the color to use for the background of the window. +This option specifies the color to use for the background of the window. . The default is \fIwhite\fP. . @@ -333,7 +372,7 @@ .BI \-fg\ color This option specifies the color to use for displaying text. . -The default is +The default is \fIblack\fP. . .TP @@ -360,8 +399,11 @@ This option specifies a resource string to be used. . . +.\" -------------------------------------------------------------------- .SH X DEFAULTS -This program uses the +.\" -------------------------------------------------------------------- +. +This program uses the .I Dvi widget in the X\~Toolkit. . @@ -420,7 +462,10 @@ .fi . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .SM .B GROFF_FONT_PATH @@ -435,13 +480,17 @@ for more details. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP .B @APPRESDIR@/GXditview .TQ .B @APPRESDIR@/GXditview-color The default resource files of .BR \%gxditview . +. Users should override these values in the .B .Xdefaults file, normally located in the user's home directory. @@ -453,7 +502,10 @@ for more. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR X (7), .BR xrdb (1), .BR xditview (1), @@ -461,7 +513,10 @@ .BR groff_out (@MAN5EXT@) . . +.\" -------------------------------------------------------------------- .SH ORIGIN +.\" -------------------------------------------------------------------- +. This program is derived from .BR \%xditview ; portions of @@ -472,26 +527,15 @@ .BR \%suntroff . . . +.\" -------------------------------------------------------------------- .SH COPYRIGHT -Copyright 1989, Massachusetts Institute of Technology. -.br -See -.BR X (7) -for a full statement of rights and permissions. -. -. +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- .SH AUTHORS -Keith Packard (MIT X Consortium) -.br -Richard L. Hyde (Purdue) -.br -David Slattengren (Berkeley) -.br -Malcolm Slaney (Schlumberger Palo Alto Research) -.br -Mark Moraes (University of Toronto) -.br -James Clark +.\" -------------------------------------------------------------------- +.au +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/src/devices/xditview/Makefile.sub groff-1.22.3/src/devices/xditview/Makefile.sub --- groff-1.22.2/src/devices/xditview/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/devices/xditview/Makefile.sub 2014-11-04 09:38:35.326522734 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `xditview' +# +# File position: /src/devices/xditview/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=gxditview$(EXEEXT) MAN1=gxditview.n MLIB=$(LIBM) @@ -28,13 +52,13 @@ $(srcdir)/DviP.h \ $(srcdir)/Menu.h GENHDRS=GXditview-ad.h +RM=rm -f all depend: $(GENHDRS) GXditview-ad.h: $(srcdir)/GXditview.ad @echo Making $@ - @-rm -f $@ - $(SHELL) $(srcdir)/ad2c $(srcdir)/GXditview.ad >GXditview-ad.h + $(SHELL) $(srcdir)/ad2c $(srcdir)/GXditview.ad > $@ install_data: $(srcdir)/GXditview.ad $(srcdir)/GXditview-color.ad -test -d $(DESTDIR)$(appresdir) \ @@ -53,5 +77,13 @@ $(DESTDIR)$(appresdir)/GXditview-color uninstall_sub: - -rm -f $(DESTDIR)$(appresdir)/GXditview - -rm -f $(DESTDIR)$(appresdir)/GXditview-color + $(RM) $(DESTDIR)$(appresdir)/GXditview + $(RM) $(DESTDIR)$(appresdir)/GXditview-color + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/include/assert.h groff-1.22.3/src/include/assert.h --- groff-1.22.2/src/include/assert.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/assert.h 2014-11-04 09:38:35.159524822 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/cmap.h groff-1.22.3/src/include/cmap.h --- groff-1.22.2/src/include/cmap.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/cmap.h 2014-11-04 09:38:35.159524822 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/color.h groff-1.22.3/src/include/color.h --- groff-1.22.2/src/include/color.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/color.h 2014-11-04 09:38:35.159524822 +0100 @@ -1,10 +1,6 @@ // -*- C++ -*- - /* /src/include/color.h - -Last update: 5 Jan 2009 - -Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Gaius Mulley This file is part of groff. diff -ruN groff-1.22.2/src/include/cset.h groff-1.22.3/src/include/cset.h --- groff-1.22.2/src/include/cset.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/cset.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/device.h groff-1.22.3/src/include/device.h --- groff-1.22.2/src/include/device.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/device.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/driver.h groff-1.22.3/src/include/driver.h --- groff-1.22.2/src/include/driver.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/driver.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/DviChar.h groff-1.22.3/src/include/DviChar.h --- groff-1.22.2/src/include/DviChar.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/DviChar.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,3 +1,21 @@ +/* -*- C -*- */ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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 can find the license text at +. */ + /* * DviChar.h * diff -ruN groff-1.22.2/src/include/errarg.h groff-1.22.3/src/include/errarg.h --- groff-1.22.2/src/include/errarg.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/errarg.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/error.h groff-1.22.3/src/include/error.h --- groff-1.22.2/src/include/error.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/error.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/font.h groff-1.22.3/src/include/font.h --- groff-1.22.2/src/include/font.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/font.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2006, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/geometry.h groff-1.22.3/src/include/geometry.h --- groff-1.22.2/src/include/geometry.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/geometry.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Gaius Mulley This file is part of groff. diff -ruN groff-1.22.2/src/include/getopt.h groff-1.22.3/src/include/getopt.h --- groff-1.22.2/src/include/getopt.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/getopt.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,6 @@ /* Declarations for getopt. - Copyright (C) 1989-1994,1996-1999,2001,2003,2004 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/include/getopt_int.h groff-1.22.3/src/include/getopt_int.h --- groff-1.22.2/src/include/getopt_int.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/getopt_int.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,6 @@ /* Internal declarations for getopt. - Copyright (C) 1989-1994,1996-1999,2001,2003,2004 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/include/gettext.h groff-1.22.3/src/include/gettext.h --- groff-1.22.2/src/include/gettext.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/gettext.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,3 +1,21 @@ +/* -*- C -*- */ +/* Copyright (C) 2014 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 is a dummy header file to make getopt compile without gettext support. */ diff -ruN groff-1.22.2/src/include/htmlhint.h groff-1.22.3/src/include/htmlhint.h --- groff-1.22.2/src/include/htmlhint.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/htmlhint.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Gaius Mulley This file is part of groff. diff -ruN groff-1.22.2/src/include/html-strings.h groff-1.22.3/src/include/html-strings.h --- groff-1.22.2/src/include/html-strings.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/html-strings.h 2014-11-04 09:38:35.160524810 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2001, 2002, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff -ruN groff-1.22.2/src/include/index.h groff-1.22.3/src/include/index.h --- groff-1.22.2/src/include/index.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/index.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/itable.h groff-1.22.3/src/include/itable.h --- groff-1.22.2/src/include/itable.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/itable.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/lib.h groff-1.22.3/src/include/lib.h --- groff-1.22.2/src/include/lib.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/lib.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/localcharset.h groff-1.22.3/src/include/localcharset.h --- groff-1.22.2/src/include/localcharset.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/localcharset.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2014 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/include/macropath.h groff-1.22.3/src/include/macropath.h --- groff-1.22.2/src/include/macropath.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/macropath.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/Makefile.sub groff-1.22.3/src/include/Makefile.sub --- groff-1.22.2/src/include/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/Makefile.sub 2014-11-04 09:38:35.161524797 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `include' +# +# File position: /src/include/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + HDRS=\ assert.h \ cmap.h \ @@ -48,3 +72,11 @@ "DEFAULT_INDEX=\"$(indexdir)/$(indexname)\"" FORCE: + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/include/nonposix.h groff-1.22.3/src/include/nonposix.h --- groff-1.22.2/src/include/nonposix.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/nonposix.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,5 +1,5 @@ -/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* -*- C -*- */ +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Eli Zaretskii (eliz@is.elta.co.il) This file is part of groff. diff -ruN groff-1.22.2/src/include/paper.h groff-1.22.3/src/include/paper.h --- groff-1.22.2/src/include/paper.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/paper.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/include/posix.h groff-1.22.3/src/include/posix.h --- groff-1.22.2/src/include/posix.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/posix.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1992, 2000, 2001, 2002, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/printer.h groff-1.22.3/src/include/printer.h --- groff-1.22.2/src/include/printer.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/printer.h 2014-11-04 09:38:35.161524797 +0100 @@ -2,14 +2,10 @@ // /src/include/printer.h -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2006, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) - Last update: 5 Jan 2009 - This file is part of groff. groff is free software; you can redistribute it and/or modify it diff -ruN groff-1.22.2/src/include/ptable.h groff-1.22.3/src/include/ptable.h --- groff-1.22.2/src/include/ptable.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/ptable.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/refid.h groff-1.22.3/src/include/refid.h --- groff-1.22.2/src/include/refid.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/refid.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/relocate.h groff-1.22.3/src/include/relocate.h --- groff-1.22.2/src/include/relocate.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/relocate.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,5 +1,7 @@ +/* -*- C -*- */ /* Provide relocation for macro and font files. - Copyright (C) 2005-2006, 2009 Free Software Foundation, Inc. + + Copyright (C) 2005-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published diff -ruN groff-1.22.2/src/include/search.h groff-1.22.3/src/include/search.h --- groff-1.22.2/src/include/search.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/search.h 2014-11-04 09:38:35.161524797 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/searchpath.h groff-1.22.3/src/include/searchpath.h --- groff-1.22.2/src/include/searchpath.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/searchpath.h 2014-11-04 09:38:35.162524785 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/stringclass.h groff-1.22.3/src/include/stringclass.h --- groff-1.22.2/src/include/stringclass.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/stringclass.h 2014-11-04 09:38:35.162524785 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/symbol.h groff-1.22.3/src/include/symbol.h --- groff-1.22.2/src/include/symbol.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/symbol.h 2014-11-04 09:38:35.162524785 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/include/unicode.h groff-1.22.3/src/include/unicode.h --- groff-1.22.2/src/include/unicode.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/include/unicode.h 2014-11-04 09:38:35.162524785 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg This file is part of groff. diff -ruN groff-1.22.2/src/libs/gnulib/aclocal.m4 groff-1.22.3/src/libs/gnulib/aclocal.m4 --- groff-1.22.2/src/libs/gnulib/aclocal.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/aclocal.m4 2014-11-04 09:38:35.674518384 +0100 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.12.5 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, @@ -19,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.12' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.12.5], [], +m4_if([$1], [1.14], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.12.5])dnl +[AM_AUTOMAKE_VERSION([1.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +111,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +142,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +333,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -343,7 +344,7 @@ # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -372,7 +373,7 @@ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -408,7 +409,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -417,6 +418,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -429,7 +436,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -459,8 +466,7 @@ dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) + [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], @@ -514,22 +520,60 @@ [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -537,7 +581,6 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -559,7 +602,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -580,7 +623,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -601,7 +644,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -649,41 +692,9 @@ rm -f confinc confmf ]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. -# -# 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. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -698,8 +709,8 @@ # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -712,8 +723,8 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) @@ -722,7 +733,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -751,9 +762,73 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# 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. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -834,7 +909,67 @@ rm -f conftest.file ]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# 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. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -862,7 +997,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -881,7 +1016,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -900,76 +1035,114 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/compile groff-1.22.3/src/libs/gnulib/build-aux/compile --- groff-1.22.2/src/libs/gnulib/build-aux/compile 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/compile 2014-11-04 09:38:35.646518734 +0100 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/config.guess groff-1.22.3/src/libs/gnulib/build-aux/config.guess --- groff-1.22.2/src/libs/gnulib/build-aux/config.guess 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/config.guess 2014-11-04 09:38:35.646518734 +0100 @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2012-09-25' +timestamp='2014-03-23' # 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 +# 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 @@ -22,19 +20,17 @@ # 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. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -138,6 +132,27 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -811,7 +826,7 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -859,21 +874,21 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -886,59 +901,54 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -957,54 +967,63 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1237,19 +1256,31 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1340,154 +1371,6 @@ exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. @@ -26,11 +20,12 @@ # 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. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ 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 -Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -259,12 +252,12 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc \ + | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -272,6 +265,7 @@ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -289,23 +283,26 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | 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 \ @@ -330,7 +327,10 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -372,13 +372,13 @@ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -387,6 +387,7 @@ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -406,18 +407,22 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -772,6 +777,9 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -799,7 +807,7 @@ os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -827,6 +835,10 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -835,7 +847,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1026,7 +1038,11 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1353,7 +1369,7 @@ -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* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1368,14 +1384,14 @@ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -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*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1499,9 +1515,6 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1550,6 +1563,9 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/depcomp groff-1.22.3/src/libs/gnulib/build-aux/depcomp --- groff-1.22.2/src/libs/gnulib/build-aux/depcomp 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/depcomp 2014-11-04 09:38:35.646518734 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-07-12.20; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # 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 @@ -27,9 +27,9 @@ case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -56,11 +56,65 @@ ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -88,32 +142,32 @@ fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -136,8 +190,7 @@ done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -163,15 +216,14 @@ fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. @@ -180,15 +232,15 @@ ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -199,47 +251,6 @@ exit 1 ;; -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, @@ -253,9 +264,8 @@ # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -268,9 +278,7 @@ "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -279,65 +287,37 @@ do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" + aix_post_process_depfile ;; -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -356,34 +336,37 @@ # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= + set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. - base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'` - tmpdepfile="$base.d" + set_base_from "$source" + tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. - lockdir="$base.d-lock" - trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15 + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 numtries=100 i=$numtries - while test $i -gt 0 ; do + while test $i -gt 0; do # mkdir is a portable test-and-set. - if mkdir $lockdir 2>/dev/null; then + if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. - rm -rf $lockdir + rmdir "$lockdir" break else - ## the lock is being held by a different process, - ## wait until the winning process is done or we timeout - while test -d $lockdir && test $i -gt 0; do + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done @@ -409,8 +392,8 @@ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -421,9 +404,8 @@ # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -434,8 +416,7 @@ "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -445,76 +426,61 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -525,8 +491,7 @@ "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -552,6 +517,7 @@ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -603,13 +569,14 @@ # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -662,10 +629,12 @@ # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -701,10 +670,10 @@ esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -736,15 +705,15 @@ shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/install-sh groff-1.22.3/src/libs/gnulib/build-aux/install-sh --- groff-1.22.2/src/libs/gnulib/build-aux/install-sh 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/install-sh 2014-11-04 09:38:35.646518734 +0100 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/missing groff-1.22.3/src/libs/gnulib/build-aux/missing --- groff-1.22.2/src/libs/gnulib/build-aux/missing 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/missing 2014-11-04 09:38:35.646518734 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2012-01-06.18; # UTC +scriptversion=2014-09-17.17; # UTC -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/snippet/arg-nonnull.h groff-1.22.3/src/libs/gnulib/build-aux/snippet/arg-nonnull.h --- groff-1.22.2/src/libs/gnulib/build-aux/snippet/arg-nonnull.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/snippet/arg-nonnull.h 2014-11-04 09:38:35.650518684 +0100 @@ -1,17 +1,17 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. 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 + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/snippet/c++defs.h groff-1.22.3/src/libs/gnulib/build-aux/snippet/c++defs.h --- groff-1.22.2/src/libs/gnulib/build-aux/snippet/c++defs.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/snippet/c++defs.h 2014-11-04 09:38:35.650518684 +0100 @@ -1,17 +1,17 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. 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 + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H diff -ruN groff-1.22.2/src/libs/gnulib/build-aux/snippet/warn-on-use.h groff-1.22.3/src/libs/gnulib/build-aux/snippet/warn-on-use.h --- groff-1.22.2/src/libs/gnulib/build-aux/snippet/warn-on-use.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/build-aux/snippet/warn-on-use.h 2014-11-04 09:38:35.651518671 +0100 @@ -1,17 +1,17 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. 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 + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration diff -ruN groff-1.22.2/src/libs/gnulib/config.h.in groff-1.22.3/src/libs/gnulib/config.h.in --- groff-1.22.2/src/libs/gnulib/config.h.in 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/config.h.in 2014-11-04 09:38:35.675518371 +0100 @@ -258,9 +258,6 @@ /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE @@ -312,11 +309,6 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifdef __hpux -# define _XOPEN_SOURCE 500 -#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -325,6 +317,12 @@ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ diff -ruN groff-1.22.2/src/libs/gnulib/configure groff-1.22.3/src/libs/gnulib/configure --- groff-1.22.2/src/libs/gnulib/configure 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/configure 2014-11-04 09:38:35.676518359 +0100 @@ -804,6 +804,7 @@ HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT pkglibexecdir +runstatedir lispdir GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE @@ -838,6 +839,10 @@ LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -902,6 +907,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking ' ac_precious_vars='build_alias @@ -1531,6 +1537,8 @@ --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] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -2646,7 +2654,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.12' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2830,8 +2838,8 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 @@ -3071,6 +3079,45 @@ fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3133,6 +3180,10 @@ # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3140,6 +3191,48 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + ac_config_headers="$ac_config_headers config.h" @@ -3931,6 +4024,65 @@ 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 whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +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 + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4738,131 +4890,6 @@ -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { 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; } && - test -f conftest2.$ac_objext && { { 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 - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { 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; } && - test -f conftest2.$ac_objext && { { 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 - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; 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 NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 @@ -5059,6 +5086,54 @@ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if ${ac_cv_should_define__xopen_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_should_define__xopen_source=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_should_define__xopen_source=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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +$as_echo "$ac_cv_should_define__xopen_source" >&6; } + test $ac_cv_should_define__xopen_source = yes && + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + @@ -7075,6 +7150,10 @@ localedir='${datarootdir}/locale' fi + if test "x$runstatedir" = x; then + runstatedir='${localstatedir}/run' + + fi pkglibexecdir='${libexecdir}/${PACKAGE}' @@ -9629,7 +9708,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -9680,7 +9759,7 @@ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the diff -ruN groff-1.22.2/src/libs/gnulib/configure.ac groff-1.22.3/src/libs/gnulib/configure.ac --- groff-1.22.2/src/libs/gnulib/configure.ac 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/configure.ac 2014-11-04 09:38:35.676518359 +0100 @@ -1,4 +1,21 @@ # Process this file with autoconf to produce a configure script. +# +# Copyright (C) 1989-2014 Free Software Foundation, Inc. +# +# This file is part of groff. +# +# groff is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License. +# +# 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 can find the license text of GPL2 in the internet at +# . + AC_INIT([dummy], [0]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE diff -ruN groff-1.22.2/src/libs/gnulib/lib/config.charset groff-1.22.3/src/libs/gnulib/lib/config.charset --- groff-1.22.2/src/libs/gnulib/lib/config.charset 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/config.charset 2014-11-04 09:38:35.629518946 +0100 @@ -1,11 +1,11 @@ #! /bin/sh # Output a system dependent table of character encoding aliases. # -# Copyright (C) 2000-2004, 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2000-2004, 2006-2014 Free Software Foundation, Inc. # # 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, or (at your option) +# the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/intprops.h groff-1.22.3/src/libs/gnulib/lib/intprops.h --- groff-1.22.2/src/libs/gnulib/lib/intprops.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/intprops.h 2014-11-04 09:38:35.629518946 +0100 @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2005, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2005, 2009-2014 Free Software Foundation, Inc. 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 @@ -89,7 +89,8 @@ /* Return 1 if the __typeof__ keyword works. This could be done by 'configure', but for now it's easier to do it by hand. */ -#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C +#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) # define _GL_HAVE___TYPEOF__ 1 #else # define _GL_HAVE___TYPEOF__ 0 diff -ruN groff-1.22.2/src/libs/gnulib/lib/inttypes.in.h groff-1.22.3/src/libs/gnulib/lib/inttypes.in.h --- groff-1.22.2/src/libs/gnulib/lib/inttypes.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/inttypes.in.h 2014-11-04 09:38:35.629518946 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2013 Free Software Foundation, Inc. +/* Copyright (C) 2006-2014 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. diff -ruN groff-1.22.2/src/libs/gnulib/lib/localcharset.c groff-1.22.3/src/libs/gnulib/lib/localcharset.c --- groff-1.22.2/src/libs/gnulib/lib/localcharset.c 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/localcharset.c 2014-11-04 09:38:35.629518946 +0100 @@ -1,10 +1,10 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2014 Free Software Foundation, Inc. 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, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -34,6 +34,7 @@ #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE +# include #endif #if defined __EMX__ @@ -65,6 +66,11 @@ # include #endif +/* For MB_CUR_MAX_L */ +#if defined DARWIN7 +# include +#endif + #if ENABLE_RELOCATABLE # include "relocatable.h" #else @@ -456,14 +462,34 @@ static char buf[2 + 10 + 1]; - /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); + /* The Windows API has a function returning the locale's codepage as + a number, but the value doesn't change according to what the + 'setlocale' call specified. So we use it as a last resort, in + case the string returned by 'setlocale' doesn't specify the + codepage. */ + char *current_locale = setlocale (LC_ALL, NULL); + char *pdot; + + /* If they set different locales for different categories, + 'setlocale' will return a semi-colon separated list of locale + values. To make sure we use the correct one, we choose LC_CTYPE. */ + if (strchr (current_locale, ';')) + current_locale = setlocale (LC_CTYPE, NULL); + + pdot = strrchr (current_locale, '.'); + if (pdot) + sprintf (buf, "CP%s", pdot + 1); + else + { + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. + But in GUI programs and for output sent to files and pipes, GetACP() + encoding is the best bet. */ + sprintf (buf, "CP%u", GetACP ()); + } codeset = buf; #elif defined OS2 @@ -545,7 +571,7 @@ #ifdef DARWIN7 /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" (the default codeset) does not work when MB_CUR_MAX is 1. */ - if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1) + if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) codeset = "ASCII"; #endif diff -ruN groff-1.22.2/src/libs/gnulib/lib/localcharset.h groff-1.22.3/src/libs/gnulib/lib/localcharset.h --- groff-1.22.2/src/libs/gnulib/lib/localcharset.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/localcharset.h 2014-11-04 09:38:35.629518946 +0100 @@ -1,10 +1,10 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2014 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/Makefile.am groff-1.22.3/src/libs/gnulib/lib/Makefile.am --- groff-1.22.2/src/libs/gnulib/lib/Makefile.am 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am 2014-11-04 09:38:35.629518946 +0100 @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # 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 diff -ruN groff-1.22.2/src/libs/gnulib/lib/Makefile.in groff-1.22.3/src/libs/gnulib/lib/Makefile.in --- groff-1.22.2/src/libs/gnulib/lib/Makefile.in 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/Makefile.in 2014-11-04 09:38:35.629518946 +0100 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.5 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # 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 @@ -40,23 +40,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,8 +104,8 @@ host_triplet = @host@ @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_1 = uniwidth/width.c subdir = lib -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/build-aux/depcomp +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ @@ -101,6 +129,10 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__libgnu_a_SOURCES_DIST = localcharset.h localcharset.c \ @@ -111,23 +143,44 @@ wctype-h.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(am__libgnu_a_SOURCES_DIST) $(EXTRA_libgnu_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -136,9 +189,29 @@ HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -171,6 +244,7 @@ pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ @@ -430,6 +504,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -530,10 +605,11 @@ @: > uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) + libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES) - -rm -f libgnu.a - $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) - $(RANLIB) libgnu.a + $(AM_V_at)-rm -f libgnu.a + $(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) + $(AM_V_at)$(RANLIB) libgnu.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -559,20 +635,20 @@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -580,14 +656,13 @@ # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -608,31 +683,13 @@ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -648,12 +705,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -665,15 +717,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -682,9 +730,10 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -870,14 +919,12 @@ uninstall-am: uninstall-local -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - cscopelist-recursive ctags-recursive install install-am \ - install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am clean clean-generic \ - clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist \ - cscopelist-recursive ctags ctags-recursive distclean \ +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-am clean clean-generic clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ @@ -887,8 +934,8 @@ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-local + mostlyclean-local pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-local # Listed in the same order as the GNU makefile conventions, and diff -ruN groff-1.22.2/src/libs/gnulib/lib/ref-add.sin groff-1.22.3/src/libs/gnulib/lib/ref-add.sin --- groff-1.22.2/src/libs/gnulib/lib/ref-add.sin 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/ref-add.sin 2014-11-04 09:38:35.630518934 +0100 @@ -1,10 +1,10 @@ # Add this package to a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. # # 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, or (at your option) +# the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/ref-del.sin groff-1.22.3/src/libs/gnulib/lib/ref-del.sin --- groff-1.22.2/src/libs/gnulib/lib/ref-del.sin 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/ref-del.sin 2014-11-04 09:38:35.630518934 +0100 @@ -1,10 +1,10 @@ # Remove this package from a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. # # 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, or (at your option) +# the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/stdbool.in.h groff-1.22.3/src/libs/gnulib/lib/stdbool.in.h --- groff-1.22.2/src/libs/gnulib/lib/stdbool.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/stdbool.in.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/gnulib/lib/stddef.in.h groff-1.22.3/src/libs/gnulib/lib/stddef.in.h --- groff-1.22.2/src/libs/gnulib/lib/stddef.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/stddef.in.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,10 +1,10 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. 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, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/stdint.in.h groff-1.22.3/src/libs/gnulib/lib/stdint.in.h --- groff-1.22.2/src/libs/gnulib/lib/stdint.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/stdint.in.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. diff -ruN groff-1.22.2/src/libs/gnulib/lib/streq.h groff-1.22.3/src/libs/gnulib/lib/streq.h --- groff-1.22.2/src/libs/gnulib/lib/streq.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/streq.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,17 +1,17 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* Written by Bruno Haible . */ diff -ruN groff-1.22.2/src/libs/gnulib/lib/unitypes.in.h groff-1.22.3/src/libs/gnulib/lib/unitypes.in.h --- groff-1.22.2/src/libs/gnulib/lib/unitypes.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/unitypes.in.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,17 +1,17 @@ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H diff -ruN groff-1.22.2/src/libs/gnulib/lib/uniwidth/cjk.h groff-1.22.3/src/libs/gnulib/lib/uniwidth/cjk.h --- groff-1.22.2/src/libs/gnulib/lib/uniwidth/cjk.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/uniwidth/cjk.h 2014-11-04 09:38:35.635518871 +0100 @@ -1,18 +1,18 @@ /* Test for CJK encoding. - Copyright (C) 2001-2002, 2005-2007, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2007, 2009-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "streq.h" diff -ruN groff-1.22.2/src/libs/gnulib/lib/uniwidth/width.c groff-1.22.3/src/libs/gnulib/lib/uniwidth/width.c --- groff-1.22.2/src/libs/gnulib/lib/uniwidth/width.c 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/uniwidth/width.c 2014-11-04 09:38:35.635518871 +0100 @@ -1,18 +1,18 @@ /* Determine display width of Unicode character. - Copyright (C) 2001-2002, 2006-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2006-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include diff -ruN groff-1.22.2/src/libs/gnulib/lib/uniwidth.in.h groff-1.22.3/src/libs/gnulib/lib/uniwidth.in.h --- groff-1.22.2/src/libs/gnulib/lib/uniwidth.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/uniwidth.in.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,18 +1,18 @@ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2013 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published + under the terms of the GNU Lesser 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. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNIWIDTH_H diff -ruN groff-1.22.2/src/libs/gnulib/lib/verify.h groff-1.22.3/src/libs/gnulib/lib/verify.h --- groff-1.22.2/src/libs/gnulib/lib/verify.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/verify.h 2014-11-04 09:38:35.630518934 +0100 @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. 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 @@ -18,7 +18,7 @@ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_VERIFY_H -# define _GL_VERIFY_H +#define _GL_VERIFY_H /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. @@ -31,14 +31,24 @@ Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ -# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus -# define _GL_HAVE__STATIC_ASSERT 1 -# endif +#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) +# define _GL_HAVE__STATIC_ASSERT 1 +#endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ -# if (99 < __GNUC__) && defined __cplusplus -# define _GL_HAVE_STATIC_ASSERT 1 -# endif +#if (99 < __GNUC__) && defined __cplusplus +# define _GL_HAVE_STATIC_ASSERT 1 +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE_STATIC_ASSERT +# include +# undef _Static_assert +#endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike @@ -141,50 +151,50 @@ Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif /* Generate a symbol with the given prefix, making it unique if possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression that returns 1. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. */ -# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ - (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) -# ifdef __cplusplus -# if !GNULIB_defined_struct__gl_verify_type +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type template struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: w; }; -# define GNULIB_defined_struct__gl_verify_type 1 -# endif -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - _gl_verify_type<(R) ? 1 : -1> -# elif defined _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { \ - _Static_assert (R, DIAGNOSTIC); \ - int _gl_dummy; \ - } -# else -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +# define GNULIB_defined_struct__gl_verify_type 1 # endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + _gl_verify_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. If R is false, fail at compile-time, preferably @@ -193,23 +203,23 @@ Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ -# ifdef _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY _Static_assert -# else -# define _GL_VERIFY(R, DIAGNOSTIC) \ - extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ - [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] -# endif +#ifdef _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY _Static_assert +#else +# define _GL_VERIFY(R, DIAGNOSTIC) \ + extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ + [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +#endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ -# ifdef _GL_STATIC_ASSERT_H -# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert -# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) -# endif -# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* C11 requires this #define. */ -# endif +#ifdef _GL_STATIC_ASSERT_H +# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert +# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif +# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +#endif /* @assert.h omit start@ */ @@ -227,18 +237,42 @@ verify_true is obsolescent; please use verify_expr instead. */ -# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") +#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") /* Verify requirement R at compile-time. Return the value of the expression E. */ -# define verify_expr(R, E) \ - (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) +#define verify_expr(R, E) \ + (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ -# define verify(R) _GL_VERIFY (R, "verify (" #R ")") +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Assume that R always holds. This lets the compiler optimize + accordingly. R should not have side-effects; it may or may not be + evaluated. Behavior is undefined if R is false. */ + +#if (__has_builtin (__builtin_unreachable) \ + || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) +# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) +#elif 1200 <= _MSC_VER +# define assume(R) __assume (R) +#elif (defined lint \ + && (__has_builtin (__builtin_trap) \ + || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) + /* Doing it this way helps various packages when configured with + --enable-gcc-warnings, which compiles with -Dlint. It's nicer + when 'assume' silences warnings even with older GCCs. */ +# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) +#else +# define assume(R) ((void) (0 && (R))) +#endif /* @assert.h omit end@ */ diff -ruN groff-1.22.2/src/libs/gnulib/lib/wchar.in.h groff-1.22.3/src/libs/gnulib/lib/wchar.in.h --- groff-1.22.2/src/libs/gnulib/lib/wchar.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/wchar.in.h 2014-11-04 09:38:35.631518921 +0100 @@ -1,10 +1,10 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2013 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. 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, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff -ruN groff-1.22.2/src/libs/gnulib/lib/wctype.in.h groff-1.22.3/src/libs/gnulib/lib/wctype.in.h --- groff-1.22.2/src/libs/gnulib/lib/wctype.in.h 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/wctype.in.h 2014-11-04 09:38:35.631518921 +0100 @@ -1,10 +1,10 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2013 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. 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, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -32,6 +32,15 @@ #endif @PRAGMA_COLUMNS@ + +/* + * XXX: As soon as groff uses gnulib in a saner way (i.e., only a single + * `config.h' file for the whole package) this file should be replaced + * with an unpatched version, not containing the next #include line. + */ +#include "../config.h" + + #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before @@ -44,6 +53,13 @@ # include #endif +/* mingw has declarations of towupper and towlower in as + well . Include in advance to avoid rpl_ prefix + being added to the declarations. */ +#ifdef __MINGW32__ +# include +#endif + /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ @@ -54,6 +70,9 @@ #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE diff -ruN groff-1.22.2/src/libs/gnulib/lib/wcwidth.c groff-1.22.3/src/libs/gnulib/lib/wcwidth.c --- groff-1.22.2/src/libs/gnulib/lib/wcwidth.c 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/lib/wcwidth.c 2014-11-04 09:38:35.631518921 +0100 @@ -1,5 +1,5 @@ /* Determine the number of screen columns needed for a character. - Copyright (C) 2006-2007, 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2010-2014 Free Software Foundation, Inc. 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 diff -ruN groff-1.22.2/src/libs/gnulib/m4/00gnulib.m4 groff-1.22.3/src/libs/gnulib/m4/00gnulib.m4 --- groff-1.22.2/src/libs/gnulib/m4/00gnulib.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/00gnulib.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,12 +1,28 @@ -# 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2013 Free Software Foundation, Inc. +# 00gnulib.m4 serial 3 +dnl Copyright (C) 2009-2014 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 This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. +dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and +dnl m4_divert semantics. + +# Until autoconf 2.63, handling of the diversion stack required m4_init +# to be called first; but this does not happen with aclocal. Wrapping +# the entire execution in another layer of the diversion stack fixes this. +# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 +# for whether it was FIFO or LIFO; in order to properly balance with +# m4_init, we need to undo our push just before anything wrapped within +# the m4_init body. The way to ensure this is to wrap both sides of +# m4_init with a one-shot macro that does the pop at the right time. +m4_ifndef([_m4_divert_diversion], +[m4_divert_push([KILL]) +m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) +m4_define([m4_init], + [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) + # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- diff -ruN groff-1.22.2/src/libs/gnulib/m4/codeset.m4 groff-1.22.3/src/libs/gnulib/m4/codeset.m4 --- groff-1.22.2/src/libs/gnulib/m4/codeset.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/codeset.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/configmake.m4 groff-1.22.3/src/libs/gnulib/m4/configmake.m4 --- groff-1.22.2/src/libs/gnulib/m4/configmake.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/configmake.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ -# configmake.m4 serial 1 -dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. +# configmake.m4 serial 2 +dnl Copyright (C) 2010-2014 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. @@ -7,8 +7,9 @@ # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake -# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). +# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir +# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, +# and runstatedir in 1.14.1). AC_DEFUN([gl_CONFIGMAKE_PREP], [ dnl Technically, datadir should default to datarootdir. But if @@ -43,6 +44,10 @@ if test "x$localedir" = x; then AC_SUBST([localedir], ['${datarootdir}/locale']) fi + dnl Added in autoconf 2.70 + if test "x$runstatedir" = x; then + AC_SUBST([runstatedir], ['${localstatedir}/run']) + fi dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. diff -ruN groff-1.22.2/src/libs/gnulib/m4/extensions.m4 groff-1.22.3/src/libs/gnulib/m4/extensions.m4 --- groff-1.22.2/src/libs/gnulib/m4/extensions.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/extensions.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,14 +1,14 @@ # serial 13 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2014 Free Software Foundation, Inc. # 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. -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git # Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly +# 2.70 or later everywhere, but since Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -68,11 +68,6 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifdef __hpux -# define _XOPEN_SOURCE 500 -#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -81,6 +76,12 @@ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -101,6 +102,22 @@ AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) + AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], + [ac_cv_should_define__xopen_source], + [ac_cv_should_define__xopen_source=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + mbstate_t x;]])], + [], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #define _XOPEN_SOURCE 500 + #include + mbstate_t x;]])], + [ac_cv_should_define__xopen_source=yes])])]) + test $ac_cv_should_define__xopen_source = yes && + AC_DEFINE([_XOPEN_SOURCE], [500]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS diff -ruN groff-1.22.2/src/libs/gnulib/m4/extern-inline.m4 groff-1.22.3/src/libs/gnulib/m4/extern-inline.m4 --- groff-1.22.2/src/libs/gnulib/m4/extern-inline.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/extern-inline.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,6 +1,6 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2013 Free Software Foundation, Inc. +dnl Copyright 2012-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/fcntl-o.m4 groff-1.22.3/src/libs/gnulib/m4/fcntl-o.m4 --- groff-1.22.2/src/libs/gnulib/m4/fcntl-o.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/fcntl-o.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # fcntl-o.m4 serial 4 -dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/glibc21.m4 groff-1.22.3/src/libs/gnulib/m4/glibc21.m4 --- groff-1.22.2/src/libs/gnulib/m4/glibc21.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/glibc21.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2013 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 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, diff -ruN groff-1.22.2/src/libs/gnulib/m4/gnulib-cache.m4 groff-1.22.3/src/libs/gnulib/m4/gnulib-cache.m4 --- groff-1.22.2/src/libs/gnulib/m4/gnulib-cache.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/gnulib-cache.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # 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 diff -ruN groff-1.22.2/src/libs/gnulib/m4/gnulib-common.m4 groff-1.22.3/src/libs/gnulib/m4/gnulib-common.m4 --- groff-1.22.2/src/libs/gnulib/m4/gnulib-common.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/gnulib-common.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # gnulib-common.m4 serial 33 -dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/gnulib-comp.m4 groff-1.22.3/src/libs/gnulib/m4/gnulib-comp.m4 --- groff-1.22.2/src/libs/gnulib/m4/gnulib-comp.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/gnulib-comp.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # 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 diff -ruN groff-1.22.2/src/libs/gnulib/m4/gnulib-tool.m4 groff-1.22.3/src/libs/gnulib/m4/gnulib-tool.m4 --- groff-1.22.2/src/libs/gnulib/m4/gnulib-tool.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/gnulib-tool.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/include_next.m4 groff-1.22.3/src/libs/gnulib/m4/include_next.m4 --- groff-1.22.2/src/libs/gnulib/m4/include_next.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/include_next.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # include_next.m4 serial 23 -dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/inttypes.m4 groff-1.22.3/src/libs/gnulib/m4/inttypes.m4 --- groff-1.22.2/src/libs/gnulib/m4/inttypes.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/inttypes.m4 2014-11-04 09:38:35.640518809 +0100 @@ -1,5 +1,5 @@ # inttypes.m4 serial 26 -dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/inttypes-pri.m4 groff-1.22.3/src/libs/gnulib/m4/inttypes-pri.m4 --- groff-1.22.2/src/libs/gnulib/m4/inttypes-pri.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/inttypes-pri.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2002, 2006, 2008-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/libunistring-base.m4 groff-1.22.3/src/libs/gnulib/m4/libunistring-base.m4 --- groff-1.22.2/src/libs/gnulib/m4/libunistring-base.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/libunistring-base.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # libunistring-base.m4 serial 5 -dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/localcharset.m4 groff-1.22.3/src/libs/gnulib/m4/localcharset.m4 --- groff-1.22.2/src/libs/gnulib/m4/localcharset.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/localcharset.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # localcharset.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/longlong.m4 groff-1.22.3/src/libs/gnulib/m4/longlong.m4 --- groff-1.22.2/src/libs/gnulib/m4/longlong.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/longlong.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/Makefile.am groff-1.22.3/src/libs/gnulib/m4/Makefile.am --- groff-1.22.2/src/libs/gnulib/m4/Makefile.am 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/Makefile.am 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,25 @@ ## Process this file with automake to produce Makefile.in. +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, 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. + EXTRA_DIST = EXTRA_DIST += 00gnulib.m4 EXTRA_DIST += codeset.m4 diff -ruN groff-1.22.2/src/libs/gnulib/m4/Makefile.in groff-1.22.3/src/libs/gnulib/m4/Makefile.in --- groff-1.22.2/src/libs/gnulib/m4/Makefile.in 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/Makefile.in 2014-11-04 09:38:35.641518796 +0100 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.5 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,24 +13,72 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, 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. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -49,7 +97,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ @@ -72,6 +120,18 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -79,10 +139,12 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ @@ -342,6 +404,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -389,11 +452,9 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: @@ -530,15 +591,16 @@ .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -ruN groff-1.22.2/src/libs/gnulib/m4/multiarch.m4 groff-1.22.3/src/libs/gnulib/m4/multiarch.m4 --- groff-1.22.2/src/libs/gnulib/m4/multiarch.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/multiarch.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/onceonly.m4 groff-1.22.3/src/libs/gnulib/m4/onceonly.m4 --- groff-1.22.2/src/libs/gnulib/m4/onceonly.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/onceonly.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # onceonly.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2013 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2008-2014 Free Software Foundation, dnl Inc. dnl dnl This file is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/gnulib/m4/stdbool.m4 groff-1.22.3/src/libs/gnulib/m4/stdbool.m4 --- groff-1.22.2/src/libs/gnulib/m4/stdbool.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/stdbool.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/stddef_h.m4 groff-1.22.3/src/libs/gnulib/m4/stddef_h.m4 --- groff-1.22.2/src/libs/gnulib/m4/stddef_h.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/stddef_h.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,6 +1,6 @@ dnl A placeholder for POSIX 2008 , for platforms that have issues. # stddef_h.m4 serial 4 -dnl Copyright (C) 2009-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/stdint.m4 groff-1.22.3/src/libs/gnulib/m4/stdint.m4 --- groff-1.22.2/src/libs/gnulib/m4/stdint.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/stdint.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # stdint.m4 serial 43 -dnl Copyright (C) 2001-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/warn-on-use.m4 groff-1.22.3/src/libs/gnulib/m4/warn-on-use.m4 --- groff-1.22.2/src/libs/gnulib/m4/warn-on-use.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/warn-on-use.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/wchar_h.m4 groff-1.22.3/src/libs/gnulib/m4/wchar_h.m4 --- groff-1.22.2/src/libs/gnulib/m4/wchar_h.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/wchar_h.m4 2014-11-04 09:38:35.641518796 +0100 @@ -1,6 +1,6 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/wchar_t.m4 groff-1.22.3/src/libs/gnulib/m4/wchar_t.m4 --- groff-1.22.2/src/libs/gnulib/m4/wchar_t.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/wchar_t.m4 2014-11-04 09:38:35.642518784 +0100 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/wctype_h.m4 groff-1.22.3/src/libs/gnulib/m4/wctype_h.m4 --- groff-1.22.2/src/libs/gnulib/m4/wctype_h.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/wctype_h.m4 2014-11-04 09:38:35.642518784 +0100 @@ -2,7 +2,7 @@ dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/wcwidth.m4 groff-1.22.3/src/libs/gnulib/m4/wcwidth.m4 --- groff-1.22.2/src/libs/gnulib/m4/wcwidth.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/wcwidth.m4 2014-11-04 09:38:35.642518784 +0100 @@ -1,5 +1,5 @@ # wcwidth.m4 serial 23 -dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/m4/wint_t.m4 groff-1.22.3/src/libs/gnulib/m4/wint_t.m4 --- groff-1.22.2/src/libs/gnulib/m4/wint_t.m4 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/m4/wint_t.m4 2014-11-04 09:38:35.642518784 +0100 @@ -1,5 +1,5 @@ # wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2014 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. diff -ruN groff-1.22.2/src/libs/gnulib/Makefile.am groff-1.22.3/src/libs/gnulib/Makefile.am --- groff-1.22.2/src/libs/gnulib/Makefile.am 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/Makefile.am 2014-11-04 09:38:35.676518359 +0100 @@ -1,5 +1,18 @@ ## Process this file with automake to produce Makefile.in. +# Makefile.am + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# 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. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. + AUTOMAKE_OPTIONS = 1.5 foreign SUBDIRS = lib m4 diff -ruN groff-1.22.2/src/libs/gnulib/Makefile.in groff-1.22.3/src/libs/gnulib/Makefile.in --- groff-1.22.2/src/libs/gnulib/Makefile.in 2013-02-07 13:06:12.000000000 +0100 +++ groff-1.22.3/src/libs/gnulib/Makefile.in 2014-11-04 09:38:35.676518359 +0100 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.5 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,24 +13,65 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + +# Makefile.am + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# 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. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -49,15 +90,15 @@ build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/build-aux/compile \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in build-aux/compile build-aux/config.guess \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/missing $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ - build-aux/compile build-aux/config.guess build-aux/config.sub \ - build-aux/depcomp build-aux/install-sh build-aux/missing + $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ @@ -82,15 +123,28 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -98,9 +152,30 @@ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope @@ -150,6 +225,7 @@ pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ @@ -409,6 +485,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -460,8 +537,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -480,14 +557,13 @@ # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -508,31 +584,13 @@ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -548,12 +606,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -565,15 +618,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -582,18 +631,16 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" - cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - clean-cscope: -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive -cscope.files: clean-cscope cscopelist-recursive cscopelist - -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -691,10 +738,16 @@ $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -895,25 +948,23 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-cscope \ - clean-generic cscope cscopelist cscopelist-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -ruN groff-1.22.2/src/libs/libbib/common.cpp groff-1.22.3/src/libs/libbib/common.cpp --- groff-1.22.2/src/libs/libbib/common.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/common.cpp 2014-11-04 09:38:35.183524522 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libbib/index.cpp groff-1.22.3/src/libs/libbib/index.cpp --- groff-1.22.2/src/libs/libbib/index.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/index.cpp 2014-11-04 09:38:35.183524522 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libbib/linear.cpp groff-1.22.3/src/libs/libbib/linear.cpp --- groff-1.22.2/src/libs/libbib/linear.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/linear.cpp 2014-11-04 09:38:35.183524522 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libbib/Makefile.sub groff-1.22.3/src/libs/libbib/Makefile.sub --- groff-1.22.2/src/libs/libbib/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/Makefile.sub 2014-11-04 09:38:35.183524522 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `libbib' +# +# File position: /src/libs/libbib/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + LIB=bib OBJS=\ common.$(OBJEXT) \ @@ -12,3 +36,11 @@ $(srcdir)/search.cpp CSRCS=\ $(srcdir)/map.c + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/libs/libbib/map.c groff-1.22.3/src/libs/libbib/map.c --- groff-1.22.2/src/libs/libbib/map.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/map.c 2014-11-04 09:38:35.183524522 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989- 2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libbib/search.cpp groff-1.22.3/src/libs/libbib/search.cpp --- groff-1.22.2/src/libs/libbib/search.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libbib/search.cpp 2014-11-04 09:38:35.183524522 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libdriver/input.cpp groff-1.22.3/src/libs/libdriver/input.cpp --- groff-1.22.2/src/libs/libdriver/input.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libdriver/input.cpp 2014-11-04 09:38:35.178524584 +0100 @@ -2,14 +2,11 @@ // /src/libs/libdriver/input.cpp -/* Copyright (C) 1989-1992, 2001-2006, 2008-2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) Major rewrite 2001 by Bernd Warken - Last update: 9 May 2010 - This file is part of groff, the GNU roff text processing system. groff is free software; you can redistribute it and/or modify it diff -ruN groff-1.22.2/src/libs/libdriver/Makefile.sub groff-1.22.3/src/libs/libdriver/Makefile.sub --- groff-1.22.2/src/libs/libdriver/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libdriver/Makefile.sub 2014-11-04 09:38:35.178524584 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `libdriver' +# +# File position: /src/libs/libdriver/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + LIB=driver OBJS=\ input.$(OBJEXT) \ @@ -5,3 +29,11 @@ CCSRCS=\ $(srcdir)/input.cpp \ $(srcdir)/printer.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/libs/libdriver/printer.cpp groff-1.22.3/src/libs/libdriver/printer.cpp --- groff-1.22.2/src/libs/libdriver/printer.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libdriver/printer.cpp 2014-11-04 09:38:35.178524584 +0100 @@ -2,13 +2,9 @@ // /src/libs/libdriver/printer.cpp -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005, - 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) - Last update: 5 Jan 2009 - This file is part of groff. groff is free software; you can redistribute it and/or modify it diff -ruN groff-1.22.2/src/libs/libgroff/assert.cpp groff-1.22.3/src/libs/libgroff/assert.cpp --- groff-1.22.2/src/libs/libgroff/assert.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/assert.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/change_lf.cpp groff-1.22.3/src/libs/libgroff/change_lf.cpp --- groff-1.22.2/src/libs/libgroff/change_lf.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/change_lf.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/cmap.cpp groff-1.22.3/src/libs/libgroff/cmap.cpp --- groff-1.22.2/src/libs/libgroff/cmap.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/cmap.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/color.cpp groff-1.22.3/src/libs/libgroff/color.cpp --- groff-1.22.2/src/libs/libgroff/color.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/color.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -2,10 +2,7 @@ /* /src/libs/libgroff/color.cpp -Last update: 5 Jan 2009 - -Copyright (C) 2001, 2002, 2003, 2004, 2009 - Free Software Foundation, Inc. +Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Gaius Mulley This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/config.charset groff-1.22.3/src/libs/libgroff/config.charset --- groff-1.22.2/src/libs/libgroff/config.charset 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/config.charset 2014-11-04 09:38:35.168524710 +0100 @@ -1,7 +1,7 @@ #! /bin/sh # Output a system dependent table of character encoding aliases. # -# Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2004, 2006-2014 Free Software Foundation, Inc. # # 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 @@ -29,7 +29,7 @@ # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems -# (darwin = MacOS X, woe32 = native Windows) +# (darwin = Mac OS X, woe32 = native Windows) # # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin diff -ruN groff-1.22.2/src/libs/libgroff/cset.cpp groff-1.22.3/src/libs/libgroff/cset.cpp --- groff-1.22.2/src/libs/libgroff/cset.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/cset.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/device.cpp groff-1.22.3/src/libs/libgroff/device.cpp --- groff-1.22.2/src/libs/libgroff/device.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/device.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/errarg.cpp groff-1.22.3/src/libs/libgroff/errarg.cpp --- groff-1.22.2/src/libs/libgroff/errarg.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/errarg.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/error.cpp groff-1.22.3/src/libs/libgroff/error.cpp --- groff-1.22.2/src/libs/libgroff/error.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/error.cpp 2014-11-04 09:38:35.168524710 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/fatal.cpp groff-1.22.3/src/libs/libgroff/fatal.cpp --- groff-1.22.2/src/libs/libgroff/fatal.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/fatal.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/filename.cpp groff-1.22.3/src/libs/libgroff/filename.cpp --- groff-1.22.2/src/libs/libgroff/filename.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/filename.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,2 +1,19 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + const char *current_filename = 0; const char *current_source_filename = 0; diff -ruN groff-1.22.2/src/libs/libgroff/fmod.c groff-1.22.3/src/libs/libgroff/fmod.c --- groff-1.22.2/src/libs/libgroff/fmod.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/fmod.c 2014-11-04 09:38:35.169524697 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/font.cpp groff-1.22.3/src/libs/libgroff/font.cpp --- groff-1.22.2/src/libs/libgroff/font.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/font.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/fontfile.cpp groff-1.22.3/src/libs/libgroff/fontfile.cpp --- groff-1.22.2/src/libs/libgroff/fontfile.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/fontfile.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2006, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/geometry.cpp groff-1.22.3/src/libs/libgroff/geometry.cpp --- groff-1.22.2/src/libs/libgroff/geometry.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/geometry.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by Gaius Mulley using adjust_arc_center() from printer.cpp, written by James Clark. diff -ruN groff-1.22.2/src/libs/libgroff/getcwd.c groff-1.22.3/src/libs/libgroff/getcwd.c --- groff-1.22.2/src/libs/libgroff/getcwd.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/getcwd.c 2014-11-04 09:38:35.169524697 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/getopt1.c groff-1.22.3/src/libs/libgroff/getopt1.c --- groff-1.22.2/src/libs/libgroff/getopt1.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/getopt1.c 2014-11-04 09:38:35.169524697 +0100 @@ -1,6 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004 - Free Software Foundation, Inc. + Copyright (C) 1987-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/libgroff/getopt.c groff-1.22.3/src/libs/libgroff/getopt.c --- groff-1.22.2/src/libs/libgroff/getopt.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/getopt.c 2014-11-04 09:38:35.169524697 +0100 @@ -2,8 +2,7 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004 - Free Software Foundation, Inc. + Copyright (C) 1987-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff -ruN groff-1.22.2/src/libs/libgroff/glyphuni.cpp groff-1.22.3/src/libs/libgroff/glyphuni.cpp --- groff-1.22.2/src/libs/libgroff/glyphuni.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/glyphuni.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2004, 2006, 2009, 2012 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/htmlhint.cpp groff-1.22.3/src/libs/libgroff/htmlhint.cpp --- groff-1.22.2/src/libs/libgroff/htmlhint.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/htmlhint.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 2000, 2001, 2002, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/hypot.cpp groff-1.22.3/src/libs/libgroff/hypot.cpp --- groff-1.22.2/src/libs/libgroff/hypot.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/hypot.cpp 2014-11-04 09:38:35.169524697 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff -ruN groff-1.22.2/src/libs/libgroff/iftoa.c groff-1.22.3/src/libs/libgroff/iftoa.c --- groff-1.22.2/src/libs/libgroff/iftoa.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/iftoa.c 2014-11-04 09:38:35.170524684 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/invalid.cpp groff-1.22.3/src/libs/libgroff/invalid.cpp --- groff-1.22.2/src/libs/libgroff/invalid.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/invalid.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/itoa.c groff-1.22.3/src/libs/libgroff/itoa.c --- groff-1.22.2/src/libs/libgroff/itoa.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/itoa.c 2014-11-04 09:38:35.170524684 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/lf.cpp groff-1.22.3/src/libs/libgroff/lf.cpp --- groff-1.22.2/src/libs/libgroff/lf.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/lf.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/lineno.cpp groff-1.22.3/src/libs/libgroff/lineno.cpp --- groff-1.22.2/src/libs/libgroff/lineno.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/lineno.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1 +1,18 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + int current_lineno = 0; diff -ruN groff-1.22.2/src/libs/libgroff/localcharset.c groff-1.22.3/src/libs/libgroff/localcharset.c --- groff-1.22.2/src/libs/libgroff/localcharset.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/localcharset.c 2014-11-04 09:38:35.170524684 +0100 @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2014 Free Software Foundation, Inc. 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 @@ -29,11 +29,12 @@ #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET -# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ +# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE +# include #endif #if defined __EMX__ @@ -65,6 +66,11 @@ # include #endif +/* For MB_CUR_MAX_L */ +#if defined DARWIN7 +# include +#endif + #if ENABLE_RELOCATABLE # include "relocatable.h" #else @@ -456,14 +462,34 @@ static char buf[2 + 10 + 1]; - /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); + /* The Windows API has a function returning the locale's codepage as + a number, but the value doesn't change according to what the + 'setlocale' call specified. So we use it as a last resort, in + case the string returned by 'setlocale' doesn't specify the + codepage. */ + char *current_locale = setlocale (LC_ALL, NULL); + char *pdot; + + /* If they set different locales for different categories, + 'setlocale' will return a semi-colon separated list of locale + values. To make sure we use the correct one, we choose LC_CTYPE. */ + if (strchr (current_locale, ';')) + current_locale = setlocale (LC_CTYPE, NULL); + + pdot = strrchr (current_locale, '.'); + if (pdot) + sprintf (buf, "CP%s", pdot + 1); + else + { + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. + But in GUI programs and for output sent to files and pipes, GetACP() + encoding is the best bet. */ + sprintf (buf, "CP%u", GetACP ()); + } codeset = buf; #elif defined OS2 @@ -542,5 +568,12 @@ if (codeset[0] == '\0') codeset = "ASCII"; +#ifdef DARWIN7 + /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" + (the default codeset) does not work when MB_CUR_MAX is 1. */ + if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) + codeset = "ASCII"; +#endif + return codeset; } diff -ruN groff-1.22.2/src/libs/libgroff/macropath.cpp groff-1.22.3/src/libs/libgroff/macropath.cpp --- groff-1.22.2/src/libs/libgroff/macropath.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/macropath.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/Makefile.sub groff-1.22.3/src/libs/libgroff/Makefile.sub --- groff-1.22.2/src/libs/libgroff/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/Makefile.sub 2014-11-04 09:38:35.170524684 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `libgroff' +# +# File position: /src/libs/libgroff/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + LIB=groff EXTRA_CFLAGS=-D__GETOPT_PREFIX=groff_ \ -DENABLE_RELOCATABLE=1 \ @@ -113,6 +137,7 @@ $(srcdir)/../snprintf/snprintf.c GENSRCS=\ version.cpp +RM=rm -f src_version=`cat $(top_srcdir)/VERSION` src_revision=`cat $(top_srcdir)/REVISION` @@ -121,8 +146,8 @@ @echo Making version.cpp @echo const char \*version_string = \"$(src_version)\"\; >$@ @echo const char \*revision_string = \"$(src_revision)\"\; >>$@ - @echo extern \"C\" const char \*Version_string = \"$(src_version).$(src_revision)\"\; | \ - sed -e 's/\.0\"/\"/' >>$@ + @echo extern \"C\" const char \*Version_string = \"$(src_version).$(src_revision)\"\; \ + | sed -e 's/\.0\"/\"/' >>$@ # We have to avoid $(COMPILE.c) since we must not use groff's `assert.h' snprintf.$(OBJEXT): $(srcdir)/../snprintf/snprintf.c @@ -153,38 +178,46 @@ install_data: install_charset_data install_charset_data: - test $(GLIBC21) != no || $(MKINSTALLDIRS) $(DESTDIR)$(libdir) + -test $(GLIBC21) != no || $(MKINSTALLDIRS) $(DESTDIR)$(libdir) if test -f $(DESTDIR)$(libdir)/charset.alias; then \ sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias \ - > $(DESTDIR)$(libdir)/t-charset.alias; \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ - $(DESTDIR)$(libdir)/charset.alias; \ - rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + $(DESTDIR)$(libdir)/charset.alias; \ + $(RM) $(DESTDIR)$(libdir)/t-charset.alias; \ else \ if test $(GLIBC21) = no; then \ sed -f ref-add.sed charset.alias \ - > $(DESTDIR)$(libdir)/t-charset.alias; \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ - $(DESTDIR)$(libdir)/charset.alias; \ - rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + $(DESTDIR)$(libdir)/charset.alias; \ + $(RM) $(DESTDIR)$(libdir)/t-charset.alias; \ fi; \ fi uninstall_sub: uninstall_charset_data uninstall_charset_data: - if test -f $(DESTDIR)$(libdir)/charset.alias; then \ + -if test -f $(DESTDIR)$(libdir)/charset.alias; then \ sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias \ - > $(DESTDIR)$(libdir)/t-charset.alias; \ + > $(DESTDIR)$(libdir)/t-charset.alias; \ if grep '^# Packages using this file: $$' \ $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \ - rm -f $(DESTDIR)$(libdir)/charset.alias; \ + $(RM) $(DESTDIR)$(libdir)/charset.alias; \ else \ $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \ - $(DESTDIR)$(libdir)/charset.alias; \ + $(DESTDIR)$(libdir)/charset.alias; \ fi; \ - rm -f $(DESTDIR)$(libdir)/t-charset.alias; \ + $(RM) $(DESTDIR)$(libdir)/t-charset.alias; \ fi clean: clean_charset clean_charset: - rm -f charset.alias ref-add.sed ref-del.sed + $(RM) charset.alias ref-add.sed ref-del.sed + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/libs/libgroff/make-uniuni groff-1.22.3/src/libs/libgroff/make-uniuni --- groff-1.22.2/src/libs/libgroff/make-uniuni 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/make-uniuni 2014-11-04 09:38:35.170524684 +0100 @@ -2,8 +2,7 @@ # # make-uniuni -- script for creating the file uniuni.cpp # -# Copyright (C) 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 2005-2014 Free Software Foundation, Inc. # Written by Werner Lemberg # # This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/matherr.c groff-1.22.3/src/libs/libgroff/matherr.c --- groff-1.22.2/src/libs/libgroff/matherr.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/matherr.c 2014-11-04 09:38:35.170524684 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/maxfilename.cpp groff-1.22.3/src/libs/libgroff/maxfilename.cpp --- groff-1.22.2/src/libs/libgroff/maxfilename.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/maxfilename.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1992, 2001, 2003, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/maxpathname.cpp groff-1.22.3/src/libs/libgroff/maxpathname.cpp --- groff-1.22.2/src/libs/libgroff/maxpathname.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/maxpathname.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/mksdir.cpp groff-1.22.3/src/libs/libgroff/mksdir.cpp --- groff-1.22.2/src/libs/libgroff/mksdir.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/mksdir.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/mkstemp.cpp groff-1.22.3/src/libs/libgroff/mkstemp.cpp --- groff-1.22.2/src/libs/libgroff/mkstemp.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/mkstemp.cpp 2014-11-04 09:38:35.170524684 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/nametoindex.cpp groff-1.22.3/src/libs/libgroff/nametoindex.cpp --- groff-1.22.2/src/libs/libgroff/nametoindex.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/nametoindex.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2006, - 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/new.cpp groff-1.22.3/src/libs/libgroff/new.cpp --- groff-1.22.2/src/libs/libgroff/new.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/new.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/paper.cpp groff-1.22.3/src/libs/libgroff/paper.cpp --- groff-1.22.2/src/libs/libgroff/paper.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/paper.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/prime.cpp groff-1.22.3/src/libs/libgroff/prime.cpp --- groff-1.22.2/src/libs/libgroff/prime.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/prime.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,3 +1,20 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + #include int is_prime(unsigned n) diff -ruN groff-1.22.2/src/libs/libgroff/progname.c groff-1.22.3/src/libs/libgroff/progname.c --- groff-1.22.2/src/libs/libgroff/progname.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/progname.c 2014-11-04 09:38:35.171524672 +0100 @@ -1 +1,18 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + const char *program_name = 0; diff -ruN groff-1.22.2/src/libs/libgroff/ptable.cpp groff-1.22.3/src/libs/libgroff/ptable.cpp --- groff-1.22.2/src/libs/libgroff/ptable.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/ptable.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/putenv.c groff-1.22.3/src/libs/libgroff/putenv.c --- groff-1.22.2/src/libs/libgroff/putenv.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/putenv.c 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1991, 2001, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff -ruN groff-1.22.2/src/libs/libgroff/quotearg.c groff-1.22.3/src/libs/libgroff/quotearg.c --- groff-1.22.2/src/libs/libgroff/quotearg.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/quotearg.c 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2004-2014 Free Software Foundation, Inc. Written by: Jeff Conrad (jeff_conrad@msn.com) and Keith Marshall (keith.d.marshall@ntlworld.com) diff -ruN groff-1.22.2/src/libs/libgroff/ref-add.sin groff-1.22.3/src/libs/libgroff/ref-add.sin --- groff-1.22.2/src/libs/libgroff/ref-add.sin 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/ref-add.sin 2014-11-04 09:38:35.171524672 +0100 @@ -1,6 +1,6 @@ # Add this package to a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. # # 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 diff -ruN groff-1.22.2/src/libs/libgroff/ref-del.sin groff-1.22.3/src/libs/libgroff/ref-del.sin --- groff-1.22.2/src/libs/libgroff/ref-del.sin 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/ref-del.sin 2014-11-04 09:38:35.171524672 +0100 @@ -1,6 +1,6 @@ # Remove this package from a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. # # 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 diff -ruN groff-1.22.2/src/libs/libgroff/relocatable.h groff-1.22.3/src/libs/libgroff/relocatable.h --- groff-1.22.2/src/libs/libgroff/relocatable.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/relocatable.h 2014-11-04 09:38:35.171524672 +0100 @@ -1,2 +1,19 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + #include "relocate.h" #define relocate(path) relocatep(path) diff -ruN groff-1.22.2/src/libs/libgroff/relocate.cpp groff-1.22.3/src/libs/libgroff/relocate.cpp --- groff-1.22.2/src/libs/libgroff/relocate.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/relocate.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,6 +1,6 @@ // -*- C++ -*- /* Provide relocation for macro and font files. - Copyright (C) 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2005-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published diff -ruN groff-1.22.2/src/libs/libgroff/searchpath.cpp groff-1.22.3/src/libs/libgroff/searchpath.cpp --- groff-1.22.2/src/libs/libgroff/searchpath.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/searchpath.cpp 2014-11-04 09:38:35.171524672 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/spawnvp.c groff-1.22.3/src/libs/libgroff/spawnvp.c --- groff-1.22.2/src/libs/libgroff/spawnvp.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/spawnvp.c 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2004-2014 Free Software Foundation, Inc. Written by: Keith Marshall (keith.d.marshall@ntlworld.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/strcasecmp.c groff-1.22.3/src/libs/libgroff/strcasecmp.c --- groff-1.22.2/src/libs/libgroff/strcasecmp.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/strcasecmp.c 2014-11-04 09:38:35.171524672 +0100 @@ -1,5 +1,5 @@ /* strcasecmp.c -- case insensitive string comparator - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998-2014 Free Software Foundation, Inc. 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 diff -ruN groff-1.22.2/src/libs/libgroff/strerror.c groff-1.22.3/src/libs/libgroff/strerror.c --- groff-1.22.2/src/libs/libgroff/strerror.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/strerror.c 2014-11-04 09:38:35.172524659 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/string.cpp groff-1.22.3/src/libs/libgroff/string.cpp --- groff-1.22.2/src/libs/libgroff/string.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/string.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/strncasecmp.c groff-1.22.3/src/libs/libgroff/strncasecmp.c --- groff-1.22.2/src/libs/libgroff/strncasecmp.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/strncasecmp.c 2014-11-04 09:38:35.172524659 +0100 @@ -1,2 +1,19 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + #define LENGTH_LIMIT #include "strcasecmp.c" diff -ruN groff-1.22.2/src/libs/libgroff/strsave.cpp groff-1.22.3/src/libs/libgroff/strsave.cpp --- groff-1.22.2/src/libs/libgroff/strsave.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/strsave.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/strtol.c groff-1.22.3/src/libs/libgroff/strtol.c --- groff-1.22.2/src/libs/libgroff/strtol.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/strtol.c 2014-11-04 09:38:35.172524659 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/symbol.cpp groff-1.22.3/src/libs/libgroff/symbol.cpp --- groff-1.22.2/src/libs/libgroff/symbol.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/symbol.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/tmpfile.cpp groff-1.22.3/src/libs/libgroff/tmpfile.cpp --- groff-1.22.2/src/libs/libgroff/tmpfile.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/tmpfile.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/tmpname.cpp groff-1.22.3/src/libs/libgroff/tmpname.cpp --- groff-1.22.2/src/libs/libgroff/tmpname.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/tmpname.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -102,7 +102,9 @@ XXXXXX[5] = letters[v % 62]; int fd = dir ? mkdir(tmpl, S_IRUSR | S_IWUSR | S_IXUSR) - : open(tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + : open(tmpl, + O_RDWR | O_CREAT | O_EXCL | O_BINARY, + S_IRUSR | S_IWUSR); if (fd >= 0) return fd; diff -ruN groff-1.22.2/src/libs/libgroff/unicode.cpp groff-1.22.3/src/libs/libgroff/unicode.cpp --- groff-1.22.2/src/libs/libgroff/unicode.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/unicode.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/uniglyph.cpp groff-1.22.3/src/libs/libgroff/uniglyph.cpp --- groff-1.22.2/src/libs/libgroff/uniglyph.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/uniglyph.cpp 2014-11-04 09:38:35.172524659 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002-2004, 2006, 2009, 2012 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg This file is part of groff. diff -ruN groff-1.22.2/src/libs/libgroff/uniuni.cpp groff-1.22.3/src/libs/libgroff/uniuni.cpp --- groff-1.22.2/src/libs/libgroff/uniuni.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libgroff/uniuni.cpp 2014-11-04 09:38:35.173524647 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2002, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. Written by Werner Lemberg This file is part of groff. diff -ruN groff-1.22.2/src/libs/libxutil/DviChar.c groff-1.22.3/src/libs/libxutil/DviChar.c --- groff-1.22.2/src/libs/libxutil/DviChar.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libxutil/DviChar.c 2014-11-04 09:38:35.187524472 +0100 @@ -1,3 +1,20 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + /* * DviChar.c * diff -ruN groff-1.22.2/src/libs/libxutil/Makefile.sub groff-1.22.3/src/libs/libxutil/Makefile.sub --- groff-1.22.2/src/libs/libxutil/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libxutil/Makefile.sub 2014-11-04 09:38:35.187524472 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `libxutil' +# +# File position: /src/libs/libxutil/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + LIB=xutil EXTRA_CFLAGS=$(X_CFLAGS) OBJS=\ @@ -8,3 +32,11 @@ $(srcdir)/DviChar.c \ $(srcdir)/XFontName.c \ $(srcdir)/xmalloc.c + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/libs/libxutil/XFontName.c groff-1.22.3/src/libs/libxutil/XFontName.c --- groff-1.22.2/src/libs/libxutil/XFontName.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libxutil/XFontName.c 2014-11-04 09:38:35.187524472 +0100 @@ -1,3 +1,20 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + /* * XFontName.c * diff -ruN groff-1.22.2/src/libs/libxutil/xmalloc.c groff-1.22.3/src/libs/libxutil/xmalloc.c --- groff-1.22.2/src/libs/libxutil/xmalloc.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/libs/libxutil/xmalloc.c 2014-11-04 09:38:35.187524472 +0100 @@ -1,3 +1,20 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 2 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. + +The GNU General Public License version 2 (GPL2) is available in the +internet at . */ + #include #include diff -ruN groff-1.22.2/src/preproc/eqn/box.cpp groff-1.22.3/src/preproc/eqn/box.cpp --- groff-1.22.2/src/preproc/eqn/box.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/box.cpp 2014-11-04 09:38:35.231523922 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -272,7 +271,7 @@ if (script_size_reduction >= 0) printf(".ps \\n[.s]-%d>?%d\n", script_size_reduction, minimum_size); else - printf(".ps (u;\\n[.ps]*7+5/10>?%d)\n", minimum_size); + printf(".ps (u;\\n[.ps]*7+5/10>?%dz)\n", minimum_size); } int box::next_uid = 0; diff -ruN groff-1.22.2/src/preproc/eqn/box.h groff-1.22.3/src/preproc/eqn/box.h --- groff-1.22.2/src/preproc/eqn/box.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/box.h 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/delim.cpp groff-1.22.3/src/preproc/eqn/delim.cpp --- groff-1.22.2/src/preproc/eqn/delim.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/delim.cpp 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/eqn.cpp groff-1.22.3/src/preproc/eqn/eqn.cpp --- groff-1.22.2/src/preproc/eqn/eqn.cpp 2013-02-07 13:06:14.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/eqn.cpp 2014-11-04 09:38:38.327485217 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 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 . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,15 +58,11 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 19 "eqn.y" +#line 18 "eqn.y" /* yacc.c:339 */ #include #include @@ -78,14 +74,15 @@ int yylex(); void yyerror(const char *); +#line 78 "eqn.cpp" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 84 "eqn.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -95,77 +92,82 @@ # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - OVER = 258, - SMALLOVER = 259, - SQRT = 260, - SUB = 261, - SUP = 262, - LPILE = 263, - RPILE = 264, - CPILE = 265, - PILE = 266, - LEFT = 267, - RIGHT = 268, - TO = 269, - FROM = 270, - SIZE = 271, - FONT = 272, - ROMAN = 273, - BOLD = 274, - ITALIC = 275, - FAT = 276, - ACCENT = 277, - BAR = 278, - UNDER = 279, - ABOVE = 280, - TEXT = 281, - QUOTED_TEXT = 282, - FWD = 283, - BACK = 284, - DOWN = 285, - UP = 286, - MATRIX = 287, - COL = 288, - LCOL = 289, - RCOL = 290, - CCOL = 291, - MARK = 292, - LINEUP = 293, - TYPE = 294, - VCENTER = 295, - PRIME = 296, - SPLIT = 297, - NOSPLIT = 298, - UACCENT = 299, - SPECIAL = 300, - SPACE = 301, - GFONT = 302, - GSIZE = 303, - DEFINE = 304, - NDEFINE = 305, - TDEFINE = 306, - SDEFINE = 307, - UNDEF = 308, - IFDEF = 309, - INCLUDE = 310, - DELIM = 311, - CHARTYPE = 312, - SET = 313, - GRFONT = 314, - GBFONT = 315 - }; + enum yytokentype + { + OVER = 258, + SMALLOVER = 259, + SQRT = 260, + SUB = 261, + SUP = 262, + LPILE = 263, + RPILE = 264, + CPILE = 265, + PILE = 266, + LEFT = 267, + RIGHT = 268, + TO = 269, + FROM = 270, + SIZE = 271, + FONT = 272, + ROMAN = 273, + BOLD = 274, + ITALIC = 275, + FAT = 276, + ACCENT = 277, + BAR = 278, + UNDER = 279, + ABOVE = 280, + TEXT = 281, + QUOTED_TEXT = 282, + FWD = 283, + BACK = 284, + DOWN = 285, + UP = 286, + MATRIX = 287, + COL = 288, + LCOL = 289, + RCOL = 290, + CCOL = 291, + MARK = 292, + LINEUP = 293, + TYPE = 294, + VCENTER = 295, + PRIME = 296, + SPLIT = 297, + NOSPLIT = 298, + UACCENT = 299, + SPECIAL = 300, + SPACE = 301, + GFONT = 302, + GSIZE = 303, + DEFINE = 304, + NDEFINE = 305, + TDEFINE = 306, + SDEFINE = 307, + UNDEF = 308, + IFDEF = 309, + INCLUDE = 310, + DELIM = 311, + CHARTYPE = 312, + SET = 313, + GRFONT = 314, + GBFONT = 315 + }; #endif /* Tokens. */ #define OVER 258 @@ -227,15 +229,12 @@ #define GRFONT 314 #define GBFONT 315 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 31 "eqn.y" +#line 30 "eqn.y" /* yacc.c:355 */ char *str; box *b; @@ -244,22 +243,22 @@ int n; column *col; - - -/* Line 293 of yacc.c */ -#line 251 "eqn.cpp" -} YYSTYPE; +#line 247 "eqn.cpp" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -/* Copy the second part of user declarations. */ +extern YYSTYPE yylval; + +int yyparse (void); +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ -/* Line 343 of yacc.c */ -#line 263 "eqn.cpp" +/* Copy the second part of user declarations. */ + +#line 262 "eqn.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -273,11 +272,8 @@ #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -297,8 +293,7 @@ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -312,39 +307,68 @@ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -362,9 +386,9 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -374,8 +398,8 @@ # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -391,7 +415,7 @@ # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -399,15 +423,13 @@ # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -417,7 +439,7 @@ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -442,35 +464,35 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -486,17 +508,19 @@ #define YYNNTS 18 /* YYNRULES -- Number of rules. */ #define YYNRULES 75 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 142 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 315 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 63, @@ -534,65 +558,21 @@ }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 4, 6, 8, 11, 13, 16, 19, - 21, 25, 29, 35, 41, 43, 46, 50, 54, 56, - 60, 62, 66, 72, 74, 76, 79, 82, 84, 86, - 88, 92, 95, 98, 101, 104, 109, 115, 119, 122, - 125, 128, 132, 136, 139, 142, 145, 148, 152, 156, - 160, 164, 168, 172, 176, 179, 183, 185, 187, 191, - 195, 200, 202, 205, 207, 211, 215, 220, 223, 226, - 229, 232, 234, 236, 238, 240 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 67, 0, -1, -1, 68, -1, 69, -1, 68, 69, - -1, 70, -1, 37, 69, -1, 38, 69, -1, 71, - -1, 71, 14, 70, -1, 71, 15, 71, -1, 71, - 15, 71, 14, 70, -1, 71, 15, 71, 15, 70, - -1, 72, -1, 5, 71, -1, 71, 3, 71, -1, - 71, 4, 71, -1, 73, -1, 74, 7, 72, -1, - 74, -1, 74, 6, 73, -1, 74, 6, 74, 7, - 72, -1, 26, -1, 27, -1, 42, 27, -1, 43, - 26, -1, 61, -1, 62, -1, 63, -1, 64, 68, - 65, -1, 11, 77, -1, 8, 77, -1, 9, 77, - -1, 10, 77, -1, 32, 64, 78, 65, -1, 12, - 83, 68, 13, 83, -1, 12, 83, 68, -1, 74, - 23, -1, 74, 24, -1, 74, 41, -1, 74, 22, - 74, -1, 74, 44, 74, -1, 18, 74, -1, 19, - 74, -1, 20, 74, -1, 21, 74, -1, 17, 82, - 74, -1, 16, 82, 74, -1, 28, 75, 74, -1, - 29, 75, 74, -1, 31, 75, 74, -1, 30, 75, - 74, -1, 39, 82, 74, -1, 40, 74, -1, 45, - 82, 74, -1, 82, -1, 68, -1, 76, 25, 68, - -1, 64, 76, 65, -1, 75, 64, 76, 65, -1, - 81, -1, 78, 81, -1, 68, -1, 79, 25, 68, - -1, 64, 79, 65, -1, 75, 64, 79, 65, -1, - 33, 80, -1, 34, 80, -1, 35, 80, -1, 36, - 80, -1, 26, -1, 27, -1, 82, -1, 64, -1, - 65, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 122, 122, 124, 129, 131, 142, 144, 146, 151, - 153, 155, 157, 159, 164, 166, 168, 170, 175, 177, - 182, 184, 186, 191, 193, 195, 197, 199, 201, 203, - 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, - 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, - 245, 247, 249, 251, 253, 255, 260, 270, 272, 277, - 279, 284, 286, 291, 293, 298, 300, 305, 307, 309, - 311, 315, 317, 322, 324, 326 + 0, 121, 121, 123, 128, 130, 141, 143, 145, 150, + 152, 154, 156, 158, 163, 165, 167, 169, 174, 176, + 181, 183, 185, 190, 192, 194, 196, 198, 200, 202, + 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, + 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, + 244, 246, 248, 250, 252, 254, 259, 269, 271, 276, + 278, 283, 285, 290, 292, 297, 299, 304, 306, 308, + 310, 314, 316, 321, 323, 325 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -608,13 +588,13 @@ "'^'", "'~'", "'\\t'", "'{'", "'}'", "$accept", "top", "equation", "mark", "from_to", "sqrt_over", "script", "nonsup", "simple", "number", "pile_element_list", "pile_arg", "column_list", "column_element_list", - "column_arg", "column", "text", "delim", 0 + "column_arg", "column", "text", "delim", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -627,64 +607,18 @@ }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 66, 67, 67, 68, 68, 69, 69, 69, 70, - 70, 70, 70, 70, 71, 71, 71, 71, 72, 72, - 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 75, 76, 76, 77, - 77, 78, 78, 79, 79, 80, 80, 81, 81, 81, - 81, 82, 82, 83, 83, 83 -}; +#define YYPACT_NINF -76 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 1, 1, 2, 1, 2, 2, 1, - 3, 3, 5, 5, 1, 2, 3, 3, 1, 3, - 1, 3, 5, 1, 1, 2, 2, 1, 1, 1, - 3, 2, 2, 2, 2, 4, 5, 3, 2, 2, - 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 2, 3, 1, 1, 3, 3, - 4, 1, 2, 1, 3, 3, 4, 2, 2, 2, - 2, 1, 1, 1, 1, 1 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-76))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 23, 24, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, - 0, 0, 3, 4, 6, 9, 14, 18, 20, 15, - 71, 72, 0, 0, 32, 56, 33, 34, 31, 74, - 75, 73, 0, 0, 0, 43, 44, 45, 46, 0, - 0, 0, 0, 0, 7, 8, 0, 54, 25, 26, - 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, - 0, 38, 39, 40, 0, 57, 0, 0, 37, 48, - 47, 49, 50, 52, 51, 0, 0, 0, 0, 0, - 61, 53, 55, 30, 16, 17, 10, 11, 21, 20, - 19, 41, 42, 0, 59, 0, 0, 0, 0, 67, - 68, 69, 70, 35, 62, 0, 0, 0, 58, 60, - 36, 63, 0, 0, 12, 13, 22, 0, 65, 0, - 64, 66 -}; +#define YYTABLE_NINF -1 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 31, 85, 33, 34, 35, 36, 37, 38, 43, - 86, 44, 99, 132, 119, 100, 45, 52 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -76 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 230, 269, 6, 6, 6, 6, 2, 14, 14, 308, @@ -704,17 +638,45 @@ 230, -76 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 23, 24, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, + 0, 0, 3, 4, 6, 9, 14, 18, 20, 15, + 71, 72, 0, 0, 32, 56, 33, 34, 31, 74, + 75, 73, 0, 0, 0, 43, 44, 45, 46, 0, + 0, 0, 0, 0, 7, 8, 0, 54, 25, 26, + 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, + 0, 38, 39, 40, 0, 57, 0, 0, 37, 48, + 47, 49, 50, 52, 51, 0, 0, 0, 0, 0, + 61, 53, 55, 30, 16, 17, 10, 11, 21, 20, + 19, 41, 42, 0, 59, 0, 0, 0, 0, 67, + 68, 69, 70, 35, 62, 0, 0, 0, 58, 60, + 36, 63, 0, 0, 12, 13, 22, 0, 65, 0, + 64, 66 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -76, -76, 0, -17, -75, 1, -67, -13, 46, -7, 9, 13, -76, -47, 22, -4, -1, -29 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 31, 85, 33, 34, 35, 36, 37, 38, 43, + 86, 44, 99, 132, 119, 100, 45, 52 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 32, 106, 39, 64, 65, 51, 53, 54, 59, 60, @@ -757,12 +719,6 @@ 28, 29, 30, 0, 0, 0, 83, 0, 0, 84 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-76)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 0, 76, 1, 20, 21, 6, 7, 8, 15, 16, @@ -805,8 +761,8 @@ 62, 63, 64, -1, -1, -1, 41, -1, -1, 44 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 5, 8, 9, 10, 11, 12, 16, 17, 18, @@ -826,94 +782,67 @@ 68, 65 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 66, 67, 67, 68, 68, 69, 69, 69, 70, + 70, 70, 70, 70, 71, 71, 71, 71, 72, 72, + 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 75, 76, 76, 77, + 77, 78, 78, 79, 79, 80, 80, 81, 81, 81, + 81, 82, 82, 83, 83, 83 +}; -#define YYRECOVERING() (!!yyerrstatus) + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 1, 1, 2, 1, 2, 2, 1, + 3, 3, 5, 5, 1, 2, 3, 3, 1, 3, + 1, 3, 5, 1, 1, 2, 2, 1, 1, 1, + 3, 2, 2, 2, 2, 4, 5, 3, 2, 2, + 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 2, 3, 1, 1, 3, 3, + 4, 1, 2, 1, 3, 3, 4, 2, 2, 2, + 2, 1, 1, 1, 1, 1 +}; -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -923,54 +852,46 @@ # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -978,22 +899,11 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -1004,16 +914,8 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1024,49 +926,42 @@ YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1080,7 +975,7 @@ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1103,15 +998,8 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1127,16 +1015,8 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1166,27 +1046,27 @@ char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1209,12 +1089,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1222,10 +1101,6 @@ int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1274,11 +1149,13 @@ break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1298,10 +1175,12 @@ # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1338,48 +1217,20 @@ | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ @@ -1387,7 +1238,6 @@ /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; @@ -1396,37 +1246,18 @@ | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1444,7 +1275,7 @@ int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1462,9 +1293,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1473,14 +1303,6 @@ yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1501,23 +1323,23 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1525,22 +1347,22 @@ # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1549,10 +1371,10 @@ yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1581,7 +1403,7 @@ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1621,7 +1443,9 @@ yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1644,7 +1468,7 @@ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1658,531 +1482,456 @@ switch (yyn) { case 3: - -/* Line 1806 of yacc.c */ -#line 125 "eqn.y" - { (yyvsp[(1) - (1)].b)->top_level(); non_empty_flag = 1; } +#line 124 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].b)->top_level(); non_empty_flag = 1; } +#line 1488 "eqn.cpp" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 130 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 129 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1494 "eqn.cpp" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 132 "eqn.y" +#line 131 "eqn.y" /* yacc.c:1646 */ { - list_box *lb = (yyvsp[(1) - (2)].b)->to_list_box(); + list_box *lb = (yyvsp[-1].b)->to_list_box(); if (!lb) - lb = new list_box((yyvsp[(1) - (2)].b)); - lb->append((yyvsp[(2) - (2)].b)); + lb = new list_box((yyvsp[-1].b)); + lb->append((yyvsp[0].b)); (yyval.b) = lb; } +#line 1506 "eqn.cpp" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 143 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 142 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1512 "eqn.cpp" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 145 "eqn.y" - { (yyval.b) = make_mark_box((yyvsp[(2) - (2)].b)); } +#line 144 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_mark_box((yyvsp[0].b)); } +#line 1518 "eqn.cpp" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 147 "eqn.y" - { (yyval.b) = make_lineup_box((yyvsp[(2) - (2)].b)); } +#line 146 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_lineup_box((yyvsp[0].b)); } +#line 1524 "eqn.cpp" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 152 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 151 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1530 "eqn.cpp" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 154 "eqn.y" - { (yyval.b) = make_limit_box((yyvsp[(1) - (3)].b), 0, (yyvsp[(3) - (3)].b)); } +#line 153 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_limit_box((yyvsp[-2].b), 0, (yyvsp[0].b)); } +#line 1536 "eqn.cpp" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 156 "eqn.y" - { (yyval.b) = make_limit_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b), 0); } +#line 155 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0); } +#line 1542 "eqn.cpp" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 158 "eqn.y" - { (yyval.b) = make_limit_box((yyvsp[(1) - (5)].b), (yyvsp[(3) - (5)].b), (yyvsp[(5) - (5)].b)); } +#line 157 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_limit_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); } +#line 1548 "eqn.cpp" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 160 "eqn.y" - { (yyval.b) = make_limit_box((yyvsp[(1) - (5)].b), make_limit_box((yyvsp[(3) - (5)].b), (yyvsp[(5) - (5)].b), 0), 0); } +#line 159 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_limit_box((yyvsp[-4].b), make_limit_box((yyvsp[-2].b), (yyvsp[0].b), 0), 0); } +#line 1554 "eqn.cpp" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 165 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 164 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1560 "eqn.cpp" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 167 "eqn.y" - { (yyval.b) = make_sqrt_box((yyvsp[(2) - (2)].b)); } +#line 166 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_sqrt_box((yyvsp[0].b)); } +#line 1566 "eqn.cpp" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 169 "eqn.y" - { (yyval.b) = make_over_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b)); } +#line 168 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_over_box((yyvsp[-2].b), (yyvsp[0].b)); } +#line 1572 "eqn.cpp" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 171 "eqn.y" - { (yyval.b) = make_small_over_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b)); } +#line 170 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_small_over_box((yyvsp[-2].b), (yyvsp[0].b)); } +#line 1578 "eqn.cpp" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 176 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 175 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1584 "eqn.cpp" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 178 "eqn.y" - { (yyval.b) = make_script_box((yyvsp[(1) - (3)].b), 0, (yyvsp[(3) - (3)].b)); } +#line 177 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_script_box((yyvsp[-2].b), 0, (yyvsp[0].b)); } +#line 1590 "eqn.cpp" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 183 "eqn.y" - { (yyval.b) = (yyvsp[(1) - (1)].b); } +#line 182 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[0].b); } +#line 1596 "eqn.cpp" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 185 "eqn.y" - { (yyval.b) = make_script_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b), 0); } +#line 184 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_script_box((yyvsp[-2].b), (yyvsp[0].b), 0); } +#line 1602 "eqn.cpp" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 187 "eqn.y" - { (yyval.b) = make_script_box((yyvsp[(1) - (5)].b), (yyvsp[(3) - (5)].b), (yyvsp[(5) - (5)].b)); } +#line 186 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_script_box((yyvsp[-4].b), (yyvsp[-2].b), (yyvsp[0].b)); } +#line 1608 "eqn.cpp" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 192 "eqn.y" - { (yyval.b) = split_text((yyvsp[(1) - (1)].str)); } +#line 191 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = split_text((yyvsp[0].str)); } +#line 1614 "eqn.cpp" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 194 "eqn.y" - { (yyval.b) = new quoted_text_box((yyvsp[(1) - (1)].str)); } +#line 193 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new quoted_text_box((yyvsp[0].str)); } +#line 1620 "eqn.cpp" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 196 "eqn.y" - { (yyval.b) = split_text((yyvsp[(2) - (2)].str)); } +#line 195 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = split_text((yyvsp[0].str)); } +#line 1626 "eqn.cpp" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 198 "eqn.y" - { (yyval.b) = new quoted_text_box((yyvsp[(2) - (2)].str)); } +#line 197 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new quoted_text_box((yyvsp[0].str)); } +#line 1632 "eqn.cpp" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 200 "eqn.y" +#line 199 "eqn.y" /* yacc.c:1646 */ { (yyval.b) = new half_space_box; } +#line 1638 "eqn.cpp" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 202 "eqn.y" +#line 201 "eqn.y" /* yacc.c:1646 */ { (yyval.b) = new space_box; } +#line 1644 "eqn.cpp" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 204 "eqn.y" +#line 203 "eqn.y" /* yacc.c:1646 */ { (yyval.b) = new tab_box; } +#line 1650 "eqn.cpp" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 206 "eqn.y" - { (yyval.b) = (yyvsp[(2) - (3)].b); } +#line 205 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[-1].b); } +#line 1656 "eqn.cpp" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 208 "eqn.y" - { (yyvsp[(2) - (2)].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[(2) - (2)].pb); } +#line 207 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); } +#line 1662 "eqn.cpp" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 210 "eqn.y" - { (yyvsp[(2) - (2)].pb)->set_alignment(LEFT_ALIGN); (yyval.b) = (yyvsp[(2) - (2)].pb); } +#line 209 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].pb)->set_alignment(LEFT_ALIGN); (yyval.b) = (yyvsp[0].pb); } +#line 1668 "eqn.cpp" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 212 "eqn.y" - { (yyvsp[(2) - (2)].pb)->set_alignment(RIGHT_ALIGN); (yyval.b) = (yyvsp[(2) - (2)].pb); } +#line 211 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].pb)->set_alignment(RIGHT_ALIGN); (yyval.b) = (yyvsp[0].pb); } +#line 1674 "eqn.cpp" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 214 "eqn.y" - { (yyvsp[(2) - (2)].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[(2) - (2)].pb); } +#line 213 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].pb)->set_alignment(CENTER_ALIGN); (yyval.b) = (yyvsp[0].pb); } +#line 1680 "eqn.cpp" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 216 "eqn.y" - { (yyval.b) = (yyvsp[(3) - (4)].mb); } +#line 215 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = (yyvsp[-1].mb); } +#line 1686 "eqn.cpp" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 218 "eqn.y" - { (yyval.b) = make_delim_box((yyvsp[(2) - (5)].str), (yyvsp[(3) - (5)].b), (yyvsp[(5) - (5)].str)); } +#line 217 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_delim_box((yyvsp[-3].str), (yyvsp[-2].b), (yyvsp[0].str)); } +#line 1692 "eqn.cpp" /* yacc.c:1646 */ break; case 37: - -/* Line 1806 of yacc.c */ -#line 220 "eqn.y" - { (yyval.b) = make_delim_box((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].b), 0); } +#line 219 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_delim_box((yyvsp[-1].str), (yyvsp[0].b), 0); } +#line 1698 "eqn.cpp" /* yacc.c:1646 */ break; case 38: - -/* Line 1806 of yacc.c */ -#line 222 "eqn.y" - { (yyval.b) = make_overline_box((yyvsp[(1) - (2)].b)); } +#line 221 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_overline_box((yyvsp[-1].b)); } +#line 1704 "eqn.cpp" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 224 "eqn.y" - { (yyval.b) = make_underline_box((yyvsp[(1) - (2)].b)); } +#line 223 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_underline_box((yyvsp[-1].b)); } +#line 1710 "eqn.cpp" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 226 "eqn.y" - { (yyval.b) = make_prime_box((yyvsp[(1) - (2)].b)); } +#line 225 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_prime_box((yyvsp[-1].b)); } +#line 1716 "eqn.cpp" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 228 "eqn.y" - { (yyval.b) = make_accent_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b)); } +#line 227 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_accent_box((yyvsp[-2].b), (yyvsp[0].b)); } +#line 1722 "eqn.cpp" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 230 "eqn.y" - { (yyval.b) = make_uaccent_box((yyvsp[(1) - (3)].b), (yyvsp[(3) - (3)].b)); } +#line 229 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_uaccent_box((yyvsp[-2].b), (yyvsp[0].b)); } +#line 1728 "eqn.cpp" /* yacc.c:1646 */ break; case 43: - -/* Line 1806 of yacc.c */ -#line 232 "eqn.y" - { (yyval.b) = new font_box(strsave(get_grfont()), (yyvsp[(2) - (2)].b)); } +#line 231 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new font_box(strsave(get_grfont()), (yyvsp[0].b)); } +#line 1734 "eqn.cpp" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 234 "eqn.y" - { (yyval.b) = new font_box(strsave(get_gbfont()), (yyvsp[(2) - (2)].b)); } +#line 233 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new font_box(strsave(get_gbfont()), (yyvsp[0].b)); } +#line 1740 "eqn.cpp" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 236 "eqn.y" - { (yyval.b) = new font_box(strsave(get_gfont()), (yyvsp[(2) - (2)].b)); } +#line 235 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new font_box(strsave(get_gfont()), (yyvsp[0].b)); } +#line 1746 "eqn.cpp" /* yacc.c:1646 */ break; case 46: - -/* Line 1806 of yacc.c */ -#line 238 "eqn.y" - { (yyval.b) = new fat_box((yyvsp[(2) - (2)].b)); } +#line 237 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new fat_box((yyvsp[0].b)); } +#line 1752 "eqn.cpp" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 240 "eqn.y" - { (yyval.b) = new font_box((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].b)); } +#line 239 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new font_box((yyvsp[-1].str), (yyvsp[0].b)); } +#line 1758 "eqn.cpp" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 242 "eqn.y" - { (yyval.b) = new size_box((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].b)); } +#line 241 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new size_box((yyvsp[-1].str), (yyvsp[0].b)); } +#line 1764 "eqn.cpp" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 244 "eqn.y" - { (yyval.b) = new hmotion_box((yyvsp[(2) - (3)].n), (yyvsp[(3) - (3)].b)); } +#line 243 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new hmotion_box((yyvsp[-1].n), (yyvsp[0].b)); } +#line 1770 "eqn.cpp" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 246 "eqn.y" - { (yyval.b) = new hmotion_box(-(yyvsp[(2) - (3)].n), (yyvsp[(3) - (3)].b)); } +#line 245 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new hmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); } +#line 1776 "eqn.cpp" /* yacc.c:1646 */ break; case 51: - -/* Line 1806 of yacc.c */ -#line 248 "eqn.y" - { (yyval.b) = new vmotion_box((yyvsp[(2) - (3)].n), (yyvsp[(3) - (3)].b)); } +#line 247 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new vmotion_box((yyvsp[-1].n), (yyvsp[0].b)); } +#line 1782 "eqn.cpp" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 250 "eqn.y" - { (yyval.b) = new vmotion_box(-(yyvsp[(2) - (3)].n), (yyvsp[(3) - (3)].b)); } +#line 249 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new vmotion_box(-(yyvsp[-1].n), (yyvsp[0].b)); } +#line 1788 "eqn.cpp" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 252 "eqn.y" - { (yyvsp[(3) - (3)].b)->set_spacing_type((yyvsp[(2) - (3)].str)); (yyval.b) = (yyvsp[(3) - (3)].b); } +#line 251 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].b)->set_spacing_type((yyvsp[-1].str)); (yyval.b) = (yyvsp[0].b); } +#line 1794 "eqn.cpp" /* yacc.c:1646 */ break; case 54: - -/* Line 1806 of yacc.c */ -#line 254 "eqn.y" - { (yyval.b) = new vcenter_box((yyvsp[(2) - (2)].b)); } +#line 253 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = new vcenter_box((yyvsp[0].b)); } +#line 1800 "eqn.cpp" /* yacc.c:1646 */ break; case 55: - -/* Line 1806 of yacc.c */ -#line 256 "eqn.y" - { (yyval.b) = make_special_box((yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].b)); } +#line 255 "eqn.y" /* yacc.c:1646 */ + { (yyval.b) = make_special_box((yyvsp[-1].str), (yyvsp[0].b)); } +#line 1806 "eqn.cpp" /* yacc.c:1646 */ break; case 56: - -/* Line 1806 of yacc.c */ -#line 261 "eqn.y" +#line 260 "eqn.y" /* yacc.c:1646 */ { int n; - if (sscanf((yyvsp[(1) - (1)].str), "%d", &n) == 1) + if (sscanf((yyvsp[0].str), "%d", &n) == 1) (yyval.n) = n; - a_delete (yyvsp[(1) - (1)].str); + a_delete (yyvsp[0].str); } +#line 1817 "eqn.cpp" /* yacc.c:1646 */ break; case 57: - -/* Line 1806 of yacc.c */ -#line 271 "eqn.y" - { (yyval.pb) = new pile_box((yyvsp[(1) - (1)].b)); } +#line 270 "eqn.y" /* yacc.c:1646 */ + { (yyval.pb) = new pile_box((yyvsp[0].b)); } +#line 1823 "eqn.cpp" /* yacc.c:1646 */ break; case 58: - -/* Line 1806 of yacc.c */ -#line 273 "eqn.y" - { (yyvsp[(1) - (3)].pb)->append((yyvsp[(3) - (3)].b)); (yyval.pb) = (yyvsp[(1) - (3)].pb); } +#line 272 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[-2].pb)->append((yyvsp[0].b)); (yyval.pb) = (yyvsp[-2].pb); } +#line 1829 "eqn.cpp" /* yacc.c:1646 */ break; case 59: - -/* Line 1806 of yacc.c */ -#line 278 "eqn.y" - { (yyval.pb) = (yyvsp[(2) - (3)].pb); } +#line 277 "eqn.y" /* yacc.c:1646 */ + { (yyval.pb) = (yyvsp[-1].pb); } +#line 1835 "eqn.cpp" /* yacc.c:1646 */ break; case 60: - -/* Line 1806 of yacc.c */ -#line 280 "eqn.y" - { (yyvsp[(3) - (4)].pb)->set_space((yyvsp[(1) - (4)].n)); (yyval.pb) = (yyvsp[(3) - (4)].pb); } +#line 279 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[-1].pb)->set_space((yyvsp[-3].n)); (yyval.pb) = (yyvsp[-1].pb); } +#line 1841 "eqn.cpp" /* yacc.c:1646 */ break; case 61: - -/* Line 1806 of yacc.c */ -#line 285 "eqn.y" - { (yyval.mb) = new matrix_box((yyvsp[(1) - (1)].col)); } +#line 284 "eqn.y" /* yacc.c:1646 */ + { (yyval.mb) = new matrix_box((yyvsp[0].col)); } +#line 1847 "eqn.cpp" /* yacc.c:1646 */ break; case 62: - -/* Line 1806 of yacc.c */ -#line 287 "eqn.y" - { (yyvsp[(1) - (2)].mb)->append((yyvsp[(2) - (2)].col)); (yyval.mb) = (yyvsp[(1) - (2)].mb); } +#line 286 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[-1].mb)->append((yyvsp[0].col)); (yyval.mb) = (yyvsp[-1].mb); } +#line 1853 "eqn.cpp" /* yacc.c:1646 */ break; case 63: - -/* Line 1806 of yacc.c */ -#line 292 "eqn.y" - { (yyval.col) = new column((yyvsp[(1) - (1)].b)); } +#line 291 "eqn.y" /* yacc.c:1646 */ + { (yyval.col) = new column((yyvsp[0].b)); } +#line 1859 "eqn.cpp" /* yacc.c:1646 */ break; case 64: - -/* Line 1806 of yacc.c */ -#line 294 "eqn.y" - { (yyvsp[(1) - (3)].col)->append((yyvsp[(3) - (3)].b)); (yyval.col) = (yyvsp[(1) - (3)].col); } +#line 293 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[-2].col)->append((yyvsp[0].b)); (yyval.col) = (yyvsp[-2].col); } +#line 1865 "eqn.cpp" /* yacc.c:1646 */ break; case 65: - -/* Line 1806 of yacc.c */ -#line 299 "eqn.y" - { (yyval.col) = (yyvsp[(2) - (3)].col); } +#line 298 "eqn.y" /* yacc.c:1646 */ + { (yyval.col) = (yyvsp[-1].col); } +#line 1871 "eqn.cpp" /* yacc.c:1646 */ break; case 66: - -/* Line 1806 of yacc.c */ -#line 301 "eqn.y" - { (yyvsp[(3) - (4)].col)->set_space((yyvsp[(1) - (4)].n)); (yyval.col) = (yyvsp[(3) - (4)].col); } +#line 300 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[-1].col)->set_space((yyvsp[-3].n)); (yyval.col) = (yyvsp[-1].col); } +#line 1877 "eqn.cpp" /* yacc.c:1646 */ break; case 67: - -/* Line 1806 of yacc.c */ -#line 306 "eqn.y" - { (yyvsp[(2) - (2)].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[(2) - (2)].col); } +#line 305 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); } +#line 1883 "eqn.cpp" /* yacc.c:1646 */ break; case 68: - -/* Line 1806 of yacc.c */ -#line 308 "eqn.y" - { (yyvsp[(2) - (2)].col)->set_alignment(LEFT_ALIGN); (yyval.col) = (yyvsp[(2) - (2)].col); } +#line 307 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].col)->set_alignment(LEFT_ALIGN); (yyval.col) = (yyvsp[0].col); } +#line 1889 "eqn.cpp" /* yacc.c:1646 */ break; case 69: - -/* Line 1806 of yacc.c */ -#line 310 "eqn.y" - { (yyvsp[(2) - (2)].col)->set_alignment(RIGHT_ALIGN); (yyval.col) = (yyvsp[(2) - (2)].col); } +#line 309 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].col)->set_alignment(RIGHT_ALIGN); (yyval.col) = (yyvsp[0].col); } +#line 1895 "eqn.cpp" /* yacc.c:1646 */ break; case 70: - -/* Line 1806 of yacc.c */ -#line 312 "eqn.y" - { (yyvsp[(2) - (2)].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[(2) - (2)].col); } +#line 311 "eqn.y" /* yacc.c:1646 */ + { (yyvsp[0].col)->set_alignment(CENTER_ALIGN); (yyval.col) = (yyvsp[0].col); } +#line 1901 "eqn.cpp" /* yacc.c:1646 */ break; case 71: - -/* Line 1806 of yacc.c */ -#line 316 "eqn.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 315 "eqn.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1907 "eqn.cpp" /* yacc.c:1646 */ break; case 72: - -/* Line 1806 of yacc.c */ -#line 318 "eqn.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 317 "eqn.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1913 "eqn.cpp" /* yacc.c:1646 */ break; case 73: - -/* Line 1806 of yacc.c */ -#line 323 "eqn.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); } +#line 322 "eqn.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].str); } +#line 1919 "eqn.cpp" /* yacc.c:1646 */ break; case 74: - -/* Line 1806 of yacc.c */ -#line 325 "eqn.y" +#line 324 "eqn.y" /* yacc.c:1646 */ { (yyval.str) = strsave("{"); } +#line 1925 "eqn.cpp" /* yacc.c:1646 */ break; case 75: - -/* Line 1806 of yacc.c */ -#line 327 "eqn.y" +#line 326 "eqn.y" /* yacc.c:1646 */ { (yyval.str) = strsave("}"); } +#line 1931 "eqn.cpp" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 2186 "eqn.cpp" +#line 1935 "eqn.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2204,7 +1953,7 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2219,9 +1968,9 @@ goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2272,20 +2021,20 @@ if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2304,7 +2053,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2317,35 +2066,37 @@ | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2369,7 +2120,7 @@ yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2388,14 +2139,14 @@ yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2406,13 +2157,7 @@ if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 330 "eqn.y" - +#line 329 "eqn.y" /* yacc.c:1906 */ diff -ruN groff-1.22.2/src/preproc/eqn/eqn.h groff-1.22.3/src/preproc/eqn/eqn.h --- groff-1.22.2/src/preproc/eqn/eqn.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/eqn.h 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/eqn.man groff-1.22.3/src/preproc/eqn/eqn.man --- groff-1.22.2/src/preproc/eqn/eqn.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/eqn.man 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,11 @@ -.ig -Copyright (C) 1989-2001, 2004, 2005, 2007, 2009, 2013 - Free Software Foundation, Inc. +.TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@eqn \- format equations for troff or MathML +. +. +.\" license (copying) +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,7 +23,6 @@ the original English. .. . -. .ie \n(.V<\n(.v \ . ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X .el \ @@ -32,20 +36,15 @@ . el .TP "\\$1" .. . -. .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". -.tr \(ts" -. -. -.TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -@g@eqn \- format equations for troff or MathML +.tr \(ts"\"" . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .SY @g@eqn .OP \-rvCNR .OP \-d xy @@ -59,29 +58,39 @@ .YS . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. This manual page describes the GNU version of .BR eqn , which is part of the groff document formatting system. +. .B eqn compiles descriptions of equations embedded within .B troff input files into commands that are understood by .BR troff . +. Normally, it should be invoked using the .B \-e option of .BR groff . +. The syntax is quite compatible with Unix eqn. +. The output of GNU .B eqn cannot be processed with Unix troff; it must be processed with GNU troff. +. If no files are given on the command line, the standard input is read. +. A filename of .B \- causes the standard input to be read. . +. .LP .B eqn searches for the file @@ -93,13 +102,16 @@ .BR @LOCALMACRODIR@ , and finally in the standard macro directory .BR @MACRODIR@ . +. If it exists, .B eqn processes it before the other input files. +. The .B \-R option prevents this. . +. .LP GNU .B eqn @@ -108,7 +120,10 @@ (although it may work adequately for very simple input). . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .LP It is possible to have whitespace between a command line option and its parameter. @@ -120,6 +135,7 @@ and\~\c .I y for the left and right end, respectively, of in-line equations. +. Any .B delim statements in the source file overrides this. @@ -131,12 +147,15 @@ and .B .EN even when followed by a character other than space or newline. +. Also, the statement -.RB ` "delim on" ' +.RB \[oq] "delim on" \[cq] is not handled specially. +. .TP .B \-N -Don't allow newlines within delimiters. +Don\[aq]t allow newlines within delimiters. +. This option allows .B eqn to recover better from missing closing delimiters. @@ -153,6 +172,7 @@ .BI \-m n The minimum point-size is\~\c .IR n . +. .B eqn does not reduce the size of subscripts or superscripts to a smaller size than\~\c @@ -162,16 +182,19 @@ .BI \-T name The output is for device .IR name . +. Normally, the only effect of this is to define a macro .I name with a value of\~\c .BR 1 ; .B eqnrc uses this to provide definitions appropriate for the output device. +. However, if the specified device is \[lq]MathML\[rq], the output is -MathML markup rather than troff commands, and +MathML markup rather than troff commands, and .B eqnrc is not loaded at all. +. The default output device is .BR @DEVICE@ . . @@ -185,7 +208,7 @@ . .TP .B \-R -Don't load +Don\[aq]t load .BR eqnrc . . .TP @@ -199,6 +222,7 @@ This is equivalent to a .BI gsize\ n command. +. This option is deprecated. .B eqn normally sets equations at whatever the current point size @@ -209,44 +233,56 @@ This says that subscripts and superscripts should be .I n\~\c points smaller than the surrounding text. -This option is deprecated. +. +This option is deprecated. +. Normally .B eqn -sets subscripts and superscripts at 70% of the size of the -surrounding text. +sets subscripts and superscripts at 70% of the size of the surrounding +text. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- +. Only the differences between GNU .B eqn and Unix eqn are described here. . +. .LP GNU .B eqn -emits Presentation MathML output when invoked with the +emits Presentation MathML output when invoked with the .B "-T\~MathML" option. . +. .LP -GNU eqn sets the input token -.B \&"..." +GNU eqn sets the input token +.B \&"..." as three periods or low dots, rather than the three centered dots of classic eqn. To get three centered dots, write .B "cdots" -or +or .BR "cdot cdot cdot". . +. .LP Most of the new features of the GNU .B eqn input language are based on \*(tx. +. There are some references to the differences between \*(tx and GNU .B eqn below; these may safely be ignored if you do not know \*(tx. . +. +.\" -------------------------------------------------------------------- .SS Controlling delimiters +.\" -------------------------------------------------------------------- . If not in compatibility mode, .B eqn @@ -260,58 +296,66 @@ .LP to restore the delimiters which have been previously disabled with a call to -.RB ` "delim off" '. -If delimiters haven't been specified, the call has no effect. +.RB \[oq] "delim off" \[cq]. +. +If delimiters haven\[aq]t been specified, the call has no effect. . +. +.\" -------------------------------------------------------------------- .SS Automatic spacing +.\" -------------------------------------------------------------------- +. .B eqn gives each component of an equation a type, and adjusts the spacing between components using that type. +. Possible types are: . .RS .TP \w'punctuation'u+2n -ordinary -an ordinary character such as `1' or `\c -.IR x '; +ordinary an ordinary character such as \[oq]1\[cq] or \[oq]\c +.IR x \[cq]; . .TP operator a large operator such as -.ds Su `\s+5\(*S\s0' +.ds Su \[oq]\s+5\(*S\s0\[cq] .if \n(.g .if !c\(*S .ds Su the summation operator \*(Su; . .TP binary -a binary operator such as `\(pl'; +a binary operator such as \[oq]\[pl]\[cq]; . .TP relation -a relation such as `='; +a relation such as \[oq]=\[cq]; . .TP opening -a opening bracket such as `('; +a opening bracket such as \[oq](\[cq]; . .TP closing -a closing bracket such as `)'; +a closing bracket such as \[oq])\[cq]; . .TP punctuation -a punctuation character such as `,'; +a punctuation character such as \[oq],\[cl]; . .TP inner a subformula contained within brackets; +. .TP -suppress -spacing that suppresses automatic spacing adjustment. +suppress spacing +that suppresses automatic spacing adjustment. .RE . +. .LP -Components of an equation get a type in one of two ways. +Components of an equation +get a type in one of two ways. . .TP .BI type\ t\ e @@ -322,6 +366,7 @@ where .I t is one of the types mentioned above. +. For example, .B times is defined as @@ -333,7 +378,7 @@ .RE . .IP -The name of the type doesn't have to be quoted, but quoting protects +The name of the type doesn\[aq]t have to be quoted, but quoting protects from macro expansion. . .TP @@ -354,8 +399,9 @@ .RE . .IP -would make the characters `.,;:' have type punctuation +would make the characters \[oq].,;:\[cq] have type punctuation whenever they subsequently appeared in an equation. +. The type\~\c .I t can also be @@ -365,17 +411,23 @@ in these cases .B chartype changes the font type of the characters. +. See the .B Fonts subsection. . +. +.\" -------------------------------------------------------------------- .SS New primitives +.\" -------------------------------------------------------------------- +. .TP .BI big\ e -Enlarges the expression it modifies; intended to have semantics like -CSS `large'. -In troff output, the point size is increased by\~5; -in MathML output, the expression uses +Enlarges the expression it modifies; intended to have semantics like +CSS \[oq]large\[cq]. +. +In troff output, the point size is increased by\~5; in MathML output, +the expression uses . .RS .IP @@ -398,6 +450,7 @@ or .I e2 and the fraction bar. +. The .B over primitive corresponds to the \*(tx @@ -413,9 +466,11 @@ This vertically centers .I e about the math axis. -The math axis is the vertical position about which characters -such as `\(pl' and `\(mi' are centered; also it is the vertical position -used for the bar of fractions. +. +The math axis is the vertical position about which characters such as +\[oq]\[pl]\[]cq and \[oq]\[mi]\[cq] are centered; also it is the +vertical position used for the bar of fractions. +. For example, .B sum is defined as @@ -441,6 +496,7 @@ is moved down according to whether .I e1 is taller or shorter than a lowercase letter. +. For example, .B hat is defined as @@ -474,6 +530,7 @@ is moved down if .I e1 has a descender. +. .B utilde is pre-defined using .B uaccent @@ -518,6 +575,7 @@ .B prime that acts as an operator on\~\c .IR e . +. It produces a different result from .B prime in a case such as @@ -534,6 +592,7 @@ the\~\c .B 1 is a subscript to the prime character. +. The precedence of .B opprime is the same as that of @@ -544,8 +603,9 @@ .B accent and .BR uaccent . +. In unquoted text a\~\c -.B ' +.B \[aq] that is not the first character is treated like .BR opprime . . @@ -557,6 +617,7 @@ .BR @g@troff (@MAN1EXT@) macro named .IR text . +. When the macro is called, the string .B 0s @@ -571,6 +632,7 @@ .BR 0skew contain the width, height, depth, subscript kern, and skew of\~\c .IR e . +. (The .I "subscript kern" of an object says how much a subscript on that object should be tucked in; @@ -578,17 +640,19 @@ .I skew of an object says how far to the right of the center of the object an accent over the object should be placed.) +. The macro must modify .B 0s so that it outputs the desired result with its origin at the current point, and increase the current horizontal position by the width of the object. +. The number registers must also be modified so that they correspond to the result. . .IP -For example, suppose you wanted a construct that `cancels' an expression -by drawing a diagonal line through it. +For example, suppose you wanted a construct that \[oq]cancels\[cq] an +expression by drawing a diagonal line through it. . .RS .IP @@ -624,7 +688,8 @@ .BI \%cancel\ {\ e\ } . .IP -Here's a more complicated construct that draws a box round an expression: +Here\[aq]s a more complicated construct that draws a box round an +expression: . .RS .IP @@ -672,11 +737,12 @@ .BI space\ n A positive value of the integer\~\c .I n -(in hundredths of an em) sets the vertical spacing before the equation, -a negative value sets the spacing after the equation, replacing the -default values. +(in hundredths of an em) sets the vertical spacing before the +equation, a negative value sets the spacing after the equation, +replacing the default values. +. This primitive provides an interface to -.BR groff 's +.BR groff \[aq]s .B \ex escape (but with opposite sign). . @@ -685,7 +751,11 @@ .B pic picture. . +. +.\" -------------------------------------------------------------------- .SS Extended primitives +.\" -------------------------------------------------------------------- +. .TP .BI col\ n\ {\ .\|.\|.\ } .TQ @@ -706,20 +776,26 @@ .I n (in hundredths of an em) increases the vertical spacing between rows, using -.BR groff 's +.BR groff \[aq]s .B \ex escape (the value has no effect in MathML mode). Negative values are possible but have no effect. If there is more than a single value given in a matrix, the biggest one is used. . +. +.\" -------------------------------------------------------------------- .SS Customization -When +.\" -------------------------------------------------------------------- +. +When .B eqn is generating troff markup, the appearance of equations is controlled -by a large number of parameters. They have no effect when generating -MathML mode, which pushes typesetting and fine motions downstream to -a MathML rendering engine. +by a large number of parameters. +. +They have no effect when generating MathML mode, which pushes +typesetting and fine motions downstream to a MathML rendering engine. +. These parameters can be set using the .B set command. @@ -732,6 +808,7 @@ .IR n ; .I n\~\c is an integer. +. For example, . .RS @@ -745,10 +822,13 @@ .B eqn should assume an x\~height of 0.45\~ems. . +. .RS .LP Possible parameters are as follows. +. Values are in units of hundredths of an em unless otherwise stated. +. These descriptions are intended to be expository rather than definitive. . @@ -758,16 +838,17 @@ . TP .B minimum_size .B eqn -doesn't set anything at a smaller point-size than this. +doesn\[aq]t set anything at a smaller point-size than this. +. The value is in points. . .TP .B fat_offset The .B fat -primitive emboldens an equation -by overprinting two copies of the equation -horizontally offset by this amount. +primitive emboldens an equation by overprinting two copies of the +equation horizontally offset by this amount. +. This parameter is not used in MathML mode; instead, fat text uses . .RS @@ -792,6 +873,7 @@ .B under is applied to a single character, the line is this long. +. Normally, .B bar or @@ -816,16 +898,13 @@ .B left and .B right -primitives have a combined height and depth -not less than the difference of -twice the maximum amount by which the sub-equation that -the delimiters enclose extends away from the axis -and this amount. +primitives have a combined height and depth not less than the +difference of twice the maximum amount by which the sub-equation that +the delimiters enclose extends away from the axis and this amount. . .TP .B null_delimiter_space -This much horizontal space is inserted -on each side of a fraction. +This much horizontal space is inserted on each side of a fraction. . .TP .B script_space @@ -838,8 +917,8 @@ . .TP .B medium_space -This amount of space is automatically inserted on either side -of binary operators. +This amount of space is automatically inserted on either side of +binary operators. . .TP .B thick_space @@ -848,12 +927,13 @@ . .TP .B x_height -The height of lowercase letters without ascenders such as `x'. +The height of lowercase letters without ascenders such as \[oq]x\[cq]. . .TP .B axis_height -The height above the baseline of the center of characters -such as `\(pl' and `\(mi'. +The height above the baseline of the center of characters such as +\[oq]\[pl]\[cq] and \[oq]\[mi]\[cq]. +. It is important that this value is correct for the font you are using. . @@ -898,8 +978,8 @@ Superscripts within superscripts or upper limits or numerators of .B smallover -fractions -are shifted up by at least this amount. +fractions are shifted up by at least this amount. +. This is usually less than sup1. . .TP @@ -907,6 +987,7 @@ Superscripts within denominators or square roots or subscripts or lower limits are shifted up by at least this amount. +. This is usually less than sup2. . .TP @@ -915,39 +996,38 @@ . .TP .B sub2 -When there is both a subscript and a superscript, the subscript -is shifted down by at least this amount. +When there is both a subscript and a superscript, the subscript is +shifted down by at least this amount. . .TP .B sup_drop -The baseline of a superscript is no more -than this much amount below the top of the object on -which the superscript is set. +The baseline of a superscript is no more than this much amount below +the top of the object on which the superscript is set. . .TP .B sub_drop -The baseline of a subscript is at least this much below -the bottom of the object on which the subscript is set. +The baseline of a subscript is at least this much below the bottom of +the object on which the subscript is set. . .TP .B big_op_spacing1 -The baseline of an upper limit is at least this -much above the top of the object on which the limit is set. +The baseline of an upper limit is at least this much above the top of +the object on which the limit is set. . .TP .B big_op_spacing2 -The baseline of a lower limit is at least this -much below the bottom of the object on which the limit is set. +The baseline of a lower limit is at least this much below the bottom +of the object on which the limit is set. . .TP .B big_op_spacing3 -The bottom of an upper limit is at least this much above the -top of the object on which the limit is set. +The bottom of an upper limit is at least this much above the top of +the object on which the limit is set. . .TP .B big_op_spacing4 -The top of a lower limit is at least this much below -the bottom of the object on which the limit is set. +The top of a lower limit is at least this much below the bottom of the +object on which the limit is set. . .TP .B big_op_spacing5 @@ -955,8 +1035,9 @@ . .TP .B baseline_sep -The baselines of the rows in a pile or matrix are normally -this far apart. +The baselines of the rows in a pile or matrix are normally this far +apart. +. In most cases this should be equal to the sum of .B num1 and @@ -964,8 +1045,9 @@ . .TP .B shift_down -The midpoint between the top baseline and the bottom baseline -in a matrix or pile is shifted down by this much from the axis. +The midpoint between the top baseline and the bottom baseline in a +matrix or pile is shifted down by this much from the axis. +. In most cases this should be equal to .BR axis_height . . @@ -989,18 +1071,18 @@ . .TP .B body_height -The amount by which the height of the equation exceeds this -is added as extra space before the line containing the equation -(using +The amount by which the height of the equation exceeds this is added +as extra space before the line containing the equation (using .BR \ex ). +. The default value is 85. . .TP .B body_depth -The amount by which the depth of the equation exceeds this -is added as extra space after the line containing the equation -(using +The amount by which the depth of the equation exceeds this is added as +extra space after the line containing the equation (using .BR \ex ). +. The default value is 35. . .TP @@ -1012,16 +1094,15 @@ .B define and .B tdefine -is ignored, -otherwise +is ignored, otherwise .B tdefine behaves like .B define and .B ndefine is ignored. -The default value is\~0 -(This is typically changed to\~1 by the +. +The default value is\~0 (This is typically changed to\~1 by the .B eqnrc file for the .BR ascii , @@ -1031,34 +1112,38 @@ .B cp1047 devices.) . +. .LP A more precise description of the role of many of these parameters can be found in Appendix\~H of .IR "The \*(txbook" . .RE . +. +.\" -------------------------------------------------------------------- .SS Macros +.\" -------------------------------------------------------------------- +. Macros can take arguments. +. In a macro body, .BI $ n where .I n -is between 1 and\~9, -is replaced by the +is between 1 and\~9, is replaced by the .IR n-th argument if the macro is called with arguments; if there are fewer than .I n\~\c arguments, it is replaced by nothing. +. A word containing a left parenthesis where the part of the word before the left parenthesis has been defined using the .B define -command -is recognized as a macro call with arguments; -characters following the left parenthesis -up to a matching right parenthesis are treated as comma-separated -arguments; -commas inside nested parentheses do not terminate an argument. +command is recognized as a macro call with arguments; characters +following the left parenthesis up to a matching right parenthesis are +treated as comma-separated arguments; commas inside nested parentheses +do not terminate an argument. . .TP .BI sdefine\ name\ X\ anything\ X @@ -1078,6 +1163,7 @@ and .B copy are synonyms). +. Lines of .I file beginning with @@ -1094,11 +1180,11 @@ .B define (or has been automatically defined because .I name -is the output device) -process +is the output device) process .IR anything ; otherwise ignore .IR anything . +. .I X can be any character not appearing in .IR anything . @@ -1109,6 +1195,7 @@ .IR name , making it undefined. . +. .LP Besides the macros mentioned above, the following definitions are available: .BR Alpha , @@ -1121,23 +1208,27 @@ \&.\|.\|., .BR OMEGA ), .B ldots -(three dots on the base line), -and +(three dots on the base line), and .BR dollar . . +. +.\" -------------------------------------------------------------------- .SS Fonts +.\" -------------------------------------------------------------------- +. .B eqn normally uses at least two fonts to set an equation: an italic font for letters, and a roman font for everything else. +. The existing .B gfont command changes the font that is used as the italic font. +. By default this is\~\c .BR I . -The font that is used as the roman font can be changed -using the new +The font that is used as the roman font can be changed using the new .B grfont command. . @@ -1146,6 +1237,7 @@ Set the roman font to\~\c .IR f . . +. .LP The .B italic @@ -1155,66 +1247,78 @@ .B roman primitive uses the current roman font set by .BR grfont . +. There is also a new .B gbfont command, which changes the font used by the .B bold primitive. +. If you only use the .BR roman , .B italic and .B bold -primitives to changes fonts within an equation, -you can change all the fonts used by your equations -just by using +primitives to changes fonts within an equation, you can change all the +fonts used by your equations just by using .BR gfont , .B grfont and .B gbfont commands. . +. .LP You can control which characters are treated as letters (and therefore set in italics) by using the .B chartype command described above. +. A type of .B letter causes a character to be set in italic type. +. A type of .B digit causes a character to be set in roman type. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'\fB@MACRODIR@/eqnrc'u+2n .B @MACRODIR@/eqnrc Initialization file. . . +.\" -------------------------------------------------------------------- .SH MATHML MODE LIMITATIONS +.\" -------------------------------------------------------------------- +. MathML is designed on the assumption that it cannot know the exact physical characteristics of the media and devices on which it will be rendered. +. It does not support fine control of motions and sizes to the same degree troff does. +. Thus: . -.IP * +.IP * .B eqn parameters have no effect on the generated MathML. . .IP * -The +The .BR special, .BR up , .BR down , .BR fwd , and .B back -operations cannot be implemented, and yield a -MathML `' message instead. +operations cannot be implemented, and yield a MathML +\[oq]\[cq] message instead. . .IP * The @@ -1225,10 +1329,11 @@ .IP * Characters that .B eqn -over troff sets extra large \(en notably the integral sign \(en -may appear too small and need to have their `' wrappers +over troff sets extra large \(en notably the integral sign \(en may +appear too small and need to have their \[oq]\[cq] wrappers adjusted by hand. . +. .LP As in its troff mode, .B eqn @@ -1238,38 +1343,63 @@ .B .EN delimiters in place for displayed equations, but emits no explicit delimiters around inline equations. -They can, however, be recognized as strings that begin with `' -and end with `' and do not cross line boundaries. +. +They can, however, be recognized as strings that begin with +\[oq]\[cq] and end with \[oq]\[cq] and do not cross line +boundaries. +. . .LP -See the +See the .B BUGS -section for translation limits specific to +section for translation limits specific to .BR eqn . . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. Inline equations are set at the point size that is current at the beginning of the input line. +. +. .LP In MathML mode, the .B mark and .B lineup -features don't work. -These could, in theory, be implemented with `' elements. +features don\[aq]t work. +. +These could, in theory, be implemented with \[oq]\[cq] +elements. +. +. .LP In MathML mode, each digit of a numeric literal gets a separate -`\:' pair, and decimal points are tagged with `\:'. +\[oq]\:\[cq] pair, and decimal points are tagged with +\[oq]\:\[cq]. +. This is allowed by the specification, but inefficient. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR groff_font (@MAN5EXT@), -.I The\ \*(txbook +.I The\ \*[tx]book +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +. +.co +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/src/preproc/eqn/eqn_tab.h groff-1.22.3/src/preproc/eqn/eqn_tab.h --- groff-1.22.2/src/preproc/eqn/eqn_tab.h 2013-02-07 13:06:14.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/eqn_tab.h 2014-11-04 09:38:38.300485555 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 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 . */ @@ -26,76 +26,84 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - OVER = 258, - SMALLOVER = 259, - SQRT = 260, - SUB = 261, - SUP = 262, - LPILE = 263, - RPILE = 264, - CPILE = 265, - PILE = 266, - LEFT = 267, - RIGHT = 268, - TO = 269, - FROM = 270, - SIZE = 271, - FONT = 272, - ROMAN = 273, - BOLD = 274, - ITALIC = 275, - FAT = 276, - ACCENT = 277, - BAR = 278, - UNDER = 279, - ABOVE = 280, - TEXT = 281, - QUOTED_TEXT = 282, - FWD = 283, - BACK = 284, - DOWN = 285, - UP = 286, - MATRIX = 287, - COL = 288, - LCOL = 289, - RCOL = 290, - CCOL = 291, - MARK = 292, - LINEUP = 293, - TYPE = 294, - VCENTER = 295, - PRIME = 296, - SPLIT = 297, - NOSPLIT = 298, - UACCENT = 299, - SPECIAL = 300, - SPACE = 301, - GFONT = 302, - GSIZE = 303, - DEFINE = 304, - NDEFINE = 305, - TDEFINE = 306, - SDEFINE = 307, - UNDEF = 308, - IFDEF = 309, - INCLUDE = 310, - DELIM = 311, - CHARTYPE = 312, - SET = 313, - GRFONT = 314, - GBFONT = 315 - }; + enum yytokentype + { + OVER = 258, + SMALLOVER = 259, + SQRT = 260, + SUB = 261, + SUP = 262, + LPILE = 263, + RPILE = 264, + CPILE = 265, + PILE = 266, + LEFT = 267, + RIGHT = 268, + TO = 269, + FROM = 270, + SIZE = 271, + FONT = 272, + ROMAN = 273, + BOLD = 274, + ITALIC = 275, + FAT = 276, + ACCENT = 277, + BAR = 278, + UNDER = 279, + ABOVE = 280, + TEXT = 281, + QUOTED_TEXT = 282, + FWD = 283, + BACK = 284, + DOWN = 285, + UP = 286, + MATRIX = 287, + COL = 288, + LCOL = 289, + RCOL = 290, + CCOL = 291, + MARK = 292, + LINEUP = 293, + TYPE = 294, + VCENTER = 295, + PRIME = 296, + SPLIT = 297, + NOSPLIT = 298, + UACCENT = 299, + SPECIAL = 300, + SPACE = 301, + GFONT = 302, + GSIZE = 303, + DEFINE = 304, + NDEFINE = 305, + TDEFINE = 306, + SDEFINE = 307, + UNDEF = 308, + IFDEF = 309, + INCLUDE = 310, + DELIM = 311, + CHARTYPE = 312, + SET = 313, + GRFONT = 314, + GBFONT = 315 + }; #endif /* Tokens. */ #define OVER 258 @@ -157,15 +165,12 @@ #define GRFONT 314 #define GBFONT 315 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 2068 of yacc.c */ -#line 31 "eqn.y" +#line 30 "eqn.y" /* yacc.c:1909 */ char *str; box *b; @@ -174,16 +179,15 @@ int n; column *col; - - -/* Line 2068 of yacc.c */ -#line 181 "y.tab.h" -} YYSTYPE; +#line 183 "y.tab.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE yylval; +int yyparse (void); +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff -ruN groff-1.22.2/src/preproc/eqn/eqn.y groff-1.22.3/src/preproc/eqn/eqn.y --- groff-1.22.2/src/preproc/eqn/eqn.y 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/eqn.y 2014-11-04 09:38:35.232523909 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/lex.cpp groff-1.22.3/src/preproc/eqn/lex.cpp --- groff-1.22.2/src/preproc/eqn/lex.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/lex.cpp 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000-2003, 2005, 2007-2009, 2013 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -414,6 +413,11 @@ lineno++; for (;;) { int c = getc(fp); + if (c == '\r') { + c = getc(fp); + if (c != '\n') + lex_error("invalid input character code %1", '\r'); + } if (c == EOF) break; else if (invalid_input_char(c)) diff -ruN groff-1.22.2/src/preproc/eqn/limit.cpp groff-1.22.3/src/preproc/eqn/limit.cpp --- groff-1.22.2/src/preproc/eqn/limit.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/limit.cpp 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/list.cpp groff-1.22.3/src/preproc/eqn/list.cpp --- groff-1.22.2/src/preproc/eqn/list.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/list.cpp 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/main.cpp groff-1.22.3/src/preproc/eqn/main.cpp --- groff-1.22.2/src/preproc/eqn/main.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/main.cpp 2014-11-04 09:38:35.232523909 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000-2002, 2005, 2007, 2009, 2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/Makefile.sub groff-1.22.3/src/preproc/eqn/Makefile.sub --- groff-1.22.2/src/preproc/eqn/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/Makefile.sub 2014-11-04 09:38:35.233523897 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc eqn' +# +# File position: /src/preproc/eqn/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=eqn$(EXEEXT) MAN1=eqn.n neqn.n XLIBS=$(LIBGROFF) @@ -42,19 +66,28 @@ YTABH=eqn_tab.h NAMEPREFIX=$(g) MOSTLYCLEANADD=neqn +RM=rm -f all: neqn neqn: neqn.sh $(SH_DEPS_SED_SCRIPT) - -rm -f $@ + $(RM) $@ sed -e 's/@g@/$(g)/g' \ - -f $(SH_DEPS_SED_SCRIPT) \ - -e $(SH_SCRIPT_SED_CMD) $(srcdir)/neqn.sh >$@ + -f $(SH_DEPS_SED_SCRIPT) \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/neqn.sh >$@ chmod +x $@ install_data: neqn - -rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn + $(RM) $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn $(INSTALL_SCRIPT) neqn $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn + $(RM) $(DESTDIR)$(bindir)/$(NAMEPREFIX)neqn + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/eqn/mark.cpp groff-1.22.3/src/preproc/eqn/mark.cpp --- groff-1.22.2/src/preproc/eqn/mark.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/mark.cpp 2014-11-04 09:38:35.233523897 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/neqn.man groff-1.22.3/src/preproc/eqn/neqn.man --- groff-1.22.2/src/preproc/eqn/neqn.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/neqn.man 2014-11-04 09:38:35.233523897 +0100 @@ -1,5 +1,11 @@ -.ig -Copyright (C) 2001, 2009 Free Software Foundation, Inc. +.TH @G@NEQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@neqn \- format equations for ascii output +. +. +.\" license +.de co +Copyright \[co] 2001-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,13 +22,19 @@ translations approved by the Free Software Foundation instead of in the original English. .. -.TH @G@NEQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@neqn \- format equations for ascii output +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B @g@neqn [@g@eqn options] +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. The .B @g@neqn program is actually just a shell script which invokes the @@ -30,14 +42,29 @@ command with the .B ascii output device. +. +. .LP Note that .B @g@eqn -does not support low-resolution, typewriter-like devices (although it may -work adequately for very simple input). +does not support low-resolution, typewriter-like devices (although it +may work adequately for very simple input). +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR @g@eqn (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +. +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/eqn/neqn.sh groff-1.22.3/src/preproc/eqn/neqn.sh --- groff-1.22.2/src/preproc/eqn/neqn.sh 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/neqn.sh 2014-11-04 09:38:35.233523897 +0100 @@ -1,4 +1,20 @@ #! /bin/sh +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of groff. +# +# groff is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 2 of the License (GPL2). +# +# 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. +# +# The GPL2 license text is available in the internet at +# . + # Provision of this shell script should not be taken to imply that use of # GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported. diff -ruN groff-1.22.2/src/preproc/eqn/other.cpp groff-1.22.3/src/preproc/eqn/other.cpp --- groff-1.22.2/src/preproc/eqn/other.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/other.cpp 2014-11-04 09:38:35.233523897 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/over.cpp groff-1.22.3/src/preproc/eqn/over.cpp --- groff-1.22.2/src/preproc/eqn/over.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/over.cpp 2014-11-04 09:38:35.233523897 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/pbox.h groff-1.22.3/src/preproc/eqn/pbox.h --- groff-1.22.2/src/preproc/eqn/pbox.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/pbox.h 2014-11-04 09:38:35.233523897 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/pile.cpp groff-1.22.3/src/preproc/eqn/pile.cpp --- groff-1.22.2/src/preproc/eqn/pile.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/pile.cpp 2014-11-04 09:38:35.234523884 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2004, 2007, 2009, 2013 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/script.cpp groff-1.22.3/src/preproc/eqn/script.cpp --- groff-1.22.2/src/preproc/eqn/script.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/script.cpp 2014-11-04 09:38:35.234523884 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2007, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/special.cpp groff-1.22.3/src/preproc/eqn/special.cpp --- groff-1.22.2/src/preproc/eqn/special.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/special.cpp 2014-11-04 09:38:35.234523884 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/sqrt.cpp groff-1.22.3/src/preproc/eqn/sqrt.cpp --- groff-1.22.2/src/preproc/eqn/sqrt.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/sqrt.cpp 2014-11-04 09:38:35.234523884 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2003, 2007, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/eqn/text.cpp groff-1.22.3/src/preproc/eqn/text.cpp --- groff-1.22.2/src/preproc/eqn/text.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/eqn/text.cpp 2014-11-04 09:38:35.234523884 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/grn/grn.man groff-1.22.3/src/preproc/grn/grn.man --- groff-1.22.2/src/preproc/grn/grn.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/grn/grn.man 2014-11-04 09:38:35.239523822 +0100 @@ -1,7 +1,16 @@ '\" t -.ig -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2009 - Free Software Foundation, Inc. +.TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@grn \- groff preprocessor for gremlin files +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.\" license +.de co +Copyright \[co] 2000-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -19,6 +28,20 @@ the original English. .. . +.\" authors +.de au +David Slattengren and Barry Roitblat wrote the original Berkeley +.IR @g@grn . +. +.PP +Daniel Senderowicz and Werner Lemberg modified it for +.IR groff . +.. +. +.\" -------------------------------------------------------------------- +.\" Definitons +.\" -------------------------------------------------------------------- +. .do nr grn_C \n[.C] .cp 0 . @@ -36,10 +59,10 @@ .. . . -.TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@grn \- groff preprocessor for gremlin files +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .BR @g@grn [ .B \-Cv @@ -56,40 +79,51 @@ [ .IR file\.\.\.\& ] +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .I @g@grn is a preprocessor for including .I gremlin pictures in .I groff input. +. .I @g@grn -writes to standard output, processing only input lines between two that -start with +writes to standard output, processing only input lines between two +that start with .B .GS and -.BR .GE. +.BR .GE . +. Those lines must contain .I @g@grn commands (see below). +. These commands request a .I gremlin -file, and the picture in that file is -converted and placed in the +file, and the picture in that file is converted and placed in the .I @g@troff input stream. +. The .B .GS request may be followed by a C, L, or R to center, left, or right justify the whole .I gremlin picture (default justification is center). +. If no .I file is mentioned, the standard input is read. +. At the end of the picture, the position on the page is the bottom of the .I gremlin picture. +. If the .I @g@grn entry is ended with @@ -97,14 +131,19 @@ instead of .BR .GE , the position is left at the top of the picture. +. +. .PP Please note that currently only the \-me macro package has support for .BR .GS , .BR .GE , and .BR .GF . +. +. .PP The following command-line options are understood: +. .TP .BI \-T dev Prepare output for printer @@ -114,6 +153,7 @@ See .BR groff (@MAN1EXT@) for acceptable devices. +. .TP .BI \-M dir Prepend @@ -121,12 +161,14 @@ to the default search path for .I gremlin files. +. The default path is (in that order) the current directory, the home directory, .BR @SYSTEMMACRODIR@ , .BR @LOCALMACRODIR@ , and .BR @MACRODIR@ . +. .TP .BI \-F dir Search @@ -141,6 +183,7 @@ .BR @FONTDIR@ , and .BR @LEGACYFONTDIR@ . +. .TP .B \-C Recognize @@ -159,13 +202,21 @@ .\"This way, postprocessors that overwrite rather than merge picture elements .\"(such as Postscript) can still have text and graphics on a shaded .\"background. +. .TP .B \-v Print the version number. +. +. .PP It is possible to have whitespace between a command line option and its parameter. -.SH GRN COMMANDS +. +. +.\" -------------------------------------------------------------------- +.SH "GRN COMMANDS" +.\" -------------------------------------------------------------------- +. Each input line between .B .GS and @@ -173,15 +224,20 @@ may have one .I @g@grn command. +. Commands consist of one or two strings separated by white space, the first string being the command and the second its operand. Commands may be upper or lower case and abbreviated down to one character. +. +. .PP -Commands that affect a picture's environment (those listed before +Commands that affect a picture\[aq]s environment (those listed before .BR default , see below) are only in effect for the current picture: +. The environment is reinitialized to the defaults at the start of the next picture. +. The commands are as follows: .TP .BI 1\ N @@ -191,12 +247,15 @@ .BI 3\ N .TQ .BI 4\ N +. Set -.IR gremlin 's +.IR gremlin \[aq]s text size number 1 (2, 3, or 4) to .I N points. +. The default is 12 (16, 24, and 36, respectively). +. .TP .BI roman\ f .TQ @@ -206,32 +265,37 @@ .TQ .BI special\ f Set the roman (italics, bold, or special) font to -.IR @g@troff 's +.IR @g@troff \[aq]s font .I f (either a name or number). +. The default is R (I, B, and S, respectively). +. .TP .BI l\ f .TQ .BI stipple\ f Set the stipple font to -.IR @g@troff 's +.IR @g@troff \[aq]s stipple font .I f (name or number). +. The command .B stipple -may be abbreviated down as far as `st' (to avoid -confusion with +may be abbreviated down as far as \[oq]st\[cq] (to avoid confusion +with .BR special ). +. There is .I no -default for stipples (unless one is set by the default command), and it is -invalid to include a +default for stipples (unless one is set by the default command), and +it is invalid to include a .I gremlin picture with polygons without specifying a stipple font. +. .TP .BI x\ N .TQ @@ -239,28 +303,36 @@ Magnify the picture (in addition to any default magnification) by .IR N , a floating point number larger than zero. +. The command .B scale -may be abbreviated down to `sc'. +may be abbreviated down to \[oq]sc\[cq]. +. .TP .BI narrow\ N .TQ .BI medium\ N .TQ .BI thick\ N +. Set the thickness of -.IR gremlin 's +.IR gremlin \[aq]s narrow (medium and thick, respectively) lines to .I N times 0.15pt (this value can be changed at compile time). +. The default is 1.0 (3.0 and 5.0, respectively), which corresponds to 0.15pt (0.45pt and 0.75pt, respectively). +. A thickness value of zero selects the smallest available line thickness. -Negative values cause the line thickness to be proportional to the current -point size. +. +Negative values cause the line thickness to be proportional to the +current point size. +. .TP .BI pointscale\ Scale text to match the picture. +. Gremlin text is usually printed in the point size specified with the commands .BR 1 , @@ -268,46 +340,56 @@ .BR 3 , .RB or\~ 4 , regardless of any scaling factors in the picture. +. Setting .B pointscale will cause the point sizes to scale with the picture (within -.IR @g@troff 's +.IR @g@troff \[aq]s limitations, of course). +. An operand of anything but .I off will turn text scaling on. +. .TP .B default Reset the picture environment defaults to the settings in the current picture. -This is meant to be used as a global parameter setting mechanism at the -beginning of the +. +This is meant to be used as a global parameter setting mechanism at +the beginning of the .I @g@troff input file, but can be used at any time to reset the default settings. +. .TP .BI width\ N Forces the picture to be .I N inches wide. +. This overrides any scaling factors present in the same picture. -.RB ` width -.IR 0 ' +.RB \[oq] width +.IR 0 \[cq] is ignored. +. .TP .BI height\ N Forces picture to be .I N inches high, overriding other scaling factors. -If both `width' and `height' are specified the tighter constraint will -determine the scale of the picture. +. +If both \[oq]width\[cq] and \[oq]height\[cq] are specified the tighter +constraint will determine the scale of the picture. .B Height and .B width commands are not saved with a .B default command. +. They will, however, affect point size scaling if that option is set. +. .TP .BI file\ name Get picture from @@ -317,27 +399,34 @@ located the current directory (or in the library directory; see the .B \-M option above). +. If two .B file commands are given, the second one overrides the first. +. If .I name -doesn't exist, an error message is reported and processing continues from -the +doesn\[aq]t exist, an error message is reported and processing +continues from the .B .GE line. -.SH NOTES ABOUT GROFF +. +. +.\" -------------------------------------------------------------------- +.SH "NOTES ABOUT GROFF" +.\" -------------------------------------------------------------------- +. Since .I @g@grn -is a preprocessor, it doesn't know about current indents, point sizes, -margins, number registers, etc. -Consequently, no +is a preprocessor, it doesn\[aq]t know about current indents, point +sizes, margins, number registers, etc. Consequently, no .I @g@troff input can be placed between the .B .GS and .B .GE requests. +. However, .I gremlin text is now processed by @@ -346,15 +435,18 @@ .I @g@troff input is valid in a line of .I gremlin -text (barring `.' directives at the beginning of a line). +text (barring \[oq].\[cq] directives at the beginning of a line). +. Thus, it is possible to have equations within a .I gremlin figure by including in the .I gremlin file .I eqn -expressions enclosed by previously defined delimiters (e.g. +expressions enclosed by previously defined delimiters (e.g.\& .IR $$ ). +. +. .PP When using .I @g@grn @@ -367,18 +459,24 @@ .I ideal to avoid overworking .IR tbl . +. .I Eqn should always be run last. +. +. .PP -A picture is considered an entity, but that doesn't stop +A picture is considered an entity, but that doesn\[aq]t stop .I @g@troff from trying to break it up if it falls off the end of a page. -Placing the picture between `keeps' in \-me macros will ensure proper -placement. +. +Placing the picture between \[oq]keeps\[cq] in \-me macros will ensure +proper placement. +. +. .PP .I @g@grn uses -.IR @g@troff 's +.IR @g@troff \[aq]s number registers .B g1 through @@ -392,8 +490,13 @@ figure (in device units) before entering the .B .GS request (this is for those who want to rewrite these macros). -.SH GREMLIN FILE FORMAT -There exist two distinct +. +. +.\" -------------------------------------------------------------------- +.SH "GREMLIN FILE FORMAT" +.\" -------------------------------------------------------------------- +. +There exist two distinct .I gremlin file formats, the original format from the .I AED @@ -402,6 +505,7 @@ or .I X11 version. +. An extension to the .IR SUN / X11 version allowing reference points with negative coordinates is @@ -409,17 +513,20 @@ compatible with the .I AED version. -As long as a +. +As long as a .I gremlin file does not contain negative coordinates, either format will be read correctly by either version of .I gremlin or .IR @g@grn . +. The other difference to the .IR SUN / X11 format is the use of names for picture objects (e.g., POLYGON, CURVE) instead of numbers. +. Files representing the same picture are shown in Table 1 in each format. .sp .TS @@ -432,21 +539,21 @@ 185.00 120.00@@185.00 120.00 240.00 120.00@@240.00 120.00 296.00 120.00@@296.00 120.00 -*@@-1.00 -1.00 +*@@\-1.00 \-1.00 2 3@@2 3 10 A Triangle@@10 A Triangle POLYGON@@6 224.00 416.00@@224.00 416.00 96.00 160.00@@96.00 160.00 384.00 160.00@@384.00 160.00 -*@@-1.00 -1.00 +*@@\-1.00 \-1.00 5 1@@5 1 0@@0 --1@@-1 +\-1@@\-1 .T& css. .sp -Table 1. File examples +Table 1. File examples .TE .sp .IP \(bu @@ -471,36 +578,50 @@ is ignored by the .IR SUN / X11 version. +. .B 0 means that .I gremlin will display things in horizontal format (drawing area wider than it is tall, with menu across top). +. .B 1 means that .I gremlin -will display things in vertical format (drawing area taller than it is wide, -with menu on left side). +will display things in vertical format (drawing area taller than it is +wide, with menu on left side). +. .B x and .B y -are floating point values giving a positioning point to be used when this -file is read into another file. -The stuff on this line really isn't all that important; a value of ``1 0.00 -0.00'' is suggested. +are floating point values giving a positioning point to be used when +this file is read into another file. +. +The stuff on this line really isn\[aq]t all that important; a value of +\[lq]1 0.00 0.00\[rq] is suggested. +. .IP \(bu The rest of the file consists of zero or more element specifications. -After the last element specification is a line containing the string ``-1''. +. +After the last element specification is a line containing the string +\[lq]\-1\[rq]. +. .IP \(bu Lines longer than 127 characters are chopped to this limit. +. +. +.\" -------------------------------------------------------------------- .SH ELEMENT SPECIFICATIONS +.\" -------------------------------------------------------------------- +. .IP \(bu -The first line of each element contains a single decimal number giving the -type of the element +The first line of each element contains a single decimal number giving +the type of the element .RI ( AED version) or its ASCII name .RI ( SUN / X11 version). +. See Table 2. .sp .TS @@ -510,7 +631,7 @@ nll. \fIgremlin\fP File Format \(mi Object Type Specification .sp -\fIAED\fP Number@\fISUN\fP/\fIX11\fP Name@Description +\fIAED\fP Number@\fISUN\/\fP/\,\fIX11\fP Name@Description 0@BOTLEFT@bottom-left-justified text 1@BOTRIGHT@bottom-right-justified text 2@CENTCENT@center-justified text @@ -538,16 +659,19 @@ point used to display the element. Each line contains an x-coordinate and a y-coordinate in floating point format, separated by spaces. -The list of points is terminated by a line containing the string ``-1.0 --1.0'' +The list of points is terminated by a line containing the string \[lq]\-1.0 +\-1.0\[rq] .RI ( AED -version) or a single asterisk, ``*'' +version) or a single asterisk, \[lq]*\[rq] .RI ( SUN / X11 version). +. .IP \(bu After the points comes a line containing two decimal values, giving the brush and size for the element. +. The brush determines the style in which things are drawn. +. For vectors, arcs, and curves there are six valid brush values: .sp .TS @@ -574,80 +698,120 @@ 4 \(mi@@special (S font in groff) .TE .sp -If you're using +If you\[aq]re using .I @g@grn to run your pictures through .IR groff , the font is really just a starting font: +. The text string can contain formatting sequences like -``\efI'' +\[lq]\efI\[rq] or -``\ed'' +\[lq]\ed\[rq] which may change the font (as well as do many other things). +. For text, the size field is a decimal value between 1 and 4. +. It selects the size of the font in which the text will be drawn. -For polygons, this size field is interpreted as a stipple number to fill the -polygon with. +. +For polygons, this size field is interpreted as a stipple number to +fill the polygon with. +. The number is used to index into a stipple font at print time. +. .IP \(bu The last line of each element contains a decimal number and a string of characters, separated by a single space. +. The number is a count of the number of characters in the string. +. This information is only used for text elements, and contains the text string. +. There can be spaces inside the text. -For arcs, curves, and vectors, this line of the element contains the string -``0''. -.SH NOTES ON COORDINATES +. +For arcs, curves, and vectors, this line of the element contains the +string \[lq]0\[rq]. +. +. +.\" -------------------------------------------------------------------- +.SH "NOTES ON COORDINATES" +.\" -------------------------------------------------------------------- +. .I gremlin was designed for .IR AED s, and its coordinates reflect the .I AED coordinate space. -For vertical pictures, x-values range 116 to 511, and y-values from 0 to -483. -For horizontal pictures, x-values range from 0 to 511 and y-values range -from 0 to 367. -Although you needn't absolutely stick to this range, you'll get best results -if you at least stay in this vicinity. -Also, point lists are terminated by a point of (-1, -1), so you shouldn't -ever use negative coordinates. +. +For vertical pictures, x-values range 116 to 511, and y-values from 0 +to 483. +. +For horizontal pictures, x-values range from 0 to 511 and y-values +range from 0 to 367. +. +Although you needn\[aq]t absolutely stick to this range, you\[aq]\ll +get best results if you at least stay in this vicinity. +. +Also, point lists are terminated by a point of (\-1, \-1), so you +shouldn't ever use negative coordinates. +. .I gremlin -writes out coordinates using format ``%f1.2''; it's probably a good idea to -use the same format if you want to modify the +writes out coordinates using format \[lq]%f1.2\[rq]; it\[aq]s probably +a good idea to use the same format if you want to modify the .I @g@grn code. -.SH NOTES ON SUN/X11 COORDINATES -There is no longer a restriction on the range of coordinates used to create -objects in the +. +. +.\" -------------------------------------------------------------------- +.SH "NOTES ON SUN/X11 COORDINATES" +.\" -------------------------------------------------------------------- +. +There is no longer a restriction on the range of coordinates used to +create objects in the .IR SUN / X11 version of .IR gremlin . +. However, files with negative coordinates .B will cause problems if displayed on the .IR AED . +. +. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'@FONTDIR@/devname/DESC'u+3n .BI @FONTDIR@/dev name /DESC Device description file for device .IR name . +. +. +.\" -------------------------------------------------------------------- .SH SEE ALSO +.\" -------------------------------------------------------------------- +. .BR gremlin (1), .BR groff (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR ideal (1) -.SH HISTORY -.PP -David Slattengren and Barry Roitblat wrote the original Berkeley -.IR @g@grn . -.PP -Daniel Senderowicz and Werner Lemberg modified it for -.IR groff . +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au . .cp \n[grn_C] . +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/grn/main.cpp groff-1.22.3/src/preproc/grn/main.cpp --- groff-1.22.2/src/preproc/grn/main.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/grn/main.cpp 2014-11-04 09:38:35.239523822 +0100 @@ -92,6 +92,8 @@ extern POINT *PTInit(); extern POINT *PTMakePoint(double x, double y, POINT **pplist); +#define INIT_FILE_SIZE 50 /* Initial size of array of files from cmd line. */ +#define FILE_SIZE_INCR 50 /* Amount to increase array of files by. */ #define SUN_SCALEFACTOR 0.70 @@ -244,6 +246,28 @@ } +/* Add a new file entry in the array, expanding array if needs be. */ + +char ** +add_file(char **file, + char *new_file, + int *count, + int *cur_size) +{ + if (*count >= *cur_size) { + *cur_size += FILE_SIZE_INCR; + file = (char **) realloc((char **) file, *cur_size * sizeof(char *)); + if (file == NULL) { + fatal("unable to extend file array"); + } + } + file[*count] = new_file; + *count += 1; + + return file; +} + + /*----------------------------------------------------------------------------* | Routine: main (argument_count, argument_pointer) | @@ -262,18 +286,22 @@ register FILE *fp; register int k; register char c; - register int gfil = 0; - char *file[50]; + int gfil = 0; + char **file = NULL; + int file_cur_size = INIT_FILE_SIZE; char *operand(int *argcp, char ***argvp); + if ((file = (char **) malloc(file_cur_size * sizeof(char *))) == NULL) { + fatal("unable to create file array"); + } while (--argc) { if (**++argv != '-') - file[gfil++] = *argv; + file = add_file(file, *argv, &gfil, &file_cur_size); else switch (c = (*argv)[1]) { case 0: - file[gfil++] = NULL; + file = add_file(file, NULL, &gfil, &file_cur_size); break; case 'C': /* compatibility mode */ diff -ruN groff-1.22.2/src/preproc/grn/Makefile.sub groff-1.22.3/src/preproc/grn/Makefile.sub --- groff-1.22.2/src/preproc/grn/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/grn/Makefile.sub 2014-11-04 09:38:35.239523822 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc grn +# +# File position: /src/preproc/grn/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=grn$(EXEEXT) MAN1=grn.n MLIB=$(LIBM) @@ -15,3 +39,11 @@ HDRS=\ $(srcdir)/gprint.h NAMEPREFIX=$(g) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/html/Makefile.sub groff-1.22.3/src/preproc/html/Makefile.sub --- groff-1.22.2/src/preproc/html/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/html/Makefile.sub 2014-11-04 09:38:35.255523622 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc html' +# +# File position: /src/preproc/html/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=pre-grohtml$(EXEEXT) # MAN1=pre-grohtml.n MAN1= @@ -5,3 +29,11 @@ MLIB=$(LIBM) OBJS=pre-html.$(OBJEXT) pushback.$(OBJEXT) CCSRCS=$(srcdir)/pre-html.cpp $(srcdir)/pushback.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/html/pre-html.cpp groff-1.22.3/src/preproc/html/pre-html.cpp --- groff-1.22.2/src/preproc/html/pre-html.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/html/pre-html.cpp 2014-11-04 09:38:35.255523622 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000-2004, 2007-2009, 2012 - * Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. * Written by Gaius Mulley (gaius@glam.ac.uk). * * This file is part of groff. diff -ruN groff-1.22.2/src/preproc/html/pre-html.h groff-1.22.3/src/preproc/html/pre-html.h --- groff-1.22.2/src/preproc/html/pre-html.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/html/pre-html.h 2014-11-04 09:38:35.255523622 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. * Written by Gaius Mulley (gaius@glam.ac.uk). * * This file is part of groff. diff -ruN groff-1.22.2/src/preproc/html/pushback.cpp groff-1.22.3/src/preproc/html/pushback.cpp --- groff-1.22.2/src/preproc/html/pushback.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/html/pushback.cpp 2014-11-04 09:38:35.255523622 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff -ruN groff-1.22.2/src/preproc/html/pushback.h groff-1.22.3/src/preproc/html/pushback.h --- groff-1.22.2/src/preproc/html/pushback.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/html/pushback.h 2014-11-04 09:38:35.255523622 +0100 @@ -1,6 +1,5 @@ // -*- C -*- -/* Copyright (C) 2000, 2001, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk). This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/common.cpp groff-1.22.3/src/preproc/pic/common.cpp --- groff-1.22.2/src/preproc/pic/common.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/common.cpp 2014-11-04 09:38:35.225523997 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/common.h groff-1.22.3/src/preproc/pic/common.h --- groff-1.22.2/src/preproc/pic/common.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/common.h 2014-11-04 09:38:35.225523997 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2003, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/lex.cpp groff-1.22.3/src/preproc/pic/lex.cpp --- groff-1.22.2/src/preproc/pic/lex.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/lex.cpp 2014-11-04 09:38:35.225523997 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2003, 2004, 2006, - 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -92,6 +90,11 @@ lineno++; for (;;) { int c = getc(fp); + if (c == '\r') { + c = getc(fp); + if (c != '\n') + lex_error("invalid input character code %1", '\r'); + } if (c == EOF) break; else if (invalid_input_char(c)) diff -ruN groff-1.22.2/src/preproc/pic/main.cpp groff-1.22.3/src/preproc/pic/main.cpp --- groff-1.22.2/src/preproc/pic/main.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/main.cpp 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003, 2006, 2009, 2012 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/Makefile.sub groff-1.22.3/src/preproc/pic/Makefile.sub --- groff-1.22.2/src/preproc/pic/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/Makefile.sub 2014-11-04 09:38:35.226523984 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc pic' +# +# File position: /src/preproc/pic/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=pic$(EXEEXT) MAN1=pic.n XLIBS=$(LIBGROFF) @@ -29,3 +53,11 @@ YTABC=pic.cpp YTABH=pic_tab.h NAMEPREFIX=$(g) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/pic/object.cpp groff-1.22.3/src/preproc/pic/object.cpp --- groff-1.22.2/src/preproc/pic/object.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/object.cpp 2014-11-04 09:38:35.226523984 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/object.h groff-1.22.3/src/preproc/pic/object.h --- groff-1.22.2/src/preproc/pic/object.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/object.h 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/output.h groff-1.22.3/src/preproc/pic/output.h --- groff-1.22.2/src/preproc/pic/output.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/output.h 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/pic.cpp groff-1.22.3/src/preproc/pic/pic.cpp --- groff-1.22.2/src/preproc/pic/pic.cpp 2013-02-07 13:06:14.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/pic.cpp 2014-11-04 09:38:37.823491518 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 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 . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,15 +58,11 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 21 "pic.y" +#line 19 "pic.y" /* yacc.c:339 */ #include "pic.h" #include "ptable.h" @@ -110,14 +106,15 @@ char *do_sprintf(const char *form, const double *v, int nv); +#line 110 "pic.cpp" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 116 "pic.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -127,141 +124,146 @@ # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - LABEL = 258, - VARIABLE = 259, - NUMBER = 260, - TEXT = 261, - COMMAND_LINE = 262, - DELIMITED = 263, - ORDINAL = 264, - TH = 265, - LEFT_ARROW_HEAD = 266, - RIGHT_ARROW_HEAD = 267, - DOUBLE_ARROW_HEAD = 268, - LAST = 269, - BOX = 270, - CIRCLE = 271, - ELLIPSE = 272, - ARC = 273, - LINE = 274, - ARROW = 275, - MOVE = 276, - SPLINE = 277, - HEIGHT = 278, - RADIUS = 279, - FIGNAME = 280, - WIDTH = 281, - DIAMETER = 282, - UP = 283, - DOWN = 284, - RIGHT = 285, - LEFT = 286, - FROM = 287, - TO = 288, - AT = 289, - WITH = 290, - BY = 291, - THEN = 292, - SOLID = 293, - DOTTED = 294, - DASHED = 295, - CHOP = 296, - SAME = 297, - INVISIBLE = 298, - LJUST = 299, - RJUST = 300, - ABOVE = 301, - BELOW = 302, - OF = 303, - THE = 304, - WAY = 305, - BETWEEN = 306, - AND = 307, - HERE = 308, - DOT_N = 309, - DOT_E = 310, - DOT_W = 311, - DOT_S = 312, - DOT_NE = 313, - DOT_SE = 314, - DOT_NW = 315, - DOT_SW = 316, - DOT_C = 317, - DOT_START = 318, - DOT_END = 319, - DOT_X = 320, - DOT_Y = 321, - DOT_HT = 322, - DOT_WID = 323, - DOT_RAD = 324, - SIN = 325, - COS = 326, - ATAN2 = 327, - LOG = 328, - EXP = 329, - SQRT = 330, - K_MAX = 331, - K_MIN = 332, - INT = 333, - RAND = 334, - SRAND = 335, - COPY = 336, - THRU = 337, - TOP = 338, - BOTTOM = 339, - UPPER = 340, - LOWER = 341, - SH = 342, - PRINT = 343, - CW = 344, - CCW = 345, - FOR = 346, - DO = 347, - IF = 348, - ELSE = 349, - ANDAND = 350, - OROR = 351, - NOTEQUAL = 352, - EQUALEQUAL = 353, - LESSEQUAL = 354, - GREATEREQUAL = 355, - LEFT_CORNER = 356, - RIGHT_CORNER = 357, - NORTH = 358, - SOUTH = 359, - EAST = 360, - WEST = 361, - CENTER = 362, - END = 363, - START = 364, - RESET = 365, - UNTIL = 366, - PLOT = 367, - THICKNESS = 368, - FILL = 369, - COLORED = 370, - OUTLINED = 371, - SHADED = 372, - XSLANTED = 373, - YSLANTED = 374, - ALIGNED = 375, - SPRINTF = 376, - COMMAND = 377, - DEFINE = 378, - UNDEF = 379 - }; + enum yytokentype + { + LABEL = 258, + VARIABLE = 259, + NUMBER = 260, + TEXT = 261, + COMMAND_LINE = 262, + DELIMITED = 263, + ORDINAL = 264, + TH = 265, + LEFT_ARROW_HEAD = 266, + RIGHT_ARROW_HEAD = 267, + DOUBLE_ARROW_HEAD = 268, + LAST = 269, + BOX = 270, + CIRCLE = 271, + ELLIPSE = 272, + ARC = 273, + LINE = 274, + ARROW = 275, + MOVE = 276, + SPLINE = 277, + HEIGHT = 278, + RADIUS = 279, + FIGNAME = 280, + WIDTH = 281, + DIAMETER = 282, + UP = 283, + DOWN = 284, + RIGHT = 285, + LEFT = 286, + FROM = 287, + TO = 288, + AT = 289, + WITH = 290, + BY = 291, + THEN = 292, + SOLID = 293, + DOTTED = 294, + DASHED = 295, + CHOP = 296, + SAME = 297, + INVISIBLE = 298, + LJUST = 299, + RJUST = 300, + ABOVE = 301, + BELOW = 302, + OF = 303, + THE = 304, + WAY = 305, + BETWEEN = 306, + AND = 307, + HERE = 308, + DOT_N = 309, + DOT_E = 310, + DOT_W = 311, + DOT_S = 312, + DOT_NE = 313, + DOT_SE = 314, + DOT_NW = 315, + DOT_SW = 316, + DOT_C = 317, + DOT_START = 318, + DOT_END = 319, + DOT_X = 320, + DOT_Y = 321, + DOT_HT = 322, + DOT_WID = 323, + DOT_RAD = 324, + SIN = 325, + COS = 326, + ATAN2 = 327, + LOG = 328, + EXP = 329, + SQRT = 330, + K_MAX = 331, + K_MIN = 332, + INT = 333, + RAND = 334, + SRAND = 335, + COPY = 336, + THRU = 337, + TOP = 338, + BOTTOM = 339, + UPPER = 340, + LOWER = 341, + SH = 342, + PRINT = 343, + CW = 344, + CCW = 345, + FOR = 346, + DO = 347, + IF = 348, + ELSE = 349, + ANDAND = 350, + OROR = 351, + NOTEQUAL = 352, + EQUALEQUAL = 353, + LESSEQUAL = 354, + GREATEREQUAL = 355, + LEFT_CORNER = 356, + RIGHT_CORNER = 357, + NORTH = 358, + SOUTH = 359, + EAST = 360, + WEST = 361, + CENTER = 362, + END = 363, + START = 364, + RESET = 365, + UNTIL = 366, + PLOT = 367, + THICKNESS = 368, + FILL = 369, + COLORED = 370, + OUTLINED = 371, + SHADED = 372, + XSLANTED = 373, + YSLANTED = 374, + ALIGNED = 375, + SPRINTF = 376, + COMMAND = 377, + DEFINE = 378, + UNDEF = 379 + }; #endif /* Tokens. */ #define LABEL 258 @@ -387,15 +389,12 @@ #define DEFINE 378 #define UNDEF 379 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 67 "pic.y" +#line 65 "pic.y" /* yacc.c:355 */ char *str; int n; @@ -414,22 +413,22 @@ graphics_state state; object_type obtype; - - -/* Line 293 of yacc.c */ -#line 421 "pic.cpp" -} YYSTYPE; +#line 417 "pic.cpp" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -/* Copy the second part of user declarations. */ +extern YYSTYPE yylval; + +int yyparse (void); + +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ +/* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ -#line 433 "pic.cpp" +#line 432 "pic.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -443,11 +442,8 @@ #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -467,8 +463,7 @@ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -482,39 +477,68 @@ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -532,9 +556,9 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -544,8 +568,8 @@ # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -561,7 +585,7 @@ # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -569,15 +593,13 @@ # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -587,7 +609,7 @@ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -612,35 +634,35 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -656,17 +678,19 @@ #define YYNNTS 49 /* YYNRULES -- Number of rules. */ #define YYNRULES 260 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 454 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 379 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -710,162 +734,40 @@ }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 11, 13, 17, 18, 20, - 22, 25, 29, 33, 38, 40, 42, 44, 46, 48, - 51, 54, 55, 59, 62, 63, 64, 72, 73, 74, - 81, 82, 93, 95, 96, 101, 103, 105, 107, 109, - 112, 115, 119, 121, 124, 126, 128, 130, 131, 137, - 138, 141, 143, 145, 149, 153, 157, 161, 165, 169, - 173, 177, 180, 181, 184, 188, 190, 195, 200, 205, - 206, 207, 214, 216, 217, 219, 221, 223, 225, 227, - 229, 231, 233, 235, 237, 240, 244, 245, 250, 254, - 258, 262, 266, 269, 272, 276, 279, 283, 286, 290, - 293, 297, 301, 305, 309, 313, 317, 321, 324, 327, - 330, 334, 337, 341, 344, 348, 352, 356, 360, 364, - 368, 371, 375, 378, 381, 384, 387, 390, 393, 396, - 399, 402, 405, 408, 411, 415, 418, 420, 426, 427, - 431, 433, 435, 439, 441, 445, 451, 455, 461, 467, - 473, 481, 488, 497, 499, 504, 508, 512, 514, 517, - 520, 524, 526, 528, 530, 534, 536, 540, 542, 545, - 548, 551, 553, 555, 557, 559, 561, 563, 565, 568, - 570, 573, 577, 579, 581, 584, 586, 592, 597, 601, - 605, 608, 610, 612, 614, 616, 618, 620, 622, 624, - 626, 628, 630, 632, 634, 636, 638, 641, 644, 647, - 650, 652, 654, 657, 660, 663, 666, 668, 670, 672, - 674, 676, 678, 680, 682, 684, 688, 690, 692, 695, - 698, 701, 704, 707, 711, 715, 719, 723, 727, 731, - 734, 738, 743, 748, 755, 760, 765, 770, 777, 784, - 789, 794, 798, 803, 807, 811, 815, 819, 823, 827, - 831 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 147, 0, -1, 150, -1, 148, -1, 150, 149, 150, - -1, 170, -1, 149, 151, 170, -1, -1, 151, -1, - 139, -1, 151, 139, -1, 25, 140, 160, -1, 4, - 140, 167, -1, 4, 141, 140, 167, -1, 28, -1, - 29, -1, 31, -1, 30, -1, 7, -1, 122, 162, - -1, 88, 162, -1, -1, 87, 153, 8, -1, 81, - 6, -1, -1, -1, 81, 6, 82, 154, 8, 155, - 166, -1, -1, -1, 81, 82, 156, 8, 157, 166, - -1, -1, 91, 4, 140, 192, 33, 192, 169, 92, - 158, 8, -1, 164, -1, -1, 164, 94, 159, 8, - -1, 161, -1, 110, -1, 4, -1, 3, -1, 110, - 4, -1, 161, 4, -1, 161, 129, 4, -1, 163, - -1, 162, 163, -1, 192, -1, 176, -1, 178, -1, - -1, 93, 167, 37, 165, 8, -1, -1, 111, 6, - -1, 192, -1, 168, -1, 176, 98, 176, -1, 176, - 97, 176, -1, 168, 95, 168, -1, 168, 95, 192, - -1, 192, 95, 168, -1, 168, 96, 168, -1, 168, - 96, 192, -1, 192, 96, 168, -1, 137, 168, -1, - -1, 36, 192, -1, 36, 134, 192, -1, 174, -1, - 3, 141, 150, 170, -1, 3, 141, 150, 179, -1, - 3, 141, 150, 182, -1, -1, -1, 142, 171, 148, - 143, 172, 173, -1, 152, -1, -1, 170, -1, 15, - -1, 16, -1, 17, -1, 18, -1, 19, -1, 20, - -1, 21, -1, 22, -1, 176, -1, 112, 192, -1, - 112, 192, 176, -1, -1, 128, 175, 148, 144, -1, - 174, 23, 192, -1, 174, 24, 192, -1, 174, 26, - 192, -1, 174, 27, 192, -1, 174, 192, -1, 174, - 28, -1, 174, 28, 192, -1, 174, 29, -1, 174, - 29, 192, -1, 174, 30, -1, 174, 30, 192, -1, - 174, 31, -1, 174, 31, 192, -1, 174, 32, 178, - -1, 174, 33, 178, -1, 174, 34, 178, -1, 174, - 35, 190, -1, 174, 35, 178, -1, 174, 36, 181, - -1, 174, 37, -1, 174, 38, -1, 174, 39, -1, - 174, 39, 192, -1, 174, 40, -1, 174, 40, 192, - -1, 174, 114, -1, 174, 114, 192, -1, 174, 118, - 192, -1, 174, 119, 192, -1, 174, 117, 176, -1, - 174, 115, 176, -1, 174, 116, 176, -1, 174, 41, - -1, 174, 41, 192, -1, 174, 42, -1, 174, 43, - -1, 174, 11, -1, 174, 12, -1, 174, 13, -1, - 174, 89, -1, 174, 90, -1, 174, 176, -1, 174, - 44, -1, 174, 45, -1, 174, 46, -1, 174, 47, - -1, 174, 113, 192, -1, 174, 120, -1, 6, -1, - 121, 126, 6, 177, 145, -1, -1, 177, 129, 192, - -1, 179, -1, 182, -1, 126, 182, 145, -1, 181, - -1, 178, 132, 181, -1, 126, 178, 132, 181, 145, - -1, 178, 133, 181, -1, 126, 178, 133, 181, 145, - -1, 126, 178, 129, 178, 145, -1, 192, 180, 178, - 52, 178, -1, 126, 192, 180, 178, 52, 178, 145, - -1, 194, 130, 178, 129, 178, 131, -1, 126, 194, - 130, 178, 129, 178, 131, 145, -1, 51, -1, 48, - 49, 50, 51, -1, 192, 129, 192, -1, 126, 181, - 145, -1, 183, -1, 183, 191, -1, 191, 183, -1, - 191, 48, 183, -1, 53, -1, 3, -1, 186, -1, - 183, 125, 3, -1, 9, -1, 127, 167, 10, -1, - 14, -1, 184, 14, -1, 184, 187, -1, 185, 187, - -1, 15, -1, 16, -1, 17, -1, 18, -1, 19, - -1, 20, -1, 22, -1, 128, 144, -1, 6, -1, - 125, 3, -1, 188, 125, 3, -1, 191, -1, 188, - -1, 188, 191, -1, 189, -1, 126, 189, 129, 189, - 145, -1, 9, 14, 187, 189, -1, 14, 187, 189, - -1, 9, 187, 189, -1, 3, 189, -1, 54, -1, - 55, -1, 56, -1, 57, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 62, -1, 63, -1, 64, -1, - 83, -1, 84, -1, 31, -1, 30, -1, 85, 31, - -1, 86, 31, -1, 85, 30, -1, 86, 30, -1, - 101, -1, 102, -1, 85, 101, -1, 86, 101, -1, - 85, 102, -1, 86, 102, -1, 103, -1, 104, -1, - 105, -1, 106, -1, 107, -1, 109, -1, 108, -1, - 193, -1, 194, -1, 192, 130, 192, -1, 4, -1, - 5, -1, 182, 65, -1, 182, 66, -1, 182, 67, - -1, 182, 68, -1, 182, 69, -1, 192, 132, 192, - -1, 192, 133, 192, -1, 192, 134, 192, -1, 192, - 135, 192, -1, 192, 136, 192, -1, 192, 138, 192, - -1, 133, 192, -1, 126, 167, 145, -1, 70, 126, - 167, 145, -1, 71, 126, 167, 145, -1, 72, 126, - 167, 129, 167, 145, -1, 73, 126, 167, 145, -1, - 74, 126, 167, 145, -1, 75, 126, 167, 145, -1, - 76, 126, 167, 129, 167, 145, -1, 77, 126, 167, - 129, 167, 145, -1, 78, 126, 167, 145, -1, 79, - 126, 167, 145, -1, 79, 126, 145, -1, 80, 126, - 167, 145, -1, 192, 99, 192, -1, 192, 131, 192, - -1, 192, 100, 192, -1, 192, 98, 192, -1, 192, - 97, 192, -1, 192, 95, 192, -1, 192, 96, 192, - -1, 137, 192, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 277, 277, 278, 287, 292, 294, 298, 300, 304, - 305, 309, 317, 322, 334, 336, 338, 340, 342, 347, - 352, 359, 358, 369, 377, 379, 376, 390, 392, 389, - 402, 401, 410, 419, 418, 432, 433, 438, 439, 443, - 448, 453, 461, 463, 482, 489, 491, 502, 501, 513, - 514, 519, 521, 526, 532, 538, 540, 542, 544, 546, - 548, 550, 557, 561, 566, 574, 588, 594, 602, 609, - 615, 608, 624, 634, 635, 640, 642, 644, 646, 651, - 658, 665, 672, 679, 684, 689, 697, 696, 723, 729, - 735, 741, 747, 766, 773, 780, 787, 794, 801, 808, - 815, 822, 829, 844, 856, 862, 871, 878, 903, 907, - 913, 919, 925, 931, 936, 942, 948, 954, 961, 970, - 977, 993, 1010, 1015, 1020, 1025, 1030, 1035, 1040, 1045, - 1053, 1063, 1073, 1083, 1093, 1099, 1107, 1109, 1121, 1126, - 1156, 1158, 1164, 1173, 1175, 1180, 1185, 1190, 1195, 1200, - 1205, 1211, 1216, 1224, 1225, 1229, 1234, 1240, 1242, 1248, - 1254, 1260, 1269, 1279, 1281, 1290, 1292, 1300, 1302, 1307, - 1322, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1354, 1356, - 1361, 1363, 1371, 1375, 1377, 1385, 1387, 1393, 1399, 1405, - 1411, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434, 1436, - 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, 1456, - 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474, 1476, - 1478, 1480, 1482, 1487, 1489, 1494, 1499, 1507, 1509, 1516, - 1523, 1530, 1537, 1544, 1546, 1548, 1550, 1558, 1566, 1579, - 1581, 1583, 1592, 1601, 1614, 1623, 1632, 1641, 1643, 1645, - 1647, 1649, 1655, 1660, 1662, 1664, 1666, 1668, 1670, 1672, - 1674 + 0, 275, 275, 276, 285, 290, 292, 296, 298, 302, + 303, 307, 315, 320, 332, 334, 336, 338, 340, 345, + 350, 357, 356, 367, 375, 377, 374, 388, 390, 387, + 400, 399, 408, 417, 416, 430, 431, 436, 437, 441, + 446, 451, 459, 461, 480, 487, 489, 500, 499, 511, + 512, 517, 519, 524, 530, 536, 538, 540, 542, 544, + 546, 548, 555, 559, 564, 572, 586, 592, 600, 607, + 613, 606, 622, 632, 633, 638, 640, 642, 644, 649, + 656, 663, 670, 677, 682, 687, 695, 694, 721, 727, + 733, 739, 745, 764, 771, 778, 785, 792, 799, 806, + 813, 820, 827, 842, 854, 860, 869, 876, 901, 905, + 911, 917, 923, 929, 934, 940, 946, 952, 959, 968, + 975, 991, 1008, 1013, 1018, 1023, 1028, 1033, 1038, 1043, + 1051, 1061, 1071, 1081, 1091, 1097, 1105, 1107, 1119, 1124, + 1154, 1156, 1162, 1171, 1173, 1178, 1183, 1188, 1193, 1198, + 1203, 1209, 1214, 1222, 1223, 1227, 1232, 1238, 1240, 1246, + 1252, 1258, 1267, 1277, 1279, 1288, 1290, 1298, 1300, 1305, + 1320, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1354, + 1359, 1361, 1369, 1373, 1375, 1383, 1385, 1391, 1397, 1403, + 1409, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434, + 1436, 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, + 1456, 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474, + 1476, 1478, 1480, 1485, 1487, 1492, 1497, 1505, 1507, 1514, + 1521, 1528, 1535, 1542, 1544, 1546, 1548, 1556, 1564, 1577, + 1579, 1581, 1590, 1599, 1612, 1621, 1630, 1639, 1641, 1643, + 1645, 1647, 1653, 1658, 1660, 1662, 1664, 1666, 1668, 1670, + 1672 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -898,13 +800,13 @@ "position_not_place", "between", "expr_pair", "place", "label", "ordinal", "optional_ordinal_last", "nth_primitive", "object_type", "label_path", "relative_path", "path", "corner", "expr", - "expr_lower_than", "expr_not_lower_than", 0 + "expr_lower_than", "expr_not_lower_than", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -925,136 +827,18 @@ }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 146, 147, 147, 148, 149, 149, 150, 150, 151, - 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 153, 152, 152, 154, 155, 152, 156, 157, 152, - 158, 152, 152, 159, 152, 152, 152, 160, 160, 161, - 161, 161, 162, 162, 163, 163, 163, 165, 164, 166, - 166, 167, 167, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 169, 169, 169, 170, 170, 170, 170, 171, - 172, 170, 170, 173, 173, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 175, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 176, 176, 177, 177, - 178, 178, 178, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 180, 180, 181, 181, 182, 182, 182, - 182, 182, 183, 183, 183, 184, 184, 185, 185, 186, - 186, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 188, 188, 189, 189, 189, 190, 190, 190, 190, 190, - 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 192, 192, 193, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194 -}; +#define YYPACT_NINF -240 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 3, 1, 3, 0, 1, 1, - 2, 3, 3, 4, 1, 1, 1, 1, 1, 2, - 2, 0, 3, 2, 0, 0, 7, 0, 0, 6, - 0, 10, 1, 0, 4, 1, 1, 1, 1, 2, - 2, 3, 1, 2, 1, 1, 1, 0, 5, 0, - 2, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 0, 2, 3, 1, 4, 4, 4, 0, - 0, 6, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 3, 0, 4, 3, 3, - 3, 3, 2, 2, 3, 2, 3, 2, 3, 2, - 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, - 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, - 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 3, 2, 1, 5, 0, 3, - 1, 1, 3, 1, 3, 5, 3, 5, 5, 5, - 7, 6, 8, 1, 4, 3, 3, 1, 2, 2, - 3, 1, 1, 1, 3, 1, 3, 1, 2, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 2, 3, 1, 1, 2, 1, 5, 4, 3, 3, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, - 3, 4, 4, 6, 4, 4, 4, 6, 6, 4, - 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, - 2 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-240))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 7, 9, 0, 3, 2, 8, 1, 0, 0, 136, - 18, 75, 76, 77, 78, 79, 80, 81, 82, 0, - 14, 15, 17, 16, 0, 21, 0, 0, 0, 36, - 0, 0, 0, 86, 69, 7, 72, 35, 32, 5, - 65, 83, 10, 7, 0, 0, 0, 23, 27, 0, - 162, 226, 227, 165, 167, 205, 204, 161, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 202, 203, 0, 0, 210, 211, 216, 217, 218, 219, - 220, 222, 221, 0, 0, 0, 0, 20, 42, 45, - 46, 140, 143, 141, 157, 0, 0, 163, 0, 44, - 223, 224, 0, 0, 0, 0, 52, 0, 0, 51, - 224, 39, 84, 0, 19, 7, 7, 4, 8, 40, - 0, 33, 124, 125, 126, 0, 0, 0, 0, 93, - 95, 97, 99, 0, 0, 0, 0, 0, 107, 108, - 109, 111, 120, 122, 123, 130, 131, 132, 133, 127, - 128, 0, 113, 0, 0, 0, 0, 0, 135, 129, - 92, 0, 12, 0, 38, 37, 11, 24, 0, 22, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 208, 206, 212, 214, 209, 207, 213, 215, 0, - 0, 143, 141, 51, 224, 0, 239, 260, 43, 0, - 0, 228, 229, 230, 231, 232, 0, 158, 179, 168, - 171, 172, 173, 174, 175, 176, 177, 0, 169, 170, - 0, 159, 0, 153, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 61, 260, 47, 0, 0, 0, 0, 0, - 0, 85, 138, 0, 0, 0, 6, 41, 0, 88, - 89, 90, 91, 94, 96, 98, 100, 101, 0, 102, - 103, 162, 165, 167, 0, 0, 105, 183, 185, 104, - 182, 0, 106, 0, 110, 112, 121, 134, 114, 118, - 119, 117, 115, 116, 162, 226, 205, 204, 66, 0, - 67, 68, 13, 0, 28, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 251, 0, 0, 240, 0, 0, - 0, 156, 142, 0, 0, 166, 144, 146, 164, 178, - 160, 0, 258, 259, 257, 256, 253, 255, 155, 225, - 254, 233, 234, 235, 236, 237, 238, 0, 0, 0, - 0, 55, 56, 58, 59, 54, 53, 57, 258, 60, - 259, 0, 87, 70, 34, 190, 182, 0, 0, 180, - 0, 0, 184, 0, 51, 25, 49, 241, 242, 0, - 244, 245, 246, 0, 0, 249, 250, 252, 0, 144, - 146, 0, 0, 0, 0, 0, 0, 48, 0, 137, - 73, 189, 188, 0, 181, 49, 0, 29, 0, 0, - 0, 148, 145, 147, 0, 0, 154, 149, 0, 62, - 139, 74, 71, 0, 26, 50, 243, 247, 248, 149, - 0, 151, 0, 0, 186, 150, 151, 0, 63, 30, - 152, 64, 0, 31 -}; +#define YYTABLE_NINF -206 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 3, 35, 264, 5, 36, 49, 313, 415, - 178, 386, 452, 268, 176, 37, 97, 98, 38, 360, - 417, 199, 116, 443, 39, 126, 410, 432, 40, 125, - 117, 371, 100, 101, 249, 102, 118, 104, 105, 106, - 107, 228, 287, 288, 289, 108, 119, 110, 120 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -240 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -114, -240, 20, -240, 757, -107, -240, -98, -123, -240, @@ -1105,7 +889,60 @@ -240, 2282, 354, -240 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 7, 9, 0, 3, 2, 8, 1, 0, 0, 136, + 18, 75, 76, 77, 78, 79, 80, 81, 82, 0, + 14, 15, 17, 16, 0, 21, 0, 0, 0, 36, + 0, 0, 0, 86, 69, 7, 72, 35, 32, 5, + 65, 83, 10, 7, 0, 0, 0, 23, 27, 0, + 162, 226, 227, 165, 167, 205, 204, 161, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 202, 203, 0, 0, 210, 211, 216, 217, 218, 219, + 220, 222, 221, 0, 0, 0, 0, 20, 42, 45, + 46, 140, 143, 141, 157, 0, 0, 163, 0, 44, + 223, 224, 0, 0, 0, 0, 52, 0, 0, 51, + 224, 39, 84, 0, 19, 7, 7, 4, 8, 40, + 0, 33, 124, 125, 126, 0, 0, 0, 0, 93, + 95, 97, 99, 0, 0, 0, 0, 0, 107, 108, + 109, 111, 120, 122, 123, 130, 131, 132, 133, 127, + 128, 0, 113, 0, 0, 0, 0, 0, 135, 129, + 92, 0, 12, 0, 38, 37, 11, 24, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 208, 206, 212, 214, 209, 207, 213, 215, 0, + 0, 143, 141, 51, 224, 0, 239, 260, 43, 0, + 0, 228, 229, 230, 231, 232, 0, 158, 179, 168, + 171, 172, 173, 174, 175, 176, 177, 0, 169, 170, + 0, 159, 0, 153, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 260, 47, 0, 0, 0, 0, 0, + 0, 85, 138, 0, 0, 0, 6, 41, 0, 88, + 89, 90, 91, 94, 96, 98, 100, 101, 0, 102, + 103, 162, 165, 167, 0, 0, 105, 183, 185, 104, + 182, 0, 106, 0, 110, 112, 121, 134, 114, 118, + 119, 117, 115, 116, 162, 226, 205, 204, 66, 0, + 67, 68, 13, 0, 28, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 251, 0, 0, 240, 0, 0, + 0, 156, 142, 0, 0, 166, 144, 146, 164, 178, + 160, 0, 258, 259, 257, 256, 253, 255, 155, 225, + 254, 233, 234, 235, 236, 237, 238, 0, 0, 0, + 0, 55, 56, 58, 59, 54, 53, 57, 258, 60, + 259, 0, 87, 70, 34, 190, 182, 0, 0, 180, + 0, 0, 184, 0, 51, 25, 49, 241, 242, 0, + 244, 245, 246, 0, 0, 249, 250, 252, 0, 144, + 146, 0, 0, 0, 0, 0, 0, 48, 0, 137, + 73, 189, 188, 0, 181, 49, 0, 29, 0, 0, + 0, 148, 145, 147, 0, 0, 154, 149, 0, 62, + 139, 74, 71, 0, 26, 50, 243, 247, 248, 149, + 0, 151, 0, 0, 186, 150, 151, 0, 63, 30, + 152, 64, 0, 31 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -240, -240, 17, -240, 12, 329, -240, -240, -240, -240, @@ -1115,10 +952,19 @@ -240, -104, -240, -239, -240, -50, -26, -240, 61 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -206 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 2, 3, 35, 264, 5, 36, 49, 313, 415, + 178, 386, 452, 268, 176, 37, 97, 98, 38, 360, + 417, 199, 116, 443, 39, 126, 410, 432, 40, 125, + 117, 371, 100, 101, 249, 102, 118, 104, 105, 106, + 107, 228, 287, 288, 289, 108, 119, 110, 120 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 109, 266, 229, 404, 122, 424, 109, 129, 231, 41, @@ -1367,12 +1213,6 @@ 241, 242, 243, 244, 245, 246, 247, 0, 248 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-240)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 26, 128, 106, 52, 30, 52, 32, 4, 108, 4, @@ -1621,8 +1461,8 @@ 130, 131, 132, 133, 134, 135, 136, -1, 138 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 139, 147, 148, 150, 151, 0, 3, 4, 6, @@ -1673,94 +1513,105 @@ 145, 192, 158, 8 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 146, 147, 147, 148, 149, 149, 150, 150, 151, + 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 153, 152, 152, 154, 155, 152, 156, 157, 152, + 158, 152, 152, 159, 152, 152, 152, 160, 160, 161, + 161, 161, 162, 162, 163, 163, 163, 165, 164, 166, + 166, 167, 167, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 169, 169, 169, 170, 170, 170, 170, 171, + 172, 170, 170, 173, 173, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 175, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 176, 176, 177, 177, + 178, 178, 178, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 180, 180, 181, 181, 182, 182, 182, + 182, 182, 183, 183, 183, 184, 184, 185, 185, 186, + 186, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 188, 188, 189, 189, 189, 190, 190, 190, 190, 190, + 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, + 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, + 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, + 191, 191, 191, 192, 192, 193, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194 +}; -#define YYRECOVERING() (!!yyerrstatus) + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 3, 1, 3, 0, 1, 1, + 2, 3, 3, 4, 1, 1, 1, 1, 1, 2, + 2, 0, 3, 2, 0, 0, 7, 0, 0, 6, + 0, 10, 1, 0, 4, 1, 1, 1, 1, 2, + 2, 3, 1, 2, 1, 1, 1, 0, 5, 0, + 2, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 0, 2, 3, 1, 4, 4, 4, 0, + 0, 6, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 3, 0, 4, 3, 3, + 3, 3, 2, 2, 3, 2, 3, 2, 3, 2, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, + 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 3, 2, 1, 5, 0, 3, + 1, 1, 3, 1, 3, 5, 3, 5, 5, 5, + 7, 6, 8, 1, 4, 3, 3, 1, 2, 2, + 3, 1, 1, 1, 3, 1, 3, 1, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 3, 1, 1, 2, 1, 5, 4, 3, 3, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, + 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, + 3, 4, 4, 6, 4, 4, 4, 6, 6, 4, + 4, 3, 4, 3, 3, 3, 3, 3, 3, 3, + 2 +}; -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -1770,54 +1621,46 @@ # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1825,22 +1668,11 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -1851,16 +1683,8 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1871,49 +1695,42 @@ YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1927,7 +1744,7 @@ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1950,15 +1767,8 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1974,16 +1784,8 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -2013,27 +1815,27 @@ char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -2056,12 +1858,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -2069,10 +1870,6 @@ int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -2121,11 +1918,13 @@ break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -2145,10 +1944,12 @@ # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -2185,48 +1986,20 @@ | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ @@ -2234,7 +2007,6 @@ /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; @@ -2243,37 +2015,18 @@ | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -2291,7 +2044,7 @@ int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -2309,9 +2062,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -2320,14 +2072,6 @@ yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -2348,23 +2092,23 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -2372,22 +2116,22 @@ # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -2396,10 +2140,10 @@ yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -2428,7 +2172,7 @@ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -2468,7 +2212,9 @@ yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -2491,7 +2237,7 @@ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -2505,531 +2251,474 @@ switch (yyn) { case 3: - -/* Line 1806 of yacc.c */ -#line 279 "pic.y" +#line 277 "pic.y" /* yacc.c:1646 */ { if (olist.head) print_picture(olist.head); } +#line 2260 "pic.cpp" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 288 "pic.y" - { (yyval.pl) = (yyvsp[(2) - (3)].pl); } +#line 286 "pic.y" /* yacc.c:1646 */ + { (yyval.pl) = (yyvsp[-1].pl); } +#line 2266 "pic.cpp" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 293 "pic.y" - { (yyval.pl) = (yyvsp[(1) - (1)].pl); } +#line 291 "pic.y" /* yacc.c:1646 */ + { (yyval.pl) = (yyvsp[0].pl); } +#line 2272 "pic.cpp" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 295 "pic.y" - { (yyval.pl) = (yyvsp[(1) - (3)].pl); } +#line 293 "pic.y" /* yacc.c:1646 */ + { (yyval.pl) = (yyvsp[-2].pl); } +#line 2278 "pic.cpp" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 310 "pic.y" +#line 308 "pic.y" /* yacc.c:1646 */ { a_delete graphname; - graphname = new char[strlen((yyvsp[(3) - (3)].str)) + 1]; - strcpy(graphname, (yyvsp[(3) - (3)].str)); - a_delete (yyvsp[(3) - (3)].str); + graphname = new char[strlen((yyvsp[0].str)) + 1]; + strcpy(graphname, (yyvsp[0].str)); + a_delete (yyvsp[0].str); } +#line 2289 "pic.cpp" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 318 "pic.y" +#line 316 "pic.y" /* yacc.c:1646 */ { - define_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].x)); - a_delete (yyvsp[(1) - (3)].str); + define_variable((yyvsp[-2].str), (yyvsp[0].x)); + a_delete (yyvsp[-2].str); } +#line 2298 "pic.cpp" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 323 "pic.y" +#line 321 "pic.y" /* yacc.c:1646 */ { - place *p = lookup_label((yyvsp[(1) - (4)].str)); + place *p = lookup_label((yyvsp[-3].str)); if (!p) { - lex_error("variable `%1' not defined", (yyvsp[(1) - (4)].str)); + lex_error("variable `%1' not defined", (yyvsp[-3].str)); YYABORT; } p->obj = 0; - p->x = (yyvsp[(4) - (4)].x); + p->x = (yyvsp[0].x); p->y = 0.0; - a_delete (yyvsp[(1) - (4)].str); + a_delete (yyvsp[-3].str); } +#line 2314 "pic.cpp" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 335 "pic.y" +#line 333 "pic.y" /* yacc.c:1646 */ { current_direction = UP_DIRECTION; } +#line 2320 "pic.cpp" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 337 "pic.y" +#line 335 "pic.y" /* yacc.c:1646 */ { current_direction = DOWN_DIRECTION; } +#line 2326 "pic.cpp" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 339 "pic.y" +#line 337 "pic.y" /* yacc.c:1646 */ { current_direction = LEFT_DIRECTION; } +#line 2332 "pic.cpp" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 341 "pic.y" +#line 339 "pic.y" /* yacc.c:1646 */ { current_direction = RIGHT_DIRECTION; } +#line 2338 "pic.cpp" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 343 "pic.y" +#line 341 "pic.y" /* yacc.c:1646 */ { - olist.append(make_command_object((yyvsp[(1) - (1)].lstr).str, (yyvsp[(1) - (1)].lstr).filename, - (yyvsp[(1) - (1)].lstr).lineno)); + olist.append(make_command_object((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, + (yyvsp[0].lstr).lineno)); } +#line 2347 "pic.cpp" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 348 "pic.y" +#line 346 "pic.y" /* yacc.c:1646 */ { - olist.append(make_command_object((yyvsp[(2) - (2)].lstr).str, (yyvsp[(2) - (2)].lstr).filename, - (yyvsp[(2) - (2)].lstr).lineno)); + olist.append(make_command_object((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, + (yyvsp[0].lstr).lineno)); } +#line 2356 "pic.cpp" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 353 "pic.y" +#line 351 "pic.y" /* yacc.c:1646 */ { - fprintf(stderr, "%s\n", (yyvsp[(2) - (2)].lstr).str); - a_delete (yyvsp[(2) - (2)].lstr).str; + fprintf(stderr, "%s\n", (yyvsp[0].lstr).str); + a_delete (yyvsp[0].lstr).str; fflush(stderr); } +#line 2366 "pic.cpp" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 359 "pic.y" +#line 357 "pic.y" /* yacc.c:1646 */ { delim_flag = 1; } +#line 2372 "pic.cpp" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 361 "pic.y" +#line 359 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; if (safer_flag) - lex_error("unsafe to run command `%1'", (yyvsp[(3) - (3)].str)); + lex_error("unsafe to run command `%1'", (yyvsp[0].str)); else - system((yyvsp[(3) - (3)].str)); - a_delete (yyvsp[(3) - (3)].str); + system((yyvsp[0].str)); + a_delete (yyvsp[0].str); } +#line 2385 "pic.cpp" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 370 "pic.y" +#line 368 "pic.y" /* yacc.c:1646 */ { if (yychar < 0) do_lookahead(); - do_copy((yyvsp[(2) - (2)].lstr).str); + do_copy((yyvsp[0].lstr).str); // do not delete the filename } +#line 2396 "pic.cpp" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 377 "pic.y" +#line 375 "pic.y" /* yacc.c:1646 */ { delim_flag = 2; } +#line 2402 "pic.cpp" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 379 "pic.y" +#line 377 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; } +#line 2408 "pic.cpp" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 381 "pic.y" +#line 379 "pic.y" /* yacc.c:1646 */ { if (yychar < 0) do_lookahead(); - copy_file_thru((yyvsp[(2) - (7)].lstr).str, (yyvsp[(5) - (7)].str), (yyvsp[(7) - (7)].str)); + copy_file_thru((yyvsp[-5].lstr).str, (yyvsp[-2].str), (yyvsp[0].str)); // do not delete the filename - a_delete (yyvsp[(5) - (7)].str); - a_delete (yyvsp[(7) - (7)].str); + a_delete (yyvsp[-2].str); + a_delete (yyvsp[0].str); } +#line 2421 "pic.cpp" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 390 "pic.y" +#line 388 "pic.y" /* yacc.c:1646 */ { delim_flag = 2; } +#line 2427 "pic.cpp" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 392 "pic.y" +#line 390 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; } +#line 2433 "pic.cpp" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 394 "pic.y" +#line 392 "pic.y" /* yacc.c:1646 */ { if (yychar < 0) do_lookahead(); - copy_rest_thru((yyvsp[(4) - (6)].str), (yyvsp[(6) - (6)].str)); - a_delete (yyvsp[(4) - (6)].str); - a_delete (yyvsp[(6) - (6)].str); + copy_rest_thru((yyvsp[-2].str), (yyvsp[0].str)); + a_delete (yyvsp[-2].str); + a_delete (yyvsp[0].str); } +#line 2445 "pic.cpp" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 402 "pic.y" +#line 400 "pic.y" /* yacc.c:1646 */ { delim_flag = 1; } +#line 2451 "pic.cpp" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 404 "pic.y" +#line 402 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; if (yychar < 0) do_lookahead(); - do_for((yyvsp[(2) - (10)].str), (yyvsp[(4) - (10)].x), (yyvsp[(6) - (10)].x), (yyvsp[(7) - (10)].by).is_multiplicative, (yyvsp[(7) - (10)].by).val, (yyvsp[(10) - (10)].str)); + do_for((yyvsp[-8].str), (yyvsp[-6].x), (yyvsp[-4].x), (yyvsp[-3].by).is_multiplicative, (yyvsp[-3].by).val, (yyvsp[0].str)); } +#line 2462 "pic.cpp" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 411 "pic.y" +#line 409 "pic.y" /* yacc.c:1646 */ { if (yychar < 0) do_lookahead(); - if ((yyvsp[(1) - (1)].if_data).x != 0.0) - push_body((yyvsp[(1) - (1)].if_data).body); - a_delete (yyvsp[(1) - (1)].if_data).body; + if ((yyvsp[0].if_data).x != 0.0) + push_body((yyvsp[0].if_data).body); + a_delete (yyvsp[0].if_data).body; } +#line 2474 "pic.cpp" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 419 "pic.y" +#line 417 "pic.y" /* yacc.c:1646 */ { delim_flag = 1; } +#line 2480 "pic.cpp" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 421 "pic.y" +#line 419 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; if (yychar < 0) do_lookahead(); - if ((yyvsp[(1) - (4)].if_data).x != 0.0) - push_body((yyvsp[(1) - (4)].if_data).body); + if ((yyvsp[-3].if_data).x != 0.0) + push_body((yyvsp[-3].if_data).body); else - push_body((yyvsp[(4) - (4)].str)); - a_delete (yyvsp[(1) - (4)].if_data).body; - a_delete (yyvsp[(4) - (4)].str); + push_body((yyvsp[0].str)); + a_delete (yyvsp[-3].if_data).body; + a_delete (yyvsp[0].str); } +#line 2496 "pic.cpp" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 434 "pic.y" +#line 432 "pic.y" /* yacc.c:1646 */ { define_variable("scale", 1.0); } +#line 2502 "pic.cpp" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 444 "pic.y" +#line 442 "pic.y" /* yacc.c:1646 */ { - reset((yyvsp[(2) - (2)].str)); - a_delete (yyvsp[(2) - (2)].str); + reset((yyvsp[0].str)); + a_delete (yyvsp[0].str); } +#line 2511 "pic.cpp" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 449 "pic.y" +#line 447 "pic.y" /* yacc.c:1646 */ { - reset((yyvsp[(2) - (2)].str)); - a_delete (yyvsp[(2) - (2)].str); + reset((yyvsp[0].str)); + a_delete (yyvsp[0].str); } +#line 2520 "pic.cpp" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 454 "pic.y" +#line 452 "pic.y" /* yacc.c:1646 */ { - reset((yyvsp[(3) - (3)].str)); - a_delete (yyvsp[(3) - (3)].str); + reset((yyvsp[0].str)); + a_delete (yyvsp[0].str); } +#line 2529 "pic.cpp" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 462 "pic.y" - { (yyval.lstr) = (yyvsp[(1) - (1)].lstr); } +#line 460 "pic.y" /* yacc.c:1646 */ + { (yyval.lstr) = (yyvsp[0].lstr); } +#line 2535 "pic.cpp" /* yacc.c:1646 */ break; case 43: - -/* Line 1806 of yacc.c */ -#line 464 "pic.y" +#line 462 "pic.y" /* yacc.c:1646 */ { - (yyval.lstr).str = new char[strlen((yyvsp[(1) - (2)].lstr).str) + strlen((yyvsp[(2) - (2)].lstr).str) + 1]; - strcpy((yyval.lstr).str, (yyvsp[(1) - (2)].lstr).str); - strcat((yyval.lstr).str, (yyvsp[(2) - (2)].lstr).str); - a_delete (yyvsp[(1) - (2)].lstr).str; - a_delete (yyvsp[(2) - (2)].lstr).str; - if ((yyvsp[(1) - (2)].lstr).filename) { - (yyval.lstr).filename = (yyvsp[(1) - (2)].lstr).filename; - (yyval.lstr).lineno = (yyvsp[(1) - (2)].lstr).lineno; + (yyval.lstr).str = new char[strlen((yyvsp[-1].lstr).str) + strlen((yyvsp[0].lstr).str) + 1]; + strcpy((yyval.lstr).str, (yyvsp[-1].lstr).str); + strcat((yyval.lstr).str, (yyvsp[0].lstr).str); + a_delete (yyvsp[-1].lstr).str; + a_delete (yyvsp[0].lstr).str; + if ((yyvsp[-1].lstr).filename) { + (yyval.lstr).filename = (yyvsp[-1].lstr).filename; + (yyval.lstr).lineno = (yyvsp[-1].lstr).lineno; } - else if ((yyvsp[(2) - (2)].lstr).filename) { - (yyval.lstr).filename = (yyvsp[(2) - (2)].lstr).filename; - (yyval.lstr).lineno = (yyvsp[(2) - (2)].lstr).lineno; + else if ((yyvsp[0].lstr).filename) { + (yyval.lstr).filename = (yyvsp[0].lstr).filename; + (yyval.lstr).lineno = (yyvsp[0].lstr).lineno; } } +#line 2555 "pic.cpp" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 483 "pic.y" +#line 481 "pic.y" /* yacc.c:1646 */ { (yyval.lstr).str = new char[GDIGITS + 1]; - sprintf((yyval.lstr).str, "%g", (yyvsp[(1) - (1)].x)); + sprintf((yyval.lstr).str, "%g", (yyvsp[0].x)); (yyval.lstr).filename = 0; (yyval.lstr).lineno = 0; } +#line 2566 "pic.cpp" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 490 "pic.y" - { (yyval.lstr) = (yyvsp[(1) - (1)].lstr); } +#line 488 "pic.y" /* yacc.c:1646 */ + { (yyval.lstr) = (yyvsp[0].lstr); } +#line 2572 "pic.cpp" /* yacc.c:1646 */ break; case 46: - -/* Line 1806 of yacc.c */ -#line 492 "pic.y" +#line 490 "pic.y" /* yacc.c:1646 */ { (yyval.lstr).str = new char[GDIGITS + 2 + GDIGITS + 1]; - sprintf((yyval.lstr).str, "%g, %g", (yyvsp[(1) - (1)].pair).x, (yyvsp[(1) - (1)].pair).y); + sprintf((yyval.lstr).str, "%g, %g", (yyvsp[0].pair).x, (yyvsp[0].pair).y); (yyval.lstr).filename = 0; (yyval.lstr).lineno = 0; } +#line 2583 "pic.cpp" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 502 "pic.y" +#line 500 "pic.y" /* yacc.c:1646 */ { delim_flag = 1; } +#line 2589 "pic.cpp" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 504 "pic.y" +#line 502 "pic.y" /* yacc.c:1646 */ { delim_flag = 0; - (yyval.if_data).x = (yyvsp[(2) - (5)].x); - (yyval.if_data).body = (yyvsp[(5) - (5)].str); + (yyval.if_data).x = (yyvsp[-3].x); + (yyval.if_data).body = (yyvsp[0].str); } +#line 2599 "pic.cpp" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 513 "pic.y" +#line 511 "pic.y" /* yacc.c:1646 */ { (yyval.str) = 0; } +#line 2605 "pic.cpp" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 515 "pic.y" - { (yyval.str) = (yyvsp[(2) - (2)].lstr).str; } +#line 513 "pic.y" /* yacc.c:1646 */ + { (yyval.str) = (yyvsp[0].lstr).str; } +#line 2611 "pic.cpp" /* yacc.c:1646 */ break; case 51: - -/* Line 1806 of yacc.c */ -#line 520 "pic.y" - { (yyval.x) = (yyvsp[(1) - (1)].x); } +#line 518 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[0].x); } +#line 2617 "pic.cpp" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 522 "pic.y" - { (yyval.x) = (yyvsp[(1) - (1)].x); } +#line 520 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[0].x); } +#line 2623 "pic.cpp" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 527 "pic.y" +#line 525 "pic.y" /* yacc.c:1646 */ { - (yyval.x) = strcmp((yyvsp[(1) - (3)].lstr).str, (yyvsp[(3) - (3)].lstr).str) == 0; - a_delete (yyvsp[(1) - (3)].lstr).str; - a_delete (yyvsp[(3) - (3)].lstr).str; + (yyval.x) = strcmp((yyvsp[-2].lstr).str, (yyvsp[0].lstr).str) == 0; + a_delete (yyvsp[-2].lstr).str; + a_delete (yyvsp[0].lstr).str; } +#line 2633 "pic.cpp" /* yacc.c:1646 */ break; case 54: - -/* Line 1806 of yacc.c */ -#line 533 "pic.y" +#line 531 "pic.y" /* yacc.c:1646 */ { - (yyval.x) = strcmp((yyvsp[(1) - (3)].lstr).str, (yyvsp[(3) - (3)].lstr).str) != 0; - a_delete (yyvsp[(1) - (3)].lstr).str; - a_delete (yyvsp[(3) - (3)].lstr).str; + (yyval.x) = strcmp((yyvsp[-2].lstr).str, (yyvsp[0].lstr).str) != 0; + a_delete (yyvsp[-2].lstr).str; + a_delete (yyvsp[0].lstr).str; } +#line 2643 "pic.cpp" /* yacc.c:1646 */ break; case 55: - -/* Line 1806 of yacc.c */ -#line 539 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 && (yyvsp[(3) - (3)].x) != 0.0); } +#line 537 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); } +#line 2649 "pic.cpp" /* yacc.c:1646 */ break; case 56: - -/* Line 1806 of yacc.c */ -#line 541 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 && (yyvsp[(3) - (3)].x) != 0.0); } +#line 539 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); } +#line 2655 "pic.cpp" /* yacc.c:1646 */ break; case 57: - -/* Line 1806 of yacc.c */ -#line 543 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 && (yyvsp[(3) - (3)].x) != 0.0); } +#line 541 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); } +#line 2661 "pic.cpp" /* yacc.c:1646 */ break; case 58: - -/* Line 1806 of yacc.c */ -#line 545 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 || (yyvsp[(3) - (3)].x) != 0.0); } +#line 543 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); } +#line 2667 "pic.cpp" /* yacc.c:1646 */ break; case 59: - -/* Line 1806 of yacc.c */ -#line 547 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 || (yyvsp[(3) - (3)].x) != 0.0); } +#line 545 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); } +#line 2673 "pic.cpp" /* yacc.c:1646 */ break; case 60: - -/* Line 1806 of yacc.c */ -#line 549 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 || (yyvsp[(3) - (3)].x) != 0.0); } +#line 547 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); } +#line 2679 "pic.cpp" /* yacc.c:1646 */ break; case 61: - -/* Line 1806 of yacc.c */ -#line 551 "pic.y" - { (yyval.x) = ((yyvsp[(2) - (2)].x) == 0.0); } +#line 549 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[0].x) == 0.0); } +#line 2685 "pic.cpp" /* yacc.c:1646 */ break; case 62: - -/* Line 1806 of yacc.c */ -#line 557 "pic.y" +#line 555 "pic.y" /* yacc.c:1646 */ { (yyval.by).val = 1.0; (yyval.by).is_multiplicative = 0; } +#line 2694 "pic.cpp" /* yacc.c:1646 */ break; case 63: - -/* Line 1806 of yacc.c */ -#line 562 "pic.y" +#line 560 "pic.y" /* yacc.c:1646 */ { - (yyval.by).val = (yyvsp[(2) - (2)].x); + (yyval.by).val = (yyvsp[0].x); (yyval.by).is_multiplicative = 0; } +#line 2703 "pic.cpp" /* yacc.c:1646 */ break; case 64: - -/* Line 1806 of yacc.c */ -#line 567 "pic.y" +#line 565 "pic.y" /* yacc.c:1646 */ { - (yyval.by).val = (yyvsp[(3) - (3)].x); + (yyval.by).val = (yyvsp[0].x); (yyval.by).is_multiplicative = 1; } +#line 2712 "pic.cpp" /* yacc.c:1646 */ break; case 65: - -/* Line 1806 of yacc.c */ -#line 575 "pic.y" +#line 573 "pic.y" /* yacc.c:1646 */ { - (yyval.pl).obj = (yyvsp[(1) - (1)].spec)->make_object(¤t_position, + (yyval.pl).obj = (yyvsp[0].spec)->make_object(¤t_position, ¤t_direction); if ((yyval.pl).obj == 0) YYABORT; - delete (yyvsp[(1) - (1)].spec); + delete (yyvsp[0].spec); if ((yyval.pl).obj) olist.append((yyval.pl).obj); else { @@ -3037,214 +2726,193 @@ (yyval.pl).y = current_position.y; } } +#line 2730 "pic.cpp" /* yacc.c:1646 */ break; case 66: - -/* Line 1806 of yacc.c */ -#line 589 "pic.y" +#line 587 "pic.y" /* yacc.c:1646 */ { - (yyval.pl) = (yyvsp[(4) - (4)].pl); - define_label((yyvsp[(1) - (4)].str), & (yyval.pl)); - a_delete (yyvsp[(1) - (4)].str); + (yyval.pl) = (yyvsp[0].pl); + define_label((yyvsp[-3].str), & (yyval.pl)); + a_delete (yyvsp[-3].str); } +#line 2740 "pic.cpp" /* yacc.c:1646 */ break; case 67: - -/* Line 1806 of yacc.c */ -#line 595 "pic.y" +#line 593 "pic.y" /* yacc.c:1646 */ { (yyval.pl).obj = 0; - (yyval.pl).x = (yyvsp[(4) - (4)].pair).x; - (yyval.pl).y = (yyvsp[(4) - (4)].pair).y; - define_label((yyvsp[(1) - (4)].str), & (yyval.pl)); - a_delete (yyvsp[(1) - (4)].str); + (yyval.pl).x = (yyvsp[0].pair).x; + (yyval.pl).y = (yyvsp[0].pair).y; + define_label((yyvsp[-3].str), & (yyval.pl)); + a_delete (yyvsp[-3].str); } +#line 2752 "pic.cpp" /* yacc.c:1646 */ break; case 68: - -/* Line 1806 of yacc.c */ -#line 603 "pic.y" +#line 601 "pic.y" /* yacc.c:1646 */ { - (yyval.pl) = (yyvsp[(4) - (4)].pl); - define_label((yyvsp[(1) - (4)].str), & (yyval.pl)); - a_delete (yyvsp[(1) - (4)].str); + (yyval.pl) = (yyvsp[0].pl); + define_label((yyvsp[-3].str), & (yyval.pl)); + a_delete (yyvsp[-3].str); } +#line 2762 "pic.cpp" /* yacc.c:1646 */ break; case 69: - -/* Line 1806 of yacc.c */ -#line 609 "pic.y" +#line 607 "pic.y" /* yacc.c:1646 */ { (yyval.state).x = current_position.x; (yyval.state).y = current_position.y; (yyval.state).dir = current_direction; } +#line 2772 "pic.cpp" /* yacc.c:1646 */ break; case 70: - -/* Line 1806 of yacc.c */ -#line 615 "pic.y" +#line 613 "pic.y" /* yacc.c:1646 */ { - current_position.x = (yyvsp[(2) - (4)].state).x; - current_position.y = (yyvsp[(2) - (4)].state).y; - current_direction = (yyvsp[(2) - (4)].state).dir; + current_position.x = (yyvsp[-2].state).x; + current_position.y = (yyvsp[-2].state).y; + current_direction = (yyvsp[-2].state).dir; } +#line 2782 "pic.cpp" /* yacc.c:1646 */ break; case 71: - -/* Line 1806 of yacc.c */ -#line 621 "pic.y" +#line 619 "pic.y" /* yacc.c:1646 */ { - (yyval.pl) = (yyvsp[(3) - (6)].pl); + (yyval.pl) = (yyvsp[-3].pl); } +#line 2790 "pic.cpp" /* yacc.c:1646 */ break; case 72: - -/* Line 1806 of yacc.c */ -#line 625 "pic.y" +#line 623 "pic.y" /* yacc.c:1646 */ { (yyval.pl).obj = 0; (yyval.pl).x = current_position.x; (yyval.pl).y = current_position.y; } +#line 2800 "pic.cpp" /* yacc.c:1646 */ break; case 73: - -/* Line 1806 of yacc.c */ -#line 634 "pic.y" +#line 632 "pic.y" /* yacc.c:1646 */ {} +#line 2806 "pic.cpp" /* yacc.c:1646 */ break; case 74: - -/* Line 1806 of yacc.c */ -#line 636 "pic.y" +#line 634 "pic.y" /* yacc.c:1646 */ {} +#line 2812 "pic.cpp" /* yacc.c:1646 */ break; case 75: - -/* Line 1806 of yacc.c */ -#line 641 "pic.y" +#line 639 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(BOX_OBJECT); } +#line 2818 "pic.cpp" /* yacc.c:1646 */ break; case 76: - -/* Line 1806 of yacc.c */ -#line 643 "pic.y" +#line 641 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(CIRCLE_OBJECT); } +#line 2824 "pic.cpp" /* yacc.c:1646 */ break; case 77: - -/* Line 1806 of yacc.c */ -#line 645 "pic.y" +#line 643 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(ELLIPSE_OBJECT); } +#line 2830 "pic.cpp" /* yacc.c:1646 */ break; case 78: - -/* Line 1806 of yacc.c */ -#line 647 "pic.y" +#line 645 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(ARC_OBJECT); (yyval.spec)->dir = current_direction; } +#line 2839 "pic.cpp" /* yacc.c:1646 */ break; case 79: - -/* Line 1806 of yacc.c */ -#line 652 "pic.y" +#line 650 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(LINE_OBJECT); lookup_variable("lineht", & (yyval.spec)->segment_height); lookup_variable("linewid", & (yyval.spec)->segment_width); (yyval.spec)->dir = current_direction; } +#line 2850 "pic.cpp" /* yacc.c:1646 */ break; case 80: - -/* Line 1806 of yacc.c */ -#line 659 "pic.y" +#line 657 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(ARROW_OBJECT); lookup_variable("lineht", & (yyval.spec)->segment_height); lookup_variable("linewid", & (yyval.spec)->segment_width); (yyval.spec)->dir = current_direction; } +#line 2861 "pic.cpp" /* yacc.c:1646 */ break; case 81: - -/* Line 1806 of yacc.c */ -#line 666 "pic.y" +#line 664 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(MOVE_OBJECT); lookup_variable("moveht", & (yyval.spec)->segment_height); lookup_variable("movewid", & (yyval.spec)->segment_width); (yyval.spec)->dir = current_direction; } +#line 2872 "pic.cpp" /* yacc.c:1646 */ break; case 82: - -/* Line 1806 of yacc.c */ -#line 673 "pic.y" +#line 671 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(SPLINE_OBJECT); lookup_variable("lineht", & (yyval.spec)->segment_height); lookup_variable("linewid", & (yyval.spec)->segment_width); (yyval.spec)->dir = current_direction; } +#line 2883 "pic.cpp" /* yacc.c:1646 */ break; case 83: - -/* Line 1806 of yacc.c */ -#line 680 "pic.y" +#line 678 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(TEXT_OBJECT); - (yyval.spec)->text = new text_item((yyvsp[(1) - (1)].lstr).str, (yyvsp[(1) - (1)].lstr).filename, (yyvsp[(1) - (1)].lstr).lineno); + (yyval.spec)->text = new text_item((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno); } +#line 2892 "pic.cpp" /* yacc.c:1646 */ break; case 84: - -/* Line 1806 of yacc.c */ -#line 685 "pic.y" +#line 683 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(TEXT_OBJECT); - (yyval.spec)->text = new text_item(format_number(0, (yyvsp[(2) - (2)].x)), 0, -1); + (yyval.spec)->text = new text_item(format_number(0, (yyvsp[0].x)), 0, -1); } +#line 2901 "pic.cpp" /* yacc.c:1646 */ break; case 85: - -/* Line 1806 of yacc.c */ -#line 690 "pic.y" +#line 688 "pic.y" /* yacc.c:1646 */ { (yyval.spec) = new object_spec(TEXT_OBJECT); - (yyval.spec)->text = new text_item(format_number((yyvsp[(3) - (3)].lstr).str, (yyvsp[(2) - (3)].x)), - (yyvsp[(3) - (3)].lstr).filename, (yyvsp[(3) - (3)].lstr).lineno); - a_delete (yyvsp[(3) - (3)].lstr).str; + (yyval.spec)->text = new text_item(format_number((yyvsp[0].lstr).str, (yyvsp[-1].x)), + (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno); + a_delete (yyvsp[0].lstr).str; } +#line 2912 "pic.cpp" /* yacc.c:1646 */ break; case 86: - -/* Line 1806 of yacc.c */ -#line 697 "pic.y" +#line 695 "pic.y" /* yacc.c:1646 */ { saved_state *p = new saved_state; (yyval.pstate) = p; @@ -3259,281 +2927,260 @@ current_saved_state = p; olist.append(make_mark_object()); } +#line 2931 "pic.cpp" /* yacc.c:1646 */ break; case 87: - -/* Line 1806 of yacc.c */ -#line 712 "pic.y" +#line 710 "pic.y" /* yacc.c:1646 */ { - current_position.x = (yyvsp[(2) - (4)].pstate)->x; - current_position.y = (yyvsp[(2) - (4)].pstate)->y; - current_direction = (yyvsp[(2) - (4)].pstate)->dir; + current_position.x = (yyvsp[-2].pstate)->x; + current_position.y = (yyvsp[-2].pstate)->y; + current_direction = (yyvsp[-2].pstate)->dir; (yyval.spec) = new object_spec(BLOCK_OBJECT); olist.wrap_up_block(& (yyval.spec)->oblist); (yyval.spec)->tbl = current_table; - current_table = (yyvsp[(2) - (4)].pstate)->tbl; - current_saved_state = (yyvsp[(2) - (4)].pstate)->prev; - delete (yyvsp[(2) - (4)].pstate); + current_table = (yyvsp[-2].pstate)->tbl; + current_saved_state = (yyvsp[-2].pstate)->prev; + delete (yyvsp[-2].pstate); } +#line 2947 "pic.cpp" /* yacc.c:1646 */ break; case 88: - -/* Line 1806 of yacc.c */ -#line 724 "pic.y" +#line 722 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); - (yyval.spec)->height = (yyvsp[(3) - (3)].x); + (yyval.spec) = (yyvsp[-2].spec); + (yyval.spec)->height = (yyvsp[0].x); (yyval.spec)->flags |= HAS_HEIGHT; } +#line 2957 "pic.cpp" /* yacc.c:1646 */ break; case 89: - -/* Line 1806 of yacc.c */ -#line 730 "pic.y" +#line 728 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); - (yyval.spec)->radius = (yyvsp[(3) - (3)].x); + (yyval.spec) = (yyvsp[-2].spec); + (yyval.spec)->radius = (yyvsp[0].x); (yyval.spec)->flags |= HAS_RADIUS; } +#line 2967 "pic.cpp" /* yacc.c:1646 */ break; case 90: - -/* Line 1806 of yacc.c */ -#line 736 "pic.y" +#line 734 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); - (yyval.spec)->width = (yyvsp[(3) - (3)].x); + (yyval.spec) = (yyvsp[-2].spec); + (yyval.spec)->width = (yyvsp[0].x); (yyval.spec)->flags |= HAS_WIDTH; } +#line 2977 "pic.cpp" /* yacc.c:1646 */ break; case 91: - -/* Line 1806 of yacc.c */ -#line 742 "pic.y" +#line 740 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); - (yyval.spec)->radius = (yyvsp[(3) - (3)].x)/2.0; + (yyval.spec) = (yyvsp[-2].spec); + (yyval.spec)->radius = (yyvsp[0].x)/2.0; (yyval.spec)->flags |= HAS_RADIUS; } +#line 2987 "pic.cpp" /* yacc.c:1646 */ break; case 92: - -/* Line 1806 of yacc.c */ -#line 748 "pic.y" +#line 746 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= HAS_SEGMENT; switch ((yyval.spec)->dir) { case UP_DIRECTION: - (yyval.spec)->segment_pos.y += (yyvsp[(2) - (2)].x); + (yyval.spec)->segment_pos.y += (yyvsp[0].x); break; case DOWN_DIRECTION: - (yyval.spec)->segment_pos.y -= (yyvsp[(2) - (2)].x); + (yyval.spec)->segment_pos.y -= (yyvsp[0].x); break; case RIGHT_DIRECTION: - (yyval.spec)->segment_pos.x += (yyvsp[(2) - (2)].x); + (yyval.spec)->segment_pos.x += (yyvsp[0].x); break; case LEFT_DIRECTION: - (yyval.spec)->segment_pos.x -= (yyvsp[(2) - (2)].x); + (yyval.spec)->segment_pos.x -= (yyvsp[0].x); break; } } +#line 3010 "pic.cpp" /* yacc.c:1646 */ break; case 93: - -/* Line 1806 of yacc.c */ -#line 767 "pic.y" +#line 765 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->dir = UP_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; (yyval.spec)->segment_pos.y += (yyval.spec)->segment_height; } +#line 3021 "pic.cpp" /* yacc.c:1646 */ break; case 94: - -/* Line 1806 of yacc.c */ -#line 774 "pic.y" +#line 772 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->dir = UP_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.y += (yyvsp[(3) - (3)].x); + (yyval.spec)->segment_pos.y += (yyvsp[0].x); } +#line 3032 "pic.cpp" /* yacc.c:1646 */ break; case 95: - -/* Line 1806 of yacc.c */ -#line 781 "pic.y" +#line 779 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->dir = DOWN_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; (yyval.spec)->segment_pos.y -= (yyval.spec)->segment_height; } +#line 3043 "pic.cpp" /* yacc.c:1646 */ break; case 96: - -/* Line 1806 of yacc.c */ -#line 788 "pic.y" +#line 786 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->dir = DOWN_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.y -= (yyvsp[(3) - (3)].x); + (yyval.spec)->segment_pos.y -= (yyvsp[0].x); } +#line 3054 "pic.cpp" /* yacc.c:1646 */ break; case 97: - -/* Line 1806 of yacc.c */ -#line 795 "pic.y" +#line 793 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->dir = RIGHT_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; (yyval.spec)->segment_pos.x += (yyval.spec)->segment_width; } +#line 3065 "pic.cpp" /* yacc.c:1646 */ break; case 98: - -/* Line 1806 of yacc.c */ -#line 802 "pic.y" +#line 800 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->dir = RIGHT_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.x += (yyvsp[(3) - (3)].x); + (yyval.spec)->segment_pos.x += (yyvsp[0].x); } +#line 3076 "pic.cpp" /* yacc.c:1646 */ break; case 99: - -/* Line 1806 of yacc.c */ -#line 809 "pic.y" +#line 807 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->dir = LEFT_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; (yyval.spec)->segment_pos.x -= (yyval.spec)->segment_width; } +#line 3087 "pic.cpp" /* yacc.c:1646 */ break; case 100: - -/* Line 1806 of yacc.c */ -#line 816 "pic.y" +#line 814 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->dir = LEFT_DIRECTION; (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.x -= (yyvsp[(3) - (3)].x); + (yyval.spec)->segment_pos.x -= (yyvsp[0].x); } +#line 3098 "pic.cpp" /* yacc.c:1646 */ break; case 101: - -/* Line 1806 of yacc.c */ -#line 823 "pic.y" +#line 821 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_FROM; - (yyval.spec)->from.x = (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->from.y = (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->from.x = (yyvsp[0].pair).x; + (yyval.spec)->from.y = (yyvsp[0].pair).y; } +#line 3109 "pic.cpp" /* yacc.c:1646 */ break; case 102: - -/* Line 1806 of yacc.c */ -#line 830 "pic.y" +#line 828 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); if ((yyval.spec)->flags & HAS_SEGMENT) (yyval.spec)->segment_list = new segment((yyval.spec)->segment_pos, (yyval.spec)->segment_is_absolute, (yyval.spec)->segment_list); (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.x = (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->segment_pos.y = (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->segment_pos.x = (yyvsp[0].pair).x; + (yyval.spec)->segment_pos.y = (yyvsp[0].pair).y; (yyval.spec)->segment_is_absolute = 1; (yyval.spec)->flags |= HAS_TO; - (yyval.spec)->to.x = (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->to.y = (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->to.x = (yyvsp[0].pair).x; + (yyval.spec)->to.y = (yyvsp[0].pair).y; } +#line 3128 "pic.cpp" /* yacc.c:1646 */ break; case 103: - -/* Line 1806 of yacc.c */ -#line 845 "pic.y" +#line 843 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_AT; - (yyval.spec)->at.x = (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->at.y = (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->at.x = (yyvsp[0].pair).x; + (yyval.spec)->at.y = (yyvsp[0].pair).y; if ((yyval.spec)->type != ARC_OBJECT) { (yyval.spec)->flags |= HAS_FROM; - (yyval.spec)->from.x = (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->from.y = (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->from.x = (yyvsp[0].pair).x; + (yyval.spec)->from.y = (yyvsp[0].pair).y; } } +#line 3144 "pic.cpp" /* yacc.c:1646 */ break; case 104: - -/* Line 1806 of yacc.c */ -#line 857 "pic.y" +#line 855 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_WITH; - (yyval.spec)->with = (yyvsp[(3) - (3)].pth); + (yyval.spec)->with = (yyvsp[0].pth); } +#line 3154 "pic.cpp" /* yacc.c:1646 */ break; case 105: - -/* Line 1806 of yacc.c */ -#line 863 "pic.y" +#line 861 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_WITH; position pos; - pos.x = (yyvsp[(3) - (3)].pair).x; - pos.y = (yyvsp[(3) - (3)].pair).y; + pos.x = (yyvsp[0].pair).x; + pos.y = (yyvsp[0].pair).y; (yyval.spec)->with = new path(pos); } +#line 3167 "pic.cpp" /* yacc.c:1646 */ break; case 106: - -/* Line 1806 of yacc.c */ -#line 872 "pic.y" +#line 870 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_SEGMENT; - (yyval.spec)->segment_pos.x += (yyvsp[(3) - (3)].pair).x; - (yyval.spec)->segment_pos.y += (yyvsp[(3) - (3)].pair).y; + (yyval.spec)->segment_pos.x += (yyvsp[0].pair).x; + (yyval.spec)->segment_pos.y += (yyvsp[0].pair).y; } +#line 3178 "pic.cpp" /* yacc.c:1646 */ break; case 107: - -/* Line 1806 of yacc.c */ -#line 879 "pic.y" +#line 877 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); if (!((yyval.spec)->flags & HAS_SEGMENT)) switch ((yyval.spec)->dir) { case UP_DIRECTION: @@ -3556,148 +3203,135 @@ (yyval.spec)->segment_pos.x = (yyval.spec)->segment_pos.y = 0.0; (yyval.spec)->segment_is_absolute = 0; } +#line 3207 "pic.cpp" /* yacc.c:1646 */ break; case 108: - -/* Line 1806 of yacc.c */ -#line 904 "pic.y" +#line 902 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); // nothing + (yyval.spec) = (yyvsp[-1].spec); // nothing } +#line 3215 "pic.cpp" /* yacc.c:1646 */ break; case 109: - -/* Line 1806 of yacc.c */ -#line 908 "pic.y" +#line 906 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_DOTTED; lookup_variable("dashwid", & (yyval.spec)->dash_width); } +#line 3225 "pic.cpp" /* yacc.c:1646 */ break; case 110: - -/* Line 1806 of yacc.c */ -#line 914 "pic.y" +#line 912 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_DOTTED; - (yyval.spec)->dash_width = (yyvsp[(3) - (3)].x); + (yyval.spec)->dash_width = (yyvsp[0].x); } +#line 3235 "pic.cpp" /* yacc.c:1646 */ break; case 111: - -/* Line 1806 of yacc.c */ -#line 920 "pic.y" +#line 918 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_DASHED; lookup_variable("dashwid", & (yyval.spec)->dash_width); } +#line 3245 "pic.cpp" /* yacc.c:1646 */ break; case 112: - -/* Line 1806 of yacc.c */ -#line 926 "pic.y" +#line 924 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_DASHED; - (yyval.spec)->dash_width = (yyvsp[(3) - (3)].x); + (yyval.spec)->dash_width = (yyvsp[0].x); } +#line 3255 "pic.cpp" /* yacc.c:1646 */ break; case 113: - -/* Line 1806 of yacc.c */ -#line 932 "pic.y" +#line 930 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_DEFAULT_FILLED; } +#line 3264 "pic.cpp" /* yacc.c:1646 */ break; case 114: - -/* Line 1806 of yacc.c */ -#line 937 "pic.y" +#line 935 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_FILLED; - (yyval.spec)->fill = (yyvsp[(3) - (3)].x); + (yyval.spec)->fill = (yyvsp[0].x); } +#line 3274 "pic.cpp" /* yacc.c:1646 */ break; case 115: - -/* Line 1806 of yacc.c */ -#line 943 "pic.y" +#line 941 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_XSLANTED; - (yyval.spec)->xslanted = (yyvsp[(3) - (3)].x); + (yyval.spec)->xslanted = (yyvsp[0].x); } +#line 3284 "pic.cpp" /* yacc.c:1646 */ break; case 116: - -/* Line 1806 of yacc.c */ -#line 949 "pic.y" +#line 947 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_YSLANTED; - (yyval.spec)->yslanted = (yyvsp[(3) - (3)].x); + (yyval.spec)->yslanted = (yyvsp[0].x); } +#line 3294 "pic.cpp" /* yacc.c:1646 */ break; case 117: - -/* Line 1806 of yacc.c */ -#line 955 "pic.y" +#line 953 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= (IS_SHADED | IS_FILLED); - (yyval.spec)->shaded = new char[strlen((yyvsp[(3) - (3)].lstr).str)+1]; - strcpy((yyval.spec)->shaded, (yyvsp[(3) - (3)].lstr).str); + (yyval.spec)->shaded = new char[strlen((yyvsp[0].lstr).str)+1]; + strcpy((yyval.spec)->shaded, (yyvsp[0].lstr).str); } +#line 3305 "pic.cpp" /* yacc.c:1646 */ break; case 118: - -/* Line 1806 of yacc.c */ -#line 962 "pic.y" +#line 960 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= (IS_SHADED | IS_OUTLINED | IS_FILLED); - (yyval.spec)->shaded = new char[strlen((yyvsp[(3) - (3)].lstr).str)+1]; - strcpy((yyval.spec)->shaded, (yyvsp[(3) - (3)].lstr).str); - (yyval.spec)->outlined = new char[strlen((yyvsp[(3) - (3)].lstr).str)+1]; - strcpy((yyval.spec)->outlined, (yyvsp[(3) - (3)].lstr).str); + (yyval.spec)->shaded = new char[strlen((yyvsp[0].lstr).str)+1]; + strcpy((yyval.spec)->shaded, (yyvsp[0].lstr).str); + (yyval.spec)->outlined = new char[strlen((yyvsp[0].lstr).str)+1]; + strcpy((yyval.spec)->outlined, (yyvsp[0].lstr).str); } +#line 3318 "pic.cpp" /* yacc.c:1646 */ break; case 119: - -/* Line 1806 of yacc.c */ -#line 971 "pic.y" +#line 969 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= IS_OUTLINED; - (yyval.spec)->outlined = new char[strlen((yyvsp[(3) - (3)].lstr).str)+1]; - strcpy((yyval.spec)->outlined, (yyvsp[(3) - (3)].lstr).str); + (yyval.spec)->outlined = new char[strlen((yyvsp[0].lstr).str)+1]; + strcpy((yyval.spec)->outlined, (yyvsp[0].lstr).str); } +#line 3329 "pic.cpp" /* yacc.c:1646 */ break; case 120: - -/* Line 1806 of yacc.c */ -#line 978 "pic.y" +#line 976 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); // line chop chop means line chop 0 chop 0 if ((yyval.spec)->flags & IS_DEFAULT_CHOPPED) { (yyval.spec)->flags |= IS_CHOPPED; @@ -3711,119 +3345,109 @@ (yyval.spec)->flags |= IS_DEFAULT_CHOPPED; } } +#line 3349 "pic.cpp" /* yacc.c:1646 */ break; case 121: - -/* Line 1806 of yacc.c */ -#line 994 "pic.y" +#line 992 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); if ((yyval.spec)->flags & IS_DEFAULT_CHOPPED) { (yyval.spec)->flags |= IS_CHOPPED; (yyval.spec)->flags &= ~IS_DEFAULT_CHOPPED; (yyval.spec)->start_chop = 0.0; - (yyval.spec)->end_chop = (yyvsp[(3) - (3)].x); + (yyval.spec)->end_chop = (yyvsp[0].x); } else if ((yyval.spec)->flags & IS_CHOPPED) { - (yyval.spec)->end_chop = (yyvsp[(3) - (3)].x); + (yyval.spec)->end_chop = (yyvsp[0].x); } else { - (yyval.spec)->start_chop = (yyval.spec)->end_chop = (yyvsp[(3) - (3)].x); + (yyval.spec)->start_chop = (yyval.spec)->end_chop = (yyvsp[0].x); (yyval.spec)->flags |= IS_CHOPPED; } } +#line 3370 "pic.cpp" /* yacc.c:1646 */ break; case 122: - -/* Line 1806 of yacc.c */ -#line 1011 "pic.y" +#line 1009 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_SAME; } +#line 3379 "pic.cpp" /* yacc.c:1646 */ break; case 123: - -/* Line 1806 of yacc.c */ -#line 1016 "pic.y" +#line 1014 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_INVISIBLE; } +#line 3388 "pic.cpp" /* yacc.c:1646 */ break; case 124: - -/* Line 1806 of yacc.c */ -#line 1021 "pic.y" +#line 1019 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= HAS_LEFT_ARROW_HEAD; } +#line 3397 "pic.cpp" /* yacc.c:1646 */ break; case 125: - -/* Line 1806 of yacc.c */ -#line 1026 "pic.y" +#line 1024 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= HAS_RIGHT_ARROW_HEAD; } +#line 3406 "pic.cpp" /* yacc.c:1646 */ break; case 126: - -/* Line 1806 of yacc.c */ -#line 1031 "pic.y" +#line 1029 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD); } +#line 3415 "pic.cpp" /* yacc.c:1646 */ break; case 127: - -/* Line 1806 of yacc.c */ -#line 1036 "pic.y" +#line 1034 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_CLOCKWISE; } +#line 3424 "pic.cpp" /* yacc.c:1646 */ break; case 128: - -/* Line 1806 of yacc.c */ -#line 1041 "pic.y" +#line 1039 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags &= ~IS_CLOCKWISE; } +#line 3433 "pic.cpp" /* yacc.c:1646 */ break; case 129: - -/* Line 1806 of yacc.c */ -#line 1046 "pic.y" +#line 1044 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); text_item **p; for (p = & (yyval.spec)->text; *p; p = &(*p)->next) ; - *p = new text_item((yyvsp[(2) - (2)].lstr).str, (yyvsp[(2) - (2)].lstr).filename, (yyvsp[(2) - (2)].lstr).lineno); + *p = new text_item((yyvsp[0].lstr).str, (yyvsp[0].lstr).filename, (yyvsp[0].lstr).lineno); } +#line 3445 "pic.cpp" /* yacc.c:1646 */ break; case 130: - -/* Line 1806 of yacc.c */ -#line 1054 "pic.y" +#line 1052 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); if ((yyval.spec)->text) { text_item *p; for (p = (yyval.spec)->text; p->next; p = p->next) @@ -3831,14 +3455,13 @@ p->adj.h = LEFT_ADJUST; } } +#line 3459 "pic.cpp" /* yacc.c:1646 */ break; case 131: - -/* Line 1806 of yacc.c */ -#line 1064 "pic.y" +#line 1062 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); if ((yyval.spec)->text) { text_item *p; for (p = (yyval.spec)->text; p->next; p = p->next) @@ -3846,14 +3469,13 @@ p->adj.h = RIGHT_ADJUST; } } +#line 3473 "pic.cpp" /* yacc.c:1646 */ break; case 132: - -/* Line 1806 of yacc.c */ -#line 1074 "pic.y" +#line 1072 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); if ((yyval.spec)->text) { text_item *p; for (p = (yyval.spec)->text; p->next; p = p->next) @@ -3861,14 +3483,13 @@ p->adj.v = ABOVE_ADJUST; } } +#line 3487 "pic.cpp" /* yacc.c:1646 */ break; case 133: - -/* Line 1806 of yacc.c */ -#line 1084 "pic.y" +#line 1082 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); if ((yyval.spec)->text) { text_item *p; for (p = (yyval.spec)->text; p->next; p = p->next) @@ -3876,66 +3497,60 @@ p->adj.v = BELOW_ADJUST; } } +#line 3501 "pic.cpp" /* yacc.c:1646 */ break; case 134: - -/* Line 1806 of yacc.c */ -#line 1094 "pic.y" +#line 1092 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (3)].spec); + (yyval.spec) = (yyvsp[-2].spec); (yyval.spec)->flags |= HAS_THICKNESS; - (yyval.spec)->thickness = (yyvsp[(3) - (3)].x); + (yyval.spec)->thickness = (yyvsp[0].x); } +#line 3511 "pic.cpp" /* yacc.c:1646 */ break; case 135: - -/* Line 1806 of yacc.c */ -#line 1100 "pic.y" +#line 1098 "pic.y" /* yacc.c:1646 */ { - (yyval.spec) = (yyvsp[(1) - (2)].spec); + (yyval.spec) = (yyvsp[-1].spec); (yyval.spec)->flags |= IS_ALIGNED; } +#line 3520 "pic.cpp" /* yacc.c:1646 */ break; case 136: - -/* Line 1806 of yacc.c */ -#line 1108 "pic.y" - { (yyval.lstr) = (yyvsp[(1) - (1)].lstr); } +#line 1106 "pic.y" /* yacc.c:1646 */ + { (yyval.lstr) = (yyvsp[0].lstr); } +#line 3526 "pic.cpp" /* yacc.c:1646 */ break; case 137: - -/* Line 1806 of yacc.c */ -#line 1110 "pic.y" +#line 1108 "pic.y" /* yacc.c:1646 */ { - (yyval.lstr).filename = (yyvsp[(3) - (5)].lstr).filename; - (yyval.lstr).lineno = (yyvsp[(3) - (5)].lstr).lineno; - (yyval.lstr).str = do_sprintf((yyvsp[(3) - (5)].lstr).str, (yyvsp[(4) - (5)].dv).v, (yyvsp[(4) - (5)].dv).nv); - a_delete (yyvsp[(4) - (5)].dv).v; - a_delete (yyvsp[(3) - (5)].lstr).str; + (yyval.lstr).filename = (yyvsp[-2].lstr).filename; + (yyval.lstr).lineno = (yyvsp[-2].lstr).lineno; + (yyval.lstr).str = do_sprintf((yyvsp[-2].lstr).str, (yyvsp[-1].dv).v, (yyvsp[-1].dv).nv); + a_delete (yyvsp[-1].dv).v; + a_delete (yyvsp[-2].lstr).str; } +#line 3538 "pic.cpp" /* yacc.c:1646 */ break; case 138: - -/* Line 1806 of yacc.c */ -#line 1121 "pic.y" +#line 1119 "pic.y" /* yacc.c:1646 */ { (yyval.dv).v = 0; (yyval.dv).nv = 0; (yyval.dv).maxv = 0; } +#line 3548 "pic.cpp" /* yacc.c:1646 */ break; case 139: - -/* Line 1806 of yacc.c */ -#line 1127 "pic.y" +#line 1125 "pic.y" /* yacc.c:1646 */ { - (yyval.dv) = (yyvsp[(1) - (3)].dv); + (yyval.dv) = (yyvsp[-2].dv); if ((yyval.dv).nv >= (yyval.dv).maxv) { if ((yyval.dv).nv == 0) { (yyval.dv).v = new double[4]; @@ -3957,853 +3572,756 @@ a_delete oldv; } } - (yyval.dv).v[(yyval.dv).nv] = (yyvsp[(3) - (3)].x); + (yyval.dv).v[(yyval.dv).nv] = (yyvsp[0].x); (yyval.dv).nv += 1; } +#line 3579 "pic.cpp" /* yacc.c:1646 */ break; case 140: - -/* Line 1806 of yacc.c */ -#line 1157 "pic.y" - { (yyval.pair) = (yyvsp[(1) - (1)].pair); } +#line 1155 "pic.y" /* yacc.c:1646 */ + { (yyval.pair) = (yyvsp[0].pair); } +#line 3585 "pic.cpp" /* yacc.c:1646 */ break; case 141: - -/* Line 1806 of yacc.c */ -#line 1159 "pic.y" +#line 1157 "pic.y" /* yacc.c:1646 */ { - position pos = (yyvsp[(1) - (1)].pl); + position pos = (yyvsp[0].pl); (yyval.pair).x = pos.x; (yyval.pair).y = pos.y; } +#line 3595 "pic.cpp" /* yacc.c:1646 */ break; case 142: - -/* Line 1806 of yacc.c */ -#line 1165 "pic.y" +#line 1163 "pic.y" /* yacc.c:1646 */ { - position pos = (yyvsp[(2) - (3)].pl); + position pos = (yyvsp[-1].pl); (yyval.pair).x = pos.x; (yyval.pair).y = pos.y; } +#line 3605 "pic.cpp" /* yacc.c:1646 */ break; case 143: - -/* Line 1806 of yacc.c */ -#line 1174 "pic.y" - { (yyval.pair) = (yyvsp[(1) - (1)].pair); } +#line 1172 "pic.y" /* yacc.c:1646 */ + { (yyval.pair) = (yyvsp[0].pair); } +#line 3611 "pic.cpp" /* yacc.c:1646 */ break; case 144: - -/* Line 1806 of yacc.c */ -#line 1176 "pic.y" +#line 1174 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(1) - (3)].pair).x + (yyvsp[(3) - (3)].pair).x; - (yyval.pair).y = (yyvsp[(1) - (3)].pair).y + (yyvsp[(3) - (3)].pair).y; + (yyval.pair).x = (yyvsp[-2].pair).x + (yyvsp[0].pair).x; + (yyval.pair).y = (yyvsp[-2].pair).y + (yyvsp[0].pair).y; } +#line 3620 "pic.cpp" /* yacc.c:1646 */ break; case 145: - -/* Line 1806 of yacc.c */ -#line 1181 "pic.y" +#line 1179 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(2) - (5)].pair).x + (yyvsp[(4) - (5)].pair).x; - (yyval.pair).y = (yyvsp[(2) - (5)].pair).y + (yyvsp[(4) - (5)].pair).y; + (yyval.pair).x = (yyvsp[-3].pair).x + (yyvsp[-1].pair).x; + (yyval.pair).y = (yyvsp[-3].pair).y + (yyvsp[-1].pair).y; } +#line 3629 "pic.cpp" /* yacc.c:1646 */ break; case 146: - -/* Line 1806 of yacc.c */ -#line 1186 "pic.y" +#line 1184 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(1) - (3)].pair).x - (yyvsp[(3) - (3)].pair).x; - (yyval.pair).y = (yyvsp[(1) - (3)].pair).y - (yyvsp[(3) - (3)].pair).y; + (yyval.pair).x = (yyvsp[-2].pair).x - (yyvsp[0].pair).x; + (yyval.pair).y = (yyvsp[-2].pair).y - (yyvsp[0].pair).y; } +#line 3638 "pic.cpp" /* yacc.c:1646 */ break; case 147: - -/* Line 1806 of yacc.c */ -#line 1191 "pic.y" +#line 1189 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(2) - (5)].pair).x - (yyvsp[(4) - (5)].pair).x; - (yyval.pair).y = (yyvsp[(2) - (5)].pair).y - (yyvsp[(4) - (5)].pair).y; + (yyval.pair).x = (yyvsp[-3].pair).x - (yyvsp[-1].pair).x; + (yyval.pair).y = (yyvsp[-3].pair).y - (yyvsp[-1].pair).y; } +#line 3647 "pic.cpp" /* yacc.c:1646 */ break; case 148: - -/* Line 1806 of yacc.c */ -#line 1196 "pic.y" +#line 1194 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(2) - (5)].pair).x; - (yyval.pair).y = (yyvsp[(4) - (5)].pair).y; + (yyval.pair).x = (yyvsp[-3].pair).x; + (yyval.pair).y = (yyvsp[-1].pair).y; } +#line 3656 "pic.cpp" /* yacc.c:1646 */ break; case 149: - -/* Line 1806 of yacc.c */ -#line 1201 "pic.y" +#line 1199 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (1.0 - (yyvsp[(1) - (5)].x))*(yyvsp[(3) - (5)].pair).x + (yyvsp[(1) - (5)].x)*(yyvsp[(5) - (5)].pair).x; - (yyval.pair).y = (1.0 - (yyvsp[(1) - (5)].x))*(yyvsp[(3) - (5)].pair).y + (yyvsp[(1) - (5)].x)*(yyvsp[(5) - (5)].pair).y; + (yyval.pair).x = (1.0 - (yyvsp[-4].x))*(yyvsp[-2].pair).x + (yyvsp[-4].x)*(yyvsp[0].pair).x; + (yyval.pair).y = (1.0 - (yyvsp[-4].x))*(yyvsp[-2].pair).y + (yyvsp[-4].x)*(yyvsp[0].pair).y; } +#line 3665 "pic.cpp" /* yacc.c:1646 */ break; case 150: - -/* Line 1806 of yacc.c */ -#line 1206 "pic.y" +#line 1204 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (1.0 - (yyvsp[(2) - (7)].x))*(yyvsp[(4) - (7)].pair).x + (yyvsp[(2) - (7)].x)*(yyvsp[(6) - (7)].pair).x; - (yyval.pair).y = (1.0 - (yyvsp[(2) - (7)].x))*(yyvsp[(4) - (7)].pair).y + (yyvsp[(2) - (7)].x)*(yyvsp[(6) - (7)].pair).y; + (yyval.pair).x = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).x + (yyvsp[-5].x)*(yyvsp[-1].pair).x; + (yyval.pair).y = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).y + (yyvsp[-5].x)*(yyvsp[-1].pair).y; } +#line 3674 "pic.cpp" /* yacc.c:1646 */ break; case 151: - -/* Line 1806 of yacc.c */ -#line 1212 "pic.y" +#line 1210 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (1.0 - (yyvsp[(1) - (6)].x))*(yyvsp[(3) - (6)].pair).x + (yyvsp[(1) - (6)].x)*(yyvsp[(5) - (6)].pair).x; - (yyval.pair).y = (1.0 - (yyvsp[(1) - (6)].x))*(yyvsp[(3) - (6)].pair).y + (yyvsp[(1) - (6)].x)*(yyvsp[(5) - (6)].pair).y; + (yyval.pair).x = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).x + (yyvsp[-5].x)*(yyvsp[-1].pair).x; + (yyval.pair).y = (1.0 - (yyvsp[-5].x))*(yyvsp[-3].pair).y + (yyvsp[-5].x)*(yyvsp[-1].pair).y; } +#line 3683 "pic.cpp" /* yacc.c:1646 */ break; case 152: - -/* Line 1806 of yacc.c */ -#line 1217 "pic.y" +#line 1215 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (1.0 - (yyvsp[(2) - (8)].x))*(yyvsp[(4) - (8)].pair).x + (yyvsp[(2) - (8)].x)*(yyvsp[(6) - (8)].pair).x; - (yyval.pair).y = (1.0 - (yyvsp[(2) - (8)].x))*(yyvsp[(4) - (8)].pair).y + (yyvsp[(2) - (8)].x)*(yyvsp[(6) - (8)].pair).y; + (yyval.pair).x = (1.0 - (yyvsp[-6].x))*(yyvsp[-4].pair).x + (yyvsp[-6].x)*(yyvsp[-2].pair).x; + (yyval.pair).y = (1.0 - (yyvsp[-6].x))*(yyvsp[-4].pair).y + (yyvsp[-6].x)*(yyvsp[-2].pair).y; } +#line 3692 "pic.cpp" /* yacc.c:1646 */ break; case 155: - -/* Line 1806 of yacc.c */ -#line 1230 "pic.y" +#line 1228 "pic.y" /* yacc.c:1646 */ { - (yyval.pair).x = (yyvsp[(1) - (3)].x); - (yyval.pair).y = (yyvsp[(3) - (3)].x); + (yyval.pair).x = (yyvsp[-2].x); + (yyval.pair).y = (yyvsp[0].x); } +#line 3701 "pic.cpp" /* yacc.c:1646 */ break; case 156: - -/* Line 1806 of yacc.c */ -#line 1235 "pic.y" - { (yyval.pair) = (yyvsp[(2) - (3)].pair); } +#line 1233 "pic.y" /* yacc.c:1646 */ + { (yyval.pair) = (yyvsp[-1].pair); } +#line 3707 "pic.cpp" /* yacc.c:1646 */ break; case 157: - -/* Line 1806 of yacc.c */ -#line 1241 "pic.y" - { (yyval.pl) = (yyvsp[(1) - (1)].pl); } +#line 1239 "pic.y" /* yacc.c:1646 */ + { (yyval.pl) = (yyvsp[0].pl); } +#line 3713 "pic.cpp" /* yacc.c:1646 */ break; case 158: - -/* Line 1806 of yacc.c */ -#line 1243 "pic.y" +#line 1241 "pic.y" /* yacc.c:1646 */ { - path pth((yyvsp[(2) - (2)].crn)); - if (!pth.follow((yyvsp[(1) - (2)].pl), & (yyval.pl))) + path pth((yyvsp[0].crn)); + if (!pth.follow((yyvsp[-1].pl), & (yyval.pl))) YYABORT; } +#line 3723 "pic.cpp" /* yacc.c:1646 */ break; case 159: - -/* Line 1806 of yacc.c */ -#line 1249 "pic.y" +#line 1247 "pic.y" /* yacc.c:1646 */ { - path pth((yyvsp[(1) - (2)].crn)); - if (!pth.follow((yyvsp[(2) - (2)].pl), & (yyval.pl))) + path pth((yyvsp[-1].crn)); + if (!pth.follow((yyvsp[0].pl), & (yyval.pl))) YYABORT; } +#line 3733 "pic.cpp" /* yacc.c:1646 */ break; case 160: - -/* Line 1806 of yacc.c */ -#line 1255 "pic.y" +#line 1253 "pic.y" /* yacc.c:1646 */ { - path pth((yyvsp[(1) - (3)].crn)); - if (!pth.follow((yyvsp[(3) - (3)].pl), & (yyval.pl))) + path pth((yyvsp[-2].crn)); + if (!pth.follow((yyvsp[0].pl), & (yyval.pl))) YYABORT; } +#line 3743 "pic.cpp" /* yacc.c:1646 */ break; case 161: - -/* Line 1806 of yacc.c */ -#line 1261 "pic.y" +#line 1259 "pic.y" /* yacc.c:1646 */ { (yyval.pl).x = current_position.x; (yyval.pl).y = current_position.y; (yyval.pl).obj = 0; } +#line 3753 "pic.cpp" /* yacc.c:1646 */ break; case 162: - -/* Line 1806 of yacc.c */ -#line 1270 "pic.y" +#line 1268 "pic.y" /* yacc.c:1646 */ { - place *p = lookup_label((yyvsp[(1) - (1)].str)); + place *p = lookup_label((yyvsp[0].str)); if (!p) { - lex_error("there is no place `%1'", (yyvsp[(1) - (1)].str)); + lex_error("there is no place `%1'", (yyvsp[0].str)); YYABORT; } (yyval.pl) = *p; - a_delete (yyvsp[(1) - (1)].str); + a_delete (yyvsp[0].str); } +#line 3767 "pic.cpp" /* yacc.c:1646 */ break; case 163: - -/* Line 1806 of yacc.c */ -#line 1280 "pic.y" - { (yyval.pl).obj = (yyvsp[(1) - (1)].obj); } +#line 1278 "pic.y" /* yacc.c:1646 */ + { (yyval.pl).obj = (yyvsp[0].obj); } +#line 3773 "pic.cpp" /* yacc.c:1646 */ break; case 164: - -/* Line 1806 of yacc.c */ -#line 1282 "pic.y" +#line 1280 "pic.y" /* yacc.c:1646 */ { - path pth((yyvsp[(3) - (3)].str)); - if (!pth.follow((yyvsp[(1) - (3)].pl), & (yyval.pl))) + path pth((yyvsp[0].str)); + if (!pth.follow((yyvsp[-2].pl), & (yyval.pl))) YYABORT; } +#line 3783 "pic.cpp" /* yacc.c:1646 */ break; case 165: - -/* Line 1806 of yacc.c */ -#line 1291 "pic.y" - { (yyval.n) = (yyvsp[(1) - (1)].n); } +#line 1289 "pic.y" /* yacc.c:1646 */ + { (yyval.n) = (yyvsp[0].n); } +#line 3789 "pic.cpp" /* yacc.c:1646 */ break; case 166: - -/* Line 1806 of yacc.c */ -#line 1293 "pic.y" +#line 1291 "pic.y" /* yacc.c:1646 */ { // XXX Check for overflow (and non-integers?). - (yyval.n) = (int)(yyvsp[(2) - (3)].x); + (yyval.n) = (int)(yyvsp[-1].x); } +#line 3798 "pic.cpp" /* yacc.c:1646 */ break; case 167: - -/* Line 1806 of yacc.c */ -#line 1301 "pic.y" +#line 1299 "pic.y" /* yacc.c:1646 */ { (yyval.n) = 1; } +#line 3804 "pic.cpp" /* yacc.c:1646 */ break; case 168: - -/* Line 1806 of yacc.c */ -#line 1303 "pic.y" - { (yyval.n) = (yyvsp[(1) - (2)].n); } +#line 1301 "pic.y" /* yacc.c:1646 */ + { (yyval.n) = (yyvsp[-1].n); } +#line 3810 "pic.cpp" /* yacc.c:1646 */ break; case 169: - -/* Line 1806 of yacc.c */ -#line 1308 "pic.y" +#line 1306 "pic.y" /* yacc.c:1646 */ { int count = 0; object *p; for (p = olist.head; p != 0; p = p->next) - if (p->type() == (yyvsp[(2) - (2)].obtype) && ++count == (yyvsp[(1) - (2)].n)) { + if (p->type() == (yyvsp[0].obtype) && ++count == (yyvsp[-1].n)) { (yyval.obj) = p; break; } if (p == 0) { - lex_error("there is no %1%2 %3", (yyvsp[(1) - (2)].n), ordinal_postfix((yyvsp[(1) - (2)].n)), - object_type_name((yyvsp[(2) - (2)].obtype))); + lex_error("there is no %1%2 %3", (yyvsp[-1].n), ordinal_postfix((yyvsp[-1].n)), + object_type_name((yyvsp[0].obtype))); YYABORT; } } +#line 3829 "pic.cpp" /* yacc.c:1646 */ break; case 170: - -/* Line 1806 of yacc.c */ -#line 1323 "pic.y" +#line 1321 "pic.y" /* yacc.c:1646 */ { int count = 0; object *p; for (p = olist.tail; p != 0; p = p->prev) - if (p->type() == (yyvsp[(2) - (2)].obtype) && ++count == (yyvsp[(1) - (2)].n)) { + if (p->type() == (yyvsp[0].obtype) && ++count == (yyvsp[-1].n)) { (yyval.obj) = p; break; } if (p == 0) { - lex_error("there is no %1%2 last %3", (yyvsp[(1) - (2)].n), - ordinal_postfix((yyvsp[(1) - (2)].n)), object_type_name((yyvsp[(2) - (2)].obtype))); + lex_error("there is no %1%2 last %3", (yyvsp[-1].n), + ordinal_postfix((yyvsp[-1].n)), object_type_name((yyvsp[0].obtype))); YYABORT; } } +#line 3848 "pic.cpp" /* yacc.c:1646 */ break; case 171: - -/* Line 1806 of yacc.c */ -#line 1341 "pic.y" +#line 1339 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = BOX_OBJECT; } +#line 3854 "pic.cpp" /* yacc.c:1646 */ break; case 172: - -/* Line 1806 of yacc.c */ -#line 1343 "pic.y" +#line 1341 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = CIRCLE_OBJECT; } +#line 3860 "pic.cpp" /* yacc.c:1646 */ break; case 173: - -/* Line 1806 of yacc.c */ -#line 1345 "pic.y" +#line 1343 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = ELLIPSE_OBJECT; } +#line 3866 "pic.cpp" /* yacc.c:1646 */ break; case 174: - -/* Line 1806 of yacc.c */ -#line 1347 "pic.y" +#line 1345 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = ARC_OBJECT; } +#line 3872 "pic.cpp" /* yacc.c:1646 */ break; case 175: - -/* Line 1806 of yacc.c */ -#line 1349 "pic.y" +#line 1347 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = LINE_OBJECT; } +#line 3878 "pic.cpp" /* yacc.c:1646 */ break; case 176: - -/* Line 1806 of yacc.c */ -#line 1351 "pic.y" +#line 1349 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = ARROW_OBJECT; } +#line 3884 "pic.cpp" /* yacc.c:1646 */ break; case 177: - -/* Line 1806 of yacc.c */ -#line 1353 "pic.y" +#line 1351 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = SPLINE_OBJECT; } +#line 3890 "pic.cpp" /* yacc.c:1646 */ break; case 178: - -/* Line 1806 of yacc.c */ -#line 1355 "pic.y" +#line 1353 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = BLOCK_OBJECT; } +#line 3896 "pic.cpp" /* yacc.c:1646 */ break; case 179: - -/* Line 1806 of yacc.c */ -#line 1357 "pic.y" +#line 1355 "pic.y" /* yacc.c:1646 */ { (yyval.obtype) = TEXT_OBJECT; } +#line 3902 "pic.cpp" /* yacc.c:1646 */ break; case 180: - -/* Line 1806 of yacc.c */ -#line 1362 "pic.y" - { (yyval.pth) = new path((yyvsp[(2) - (2)].str)); } +#line 1360 "pic.y" /* yacc.c:1646 */ + { (yyval.pth) = new path((yyvsp[0].str)); } +#line 3908 "pic.cpp" /* yacc.c:1646 */ break; case 181: - -/* Line 1806 of yacc.c */ -#line 1364 "pic.y" +#line 1362 "pic.y" /* yacc.c:1646 */ { - (yyval.pth) = (yyvsp[(1) - (3)].pth); - (yyval.pth)->append((yyvsp[(3) - (3)].str)); + (yyval.pth) = (yyvsp[-2].pth); + (yyval.pth)->append((yyvsp[0].str)); } +#line 3917 "pic.cpp" /* yacc.c:1646 */ break; case 182: - -/* Line 1806 of yacc.c */ -#line 1372 "pic.y" - { (yyval.pth) = new path((yyvsp[(1) - (1)].crn)); } +#line 1370 "pic.y" /* yacc.c:1646 */ + { (yyval.pth) = new path((yyvsp[0].crn)); } +#line 3923 "pic.cpp" /* yacc.c:1646 */ break; case 183: - -/* Line 1806 of yacc.c */ -#line 1376 "pic.y" - { (yyval.pth) = (yyvsp[(1) - (1)].pth); } +#line 1374 "pic.y" /* yacc.c:1646 */ + { (yyval.pth) = (yyvsp[0].pth); } +#line 3929 "pic.cpp" /* yacc.c:1646 */ break; case 184: - -/* Line 1806 of yacc.c */ -#line 1378 "pic.y" +#line 1376 "pic.y" /* yacc.c:1646 */ { - (yyval.pth) = (yyvsp[(1) - (2)].pth); - (yyval.pth)->append((yyvsp[(2) - (2)].crn)); + (yyval.pth) = (yyvsp[-1].pth); + (yyval.pth)->append((yyvsp[0].crn)); } +#line 3938 "pic.cpp" /* yacc.c:1646 */ break; case 185: - -/* Line 1806 of yacc.c */ -#line 1386 "pic.y" - { (yyval.pth) = (yyvsp[(1) - (1)].pth); } +#line 1384 "pic.y" /* yacc.c:1646 */ + { (yyval.pth) = (yyvsp[0].pth); } +#line 3944 "pic.cpp" /* yacc.c:1646 */ break; case 186: - -/* Line 1806 of yacc.c */ -#line 1388 "pic.y" +#line 1386 "pic.y" /* yacc.c:1646 */ { - (yyval.pth) = (yyvsp[(2) - (5)].pth); - (yyval.pth)->set_ypath((yyvsp[(4) - (5)].pth)); + (yyval.pth) = (yyvsp[-3].pth); + (yyval.pth)->set_ypath((yyvsp[-1].pth)); } +#line 3953 "pic.cpp" /* yacc.c:1646 */ break; case 187: - -/* Line 1806 of yacc.c */ -#line 1394 "pic.y" +#line 1392 "pic.y" /* yacc.c:1646 */ { lex_warning("`%1%2 last %3' in `with' argument ignored", - (yyvsp[(1) - (4)].n), ordinal_postfix((yyvsp[(1) - (4)].n)), object_type_name((yyvsp[(3) - (4)].obtype))); - (yyval.pth) = (yyvsp[(4) - (4)].pth); + (yyvsp[-3].n), ordinal_postfix((yyvsp[-3].n)), object_type_name((yyvsp[-1].obtype))); + (yyval.pth) = (yyvsp[0].pth); } +#line 3963 "pic.cpp" /* yacc.c:1646 */ break; case 188: - -/* Line 1806 of yacc.c */ -#line 1400 "pic.y" +#line 1398 "pic.y" /* yacc.c:1646 */ { lex_warning("`last %1' in `with' argument ignored", - object_type_name((yyvsp[(2) - (3)].obtype))); - (yyval.pth) = (yyvsp[(3) - (3)].pth); + object_type_name((yyvsp[-1].obtype))); + (yyval.pth) = (yyvsp[0].pth); } +#line 3973 "pic.cpp" /* yacc.c:1646 */ break; case 189: - -/* Line 1806 of yacc.c */ -#line 1406 "pic.y" +#line 1404 "pic.y" /* yacc.c:1646 */ { lex_warning("`%1%2 %3' in `with' argument ignored", - (yyvsp[(1) - (3)].n), ordinal_postfix((yyvsp[(1) - (3)].n)), object_type_name((yyvsp[(2) - (3)].obtype))); - (yyval.pth) = (yyvsp[(3) - (3)].pth); + (yyvsp[-2].n), ordinal_postfix((yyvsp[-2].n)), object_type_name((yyvsp[-1].obtype))); + (yyval.pth) = (yyvsp[0].pth); } +#line 3983 "pic.cpp" /* yacc.c:1646 */ break; case 190: - -/* Line 1806 of yacc.c */ -#line 1412 "pic.y" +#line 1410 "pic.y" /* yacc.c:1646 */ { - lex_warning("initial `%1' in `with' argument ignored", (yyvsp[(1) - (2)].str)); - a_delete (yyvsp[(1) - (2)].str); - (yyval.pth) = (yyvsp[(2) - (2)].pth); + lex_warning("initial `%1' in `with' argument ignored", (yyvsp[-1].str)); + a_delete (yyvsp[-1].str); + (yyval.pth) = (yyvsp[0].pth); } +#line 3993 "pic.cpp" /* yacc.c:1646 */ break; case 191: - -/* Line 1806 of yacc.c */ -#line 1421 "pic.y" +#line 1419 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north; } +#line 3999 "pic.cpp" /* yacc.c:1646 */ break; case 192: - -/* Line 1806 of yacc.c */ -#line 1423 "pic.y" +#line 1421 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::east; } +#line 4005 "pic.cpp" /* yacc.c:1646 */ break; case 193: - -/* Line 1806 of yacc.c */ -#line 1425 "pic.y" +#line 1423 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::west; } +#line 4011 "pic.cpp" /* yacc.c:1646 */ break; case 194: - -/* Line 1806 of yacc.c */ -#line 1427 "pic.y" +#line 1425 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south; } +#line 4017 "pic.cpp" /* yacc.c:1646 */ break; case 195: - -/* Line 1806 of yacc.c */ -#line 1429 "pic.y" +#line 1427 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_east; } +#line 4023 "pic.cpp" /* yacc.c:1646 */ break; case 196: - -/* Line 1806 of yacc.c */ -#line 1431 "pic.y" +#line 1429 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object:: south_east; } +#line 4029 "pic.cpp" /* yacc.c:1646 */ break; case 197: - -/* Line 1806 of yacc.c */ -#line 1433 "pic.y" +#line 1431 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_west; } +#line 4035 "pic.cpp" /* yacc.c:1646 */ break; case 198: - -/* Line 1806 of yacc.c */ -#line 1435 "pic.y" +#line 1433 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south_west; } +#line 4041 "pic.cpp" /* yacc.c:1646 */ break; case 199: - -/* Line 1806 of yacc.c */ -#line 1437 "pic.y" +#line 1435 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::center; } +#line 4047 "pic.cpp" /* yacc.c:1646 */ break; case 200: - -/* Line 1806 of yacc.c */ -#line 1439 "pic.y" +#line 1437 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::start; } +#line 4053 "pic.cpp" /* yacc.c:1646 */ break; case 201: - -/* Line 1806 of yacc.c */ -#line 1441 "pic.y" +#line 1439 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::end; } +#line 4059 "pic.cpp" /* yacc.c:1646 */ break; case 202: - -/* Line 1806 of yacc.c */ -#line 1443 "pic.y" +#line 1441 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north; } +#line 4065 "pic.cpp" /* yacc.c:1646 */ break; case 203: - -/* Line 1806 of yacc.c */ -#line 1445 "pic.y" +#line 1443 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south; } +#line 4071 "pic.cpp" /* yacc.c:1646 */ break; case 204: - -/* Line 1806 of yacc.c */ -#line 1447 "pic.y" +#line 1445 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::west; } +#line 4077 "pic.cpp" /* yacc.c:1646 */ break; case 205: - -/* Line 1806 of yacc.c */ -#line 1449 "pic.y" +#line 1447 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::east; } +#line 4083 "pic.cpp" /* yacc.c:1646 */ break; case 206: - -/* Line 1806 of yacc.c */ -#line 1451 "pic.y" +#line 1449 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_west; } +#line 4089 "pic.cpp" /* yacc.c:1646 */ break; case 207: - -/* Line 1806 of yacc.c */ -#line 1453 "pic.y" +#line 1451 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south_west; } +#line 4095 "pic.cpp" /* yacc.c:1646 */ break; case 208: - -/* Line 1806 of yacc.c */ -#line 1455 "pic.y" +#line 1453 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_east; } +#line 4101 "pic.cpp" /* yacc.c:1646 */ break; case 209: - -/* Line 1806 of yacc.c */ -#line 1457 "pic.y" +#line 1455 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south_east; } +#line 4107 "pic.cpp" /* yacc.c:1646 */ break; case 210: - -/* Line 1806 of yacc.c */ -#line 1459 "pic.y" +#line 1457 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::west; } +#line 4113 "pic.cpp" /* yacc.c:1646 */ break; case 211: - -/* Line 1806 of yacc.c */ -#line 1461 "pic.y" +#line 1459 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::east; } +#line 4119 "pic.cpp" /* yacc.c:1646 */ break; case 212: - -/* Line 1806 of yacc.c */ -#line 1463 "pic.y" +#line 1461 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_west; } +#line 4125 "pic.cpp" /* yacc.c:1646 */ break; case 213: - -/* Line 1806 of yacc.c */ -#line 1465 "pic.y" +#line 1463 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south_west; } +#line 4131 "pic.cpp" /* yacc.c:1646 */ break; case 214: - -/* Line 1806 of yacc.c */ -#line 1467 "pic.y" +#line 1465 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north_east; } +#line 4137 "pic.cpp" /* yacc.c:1646 */ break; case 215: - -/* Line 1806 of yacc.c */ -#line 1469 "pic.y" +#line 1467 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south_east; } +#line 4143 "pic.cpp" /* yacc.c:1646 */ break; case 216: - -/* Line 1806 of yacc.c */ -#line 1471 "pic.y" +#line 1469 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::north; } +#line 4149 "pic.cpp" /* yacc.c:1646 */ break; case 217: - -/* Line 1806 of yacc.c */ -#line 1473 "pic.y" +#line 1471 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::south; } +#line 4155 "pic.cpp" /* yacc.c:1646 */ break; case 218: - -/* Line 1806 of yacc.c */ -#line 1475 "pic.y" +#line 1473 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::east; } +#line 4161 "pic.cpp" /* yacc.c:1646 */ break; case 219: - -/* Line 1806 of yacc.c */ -#line 1477 "pic.y" +#line 1475 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::west; } +#line 4167 "pic.cpp" /* yacc.c:1646 */ break; case 220: - -/* Line 1806 of yacc.c */ -#line 1479 "pic.y" +#line 1477 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::center; } +#line 4173 "pic.cpp" /* yacc.c:1646 */ break; case 221: - -/* Line 1806 of yacc.c */ -#line 1481 "pic.y" +#line 1479 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::start; } +#line 4179 "pic.cpp" /* yacc.c:1646 */ break; case 222: - -/* Line 1806 of yacc.c */ -#line 1483 "pic.y" +#line 1481 "pic.y" /* yacc.c:1646 */ { (yyval.crn) = &object::end; } +#line 4185 "pic.cpp" /* yacc.c:1646 */ break; case 223: - -/* Line 1806 of yacc.c */ -#line 1488 "pic.y" - { (yyval.x) = (yyvsp[(1) - (1)].x); } +#line 1486 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[0].x); } +#line 4191 "pic.cpp" /* yacc.c:1646 */ break; case 224: - -/* Line 1806 of yacc.c */ -#line 1490 "pic.y" - { (yyval.x) = (yyvsp[(1) - (1)].x); } +#line 1488 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[0].x); } +#line 4197 "pic.cpp" /* yacc.c:1646 */ break; case 225: - -/* Line 1806 of yacc.c */ -#line 1495 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) < (yyvsp[(3) - (3)].x)); } +#line 1493 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) < (yyvsp[0].x)); } +#line 4203 "pic.cpp" /* yacc.c:1646 */ break; case 226: - -/* Line 1806 of yacc.c */ -#line 1500 "pic.y" +#line 1498 "pic.y" /* yacc.c:1646 */ { - if (!lookup_variable((yyvsp[(1) - (1)].str), & (yyval.x))) { - lex_error("there is no variable `%1'", (yyvsp[(1) - (1)].str)); + if (!lookup_variable((yyvsp[0].str), & (yyval.x))) { + lex_error("there is no variable `%1'", (yyvsp[0].str)); YYABORT; } - a_delete (yyvsp[(1) - (1)].str); + a_delete (yyvsp[0].str); } +#line 4215 "pic.cpp" /* yacc.c:1646 */ break; case 227: - -/* Line 1806 of yacc.c */ -#line 1508 "pic.y" - { (yyval.x) = (yyvsp[(1) - (1)].x); } +#line 1506 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[0].x); } +#line 4221 "pic.cpp" /* yacc.c:1646 */ break; case 228: - -/* Line 1806 of yacc.c */ -#line 1510 "pic.y" +#line 1508 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].pl).obj != 0) - (yyval.x) = (yyvsp[(1) - (2)].pl).obj->origin().x; + if ((yyvsp[-1].pl).obj != 0) + (yyval.x) = (yyvsp[-1].pl).obj->origin().x; else - (yyval.x) = (yyvsp[(1) - (2)].pl).x; + (yyval.x) = (yyvsp[-1].pl).x; } +#line 4232 "pic.cpp" /* yacc.c:1646 */ break; case 229: - -/* Line 1806 of yacc.c */ -#line 1517 "pic.y" +#line 1515 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].pl).obj != 0) - (yyval.x) = (yyvsp[(1) - (2)].pl).obj->origin().y; + if ((yyvsp[-1].pl).obj != 0) + (yyval.x) = (yyvsp[-1].pl).obj->origin().y; else - (yyval.x) = (yyvsp[(1) - (2)].pl).y; + (yyval.x) = (yyvsp[-1].pl).y; } +#line 4243 "pic.cpp" /* yacc.c:1646 */ break; case 230: - -/* Line 1806 of yacc.c */ -#line 1524 "pic.y" +#line 1522 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].pl).obj != 0) - (yyval.x) = (yyvsp[(1) - (2)].pl).obj->height(); + if ((yyvsp[-1].pl).obj != 0) + (yyval.x) = (yyvsp[-1].pl).obj->height(); else (yyval.x) = 0.0; } +#line 4254 "pic.cpp" /* yacc.c:1646 */ break; case 231: - -/* Line 1806 of yacc.c */ -#line 1531 "pic.y" +#line 1529 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].pl).obj != 0) - (yyval.x) = (yyvsp[(1) - (2)].pl).obj->width(); + if ((yyvsp[-1].pl).obj != 0) + (yyval.x) = (yyvsp[-1].pl).obj->width(); else (yyval.x) = 0.0; } +#line 4265 "pic.cpp" /* yacc.c:1646 */ break; case 232: - -/* Line 1806 of yacc.c */ -#line 1538 "pic.y" +#line 1536 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].pl).obj != 0) - (yyval.x) = (yyvsp[(1) - (2)].pl).obj->radius(); + if ((yyvsp[-1].pl).obj != 0) + (yyval.x) = (yyvsp[-1].pl).obj->radius(); else (yyval.x) = 0.0; } +#line 4276 "pic.cpp" /* yacc.c:1646 */ break; case 233: - -/* Line 1806 of yacc.c */ -#line 1545 "pic.y" - { (yyval.x) = (yyvsp[(1) - (3)].x) + (yyvsp[(3) - (3)].x); } +#line 1543 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-2].x) + (yyvsp[0].x); } +#line 4282 "pic.cpp" /* yacc.c:1646 */ break; case 234: - -/* Line 1806 of yacc.c */ -#line 1547 "pic.y" - { (yyval.x) = (yyvsp[(1) - (3)].x) - (yyvsp[(3) - (3)].x); } +#line 1545 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-2].x) - (yyvsp[0].x); } +#line 4288 "pic.cpp" /* yacc.c:1646 */ break; case 235: - -/* Line 1806 of yacc.c */ -#line 1549 "pic.y" - { (yyval.x) = (yyvsp[(1) - (3)].x) * (yyvsp[(3) - (3)].x); } +#line 1547 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-2].x) * (yyvsp[0].x); } +#line 4294 "pic.cpp" /* yacc.c:1646 */ break; case 236: - -/* Line 1806 of yacc.c */ -#line 1551 "pic.y" +#line 1549 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(3) - (3)].x) == 0.0) { + if ((yyvsp[0].x) == 0.0) { lex_error("division by zero"); YYABORT; } - (yyval.x) = (yyvsp[(1) - (3)].x)/(yyvsp[(3) - (3)].x); + (yyval.x) = (yyvsp[-2].x)/(yyvsp[0].x); } +#line 4306 "pic.cpp" /* yacc.c:1646 */ break; case 237: - -/* Line 1806 of yacc.c */ -#line 1559 "pic.y" +#line 1557 "pic.y" /* yacc.c:1646 */ { - if ((yyvsp[(3) - (3)].x) == 0.0) { + if ((yyvsp[0].x) == 0.0) { lex_error("modulus by zero"); YYABORT; } - (yyval.x) = fmod((yyvsp[(1) - (3)].x), (yyvsp[(3) - (3)].x)); + (yyval.x) = fmod((yyvsp[-2].x), (yyvsp[0].x)); } +#line 4318 "pic.cpp" /* yacc.c:1646 */ break; case 238: - -/* Line 1806 of yacc.c */ -#line 1567 "pic.y" +#line 1565 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = pow((yyvsp[(1) - (3)].x), (yyvsp[(3) - (3)].x)); + (yyval.x) = pow((yyvsp[-2].x), (yyvsp[0].x)); if (errno == EDOM) { lex_error("arguments to `^' operator out of domain"); YYABORT; @@ -4813,57 +4331,52 @@ YYABORT; } } +#line 4335 "pic.cpp" /* yacc.c:1646 */ break; case 239: - -/* Line 1806 of yacc.c */ -#line 1580 "pic.y" - { (yyval.x) = -(yyvsp[(2) - (2)].x); } +#line 1578 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = -(yyvsp[0].x); } +#line 4341 "pic.cpp" /* yacc.c:1646 */ break; case 240: - -/* Line 1806 of yacc.c */ -#line 1582 "pic.y" - { (yyval.x) = (yyvsp[(2) - (3)].x); } +#line 1580 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-1].x); } +#line 4347 "pic.cpp" /* yacc.c:1646 */ break; case 241: - -/* Line 1806 of yacc.c */ -#line 1584 "pic.y" +#line 1582 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = sin((yyvsp[(3) - (4)].x)); + (yyval.x) = sin((yyvsp[-1].x)); if (errno == ERANGE) { lex_error("sin result out of range"); YYABORT; } } +#line 4360 "pic.cpp" /* yacc.c:1646 */ break; case 242: - -/* Line 1806 of yacc.c */ -#line 1593 "pic.y" +#line 1591 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = cos((yyvsp[(3) - (4)].x)); + (yyval.x) = cos((yyvsp[-1].x)); if (errno == ERANGE) { lex_error("cos result out of range"); YYABORT; } } +#line 4373 "pic.cpp" /* yacc.c:1646 */ break; case 243: - -/* Line 1806 of yacc.c */ -#line 1602 "pic.y" +#line 1600 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = atan2((yyvsp[(3) - (6)].x), (yyvsp[(5) - (6)].x)); + (yyval.x) = atan2((yyvsp[-3].x), (yyvsp[-1].x)); if (errno == EDOM) { lex_error("atan2 argument out of domain"); YYABORT; @@ -4873,159 +4386,141 @@ YYABORT; } } +#line 4390 "pic.cpp" /* yacc.c:1646 */ break; case 244: - -/* Line 1806 of yacc.c */ -#line 1615 "pic.y" +#line 1613 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = log10((yyvsp[(3) - (4)].x)); + (yyval.x) = log10((yyvsp[-1].x)); if (errno == ERANGE) { lex_error("log result out of range"); YYABORT; } } +#line 4403 "pic.cpp" /* yacc.c:1646 */ break; case 245: - -/* Line 1806 of yacc.c */ -#line 1624 "pic.y" +#line 1622 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = pow(10.0, (yyvsp[(3) - (4)].x)); + (yyval.x) = pow(10.0, (yyvsp[-1].x)); if (errno == ERANGE) { lex_error("exp result out of range"); YYABORT; } } +#line 4416 "pic.cpp" /* yacc.c:1646 */ break; case 246: - -/* Line 1806 of yacc.c */ -#line 1633 "pic.y" +#line 1631 "pic.y" /* yacc.c:1646 */ { errno = 0; - (yyval.x) = sqrt((yyvsp[(3) - (4)].x)); + (yyval.x) = sqrt((yyvsp[-1].x)); if (errno == EDOM) { lex_error("sqrt argument out of domain"); YYABORT; } } +#line 4429 "pic.cpp" /* yacc.c:1646 */ break; case 247: - -/* Line 1806 of yacc.c */ -#line 1642 "pic.y" - { (yyval.x) = (yyvsp[(3) - (6)].x) > (yyvsp[(5) - (6)].x) ? (yyvsp[(3) - (6)].x) : (yyvsp[(5) - (6)].x); } +#line 1640 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-3].x) > (yyvsp[-1].x) ? (yyvsp[-3].x) : (yyvsp[-1].x); } +#line 4435 "pic.cpp" /* yacc.c:1646 */ break; case 248: - -/* Line 1806 of yacc.c */ -#line 1644 "pic.y" - { (yyval.x) = (yyvsp[(3) - (6)].x) < (yyvsp[(5) - (6)].x) ? (yyvsp[(3) - (6)].x) : (yyvsp[(5) - (6)].x); } +#line 1642 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-3].x) < (yyvsp[-1].x) ? (yyvsp[-3].x) : (yyvsp[-1].x); } +#line 4441 "pic.cpp" /* yacc.c:1646 */ break; case 249: - -/* Line 1806 of yacc.c */ -#line 1646 "pic.y" - { (yyval.x) = (yyvsp[(3) - (4)].x) < 0 ? -floor(-(yyvsp[(3) - (4)].x)) : floor((yyvsp[(3) - (4)].x)); } +#line 1644 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = (yyvsp[-1].x) < 0 ? -floor(-(yyvsp[-1].x)) : floor((yyvsp[-1].x)); } +#line 4447 "pic.cpp" /* yacc.c:1646 */ break; case 250: - -/* Line 1806 of yacc.c */ -#line 1648 "pic.y" - { (yyval.x) = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*(yyvsp[(3) - (4)].x)); } +#line 1646 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*(yyvsp[-1].x)); } +#line 4453 "pic.cpp" /* yacc.c:1646 */ break; case 251: - -/* Line 1806 of yacc.c */ -#line 1650 "pic.y" +#line 1648 "pic.y" /* yacc.c:1646 */ { /* return a random number in the range [0,1) */ /* portable, but not very random */ (yyval.x) = (rand() & 0x7fff) / double(0x8000); } +#line 4463 "pic.cpp" /* yacc.c:1646 */ break; case 252: - -/* Line 1806 of yacc.c */ -#line 1656 "pic.y" +#line 1654 "pic.y" /* yacc.c:1646 */ { (yyval.x) = 0; - srand((unsigned int)(yyvsp[(3) - (4)].x)); + srand((unsigned int)(yyvsp[-1].x)); } +#line 4472 "pic.cpp" /* yacc.c:1646 */ break; case 253: - -/* Line 1806 of yacc.c */ -#line 1661 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) <= (yyvsp[(3) - (3)].x)); } +#line 1659 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) <= (yyvsp[0].x)); } +#line 4478 "pic.cpp" /* yacc.c:1646 */ break; case 254: - -/* Line 1806 of yacc.c */ -#line 1663 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) > (yyvsp[(3) - (3)].x)); } +#line 1661 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) > (yyvsp[0].x)); } +#line 4484 "pic.cpp" /* yacc.c:1646 */ break; case 255: - -/* Line 1806 of yacc.c */ -#line 1665 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) >= (yyvsp[(3) - (3)].x)); } +#line 1663 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) >= (yyvsp[0].x)); } +#line 4490 "pic.cpp" /* yacc.c:1646 */ break; case 256: - -/* Line 1806 of yacc.c */ -#line 1667 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) == (yyvsp[(3) - (3)].x)); } +#line 1665 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) == (yyvsp[0].x)); } +#line 4496 "pic.cpp" /* yacc.c:1646 */ break; case 257: - -/* Line 1806 of yacc.c */ -#line 1669 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != (yyvsp[(3) - (3)].x)); } +#line 1667 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != (yyvsp[0].x)); } +#line 4502 "pic.cpp" /* yacc.c:1646 */ break; case 258: - -/* Line 1806 of yacc.c */ -#line 1671 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 && (yyvsp[(3) - (3)].x) != 0.0); } +#line 1669 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 && (yyvsp[0].x) != 0.0); } +#line 4508 "pic.cpp" /* yacc.c:1646 */ break; case 259: - -/* Line 1806 of yacc.c */ -#line 1673 "pic.y" - { (yyval.x) = ((yyvsp[(1) - (3)].x) != 0.0 || (yyvsp[(3) - (3)].x) != 0.0); } +#line 1671 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[-2].x) != 0.0 || (yyvsp[0].x) != 0.0); } +#line 4514 "pic.cpp" /* yacc.c:1646 */ break; case 260: - -/* Line 1806 of yacc.c */ -#line 1675 "pic.y" - { (yyval.x) = ((yyvsp[(2) - (2)].x) == 0.0); } +#line 1673 "pic.y" /* yacc.c:1646 */ + { (yyval.x) = ((yyvsp[0].x) == 0.0); } +#line 4520 "pic.cpp" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 5029 "pic.cpp" +#line 4524 "pic.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -5047,7 +4542,7 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -5062,9 +4557,9 @@ goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -5115,20 +4610,20 @@ if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -5147,7 +4642,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -5160,35 +4655,37 @@ | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -5212,7 +4709,7 @@ yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -5231,14 +4728,14 @@ yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -5249,14 +4746,9 @@ if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 1679 "pic.y" +#line 1677 "pic.y" /* yacc.c:1906 */ /* bison defines const to be empty unless __STDC__ is defined, which it @@ -5514,4 +5006,3 @@ result += '\0'; return strsave(result.contents()); } - diff -ruN groff-1.22.2/src/preproc/pic/pic.h groff-1.22.3/src/preproc/pic/pic.h --- groff-1.22.2/src/preproc/pic/pic.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/pic.h 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/pic.man groff-1.22.3/src/preproc/pic/pic.man --- groff-1.22.2/src/preproc/pic/pic.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/pic.man 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2004, 2007, 2009, 2011 - Free Software Foundation, Inc. +.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@pic \- compile pictures for troff or TeX +. +. +.\" -------------------------------------------------------------------- +.\" License (copying) +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,6 +26,9 @@ the original English. .. . +.\" -------------------------------------------------------------------- +.\" Definitions +.\" -------------------------------------------------------------------- . .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. @@ -40,18 +51,12 @@ . .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". -.tr \(ts" -. -. -.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -. -@g@pic \- compile pictures for troff or TeX +.tr \(ts"\"" . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .B @g@pic [ @@ -73,45 +78,59 @@ ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . This manual page describes the GNU version of .BR pic , which is part of the groff document formatting system. +. .B pic compiles descriptions of pictures embedded within .B troff or \*(tx input files into commands that are understood by \*(tx or .BR troff . +. Each picture starts with a line beginning with .B .PS and ends with a line beginning with .BR .PE . +. Anything outside of .B .PS and .B .PE is passed through without change. +. +. .LP -It is the user's responsibility to provide appropriate definitions of the +It is the user\[aq]s responsibility to provide appropriate definitions +of the .B PS and .B PE macros. +. When the macro package being used does not supply such definitions -(for example, old versions of \-ms), -appropriate definitions can be obtained with +(for example, old versions of \-ms), appropriate definitions can be +obtained with .BR \-mpic : +. These will center each picture. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . Options that do not take arguments may be grouped behind a single .BR \- . +. The special option .B \-\^\- can be used to mark the end of the options. +. A filename of .B \- refers to the standard input. @@ -129,8 +148,9 @@ Safer mode; do not execute .B sh commands. -This can be useful when operating on untrustworthy input. -(enabled by default) +. +This can be useful when operating on untrustworthy input (enabled by +default). . .TP .B \-U @@ -139,11 +159,14 @@ . .TP .B \-n -Don't use the groff extensions to the troff drawing commands. -You should use this if you are using a postprocessor that doesn't support -these extensions. +Don\[aq]t use the groff extensions to the troff drawing commands. +. +You should use this if you are using a postprocessor that doesn\[aq]t +support these extensions. +. The extensions are described in .BR groff_out (@MAN5EXT@). +. The .B \-n option also causes @@ -158,17 +181,20 @@ .B \-c Be more compatible with .BR tpic . +. Implies .BR \-t . Lines beginning with .B \e are not passed through transparently. +. Lines beginning with .B . are passed through with the initial .B . changed to .BR \e . +. A line beginning with .B .ps is given special treatment: @@ -176,9 +202,9 @@ the line thickness (pen size) in milliinches; a missing argument restores the previous line thickness; the default line thickness is 8 milliinches. -The line thickness thus specified takes effect only -when a non-negative line thickness has not been -specified by use of the +. +The line thickness thus specified takes effect only when a +non-negative line thickness has not been specified by use of the .B thickness attribute or by setting the .B linethick @@ -192,6 +218,7 @@ .B \-z In \*(tx mode draw dots using zero-length lines. . +. .LP The following options supported by other versions of .B pic @@ -209,6 +236,7 @@ .B troff device .IR dev . +. This is unnecessary because the .B troff output generated by @@ -216,39 +244,55 @@ is device-independent. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . This section describes only the differences between GNU .B pic and the original version of .BR pic . +. Many of these differences also apply to newer versions of Unix .BR pic . +. A complete documentation is available in the file +. +. .LP .RS .B @DOCDIR@/pic.ms .RE . +. +.\" -------------------------------------------------------------------- .SS \*(tx mode +.\" -------------------------------------------------------------------- . \*(tx mode is enabled by the .B \-t option. +. In \*(tx mode, .B pic will define a vbox called .B \egraph for each picture. +. Use the .B figname command to change the name of the vbox. +. You must yourself print that vbox using, for example, the command +. +. .RS .LP .B \ecenterline{\ebox\egraph} .RE +. +. .LP Actually, since the vbox has a height of zero (it is defined with \evtop) this will produce slightly more vertical space above the @@ -260,9 +304,11 @@ .RE .LP would avoid this. +. +. .LP To make the vbox having a positive height and a depth of zero -(as used e.g.\& by \*(lx's +(as used e.g.\& by \*[lx]\[aq]s .BR \%graphics.sty ), define the following macro in your document: .RS @@ -275,31 +321,42 @@ Now you can simply say .B \egpicbox{graph} instead of \ebox\egraph. +. +. .LP You must use a \*(tx driver that supports the .B tpic specials, version 2. +. +. .LP Lines beginning with .B \e are passed through transparently; a .B % is added to the end of the line to avoid unwanted spaces. +. You can safely use this feature to change fonts or to change the value of .BR \ebaselineskip . +. Anything else may well produce undesirable results; use at your own risk. +. Lines beginning with a period are not given any special treatment. . +. +.\" -------------------------------------------------------------------- .SS Commands +.\" -------------------------------------------------------------------- . .TP \fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \ -[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR +[\fBby\fR [\fB*\fR]\,\fIexpr3\/\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR Set .I variable to .IR expr1 . +. While the value of .I variable is less than or equal to @@ -315,6 +372,7 @@ is not given, increment .I variable by 1. +. If .I expr3 is prefixed by @@ -323,16 +381,20 @@ .I variable will instead be multiplied by .IR expr3 . +. The value of .I expr3 can be negative for the additive case; .I variable is then tested whether it is greater than or equal to .IR expr2 . +. For the multiplicative case, .I expr3 must be greater than zero. -If the constraints aren't met, the loop isn't executed. +. +If the constraints aren\[aq]t met, the loop isn\[aq]t executed. +. .I X can be any character not occurring in .IR body . @@ -346,9 +408,11 @@ .IR if-true , otherwise do .IR if-false . +. .I X can be any character not occurring in .IR if-true . +. .I Y can be any character not occurring in .IR if-false . @@ -356,23 +420,28 @@ .TP \fBprint\fR \fIarg\fR\|.\|.\|. Concatenate the arguments and print as a line on stderr. +. Each .I arg must be an expression, a position, or text. +. This is useful for debugging. . .TP \fBcommand\fR \fIarg\fR\|.\|.\|. Concatenate the arguments and pass them through as a line to troff or \*(tx. +. Each .I arg must be an expression, a position, or text. +. This has a similar effect to a line beginning with .B .\& or .BR \e , but allows the values of variables to be passed through. +. For example, .RS .IP @@ -398,23 +467,24 @@ Pass .I command to a shell. +. .I X can be any character not occurring in .IR command . . .TP -\fBcopy\fR \fB"\fIfilename\fB"\fR +\fBcopy\fR \fB"\,\fIfilename\/\fB"\fR Include .I filename at this point in the file. . .TP -\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \ -[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] +\fBcopy\fR [\fB"\,\fIfilename\/\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \ +[\fBuntil\fR \fB"\,\fIword\*(ic\fB"\fR] .ns .TP -\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fImacro\fR \ -[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] +\fBcopy\fR [\fB"\,\fIfilename\/\fB"\fR] \fBthru\fR \fImacro\fR \ +[\fBuntil\fR \fB"\,\fIword\*(ic\fB"\fR] This construct does .I body once for each line of @@ -430,19 +500,23 @@ are replaced by the .IR i -th word of the line. +. If .I filename is not given, lines are taken from the current input up to .BR .PE . +. If an .B until clause is specified, lines will be read only until a line the first word of which is .IR word ; that line will then be discarded. +. .I X can be any character not occurring in .IR body . +. For example, .RS .IP @@ -474,41 +548,47 @@ .ft .fi .RE +. .IP The commands to be performed for each line can also be taken from a macro defined earlier by giving the name of the macro as the argument to .BR thru . . +. .LP .B reset .br .ns .TP -\fBreset\fI variable1\fR[\fB,\fR]\fI variable2 .\^.\^. +\fBreset\fI variable1\/\fR[\fB,\fR]\fI variable2 .\^.\^. Reset pre-defined variables .IR variable1 , .I variable2 \&.\^.\^. to their default values. -If no arguments are given, reset all pre-defined variables -to their default values. +. +If no arguments are given, reset all pre-defined variables to their +default values. +. Note that assigning a value to .B scale -also causes all pre-defined variables that control dimensions -to be reset to their default values times the new value of scale. +also causes all pre-defined variables that control dimensions to be +reset to their default values times the new value of scale. . .TP -\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR] +\fBplot\fR \fIexpr\fR [\fB"\,\fItext\*(ic\fB"\fR] This is a text object which is constructed by using .I text as a format string for sprintf with an argument of .IR expr . +. If .I text is omitted a format string of .B "\(ts%g\(ts" is used. +. Attributes can be specified in the same way as for a normal text object. Be very careful that you specify an appropriate format string; @@ -529,10 +609,12 @@ will be assigned to .I variable without creating a variable local to the current block. +. (By contrast, .B = -defines the variable in the current block if it is not already defined there, -and then changes the value in the current block only.) +defines the variable in the current block if it is not already defined +there, and then changes the value in the current block only.) +. For example, the following: .RS .IP @@ -557,6 +639,7 @@ .B 5 3 .RE . +. .LP Arguments of the form .IP @@ -565,6 +648,8 @@ are also allowed to be of the form .IP .BI {\ anything\ } +. +. .LP In this case .I anything @@ -579,10 +664,14 @@ and .BR } . . +. +.\" -------------------------------------------------------------------- .SS Expressions +.\" -------------------------------------------------------------------- . The syntax for expressions has been significantly extended: . +. .LP .IB x\ ^\ y (exponentiation) @@ -597,7 +686,7 @@ (base 10) .br .BI exp( x ) -(base 10, ie +(base 10, i.e.\& .ie t 10\v'-.4m'\fIx\*(ic\fR\v'.4m') .el 10^\fIx\fR) .br @@ -638,16 +727,20 @@ .br \fIe1\fB < \fIe2\fR .br -\fB"\fIstr1\*(ic\fB" == "\fIstr2\*(ic\fB"\fR +\fB"\,\fIstr1\*(ic\fB" == "\,\fIstr2\*(ic\fB"\fR .br -\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR +\fB"\,\fIstr1\*(ic\fB" != "\,\fIstr2\*(ic\fB"\fR .br . +. .LP String comparison expressions must be parenthesised in some contexts to avoid ambiguity. . +. +.\" -------------------------------------------------------------------- .SS Other Changes +.\" -------------------------------------------------------------------- . A bare expression, .IR expr , @@ -657,6 +750,7 @@ where .I dir is the current direction. +. For example .LP .RS @@ -664,18 +758,22 @@ .RE .LP means draw a line 2\ inches long in the current direction. -The `i' (or `I') character is ignored; to use another measurement unit, -set the +. +The \[oq]i\[cq] (or \[oq]I\[cq]) character is ignored; to use another +measurement unit, set the .I scale variable to an appropriate value. . +. .LP The maximum width and height of the picture are taken from the variables .B maxpswid and .BR maxpsht . +. Initially these have values 8.5 and 11. . +. .LP Scientific notation is allowed for numbers. For example @@ -685,8 +783,10 @@ x = 5e\-2 .RE . +. .LP Text attributes can be compounded. +. For example, .RS .LP @@ -696,8 +796,10 @@ .LP is valid. . +. .LP There is no limit to the depth to which blocks can be examined. +. For example, .RS .LP @@ -710,16 +812,21 @@ .LP is acceptable. . +. .LP -Arcs now have compass points -determined by the circle of which the arc is a part. +Arcs now have compass points determined by the circle of which the arc +is a part. +. . .LP Circles, ellipses, and arcs can be dotted or dashed. +. In \*(tx mode splines can be dotted or dashed also. . +. .LP Boxes can have rounded corners. +. The .B rad attribute specifies the radius of the quarter-circles at each corner. @@ -730,33 +837,42 @@ attribute is given, a radius of .B boxrad is used. +. Initially, .B boxrad has a value of\ 0. +. A box with rounded corners can be dotted or dashed. . +. .LP Boxes can have slanted sides. +. This effectively changes the shape of a box from a rectangle to an arbitrary parallelogram. +. The .B xslanted and .B yslanted -attributes specify the x and y\~offset of the box's upper right corner -from its default position. +attributes specify the x and y\~offset of the box\[aq]s upper right +corner from its default position. +. . .LP The .B .PS line can have a second argument specifying a maximum height for the picture. +. If the width of zero is specified the width will be ignored in computing the scaling factor for the picture. +. Note that GNU .B pic will always scale a picture by the same amount vertically as well as horizontally. +. This is different from the .SM DWB 2.0 @@ -764,11 +880,15 @@ which may scale a picture by a different amount vertically than horizontally if a height is specified. . +. .LP Each text object has an invisible box associated with it. +. The compass points of a text object are determined by this box. +. The implicit motion associated with the object is also determined by this box. +. The dimensions of this box are taken from the width and height attributes; if the width attribute is not supplied then the width will be taken to be .BR textwid ; @@ -776,12 +896,14 @@ the number of text strings associated with the object times .BR textht . +. Initially .B textwid and .B textht have a value of 0. . +. .LP In (almost all) places where a quoted text string can be used, an expression of the form @@ -795,26 +917,33 @@ .BR printf (3) appropriate for the number of arguments supplied. . +. .LP The thickness of the lines used to draw objects is controlled by the .B linethick variable. +. This gives the thickness of lines in points. +. A negative value means use the default thickness: in \*(tx output mode, this means use a thickness of 8 milliinches; in \*(tx output mode with the -.B -c +.B \-c option, this means use the line thickness specified by .B .ps lines; in troff output mode, this means use a thickness proportional to the pointsize. +. A zero value means draw the thinnest possible line supported by the output device. -Initially it has a value of -1. +. +Initially it has a value of \-1. +. There is also a .BR thick [ ness ] attribute. +. For example, .RS .LP @@ -822,6 +951,7 @@ .RE .LP would draw a circle using a line with a thickness of 1.5 points. +. The thickness of lines is not affected by the value of the .B scale @@ -829,27 +959,36 @@ .B .PS line. . +. .LP Boxes (including boxes with rounded corners or slanted sides), circles and ellipses can be filled by giving them an attribute of .BR fill [ ed ]. +. This takes an optional argument of an expression with a value between 0 and 1; 0 will fill it with white, 1 with black, values in between with a proportionally gray shade. +. A value greater than 1 can also be used: this means fill with the shade of gray that is currently being used for text and lines. +. Normally this will be black, but output devices may provide a mechanism for changing this. +. Without an argument, then the value of the variable .B fillval will be used. +. Initially this has a value of 0.5. +. The invisible attribute does not affect the filling of objects. +. Any text associated with a filled object will be added after the object has been filled, so that the text will not be obscured by the filling. . +. .LP Three additional modifiers are available to specify colored objects: .BR outline [ d ] @@ -858,13 +997,17 @@ the fill color, and .B colo\fR[\fPu\fR]\fPr\fR[\fPed\fR] sets both. +. All three keywords expect a suffix specifying the color, for example .RS .LP .B circle shaded """green""" outline """black""" .RE +. +. .LP -Currently, color support isn't available in \*(tx mode. +Currently, color support isn\[aq]t available in \*(tx mode. +. Predefined color names for .B groff are in the device macro files, for example @@ -874,10 +1017,13 @@ request (see the manual page of .BR @g@troff (@MAN1EXT@) for more details). +. +. .LP To change the name of the vbox in \*(tx mode, set the pseudo-variable .B figname (which is actually a specially parsed command) within a picture. +. Example: .RS .LP @@ -889,76 +1035,95 @@ .br .B .PE .RE +. +. .LP The picture is then available in the box .BR \efoobar . +. +. .LP .B pic assumes that at the beginning of a picture both glyph and fill color are set to the default value. . +. .LP Arrow heads will be drawn as solid triangles if the variable .B arrowhead is non-zero and either \*(tx mode is enabled or the .B \-n option has not been given. +. Initially .B arrowhead has a value of\ 1. +. Note that solid arrow heads are always filled with the current outline color. . +. .LP The troff output of .B pic is device-independent. +. The .B \-T option is therefore redundant. +. All numbers are taken to be in inches; numbers are never interpreted to be in troff machine units. . +. .LP Objects can have an .B aligned attribute. +. This will only work if the postprocessor is .BR grops , or .BR gropdf . +. Any text associated with an object having the .B aligned attribute will be rotated about the center of the object so that it is aligned in the direction from the start point to the end point of the object. -Note that this attribute will have no effect for objects whose start and -end points are coincident. +. +Note that this attribute will have no effect for objects whose start +and end points are coincident. +. . .LP In places where .IB n th is allowed -.BI ` expr 'th +.BI \[oq] expr \[cq]th is also allowed. +. Note that -.B 'th +.B \[cq]th is a single token: no space is allowed between the -.B ' +.B \[cq] and the .BR th . +. For example, .IP .ft B .nf for i = 1 to 4 do { - line from `i'th box.nw to `i+1'th box.se + line from \[oq]i\[cq]th box.nw to \[oq]i+1\[cq]th box.se } .ft .fi . . +.\" -------------------------------------------------------------------- .SH CONVERSION +.\" -------------------------------------------------------------------- . To obtain a stand-alone picture from a .B pic @@ -974,6 +1139,7 @@ .B roff text. . +. .LP It is necessary to feed this file into .B groff @@ -982,12 +1148,15 @@ and .B .PE requests are actually called. +. For example, the mm macro package adds a page number, which is very annoying. +. At the moment, calling standard .B groff without any macro package works. -Alternatively, you can define your own requests, e.g. to do nothing: +. +Alternatively, you can define your own requests, e.g.\& to do nothing: .LP .RS .nf @@ -1000,15 +1169,18 @@ .fi .RE . +. .LP .B groff itself does not provide direct conversion into other graphics file formats. -But there are lots of possibilities if you first transform your picture -into PostScript\*R format using the +. +But there are lots of possibilities if you first transform your +picture into PostScript\*R format using the .B groff option -.BR -Tps . +.BR \-Tps . +. Since this .IR ps -file lacks BoundingBox information it is not very useful by itself, but it @@ -1017,57 +1189,66 @@ or .BI psto other or the like. +. Moreover, the PostScript interpreter .B ghostscript .RB ( gs ) has built-in graphics conversion devices that are called with the option .LP .RS -.BI "gs -sDEVICE=" +.BI "gs \-sDEVICE=" .RE .LP Call .LP .RS -.B gs --help +.B gs \-\-help .RE .LP for a list of the available devices. . +. .LP An alternative may be to use the .B \-Tpdf option to convert your picture directly into .B PDF format. +. The MediaBox of the file produced can be controlled by passing a -.B \-P-p +.B \-P\-p papersize to groff. . +. .LP As the Encapsulated PostScript File Format .B EPS -is getting more and more important, and the conversion wasn't regarded -trivial in the past you might be interested to know that there is a -conversion tool named +is getting more and more important, and the conversion wasn\[aq]t +regarded trivial in the past you might be interested to know that +there is a conversion tool named .B ps2eps which does the right job. +. It is much better than the tool .B ps2epsi packaged with .BR gs . +. +. .LP For bitmapped graphic formats, you should use .BR pstopnm ; the resulting (intermediate) .B PNM -file can be then converted to virtually any graphics format using the tools -of the +file can be then converted to virtually any graphics format using the +tools of the .B netpbm package . . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .Tp \w'\fB@MACRODIR@/pic.tmac'u+3n .B @@ -1079,7 +1260,9 @@ macros. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- . .BR @g@troff (@MAN1EXT@), .BR groff_out (@MAN5EXT@), @@ -1089,39 +1272,51 @@ .BR pstopnm (1), .BR ps2epsi (1), .BR pnm (5) +. +. .LP -Eric S. Raymond, +Eric S.\& Raymond, .I Making Pictures With GNU PIC. .br @DOCDIR@/pic.ps (this file, together with its source file, pic.ms, is part of the groff documentation) +. +. .LP Tpic: Pic for \*(tx .LP -Brian W. Kernighan, +Brian W.\& Kernighan, .I PIC \(em A Graphics Language for Typesetting (User Manual). AT&T Bell Laboratories, Computing Science Technical Report No.\ 116 .br (revised May, 1991). +. +. .LP .B ps2eps -is available from CTAN mirrors, e.g. +is available from CTAN mirrors, e.g.\& .br +. +. .LP -W. Richard Stevens, +W.\& Richard Stevens, .I Turning PIC Into HTML .br +. +. .LP -W. Richard Stevens, +W.\& Richard Stevens, .I Examples of picMacros .br . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- . Input characters that are invalid for .B groff @@ -1129,14 +1324,25 @@ .SM ASCII code 0, or 013 octal, or between 015 and 037 octal, or between 0200 and 0237 octal) are rejected even in \*(tx mode. +. +. .LP The interpretation of .B fillval is incompatible with the pic in 10th edition Unix, which interprets 0 as black and 1 as white. +. +. .LP PostScript\*R is a registered trademark of Adobe Systems Incorporation. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/pic/pic_tab.h groff-1.22.3/src/preproc/pic/pic_tab.h --- groff-1.22.2/src/preproc/pic/pic_tab.h 2013-02-07 13:06:13.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/pic_tab.h 2014-11-04 09:38:37.791491918 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 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 . */ @@ -26,140 +26,148 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - LABEL = 258, - VARIABLE = 259, - NUMBER = 260, - TEXT = 261, - COMMAND_LINE = 262, - DELIMITED = 263, - ORDINAL = 264, - TH = 265, - LEFT_ARROW_HEAD = 266, - RIGHT_ARROW_HEAD = 267, - DOUBLE_ARROW_HEAD = 268, - LAST = 269, - BOX = 270, - CIRCLE = 271, - ELLIPSE = 272, - ARC = 273, - LINE = 274, - ARROW = 275, - MOVE = 276, - SPLINE = 277, - HEIGHT = 278, - RADIUS = 279, - FIGNAME = 280, - WIDTH = 281, - DIAMETER = 282, - UP = 283, - DOWN = 284, - RIGHT = 285, - LEFT = 286, - FROM = 287, - TO = 288, - AT = 289, - WITH = 290, - BY = 291, - THEN = 292, - SOLID = 293, - DOTTED = 294, - DASHED = 295, - CHOP = 296, - SAME = 297, - INVISIBLE = 298, - LJUST = 299, - RJUST = 300, - ABOVE = 301, - BELOW = 302, - OF = 303, - THE = 304, - WAY = 305, - BETWEEN = 306, - AND = 307, - HERE = 308, - DOT_N = 309, - DOT_E = 310, - DOT_W = 311, - DOT_S = 312, - DOT_NE = 313, - DOT_SE = 314, - DOT_NW = 315, - DOT_SW = 316, - DOT_C = 317, - DOT_START = 318, - DOT_END = 319, - DOT_X = 320, - DOT_Y = 321, - DOT_HT = 322, - DOT_WID = 323, - DOT_RAD = 324, - SIN = 325, - COS = 326, - ATAN2 = 327, - LOG = 328, - EXP = 329, - SQRT = 330, - K_MAX = 331, - K_MIN = 332, - INT = 333, - RAND = 334, - SRAND = 335, - COPY = 336, - THRU = 337, - TOP = 338, - BOTTOM = 339, - UPPER = 340, - LOWER = 341, - SH = 342, - PRINT = 343, - CW = 344, - CCW = 345, - FOR = 346, - DO = 347, - IF = 348, - ELSE = 349, - ANDAND = 350, - OROR = 351, - NOTEQUAL = 352, - EQUALEQUAL = 353, - LESSEQUAL = 354, - GREATEREQUAL = 355, - LEFT_CORNER = 356, - RIGHT_CORNER = 357, - NORTH = 358, - SOUTH = 359, - EAST = 360, - WEST = 361, - CENTER = 362, - END = 363, - START = 364, - RESET = 365, - UNTIL = 366, - PLOT = 367, - THICKNESS = 368, - FILL = 369, - COLORED = 370, - OUTLINED = 371, - SHADED = 372, - XSLANTED = 373, - YSLANTED = 374, - ALIGNED = 375, - SPRINTF = 376, - COMMAND = 377, - DEFINE = 378, - UNDEF = 379 - }; + enum yytokentype + { + LABEL = 258, + VARIABLE = 259, + NUMBER = 260, + TEXT = 261, + COMMAND_LINE = 262, + DELIMITED = 263, + ORDINAL = 264, + TH = 265, + LEFT_ARROW_HEAD = 266, + RIGHT_ARROW_HEAD = 267, + DOUBLE_ARROW_HEAD = 268, + LAST = 269, + BOX = 270, + CIRCLE = 271, + ELLIPSE = 272, + ARC = 273, + LINE = 274, + ARROW = 275, + MOVE = 276, + SPLINE = 277, + HEIGHT = 278, + RADIUS = 279, + FIGNAME = 280, + WIDTH = 281, + DIAMETER = 282, + UP = 283, + DOWN = 284, + RIGHT = 285, + LEFT = 286, + FROM = 287, + TO = 288, + AT = 289, + WITH = 290, + BY = 291, + THEN = 292, + SOLID = 293, + DOTTED = 294, + DASHED = 295, + CHOP = 296, + SAME = 297, + INVISIBLE = 298, + LJUST = 299, + RJUST = 300, + ABOVE = 301, + BELOW = 302, + OF = 303, + THE = 304, + WAY = 305, + BETWEEN = 306, + AND = 307, + HERE = 308, + DOT_N = 309, + DOT_E = 310, + DOT_W = 311, + DOT_S = 312, + DOT_NE = 313, + DOT_SE = 314, + DOT_NW = 315, + DOT_SW = 316, + DOT_C = 317, + DOT_START = 318, + DOT_END = 319, + DOT_X = 320, + DOT_Y = 321, + DOT_HT = 322, + DOT_WID = 323, + DOT_RAD = 324, + SIN = 325, + COS = 326, + ATAN2 = 327, + LOG = 328, + EXP = 329, + SQRT = 330, + K_MAX = 331, + K_MIN = 332, + INT = 333, + RAND = 334, + SRAND = 335, + COPY = 336, + THRU = 337, + TOP = 338, + BOTTOM = 339, + UPPER = 340, + LOWER = 341, + SH = 342, + PRINT = 343, + CW = 344, + CCW = 345, + FOR = 346, + DO = 347, + IF = 348, + ELSE = 349, + ANDAND = 350, + OROR = 351, + NOTEQUAL = 352, + EQUALEQUAL = 353, + LESSEQUAL = 354, + GREATEREQUAL = 355, + LEFT_CORNER = 356, + RIGHT_CORNER = 357, + NORTH = 358, + SOUTH = 359, + EAST = 360, + WEST = 361, + CENTER = 362, + END = 363, + START = 364, + RESET = 365, + UNTIL = 366, + PLOT = 367, + THICKNESS = 368, + FILL = 369, + COLORED = 370, + OUTLINED = 371, + SHADED = 372, + XSLANTED = 373, + YSLANTED = 374, + ALIGNED = 375, + SPRINTF = 376, + COMMAND = 377, + DEFINE = 378, + UNDEF = 379 + }; #endif /* Tokens. */ #define LABEL 258 @@ -285,15 +293,12 @@ #define DEFINE 378 #define UNDEF 379 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 2068 of yacc.c */ -#line 67 "pic.y" +#line 65 "pic.y" /* yacc.c:1909 */ char *str; int n; @@ -312,16 +317,15 @@ graphics_state state; object_type obtype; - - -/* Line 2068 of yacc.c */ -#line 319 "y.tab.h" -} YYSTYPE; +#line 321 "y.tab.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE yylval; +int yyparse (void); +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff -ruN groff-1.22.2/src/preproc/pic/pic.y groff-1.22.3/src/preproc/pic/pic.y --- groff-1.22.2/src/preproc/pic/pic.y 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/pic.y 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/position.h groff-1.22.3/src/preproc/pic/position.h --- groff-1.22.2/src/preproc/pic/position.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/position.h 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/tex.cpp groff-1.22.3/src/preproc/pic/tex.cpp --- groff-1.22.2/src/preproc/pic/tex.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/tex.cpp 2014-11-04 09:38:35.226523984 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/text.h groff-1.22.3/src/preproc/pic/text.h --- groff-1.22.2/src/preproc/pic/text.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/text.h 2014-11-04 09:38:35.227523972 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/pic/troff.cpp groff-1.22.3/src/preproc/pic/troff.cpp --- groff-1.22.2/src/preproc/pic/troff.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/pic/troff.cpp 2014-11-04 09:38:35.227523972 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/preconv/Makefile.sub groff-1.22.3/src/preproc/preconv/Makefile.sub --- groff-1.22.2/src/preproc/preconv/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/preconv/Makefile.sub 2014-11-04 09:38:35.214524134 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc preconv' +# +# File position: /src/preproc/preconv/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=preconv$(EXEEXT) MAN1=preconv.n XLIBS=$(LIBGROFF) @@ -5,3 +29,11 @@ EXTRA_LDFLAGS=$(LIBICONV) OBJS=preconv.$(OBJEXT) CCSRCS=$(srcdir)/preconv.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/preconv/preconv.cpp groff-1.22.3/src/preproc/preconv/preconv.cpp --- groff-1.22.2/src/preproc/preconv/preconv.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/preconv/preconv.cpp 2014-11-04 09:38:35.214524134 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2005, 2006, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 2005-2014 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/preconv/preconv.man groff-1.22.3/src/preproc/preconv/preconv.man --- groff-1.22.2/src/preproc/preconv/preconv.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/preconv/preconv.man 2014-11-04 09:38:35.214524134 +0100 @@ -1,5 +1,11 @@ -.ig -Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +.TH PRECONV @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +preconv \- convert encoding of input files to something GNU troff understands +. +. +.\" license (copying) +.de co +Copyright \[co] 2006-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,14 +23,10 @@ the original English. .. . -.TH PRECONV @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -preconv \- convert encoding of input files to something GNU troff understands -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .SY preconv .OP \-dr .OP \-e encoding @@ -42,22 +44,28 @@ .B \-\-version .YS . +. .PP It is possible to have whitespace between the .B \-e command line option and its parameter. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B preconv reads .I files and converts its encoding(s) to a form GNU .BR troff (@MAN1EXT@) can process, sending the data to standard output. -Currently, this means ASCII characters and `\e[uXXXX]' entities, where -`XXXX' is a hexadecimal number with four to six digits, representing a -Unicode input code. +. +Currently, this means ASCII characters and \[oq]\e[uXXXX]\[cq] +entities, where \[oq]XXXX\[cq] is a hexadecimal number with four to +six digits, representing a Unicode input code. +. Normally, .B preconv should be invoked with the @@ -68,7 +76,10 @@ .BR groff . . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .B \-d Emit debugging messages to standard error (mainly the used encoding). @@ -80,10 +91,12 @@ .TP .BI \-e encoding Specify input encoding explicitly, overriding all other methods. +. This corresponds to -.BR groff 's +.BR groff \[aq]s .BI \-K encoding option. +. Without this switch, .B preconv uses the algorithm described below to select the input encoding. @@ -96,7 +109,7 @@ . .TP .B \-r -Do not add .lf requests. +Do not add \&.lf requests. . .TP .B \-\-version @@ -105,7 +118,10 @@ Print version number. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- +. .B preconv tries to find the input encoding with the following algorithm. . @@ -118,19 +134,22 @@ Otherwise, check whether the input starts with a .I Byte Order Mark (BOM, see below). +. If found, use it. . .IP 3. Finally, check whether there is a known .I coding tag (see below) in either the first or second input line. +. If found, use it. . .IP 4. If everything fails, use a default encoding as given with option .BR \-D , -by the current locale, or `latin1' if the locale is set to `C', -`POSIX', or empty (in that order). +by the current locale, or \[oq]latin1\[cq] if the locale is set to +\[oq]C\[cq], \[oq]POSIX\[cq], or empty (in that order). +. . .PP Note that the @@ -140,36 +159,52 @@ environment variable which is eventually expanded to option .BR \-k . . +. +.\" -------------------------------------------------------------------- .SS "Byte Order Mark" +.\" -------------------------------------------------------------------- +. The Unicode Standard defines character U+FEFF as the Byte Order Mark (BOM). +. On the other hand, value U+FFFE is guaranteed not be a Unicode character at all. +. This allows to detect the byte order within the data stream (either -big-endian or lower-endian), and the MIME encodings \%`UTF-16' and -\%`UTF-32' mandate that the data stream starts with U+FEFF. -Similarly, the data stream encoded as \%`UTF-8' might start with a BOM (to -ease the conversion from and to \%UTF-16 and \%UTF-32). +big-endian or lower-endian), and the MIME encodings \%\[oq]UTF-16\[cq] +and \%\[oq]UTF-32\[cq] mandate that the data stream starts with U+FEFF. +. +Similarly, the data stream encoded as \%\[oq]UTF-8\[cq] might start +with a BOM (to ease the conversion from and to \%UTF-16 and \%UTF-32). +. In all cases, the byte order mark is .I not part of the data but part of the encoding protocol; in other words, -.BR preconv 's -output doesn't contain it. +.BR preconv \[aq]s +output doesn\[aq]t contain it. +. . .PP -Note that U+FEFF not at the start of the input data actually is emitted; -it has then the meaning of a `zero width no-break space' character \[en] -something not needed normally in +Note that U+FEFF not at the start of the input data actually is +emitted; it has then the meaning of a \[oq]zero width no-break +space\[cq] character \[en] something not needed normally in .BR groff . . +. +.\" -------------------------------------------------------------------- .SS "Coding Tags" +.\" -------------------------------------------------------------------- +. Editors which support more than a single character encoding need tags -within the input files to mark the file's encoding. +within the input files to mark the file\[aq]s encoding. +. While it is possible to guess the right input encoding with the help of heuristic algorithms for data which represents a greater amount of a natural language, it is still just a guess. +. Additionally, all algorithms fail easily for input which is either too short -or doesn't represent a natural language. +or doesn\[aq]t represent a natural language. +. . .PP For these reasons, @@ -180,6 +215,7 @@ .B XEmacs (and probably other programs too). . +. .PP Coding tags in .B "GNU Emacs" @@ -187,6 +223,7 @@ .B XEmacs are stored in so-called .IR "File Variables" . +. .B preconv recognizes the following syntax form which must be put into a troff comment in the first or second line. @@ -201,10 +238,12 @@ \&.\|.\|.\& \-*\- .RE . +. .PP The only relevant tag for .B preconv -is `coding' which can take the values listed below. +is \[oq]coding\[cq] which can take the values listed below. +. Here an example line which tells .B Emacs to edit a file in troff mode, and to use \%latin2 as its encoding. @@ -212,10 +251,11 @@ .RS .PP .EX -\&.\[rs]" \-*\- mode: troff; coding: latin-2 \-*\- +\&.\[rs]" \-*\- mode: troff; coding: latin-2 \-*\-\"" .EE .RE . +. .PP The following list gives all MIME coding tags (either lowercase or uppercase) supported by @@ -225,43 +265,49 @@ .RS .PP .ad l -\%big5, \%cp1047, \%euc-jp, \%euc-kr, \%gb2312, \%iso-8859-1, \%iso-8859-2, -\%iso-8859-5, \%iso-8859-7, \%iso-8859-9, \%iso-8859-13, \%iso-8859-15, -\%koi8-r, \%us-ascii, \%utf-8, \%utf-16, \%utf-16be, \%utf-16le +\%big5, \%cp1047, \%euc-jp, \%euc-kr, \%gb2312, \%iso-8859-1, +\%iso-8859-2, \%iso-8859-5, \%iso-8859-7, \%iso-8859-9, \%iso-8859-13, +\%iso-8859-15, \%koi8-r, \%us-ascii, \%utf-8, \%utf-16, \%utf-16be, +\%utf-16le .ad .RE . +. .PP -In addition, the following hard-coded list of other tags is recognized which -eventually map to values from the list above. +In addition, the following hard-coded list of other tags is recognized +which eventually map to values from the list above. . .RS .PP .ad l \%ascii, \%chinese-big5, \%chinese-euc, \%chinese-iso-8bit, \%cn-big5, \%\%cn-gb, \%cn-gb-2312, \%cp878, \%csascii, \%csisolatin1, -\%cyrillic-iso-8bit, \%cyrillic-koi8, \%euc-china, \%euc-cn, \%euc-japan, -\%euc-japan-1990, \%euc-korea, \%greek-iso-8bit, \%iso-10646/utf8, -\%iso-10646/utf-8, \%iso-latin-1, \%iso-latin-2, \%iso-latin-5, -\%iso-latin-7, \%iso-latin-9, \%japanese-euc, \%japanese-iso-8bit, \%jis8, -\%koi8, \%korean-euc, \%korean-iso-8bit, \%latin-0, \%latin1, \%latin-1, -\%latin-2, \%latin-5, \%latin-7, \%latin-9, \%mule-utf-8, \%mule-utf-16, -\%mule-utf-16be, \%mule-utf-16-be, \%mule-utf-16be-with-signature, -\%mule-utf-16le, \%mule-utf-16-le, \%mule-utf-16le-with-signature, \%utf8, -\%utf-16-be, \%utf-16-be-with-signature, \%utf-16be-with-signature, -\%utf-16-le, \%utf-16-le-with-signature, \%utf-16le-with-signature +\%cyrillic-iso-8bit, \%cyrillic-koi8, \%euc-china, \%euc-cn, +\%euc-japan, \%euc-japan-1990, \%euc-korea, \%greek-iso-8bit, +\%iso-10646/utf8, \%iso-10646/utf-8, \%iso-latin-1, \%iso-latin-2, +\%iso-latin-5, \%iso-latin-7, \%iso-latin-9, \%japanese-euc, +\%japanese-iso-8bit, \%jis8, \%koi8, \%korean-euc, \%korean-iso-8bit, +\%latin-0, \%latin1, \%latin-1, \%latin-2, \%latin-5, \%latin-7, +\%latin-9, \%mule-utf-8, \%mule-utf-16, \%mule-utf-16be, +\%mule-utf-16-be, \%mule-utf-16be-with-signature, \%mule-utf-16le, +\%mule-utf-16-le, \%mule-utf-16le-with-signature, \%utf8, \%utf-16-be, +\%utf-16-be-with-signature, \%utf-16be-with-signature, \%utf-16-le, +\%utf-16-le-with-signature, \%utf-16le-with-signature .ad .RE . +. .PP Those tags are taken from .B "GNU Emacs" -and +and .BR XEmacs , together with some aliases. -Trailing \%`-dos', \%`-unix', and \%`-mac' suffixes of coding tags (which -give the end-of-line convention used in the file) are stripped off before -the comparison with the above tags happens. +. +Trailing \%\[oq]-dos\[cq], \%\[oq]-unix\[cq], and \%\[oq]-mac\[cq] +suffixes of coding tags (which give the end-of-line convention used in +the file) are stripped off before the comparison with the above tags +happens. . .SS "Iconv Issues" .B preconv @@ -269,23 +315,31 @@ all other encodings are passed to the .B iconv library functions. +. At compile time it is searched and checked for a valid .B iconv -implementation; a call to `preconv \-\-version' shows whether +implementation; a call to \[oq]preconv \-\-version\[cq] shows whether .B iconv is used. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. .B preconv -doesn't support +doesn\[aq]t support .I "local variable lists" yet. +. This is a different syntax form to specify local variables at the end of a file. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@) .br the @@ -294,6 +348,14 @@ .B XEmacs info pages . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. +.\" Emacs setting .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/refer/command.cpp groff-1.22.3/src/preproc/refer/command.cpp --- groff-1.22.2/src/preproc/refer/command.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/command.cpp 2014-11-04 09:38:35.244523759 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/command.h groff-1.22.3/src/preproc/refer/command.h --- groff-1.22.2/src/preproc/refer/command.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/command.h 2014-11-04 09:38:35.244523759 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/label.cpp groff-1.22.3/src/preproc/refer/label.cpp --- groff-1.22.2/src/preproc/refer/label.cpp 2013-02-07 13:06:15.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/label.cpp 2014-11-04 09:38:38.659481067 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 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 . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,15 +58,11 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 21 "label.y" +#line 20 "label.y" /* yacc.c:339 */ #include "refer.h" @@ -266,14 +262,15 @@ string literals; +#line 266 "label.cpp" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 272 "label.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -283,59 +280,58 @@ # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOKEN_LETTER = 258, - TOKEN_LITERAL = 259, - TOKEN_DIGIT = 260 - }; + enum yytokentype + { + TOKEN_LETTER = 258, + TOKEN_LITERAL = 259, + TOKEN_DIGIT = 260 + }; #endif /* Tokens. */ #define TOKEN_LETTER 258 #define TOKEN_LITERAL 259 #define TOKEN_DIGIT 260 - - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 221 "label.y" +#line 220 "label.y" /* yacc.c:355 */ int num; expression *expr; struct { int ndigits; int val; } dig; struct { int start; int len; } str; - - -/* Line 293 of yacc.c */ -#line 327 "label.cpp" -} YYSTYPE; +#line 320 "label.cpp" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -/* Copy the second part of user declarations. */ +extern YYSTYPE yylval; + +int yyparse (void); + -/* Line 343 of yacc.c */ -#line 339 "label.cpp" +/* Copy the second part of user declarations. */ + +#line 335 "label.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -349,11 +345,8 @@ #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -373,8 +366,7 @@ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -388,39 +380,68 @@ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -438,9 +459,9 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -450,8 +471,8 @@ # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -467,7 +488,7 @@ # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -475,15 +496,13 @@ # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -493,7 +512,7 @@ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -518,35 +537,35 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -562,17 +581,19 @@ #define YYNNTS 12 /* YYNRULES -- Number of rules. */ #define YYNRULES 34 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 49 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 260 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -605,42 +626,17 @@ }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 7, 13, 14, 16, 18, 22, - 26, 28, 31, 33, 37, 39, 41, 43, 46, 49, - 52, 58, 62, 66, 69, 73, 77, 78, 80, 82, - 85, 87, 90, 91, 93 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 22, 0, -1, 24, -1, 25, -1, 25, 6, 24, - 7, 23, -1, -1, 23, -1, 26, -1, 25, 8, - 26, -1, 25, 9, 26, -1, 27, -1, 26, 27, - -1, 28, -1, 27, 10, 28, -1, 11, -1, 4, - -1, 3, -1, 3, 30, -1, 12, 3, -1, 12, - 31, -1, 28, 13, 32, 3, 29, -1, 28, 14, - 30, -1, 28, 15, 30, -1, 28, 16, -1, 17, - 24, 18, -1, 19, 24, 20, -1, -1, 30, -1, - 5, -1, 30, 5, -1, 5, -1, 31, 5, -1, - -1, 14, -1, 15, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 249, 249, 254, 256, 262, 263, 268, 270, 272, - 277, 279, 284, 286, 291, 293, 298, 300, 302, 318, - 322, 353, 355, 357, 359, 361, 367, 368, 373, 375, - 380, 382, 389, 390, 392 + 0, 248, 248, 253, 255, 261, 262, 267, 269, 271, + 276, 278, 283, 285, 290, 292, 297, 299, 301, 317, + 321, 352, 354, 356, 358, 360, 366, 367, 372, 374, + 379, 381, 388, 389, 391 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -649,13 +645,13 @@ "TOKEN_DIGIT", "'?'", "':'", "'|'", "'&'", "'~'", "'@'", "'%'", "'.'", "'+'", "'-'", "'*'", "'('", "')'", "'<'", "'>'", "$accept", "expr", "conditional", "optional_conditional", "alternative", "list", - "substitute", "string", "optional_number", "number", "digits", "flag", 0 + "substitute", "string", "optional_number", "number", "digits", "flag", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 63, 58, 124, 38, @@ -664,46 +660,18 @@ }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 21, 22, 23, 23, 24, 24, 25, 25, 25, - 26, 26, 27, 27, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 29, 29, 30, 30, - 31, 31, 32, 32, 32 -}; +#define YYPACT_NINF -26 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 5, 0, 1, 1, 3, 3, - 1, 2, 1, 3, 1, 1, 1, 2, 2, 2, - 5, 3, 3, 2, 3, 3, 0, 1, 1, 2, - 1, 2, 0, 1, 1 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-26))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 5, 16, 15, 14, 0, 5, 5, 0, 6, 2, - 3, 7, 10, 12, 28, 17, 18, 30, 19, 0, - 0, 1, 5, 0, 0, 11, 0, 32, 0, 0, - 23, 29, 31, 24, 25, 0, 8, 9, 13, 33, - 34, 0, 21, 22, 0, 26, 4, 20, 27 -}; +#define YYTABLE_NINF -1 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 7, 8, 9, 10, 11, 12, 13, 47, 15, - 18, 41 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -26 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int8 yypact[] = { 2, 11, -26, -26, 12, 2, 2, 24, -26, -26, @@ -713,17 +681,35 @@ -26, 33, 26, 26, 2, 11, -26, -26, 26 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 5, 16, 15, 14, 0, 5, 5, 0, 6, 2, + 3, 7, 10, 12, 28, 17, 18, 30, 19, 0, + 0, 1, 5, 0, 0, 11, 0, 32, 0, 0, + 23, 29, 31, 24, 25, 0, 8, 9, 13, 33, + 34, 0, 21, 22, 0, 26, 4, 20, 27 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -26, -26, -7, -4, -26, -1, -11, 13, -26, -25, -26, -26 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 7, 8, 9, 10, 11, 12, 13, 47, 15, + 18, 41 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 25, 19, 20, 42, 43, 1, 2, 27, 28, 29, @@ -732,12 +718,6 @@ 24, 31, 32, 33, 34, 44, 45, 46, 0, 38 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-26)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 11, 5, 6, 28, 29, 3, 4, 13, 14, 15, @@ -746,8 +726,8 @@ 9, 5, 5, 18, 20, 7, 3, 44, -1, 26 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 11, 12, 17, 19, 22, 23, 24, @@ -757,94 +737,59 @@ 15, 32, 30, 30, 7, 3, 23, 29, 30 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 21, 22, 23, 23, 24, 24, 25, 25, 25, + 26, 26, 27, 27, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 29, 29, 30, 30, + 31, 31, 32, 32, 32 +}; -#define YYRECOVERING() (!!yyerrstatus) + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 5, 0, 1, 1, 3, 3, + 1, 2, 1, 3, 1, 1, 1, 2, 2, 2, + 5, 3, 3, 2, 3, 3, 0, 1, 1, 2, + 1, 2, 0, 1, 1 +}; -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -854,54 +799,46 @@ # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -909,22 +846,11 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -935,16 +861,8 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -955,49 +873,42 @@ YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1011,7 +922,7 @@ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1034,15 +945,8 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1058,16 +962,8 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1097,27 +993,27 @@ char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1140,12 +1036,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1153,10 +1048,6 @@ int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1205,11 +1096,13 @@ break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1229,10 +1122,12 @@ # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1269,48 +1164,20 @@ | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ @@ -1318,7 +1185,6 @@ /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; @@ -1327,37 +1193,18 @@ | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1375,7 +1222,7 @@ int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1393,9 +1240,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1404,14 +1250,6 @@ yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1432,23 +1270,23 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1456,22 +1294,22 @@ # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1480,10 +1318,10 @@ yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1512,7 +1350,7 @@ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1552,7 +1390,9 @@ yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1575,7 +1415,7 @@ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1589,286 +1429,251 @@ switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 250 "label.y" - { parse_result = ((yyvsp[(1) - (1)].expr) ? new analyzed_expr((yyvsp[(1) - (1)].expr)) : 0); } +#line 249 "label.y" /* yacc.c:1646 */ + { parse_result = ((yyvsp[0].expr) ? new analyzed_expr((yyvsp[0].expr)) : 0); } +#line 1435 "label.cpp" /* yacc.c:1646 */ break; case 3: - -/* Line 1806 of yacc.c */ -#line 255 "label.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 254 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1441 "label.cpp" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 257 "label.y" - { (yyval.expr) = new conditional_expr((yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); } +#line 256 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new conditional_expr((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 1447 "label.cpp" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 262 "label.y" +#line 261 "label.y" /* yacc.c:1646 */ { (yyval.expr) = 0; } +#line 1453 "label.cpp" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 264 "label.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 263 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1459 "label.cpp" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 269 "label.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 268 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1465 "label.cpp" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 271 "label.y" - { (yyval.expr) = new alternative_expr((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } +#line 270 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new alternative_expr((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 1471 "label.cpp" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 273 "label.y" - { (yyval.expr) = new conditional_expr((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), 0); } +#line 272 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new conditional_expr((yyvsp[-2].expr), (yyvsp[0].expr), 0); } +#line 1477 "label.cpp" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 278 "label.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 277 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1483 "label.cpp" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 280 "label.y" - { (yyval.expr) = new list_expr((yyvsp[(1) - (2)].expr), (yyvsp[(2) - (2)].expr)); } +#line 279 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new list_expr((yyvsp[-1].expr), (yyvsp[0].expr)); } +#line 1489 "label.cpp" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 285 "label.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 284 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1495 "label.cpp" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 287 "label.y" - { (yyval.expr) = new substitute_expr((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } +#line 286 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new substitute_expr((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 1501 "label.cpp" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 292 "label.y" +#line 291 "label.y" /* yacc.c:1646 */ { (yyval.expr) = new at_expr; } +#line 1507 "label.cpp" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 294 "label.y" +#line 293 "label.y" /* yacc.c:1646 */ { - (yyval.expr) = new literal_expr(literals.contents() + (yyvsp[(1) - (1)].str).start, - (yyvsp[(1) - (1)].str).len); + (yyval.expr) = new literal_expr(literals.contents() + (yyvsp[0].str).start, + (yyvsp[0].str).len); } +#line 1516 "label.cpp" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 299 "label.y" - { (yyval.expr) = new field_expr((yyvsp[(1) - (1)].num), 0); } +#line 298 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new field_expr((yyvsp[0].num), 0); } +#line 1522 "label.cpp" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 301 "label.y" - { (yyval.expr) = new field_expr((yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num) - 1); } +#line 300 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new field_expr((yyvsp[-1].num), (yyvsp[0].num) - 1); } +#line 1528 "label.cpp" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 303 "label.y" +#line 302 "label.y" /* yacc.c:1646 */ { - switch ((yyvsp[(2) - (2)].num)) { + switch ((yyvsp[0].num)) { case 'I': case 'i': case 'A': case 'a': - (yyval.expr) = new format_expr((yyvsp[(2) - (2)].num)); + (yyval.expr) = new format_expr((yyvsp[0].num)); break; default: - command_error("unrecognized format `%1'", char((yyvsp[(2) - (2)].num))); + command_error("unrecognized format `%1'", char((yyvsp[0].num))); (yyval.expr) = new format_expr('a'); break; } } +#line 1547 "label.cpp" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 319 "label.y" +#line 318 "label.y" /* yacc.c:1646 */ { - (yyval.expr) = new format_expr('0', (yyvsp[(2) - (2)].dig).ndigits, (yyvsp[(2) - (2)].dig).val); + (yyval.expr) = new format_expr('0', (yyvsp[0].dig).ndigits, (yyvsp[0].dig).val); } +#line 1555 "label.cpp" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 323 "label.y" +#line 322 "label.y" /* yacc.c:1646 */ { - switch ((yyvsp[(4) - (5)].num)) { + switch ((yyvsp[-1].num)) { case 'l': - (yyval.expr) = new map_expr((yyvsp[(1) - (5)].expr), lowercase); + (yyval.expr) = new map_expr((yyvsp[-4].expr), lowercase); break; case 'u': - (yyval.expr) = new map_expr((yyvsp[(1) - (5)].expr), uppercase); + (yyval.expr) = new map_expr((yyvsp[-4].expr), uppercase); break; case 'c': - (yyval.expr) = new map_expr((yyvsp[(1) - (5)].expr), capitalize); + (yyval.expr) = new map_expr((yyvsp[-4].expr), capitalize); break; case 'r': - (yyval.expr) = new map_expr((yyvsp[(1) - (5)].expr), reverse_name); + (yyval.expr) = new map_expr((yyvsp[-4].expr), reverse_name); break; case 'a': - (yyval.expr) = new map_expr((yyvsp[(1) - (5)].expr), abbreviate_name); + (yyval.expr) = new map_expr((yyvsp[-4].expr), abbreviate_name); break; case 'y': - (yyval.expr) = new extractor_expr((yyvsp[(1) - (5)].expr), find_year, (yyvsp[(3) - (5)].num)); + (yyval.expr) = new extractor_expr((yyvsp[-4].expr), find_year, (yyvsp[-2].num)); break; case 'n': - (yyval.expr) = new extractor_expr((yyvsp[(1) - (5)].expr), find_last_name, (yyvsp[(3) - (5)].num)); + (yyval.expr) = new extractor_expr((yyvsp[-4].expr), find_last_name, (yyvsp[-2].num)); break; default: - (yyval.expr) = (yyvsp[(1) - (5)].expr); - command_error("unknown function `%1'", char((yyvsp[(4) - (5)].num))); + (yyval.expr) = (yyvsp[-4].expr); + command_error("unknown function `%1'", char((yyvsp[-1].num))); break; } } +#line 1589 "label.cpp" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 354 "label.y" - { (yyval.expr) = new truncate_expr((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].num)); } +#line 353 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new truncate_expr((yyvsp[-2].expr), (yyvsp[0].num)); } +#line 1595 "label.cpp" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 356 "label.y" - { (yyval.expr) = new truncate_expr((yyvsp[(1) - (3)].expr), -(yyvsp[(3) - (3)].num)); } +#line 355 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new truncate_expr((yyvsp[-2].expr), -(yyvsp[0].num)); } +#line 1601 "label.cpp" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 358 "label.y" - { (yyval.expr) = new star_expr((yyvsp[(1) - (2)].expr)); } +#line 357 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new star_expr((yyvsp[-1].expr)); } +#line 1607 "label.cpp" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 360 "label.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); } +#line 359 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[-1].expr); } +#line 1613 "label.cpp" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 362 "label.y" - { (yyval.expr) = new separator_expr((yyvsp[(2) - (3)].expr)); } +#line 361 "label.y" /* yacc.c:1646 */ + { (yyval.expr) = new separator_expr((yyvsp[-1].expr)); } +#line 1619 "label.cpp" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 367 "label.y" +#line 366 "label.y" /* yacc.c:1646 */ { (yyval.num) = -1; } +#line 1625 "label.cpp" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 369 "label.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); } +#line 368 "label.y" /* yacc.c:1646 */ + { (yyval.num) = (yyvsp[0].num); } +#line 1631 "label.cpp" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 374 "label.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); } +#line 373 "label.y" /* yacc.c:1646 */ + { (yyval.num) = (yyvsp[0].num); } +#line 1637 "label.cpp" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 376 "label.y" - { (yyval.num) = (yyvsp[(1) - (2)].num)*10 + (yyvsp[(2) - (2)].num); } +#line 375 "label.y" /* yacc.c:1646 */ + { (yyval.num) = (yyvsp[-1].num)*10 + (yyvsp[0].num); } +#line 1643 "label.cpp" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 381 "label.y" - { (yyval.dig).ndigits = 1; (yyval.dig).val = (yyvsp[(1) - (1)].num); } +#line 380 "label.y" /* yacc.c:1646 */ + { (yyval.dig).ndigits = 1; (yyval.dig).val = (yyvsp[0].num); } +#line 1649 "label.cpp" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 383 "label.y" - { (yyval.dig).ndigits = (yyvsp[(1) - (2)].dig).ndigits + 1; (yyval.dig).val = (yyvsp[(1) - (2)].dig).val*10 + (yyvsp[(2) - (2)].num); } +#line 382 "label.y" /* yacc.c:1646 */ + { (yyval.dig).ndigits = (yyvsp[-1].dig).ndigits + 1; (yyval.dig).val = (yyvsp[-1].dig).val*10 + (yyvsp[0].num); } +#line 1655 "label.cpp" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 389 "label.y" +#line 388 "label.y" /* yacc.c:1646 */ { (yyval.num) = 0; } +#line 1661 "label.cpp" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 391 "label.y" +#line 390 "label.y" /* yacc.c:1646 */ { (yyval.num) = 1; } +#line 1667 "label.cpp" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 393 "label.y" +#line 392 "label.y" /* yacc.c:1646 */ { (yyval.num) = -1; } +#line 1673 "label.cpp" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 1872 "label.cpp" +#line 1677 "label.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1890,7 +1695,7 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1905,9 +1710,9 @@ goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -1958,20 +1763,20 @@ if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -1990,7 +1795,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2003,35 +1808,37 @@ | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2055,7 +1862,7 @@ yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2074,14 +1881,14 @@ yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2092,14 +1899,9 @@ if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 396 "label.y" +#line 395 "label.y" /* yacc.c:1906 */ /* bison defines const to be empty unless __STDC__ is defined, which it @@ -2897,4 +2699,3 @@ } return nauthors; } - diff -ruN groff-1.22.2/src/preproc/refer/label.y groff-1.22.3/src/preproc/refer/label.y --- groff-1.22.2/src/preproc/refer/label.y 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/label.y 2014-11-04 09:38:35.244523759 +0100 @@ -1,6 +1,5 @@ /* -*- C++ -*- - Copyright (C) 1989, 1990, 1991, 1992, 2000, 2004, 2007, 2009 - Free Software Foundation, Inc. + Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/Makefile.sub groff-1.22.3/src/preproc/refer/Makefile.sub --- groff-1.22.2/src/preproc/refer/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/Makefile.sub 2014-11-04 09:38:35.245523747 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc refer' +# +# File position: /src/preproc/refer/Makefile.sub +# +# Copyright (C) 1989-2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=refer$(EXEEXT) MAN1=refer.n XLIBS=$(LIBBIB) $(LIBGROFF) @@ -21,3 +45,21 @@ GRAM=$(srcdir)/label.y YTABC=label.cpp NAMEPREFIX=$(g) + +.PHONY: install_data +install_data: refer + -test -d $(DESTDIR)$(referdir) \ + || $(mkinstalldirs) $(DESTDIR)$(referdir) + +.PHONY: uninstall_data +uninstall_sub: + -test -d $(DESTDIR)$(referdir) && rmdir $(DESTDIR)$(referdir) + + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/refer/ref.cpp groff-1.22.3/src/preproc/refer/ref.cpp --- groff-1.22.2/src/preproc/refer/ref.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/ref.cpp 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2003, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/refer.cpp groff-1.22.3/src/preproc/refer/refer.cpp --- groff-1.22.2/src/preproc/refer/refer.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/refer.cpp 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2004, 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/refer.h groff-1.22.3/src/preproc/refer/refer.h --- groff-1.22.2/src/preproc/refer/refer.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/refer.h 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/refer.man groff-1.22.3/src/preproc/refer/refer.man --- groff-1.22.2/src/preproc/refer/refer.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/refer.man 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 - Free Software Foundation, Inc. +.TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@refer \- preprocess bibliographic references for groff +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,6 +26,9 @@ the original English. .. . +.\" -------------------------------------------------------------------- +.\" Macro Definitions +.\" -------------------------------------------------------------------- . .de TQ . br @@ -25,30 +36,22 @@ . TP \\$1 .. . -. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP . el .TP "\\$1" -. -. .. +. .\" The BSD man macros can't handle " in arguments to font change macros, .\" so use \(ts instead of ". -.tr \(ts" -. -. -.TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -. -.SH NAME -@g@refer \- preprocess bibliographic references for groff -. +.tr \(ts"\"" . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i @@ -76,10 +79,15 @@ .br .ad \na . +. +\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. This file documents the GNU version of .BR refer , which is part of the groff document formatting system. +. .B refer copies the contents of .IR filename \|.\|.\|.\& @@ -95,40 +103,52 @@ .B .R2 are interpreted as commands about how citations are to be processed. . +. .LP Each citation specifies a reference. +. The citation can specify a reference that is contained in a bibliographic database by giving a set of keywords that only that reference contains. +. Alternatively it can specify a reference by supplying a database record in the citation. +. A combination of these alternatives is also possible. . +. .LP For each citation, .B refer can produce a mark in the text. +. This mark consists of some label which can be separated from the text and from other labels in various ways. +. For each reference it also outputs .B groff commands that can be used by a macro package to produce a formatted reference for each citation. +. The output of .B refer must therefore be processed using a suitable macro package. +. The .B \-ms and .B \-me macros are both suitable. +. The commands to format a citation's reference can be output immediately after the citation, or the references may be accumulated, and the commands output at some later point. +. If the references are accumulated, then multiple citations of the same reference will produce a single formatted reference. . +. .LP The interpretation of lines between .B .R1 @@ -136,6 +156,7 @@ .B .R2 as commands is a new feature of GNU .BR refer . +. Documents making use of this feature can still be processed by Unix refer just by adding the lines . @@ -151,16 +172,21 @@ .RE . to the beginning of the document. +. This will cause .B troff to ignore everything between .B .R1 and .BR .R2 . +. The effect of some commands can also be achieved by options. +. These options are supported mainly for compatibility with Unix refer. +. It is usually more convenient to use commands. . +. .LP .B refer generates @@ -178,112 +204,133 @@ .BR @g@soelim (@MAN1EXT@). . . -. +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . -.LP It is possible to have whitespace between a command line option and its parameter. . +. .LP Most options are equivalent to commands (for a description of these commands see the .B Commands subsection): . +. .nr a \n(.j .ad l .TP .B \-b .B "no-label-in-text; no-label-in-reference" . +. .TP .B \-e .B accumulate . +. .TP .B \-n .B no-default-database . +. .TP .B \-C .B compatible . +. .TP .B \-P .B move-punctuation . +. .TP .B \-S .B label\ "(A.n|Q)\ ',\ '\ (D.y|D)"; \%bracket-label\ "\ ("\ )\ ";\ " . +. .TP .BI \-a n .B reverse .BI A n . +. .TP .BI \-c fields .B capitalize .I fields . +. .TP .BI \-f n .B label .BI % n . +. .TP .BI \-i fields .B search-ignore .I fields . +. .TP .B \-k .B label .B L\(ti%a . +. .TP .BI \-k field .B label .IB field \(ti%a . +. .TP .B \-l .B label .BI A.nD.y%a . +. .TP .BI \-l m .B label .BI A.n+ m D.y%a . +. .TP .BI \-l, n .B label .BI A.nD.y\- n %a . +. .TP .BI \-l m , n .B label .BI A.n+ m D.y\- n %a . +. .TP .BI \-p filename .B database .I filename . +. .TP .BI \-s spec .B sort .I spec . +. .TP .BI \-t n .B search-truncate .I n .ad \na . +. .LP These options are equivalent to the following commands with the addition that the filenames specified on the command line are @@ -291,10 +338,12 @@ .B bibliography command instead of in the normal way: . +. .TP .B \-B .B "annotate X AP; no-label-in-reference" . +. .TP .BI \-B field . macro .B annotate @@ -302,71 +351,93 @@ .IB macro ; .B no-label-in-reference . +. .LP The following options have no equivalent commands: . +. .TP .B \-v Print the version number. . +. .TP .B \-R Don't recognize lines beginning with .BR .R1 / .R2 . . . -. +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . -. +.\" -------------------------------------------------------------------- .SS Bibliographic databases +.\" -------------------------------------------------------------------- +. The bibliographic database is a text file consisting of records separated by one or more blank lines. +. Within each record fields start with a .B % at the beginning of a line. +. Each field has a one character name that immediately follows the .BR % . It is best to use only upper and lower case letters for the names of fields. +. The name of the field should be followed by exactly one space, and then by the contents of the field. +. Empty fields are ignored. +. The conventional meaning of each field is as follows: . +. .TP -.B A +.B %A The name of an author. +. If the name contains a title such as .B Jr.\& at the end, it should be separated from the last name by a comma. +. There can be multiple occurrences of the -.B A +.B %A field. +. The order is significant. +. It is a good idea always to supply an -.B A +.B %A field or a -.B Q +.B %Q field. . +. .TP -.B B +.B %B For an article that is part of a book, the title of the book. . +. .TP -.B C +.B %C The place (city) of publication. . +. .TP -.B D +.B %D The date of publication. +. The year should be specified in full. +. If the month is specified, the name rather than the number of the month should be used, but only the first three letters are required. +. It is a good idea always to supply a -.B D +.B %D field; if the date is unknown, a value such as .B in press @@ -374,93 +445,116 @@ .B unknown can be used. . +. .TP -.B E +.B %E For an article that is part of a book, the name of an editor of the book. +. Where the work has editors and no authors, the names of the editors should be given as -.B A +.B %A fields and .B ,\ (ed) or .B ,\ (eds) should be appended to the last author. . +. .TP -.B G +.B %G US Government ordering number. . +. .TP -.B I +.B %I The publisher (issuer). . +. .TP -.B J -For an article in a journal, the name of the journal. +.B %J +For an article in a journal, +the name of the journal. +. . .TP -.B K +.B %K Keywords to be used for searching. . +. .TP -.B L +.B %L Label. . +. .TP -.B N +.B %N Journal issue number. . +. .TP -.B O +.B %O Other information. +. This is usually printed at the end of the reference. . +. .TP -.B P +.B %P Page number. A range of pages can be specified as .IB m \- n\fR. . +. .TP -.B Q +.B %Q The name of the author, if the author is not a person. +. This will only be used if there are no -.B A +.B %A fields. +. There can only be one -.B Q +.B %Q field. . +. .TP -.B R +.B %R Technical report number. . +. .TP -.B S +.B %S Series name. . +. .TP -.B T +.B %T Title. +. For an article in a book or journal, this should be the title of the article. . +. .TP -.B V +.B %V Volume number of the journal or book. . +. .TP -.B X +.B %X Annotation. . +. .LP For all fields except -.B A +.B %A and -.BR E , +.BR %E , if there is more than one occurrence of a particular field in a record, only the last such field will be used. . +. .LP If accent strings are used, they should follow the character to be accented. This means that the @@ -468,13 +562,17 @@ macro must be used with the .B \-ms macros. +. Accent strings should not be quoted: use one .B \e rather than two. . . +.\" -------------------------------------------------------------------- .SS Citations +.\" -------------------------------------------------------------------- +. The format of a citation is . .RS @@ -487,6 +585,7 @@ .BI .] closing-text .RE . +. .LP The .IR opening-text , @@ -494,25 +593,30 @@ and .I flags components are optional. +. Only one of the .I keywords and .I fields components need be specified. . +. .LP The .I keywords component says to search the bibliographic databases for a reference that contains all the words in .IR keywords . +. It is an error if more than one reference if found. . +. .LP The .I fields components specifies additional fields to replace or supplement those specified in the reference. +. When references are being accumulated and the .I keywords component is non-empty, @@ -520,6 +624,7 @@ occasion that a particular reference is cited, and will apply to all citations of that reference. . +. .LP The .I opening-text @@ -529,6 +634,7 @@ of the strings specified in the .B bracket-label command. +. If either of these components is non-empty, the strings specified in the .B bracket-label @@ -540,16 +646,20 @@ flags. Note that leading and trailing spaces are significant for these components. . +. .LP The .I flags component is a list of non-alphanumeric characters each of which modifies the treatment of this particular citation. +. Unix refer will treat these flags as part of the keywords and so will ignore them since they are non-alphanumeric. +. The following flags are currently recognized: . +. .TP .B # This says to use the label specified by the @@ -558,13 +668,16 @@ instead of that specified by the .B label command. +. If no short label has been specified, the normal label will be used. +. Typically the short label is used with author-date labels and consists of only the date and possibly a disambiguating letter; the .B # is supposed to be suggestive of a numeric type of label. . +. .TP .B [ Precede @@ -573,6 +686,7 @@ .B bracket-label command. . +. .TP .B ] Follow @@ -581,6 +695,7 @@ .B bracket-label command. . +. .LP One advantages of using the .B [ @@ -594,25 +709,33 @@ you can change the style of bracket used in the document just by changing the .B bracket-label command. +. Another advantage is that sorting and merging of citations will not necessarily be inhibited if the flags are used. . +. .LP If a label is to be inserted into the text, it will be attached to the line preceding the .B .[ line. +. If there is no such line, then an extra line will be inserted before the .B .[ line and a warning will be given. . +. .LP There is no special notation for making a citation to multiple references. Just use a sequence of citations, one for each reference. +. Don't put anything between the citations. +. The labels for all the citations will be attached to the line preceding the first citation. +. The labels may also be sorted or merged. +. See the description of the .B <> label expression, and of the @@ -624,7 +747,9 @@ .I opening-text or .IR closing-text . -However, the labels for a citation using the +. +However, +the labels for a citation using the .B ] flag and without any .I closing-text @@ -638,22 +763,29 @@ or the second citation's .I closing-text is non-empty. +. (If you wish to prevent this just make the first citation's .I closing-text .BR \e& .) . . +.\" -------------------------------------------------------------------- .SS Commands +.\" -------------------------------------------------------------------- +. Commands are contained between lines starting with .B .R1 and .BR .R2 . +. Recognition of these lines can be prevented by the .B \-R option. +. When a .B .R1 line is recognized any accumulated references are flushed out. +. Neither .B .R1 nor @@ -662,40 +794,49 @@ nor anything between them is output. . +. .LP Commands are separated by newlines or .BR ; s. .B # introduces a comment that extends to the end of the line (but does not conceal the newline). +. Each command is broken up into words. +. Words are separated by spaces or tabs. +. A word that begins with .B \(ts extends to the next .B \(ts that is not followed by another .BR \(ts . +. If there is no such .B \(ts the word extends to the end of the line. +. Pairs of .B \(ts in a word beginning with .B \(ts collapse to a single .BR \(ts . +. Neither .B # nor .B ; are recognized inside .BR \(ts s. +. A line can be continued by ending it with .BR \e ; this works everywhere except after a .BR # . . +. .LP .ds n \fR* Each command @@ -704,11 +845,14 @@ .BI no- name that undoes the effect of .IR name . +. For example, the .B no-sort command specifies that references should not be sorted. +. The negative commands take no arguments. . +. .LP In the following description each argument must be a single word; .I field @@ -724,10 +868,12 @@ .I filename is used for the name of a file. . +. .Tp \w'\fBabbreviate-label-ranges'u+2n .BI abbreviate\*n\ fields\ string1\ string2\ string3\ string4 Abbreviate the first names of .IR fields . +. An initial letter will be separated from another initial letter by .IR string1 , from the last name by @@ -739,33 +885,43 @@ .BR de ) by .IR string3 . +. These default to a period followed by a space. +. In a hyphenated first name, -the initial of the first part of the name will be separated from the hyphen by +the initial of the first part of the name will be separated from the +hyphen by .IR string4 ; this defaults to a period. +. No attempt is made to handle any ambiguities that might result from abbreviation. -Names are abbreviated before sorting and before -label construction. +. +Names are abbreviated before sorting and before label construction. +. . .TP .BI abbreviate-label-ranges\*n\ string +. Three or more adjacent labels that refer to consecutive references -will be abbreviated to a label consisting -of the first label, followed by +will be abbreviated to a label consisting of the first label, +followed by .I string followed by the last label. +. This is mainly useful with numeric labels. +. If .I string is omitted it defaults to .BR \- . . +. .TP .B accumulate\*n Accumulate references instead of writing out each reference as it is encountered. +. Accumulated references will be written out whenever a reference of the form . @@ -777,6 +933,7 @@ .br .B .] . +. .LP is encountered, after all input files have been processed, @@ -785,6 +942,7 @@ line is recognized. .RE . +. .TP .BI annotate\*n\ field\ string .I field @@ -795,6 +953,7 @@ .IP .BI . string . +. .LP If .I string @@ -804,15 +963,18 @@ .I field is also omitted it will default to .BR X . +. Only one field can be an annotation. .RE . +. .TP .BI articles\ string \fR\|.\|.\|. .IR string \|.\|.\|.\& are definite or indefinite articles, and should be ignored at the beginning of .B T fields when sorting. +. Initially, .BR the , .B a @@ -820,14 +982,18 @@ .B an are recognized as articles. . +. .TP .BI bibliography\ filename \fR\|.\|.\|. +. Write out all the references contained in the bibliographic databases .IR filename \|.\|.\|. +. This command should come last in a .BR .R1 / .R2 block. . +. .TP .BI bracket-label\ string1\ string2\ string3 In the text, bracket each label @@ -835,12 +1001,14 @@ .I string1 and .IR string2 . +. An occurrence of .I string2 immediately followed by .I string1 will be turned into .IR string3 . +. The default behaviour is . .RS @@ -849,12 +1017,14 @@ bracket-label \e*([. \e*(.] ", " .RE . +. .TP .BI capitalize\ fields Convert .I fields to caps and small caps. . +. .TP .B compatible\*n Recognize @@ -863,10 +1033,12 @@ .B .R2 even when followed by a character other than space or newline. . +. .TP .BI database\ filename \fR\|.\|.\|. Search the bibliographic databases .IR filename \|.\|.\|. +. For each .I filename if an index @@ -876,20 +1048,26 @@ exists, then it will be searched instead; each index can cover multiple databases. . +. .TP .BI date-as-label\*n\ string .I string is a label expression that specifies a string with which to replace the .B D field after constructing the label. +. See the .B "Label expressions" subsection for a description of label expressions. +. This command is useful if you do not want explicit labels in the -reference list, but instead want to handle any necessary -disambiguation by qualifying the date in some way. +reference list, +but instead want to handle any necessary disambiguation by qualifying +the date in some way. +. The label used in the text would typically be some combination of the author and date. +. In most cases you should also use the .B no-label-in-reference command. @@ -899,25 +1077,31 @@ .IP .B "date-as-label D.+yD.y%a*D.-y" . +. .LP would attach a disambiguating letter to the year part of the .B D field in the reference. .RE . +. .TP .B default-database\*n The default database should be searched. -This is the default behaviour, so the negative version of -this command is more useful. +. +This is the default behaviour, +so the negative version of this command is more useful. +. .B refer determines whether the default database should be searched on the first occasion that it needs to do a search. +. Thus a .B no-default-database command must be given before then, in order to be effective. . +. .TP .BI discard\*n\ fields When the reference is read, @@ -926,11 +1110,13 @@ no string definitions for .I fields will be output. +. Initially, .I fields are .BR XYZ . . +. .TP .BI et-al\*n\ string\ m\ n Control use of @@ -938,6 +1124,7 @@ in the evaluation of .B @ expressions in label expressions. +. If the number of authors needed to make the author sequence unambiguous is .I u @@ -955,6 +1142,7 @@ .I t is not less than .IR n . +. The default behaviour is . .RS @@ -963,22 +1151,27 @@ et-al " et al" 2 3 .RE . +. .TP .BI include\ filename Include .I filename and interpret the contents as commands. . +. .TP .BI join-authors\ string1\ string2\ string3 This says how authors should be joined together. +. When there are exactly two authors, they will be joined with .IR string1 . -When there are more than two authors, all but the last two will -be joined with +. +When there are more than two authors, +all but the last two will be joined with .IR string2 , and the last two authors will be joined with .IR string3 . +. If .I string3 is omitted, @@ -988,6 +1181,7 @@ .I string2 is also omitted it will also default to .IR string1 . +. For example, . .RS @@ -995,150 +1189,191 @@ .B join-authors " and " ", " ", and " . +. .LP will restore the default method for joining authors. .RE . +. .TP .B label-in-reference\*n When outputting the reference, define the string .B [F to be the reference's label. +. This is the default behaviour; so the negative version of this command is more useful. . +. .TP .B label-in-text\*n For each reference output a label in the text. +. The label will be separated from the surrounding text as described in the .B bracket-label command. +. This is the default behaviour; so the negative version of this command is more useful. . +. .TP .BI label\ string .I string is a label expression describing how to label each reference. . +. .TP .BI separate-label-second-parts\ string When merging two-part labels, separate the second part of the second label from the first label with .IR string . +. See the description of the .B <> label expression. . +. .TP .B move-punctuation\*n -In the text, move any punctuation at the end of line past the label. +In the text, +move any punctuation at the end of line past the label. +. It is usually a good idea to give this command unless you are using superscripted numbers as labels. . +. .TP .BI reverse\*n\ string Reverse the fields whose names are in .IR string . +. Each field name can be followed by a number which says how many such fields should be reversed. +. If no number is given for a field, all such fields will be reversed. . +. .TP .BI search-ignore\*n\ fields While searching for keys in databases for which no index exists, ignore the contents of .IR fields . +. Initially, fields .B XYZ are ignored. . +. .TP .BI search-truncate\*n\ n Only require the first .I n characters of keys to be given. -In effect when searching for a given key -words in the database are truncated to the maximum of +. +In effect when searching for a given key words in the database are +truncated to the maximum of .I n and the length of the key. +. Initially .I n is\ 6. . +. .TP .BI short-label\*n\ string .I string is a label expression that specifies an alternative (usually shorter) style of label. +. This is used when the .B # flag is given in the citation. +. When using author-date style labels, the identity of the author or authors is sometimes clear from the context, and so it may be desirable to omit the author or authors from the label. +. The .B short-label command will typically be used to specify a label containing just a date and possibly a disambiguating letter. . +. .TP .BI sort\*n\ string Sort references according to .BR string . +. References will automatically be accumulated. +. .I string -should be a list of field names, each followed by a number, +should be a list of field names, +each followed by a number, indicating how many fields with the name should be used for sorting. +. .B + can be used to indicate that all the fields with the name should be used. +. Also .B .\& can be used to indicate the references should be sorted using the (tentative) label. +. (The .B "Label expressions" subsection describes the concept of a tentative label.) . +. .TP .B sort-adjacent-labels\*n -Sort labels that are adjacent in the text according to their -position in the reference list. +Sort labels that are adjacent in the text according to their position +in the reference list. +. This command should usually be given if the .B abbreviate-label-ranges command has been given, or if the label expression contains a .B <> expression. +. This will have no effect unless references are being accumulated. . . +.\" -------------------------------------------------------------------- .SS Label expressions +.\" -------------------------------------------------------------------- . -.LP Label expressions can be evaluated both normally and tentatively. +. The result of normal evaluation is used for output. +. The result of tentative evaluation, called the .IR "tentative label" , -is used to gather the information -that normal evaluation needs to disambiguate the label. +is used to gather the information that normal evaluation needs to +disambiguate the label. +. Label expressions specified by the .B date-as-label and .B short-label commands are not evaluated tentatively. -Normal and tentative evaluation are the same for all types -of expression other than +. +Normal and tentative evaluation are the same for all types of +expression other than .BR @ , .BR * , and .B % expressions. +. The description below applies to normal evaluation, except where otherwise specified. . +. .TP .I field .TQ @@ -1147,58 +1382,68 @@ .IR n -th part of .IR field . +. If .I n is omitted, it defaults to\ 1. . +. .TP .BI ' string ' The characters in .I string literally. . +. .TP .B @ All the authors joined as specified by the .B join-authors command. +. The whole of each author's name will be used. -However, if the references are sorted by author -(that is the sort specification starts with +. +However, if the references are sorted by author (that is the sort +specification starts with .BR A+ ), -then authors' last names will be used instead, provided that this does -not introduce ambiguity, -and also an initial subsequence of the authors may be used -instead of all the authors, again provided that this does not -introduce ambiguity. +then authors last names will be used instead, +provided that this does not introduce ambiguity, +and also an initial subsequence of the authors may be used instead of +all the authors, +again provided that this does not introduce ambiguity. +. The use of only the last name for the .IR i -th author of some reference is considered to be ambiguous if there is some other reference, such that the first -.IR i \|-\|1 +.IR i \|\-\|1 authors of the references are the same, the .IR i -th authors are not the same, but the .IR i -th -authors' last names are the same. -A proper initial subsequence of the sequence -of authors for some reference is considered to be ambiguous if there is -a reference with some other sequence of authors which also has -that subsequence as a proper initial subsequence. -When an initial subsequence of authors is used, the remaining -authors are replaced by the string specified by the +authors last names are the same. +. +A proper initial subsequence of the sequence of authors for some +reference is considered to be ambiguous if there is a reference with +some other sequence of authors which also has that subsequence as a +proper initial subsequence. +. +When an initial subsequence of authors is used, the remaining authors +are replaced by the string specified by the .B et-al command; this command may also specify additional requirements that must be met before an initial subsequence can be used. +. .B @ tentatively evaluates to a canonical representation of the authors, -such that authors that compare equally for sorting purpose -will have the same representation. +such that authors that compare equally for sorting purpose will have +the same representation. +. . .TP .BI % n @@ -1210,21 +1455,25 @@ .B %i .TQ .B %I -The serial number of the reference formatted according to the character -following the +The serial number of the reference formatted according to the +character following the .BR % . -The serial number of a reference is\ 1 plus the number of earlier references -with same tentative label as this reference. +The serial number of a reference is\ 1 plus the number of earlier +references with same tentative label as this reference. +. These expressions tentatively evaluate to an empty string. . .TP .IB expr * -If there is another reference with the same tentative label as -this reference, then +If there is another reference with the same tentative label as this +reference, +then .IR expr , otherwise an empty string. +. It tentatively evaluates to an empty string. . +. .TP .IB expr + n .TQ @@ -1236,69 +1485,85 @@ .I n upper or lower case letters or digits of .IR expr . +. Troff special characters (such as .BR \e('a ) count as a single letter. +. Accent strings are retained but do not count towards the total. . +. .TP .IB expr .l .I expr converted to lowercase. . +. .TP .IB expr .u .I expr converted to uppercase. . +. .TP .IB expr .c .I expr converted to caps and small caps. . +. .TP .IB expr .r .I expr reversed so that the last name is first. . +. .TP .IB expr .a .I expr with first names abbreviated. +. Note that fields specified in the .B abbreviate command are abbreviated before any labels are evaluated. +. Thus .B .a is useful only when you want a field to be abbreviated in a label but not in a reference. . +. .TP .IB expr .y The year part of .IR expr . . +. .TP .IB expr .+y The part of .I expr -before the year, or the whole of +before the year, +or the whole of .I expr if it does not contain a year. . +. .TP .IB expr .\-y The part of .I expr -after the year, or an empty string if +after the year, +or an empty string if .I expr does not contain a year. . +. .TP .IB expr .n The last name part of .IR expr . . +. .TP .IB expr1 \(ti expr2 .I expr1 @@ -1309,6 +1574,7 @@ then it will be replaced by .IR expr2 . . +. .TP .I expr1\ expr2 The concatenation of @@ -1316,6 +1582,7 @@ and .IR expr2 . . +. .TP .IB expr1 | expr2 If @@ -1325,6 +1592,7 @@ otherwise .IR expr2 . . +. .TP .IB expr1 & expr2 If @@ -1334,6 +1602,7 @@ .I expr2 otherwise an empty string. . +. .TP .IB expr1 ? expr2 : expr3 If @@ -1344,28 +1613,36 @@ otherwise .IR expr3 . . +. .TP .BI < expr > The label is in two parts, which are separated by .IR expr . +. Two adjacent two-part labels which have the same first part will be merged by appending the second part of the second label onto the first label separated by the string specified in the .B separate-label-second-parts -command (initially, a comma followed by a space); the resulting label -will also be a two-part label with the same first part as before -merging, and so additional labels can be merged into it. +command (initially, +a comma followed by a space); +the resulting label will also be a two-part label with the same first +part as before merging, +and so additional labels can be merged into it. +. Note that it is permissible for the first part to be empty; this maybe desirable for expressions used in the .B short-label command. . +. .TP .BI ( expr ) The same as .IR expr . +. Used for grouping. . +. .LP The above expressions are listed in order of precedence (highest first); @@ -1375,26 +1652,33 @@ have the same precedence. . . +.\" -------------------------------------------------------------------- .SS Macro interface +.\" -------------------------------------------------------------------- +. Each reference starts with a call to the macro .BR ]- . +. The string .B [F will be defined to be the label for this reference, unless the .B no-label-in-reference command has been given. +. There then follows a series of string definitions, one for each field: string .BI [ X corresponds to field .IR X . +. The number register .B [P is set to\ 1 if the .B P field contains a range of pages. +. The .BR [T , .B [A @@ -1407,16 +1691,20 @@ .B O fields end with one of the characters .BR .?! . +. The .B [E number register will be set to\ 1 if the .B [E string contains more than one name. +. The reference is followed by a call to the .B ][ macro. +. The first argument to this macro gives a number representing the type of the reference. +. If a reference contains a .B J field, it will be classified as type\ 1, @@ -1432,6 +1720,7 @@ .B I field it will be type\ 2, otherwise it will be type\ 0. +. The second argument is a symbolic name for the type: .BR other , .BR journal-article , @@ -1439,8 +1728,8 @@ .B article-in-book or .BR tech-report . -Groups of references that have been accumulated -or are produced by the +. +Groups of references that have been accumulated or are produced by the .B bibliography command are preceded by a call to the .B ]< @@ -1449,48 +1738,65 @@ macro. . . -. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .Tp \w'\fB@DEFAULT_INDEX@'u+2n .B @DEFAULT_INDEX@ Default database. . +. .TP .IB file @INDEX_SUFFIX@ Index files. . +. .LP .B refer uses temporary files. +. See the .BR groff (@MAN1EXT@) man page for details where such files are created. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- . .Tp \w'\fBREFER'u+2n .B REFER If set, overrides the default database. . . -. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR @g@indxbib (@MAN1EXT@), .BR @g@lookbib (@MAN1EXT@), .BR lkbib (@MAN1EXT@) .br . . -. +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. In label expressions, .B <> expressions are ignored inside .BI . char expressions. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/refer/ref.h groff-1.22.3/src/preproc/refer/ref.h --- groff-1.22.2/src/preproc/refer/ref.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/ref.h 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/token.cpp groff-1.22.3/src/preproc/refer/token.cpp --- groff-1.22.2/src/preproc/refer/token.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/token.cpp 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/refer/token.h groff-1.22.3/src/preproc/refer/token.h --- groff-1.22.2/src/preproc/refer/token.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/refer/token.h 2014-11-04 09:38:35.245523747 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/soelim/Makefile.sub groff-1.22.3/src/preproc/soelim/Makefile.sub --- groff-1.22.2/src/preproc/soelim/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/soelim/Makefile.sub 2014-11-04 09:38:35.250523684 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc soelim' +# +# File position: /src/preproc/soelim/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=soelim$(EXEEXT) MAN1=soelim.n XLIBS=$(LIBGROFF) @@ -5,3 +29,11 @@ OBJS=soelim.$(OBJEXT) CCSRCS=$(srcdir)/soelim.cpp NAMEPREFIX=$(g) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/soelim/soelim.cpp groff-1.22.3/src/preproc/soelim/soelim.cpp --- groff-1.22.2/src/preproc/soelim/soelim.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/soelim/soelim.cpp 2014-11-04 09:38:35.250523684 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/soelim/soelim.man groff-1.22.3/src/preproc/soelim/soelim.man --- groff-1.22.2/src/preproc/soelim/soelim.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/soelim/soelim.man 2014-11-04 09:38:35.250523684 +0100 @@ -1,7 +1,13 @@ '\" p -.ig -Copyright (C) 1989-2000, 2001, 2003, 2004, 2006, 2008, 2009 -Free Software Foundation, Inc. +.mso pic.tmac +.TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@soelim \- interpret .so requests in groff input +. +. +.\" license (copying) +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -19,17 +25,9 @@ the original English. .. . -.mso pic.tmac -. -.TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -. -@g@soelim \- interpret .so requests in groff input -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY @g@soelim .OP \-Crtv @@ -38,13 +36,16 @@ .IR \|.\|.\|. ] .YS . +. .PP It is possible to have whitespace between the .B \-I command line option and its parameter. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . .B @g@soelim reads @@ -55,9 +56,11 @@ .LP by the contents of .IR file . +. It is useful if files included with .B .so need to be preprocessed. +. Normally, .B @g@soelim should be invoked with the @@ -65,18 +68,24 @@ option of .BR groff . . +. .PP -To embed `\[rs]' in the file name, write `\[rs]\[rs]' or `\[rs]e'. -To embed a space, write `\[rs]\ '. +To embed \[oq]\[rs]\[cq] in the file name, write \[oq]\[rs]\[rs]\[cq] +or \[oq]\[rs]e\[cq]. +. +To embed a space, write \[oq]\[rs]\ \[cq]. +. Any other escape sequence in .I file makes .B soelim ignore the whole line. . +. .PP Note that there must be no whitespace between the leading dot and the two -characters `s' and `o'. +characters \[oq]s\[cq] and \[oq]o\[cq]. +. Otherwise, only .B groff interprets the @@ -86,7 +95,9 @@ ignores it). . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . .TP .B \-C @@ -96,17 +107,21 @@ . .TP .BI \-I dir -This option may be used to add a directory to the search path for files -(both those on the command line and those named in +This option may be used to add a directory to the search path for +files (both those on the command line and those named in .B .so requests). +. The search path is initialized with the current directory. +. This option may be specified more than once; the directories are then searched in the order specified (but before the current directory). -If you want to make the current directory be read before other directories, -add +. +If you want to make the current directory be read before other +directories, add .B \-I.\& at the appropriate place. +. .IP No directory search is performed for files with an absolute file name. . @@ -118,20 +133,23 @@ . .TP .B \-t -Don't emit +Don\[aq]t emit .B .lf -requests but TeX comment lines (starting with `%') giving the current file -and line number. +requests but TeX comment lines (starting with \[oq]%\[cq]) giving the +current file and line number. . .TP .B \-v Print the version number. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . The normal processing sequence of groff is this: . +. .PP .ie t \{\ .PS @@ -185,6 +203,7 @@ by .B troff (the actual formatter). +. .B soelim is .I not @@ -192,10 +211,12 @@ .B troff to source files. . +. .PP If a file to be sourced should also be preprocessed, it must already be read .I before the input file passes through the preprocessor. +. This is handled by .BR soelim : . @@ -242,10 +263,18 @@ .\} . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -. +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/preproc/tbl/main.cpp groff-1.22.3/src/preproc/tbl/main.cpp --- groff-1.22.2/src/preproc/tbl/main.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/tbl/main.cpp 2014-11-04 09:38:35.220524059 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/tbl/Makefile.sub groff-1.22.3/src/preproc/tbl/Makefile.sub --- groff-1.22.2/src/preproc/tbl/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/tbl/Makefile.sub 2014-11-04 09:38:35.220524059 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `preproc tbl' +# +# File position: /src/preproc/tbl/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=tbl$(EXEEXT) MAN1=tbl.n XLIBS=$(LIBGROFF) @@ -11,3 +35,11 @@ HDRS=\ $(srcdir)/table.h NAMEPREFIX=$(g) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/preproc/tbl/table.cpp groff-1.22.3/src/preproc/tbl/table.cpp --- groff-1.22.2/src/preproc/tbl/table.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/tbl/table.cpp 2014-11-04 09:38:35.221524047 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2003, 2004, 2007-2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/tbl/table.h groff-1.22.3/src/preproc/tbl/table.h --- groff-1.22.2/src/preproc/tbl/table.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/tbl/table.h 2014-11-04 09:38:35.221524047 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2007, - 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/preproc/tbl/tbl.man groff-1.22.3/src/preproc/tbl/tbl.man --- groff-1.22.2/src/preproc/tbl/tbl.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/preproc/tbl/tbl.man 2014-11-04 09:38:35.221524047 +0100 @@ -1,7 +1,14 @@ '\" t -.ig -Copyright (C) 1989-1995, 2001-2004, 2006-2013 - Free Software Foundation, Inc. +.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@tbl \- format tables for troff +. +. +.\" license +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. + +Bernd Warken added simple examples. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -19,48 +26,54 @@ the original English. .. . -. -.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -@g@tbl \- format tables for troff -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .SY @g@tbl .OP \-Cv .RI [ files\~ .\|.\|.] .YS . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. This manual page describes the GNU version of .BR tbl , which is part of the groff document formatting system. +. .B tbl compiles descriptions of tables embedded within .B troff input files into commands that are understood by .BR troff . +. Normally, it should be invoked using the .B \-t option of .B groff. +. It is highly compatible with Unix .BR tbl . +. The output generated by GNU .B tbl cannot be processed with Unix .BR troff ; it must be processed with GNU .BR troff . +. If no files are given on the command line or a filename of .B \- is given, the standard input is read. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .B \-C Enable compatibility mode to @@ -69,6 +82,7 @@ and .B .TE even when followed by a character other than space or newline. +. Leader characters (\[rs]a) are handled as interpreted. . .TP @@ -76,7 +90,10 @@ Print the version number. . . -.SH USAGE +.\" -------------------------------------------------------------------- +.SH "LANGUAGE OVERVIEW" +.\" -------------------------------------------------------------------- +. .B tbl expects to find table descriptions wrapped in the .B .TS @@ -84,13 +101,166 @@ .B .TE (table end) macros. . +Within each such table sections, another table can be defined by +using the request +.B .T& +before the final command +.BR .TE . +. +Each table definition has the following structure: +. +.TP +.I Global options +This is optional. +. +This table part can use several of these options distributed in 1 or +more lines. +. +The +.I global option part +must always be finished by a +.B "semi-colon ;" . +. +.TP +.I Table format specification +. +This part must be given, it is not optional. +. +It determines the number of columns (cells) of the table. +. +Moreover each cell is classified by being central, left adjusted, or +numerical, etc. +. +This specification can have several lines, but must be finished by a +.B dot . +at the end of the last line. . +After each cell definition, +.I column specifiers +can be appended, but that\[aq]s optional. +. +. +.P +Cells are separated by a tab character by default. +. +That can be changed by the +.I global option +.BI tbl( c ) \fR, +where +.I c +is an arbitrary character. +. +. +.\" -------------------------------------------------------------------- +.SH "SIMPLE EXAMPLES" +.\" -------------------------------------------------------------------- +. +The easiest table definition is. +.RS +.EX +\&.TS +c c c . +This is centered +Well, this also +\&.TE +.EE +.RE +. +. +By using +.B c c +.BR c , +each cell in the whole table will be centered. +. +The separating character is here the default +.IR tab . +. +. +.P +The result is +.RS +.EX +.TS +c c c . +This is centered +Well, this also +.TE +.EE +.RE +. +. +.P +This definition is identical to +.RS +.EX +\&.TS +tab(@); +ccc. +This@is@centered +Well,@this@also +\&.TE +.EE +.RE +. +Here, the separating tab character is changed to the letter +.BR @ . +. +. +.P +Moreover a title can be added and the centering directions can be +changed to many other formats: +.RS +.EX +\&.TS +tab(@); +c s s +l c n . +Title +left@centers@123 +another@number@75 +\&.TE +.EE +.RE +. +The result is +.RS +.EX +.TS +tab(@); +c s s +l c n . +Title +left@centers@123 +another@number@75 +.TE +.EE +.RE +. +Here +.B l +means +.IR left\-justified , +and +.B n +means +.IR numerical , +which is here +.IR right\-justified . +. +. +.\" -------------------------------------------------------------------- +.SH USAGE +. +.\" -------------------------------------------------------------------- .SS Global options +.\" -------------------------------------------------------------------- +. The line immediately following the .B .TS -macro may contain any of the following global options (ignoring the case of -characters \[en] Unix tbl only accepts options with all characters lowercase -or all characters uppercase), separated by spaces, tabs, or commas: +macro may contain any of the following global options (ignoring the +case of characters \[en] Unix tbl only accepts options with all +characters lowercase or all characters uppercase), separated by +spaces, tabs, or commas: . .TP .B allbox @@ -103,6 +273,7 @@ .TP .B center Center the table (default is left-justified). +. The alternative keyword name .B centre is also recognized (this is a GNU tbl extension). @@ -133,7 +304,9 @@ .B expand Make the table as wide as the current line length (providing a column separation factor). -Ignored if one or more `x' column specifiers are used (see below). +. +Ignored if one or more \[oq]x\[cq] column specifiers are used (see +below). . .IP In case the sum of the column widths is larger than the current line length, @@ -146,7 +319,7 @@ . .TP .BI linesize( n ) -Set lines or rules (e.g. from +Set lines or rules (e.g.\& from .BR box ) in .IR n -point @@ -154,11 +327,13 @@ . .TP .B nokeep -Don't use diversions to prevent page breaks (GNU tbl only). +Don\[aq]t use diversions to prevent page breaks (GNU tbl only). +. Normally .B tbl attempts to prevent undesirable breaks in boxed tables by using diversions. -This can sometimes interact badly with macro packages' own use of +. +This can sometimes interact badly with macro packages own use of diversions, when footnotes, for example, are used. . .TP @@ -167,8 +342,8 @@ . .TP .B nowarn -Turn off warnings related to tables -exceeding the current line width (GNU tbl only). +Turn off warnings related to tables exceeding the current line width +(GNU tbl only). . .TP .BI tab( x ) @@ -176,48 +351,64 @@ .I x instead of a tab to separate items in a line of input data. . +. .LP The global options must end with a semicolon. -There might be whitespace between an option and its argument in parentheses. . +There might be whitespace between an option and its argument in +parentheses. . +. +.\" -------------------------------------------------------------------- .SS Table format specification +.\" -------------------------------------------------------------------- +. After global options come lines describing the format of each line of the table. -Each such format line describes one line of the table itself, except that -the last format line (which you must end with a period) describes all -remaining lines of the table. +. +Each such format line describes one line of the table itself, except +that the last format line (which you must end with a period) describes +all remaining lines of the table. +. A single-key character describes each column of each line of the table. Key characters can be separated by spaces or tabs. -You may run format specifications for multiple lines together on the same -line by separating them with commas. +. +You may run format specifications for multiple lines together on the +same line by separating them with commas. +. . .LP -You may follow each key character with specifiers that determine the font -and point size of the corresponding item, that determine column width, -inter-column spacing, etc. +You may follow each key character with specifiers that determine the +font and point size of the corresponding item, that determine column +width, inter-column spacing, etc. +. . .LP -The longest format line defines the number of columns in the table; missing -format descriptors at the end of format lines are assumed to be\~\c +The longest format line defines the number of columns in the table; +missing format descriptors at the end of format lines are assumed to +be\~\c .BR L . -Extra columns in the data (which have no corresponding format entry) are -ignored. +. +Extra columns in the data (which have no corresponding format entry) +are ignored. +. . .LP The available key characters are: . .TP .BR a , A -Center longest line in this column and then left-justifies all other lines -in this column with respect to that centered line. -The idea is to use such alphabetic subcolumns (hence the name of the key -character) in combination with\~ +Center longest line in this column and then left-justifies all other +lines in this column with respect to that centered line. +. +The idea is to use such alphabetic subcolumns (hence the name of the +key character) in combination with\~ .BR L ; they are called subcolumns because .BR A \~items are indented by\~1n relative to .BR L \~entries. +. Example: .RS .IP @@ -268,13 +459,17 @@ .BR n , N Numerically justify item in the column: Units positions of numbers are aligned vertically. +. If there is one or more dots adjacent to a digit, use the rightmost one for vertical alignment. +. If there is no dot, use the rightmost digit for vertical alignment; otherwise, center the item within the column. -Alignment can be forced to a certain position using `\[rs]&'; if there is -one or more instances of this special (non-printing) character present -within the data, use the leftmost one for alignment. +. +Alignment can be forced to a certain position using \[oq]\[rs]&\[cq]; +if there is one or more instances of this special (non-printing) +character present within the data, use the leftmost one for alignment. +. Example: .RS .IP @@ -312,7 +507,7 @@ .BR R \~entries \[en] this can happen if the table format is changed with .B .T& -\%\[en], +\%\[en] center the widest .I number (of the data entered under the @@ -322,6 +517,7 @@ or .BR R \~entry, preserving the alignment of all numerical entries. +. Contrary to .BR A \~type entries, there is no extra indentation. @@ -332,8 +528,9 @@ within columns which use the .BR N \~specifier is problematic in most cases due to -.BR tbl 's +.BR tbl \[aq]s algorithm for finding the vertical alignment, as described above. +. Using the global .B delim option, however, it is possible to make @@ -350,24 +547,28 @@ .TP .BR s , S Span previous item on the left into this column. +. Not allowed for the first column. . .TP .B ^ Span down entry from previous row in this column. +. Not allowed for the first row. . .TP .BR _ , - Replace this entry with a horizontal line. -Note that `_' and `-' can be used for table fields only, +. +Note that \[oq]_\[cq] and \[oq]-\[cq] can be used for table fields only, not for column separator lines. . .TP .B = . Replace this entry with a double horizontal line. -Note that `=' can be used for table fields only, +. +Note that \[oq]=\[cq] can be used for table fields only, not for column separator lines. . .TP @@ -375,23 +576,29 @@ The corresponding column becomes a vertical rule (if two of these are adjacent, a double vertical rule). . +. .LP -A vertical bar to the left of the first key letter or to the right of the -last one produces a line at the edge of the table. +A vertical bar to the left of the first key letter or to the right of +the last one produces a line at the edge of the table. +. . .LP To change the data format within a table, use the .B .T& command (at the start of a line). -It is followed by format and data lines (but no global options) similar to -the +. +It is followed by format and data lines (but no global options) +similar to the .B .TS request. . . +.\" -------------------------------------------------------------------- .SS Column specifiers -Here are the specifiers that can appear in suffixes to column key letters -(in any order): +.\" -------------------------------------------------------------------- +. +Here are the specifiers that can appear in suffixes to column key +letters (in any order): . .TP .BR b , B @@ -402,9 +609,10 @@ .TP .BR d , D Start an item that vertically spans rows, -using the `^' column specifier or `\[rs]^' data item, +using the \[oq]^\[cq] column specifier or \[oq]\[rs]^\[cq] data item, at the bottom of its range rather than vertically centering it (GNU tbl only). +. Example: .RS .IP @@ -462,6 +670,7 @@ .TP .BR e , E Make equally-spaced columns. +. All columns marked with this specifier get the same width; this happens after the affected column widths have been computed (this means that the largest width value rules). @@ -471,6 +680,7 @@ Either of these specifiers may be followed by a font name (either one or two characters long), font number (a single digit), or long name in parentheses (the last form is a GNU tbl extension). +. A one-letter font name must be separated by one or more blanks from whatever follows. . @@ -483,20 +693,27 @@ .TP .BR m , M This is a GNU tbl extension. -Either of these specifiers may be followed by a macro name +. +Either of these specifiers may be followed by a macro name (either one or two characters long), or long name in parentheses. -A one-letter macro name must be separated by one or more blanks -from whatever follows. -The macro which name can be specified here -must be defined before creating the table. -It is called just before the table's cell text is output. -As implemented currently, this macro is only called if block input is used, -that is, text between `T{' and `T}'. +. +A one-letter macro name must be separated by one or more blanks from +whatever follows. +. +The macro which name can be specified here must be defined before +creating the table. +. +It is called just before the table\[aq]s cell text is output. +. +As implemented currently, this macro is only called if block input is +used, that is, text between \[oq]T{\[cq] and \[oq]T}\[cq]. +. The macro should contain only simple .B troff requests to change the text block formatting, like text adjustment, hyphenation, size, or font. +. The macro is called .I after other cell modifications like @@ -505,13 +722,16 @@ or .B v are output. +. Thus the macro can overwrite other modification specifiers. . .TP .BR p , P Followed by a number, this does a point size change for the affected fields. -If signed, the current point size is incremented or decremented (using a -signed number instead of a signed digit is a GNU tbl extension). +. +If signed, the current point size is incremented or decremented (using +a signed number instead of a signed digit is a GNU tbl extension). +. A point size specifier followed by a column separation number must be separated by one or more blanks. . @@ -526,13 +746,17 @@ . .TP .BR v , V -Followed by a number, this indicates the vertical line spacing to be used in -a multi-line table entry. -If signed, the current vertical line spacing is incremented or decremented -(using a signed number instead of a signed digit is a GNU tbl extension). -A vertical line spacing specifier followed by a column separation number -must be separated by one or more blanks. -No effect if the corresponding table entry isn't a text block. +Followed by a number, this indicates the vertical line spacing to be +used in a multi-line table entry. +. +If signed, the current vertical line spacing is incremented or +decremented (using a signed number instead of a signed digit is a GNU +tbl extension). +. +A vertical line spacing specifier followed by a column separation +number must be separated by one or more blanks. +. +No effect if the corresponding table entry isn\[aq]t a text block. . .TP .BR w , W @@ -540,35 +764,44 @@ Must be followed either by a .BR @g@troff (@MAN1EXT@) width expression in parentheses or a unitless integer. +. If no unit is given, en units are used. +. Also used as the default line length for included text blocks. +. If used multiple times to specify the width for a particular column, the last entry takes effect. . .TP .BR x , X An expanded column. +. After computing all column widths without an .BR x \~specifier, use the remaining line width for this column. +. If there is more than one expanded column, distribute the remaining horizontal space evenly among the affected columns (this is a GNU extension). +. This feature has the same effect as specifying a minimum column width. . .TP .BR z , Z -Ignore the corresponding column for width-calculation purposes, this is, -don't use the fields but only the specifiers of this column to compute -its width. +Ignore the corresponding column for width-calculation purposes, this +is, don\[aq]t use the fields but only the specifiers of this column to +compute its width. +. . .LP A number suffix on a key character is interpreted as a column separation in en units (multiplied in proportion if the .B expand option is on \[en] in case of overfull tables this might be zero). +. Default separation is 3n. . +. .LP The column .RB specifier\~ x @@ -592,22 +825,30 @@ .RB overrides\~ x . . . +.\" -------------------------------------------------------------------- .SS Table data +.\" -------------------------------------------------------------------- +. The format lines are followed by lines containing the actual data for the table, followed finally by .BR .TE . -Within such data lines, items are normally separated by tab characters (or -the character specified with the +. +Within such data lines, items are normally separated by tab characters +(or the character specified with the .B tab option). -Long input lines can be broken across multiple lines if the last character -on the line is `\[rs]' (which vanishes after concatenation). +. +Long input lines can be broken across multiple lines if the last +character on the line is \[oq]\[rs]\[cq] (which vanishes after +concatenation). +. . .LP Note that .B @g@tbl computes the column widths line by line, applying \[rs]w on each entry -which isn't a text block. +which isn\[aq]t a text block. +. As a consequence, constructions like .IP .EX @@ -641,40 +882,53 @@ \&.TE .EE . +. .LP -A dot starting a line, followed by anything but a digit is handled as a -troff command, passed through without changes. +A dot starting a line, followed by anything but a digit is handled as +a troff command, passed through without changes. +. The table position is unchanged in this case. . +. .LP -If a data line consists of only `_' or `=', a single or double line, -respectively, is drawn across the table at that point; if a single item in a -data line consists of only `_' or `=', then that item is replaced by a -single or double line, joining its neighbours. -If a data item consists only of `\[rs]_' or `\[rs]=', a single or double line, -respectively, is drawn across the field at that point which does not join -its neighbours. -. -.LP -A data item consisting only of `\[rs]Rx' (`x' any character) is replaced by -repetitions of character `x' as wide as the column (not joining its -neighbours). +If a data line consists of only \[oq]_\[cq] or \[oq]=\[cq], a single +or double line, respectively, is drawn across the table at that point; +if a single item in a data line consists of only \[oq]_\[cq] or +\[oq]=\[cq], then that item is replaced by a single or double line, +joining its neighbours. +. +If a data item consists only of \[oq]\[rs]_\[cq] or \[oq]\[rs]=\[cq], +a single or double line, respectively, is drawn across the field at +that point which does not join its neighbours. +. . .LP -A data item consisting only of `\[rs]^' indicates that the field immediately -above spans downward over this row. +A data item consisting only of \[oq]\[rs]Rx\[cq] (\[oq]x\[cq] any +character) is replaced by repetitions of character \[oq]x\[cq] as wide +as the column (not joining its neighbours). . . +.LP +A data item consisting only of \[oq]\[rs]^\[cq] indicates that the +field immediately above spans downward over this row. +. +. +.\" -------------------------------------------------------------------- .SS Text blocks -A text block can be used to enter data as a single entry which would be -too long as a simple string between tabs. -It is started with `T{' and closed with `T}'. +.\" -------------------------------------------------------------------- +. +A text block can be used to enter data as a single entry which would +be too long as a simple string between tabs. +. +It is started with \[oq]T{\[cq] and closed with \[oq]T}\[cq]. +. The former must end a line, and the latter must start a line, probably -followed by other data columns (separated with tabs or the character given -with the +followed by other data columns (separated with tabs or the character +given with the .B tab global option). . +. .LP By default, the text block is formatted with the settings which were active before entering the table, possibly overridden by the @@ -683,6 +937,7 @@ and .B w tbl specifiers. +. For example, to make all text blocks ragged-right, insert .B .na right before the starting @@ -691,41 +946,50 @@ .B .ad after the table). . +. .LP -If either `w' or `x' specifiers are not given for +If either \[oq]w\[cq] or \[oq]x[cq] specifiers are not given for .I all -columns of a text block span, the default length of the text block (to be -more precise, the line length used to process the text block diversion) is -computed as L\[tmu]C/(N+1), where `L' is the current line length, `C' the -number of columns spanned by the text block, and `N' the total number of -columns in the table. +columns of a text block span, the default length of the text block (to +be more precise, the line length used to process the text block +diversion) is computed as L\[tmu]C/(N+1), where \[oq]L\[cq] is the +current line length, \[oq]C\[cq] the number of columns spanned by the +text block, and \[oq]N\[cq] the total number of columns in the table. +. Note, however, that the actual diversion width as returned in register .B \[rs]n[dl] is used eventually as the text block width. +. If necessary, you can also control the text block width with a direct insertion of a .B .ll -request right after `T{'. +request right after \[oq]T{\[cq]. . . +.\" -------------------------------------------------------------------- .SS Miscellaneous +.\" -------------------------------------------------------------------- +. The number register .B \[rs]n[TW] -holds the table width; it can't be used within the table itself but is defined -right before calling +holds the table width; it can\[aq]t be used within the table itself +but is defined right before calling .B .TE so that this macro can make use of it. . +. .LP .B tbl also defines a macro .B .T# which produces the bottom and side lines of a boxed table. +. While .B tbl does call this macro itself at the end of the table, it can be used by macro packages to create boxes for multi-page tables by calling it within the page footer. +. An example of this is shown by the .B \-ms macros which provide this functionality if a table starts with @@ -735,7 +999,10 @@ macro. . . +.\" -------------------------------------------------------------------- .SH "INTERACTION WITH @G@EQN" +.\" -------------------------------------------------------------------- +. .BR @g@tbl (@MAN1EXT@) should always be called before .BR @g@eqn (@MAN1EXT@) @@ -743,37 +1010,52 @@ automatically takes care of the correct order of preprocessors). . . +.\" -------------------------------------------------------------------- .SH "GNU TBL ENHANCEMENTS" +.\" -------------------------------------------------------------------- +. There is no limit on the number of columns in a table, nor any limit on the number of text blocks. +. All the lines of a table are considered in deciding column widths, not just the first 200. +. Table continuation .RB ( .T& ) lines are not restricted to the first 200 lines. . +. .LP Numeric and alphabetic items may appear in the same column. . +. .LP Numeric and alphabetic items may span horizontally. . +. .LP .B @g@tbl uses register, string, macro and diversion names beginning with the digit\~\c .BR 3 . +. When using .B @g@tbl you should avoid using any names beginning with a\~\c .BR 3 . . . +.\" -------------------------------------------------------------------- .SH "GNU TBL WITHIN MACROS" +.\" -------------------------------------------------------------------- +. Since .B @g@tbl defines its own macros (right before each table) it is necessary to use -an `end-of-macro' macro. Additionally, the escape character has to be switched -off. Here an example. +an \[oq]end-of-macro\[cq] macro. +. +Additionally, the escape character has to be switched off. +. +Here an example. .IP .EX \&.eo @@ -790,41 +1072,51 @@ \&.ATABLE And \[dq]another one\[dq] .EE . +. .LP Note, however, that not all features of .B @g@tbl can be wrapped into a macro because .B @g@tbl -sees the input earlier than +sees the input earlier than .BR @g@troff . +. For example, number formatting with vertically aligned decimal points fails if those numbers are passed on as macro parameters because decimal point alignment is handled by .B @g@tbl -itself: It only sees `\[rs]$1', `\[rs]$2', etc., and therefore can't -recognize the decimal point. +itself: It only sees \[oq]\[rs]$1\[cq], \[oq]\[rs]$2\[cq], etc., and +therefore can\[aq]t recognize the decimal point. . . +.\" -------------------------------------------------------------------- .SH BUGS +.\" -------------------------------------------------------------------- +. You should use .BR .TS\ H / .TH in conjunction with a supporting macro package for .I all multi-page boxed tables. +. If there is no header that you wish to appear at the top of each page of the table, place the .B .TH line immediately after the format section. +. Do not enclose a multi-page table within keep/release macros, or divert it in any other way. . +. .LP A text block within a table must be able to fit on one page. . +. .LP The .B bp request cannot be used to force a page-break in a multi-page table. +. Instead, define .B BP as follows @@ -837,18 +1129,22 @@ \&.. .EE . +. .LP and use .B BP instead of .BR bp . . +. .LP Using \[rs]a directly in a table to get leaders does not work (except in compatibility mode). +. This is correct behaviour: \[rs]a is an .B uninterpreted leader. +. To get leaders use a real leader, either by using a control A or like this: . @@ -864,13 +1160,14 @@ . . .LP -A leading and/or trailing `|' in a format line, such as +A leading and/or trailing \[oq]|\[cq] in a format line, such as . .IP .EX |l r|. .EE . +. .LP gives output which has a 1n\~space between the resulting bordering vertical rule and the content of the adjacent column, @@ -885,6 +1182,7 @@ \&.TE .EE . +. .LP If it is desired to have zero space (so that the rule touches the content), this can be achieved by introducing extra \[lq]dummy\[rq] @@ -900,21 +1198,33 @@ \&.TE .EE . +. .LP The resulting \[lq]dummy\[rq] columns are invisible and have zero width; -note that such columns usually don't work with TTY devices. +note that such columns usually don\[aq]t work with TTY devices. . . +.\" -------------------------------------------------------------------- .SH REFERENCE +.\" -------------------------------------------------------------------- Lesk, M.E.: "TBL \[en] A Program to Format Tables". For copyright reasons it cannot be included in the groff distribution, but copies can be found with a title search on the World Wide Web. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/roff/groff/groff.cpp groff-1.22.3/src/roff/groff/groff.cpp --- groff-1.22.2/src/roff/groff/groff.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/groff/groff.cpp 2014-11-04 09:38:35.195524372 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2012 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -51,14 +50,15 @@ // The number of commands must be in sync with MAX_COMMANDS in pipeline.h -// grap and chem must come before pic; +// grap, chem, and ideal must come before pic; // tbl must come before eqn const int PRECONV_INDEX = 0; const int SOELIM_INDEX = PRECONV_INDEX + 1; const int REFER_INDEX = SOELIM_INDEX + 1; const int GRAP_INDEX = REFER_INDEX + 1; const int CHEM_INDEX = GRAP_INDEX + 1; -const int PIC_INDEX = CHEM_INDEX + 1; +const int IDEAL_INDEX = CHEM_INDEX + 1; +const int PIC_INDEX = IDEAL_INDEX + 1; const int TBL_INDEX = PIC_INDEX + 1; const int GRN_INDEX = TBL_INDEX + 1; const int EQN_INDEX = GRN_INDEX + 1; @@ -139,7 +139,7 @@ }; while ((opt = getopt_long( argc, argv, - "abcCd:D:eEf:F:gGhiI:jkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ", + "abcCd:D:eEf:F:gGhiI:jJkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ", long_options, NULL)) != EOF) { char buf[3]; @@ -174,6 +174,10 @@ case 't': commands[TBL_INDEX].set_name(command_prefix, "tbl"); break; + case 'J': + commands[IDEAL_INDEX].set_name(command_prefix, "gideal"); + // need_pic = 1; + break; case 'j': commands[CHEM_INDEX].set_name(command_prefix, "chem"); need_pic = 1; @@ -215,11 +219,12 @@ vflag = 1; printf("GNU groff version %s\n", Version_string); printf( - "Copyright (C) 2013 Free Software Foundation, Inc.\n" + "Copyright (C) 2014 Free Software Foundation, Inc.\n" "GNU groff comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of groff and its subprograms\n" "under the terms of the GNU General Public License.\n" - "For more information about these matters, see the file named COPYING.\n"); + "For more information about these matters, see the file\n" + "named COPYING.\n"); printf("\ncalled subprograms:\n\n"); fflush(stdout); commands[POST_INDEX].append_arg(buf); @@ -755,9 +760,9 @@ void synopsis(FILE *stream) { fprintf(stream, -"usage: %s [-abceghijklpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam]\n" -" [-wname] [-Wname] [-Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg]\n" -" [-Darg] [-Karg] [-Larg] [-Idir] [files...]\n", +"usage: %s [-abceghijklpstvzCEGNRSUVXZ] [-dcs] [-ffam] [-mname] [-nnum]\n" +" [-olist] [-rcn] [-wname] [-Darg] [-Fdir] [-Idir] [-Karg] [-Larg]\n" +" [-Mdir] [-Parg] [-Tdev] [-Wname] [files...]\n", program_name); } @@ -766,46 +771,47 @@ synopsis(stdout); fputs("\n" "-h\tprint this message\n" -"-k\tpreprocess with preconv\n" -"-t\tpreprocess with tbl\n" -"-p\tpreprocess with pic\n" +"-v\tprint version number\n" "-e\tpreprocess with eqn\n" "-g\tpreprocess with grn\n" -"-G\tpreprocess with grap\n" "-j\tpreprocess with chem\n" +"-k\tpreprocess with preconv\n" +"-p\tpreprocess with pic\n" "-s\tpreprocess with soelim\n" +"-t\tpreprocess with tbl\n" +"-G\tpreprocess with grap\n" +"-J\tpreprocess with gideal\n" "-R\tpreprocess with refer\n" -"-Tdev\tuse device dev\n" -"-X\tuse X11 previewer rather than usual postprocessor\n" -"-mname\tread macros tmac.name\n" +"-a\tproduce ASCII description of output\n" +"-b\tprint backtraces with errors or warnings\n" +"-c\tdisable color output\n" "-dcs\tdefine a string c as s\n" -"-rcn\tdefine a number register c as n\n" -"-nnum\tnumber first page n\n" -"-olist\toutput only pages in list\n" "-ffam\tuse fam as the default font family\n" -"-Fdir\tsearch dir for device directories\n" -"-Mdir\tsearch dir for macro files\n" -"-v\tprint version number\n" -"-z\tsuppress formatted output\n" -"-Z\tdon't postprocess\n" -"-a\tproduce ASCII description of output\n" "-i\tread standard input after named input files\n" -"-wname\tenable warning name\n" -"-Wname\tinhibit warning name\n" -"-E\tinhibit all errors\n" -"-b\tprint backtraces with errors or warnings\n" "-l\tspool the output\n" -"-c\tdisable color output\n" +"-mname\tread macros tmac.name\n" +"-nnum\tnumber first page n\n" +"-olist\toutput only pages in list\n" +"-rcn\tdefine a number register c as n\n" +"-wname\tenable warning name\n" +"-z\tsuppress formatted output\n" "-C\tenable compatibility mode\n" -"-V\tprint commands on stdout instead of running them\n" -"-Parg\tpass arg to the postprocessor\n" +"-Darg\tuse arg as default input encoding. Implies -k\n" +"-E\tinhibit all errors\n" +"-Fdir\tsearch dir for device directories\n" +"-Idir\tsearch dir for soelim, troff, and grops. Implies -s\n" +"-Karg\tuse arg as input encoding. Implies -k\n" "-Larg\tpass arg to the spooler\n" +"-Mdir\tsearch dir for macro files\n" "-N\tdon't allow newlines within eqn delimiters\n" +"-Parg\tpass arg to the postprocessor\n" "-S\tenable safer mode (the default)\n" +"-Tdev\tuse device dev\n" "-U\tenable unsafe mode\n" -"-Idir\tsearch dir for soelim, troff, and grops. Implies -s\n" -"-Karg\tuse arg as input encoding. Implies -k\n" -"-Darg\tuse arg as default input encoding. Implies -k\n" +"-V\tprint commands on stdout instead of running them\n" +"-Wname\tinhibit warning name\n" +"-X\tuse X11 previewer rather than usual postprocessor\n" +"-Z\tdon't postprocess\n" "\n", stdout); exit(0); diff -ruN groff-1.22.2/src/roff/groff/groff.man groff-1.22.3/src/roff/groff/groff.man --- groff-1.22.2/src/roff/groff/groff.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/groff/groff.man 2014-11-04 09:38:35.195524372 +0100 @@ -1,20 +1,58 @@ -.ig -groff.man +.TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff \- front-end for the groff document formatting system +. +.\" groff.man -> groff.1 +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.\" License +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. -Copyright (C) 1989, 2002-2009, 2011 -Free Software Foundation, Inc. Rewritten in 2002 by Bernd Warken +This document is part of groff, a free GNU software project. + 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 +Invariant Sections being the macro definition or .co and .au, 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. + +It is also available in the internet at the +.UR http://\:www.gnu.org/\:copyleft/\:fdl.html +GNU copyleft site +.UE . +.. +. +.\" Authors +.de au +This document is based on the original +.I groff +man page written by +.MT jjc@jclark.com +James Clark +.UE . +. +It was rewritten, enhanced, and put under the FDL license by +Bernd Warken . +. +It is maintained by +.MT wl@gnu.org +Werner Lemberg +.ME . .. . +.\" -------------------------------------------------------------------- +.\" Definitons +.\" -------------------------------------------------------------------- . .\" -------------------------------------------------------------------- .\" Environment variable @@ -31,15 +69,6 @@ .. . .\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -groff \- front-end for the groff document formatting system -. -. -.\" -------------------------------------------------------------------- .SH SYNOPSIS .\" -------------------------------------------------------------------- . @@ -82,7 +111,7 @@ . This document describes the .B groff -program, the main front-end for the +program, the main front-end for the .I groff document formatting system. . @@ -101,6 +130,7 @@ .IR roff , but adds many extensions. . +. .P The .B groff @@ -115,21 +145,21 @@ .\" -------------------------------------------------------------------- .SH OPTIONS .\" -------------------------------------------------------------------- -.P +. The command line is parsed according to the usual \f[CR]GNU\f[] convention. . The whitespace between a command line option and its argument is optional. . -Options can be grouped behind a single `\-' (minus character). +Options can be grouped behind a single \[oq]\-\[cq] (minus character). . A filename of .B \- (minus character) denotes the standard input. . -.P . +.P As .B groff is a wrapper program for @@ -210,10 +240,14 @@ and .B \eX'ps: file' escapes). +. The current directory is always searched first. +. This option may be specified more than once; the directories are searched in the order specified. +. No directory search is performed for files specified using an absolute path. +. This option implies the .B \-s option. @@ -232,10 +266,11 @@ .B \-k Preprocess with .BR preconv . +. This is run before any other preprocessor. . Please refer to -.BR preconv 's +.BR preconv \[aq]s manual page for its behaviour if no .B \-K (or @@ -262,6 +297,7 @@ .B print command in the device description file, see .BR \%groff_font (@MAN5EXT@). +. If this command is not present, the output is piped into the .BR lpr (1) program by default. @@ -277,14 +313,15 @@ Pass .I arg to the spooler program. +. Several arguments should be passed with a separate --L +\-L option each. . Note that .B groff does not prepend -`-' +\[oq]\-\[cq] (a minus sign) to .I arg before passing it to the spooler program. @@ -292,7 +329,7 @@ . .TP .B \-N -Don't allow newlines within +Don\[aq]t allow newlines within .I eqn delimiters. . @@ -320,9 +357,9 @@ . The option must be specified with the necessary preceding minus sign(s) -.Quoted - +.Quoted \- or -.Quoted -- +.Quoted \-\- because .B groff does not prepend any dashes before passing it to the postprocessor. @@ -334,7 +371,7 @@ .RS .IP .EX -groff -X -P -title -P 'groff it' \f[I]foo\f[] +groff \-X \-P \-title \-P 'groff it' \f[I]foo\f[] .EE .RE . @@ -344,8 +381,8 @@ .RS .IP .EX -groff -X -Z \f[I]foo\f[] | \ -gxditview -title 'groff it' - +groff \-X \-Z \f[I]foo\f[] | \ +gxditview \-title 'groff it' \- .EE .RE . @@ -355,7 +392,7 @@ Preprocess with .BR @g@refer . . -No mechanism is provided for passing arguments to +No mechanism is provided for passing arguments to .B @g@refer because most .B @g@refer @@ -390,6 +427,7 @@ .BR .sy , and .BR .pi . +. For security reasons, safer mode is enabled by default. . . @@ -403,6 +441,7 @@ .BI \-T\ dev Set output device to .IR dev . +. For this device, .B @g@troff generates the @@ -414,7 +453,7 @@ Then .B groff calls a postprocessor to convert -.BR @g@troff 's +.BR @g@troff \[aq]s .I intermediate output to its final format. . @@ -488,6 +527,9 @@ .TP utf8 Unicode character set in \%UTF-8 encoding. +. +This mode has the most useful fonts for TTY mode, so it is the best +mode for TTY output. .RE .RE . @@ -495,7 +537,7 @@ .IP The following arguments select .B \%gxditview -as the `postprocessor' (it is rather a viewing program): +as the \[oq]postprocessor\[cq] (it is rather a viewing program): . .RS .RS @@ -544,6 +586,7 @@ Output the pipeline that would be run by .BR groff (as a wrapper program) on the standard output, but do not execute it. +. If given more than once, the commands are both printed on the standard error and run. . @@ -557,8 +600,8 @@ The printing spooler behavior as outlined with options .B \-l and -.B \-L -is carried over to +.B \-L +is carried over to .BR \%gxditview (@MAN1EXT@) by determining an argument for the .B \-printCommand @@ -589,7 +632,7 @@ .RS .IP .EX -groff -X -P-resolution -P100 -man foo.1 +groff \-X \-P-resolution \-P100 \-man foo.1 .EE .RE . @@ -598,6 +641,7 @@ .B \-z Suppress output generated by .BR @g@troff . +. Only error messages are printed. . . @@ -606,6 +650,7 @@ Do not automatically postprocess .I groff intermediate output in the usual manner. +. This will cause the .B @g@troff .I output @@ -705,6 +750,7 @@ .BI \-w\ name Enable warning .IR name . +. See .BR @g@troff (@MAN1EXT@) for names. @@ -713,6 +759,7 @@ .BI \-W\ name disable warning .IR name . +. See .BR @g@troff (@MAN1EXT@) for names. @@ -766,9 +813,12 @@ .BR .pl , and .BR .ll . +. See .BR groff_tmac (@MAN5EXT@) -for the `papersize' macro package which provides a convenient interface. +for the \[oq]papersize\[cq] macro package which provides a convenient +interface. +. . .P The @@ -780,9 +830,11 @@ .B \-p and .BR \-l . +. See .BR groff_font (@MAN5EXT@) and the man pages of the output devices for more details. +. .B groff uses the command line option .B \-P @@ -813,6 +865,7 @@ .BR roff (@MAN7EXT@) can be avoided. . +. .P The .BR grog (@MAN1EXT@) @@ -820,6 +873,7 @@ .I groff command line to format a file. . +. .P The .BR \%groffer (@MAN1EXT@) @@ -843,7 +897,7 @@ . .TP .BR @g@eqn (@MAN1EXT@) -for mathematical formul\(ae, +for mathematical formulae, . .TP .BR @g@grn (@MAN1EXT@) @@ -889,7 +943,7 @@ Besides these, there are some internal preprocessors that are automatically run with some devices. . -These aren't visible to the user. +These aren\[aq]t visible to the user. . . .\" -------------------------------------------------------------------- @@ -934,6 +988,7 @@ .B mdoc The \f[CR]BSD\f[]-style man page format; see .BR \%groff_mdoc (@MAN7EXT@). +. It can be specified on the command line as .B \-mdoc or @@ -945,6 +1000,7 @@ .I me document format; see .BR \%groff_me (@MAN7EXT@). +. It can be specified on the command line as .B \-me or @@ -956,6 +1012,7 @@ .I mm document format; see .BR \%groff_mm (@MAN7EXT@). +. It can be specified on the command line as .B \-mm or @@ -996,6 +1053,7 @@ programming languages are described in .BR roff (@MAN7EXT@). . +. .P The .I groff @@ -1004,6 +1062,7 @@ language are documented in .BR \%groff_diff (@MAN7EXT@). . +. .P The .I groff @@ -1023,6 +1082,7 @@ .I groff system is .BR @g@troff (@MAN1EXT@). +. It provides the features of both the classical .I troff and @@ -1041,6 +1101,7 @@ .I roff as much as possible. . +. .P There is a shell script .BR @g@nroff (@MAN1EXT@) @@ -1050,6 +1111,7 @@ It tries to automatically select the proper output encoding, according to the current locale. . +. .P The formatter program generates .IR "intermediate output" ; @@ -1070,6 +1132,7 @@ . A device is specified by the option .BR \-T . +. The .I groff devices are as follows. @@ -1099,9 +1162,10 @@ . .TP .B lbp -Output for Canon CAPSL printers (\%LBP-4 and \%LBP-8 series laser printers). +Output for Canon CAPSL printers (\%LBP-4 and \%LBP-8 series laser +printers). . -.TP +.TP .B lj4 HP LaserJet4-compatible (or other PCL5-compatible) printers. . @@ -1114,7 +1178,7 @@ .B pdf PDF files; suitable for viewing with tools such as .BR evince (1) -and +and .BR okular (1). . .TP @@ -1147,6 +1211,7 @@ A variant for a 12\|pt document base font is .BR \%X100-12 . . +. .P The postprocessor to be used for a device is specified by the .B postpro @@ -1154,7 +1219,7 @@ .BR \%groff_font (@MAN5EXT@). . This can be overridden with the -.B -X +.B \-X option. . .P @@ -1182,14 +1247,16 @@ for text output using various encodings, e.g., on text-oriented terminals or line-printers. . +. .P Today, most printing or drawing hardware is handled by the operating -system, by device drivers, or by software interfaces, usually accepting -PostScript. +system, by device drivers, or by software interfaces, usually +accepting PostScript. . -Consequently, there isn't an urgent need for more hardware device +Consequently, there isn\[aq]t an urgent need for more hardware device postprocessors. . +. .P The .I groff @@ -1211,6 +1278,7 @@ .BR gropdf (@MAN1EXT@) for PDF. . +. .P Combined with the many existing free conversion tools this should be sufficient to convert a @@ -1294,7 +1362,7 @@ . .TP .BR \%pfbtops (@MAN1EXT@) -Translate a PostScript font in .pfb format to \f[CR]ASCII\f[]. +Translate a PostScript font in \&.pfb format to \f[CR]ASCII\f[]. . .TP .BR \%pic2graph (@MAN1EXT@) @@ -1322,8 +1390,8 @@ .SH ENVIRONMENT .\" -------------------------------------------------------------------- . -Normally, the path separator in the following environment variables is the -colon; this may vary depending on the operating system. +Normally, the path separator in the following environment variables is +the colon; this may vary depending on the operating system. . For example, DOS and Windows use a semicolon instead. . @@ -1357,7 +1425,7 @@ For example, .BR gtroff stood for -.IR groff 's +.IR groff \[aq]s .BR troff , .BR gtbl for the @@ -1379,6 +1447,7 @@ .IB xxx troff instead of .BR troff . +. This also applies to the preprocessors .BR eqn , .BR grn , @@ -1406,7 +1475,7 @@ preprocessor to select the encoding of input files. . Setting this option implies -.BR groff 's +.BR groff \[aq]s command line option .B \-k (this is, @@ -1422,7 +1491,7 @@ . An explicit .B \-K -command line option overrides the value of +command line option overrides the value of .EnvVar GROFF_ENCODING . . See @@ -1445,8 +1514,8 @@ . .TP .EnvVar GROFF_TMAC_PATH -A list of directories in which to search for macro files in addition to -the default directories. +A list of directories in which to search for macro files in addition +to the default directories. . See .BR @g@troff (@MAN1EXT@) @@ -1463,6 +1532,7 @@ .EnvVar TMPDIR instead, temporary files are created in the directory .EnvVar $TMPDIR . +. On MS-DOS and Windows\~32 platforms, the environment variables .EnvVar TMP and @@ -1474,6 +1544,7 @@ . Otherwise, temporary files are created in .BR /tmp . +. The .BR \%@g@refer (@MAN1EXT@), .BR \%groffer (@MAN1EXT@), @@ -1496,7 +1567,97 @@ . . .\" -------------------------------------------------------------------- -.SH FILES +.SH EXAMPLES +.\" -------------------------------------------------------------------- +. +The following example illustrates the power of the +.B groff +program as a wrapper around +.BR @g@troff . +. +. +.P +To process a +.I roff +file using the preprocessors +.B tbl +and +.B pic +and the +.B me +macro set, classical +.I troff +had to be called by +. +.IP +.EX +pic foo.me | tbl | troff \-me \-Tlatin1 | grotty +.EE +. +. +.P +Using +.BR groff , +this pipe can be shortened to the equivalent command +. +.IP +.EX +groff \-p \-t \-me \-T latin1 foo.me +.EE +. +. +.P +An even easier way to call this is to use +.BR grog (@MAN1EXT@) +to guess the preprocessor and macro options and execute the generated +command (by using backquotes to specify shell command substitution) +. +.IP +.EX +\`grog \-Tlatin1 foo.me\` +.EE +. +. +.P +The simplest way is to view the contents in an automated way by +calling +. +.IP +.EX +groffer foo.me +.EE +. +. +.\" -------------------------------------------------------------------- +.SH BUGS +.\" -------------------------------------------------------------------- +. +On \f[CR]EBCDIC\f[] hosts (e.g., \f[CR]OS/390 Unix\f[]), output +devices +.B ascii +and +.B latin1 +aren\[aq]t available. +. +Similarly, output for \f[CR]EBCDIC\f[] code page +.B cp1047 +is not available on \f[CR]ASCII\f[] based operating systems. +. +. +.P +Report bugs to +.MT bug-groff@gnu.org +the groff mailing list +.ME . +. +Include a complete, self-contained example that allows the bug to +be reproduced, and say which version of +.I groff +you are using. +. +. +.\" -------------------------------------------------------------------- +.SH "POSITIONS FROM INSTALLATION" .\" -------------------------------------------------------------------- . There are some directories in which @@ -1509,6 +1670,69 @@ . . .\" -------------------------------------------------------------------- +.SS "Collection of Installation Directories" +.\" -------------------------------------------------------------------- +. +This section describes the position of all files of the +.I groff +package after the installation \[em] got from +.B Makefile.comm +at the top of the +.I groff +source package. +. +. +.TP +.B @DEFAULT_INDEX@ +index directory and index name +.TP +.B @LEGACYFONTDIR@ +legacy font directory +.TP +.B @BINDIR@ +directory for binary programs +.TP +.B @SYSTEMMACRODIR@ +system tmac directory +.TP +.B @DOCDIR@ +documentation directory +.TP +.B @EXAMPLEDIR@ +directory for examples +.TP +.B @HTMLDOCDIR@ +documentation directory for html files +.TP +.B @PDFDOCDIR@ +documentation directory for pdf files +.TP +.B @DATASUBDIR@ +data subdirectory +.TP +.B @COMMON_WORDS_FILE@ +file for common words +.TP +.B @FONTDIR@ +directory for fonts +.TP +.B @OLDFONTDIR@ +directory for old fonts +.TP +.B @MACRODIR@ +tmac directory +.TP +.B @TMAC_MDIR@ +mm tmac directory +.TP +.B @LOCALFONTDIR@ +local font directory +.TP +.B @LOCALMACRODIR@ +local tmac directory +. +. +.\" -------------------------------------------------------------------- .SS "groff Macro Directory" .\" -------------------------------------------------------------------- . @@ -1590,92 +1814,6 @@ . . .\" -------------------------------------------------------------------- -.SH EXAMPLES -.\" -------------------------------------------------------------------- -. -The following example illustrates the power of the -.B groff -program as a wrapper around -.BR @g@troff . -. -.P -To process a -.I roff -file using the preprocessors -.B tbl -and -.B pic -and the -.B me -macro set, classical -.I troff -had to be called by -. -.IP -.EX -pic foo.me | tbl | troff -me -Tlatin1 | grotty -.EE -. -.P -Using -.BR groff , -this pipe can be shortened to the equivalent command -. -.IP -.EX -groff -p -t -me -T latin1 foo.me -.EE -. -.P -An even easier way to call this is to use -.BR grog (@MAN1EXT@) -to guess the preprocessor and macro options and execute the generated -command (by using backquotes to specify shell command substitution) -. -.IP -.EX -\`grog -Tlatin1 foo.me\` -.EE -. -.P -The simplest way is to view the contents in an automated way by -calling -. -.IP -.EX -groffer foo.me -.EE -. -. -.\" -------------------------------------------------------------------- -.SH BUGS -.\" -------------------------------------------------------------------- -. -.P -On \f[CR]EBCDIC\f[] hosts (e.g., \f[CR]OS/390 Unix\f[]), output -devices -.B ascii -and -.B latin1 -aren't available. -. -Similarly, output for \f[CR]EBCDIC\f[] code page -.B cp1047 -is not available on \f[CR]ASCII\f[] based operating systems. -. -.P -Report bugs to -.MT bug-groff@gnu.org -the groff maling list -.ME . -. -Include a complete, self-contained example that allows the bug to -be reproduced, and say which version of -.I groff -you are using. -. -. -.\" -------------------------------------------------------------------- .SH AVAILABILITY .\" -------------------------------------------------------------------- . @@ -1686,13 +1824,6 @@ groff GNU website .UE . . -The most recent released version of -.I groff -is available at the -.UR http://\:groff.ffii.org/\:groff/\:devel/\:groff-current.tar.gz -groff development site -.UE . -. .P Three .I groff @@ -1711,15 +1842,16 @@ .MT groff-commit@ffii.org the groff commit list .ME , -a read-only list showing logs of commitments to the CVS repository. +a read-only list showing logs of commitments to the groff repository. . .P -Details on CVS access and much more can be found in the file +Details on repository access and much more can be found in the file .B README at the top directory of the .I groff source package. . +. .P There is a free implementation of the .B grap @@ -1730,7 +1862,7 @@ . The actual version can be found at the . -.UR http://\:www.lunabase.org/\:~faber/\:Vault/\:software/\:grap/ +.UR http://\:www.lunabase.org/\:\|\s+2~\s0faber/\:Vault/\:software/\:grap/ grap website .UE . This is the only grap version supported by @@ -1738,55 +1870,9 @@ . . .\" -------------------------------------------------------------------- -.SH AUTHORS -.\" -------------------------------------------------------------------- -. -Copyright \(co 2011 -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 based on the original -.I groff -man page written by -.MT jjc@jclark.com -James Clark -.UE . -. -It was rewritten, enhanced, and put under the FDL license by -Bernd Warken . -. -It is maintained by -.MT wl@gnu.org -Werner Lemberg -.ME . -. -.P -.I groff -is a \f[CR]GNU\f[] free software project. -. -All parts of the -.I groff package -are protected by \f[CR]GNU copyleft licenses\f[]. -. -The software files are distributed under the terms of the \f[CR]GNU -General Public License\f[] (\f[CR]GPL\f[]), while the documentation -files mostly use the \f[CR]GNU Free Documentation License\f[] -(\f[CR]FDL\f[]). -. -. -.\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- +.ad l . The .I groff info file @@ -1799,6 +1885,7 @@ .BR info (1) on how to read it. . +. .P Due to its complex structure, the .I groff @@ -1809,6 +1896,37 @@ or .BR \%groffer (@MAN1EXT@). . +.P +But there are special sections of +.IR man-pages . +. +.I groff +has man\-pages in sections +.BR 1 , " 5" , and " 7" . +. +When there are several +.I man\-pages +with the same name in the same +.I man +section, the one with the lowest section is should as first. +. +The other man\-pages can be shown anyway by adding the section number +as argument before the man-page name. +. +Reading the man-page about the +.I groff +language is done by one of +.RS +.nf +.nh +.EX +.B man 7 groff +.B groffer 7 groff +.EE +.hy +.fi +.RE +. .TP Introduction, history and further readings: .BR roff (@MAN7EXT@). @@ -1897,6 +2015,17 @@ .BR \%tfmtodit (@MAN1EXT@), .BR \%xtotroff (@MAN1EXT@). . +. +.\" -------------------------------------------------------------------- +.SH COPYING (LICENSE) +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. +. .\" -------------------------------------------------------------------- .\" Emacs setup .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/src/roff/groff/Makefile.sub groff-1.22.3/src/roff/groff/Makefile.sub --- groff-1.22.2/src/roff/groff/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/groff/Makefile.sub 2014-11-04 09:38:35.195524372 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src roff groff' + +# File position: /src/roff/groff/Makefile.sub + +# Copyright (C) 1993-2014 Free Software Foundation, Inc. + +# Rewritten by Bernd Warken and +# Werner LEMBERG + +# `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 . + +######################################################################## + PROG=groff$(EXEEXT) MAN1=groff.n XLIBS=$(LIBGROFF) $(LIBGNU) @@ -6,3 +30,53 @@ CCSRCS=$(srcdir)/groff.cpp CSRCS=$(srcdir)/pipeline.c HDRS=$(srcdir)/pipeline.h + +GROFF_OPTS_OUTPUT=\ + groff_opts_no_arg.txt \ + groff_opts_with_arg.txt + +MOSTLYCLEANADD=groff_opts.tmp $(GROFF_OPTS_OUTPUT) + +RM=rm -f + +all: $(srcdir)/groff.cpp groff_opts.tmp $(GROFF_OPTS_OUTPUT) + +groff_opts.tmp: $(srcdir)/groff.cpp + @$(GREP) -e ':.*:.*:' $? | sed -e 's/[ \t",]//g' > $@ + @echo -n 'groff options: ' + @cat $@ + +groff_opts_no_arg.txt: groff_opts.tmp + @sed -e 's/[a-zA-Z]://g' $? > $@ + @echo -n 'no arg: ' + @cat $@ + +groff_opts_with_arg.txt: groff_opts_no_arg.txt + @sed "s/[`cat $?`:]//g" groff_opts.tmp > $@ + @echo -n 'with arg: ' + @cat $@ + +install_data: $(GROFF_OPTS_OUTPUT) + -test -d $(DESTDIR)$(libprogramdir) \ + || $(mkinstalldirs) $(DESTDIR)$(libprogramdir) + for f in $(GROFF_OPTS_OUTPUT); do \ + $(RM) $(DESTDIR)$(libprogramdir)/$$f; \ + $(INSTALL_SCRIPT) $$f $(DESTDIR)$(libprogramdir); \ + done + +uninstall_sub: + -for f in $(GROFF_OPTS_OUTPUT); do \ + $(RM) $(DESTDIR)$(libprogramdir)/$$f;\ + done +# XXX This will be removed by `uninstall_dirs' in `$(top_srcdir)/Makefile.in' +# XXX (And only from there it is successful on an empty directory) +# -d=$(DESTDIR)$(libprogramdir);\ +# if test -d $$d; then rmdir $$d; fi + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/roff/groff/pipeline.c groff-1.22.3/src/roff/groff/pipeline.c --- groff-1.22.2/src/roff/groff/pipeline.c 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/groff/pipeline.c 2014-11-04 09:38:35.195524372 +0100 @@ -1,6 +1,4 @@ -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/groff/pipeline.h groff-1.22.3/src/roff/groff/pipeline.h --- groff-1.22.2/src/roff/groff/pipeline.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/groff/pipeline.h 2014-11-04 09:38:35.195524372 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1989-1992, 2000, 2002, 2005, 2009, 2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -23,8 +22,9 @@ } #endif -/* run_pipeline can handle at most this many commands */ -#define MAX_COMMANDS 14 +/* run_pipeline can handle at most this many commands, + see the const numbers in groff.cpp */ +#define MAX_COMMANDS 15 /* Children exit with this status if execvp fails. */ #define EXEC_FAILED_EXIT_STATUS 0xff diff -ruN groff-1.22.2/src/roff/grog/grog.man groff-1.22.3/src/roff/grog/grog.man --- groff-1.22.2/src/roff/grog/grog.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/grog/grog.man 2014-11-04 09:38:35.522520284 +0100 @@ -1,140 +1,163 @@ .TH GROG @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +grog \(em guess options for a following groff command +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" grog.man -> grog.1 - man page for grog (section 1) +.\" Source file position: /src/roff/grog/grog.man +.\" Installed position: /share/man/man1/grog.1 . .\" -------------------------------------------------------------------- .\" Legalese .\" -------------------------------------------------------------------- . -.ig -grog.1 - man page for grog (section 1) +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. + +This file is part of grog, which is part of groff, a free software +project. You can redistribute it and/or modify it under the terms of +the GNU General Public License version 2 (GPL2) as published by the +Free Software Foundation. -Source file position: /src/roff/grog/grog.man -Installed position: $prefix/share/man/man1/grog.1 +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. -Last Update: 22 Jan 2011 +The text for GPL2 is available in the internet at +.UR http://\:www.gnu.org/\:licenses/\:gpl-2.0.txt +GNU copyleft site +.UE . .. -.de co -Copyright (C) 1989-2003, 2006, 2007, 2009-2012 -Free Software Foundation, Inc. . +.de au Written by James Clark. + Maintained by -.MT wl@gnu.org +.MT wl@gnu.org Werner Lemberg .ME . -Rewritten and put under GPL by Bernd Warken . -. -.P -This file is part of -.IR grog , -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 -(\f[CR]GPL\f[]) as published by the -.nh -.BR "Free Software Foundation" , -.hy -either version\~2, or (at your option) any later version. -. -.P -You should have received a copy of the \f[CR]GNU General Public -License\f[] along with -.IR groff , -see the files \%\f[CB]COPYING\f[] and \%\f[CB]LICENSE\f[] in the top -directory of the -.I groff -source package. -. -Or read the -.I man\~page -.BR gpl (1). -You can also write to the -.nh -.B "Free Software Foundation, 51 Franklin St - Fifth Floor, Boston," -.BR "MA 02110-1301, USA" . -.hy + +Rewritten and put under GPL by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . .. . -. .\" -------------------------------------------------------------------- -.\" Local macros -.de FN -.I \\$1 -.. -. -. +.\" Characters .\" -------------------------------------------------------------------- -.SH NAME . -grog \- guess options for groff command +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL +. +.\" Bullet +.ie t .ds BU \[bu] +.el .ds BU * +.\" used in `.IP \*(BU 2m' (former .Topic) . . .\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY grog .OP \-C -.RI [ \%groff\-option\~ .\|.\|.\&] +.OP \-\-run +.OP \-\-warnings +.OP \-\-ligatures +.OP \& "\%groff\-option \*(EL" .OP \-\- -.RI [ \%filespec\~ .\|.\|.] -. -.SY grog -.B \-h -| -.B \-\-help -. -.SY grog -.B \-v -| -.B \-\-version +.OP \& "\%filespec \*(EL" .YS . +.BR "grog \-h " | " \-\-help" +.br +.BR "grog \-v " | " \-\-version" +. . .\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . .B grog reads the input (file names or standard input) and guesses which of the -.BR groff (@MAN1EXT@) +.BR groff (@MAN1EXT@) options are needed to perform the input with the .B groff program. . +. +.RS +.P The corresponding .B groff -command is output. +command is usually displayed in standard output. +. +With the option +.BR \-\-run , +the generated line is output into standard error and the generated +.B groff +command is run on the +.IR "standard output" . +.RE . . .\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . -The only -.B grog -options recognized are -.B \-C -(which is also passed on) to enable compatibility mode; +The option .B \-v -and +or .B \-\-version -print information on the version number; and +prints information on the version number. +. +Also .B \-h -and +or .B \-\-help -print usage information. +prints usage information. . -.BR \-v , -.BR \-\-version , -.BR \-h , -and -.B \-\-help -stop the program directly without printing a +Both of these options automatically end the +.B grog +program. +. +Other options are thenignored, and no .B groff -command to standard output. +command line is generated. +. +. +The following 3 options are the only +.B grog +options, +. +.TP +.B \-C +this option means enabling the +.I groff +compatibility mode, which is also transfered to the generated +.B groff +command line. +. +.TP +.B \-\-ligatures +this option forces to include the arguments +.B -P-y -PU +within the generated +.B groff +command line. +. +.TP +.B \-\-run +with this option, the command line is output at standard error and +then run on the computer. +. +.TP +.B \-\-warnings +with this option, some more warnings are output to standard error. . . .P @@ -149,7 +172,7 @@ . Except from the .BI \-m arg -options, all options will be passed on, i.e. they are included +options, all options will be passed on, i.e.\& they are included unchanged in the command for the output without effecting the work of .BR grog . . @@ -168,6 +191,7 @@ . .\" -------------------------------------------------------------------- .SH DETAILS +.\" -------------------------------------------------------------------- . .B grog reads all @@ -179,20 +203,25 @@ options are required for running the input under .BR groff : .BR \-e , +.BR \-g , +.BR \-G , +.BR \-j , +.BR \-J , +.BR \-p , +.BR \-R , +.BR \-s , +.BR \-t . .BR \-man , +.BR \-mdoc, +.BR \-mdoc-old, .BR \-me , .BR \-mm , .BR \-mom , -.BR \-ms , -.BR \-mdoc, -.BR \-mdoc-old, -.BR \-p , -.BR \-R , -.BR \-g , -.BR \-G , -.BR \-s , and -.BR \-t . +.BR \-ms . +. +. +.P The guessed .B groff command including those options and the found @@ -310,23 +339,21 @@ . .\" -------------------------------------------------------------------- .SH EXAMPLES +.\" -------------------------------------------------------------------- . -.IP \(bu +.IP \*(BU 2m Calling -. .RS .IP .EX grog meintro.me .EE .RE -. .IP results in -. .RS -.IP .EX +.IP groff \-me meintro.me .EE .RE @@ -335,16 +362,15 @@ So .B grog recognized that the file -.FN meintro.me +.B meintro.me is written with the .B \-me macro package. .RE . . -.IP \(bu +.IP \*(BU 2m On the other hand, -. .RS .IP .EX @@ -358,7 +384,7 @@ .RS .IP .EX -groff \-pte \-ms pic.ms +groff \-p \-t \-e \-ms pic.ms .EE .RE . @@ -367,7 +393,7 @@ .BR \-ms , .B grog recognized that the file -.FN pic.ms +.B pic.ms additionally needs .BR \-pte , the combination of @@ -384,8 +410,8 @@ .RE . . -.IP \(bu -If both files are combined by the command +.IP \*(BU 2m +If both of the former example files are combined by the command . .RS .IP @@ -402,7 +428,7 @@ .RS .IP .ft CR -grog: error: there are several macro packages: -me -ms +grog: error: there are several macro packages: \-me \-ms .ft .RE . @@ -413,7 +439,7 @@ .RS .IP .EX -groff -pte -me -ms meintro.me pic.ms +groff \-pte \-me \-ms meintro.me pic.ms .EE .RE . @@ -421,7 +447,7 @@ But the program is terminated with an error code. . . -.IP \(bu +.IP \*(BU 2m The call of . .RS @@ -452,7 +478,7 @@ .RS .IP .EX -groff \-ksS \-Tdvi grnexmpl.g +groff \-k \-s \-S \-Tdvi grnexmpl.g .EE .RE . @@ -468,8 +494,12 @@ . .\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. +.ad l . .BR groff (@MAN1EXT@), +.BR groffer (@MAN1EXT@) .BR @g@troff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), @@ -478,19 +508,53 @@ .BR @g@refer (@MAN1EXT@), .BR @g@grn (@MAN1EXT@), .BR grap (1), -.BR @g@soelim (@MAN1EXT@), +.BR @g@soelim (@MAN1EXT@) +. +.RS +Man-pages of section 1 can be viewed with either +.RS +\[Do] +.BI man " name" +.RE +for text mode or +.RS +\[Do] +.BI groffer " name" +.RE +for graphical mode (default is PDF mode). +.RE +. +. +.P .BR groff_me (@MAN7EXT@), .BR groff_ms (@MAN7EXT@), .BR groff_mm (@MAN7EXT@), .BR groff_mom (@MAN7EXT@), -.BR groff_man (@MAN7EXT@), -.BR groffer (@MAN1EXT@) +.BR groff_man (@MAN7EXT@) +. +.RS +Man-pages of section 7 can be viewed with either with +.RS +\[Do] +.BI "man 7 " name +.RE +for text mode or +.RS +\[Do] +.BI "groffer 7 " name +.RE +for graphical mode (default is PDF mode). +.RE . . .\" -------------------------------------------------------------------- .SH "COPYING" -. +.\" -------------------------------------------------------------------- .co +.\" -------------------------------------------------------------------- +.SH "AUTHORS" +.\" -------------------------------------------------------------------- +.au . . .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/src/roff/grog/grog.pl groff-1.22.3/src/roff/grog/grog.pl --- groff-1.22.2/src/roff/grog/grog.pl 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/grog/grog.pl 2014-11-04 09:38:35.523520271 +0100 @@ -6,15 +6,17 @@ # Source file position: /src/roff/grog/grog.pl # Installed position: /bin/grog -# Copyright (C) 1993, 2006, 2009, 2011-2012 Free Software Foundation, Inc. +# Copyright (C) 1993-2014 Free Software Foundation, Inc. # Written by James Clark, maintained by Werner Lemberg. -# Rewritten and put under GPL by Bernd Warken . +# Rewritten with Perl by Bernd Warken . +# The macros for identifying the devices were taken from Ralph +# Corderoy's `grog.sh' from 2006. # This file is part of `grog', 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 (GPL) as published -# by the Free Software Foundation, either version 3 of the License, or +# 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. # `groff' is distributed in the hope that it will be useful, but @@ -23,366 +25,74 @@ # 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 . +# along with this program. If not, see +# . ######################################################################## -my $Last_Update = '24 May 2012'; -######################################################################## require v5.6; use warnings; use strict; -use File::Spec; - -my $Prog = $0; -{ - my ($v, $d, $f) = File::Spec->splitpath($Prog); - $Prog = $f; -} - -#my $Sp = "[\\s\\n]"; -my $Sp = qr([\s\n]); -my @Command; # stores the final output -my @Mparams; # stores the options -m* -my %Groff; +# $Bin is the directory where this script is located +use FindBin; +my $before_make; # script before run of `make' { - my @filespec = (); - my $double_minus = 0; - my $was_minus = 0; - my $had_filespec = 0; - - foreach my $arg (@ARGV) { - next unless $arg; - if ($double_minus) { - $had_filespec = 1; - if (-f $arg && -r $arg) { - push @filespec, $arg; - } else { - print STDERR "grog: $arg is not a readable file.\n"; - } - next; - } - - if ($arg eq '--') { - $double_minus = 1; - push(@Command, $arg); - next; - } - if ($arg eq '-') { - unless ($was_minus) { - push @filespec, $arg; - $was_minus = 1; - } - next; - } - - &version(0) if $arg eq '-v' || '--version' =~ /^$arg/; - &help() if $arg eq '-h' || '--help' =~ /^$arg/; - print STDERR "grog: wrong option $arg.\n" if $arg =~ /^--/; - - if ($arg =~ /^-m/) { - push @Mparams, $arg; - next; - } - $Sp = '' if $arg eq '-C'; - - if ($arg =~ /^-/) { - push(@Command, $arg); - next; - } else { - $had_filespec = 1; - if (-f $arg && -r $arg) { - push @filespec, $arg; - } else { - print STDERR "grog: $arg is not a readable file.\n"; - } - next; - } - } - @filespec = ('-') if ! @filespec && ! $had_filespec; - exit 1 unless @filespec; - @ARGV = @filespec; + my $at = '@'; + $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}"; } -foreach my $arg (@ARGV) { - &process($arg, 0); -} - -sub process { - my ($filename, $level) = @_; - local(*FILE); - - if (!open(FILE, $filename eq "-" ? $filename : "< $filename")) { - print STDERR "$Prog: can't open \`$filename': $!\n"; - exit 1 unless $level; - return; - } - while () { - chomp; - s/^[.']\s*/./; - s/^\s+|\s+$//g; - s/$/\n/; - - if (/^(.cstart)|(begin\s+chem)$/) { - $Groff{'chem'}++; - $Groff{'soelim'}++ if $level; - } elsif (/^\.TS$Sp/) { - $_ = ; - if (!/^\./ || /^\.so/) { - $Groff{'tbl'}++; - $Groff{'soelim'}++ if $level; - } - } elsif (/^\.EQ$Sp/) { - $_ = ; - if (!/^\./ || /^\.[0-9]/ || /^\.so/) { - $Groff{'eqn'}++; - $Groff{'soelim'}++ if $level; - } - } elsif (/^\.GS$Sp/) { - $_ = ; - if (!/^\./ || /^\.so/) { - $Groff{'grn'}++; - $Groff{'soelim'}++ if $level; - } - } elsif (/^\.G1$Sp/) { - $_ = ; - if (!/^\./ || /^\.so/) { - $Groff{'grap'}++; - $Groff{'soelim'}++ if $level; - } -# } elsif (/^\.PS\Sp([ 0-9.<].*)?$/) { -# if (/^\.PS\s*<\s*(\S+)/) { -# $Groff{'pic'}++; -# $Groff{'soelim'}++ if $level; -# &process($1, $level); -# } else { -# $_ = ; -# if (!/^\./ || /^\.ps/ || /^\.so/) { -# $Groff{'pic'}++; -# $Groff{'soelim'}++ if $level; -# } -# } - } elsif (/^\.PS[\s\n<]/) { - $Groff{'pic'}++; - $Groff{'soelim'}++ if $level; - if (/^\.PS\s*<\s*(\S+)/) { - &process($1, $level); - } - } elsif (/^\.R1$Sp/) { - $Groff{'refer'}++; - $Groff{'soelim'}++ if $level; - } elsif (/^\.\[/) { - $Groff{'refer_open'}++; - $Groff{'soelim'}++ if $level; - } elsif (/^\.\]/) { - $Groff{'refer_close'}++; - $Groff{'soelim'}++ if $level; - } elsif (/^\.NH$Sp/) { - $Groff{'NH'}++; # for ms - } elsif (/^\.TL$Sp/) { - $Groff{'TL'}++; # for mm and ms - } elsif (/^\.PP$Sp/) { - $Groff{'PP'}++; # for mom and ms - } elsif (/^\.[IL]P$Sp/) { - $Groff{'ILP'}++; # for man and ms - } elsif (/^\.P$/) { - $Groff{'P'}++; - } elsif (/^\.(PH|SA)$Sp/) { - $Groff{'mm'}++; - } elsif (/^\.TH$Sp/) { - $Groff{'TH'}++; - } elsif (/^\.SH$Sp/) { - $Groff{'SH'}++; - } elsif (/^\.([pnil]p|sh)$Sp/) { - $Groff{'me'}++; - } elsif (/^\.Dd$Sp/) { - $Groff{'mdoc'}++; - } elsif (/^\.(Tp|Dp|De|Cx|Cl)$Sp/) { - $Groff{'mdoc_old'} = 1; - } - # In the old version of -mdoc `Oo' is a toggle, in the new it's - # closed by `Oc'. - elsif (/^\.Oo$Sp/) { - $Groff{'Oo'}++; - s/^\.Oo/\. /; - redo; - } - # The test for `Oo' and `Oc' not starting a line (as allowed by the - # new implementation of -mdoc) is not complete; it assumes that - # macro arguments are well behaved, i.e., "" is used within "..." to - # indicate a doublequote as a string element, and weird features - # like `.foo a"b' are not used. - elsif (/^\..* Oo( |$)/) { - s/\\\".*//; - s/\"[^\"]*\"//g; - s/\".*//; - if (s/ Oo( |$)/ /) { - $Groff{'Oo'}++; - } - redo; - } elsif (/^\.Oc$Sp/) { - $Groff{'Oo'}--; - s/^\.Oc/\. /; - redo; - } elsif (/^\..* Oc( |$)/) { - s/\\\".*//; - s/\"[^\"]*\"//g; - s/\".*//; - if (s/ Oc( |$)/ /) { - $Groff{'Oo'}--; - } - redo; - } elsif (/^\.(PRINTSTYLE|START)$Sp/) { - $Groff{'mom'}++; - } - if (/^\.so$Sp/) { - chop; - s/^.so *//; - s/\\\".*//; - s/ .*$//; - # The next if-clause catches e.g. - # - # .EQ - # .so foo - # .EN - # - # However, the code is not fully correct since it is too generous. - # Theoretically, we should check for .so only within preprocessor - # blocks like .EQ/.EN or .TS/.TE; but it doesn't harm if we call - # soelim even if we don't need to. - if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} || - $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} || - $Groff{'refer_open'} || $Groff{'refer_close'} || - $Groff{'chem'} ) { - $Groff{'soelim'}++; - } - &process($_, $level + 1) unless /\\/ || $_ eq ""; - } - } - close(FILE); -} - -sub help { - print <; + chomp $version; + close FILE; + open FILE, '<', $top . 'REVISION' || + die 'Could not open top file REVISION.'; + my $revision = ; + chomp $revision; + $at_at{'GROFF_VERSION'} = $version . '.' . $revision; +} else { # after installation} + $at_at{'GROFF_VERSION'} = '@VERSION@'; + $at_at{'BINDIR'} = '@BINDIR@'; + $grog_dir = '@grog_dir@'; +} # before make + +die "$grog_dir is not an existing directory;" unless -d $grog_dir; + + +############# +# import subs + +unshift(@INC, $grog_dir); +require 'subs.pl'; + + +########## +# run subs + +&handle_args(); +&handle_file_ext(); # see $tmac_ext for gotten value +&handle_whole_files(); +&make_groff_device(); +&make_groff_preproc(); +&make_groff_tmac_man_ms() || &make_groff_tmac_others(); +&make_groff_line_rest(); -"groff" options are appended to the output, "-m" options are checked. - -EOF - exit 0; -} - -sub version { - my ($exit_status) = @_; - print "Perl version of GNU $Prog of $Last_Update " . - "in groff version @VERSION@\n"; - exit $exit_status; -} - -{ - my @m = (); - my $is_man = 0; - my $is_mm = 0; - my $is_mom = 0; - - $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'}; - - if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} || - $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} || - $Groff{'chem'} ) { - my $s = "-"; - $s .= "s" if $Groff{'soelim'}; - $s .= "R" if $Groff{'refer'}; - $s .= "G" if $Groff{'grap'}; - $s .= "j" if $Groff{'chem'}; - $s .= "p" if $Groff{'pic'}; - $s .= "g" if $Groff{'grn'}; - $s .= "t" if $Groff{'tbl'}; - $s .= "e" if $Groff{'eqn'}; - push(@Command, $s); - } - - if ( $Groff{'me'} ) { - push(@m, '-me'); - push(@Command, '-me'); - } - if ( $Groff{'SH'} && $Groff{'TH'} ) { - push(@m, '-man'); - push(@Command, '-man'); - $is_man = 1; - } - if ( $Groff{'mom'} ) { - push(@m, '-mom'); - push(@Command, '-mom'); - $is_mom = 1; - } - if ( $Groff{'mm'} || ($Groff{'P'} && ! $is_man) ) { - push(@m, '-mm'); - push(@Command, '-mm'); - $is_mm = 1; - } - if ( $Groff{'NH'} || ($Groff{'TL'} && ! $is_mm) || - ($Groff{'ILP'} && ! $is_man) || - ($Groff{'PP'} && ! $is_mom && ! $is_man) ) { - # .PP occurs in -mom, -man and -ms, .IP and .LP occur in -man and -ms - push(@m, '-ms'); - push(@Command, '-ms'); - } - if ( $Groff{'mdoc'} ) { - my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc'; - push(@m, $s); - push(@Command, $s); - } - - unshift @Command, 'groff'; - push(@Command, @ARGV); - - foreach (@Command) { - next unless /\s/; - $_ = "'" . $_ . "'"; - } - - # We could implement an option to execute the command here. - -# foreach (@Command) { -# next unless /[\$\\\"\';&()|<> \t\n]/; -# s/\'/\'\\\'\'/; -# $_ = "'" . $_ . "'"; -# } - - my $n = scalar @m; - my $np = scalar @Mparams; - print STDERR "$Prog: more than 1 `-m' argument: @Mparams" if $np > 1; - if ($n == 0) { - unshift @Command, $Mparams[0] if $np == 1; - } elsif ($n == 1) { - if ($np == 1) { - print STDERR "$Prog: wrong `-m' argument: $Mparams[0]\n" - if $m[0] ne $Mparams[0]; - } - } else { - print STDERR "$Prog: error: there are several macro packages: @m\n"; - } - - print "@Command\n"; - - exit $n if $n > 1; - exit 0; -} +1; ######################################################################## ### Emacs settings # Local Variables: diff -ruN groff-1.22.2/src/roff/grog/grog.sh groff-1.22.3/src/roff/grog/grog.sh --- groff-1.22.2/src/roff/grog/grog.sh 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/grog/grog.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,279 +0,0 @@ -#! /bin/sh -# grog -- guess options for groff command -# Like doctype in Kernighan & Pike, Unix Programming Environment, pp 306-8. - -# Source file position: /src/roff/grog/grog.sh -# Installed position: /bin/grog - -# Copyright (C) 1993, 2006, 2009, 2011-2012 Free Software Foundation, Inc. -# Written by James Clark, maintained by Werner Lemberg. -# Rewritten by and put under GPL Bernd Warken . - -# This file is part of `grog', 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 (GPL) 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 . - -######################################################################## -Last_Update='22 Jan 2011' -######################################################################## - -soelim=@g@soelim - -opts= -mopt= -nr=0 -sp="([ ]|$)" -double_minus=0 -was_minus=0 -filespec= -had_filespec=0 - -for arg -do - if test _"${double_minus}"_ = _1_ - then - had_filespec=1 - if test -f "${arg}" && test -r "${arg}" - then - case "$arg" in - *" "*) - eval filespec="'${filespec} '"'\"'"'${arg}'"'\"' - ;; - *) - eval filespec="'${filespec} ${arg}'" - ;; - esac - else - echo "grog: ${arg} is not a readable file.">&2 - fi - continue - fi - case "$arg" in - --) - double_minus=1 - ;; - -) - # omit several - - if test _"${was_minus}"_ = _0_ - then - was_minus=1 - filespec="${filespec} -" - fi - ;; - -C) - sp=; opts="$opts -C"; - ;; - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo \ -"Shell version of GNU grog of $Last_Update in groff version @VERSION@"; - exit 0 - ;; - -h|--h|--he|--hel|--help) - cat <&2 - mopt= - fi - ;; - -*) - opts="$opts $arg" - ;; - *) - had_filespec=1 - if test -f "${arg}" && test -r "${arg}" - then - case "$arg" in - *" "*) - eval filespec="'${filespec} '"'\"'"'${arg}'"'\"' - ;; - *) - eval filespec="'${filespec} ${arg}'" - ;; - esac - else - echo "grog: ${arg} is not a readable file.">&2 - fi - ;; - esac -done -if test _"${filespec}"_ = __ && test _"${had_filespec}"_ = _0_ -then - filespec='-' -fi -if test _"${filespec}"_ = __ -then - exit 1 -fi -if test "${double_minus}" = 1 -then - eval files="'-- ${filespec}'" -else - eval files="'${filespec}'" -fi -files=`echo $files|sed s/\"/\'/g` - - -eval sed "'s/[ ]*$//'" '--' "${filespec}" \ -| sed 's/^[ ]*begin[ ][ ]*chem$/.cstart/' \ -| sed 's/^[.'"'"'][ ]*/./' \ -| @EGREP@ -h \ - "^\.(\[|\])|cstart|((P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|NH|TL|TS|TE|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)$sp)" \ -| sed '/^\.so/s/^.*$/.SO_START\ -&\ -.SO_END/' \ -| $soelim \ -| @EGREP@ \ - '^\.(cstart|P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|NH|TL|TS|TE|EQ|TH|TL|NH|SH|\[|\]|R1|GS|G1|PH|SA|SO_START|SO_END)' \ -| awk ' -/^\.SO_START$/ { so = 1 - soelim = soelim||chem||eqn||grap||grn||pic||tbl||refer||(refer_start && !refer_end) } -/^\.SO_END$/ { so = 0 } -/^\.cstart$/ { chem++; if (so > 0) soelim++ } -/^\.TS/ { tbl++; in_tbl = 1; if (so > 0) soelim++; } -/^\.TE/ { in_tbl = 0 } -/^\.PS([ 0-9.<].*)?$/ { pic++; if (so > 0) soelim++ } -/^\.EQ/ { eqn++; if (so > 0) soelim++ } -/^\.R1/ { refer++; if (so > 0) soelim++ } -/^\.\[/ { refer_start++; if (so > 0) soelim++ } -/^\.\]/ { refer_end++; if (so > 0) soelim++ } -/^\.GS/ { grn++; if (so > 0) soelim++ } -/^\.G1/ { grap++; if (so > 0) soelim++ } -/^\.TH/ { if (in_tbl != 1) TH++ } -/^\.PP/ { PP++ } -/^\.TL/ { TL++ } -/^\.NH/ { NH++ } -/^\.[IL]P/ { ILP++ } -/^\.P$/ { P++ } -/^\.SH/ { SH++ } -/^\.(PH|SA)/ { mm++ } -/^\.([pnil]p|sh)/ { me++ } -/^\.Dd/ { mdoc++ } -/^\.(Tp|Dp|De|Cx|Cl)/ { mdoc_old++ } -/^\.(O[oc]|.* O[oc]( |$))/ { - sub(/\\\".*/, "") - gsub(/\"[^\"]*\"/, "") - sub(/\".*/, "") - sub(/^\.Oo/, " Oo ") - sub(/^\.Oc/, " Oc ") - sub(/ Oo$/, " Oo ") - sub(/ Oc$/, " Oc ") - while (/ Oo /) { - sub(/ Oo /, " ") - Oo++ - } - while (/ Oc /) { - sub(/ Oc /, " ") - Oo-- - } -} -/^\.(PRINTSTYLE|START)/ { mom++ } - -END { - printf "groff" - refer = refer || (refer_start && refer_end) - if (pic > 0 || tbl > 0 || grn > 0 || grap > 0 || - eqn > 0 || refer > 0 || chem > 0) { - printf " -" - if (soelim > 0) printf "s" - if (refer > 0) printf "R" - if (grn > 0) printf "g" - if (chem > 0) printf "j" - if (grap > 0) printf "G" - if (pic > 0) printf "p" - if (tbl > 0) printf "t" - if (eqn > 0) printf "e" - } - mnr = 0 - m = "" - is_man = 0 - is_mm = 0 - is_mom = 0 - # me - if (me > 0) { - mnr++; m = "-me"; printf " -me" - } - # man - if (SH > 0 && TH > 0) { - mnr++; m = "-man"; printf " -man"; is_man = 1 - } - # mom - if (mom > 0) { - mnr++; m = "-mom"; printf " -mom"; is_mom = 1 - } - # mm - if ( mm > 0 || (P > 0 && is_man == 0) ) { - mnr++; m = "-mm"; printf " -mm"; is_mm = 1 - } - # ms - if ( NH > 0 || (TL > 0 && is_mm == 0) || (ILP > 0 && is_man == 0) || - (PP > 0 && is_mom == 0 && is_man == 0) ) { - # .TL also occurs in -mm, .IP and .LP also occur in -man - # .PP also occurs in -mom and -man - mnr++; m = "-ms"; printf " -ms" - } - # mdoc - if (mdoc > 0) { - mnr++ - if (mdoc_old > 0 || Oo > 0) { - m = "-mdoc-old"; printf " -mdoc-old" - } - else { - m = "-mdoc"; printf " -mdoc" - } - } - - if (mnr == 0) { - if (mopt != "") - printf "%s", mopt - } - - if (opts != "") - printf "%s", opts - if (files != "") - printf " %s", files - print "" - - if (mnr == 1) { - if (mopt != "" && m != mopt) - printf "grog: wrong option %s\n", mopt | "cat 1>&2" - } - if (mnr >= 2) { - err = "grog: error: there are several -m* arguments" - printf "%s\n", err | "cat 1>&2" - exit mnr - } -}' "opts=$opts" "mopt=$mopt" "files=$files" - diff -ruN groff-1.22.2/src/roff/grog/Makefile.sub groff-1.22.3/src/roff/grog/Makefile.sub --- groff-1.22.2/src/roff/grog/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/grog/Makefile.sub 2014-11-04 09:38:35.523520271 +0100 @@ -1,10 +1,8 @@ -# Makefile.sub for `grog' (integration into the `groff' source tree) +# Makefile.sub for `grog' # File position: /src/roff/grog/Makefile.sub -# Copyright (C) 1993, 2006, 2009 Free Software Foundation, Inc. - -# Last update: 5 Jan 2009 +# Copyright (C) 1993-2014 Free Software Foundation, Inc. # This file is part of `grog' which is part of `groff'. @@ -24,34 +22,58 @@ ######################################################################## MAN1=grog.n -MOSTLYCLEANADD=grog +MOSTLYCLEANADD=grog $(MAN1) + +# not all make programs have $(RM) predefined. +RM=rm -f all: grog $(MAN1) -grog: grog.pl grog.sh $(SH_DEPS_SED_SCRIPT) - -@rm -f $@; - if test -n "$(PERLPATH)" && test -f "$(PERLPATH)" && \ - "$(PERLPATH)" -e 'require v5.6'; then \ - echo 'Using the Perl version for grog.'; \ - sed -f "$(SH_DEPS_SED_SCRIPT)" \ - -e "s|@VERSION@|$(version)$(revision)|" \ - -e "$(SH_SCRIPT_SED_CMD)" \ - $(srcdir)/grog.pl >$@; \ - else \ - echo 'Using the shell version for grog.'; \ - sed -f "$(SH_DEPS_SED_SCRIPT)" \ - -e "s|@g@|$(g)|g" \ - -e "s|@EGREP@|$(EGREP)|g" \ - -e "s|@VERSION@|$(version)$(revision)|" \ - -e "$(SH_SCRIPT_SED_CMD)" \ - $(srcdir)/grog.sh >$@; \ - fi +# lib .pl-files +GROG=$(srcdir)/subs.pl +GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'` + + +# Perl version works for all parts of `groff'. + +grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT) + $(RM) $@ + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "1s|^\(#! \).*perl|\\1$(PERL)|" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ + -e "s|@grog_dir@|$(DESTDIR)$(grog_dir)|g" \ + -e "s|@EGREP@|$(EGREP)|g" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e "$(SH_SCRIPT_SED_CMD)" \ + $(srcdir)/grog.pl >$@ chmod +x $@ +.PHONY: install_data install_data: grog - -@test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -@rm -f $(DESTDIR)$(bindir)/grog + -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(bindir)/grog $(INSTALL_SCRIPT) grog $(DESTDIR)$(bindir)/grog + -test -d $(DESTDIR)$(grog_dir) || $(mkinstalldirs) $(DESTDIR)$(grog_dir) + for f in $(GROG_); do \ + $(RM) $(DESTDIR)$(grog_dir)/$$f; \ + $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(grog_dir)/$$f; \ + done +.PHONY: uninstall_data uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/grog + $(RM) $(DESTDIR)$(bindir)/grog + -for f in $(GROG_); do \ + $(RM) $(DESTDIR)$(grog_dir)/$$f; \ + done + -d=$(DESTDIR)$(grog_dir);\ + if test -d $$d; then rmdir $$d; fi + + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/roff/grog/subs.pl groff-1.22.3/src/roff/grog/subs.pl --- groff-1.22.2/src/roff/grog/subs.pl 1970-01-01 01:00:00.000000000 +0100 +++ groff-1.22.3/src/roff/grog/subs.pl 2014-11-04 09:38:35.523520271 +0100 @@ -0,0 +1,1238 @@ +#! /usr/bin/env perl +# grog - guess options for groff command +# Inspired by doctype script in Kernighan & Pike, Unix Programming +# Environment, pp 306-8. + +# Source file position: /src/roff/grog/subs.pl +# Installed position: /lib/grog/subs.pl + +# Copyright (C) 1993-2014 Free Software Foundation, Inc. +# This file was split from grog.pl and put under GPL2 by +# Bernd Warken . +# The macros for identifying the devices were taken from Ralph +# Corderoy's `grog.sh' of 2006. + +# This file is part of `grog', which is part of `groff'. + +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 can get the license text for the GNU General Public License +# version 2 in the internet at +# . + +######################################################################## + +require v5.6; + +use warnings; +use strict; + +use File::Spec; + +# printing of hashes: my %hash = ...; print Dumper(\%hash); +use Data::Dumper; + +$\ = "\n"; + +# my $Sp = "[\\s\\n]"; +# my $Sp = qr([\s\n]); +# my $Sp = '' if $arg eq '-C'; +my $Sp = ''; + +# from `src/roff/groff/groff.cpp' near `getopt_long' +my $groff_opts = + 'abcCd:D:eEf:F:gGhiI:jJkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ'; + +my @Command = (); # stores the final output +my @Mparams = (); # stores the options `-m*' +my @devices = (); +my $do_run = 0; # run generated `groff' command +my $pdf_with_ligatures = 0; # `-P-y -PU' for `pdf' device +my $with_warnings = 0; + +my $Prog = $0; +{ + my ($v, $d, $f) = File::Spec->splitpath($Prog); + $Prog = $f; +} + + +my %macros; +my %Groff = + ( + # preprocessors + 'chem' => 0, + 'eqn' => 0, + 'gperl' => 0, + 'grap' => 0, + 'grn' => 0, + 'gideal' => 0, + 'gpinyin' => 0, + 'lilypond' => 0, + + 'pic' => 0, + 'PS' => 0, # opening for pic + 'PF' => 0, # alternative opening for pic + 'PE' => 0, # closing for pic + + 'refer' => 0, + 'refer_open' => 0, + 'refer_close' => 0, + 'soelim' => 0, + 'tbl' => 0, + + # tmacs +# 'man' => 0, +# 'mandoc' => 0, +# 'mdoc' => 0, +# 'mdoc_old' => 0, +# 'me' => 0, +# 'mm' => 0, +# 'mom' => 0, +# 'ms' => 0, + + # requests + 'AB' => 0, # ms + 'AE' => 0, # ms + 'AI' => 0, # ms + 'AU' => 0, # ms + 'NH' => 0, # ms + 'TL' => 0, # ms + 'UL' => 0, # ms + 'XP' => 0, # ms + + 'IP' => 0, # man and ms + 'LP' => 0, # man and ms + 'P' => 0, # man and ms + 'PP' => 0, # man and ms + 'SH' => 0, # man and ms + + 'OP' => 0, # man + 'SS' => 0, # man + 'SY' => 0, # man + 'TH' => 0, # man + 'TP' => 0, # man + 'UR' => 0, # man + 'YS' => 0, # man + + # for mdoc and mdoc-old + # .Oo and .Oc for modern mdoc, only .Oo for mdoc-old + 'Oo' => 0, # mdoc and mdoc-old + 'Oc' => 0, # mdoc + 'Dd' => 0, # mdoc + ); # end of %Groff + + +# for first line check +my %preprocs_tmacs = + ( + 'chem' => 0, + 'eqn' => 0, + 'gideal' => 0, + 'gpinyin' => 0, + 'grap' => 0, + 'grn' => 0, + 'pic' => 0, + 'refer' => 0, + 'soelim' => 0, + 'tbl' => 0, + + 'geqn' => 0, + 'gpic' => 0, + 'neqn' => 0, + + 'man' => 0, + 'mandoc' => 0, + 'mdoc' => 0, + 'mdoc-old' => 0, + 'me' => 0, + 'mm' => 0, + 'mom' => 0, + 'ms' => 0, + ); + +my @filespec; + +my $tmac_ext = ''; + + +######################################################################## +# handle_args() +######################################################################## + +sub handle_args { + my $double_minus = 0; + my $was_minus = 0; + my $was_T = 0; + my $optarg = 0; + # globals: @filespec, @Command, @devices, @Mparams + + foreach my $arg (@ARGV) { + + if ( $optarg ) { + push @Command, $arg; + $optarg = 0; + next; + } + + if ( $double_minus ) { + if (-f $arg && -r $arg) { + push @filespec, $arg; + } else { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + "grog: $arg is not a readable file."; + } + next; + } + + if ( $was_T ) { + push @devices, $arg; + $was_T = 0; + next; + } +####### handle_args() + + unless ( $arg =~ /^-/ ) { # file name, no opt, no optarg + unless (-f $arg && -r $arg) { + print 'unknown file name: ' . $arg; + } + push @filespec, $arg; + next; + } + + # now $arg starts with `-' + + if ($arg eq '-') { + unless ($was_minus) { + push @filespec, $arg; + $was_minus = 1; + } + next; + } + + if ($arg eq '--') { + $double_minus = 1; + push(@filespec, $arg); + next; + } + + &version() if $arg =~ /^--?v/; # --version, with exit + &help() if $arg =~ /--?h/; # --help, with exit + + if ( $arg =~ /^--r/ ) { # --run, no exit + $do_run = 1; + next; + } + + if ( $arg =~ /^--wa/ ) { # --warnings, no exit + $with_warnings = 1; + next; + } +####### handle_args() + + if ( $arg =~ /^--(wi|l)/ ) { # --ligatures, no exit + # the old --with_ligatures is only kept for compatibility + $pdf_with_ligatures = 1; + next; + } + + if ($arg =~ /^-m/) { + push @Mparams, $arg; + next; + } + + if ($arg =~ /^-T$/) { + $was_T = 1; + next; + } + + if ($arg =~ s/^-T(\w+)$/$1/) { + push @devices, $1; + next; + } + + if ($arg =~ /^-(\w)(\w*)$/) { # maybe a groff option + my $opt_char = $1; + my $opt_char_with_arg = $opt_char . ':'; + my $others = $2; + if ( $groff_opts =~ /$opt_char_with_arg/ ) { # groff optarg + if ( $others ) { # optarg is here + push @Command, '-' . $opt_char; + push @Command, '-' . $others; + next; + } + # next arg is optarg + $optarg = 1; + next; +####### handle_args() + } elsif ( $groff_opts =~ /$opt_char/ ) { # groff no optarg + push @Command, '-' . $opt_char; + if ( $others ) { # $others is now an opt collection + $arg = '-' . $others; + redo; + } + # arg finished + next; + } else { # not a groff opt + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'unknown argument ' . $arg; + push(@Command, $arg); + next; + } + } + } + @filespec = ('-') unless (@filespec); +} # handle_args() + + + +######################################################################## +# handle_file_ext() +######################################################################## + +sub handle_file_ext { + # get tmac from file name extension + # output number of found single tmac + + # globals: @filespec, $tmac_ext; + + foreach my $file ( @filespec ) { + # test for each file name in the arguments + unless ( open(FILE, $file eq "-" ? $file : "< $file") ) { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + "$Prog: can't open \`$file\': $!"; + next; + } + + next unless ( $file =~ /\./ ); # file name has no dot `.' + +##### handle_file_ext() + # get extension + my $ext = $file; + $ext =~ s/^ + .* + \. + ([^.]*) + $ + /$1/x; + next unless ( $ext ); + +##### handle_file_ext() + # these extensions are correct, but not based on a tmac + next if ( $ext =~ /^( + chem| + eqn| + pic| + tbl| + ref| + t| + tr| + g| + groff| + roff| + www| + hdtbl| + grap| + grn| + pdfroff| + pinyin + )$/x ); + +##### handle_file_ext() + # extensions for man tmac + if ( $ext =~ /^( + [1-9lno]| + man| + n| + 1b + )$/x ) { + # `man|n' from `groff' source + # `1b' from `heirloom' + # `[1-9lno]' from man-pages + if ( $tmac_ext && $tmac_ext ne 'man' ) { + # found tmac is not 'man' + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + '2 different file name extensions found ' . + $tmac_ext . ' and ' . $ext; + $tmac_ext = ''; + next; + } + +##### handle_file_ext() + $tmac_ext = 'man'; + next; + } + + if ( $ext =~ /^( + mandoc| + mdoc| + me| + mm| + mmse| + mom| + ms| + $)/x ) { + if ( $tmac_ext && $tmac_ext ne $ext ) { + # found tmac is not identical to former found tmac +##### handle_file_ext() + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + '2 different file name extensions found ' . + $tmac_ext . ' and ' . $ext; + $tmac_ext = ''; + next; + } + + $tmac_ext = $ext; + next; + } + + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'Unknown file name extension '. $file . '.'; + next; + } # end foreach file + + 1; +} # handle_file_ext() + + +######################################################################## +# handle_whole_files() +######################################################################## + +sub handle_whole_files { + # globals: @filespec + + foreach my $file ( @filespec ) { + unless ( open(FILE, $file eq "-" ? $file : "< $file") ) { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + "$Prog: can't open \`$file\': $!"; + next; + } + my $line = ; # get single line + + unless ( defined($line) ) { + # empty file, go to next filearg + close (FILE); + next; + } + + if ( $line ) { + chomp $line; + unless ( &do_first_line( $line, $file ) ) { + # not an option line + &do_line( $line, $file ); + } + } else { # emptry line + next; + } + + while () { # get lines by and by + chomp; + &do_line( $_, $file ); + } + close(FILE); + } # end foreach +} # handle_whole_files() + + +######################################################################## +# do_first_line() +######################################################################## + +# As documented for the `man' program, the first line can be +# used as a groff option line. This is done by: +# - start the line with '\" (apostrophe, backslash, double quote) +# - add a space character +# - a word using the following characters can be appended: `egGjJpRst'. +# Each of these characters means an option for the generated +# `groff' command line, e.g. `-t'. + +sub do_first_line { + my ( $line, $file ) = @_; + + # globals: %preprocs_tmacs + + # For a leading groff options line use only [egGjJpRst] + if ( $line =~ /^[.']\\"[\segGjJpRst]+&/ ) { + # this is a groff options leading line + if ( $line =~ /^\./ ) { + # line is a groff options line with . instead of ' + print "First line in $file must start with an apostrophe \ " . + "instead of a period . for groff options line!"; + } + + if ( $line =~ /j/ ) { + $Groff{'chem'}++; + } + if ( $line =~ /e/ ) { + $Groff{'eqn'}++; + } + if ( $line =~ /g/ ) { + $Groff{'grn'}++; + } + if ( $line =~ /G/ ) { + $Groff{'grap'}++; + } + if ( $line =~ /i/ ) { + $Groff{'gideal'}++; + } + if ( $line =~ /p/ ) { + $Groff{'pic'}++; + } + if ( $line =~ /R/ ) { + $Groff{'refer'}++; + } + if ( $line =~ /s/ ) { + $Groff{'soelim'}++; + } +####### do_first_line() + if ( $line =~ /t/ ) { + $Groff{'tbl'}++; + } + return 1; # a leading groff options line, 1 means yes, 0 means no + } + + # not a leading short groff options line + + return 0 if ( $line !~ /^[.']\\"\s*(.*)$/ ); # ignore non-comments + + return 0 unless ( $1 ); # for empty comment + + # all following array members are either preprocs or 1 tmac + my @words = split '\s+', $1; + + my @in = (); + my $word; + for $word ( @words ) { + if ( $word eq 'ideal' ) { + $word = 'gideal'; + } elsif ( $word eq 'gpic' ) { + $word = 'pic'; + } elsif ( $word =~ /^(gn|)eqn$/ ) { + $word = 'eqn'; + } + if ( exists $preprocs_tmacs{$word} ) { + push @in, $word; + } else { + # not word for preproc or tmac + return 0; + } + } + + for $word ( @in ) { + $Groff{$word}++; + } +} # do_first_line() + + +######################################################################## +# do_line() +######################################################################## + +sub do_line { + my ( $line, $file ) = @_; + + return if ( $line =~ /^[.']\s*\\"/ ); # comment + + return unless ( $line =~ /^[.']/ ); # ignore text lines + + $line =~ s/^['.]\s*/./; # let only a dot as leading character, + # remove spaces after the leading dot + $line =~ s/\s+$//; # remove final spaces + + return if ( $line =~ /^\.$/ ); # ignore . + return if ( $line =~ /^\.\.$/ ); # ignore .. + + # split command + $line =~ /^(\.\w+)\s*(.*)$/; + my $command = $1; + $command = '' unless ( defined $command ); + my $args = $2; + $args = '' unless ( defined $args ); + + + ###################################################################### + # soelim + if ( $line =~ /^\.(do)?\s*(so|mso|PS\s*<|SO_START).*$/ ) { + # `.so', `.mso', `.PS<...', `.SO_START' + $Groff{'soelim'}++; + return; + } + if ( $line =~ /^\.(do)?\s*(so|mso|PS\s*<|SO_START).*$/ ) { + # `.do so', `.do mso', `.do PS<...', `.do SO_START' + $Groff{'soelim'}++; + return; + } +####### do_line() + + ###################################################################### + # macros + + if ( $line =~ /^\.de1?\W?/ ) { + # this line is a macro definition, add it to %macros + my $macro = $line; + $macro =~ s/^\.de1?\s+(\w+)\W*/.$1/; + return if ( exists $macros{$macro} ); + $macros{$macro} = 1; + return; + } + + + # if line command is a defined macro, just ignore this line + return if ( exists $macros{$command} ); + + + ###################################################################### + # preprocessors + + if ( $command =~ /^(\.cstart)|(begin\s+chem)$/ ) { + $Groff{'chem'}++; # for chem + return; + } + if ( $command =~ /^\.EQ$/ ) { + $Groff{'eqn'}++; # for eqn + return; + } + if ( $command =~ /^\.G1$/ ) { + $Groff{'grap'}++; # for grap + return; + } + if ( $command =~ /^\.Perl/ ) { + $Groff{'gperl'}++; # for gperl + return; + } + if ( $command =~ /^\.pinyin/ ) { + $Groff{'gpinyin'}++; # for gperl + return; + } + if ( $command =~ /^\.GS$/ ) { + $Groff{'grn'}++; # for grn + return; + } + if ( $command =~ /^\.IS$/ ) { + $Groff{'gideal'}++; # preproc gideal for ideal + return; + } + if ( $command =~ /^\.lilypond$/ ) { + $Groff{'lilypond'}++; # for glilypond + return; + } + +####### do_line() + + # pic can be opened by .PS or .PF and closed by .PE + if ( $command =~ /^\.PS$/ ) { + $Groff{'pic'}++; # normal opening for pic + return; + } + if ( $command =~ /^\.PF$/ ) { + $Groff{'PF'}++; # alternate opening for pic + return; + } + if ( $command =~ /^\.PE$/ ) { + $Groff{'PE'}++; # closing for pic + return; + } + + if ( $command =~ /^\.R1$/ ) { + $Groff{'refer'}++; # for refer + return; + } + if ( $command =~ /^\.\[$/ ) { + $Groff{'refer_open'}++; # for refer open + return; + } + if ( $command =~ /^\.\]$/ ) { + $Groff{'refer_close'}++; # for refer close + return; + } + if ( $command =~ /^\.TS$/ ) { + $Groff{'tbl'}++; # for tbl + return; + } + + + ###################################################################### + # macro package (tmac) + ###################################################################### + + ########## + # modern mdoc + + if ( $command =~ /^\.(Dd)$/ ) { + $Groff{'Dd'}++; # for modern mdoc + return; + } + +####### do_line() + # In the old version of -mdoc `Oo' is a toggle, in the new it's + # closed by `Oc'. + if ( $command =~ /^\.Oc$/ ) { + $Groff{'Oc'}++; # only for modern mdoc + return; + } + + + ########## + # old and modern mdoc + + if ( $command =~ /^\.Oo$/ ) { + $Groff{'Oo'}++; # for mdoc and mdoc-old + return; + } + + + ########## + # old mdoc + if ( $command =~ /^\.(Tp|Dp|De|Cx|Cl)$/ ) { + $Groff{'mdoc_old'}++; # true for old mdoc + return; + } + + + ########## + # for ms + +####### do_line() + if ( $command =~ /^\.AB$/ ) { + $Groff{'AB'}++; # for ms + return; + } + if ( $command =~ /^\.AE$/ ) { + $Groff{'AE'}++; # for ms + return; + } + if ( $command =~ /^\.AI$/ ) { + $Groff{'AI'}++; # for ms + return; + } + if ( $command =~ /^\.AU$/ ) { + $Groff{'AU'}++; # for ms + return; + } + if ( $command =~ /^\.NH$/ ) { + $Groff{'NH'}++; # for ms + return; + } + if ( $command =~ /^\.TL$/ ) { + $Groff{'TL'}++; # for ms + return; + } + if ( $command =~ /^\.XP$/ ) { + $Groff{'XP'}++; # for ms + return; + } + + + ########## + # for man and ms + + if ( $command =~ /^\.IP$/ ) { + $Groff{'IP'}++; # for man and ms + return; + } + if ( $command =~ /^\.LP$/ ) { + $Groff{'LP'}++; # for man and ms + return; + } +####### do_line() + if ( $command =~ /^\.P$/ ) { + $Groff{'P'}++; # for man and ms + return; + } + if ( $command =~ /^\.PP$/ ) { + $Groff{'PP'}++; # for man and ms + return; + } + if ( $command =~ /^\.SH$/ ) { + $Groff{'SH'}++; # for man and ms + return; + } + if ( $command =~ /^\.UL$/ ) { + $Groff{'UL'}++; # for man and ms + return; + } + + + ########## + # for man only + + if ( $command =~ /^\.OP$/ ) { # for man + $Groff{'OP'}++; + return; + } + if ( $command =~ /^\.SS$/ ) { # for man + $Groff{'SS'}++; + return; + } + if ( $command =~ /^\.SY$/ ) { # for man + $Groff{'SY'}++; + return; + } + if ( $command =~ /^\.TH$/ ) { + $Groff{'TH'}++; # for man + return; + } + if ( $command =~ /^\.TP$/ ) { # for man + $Groff{'TP'}++; + return; + } + if ( $command =~ /^\.UR$/ ) { + $Groff{'UR'}++; # for man + return; + } + if ( $command =~ /^\.YS$/ ) { # for man + $Groff{'YS'}++; + return; + } +####### do_line() + + + ########## + # me + + if ( $command =~ /^\.( + [ilnp]p| + sh + )$/x ) { + $Groff{'me'}++; # for me + return; + } + + + ############# + # mm and mmse + + if ( $command =~ /^\.( + H| + MULB| + LO| + LT| + NCOL| + P\$| + PH| + SA + )$/x ) { + $Groff{'mm'}++; # for mm and mmse + if ( $command =~ /^\.LO$/ ) { + if ( $args =~ /^(DNAMN|MDAT|BIL|KOMP|DBET|BET|SIDOR)/ ) { + $Groff{'mmse'}++; # for mmse + } + } elsif ( $command =~ /^\.LT$/ ) { + if ( $args =~ /^(SVV|SVH)/ ) { + $Groff{'mmse'}++; # for mmse + } + } + return; + } +####### do_line() + + ########## + # mom + + if ( $line =~ /^\.( + ALD| + DOCTYPE| + FAMILY| + FT| + FAM| + LL| + LS| + NEWPAGE| + PAGE| + PAPER| + PRINTSTYLE| + PT_SIZE| + T_MARGIN + )$/x ) { + $Groff{'mom'}++; # for mom + return; + } + +} # do_line() + + +######################################################################## +# sub make_groff_device +######################################################################## + +my @m = (); +my @preprograms = (); +my $correct_tmac = ''; + +sub make_groff_device { + # globals: @devices + + # default device is empty, i.e. it is `ps' when without `-T' + return '' unless ( @devices ); + + for ( @devices ) { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + $_ . ': not a suitable device' + unless ( + /^( + dvi| + html| + xhtml| + lbp| + lj4| + ps| + pdf| + ascii| + cp1047| + latin1| + utf8 + )$/x ); + } + +###### make_groff_device() + my $device = pop( @devices ); + if ( @devices ) { + for ( @devices ) { + next if ( $_ eq $device ); + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'additional device: ' . $_; + } + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'device ' . $device . ' taken instead'; + } + + return '' unless ( $device ); + push @Command, '-T'; + push @Command, $device; + +###### make_groff_device() + if ( $device eq 'pdf' ) { + if ( $pdf_with_ligatures ) { # with --ligature argument + push( @Command, '-P-y' ); + push( @Command, '-PU' ); + } else { # no --ligature argument + if ( $with_warnings ) { + print STDERR < 1 ) { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'argument for -m found: ' . @m; + } + +###### make_groff_line() + + my $nr_m_args = scalar @Mparams; # m-arguments for grog + my $last_m_arg = ''; # last provided -m option + if ( $nr_m_args > 1 ) { + # take the last given -m argument of grog call, + # ignore other -m arguments and the found ones + $last_m_arg = $Mparams[-1]; # take the last -m argument + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + $Prog . ": more than 1 `-m' argument: @Mparams"; + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'We take the last one: ' . $last_m_arg; + } elsif ( $nr_m_args == 1 ) { + $last_m_arg = $Mparams[0]; + } + + my $final_m = ''; + if ( $last_m_arg ) { + my $is_equal = 0; + for ( @m ) { + if ( $_ eq $last_m_arg ) { + $is_equal = 1; + last; + } + next; + } # end for @m + if ( $is_equal ) { + $final_m = $last_m_arg; + } else { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'Provided -m argument ' . $last_m_arg . + ' differs from guessed -m args: ' . @m; + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'The argument is taken.'; + $final_m = $last_m_arg; + } +###### make_groff_line() + } else { # no -m arg provided + if ( $nr_m_guessed > 1 ) { + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . + 'More than 1 -m arguments were guessed: ' . @m; + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . 'Guessing stopped.'; + exit 1; + } elsif ( $nr_m_guessed == 1 ) { + $final_m = $m[0]; + } else { + # no -m provided or guessed + } + } + push @Command, $final_m if ( $final_m ); + + push(@Command, @filespec) unless ( $file_args_included ); + + ######### + # execute the `groff' command here with option `--run' + if ( $do_run ) { # with --run + print STDERR __FILE__ . ' ' . __LINE__ . ': ' . "@Command"; + my $cmd = join ' ', @Command; + system($cmd); + } else { + print "@Command"; + } + + exit 0; +} # make_groff_line() + + +######################################################################## +# sub help +######################################################################## + +sub help { + print </src/roff/nroff/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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=nroff.n NAMEPREFIX=$(g) MOSTLYCLEANADD=nroff +RM=rm -f all: nroff nroff: nroff.sh $(SH_DEPS_SED_SCRIPT) - rm -f $@ + $(RM) $@ sed -f $(SH_DEPS_SED_SCRIPT) \ - -e $(SH_SCRIPT_SED_CMD) \ - -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/nroff.sh >$@ + -e $(SH_SCRIPT_SED_CMD) \ + -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/nroff.sh >$@ chmod +x $@ install_data: nroff -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)nroff + $(RM) $(DESTDIR)$(bindir)/$(NAMEPREFIX)nroff $(INSTALL_SCRIPT) nroff $(DESTDIR)$(bindir)/$(NAMEPREFIX)nroff uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/$(NAMEPREFIX)nroff + $(RM) $(DESTDIR)$(bindir)/$(NAMEPREFIX)nroff + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/roff/nroff/nroff.man groff-1.22.3/src/roff/nroff/nroff.man --- groff-1.22.2/src/roff/nroff/nroff.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/nroff/nroff.man 2014-11-04 09:38:35.526520234 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2001, 2002, 2003, 2005, 2007, 2009 - Free Software Foundation, Inc. +.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@nroff \- emulate nroff command with groff +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,12 +26,9 @@ the original English. .. . -.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -.SH NAME -@g@nroff \- emulate nroff command with groff -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .\" Redefine OP because no spaces are allowed after an option's argument. .de OP @@ -53,12 +58,16 @@ .B \-\-version .YS . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. The .B @g@nroff script emulates the .B nroff command using groff. +. Only .BR ascii , .BR latin1 , @@ -69,7 +78,8 @@ .BR nroff to select the output encoding emitted by .BR grotty , -groff's TTY output device. +groff\[aq]s TTY output device. +. If neither the .B GROFF_TYPESETTER environment variable nor the @@ -78,6 +88,7 @@ specifies a (valid) device, .B @g@nroff checks the current locale to select a default output device. +. It first tries the .B locale program, then the environment variables @@ -88,6 +99,8 @@ and finally the .B LESSCHARSET environment variable. +. +. .PP The .B \-h @@ -95,12 +108,13 @@ .B \-c options are equivalent to -.BR grotty 's +.BR grotty \[aq]s options .B \-h (using tabs in the output) and .B \-c (using the old output scheme instead of SGR escape sequences). +. The .BR \-d , .BR \-C , @@ -115,6 +129,7 @@ .B \-W options have the effect described in .BR @g@troff (@MAN1EXT@). +. In addition, .B @g@nroff silently ignores the options @@ -124,6 +139,7 @@ .BR \-s (which are not implemented in .BR @g@troff ). +. Options .B \-p (pic), @@ -134,6 +150,7 @@ .B \-U (unsafe) are passed to .BR groff . +. .B \-v and .B \-\-version @@ -141,32 +158,53 @@ .B \-\-help prints a help message. . +. +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP .SM .B GROFF_TYPESETTER The default device for .BR groff . -If not set (which is the normal case), it defaults to `ps'. +If not set (which is the normal case), it defaults to \[oq]ps\[cq]. . .TP .SM .B GROFF_BIN_PATH A colon separated list of directories in which to search for the .B groff -executable before searching in PATH. If unset, `@BINDIR@' is used. +executable before searching in PATH. +. +If unset, \[oq]@BINDIR@\[cq] is used. . +. +.\" -------------------------------------------------------------------- .SH NOTES +.\" -------------------------------------------------------------------- +. This shell script is basically intended for use with .BR man (1). nroff-style character definitions (in the file tty-char.tmac) are also loaded to emulate unrepresentable glyphs. . +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR grotty (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/roff/nroff/nroff.sh groff-1.22.3/src/roff/nroff/nroff.sh --- groff-1.22.2/src/roff/nroff/nroff.sh 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/roff/nroff/nroff.sh 2014-11-04 09:38:35.526520234 +0100 @@ -1,9 +1,7 @@ #! /bin/sh # Emulate nroff with groff. # -# Copyright (C) 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003, -# 2004, 2005, 2007, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2014 Free Software Foundation, Inc. # # Written by James Clark, maintained by Werner Lemberg. diff -ruN groff-1.22.2/src/roff/troff/charinfo.h groff-1.22.3/src/roff/troff/charinfo.h --- groff-1.22.2/src/roff/troff/charinfo.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/charinfo.h 2014-11-04 09:38:35.201524297 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2006, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/column.cpp groff-1.22.3/src/roff/troff/column.cpp --- groff-1.22.2/src/roff/troff/column.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/column.cpp 2014-11-04 09:38:35.201524297 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/dictionary.cpp groff-1.22.3/src/roff/troff/dictionary.cpp --- groff-1.22.2/src/roff/troff/dictionary.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/dictionary.cpp 2014-11-04 09:38:35.201524297 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/dictionary.h groff-1.22.3/src/roff/troff/dictionary.h --- groff-1.22.2/src/roff/troff/dictionary.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/dictionary.h 2014-11-04 09:38:35.201524297 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/div.cpp groff-1.22.3/src/roff/troff/div.cpp --- groff-1.22.2/src/roff/troff/div.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/div.cpp 2014-11-04 09:38:35.201524297 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/div.h groff-1.22.3/src/roff/troff/div.h --- groff-1.22.2/src/roff/troff/div.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/div.h 2014-11-04 09:38:35.202524284 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/env.cpp groff-1.22.3/src/roff/troff/env.cpp --- groff-1.22.2/src/roff/troff/env.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/env.cpp 2014-11-04 09:38:35.202524284 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000-2006, 2009, 2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/env.h groff-1.22.3/src/roff/troff/env.h --- groff-1.22.2/src/roff/troff/env.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/env.h 2014-11-04 09:38:35.202524284 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2005, - 2006, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/hvunits.h groff-1.22.3/src/roff/troff/hvunits.h --- groff-1.22.2/src/roff/troff/hvunits.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/hvunits.h 2014-11-04 09:38:35.202524284 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/input.cpp groff-1.22.3/src/roff/troff/input.cpp --- groff-1.22.2/src/roff/troff/input.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/input.cpp 2014-11-04 09:38:35.203524272 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000-2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -6001,85 +6000,365 @@ } // .psbb - +// +// Extract bounding box limits from PostScript file, and assign +// them to the following four gtroff registers:-- +// static int llx_reg_contents = 0; static int lly_reg_contents = 0; static int urx_reg_contents = 0; static int ury_reg_contents = 0; -struct bounding_box { - int llx, lly, urx, ury; -}; +// Manifest constants to specify the status of bounding box range +// acquisition; (note that PSBB_RANGE_IS_BAD is also suitable for +// assignment as a default ordinate property value). +// +#define PSBB_RANGE_IS_BAD 0 +#define PSBB_RANGE_IS_SET 1 +#define PSBB_RANGE_AT_END 2 + +// Maximum input line length, for DSC conformance, and options to +// control how it will be enforced; caller should select either of +// DSC_LINE_MAX_IGNORED, to allow partial line collection spread +// across multiple calls, or DSC_LINE_MAX_ENFORCE, to truncate +// excess length lines at the DSC limit. +// +// Note that DSC_LINE_MAX_CHECKED is reserved for internal use by +// ps_locator::get_line(), and should not be specified in any call; +// also, handling of DSC_LINE_MAX_IGNORED, as a get_line() option, +// is currently unimplemented. +// +#define DSC_LINE_MAX 255 +#define DSC_LINE_MAX_IGNORED -1 +#define DSC_LINE_MAX_ENFORCE 0 +#define DSC_LINE_MAX_CHECKED 1 + +// Input characters to be considered as white space, when reading +// PostScript file comments. +// +cset white_space("\n\r \t"); -/* Parse the argument to a %%BoundingBox comment. Return 1 if it -contains 4 numbers, 2 if it contains (atend), 0 otherwise. */ +// Class psbb_locator +// +// This locally declared and implemented class provides the methods +// to be used for retrieval of bounding box properties from a specified +// PostScript or PDF file. +// +class psbb_locator +{ + public: + // Only the class constructor is exposed publicly; instantiation of + // a class object will retrieve the requisite bounding box properties + // from the specified file, and assign them to gtroff registers. + // + psbb_locator(const char *); + + private: + FILE *fp; + const char *filename; + char buf[2 + DSC_LINE_MAX]; + int llx, lly, urx, ury; + + // CRLF handling hook, for get_line() function. + // + int lastc; + + // Private method functions facilitate implementation of the + // class constructor; none are used in any other context. + // + int get_line(int); + inline bool get_header_comment(void); + inline const char *context_args(const char *); + inline const char *context_args(const char *, const char *); + inline const char *bounding_box_args(void); + int parse_bounding_box(const char *); + inline void assign_registers(void); + inline int skip_to_trailer(void); +}; -int parse_bounding_box(char *p, bounding_box *bb) -{ - if (sscanf(p, "%d %d %d %d", - &bb->llx, &bb->lly, &bb->urx, &bb->ury) == 4) - return 1; - else { - /* The Document Structuring Conventions say that the numbers - should be integers. Unfortunately some broken applications - get this wrong. */ - double x1, x2, x3, x4; - if (sscanf(p, "%lf %lf %lf %lf", &x1, &x2, &x3, &x4) == 4) { - bb->llx = (int)x1; - bb->lly = (int)x2; - bb->urx = (int)x3; - bb->ury = (int)x4; - return 1; - } - else { - for (; *p == ' ' || *p == '\t'; p++) - ; - if (strncmp(p, "(atend)", 7) == 0) { - return 2; +// psbb_locator class constructor. +// +psbb_locator::psbb_locator(const char *fname): +filename(fname), llx(0), lly(0), urx(0), ury(0), lastc(EOF) +{ + // PS files might contain non-printable characters, such as ^Z + // and CRs not followed by an LF, so open them in binary mode. + // + fp = include_search_path.open_file_cautious(filename, 0, FOPEN_RB); + if (fp) { + // After successfully opening the file, acquire the first + // line, whence we may determine the file format... + // + if (get_line(DSC_LINE_MAX_ENFORCE) == 0) + // + // ...except in the case of an empty file, which we are + // unable to process further. + // + error("`%1' is empty", filename); + +# if 0 + else if (context_args("%PDF-")) { + // TODO: PDF files specify a /MediaBox, as the equivalent + // of %%BoundingBox; we must implement a handler for this. + } +# endif + + else if (context_args("%!PS-Adobe-")) { + // + // PostScript files -- strictly, we expect EPS -- should + // specify a %%BoundingBox comment; locate it, initially + // expecting to find it in the comments header... + // + const char *context = NULL; + while ((context == NULL) && get_header_comment()) { + if ((context = bounding_box_args()) != NULL) { + + // When the "%%BoundingBox" comment is found, it may simply + // specify the bounding box property values, or it may defer + // assignment to a similar trailer comment... + // + int status = parse_bounding_box(context); + if (status == PSBB_RANGE_AT_END) { + // + // ...in which case we must locate the trailer, and search + // for the appropriate specification within it. + // + if (skip_to_trailer() > 0) { + while ((context = bounding_box_args()) == NULL + && get_line(DSC_LINE_MAX_ENFORCE) > 0) + ; + if (context != NULL) { + // + // When we find a bounding box specification here... + // + if ((status = parse_bounding_box(context)) == PSBB_RANGE_AT_END) + // + // ...we must ensure it is not a further attempt to defer + // assignment to a trailer, (which we are already parsing). + // + error("`(atend)' not allowed in trailer of `%1'", filename); + } + } + else + // The trailer could not be found, so there is no context in + // which a trailing %%BoundingBox comment might be located. + // + context = NULL; + } + if (status == PSBB_RANGE_IS_BAD) { + // + // This arises when we found a %%BoundingBox comment, but + // we were unable to extract a valid set of range values from + // it; all we can do is diagnose this. + // + error("the arguments to the %%%%BoundingBox comment in `%1' are bad", + filename); + } + } } + if (context == NULL) + // + // Conversely, this arises when no value specifying %%BoundingBox + // comment has been found, in any appropriate location... + // + error("%%%%BoundingBox comment not found in `%1'", filename); } + else + // ...while this indicates that there was no appropriate file format + // identifier, on the first line of the input file. + // + error("`%1' does not conform to the Document Structuring Conventions", + filename); + + // Regardless of success or failure of bounding box property acquisition, + // we did successfully open an input file, so we must now close it... + // + fclose(fp); } - bb->llx = bb->lly = bb->urx = bb->ury = 0; - return 0; -} - -// This version is taken from psrm.cpp - -#define PS_LINE_MAX 255 -cset white_space("\n\r \t"); - -int ps_get_line(char *buf, FILE *fp, const char* filename) -{ - int c = getc(fp); - if (c == EOF) { - buf[0] = '\0'; - return 0; - } - int i = 0; - int err = 0; - while (c != '\r' && c != '\n' && c != EOF) { - if ((c < 0x1b && !white_space(c)) || c == 0x7f) - error("invalid input character code %1 in `%2'", int(c), filename); - else if (i < PS_LINE_MAX) - buf[i++] = c; - else if (!err) { - err = 1; - error("PostScript file `%1' is non-conforming " - "because length of line exceeds 255", filename); + else + // ...but in this case, we did not successfully open any input file. + // + error("can't open `%1': %2", filename, strerror(errno)); + + // Irrespective of whether or not we were able to successfully acquire the + // bounding box properties, we ALWAYS update the associated gtroff registers. + // + assign_registers(); +} + +// psbb_locator::parse_bounding_box() +// +// Parse the argument to a %%BoundingBox comment, returning: +// PSBB_RANGE_IS_SET if it contains four numbers, +// PSBB_RANGE_AT_END if it contains "(atend)", or +// PSBB_RANGE_IS_BAD otherwise. +// +int psbb_locator::parse_bounding_box(const char *context) +{ + // The Document Structuring Conventions say that the numbers + // should be integers. + // + int status = PSBB_RANGE_IS_SET; + if (sscanf(context, "%d %d %d %d", &llx, &lly, &urx, &ury) != 4) { + // + // Unfortunately some broken applications get this wrong; + // try to parse them as doubles instead... + // + double x1, x2, x3, x4; + if (sscanf(context, "%lf %lf %lf %lf", &x1, &x2, &x3, &x4) == 4) { + llx = (int)x1; + lly = (int)x2; + urx = (int)x3; + ury = (int)x4; } - c = getc(fp); - } - buf[i++] = '\n'; - buf[i] = '\0'; - if (c == '\r') { - c = getc(fp); - if (c != EOF && c != '\n') - ungetc(c, fp); - } - return 1; -} - -inline void assign_registers(int llx, int lly, int urx, int ury) + else { + // ...but if we can't parse four numbers, skip over any + // initial white space... + // + while (*context == '\x20' || *context == '\t') + context++; + + // ...before checking for "(atend)", and setting the + // appropriate exit status accordingly. + // + status = (context_args("(atend)", context) == NULL) + ? llx = lly = urx = ury = PSBB_RANGE_IS_BAD + : PSBB_RANGE_AT_END; + } + } + return status; +} + +// ps_locator::get_line() +// +// Collect an input record from a PostScript or PDF file. +// +// Inputs: +// buf pointer to caller's input buffer. +// fp FILE stream pointer, whence input is read. +// filename name of input file, (for diagnostic use only). +// dscopt DSC_LINE_MAX_ENFORCE or DSC_LINE_MAX_IGNORED. +// +// Returns the number of input characters stored into caller's +// buffer, or zero at end of input stream. +// +// FIXME: Currently, get_line() always scans an entire line of +// input, but returns only as much as will fit in caller's buffer; +// the return value is always a positive integer, or zero, with no +// way of indicating to caller, that there was more data than the +// buffer could accommodate. A future enhancement could mitigate +// this, returning a negative value in the event of truncation, or +// even allowing for piecewise retrieval of excessively long lines +// in successive reads; (this may be necessary to properly support +// DSC_LINE_MAX_IGNORED, which is currently unimplemented). +// +int psbb_locator::get_line(int dscopt) +{ + int c, count = 0; + do { + // Collect input characters into caller's buffer, until we + // encounter a line terminator, or end of file... + // + while (((c = getc(fp)) != '\n') && (c != '\r') && (c != EOF)) { + if ((((lastc = c) < 0x1b) && !white_space(c)) || (c == 0x7f)) + // + // ...rejecting any which may be designated as invalid. + // + error("invalid input character code %1 in `%2'", int(c), filename); + + // On reading a valid input character, and when there is + // room in caller's buffer... + // + else if (count < DSC_LINE_MAX) + // + // ...store it. + // + buf[count++] = c; + + // We have a valid input character, but it will not fit + // into caller's buffer; if enforcing DSC conformity... + // + else if (dscopt == DSC_LINE_MAX_ENFORCE) { + // + // ...diagnose and truncate. + // + dscopt = DSC_LINE_MAX_CHECKED; + error("PostScript file `%1' is non-conforming " + "because length of line exceeds 255", filename); + } + } + // Reading LF may be a special case: when it immediately + // follows a CR which terminated the preceding input line, + // we deem it to complete a CRLF terminator for the already + // collected preceding line; discard it, and restart input + // collection for the current line. + // + } while ((lastc == '\r') && ((lastc = c) == '\n')); + + // For each collected input line, record its actual terminator, + // substitute our preferred LF terminator... + // + if (((lastc = c) != EOF) || (count > 0)) + buf[count++] = '\n'; + + // ...and append the required C-string (NUL) terminator, before + // returning the actual count of input characters stored. + // + buf[count] = '\0'; + return count; +} + +// psbb_locator::context_args() +// +// Inputs: +// tag literal text to be matched at start of input line +// +// Returns a pointer to the trailing substring of the current +// input line, following an initial substring matching the "tag" +// argument, or NULL if "tag" is not matched. +// +inline const char *psbb_locator::context_args(const char *tag) +{ + return context_args(tag, buf); +} + +// psbb_locator::context_args() +// +// Overloaded variant of the preceding function, operating on +// an alternative input buffer, (which may represent a terminal +// substring of the psbb_locator's primary input line buffer). +// +// Inputs: +// tag literal text to be matched at start of buffer +// buf pointer to text to be checked for "tag" match +// +// Returns a pointer to the trailing substring of the specified +// text buffer, following an initial substring matching the "tag" +// argument, or NULL if "tag" is not matched. +// +inline const char *psbb_locator::context_args(const char *tag, const char *buf) +{ + size_t len = strlen(tag); + return (strncmp(tag, buf, len) == 0) ? buf + len : NULL; +} + +// psbb_locator::bounding_box_args() +// +// Returns a pointer to the arguments string, within the current +// input line, when this represents a PostScript "%%BoundingBox:" +// comment, or NULL otherwise. +// +inline const char *psbb_locator::bounding_box_args(void) +{ + return context_args("%%BoundingBox:"); +} + +// psbb_locator::assign_registers() +// +// Copies the bounding box properties established within the +// class object, to the associated gtroff registers. +// +inline void psbb_locator::assign_registers(void) { llx_reg_contents = llx; lly_reg_contents = lly; @@ -6087,114 +6366,110 @@ ury_reg_contents = ury; } -void do_ps_file(FILE *fp, const char* filename) -{ - bounding_box bb; - int bb_at_end = 0; - char buf[PS_LINE_MAX]; - llx_reg_contents = lly_reg_contents = - urx_reg_contents = ury_reg_contents = 0; - if (!ps_get_line(buf, fp, filename)) { - error("`%1' is empty", filename); - return; - } - if (strncmp("%!PS-Adobe-", buf, 11) != 0) { - error("`%1' is not conforming to the Document Structuring Conventions", - filename); - return; - } - while (ps_get_line(buf, fp, filename) != 0) { - // in header comments, `%X' (`X' any printable character except - // whitespace) is possible too - if (buf[0] == '%') { - if (strncmp(buf + 1, "%EndComments", 12) == 0) - break; - if (white_space(buf[1])) - break; - } - else - break; - if (strncmp(buf + 1, "%BoundingBox:", 13) == 0) { - int res = parse_bounding_box(buf + 14, &bb); - if (res == 1) { - assign_registers(bb.llx, bb.lly, bb.urx, bb.ury); - return; - } - else if (res == 2) { - bb_at_end = 1; - break; - } - else { - error("the arguments to the %%%%BoundingBox comment in `%1' are bad", - filename); - return; - } +// psbb_locator::get_header_comment() +// +// Fetch a line of PostScript input; return true if it complies with +// the formatting requirements for header comments, and it is not an +// "%%EndComments" line; otherwise return false. +// +inline bool psbb_locator::get_header_comment(void) +{ + return + // The first necessary requirement, for returning true, + // is that the input line is not empty, (i.e. not EOF). + // + get_line(DSC_LINE_MAX_ENFORCE) != 0 + + // In header comments, `%X' (`X' any printable character + // except whitespace) is also acceptable. + // + && (buf[0] == '%') && !white_space(buf[1]) + + // Finally, the input line must not say "%%EndComments". + // + && context_args("%%EndComments") == NULL; +} + +// psbb_locator::skip_to_trailer() +// +// Reposition the PostScript input stream, such that the next get_line() +// will retrieve the first line, if any, following a "%%Trailer" comment; +// returns a positive integer value if the "%%Trailer" comment is found, +// or zero if it is not. +// +inline int psbb_locator::skip_to_trailer(void) +{ + // Begin by considering a chunk of the input file starting 512 bytes + // before its end, and search it for a "%%Trailer" comment; if none is + // found, incrementally double the chunk size while it remains within + // a 32768L byte range, and search again... + // + for (ssize_t offset = 512L; offset > 0L; offset <<= 1) { + int status, failed; + if ((offset > 32768L) || ((failed = fseek(fp, -offset, SEEK_END)) != 0)) + // + // ...ultimately resetting the offset to zero, and simply seeking + // to the start of the file, to terminate the cycle and do a "last + // ditch" search of the entire file, if any backward seek fails, or + // if we reach the arbitrary 32768L byte range limit. + // + failed = fseek(fp, offset = 0L, SEEK_SET); + + // Following each successful seek... + // + if (!failed) { + // + // ...perform a search by reading lines from the input stream... + // + do { status = get_line(DSC_LINE_MAX_ENFORCE); + // + // ...until we either exhaust the available stream data, or + // we have located a "%%Trailer" comment line. + // + } while ((status != 0) && (context_args("%%Trailer") == NULL)); + if (status > 0) + // + // We found the "%%Trailer" comment, so we may immediately + // return, with the stream positioned appropriately... + // + return status; } } - if (bb_at_end) { - long offset; - int last_try = 0; - // in the trailer, the last BoundingBox comment is significant - for (offset = 512; !last_try; offset *= 2) { - int had_trailer = 0; - int got_bb = 0; - if (offset > 32768 || fseek(fp, -offset, 2) == -1) { - last_try = 1; - if (fseek(fp, 0L, 0) == -1) - break; - } - while (ps_get_line(buf, fp, filename) != 0) { - if (buf[0] == '%' && buf[1] == '%') { - if (!had_trailer) { - if (strncmp(buf + 2, "Trailer", 7) == 0) - had_trailer = 1; - } - else { - if (strncmp(buf + 2, "BoundingBox:", 12) == 0) { - int res = parse_bounding_box(buf + 14, &bb); - if (res == 1) - got_bb = 1; - else if (res == 2) { - error("`(atend)' not allowed in trailer of `%1'", filename); - return; - } - else { - error("the arguments to the %%%%BoundingBox comment in `%1' are bad", - filename); - return; - } - } - } - } - } - if (got_bb) { - assign_registers(bb.llx, bb.lly, bb.urx, bb.ury); - return; - } - } - } - error("%%%%BoundingBox comment not found in `%1'", filename); + // ...otherwise, we report that no "%%Trailer" comment was found. + // + return 0; } +// ps_bbox_request() +// +// Handle the .psbb request. +// void ps_bbox_request() { + // Parse input line, to extract file name. + // symbol nm = get_long_name(1); if (nm.is_null()) + // + // No file name specified: ignore the entire request. + // skip_line(); else { + // File name acquired: swallow the rest of the line. + // while (!tok.newline() && !tok.eof()) tok.next(); errno = 0; - // PS files might contain non-printable characters, such as ^Z - // and CRs not followed by an LF, so open them in binary mode. - FILE *fp = include_search_path.open_file_cautious(nm.contents(), - 0, FOPEN_RB); - if (fp) { - do_ps_file(fp, nm.contents()); - fclose(fp); - } - else - error("can't open `%1': %2", nm.contents(), strerror(errno)); + + // Update {llx,lly,urx,ury}_reg_contents: + // declaring this class instance achieves this, as an + // intentional side effect of object construction. + // + psbb_locator do_ps_file(nm.contents()); + + // All done for .psbb; move on, to continue + // input stream processing. + // tok.next(); } } @@ -6595,6 +6870,7 @@ charset_table['*']->set_flags(charinfo::TRANSPARENT); get_charinfo(symbol("dg"))->set_flags(charinfo::TRANSPARENT); get_charinfo(symbol("rq"))->set_flags(charinfo::TRANSPARENT); + get_charinfo(symbol("cq"))->set_flags(charinfo::TRANSPARENT); get_charinfo(symbol("em"))->set_flags(charinfo::BREAK_AFTER); get_charinfo(symbol("hy"))->set_flags(charinfo::BREAK_AFTER); get_charinfo(symbol("ul"))->set_flags(charinfo::OVERLAPS_HORIZONTALLY); diff -ruN groff-1.22.2/src/roff/troff/input.h groff-1.22.3/src/roff/troff/input.h --- groff-1.22.2/src/roff/troff/input.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/input.h 2014-11-04 09:38:35.203524272 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2001, 2004, 2006, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/Makefile.sub groff-1.22.3/src/roff/troff/Makefile.sub --- groff-1.22.2/src/roff/troff/Makefile.sub 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/Makefile.sub 2014-11-04 09:38:35.203524272 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src roff troff' +# +# File position: /src/roff/troff/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=troff$(EXEEXT) MAN1=troff.n XLIBS=$(LIBGROFF) $(LIBGNU) @@ -37,12 +61,22 @@ $(srcdir)/troff.h GENSRCS=majorminor.cpp NAMEPREFIX=$(g) +RM=rm -f majorminor.cpp: $(top_srcdir)/VERSION $(top_srcdir)/REVISION @echo Making $@ - @-rm -f $@ + @$(RM) $@ @echo const char \*major_version = \ - \"`sed -e 's/^\([^.]*\)\..*$$/\1/' $(top_srcdir)/VERSION`\"\; >$@ + \"`sed -e 's/^\([^.]*\)\..*$$/\1/' $(top_srcdir)/VERSION`\"\; >$@ @echo const char \*minor_version = \ - \"`sed -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' $(top_srcdir)/VERSION`\"\; >>$@ + \"`sed -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' $(top_srcdir)/VERSION`\"\; \ + >>$@ @echo const char \*revision = \"`cat $(top_srcdir)/REVISION`\"\; >>$@ + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/roff/troff/mtsm.cpp groff-1.22.3/src/roff/troff/mtsm.cpp --- groff-1.22.2/src/roff/troff/mtsm.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/mtsm.cpp 2014-11-04 09:38:35.203524272 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2003, 2004, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. Written by Gaius Mulley (gaius@glam.ac.uk) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/mtsm.h groff-1.22.3/src/roff/troff/mtsm.h --- groff-1.22.2/src/roff/troff/mtsm.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/mtsm.h 2014-11-04 09:38:35.203524272 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. * * mtsm.h * diff -ruN groff-1.22.2/src/roff/troff/node.cpp groff-1.22.3/src/roff/troff/node.cpp --- groff-1.22.2/src/roff/troff/node.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/node.cpp 2014-11-04 09:38:35.203524272 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2008, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/node.h groff-1.22.3/src/roff/troff/node.h --- groff-1.22.2/src/roff/troff/node.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/node.h 2014-11-04 09:38:35.203524272 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004,\ - 2006, 2009, 2010 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/number.cpp groff-1.22.3/src/roff/troff/number.cpp --- groff-1.22.2/src/roff/troff/number.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/number.cpp 2014-11-04 09:38:35.204524259 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2001, 2002, 2004, 2009, 2012 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/reg.cpp groff-1.22.3/src/roff/troff/reg.cpp --- groff-1.22.2/src/roff/troff/reg.cpp 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/reg.cpp 2014-11-04 09:38:35.204524259 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/reg.h groff-1.22.3/src/roff/troff/reg.h --- groff-1.22.2/src/roff/troff/reg.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/reg.h 2014-11-04 09:38:35.204524259 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/request.h groff-1.22.3/src/roff/troff/request.h --- groff-1.22.2/src/roff/troff/request.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/request.h 2014-11-04 09:38:35.204524259 +0100 @@ -1,7 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2008, - 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/token.h groff-1.22.3/src/roff/troff/token.h --- groff-1.22.2/src/roff/troff/token.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/token.h 2014-11-04 09:38:35.204524259 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/troff.h groff-1.22.3/src/roff/troff/troff.h --- groff-1.22.2/src/roff/troff/troff.h 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/troff.h 2014-11-04 09:38:35.204524259 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/roff/troff/troff.man groff-1.22.3/src/roff/troff/troff.man --- groff-1.22.2/src/roff/troff/troff.man 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/src/roff/troff/troff.man 2014-11-04 09:38:35.204524259 +0100 @@ -1,16 +1,20 @@ '\" t -.ig -troff.man - -This file is part of groff, the GNU roff type-setting system. - -Copyright (C) 1989, 2000, 2001, 2002, 2003, 2007, 2008, 2009 - Free Software Foundation, Inc. - -written by James Clark +.TH @G@TROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@troff \- the troff processor of the groff text formatting system +. +.\" troff.man -> troff.1 +. +. +.\" -------------------------------------------------------------------- +.\" Legalese +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. -modified by Werner Lemberg - Bernd Warken +This file is part of groff, the GNU roff type-setting system, which +is a GNU free software project.. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -22,14 +26,16 @@ FDL in the main directory of the groff source package. .. . -.\" -------------------------------------------------------------------- -.\" Title -.\" -------------------------------------------------------------------- -. -.TH @G@TROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@troff \- the troff processor of the groff text formatting system -. +.de au +This file was originally written by James Clark, it was modified by +.MT wl@gnu.org +Werner Lemberg +.ME +and +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . +.. . .\" -------------------------------------------------------------------- .SH SYNOPSIS @@ -59,11 +65,13 @@ . This manual page describes the GNU version of .BR troff . +. It is part of the groff document formatting system. . -It is functionally compatible with UNIX troff, but has many extensions, -see +It is functionally compatible with UNIX troff, but has many +extensions, see .BR \%groff_diff (@MAN7EXT@). +. Usually it should be invoked using the .BR groff (@MAN1EXT@) command which will also run preprocessors and postprocessors in the @@ -73,6 +81,7 @@ .\" -------------------------------------------------------------------- .SH OPTIONS .\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. . @@ -89,10 +98,10 @@ This backtrace should help track down the cause of the error. . The line numbers given in the backtrace may not always be correct, for -.BR @g@troff 's +.BR @g@troff \[aq]s idea of line numbers gets confused by .B as -or +or .B am requests. . @@ -121,8 +130,9 @@ .B \-E Inhibit all error messages of .BR @g@troff . -Note that this doesn't affect messages output to standard error by macro -packages using the +. +Note that this doesn\[aq]t affect messages output to standard error by +macro packages using the .B tm or .B tm1 @@ -144,6 +154,7 @@ is the name of the device) and there for the .B DESC file and font files. +. .I dir is scanned before all other font directories. . @@ -154,17 +165,21 @@ . .TP .BI \-I dir -This option may be used to add a directory to the search path for files -(both those on the command line and those named in +This option may be used to add a directory to the search path for +files (both those on the command line and those named in .B \&.psbb requests). +. The search path is initialized with the current directory. +. This option may be specified more than once; the directories are then searched in the order specified (but before the current directory). -If you want to make the current directory be read before other directories, -add +. +If you want to make the current directory be read before other +directories, add .B \-I.\& at the appropriate place. +. .IP No directory search is performed for files with an absolute file name. . @@ -172,7 +187,8 @@ .BI \-m name Read in the file .IB name .tmac\fR. -If it isn't found, try +. +If it isn\[aq]t found, try .BI tmac. name instead. . @@ -216,6 +232,7 @@ .IB n \- means print every page from .IR n . +. .B @g@troff will exit after printing the last page in the list. . @@ -236,7 +253,7 @@ . .TP .B \-R -Don't load +Don\[aq]t load .B troffrc and .BR troffrc-end . @@ -262,8 +279,8 @@ .BR sy , and .BR pi . -For security reasons, these potentially dangerous requests are disabled -otherwise. +For security reasons, these potentially dangerous requests are +disabled otherwise. . It will also add the current directory to the macro search path. . @@ -275,6 +292,7 @@ .BI \-w name Enable warning .IR name . +. Available warnings are described in the section .I WARNINGS below. @@ -290,6 +308,7 @@ .BI \-W name Inhibit warning .IR name . +. Multiple .B \-W options are allowed. @@ -478,6 +497,7 @@ .TP .BR tab "\t2048" Inappropriate use of a tab character. +. Either use of a tab character where a number was expected, or use of tab character in an unquoted macro argument. . @@ -491,6 +511,7 @@ .BR mac , and .BR reg . +. It is intended that this covers all warnings that are useful with traditional macro packages. . @@ -508,6 +529,7 @@ .B GROFF_TMAC_PATH A colon separated list of directories in which to search for macro files. +. .B @g@troff will scan directories given in the .B \-M @@ -529,6 +551,7 @@ A colon separated list of directories in which to search for the .BI dev name directory. +. .B @g@troff will scan directories given in the .B \-F @@ -568,6 +591,8 @@ .I F of device .IR name . +. +. .P Note that .B troffrc @@ -587,37 +612,6 @@ . . .\" -------------------------------------------------------------------- -.SH AUTHOR -.\" -------------------------------------------------------------------- -. -Copyright (C) 1989, 2001, 2002, 2003, 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 . -This document was written by James Clark, with modifications from -.MT wl@gnu.org -Werner Lemberg -.ME -and -.MT groff-bernd.warken-72@web.de -Bernd Warken -.ME . -. -.P -This document is part of -.IR groff , -the GNU roff distribution. -. -. -.\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . @@ -635,6 +629,7 @@ language, including a short but complete reference of all predefined requests, registers, and escapes of plain .IR groff . +. From the command line, this is called by .RS .IP @@ -661,6 +656,7 @@ .I roff systems, including pointers to further related documentation. . +. .P The .I groff info @@ -669,6 +665,17 @@ .BR info (@MAN1EXT@), presents all groff documentation within a single document. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. +. .\" -------------------------------------------------------------------- .\" Emacs variables .\" -------------------------------------------------------------------- diff -ruN groff-1.22.2/src/utils/addftinfo/addftinfo.cpp groff-1.22.3/src/utils/addftinfo/addftinfo.cpp --- groff-1.22.2/src/utils/addftinfo/addftinfo.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/addftinfo/addftinfo.cpp 2014-11-04 09:38:35.310522934 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/addftinfo/addftinfo.man groff-1.22.3/src/utils/addftinfo/addftinfo.man --- groff-1.22.2/src/utils/addftinfo/addftinfo.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/addftinfo/addftinfo.man 2014-11-04 09:38:35.310522934 +0100 @@ -1,5 +1,14 @@ -.ig -Copyright (C) 1989-2000, 2001, 2009 Free Software Foundation, Inc. +.TH ADDFTINFO @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +addftinfo \- add information to troff font files for use with groff +. +. +.\" -------------------------------------------------------------------- +.\" License +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,38 +25,56 @@ translations approved by the Free Software Foundation instead of in the original English. .. -.TH ADDFTINFO @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -addftinfo \- add information to troff font files for use with groff +. +.\" -------------------------------------------------------------------- +.\" Characters +.\" -------------------------------------------------------------------- +. +.\" Ellipsis ... +.ie t .ds EL \fS\N'188'\fP +.el .ds EL \&.\|.\|.\&\ +.\" called with \*(EL +. +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B addftinfo [ .B \-v ] [ -.BI \- param\ value\fR.\|.\|. +.IR "param-option value" \*(EL ] .I res .I unitwidth .I font +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B addftinfo -reads a troff font file -and adds some additional font-metric information -that is used by the groff system. -The font file with the information added is written on the -standard output. -The information added is guessed using -some parametric information about the font -and assumptions -about the traditional troff names for characters. +reads a troff font file and adds some additional font-metric +information that is used by the groff system. +. +The font file with the information added is written on the standard +output. +. +The information added is guessed using some parametric information +about the font and assumptions about the traditional troff names for +characters. +. The main information added is the heights and depths of characters. +. The .I res and .I unitwidth -arguments should be the same as the corresponding parameters -in the DESC file; +arguments should be the same as the corresponding parameters in the +DESC file; .I font is the name of the file describing the font; if @@ -55,57 +82,107 @@ ends with .B I the font will be assumed to be italic. +. +. +.\" -------------------------------------------------------------------- .SH OPTIONS -.B \-v +.\" -------------------------------------------------------------------- +. +.B \[en]v prints the version number. +. +. .LP -All other options changes one of the parameters that is used -to derive the heights and depths. -Like the existing quantities in the font -file, each +All other options change one of the parameters that are used to derive +the heights and depths. +. +Like the existing quantities in the font file, each .I value is in .RI inches/ res for a font whose point size is .IR unitwidth . -.I param +. +.I param-option must be one of: +. .TP -.B x-height +.B \[en]x\-height The height of lowercase letters without ascenders such as x. +. .TP -.B fig-height +.B \[en]fig-height The height of figures (digits). +. .TP -.B asc-height +.B \[en]asc-height The height of characters with ascenders, such as b, d or l. +. .TP -.B body-height +.B \[en]body\-height The height of characters such as parentheses. +. .TP -.B cap-height +.B \[en]cap-height The height of uppercase letters such as A. +. .TP -.B comma-depth +.B \[en]comma\-depth The depth of a comma. +. .TP -.B desc-depth -The depth of characters with descenders, such as p,q, or y. +.B \[en]desc\-depth +The depth of characters with descenders, such as p, q, or y. +. .TP -.B body-depth +.B \[en]body\-depth The depth of characters such as parentheses. +. +. .LP .B addftinfo -makes no attempt to use the specified parameters to guess -the unspecified parameters. +makes no attempt to use the specified parameters to guess the +unspecified parameters. +. If a parameter is not specified the default will be used. -The defaults are chosen to have the reasonable values for -a Times font. +. +The defaults are chosen to have the reasonable values for a Times +font. +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff_font (@MAN5EXT@), .BR groff (@MAN1EXT@), .BR groff_char (@MAN7EXT@) . +. +.P +Watch a man\-page +.IB name ( n ) +with +.RS +.EX +.BI "man" " n name" +.EE +.RE +in text mode and with +.RS +.EX +.BI "groffer" " n name" +.EE +.RE +in graphical mode (PDF, etc.). +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/addftinfo/guess.cpp groff-1.22.3/src/utils/addftinfo/guess.cpp --- groff-1.22.2/src/utils/addftinfo/guess.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/addftinfo/guess.cpp 2014-11-04 09:38:35.310522934 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/addftinfo/guess.h groff-1.22.3/src/utils/addftinfo/guess.h --- groff-1.22.2/src/utils/addftinfo/guess.h 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/addftinfo/guess.h 2014-11-04 09:38:35.310522934 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/addftinfo/Makefile.sub groff-1.22.3/src/utils/addftinfo/Makefile.sub --- groff-1.22.2/src/utils/addftinfo/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/addftinfo/Makefile.sub 2014-11-04 09:38:35.310522934 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils addftinfo' +# +# File position: /src/utils/addftinfo/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=addftinfo$(EXEEXT) MAN1=addftinfo.n XLIBS=$(LIBGROFF) @@ -9,3 +33,11 @@ $(srcdir)/guess.cpp HDRS=\ $(srcdir)/guess.h + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/afmtodit/afmtodit.man groff-1.22.3/src/utils/afmtodit/afmtodit.man --- groff-1.22.2/src/utils/afmtodit/afmtodit.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/utils/afmtodit/afmtodit.man 2014-11-04 09:38:35.421521547 +0100 @@ -1,6 +1,13 @@ -.ig -Copyright (C) 1989-2003, 2005, 2006, 2008-2011 - Free Software Foundation, Inc. +.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +afmtodit \- create font files for use with groff \-Tps and \-Tpdf +. +. +.\" -------------------------------------------------------------------- +.\" Leagal Terms +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,6 +25,8 @@ the original English. .. . +.\" -------------------------------------------------------------------- +.\" Definitions . .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. @@ -31,15 +40,10 @@ . el .RB "[\ " "\\$1" "\ ]" .. . -. -.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -afmtodit \- create font files for use with groff \-Tps and \-Tpdf -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i @@ -59,10 +63,15 @@ .br .ad \na . +. .LP The whitespace between a command line option and its argument is optional. . +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B afmtodit creates a font file for use with groff, .BR grops , @@ -74,10 +83,12 @@ you must have perl version 5.004 or newer installed in order to run .BR afmtodit . . +. .LP .I afm_file is the AFM (Adobe Font Metric) file for the font. . +. .LP .I map_file is a file that says which groff character names map onto @@ -89,8 +100,7 @@ .LP where .I ps_char -is the PostScript name of the character -and +is the PostScript name of the character and .I groff_char is the groff name of the character (as used in the groff font file). . @@ -105,14 +115,16 @@ .B # and blank lines are ignored. . -If the file isn't found in the current directory, it is searched in -the `devps/generate' subdirectory of the default font directory. +If the file isn\[aq]t found in the current directory, it is searched +in the \[oq]devps/generate\[cq] subdirectory of the default font +directory. +. . .LP If a PostScript character is not mentioned in .IR map_file , -and a generic groff glyph name can't be deduced using the -Adobe Glyph List (AGL, built into +and a generic groff glyph name can't be deduced using the Adobe Glyph +List (AGL, built into .BR afmtodit ), then .B afmtodit @@ -121,26 +133,30 @@ .B \eN escape sequence in .BR troff . -In particular, this is true for glyph variants like `foo.bar'; all glyph -names containing one or more periods are mapped to unnamed entities. +. +In particular, this is true for glyph variants like \[oq]foo.bar\[cq]; +all glyph names containing one or more periods are mapped to unnamed +entities. . If option .B \-e is not specified, the encoding defined in the AFM file (i.e., entries with non-negative character codes) is used. . -Please refer to section `Using Symbols' in the groff info file which -describes how groff glyph names are constructed. +Please refer to section \[oq]Using Symbols\[cq] in the groff info file +which describes how groff glyph names are constructed. +. . .LP -Characters not encoded in the AFM file (i.e., entries which have \-1 as -the character code) are still available in groff; they get glyph index -values greater than 255 (or greater than the biggest character code used -in the AFM file in the unlikely case that it is greater than 255) in the -groff font file. +Characters not encoded in the AFM file (i.e., entries which have \-1 +as the character code) are still available in groff; they get glyph +index values greater than 255 (or greater than the biggest character +code used in the AFM file in the unlikely case that it is greater than +255) in the groff font file. +. +Glyph indices of unencoded characters don\[aq]t have a specific order; +it is best to access them with glyph names only. . -Glyph indices of unencoded characters don't have a specific order; it -is best to access them with glyph names only. . .LP The groff font file will be output to a file called @@ -149,6 +165,7 @@ .B \-o option is used. . +. .LP If there is a downloadable font file for the font, it may be listed in the file @@ -156,6 +173,7 @@ see .BR grops (@MAN1EXT@). . +. .LP If the .B \-i @@ -187,7 +205,10 @@ These parameters are normally needed only for italic (or oblique) fonts. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. .TP .BI \-a n Use @@ -218,9 +239,10 @@ rather than the default .BR DESC . . -If not found in the current directory, the `devps' subdirectory of the -default font directory is searched (this is true for both the default -device description file and a file given with option +If not found in the current directory, the \[oq]devps\[qc] +subdirectory of the default font directory is searched (this is true +for both the default device description file and a file given with +option .BR \-d ). . .TP @@ -233,8 +255,8 @@ is described in .BR grops (@MAN1EXT@). . -If not found in the current directory, the `devps' subdirectory of the -default font directory is searched. +If not found in the current directory, the \[oq]devps\[cq] +subdirectory of the default font directory is searched. . .TP .BI \-f name @@ -243,19 +265,18 @@ . .TP .BI \-i n -Generate an italic correction for each character so that -the character's width plus the character's italic correction -is equal to +Generate an italic correction for each character so that the +character's width plus the character's italic correction is equal to .I n thousandths of an em plus the amount by which the right edge of the character's bounding box -is to the right of the character's origin. +is to the right of the character\[aq]s origin. . If this would result in a negative italic correction, use a zero italic correction instead. . .IP -Also generate a subscript correction equal to the +Also generate a subscript correction equal to the product of the tangent of the slant of the font and four fifths of the x-height of the font. . @@ -269,7 +290,7 @@ .I n thousandths of an em plus the amount by which the left edge of the character's bounding box -is to the left of the character's origin. +is to the left of the character\[aq]s origin. . The left italic correction may be negative unless option .B \-m @@ -292,6 +313,7 @@ .TP .B \-k Omit any kerning data from the groff font. +. This should be used only for mono-spaced fonts. . .TP @@ -328,7 +350,10 @@ Don't use the built-in Adobe Glyph List. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'\fB@FONTDIR@/devps/download'u+2n .B @FONTDIR@/devps/DESC Device description file. @@ -351,14 +376,25 @@ Standard mapping. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (@MAN1EXT@), .BR grops (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR perl (1) . +. .LP -The groff info file, section `Using Symbols'. +The groff info file, section \[oq]Using Symbols\[cq]. +. +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. . .\" Local Variables: .\" mode: nroff diff -ruN groff-1.22.2/src/utils/afmtodit/afmtodit.pl groff-1.22.3/src/utils/afmtodit/afmtodit.pl --- groff-1.22.2/src/utils/afmtodit/afmtodit.pl 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/utils/afmtodit/afmtodit.pl 2014-11-04 09:38:35.421521547 +0100 @@ -1,8 +1,6 @@ #! /usr/bin/perl -w # -*- Perl -*- -# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. diff -ruN groff-1.22.2/src/utils/afmtodit/make-afmtodit-tables groff-1.22.3/src/utils/afmtodit/make-afmtodit-tables --- groff-1.22.2/src/utils/afmtodit/make-afmtodit-tables 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/utils/afmtodit/make-afmtodit-tables 2014-11-04 09:38:35.422521534 +0100 @@ -3,8 +3,7 @@ # make-afmtodit-tables -- script for creating the `unicode_decomposed' # and `AGL_to_unicode' tables # -# Copyright (C) 2005, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 2005-2014 Free Software Foundation, Inc. # Written by Werner Lemberg # # This file is part of groff. diff -ruN groff-1.22.2/src/utils/afmtodit/Makefile.sub groff-1.22.3/src/utils/afmtodit/Makefile.sub --- groff-1.22.2/src/utils/afmtodit/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/src/utils/afmtodit/Makefile.sub 2014-11-04 09:38:35.422521534 +0100 @@ -1,29 +1,61 @@ +# Makefile.sub for `src utils afmtodit' +# +# File position: /src/utils/afmtodit/Makefile.sub +# +# Copyright (C) 2013-2014 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 . +# +######################################################################## + MAN1=afmtodit.n MOSTLYCLEANADD=afmtodit +RM=rm -f all: afmtodit afmtodit: afmtodit.pl afmtodit.tables - if test -n "$(PERLPATH)"; then \ - sed -e "s|/usr/bin/perl|$(PERLPATH)|" \ - -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@FONTDIR@|$(fontdir)|" \ - -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \ - -e "/@afmtodit.tables@/ d" \ - $(srcdir)/afmtodit.pl >afmtodit; \ + if test -n "$(PERL)"; then \ + sed -e "s|/usr/bin/perl|$(PERL)|" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e "s|@FONTDIR@|$(fontdir)|" \ + -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \ + -e "/@afmtodit.tables@/ d" \ + $(srcdir)/afmtodit.pl >afmtodit; \ else \ sed -e "s|@VERSION@|$(version)$(revision)|" \ - -e "s|@FONTDIR@|$(fontdir)|" \ - -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \ - -e "/@afmtodit.tables@/ d" \ - $(srcdir)/afmtodit.pl >afmtodit; \ + -e "s|@FONTDIR@|$(fontdir)|" \ + -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \ + -e "/@afmtodit.tables@/ d" \ + $(srcdir)/afmtodit.pl >afmtodit; \ fi chmod +x afmtodit install_data: afmtodit -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) - -rm -f $(DESTDIR)$(bindir)/afmtodit + $(RM) $(DESTDIR)$(bindir)/afmtodit $(INSTALL_SCRIPT) afmtodit $(DESTDIR)$(bindir)/afmtodit uninstall_sub: - -rm -f $(DESTDIR)$(bindir)/afmtodit + $(RM) $(DESTDIR)$(bindir)/afmtodit + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/hpftodit/hpftodit.cpp groff-1.22.3/src/utils/hpftodit/hpftodit.cpp --- groff-1.22.2/src/utils/hpftodit/hpftodit.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/hpftodit/hpftodit.cpp 2014-11-04 09:38:35.292523159 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1994, 2000, 2001, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1994-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/hpftodit/hpftodit.man groff-1.22.3/src/utils/hpftodit/hpftodit.man --- groff-1.22.2/src/utils/hpftodit/hpftodit.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/hpftodit/hpftodit.man 2014-11-04 09:38:35.293523147 +0100 @@ -1,7 +1,15 @@ .tr ~ -.ig -Copyright (C) 1994-2000, 2001, 2003, 2004, 2009 - Free Software Foundation, Inc. +.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +hpftodit \- create font description files for use with groff \-Tlj4 +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1994-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,6 +26,11 @@ translations approved by the Free Software Foundation instead of in the original English. .. +. +.\" -------------------------------------------------------------------- +.\" Definitions +.\" -------------------------------------------------------------------- +. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp @@ -28,12 +41,9 @@ .ie \\n(.$>2 \&\\$1\f(CR\\$2\fP\\$3 .el \&\f(CR\\$1\fP\\$2 .. +. .tr ~ -.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.\" -------------------------------------------------------------------------- -.SH NAME -.\" -------------------------------------------------------------------------- -hpftodit \- create font description files for use with groff \-Tlj4 +. .\" -------------------------------------------------------------------------- .SH SYNOPSIS .\" -------------------------------------------------------------------------- @@ -51,9 +61,12 @@ It is possible to have whitespace between the .B \-i option and its parameter. +. +. .\" -------------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------------- +. .B hpftodit creates a font file for use with a Hewlett-Packard LaserJet~4\(enseries (or newer) printer with @@ -67,10 +80,12 @@ should consist of a sequence of lines of the form: .IP .I -m u c1 c2 \fR.\|.\|. [ +m u c1 c2 \fR.\|.\|. [ .CW # .I comment ] +. +. .LP where .I m @@ -81,34 +96,42 @@ .IR c1 , .IR c2 ", .\|.\|." are the groff names of the character. +. The values can be separated by any whitespace; the Unicode value must use uppercase digits A\^\(en\^F, and must be without a leading -.CW ` 0x ', -.CW ` u ', +.CW \[oq] 0x \[cq], +.CW \[oq] u \[cq], or -.CW ` U+ '. +.CW \[oq] U+ \[cq]. Unicode values corresponding to composite glyphs are decomposed; e.g., -.CW ` u00C0 ' +.CW \[oq] u00C0 \[cq] becomes -.CW ` u0041_0300 '. +.CW \[oq] u0041_0300 \[cq]. +. The name for a glyph without a groff name may be given as .CW u \fIXXXX\fP if the glyph corresponds to a Unicode value, or as an unnamed glyph -.CW ` --- '. +.CW \[oq] --- \[cq]. +. If the given Unicode value is in the Private Use Area (0xE000\^\(en\^0xF8FF), the glyph is included as an unnamed glyph. +. Refer to .BR groff_diff (@MAN1EXT@) for additional information about unnamed glyphs and how to access them. +. +. .LP Blank lines and lines beginning with -.CW ` # ' +.CW \[oq] # \[cq] are ignored. +. A -.CW ` # ' +.CW \[oq] # \[cq] following one or more groff names begins a comment. +. Because -.CW ` # ' +.CW \[oq] # \[cq] is a valid groff name, it must appear first in a list of groff names if a comment is included, e.g., .IP @@ -123,18 +146,23 @@ .CW "3 0023 sh # # number sign" .LP which will treat the first -.CW ` # ' +.CW \[oq] # \[cq] as the beginning of the comment. +. +. .LP .I font is the name of the groff font file. +. The groff font file is written to .IR font ; if .I font is specified as -.CW ` - ', +.CW \[oq] - \[cq], the output is written to the standard output. +. +. .LP The .B \-s @@ -145,13 +173,16 @@ .B troff should search it whenever a character is not found in the current font). +. If the font is special, it should be listed in the .B fonts command in the DESC file; if it is not special, there is no need to list it, since .B troff -can automatically mount it when it's first used. +can automatically mount it when it\[aq]s first used. +. +. .LP If the .B \-i @@ -162,24 +193,31 @@ for each character (the significance of these parameters is explained in .BR groff_font (@MAN5EXT@)). +. +. .\" -------------------------------------------------------------------------- .SH OPTIONS .\" -------------------------------------------------------------------------- +. .TP .B \-a Include characters in the TFM file that are not included in the map file. +. A glyph with corresponding Unicode value is given the name .RI u XXXX ; a glyph without a Unicode value is included as an unnamed glyph -\&`\-\^\-\^\-'. +\&\[oq]\-\^\-\^\-\[cq]. +. A glyph with a Unicode value in the Private Use Area (0xE000\^\(en\^0xF8FF) also is included as an unnamed glyph. +. .IP -This option provides a simple means of adding Unicode-named and unnamed -glyphs to a font without including them in the map file, but it affords -little control over which glyphs are placed in a regular font and which -are placed in a special font. +This option provides a simple means of adding Unicode-named and +unnamed glyphs to a font without including them in the map file, but +it affords little control over which glyphs are placed in a regular +font and which are placed in a special font. +. The presence or absence of the .B \-s option has some effect on which glyphs are included: without the @@ -189,35 +227,46 @@ .B \-s option, only the \(lqmathematical\(rq symbol sets are searched. -Nonetheless, restricting the symbol sets searched isn't very +. +Nonetheless, restricting the symbol sets searched isn\[aq]t very selective\(emmany glyphs are placed in both regular and special fonts. +. Normally, the .B \-a option should be used only as a last resort. -.\" -------------------------------------------------------------------------- +. +. .TP .B \-d -Dump information about the TFM file to the standard output; this option -can be useful for ensuring that a TFM file is a proper match for a font, -and that the contents of the TFM file are suitable. -The information includes the values of important TFM tags, and a listing -(by MSL number for Intellifont TFM files or by Unicode value for -TrueType TFM files) of the glyphs included in the TFM file. -The unit of measure `DU' for some tags indicates design units; there are -8782 design units per em for Intellifont fonts, and 2048 design units -per em for TrueType fonts. +Dump information about the TFM file to the standard output; this +option can be useful for ensuring that a TFM file is a proper match +for a font, and that the contents of the TFM file are suitable. +. +The information includes the values of important TFM tags, and a +listing (by MSL number for Intellifont TFM files or by Unicode value +for TrueType TFM files) of the glyphs included in the TFM file. +. +The unit of measure \[oq]DU\[cq] for some tags indicates design units; +there are 8782 design units per em for Intellifont fonts, and 2048 +design units per em for TrueType fonts. +. Note that the accessibility of a glyph depends on its inclusion in a -symbol set; some TFM files list many glyphs but only a few symbol sets. +symbol set; some TFM files list many glyphs but only a few symbol +sets. +. .IP The glyph listing includes the glyph index within the TFM file, the MSL or Unicode value, and the symbol set and character code that will be used to print the glyph. +. If .I map_file is given, groff names are given for matching glyphs. +. If only the glyph index and MSL or Unicode value are given, the glyph does not appear in any supported symbol set and cannot be printed. +. .IP With the .B \-d @@ -226,69 +275,84 @@ is optional, and .I font is ignored if given. -.\" -------------------------------------------------------------------------- +. .TP .B \-q Suppress warnings about characters in the map file that were not found in the TFM file. +. Warnings never are given for unnamed glyphs or by glyphs named by their Unicode values. +. This option is useful when sending the output of .B hpftodit to the standard output. -.\" -------------------------------------------------------------------------- +. .TP .B \-v Print the .B hpftodit version number. -.\" -------------------------------------------------------------------------- +. .TP .B \-s The font is special. +. This option adds the .B special command to the font file, and affects the order in which HP symbol sets are searched for each glyph. +. Without the .B \-s -option, the \(lqtext\(rq sets are searched before -the \(lqmathematical\(rq symbol sets. +option, the \[lq]text\[rq] sets are searched before +the \[lq]mathematical\[rq] symbol sets. With the .B \-s option, the search order is reversed. -.\" -------------------------------------------------------------------------- +. .TP .BI \-i n -Generate an italic correction for each character so that the character's -width plus the character's italic correction is equal to +Generate an italic correction for each character so that the +character\[aq]s width plus the character\[aq]s italic correction is +equal to .I n thousandths of an em plus the amount by which the right edge of the -character's bounding is to the right of the character's origin. +character\[aq]s bounding is to the right of the character\[aq]s +origin. +. If this would result in a negative italic correction, use a zero italic correction instead. +. .IP -Also generate a subscript correction equal to the -product of the tangent of the slant of the font and -four fifths of the x-height of the font. +Also generate a subscript correction equal to the product of the +tangent of the slant of the font and four fifths of the x-height of +the font. +. If this would result in a subscript correction greater than the italic correction, use a subscript correction equal to the italic correction instead. +. .IP -Also generate a left italic correction for each character -equal to +Also generate a left italic correction for each character equal to .I n thousandths of an em plus the amount by which the left edge of the -character's bounding box is to the left of the character's origin. +character\[aq]s bounding box is to the left of the character\[aq]s +origin. +. The left italic correction may be negative. +. .IP This option normally is needed only with italic or oblique fonts; a value of 50 (0.05 em) usually is a reasonable choice. +. +. .\" -------------------------------------------------------------------------- .SH FILES .\" -------------------------------------------------------------------------- +. .ad 0 -.TP \w'\fB@FONTDIR@/devlj4/generate/\fP\fI*\fP.map'u+2n +.TP \w'\fB@FONTDIR@/devlj4/generate/\fP\,\fI*\/\fP.map'u+2n .B @FONTDIR@/devlj4/DESC Device description file. .TP @@ -298,15 +362,24 @@ .TP .BI @FONTDIR@/devlj4/generate/ * .map Symbol mapping files -.\" -------------------------------------------------------------------------- +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -.\" -------------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@), .BR groff_diff (@MAN1EXT@), .BR grolj4 (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR lj4_font (@MAN5EXT@) . +. +.\" -------------------------------------------------------------------- +.SH "COPYING" +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/hpftodit/hpuni.cpp groff-1.22.3/src/utils/hpftodit/hpuni.cpp --- groff-1.22.2/src/utils/hpftodit/hpuni.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/hpftodit/hpuni.cpp 2014-11-04 09:38:35.293523147 +0100 @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. Written by Jeff Conrad (jeff_conrad@msn.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/hpftodit/Makefile.sub groff-1.22.3/src/utils/hpftodit/Makefile.sub --- groff-1.22.2/src/utils/hpftodit/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/hpftodit/Makefile.sub 2014-11-04 09:38:35.293523147 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils hpftodit' +# +# File position: /src/utils/hpftodit/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=hpftodit$(EXEEXT) MAN1=hpftodit.n XLIBS=$(LIBGROFF) @@ -6,3 +30,11 @@ hpuni.$(OBJEXT) CCSRCS=$(srcdir)/hpftodit.cpp \ $(srcdir)/hpuni.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/indxbib/indxbib.cpp groff-1.22.3/src/utils/indxbib/indxbib.cpp --- groff-1.22.2/src/utils/indxbib/indxbib.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/indxbib/indxbib.cpp 2014-11-04 09:38:35.301523047 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/indxbib/indxbib.man groff-1.22.3/src/utils/indxbib/indxbib.man --- groff-1.22.2/src/utils/indxbib/indxbib.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/indxbib/indxbib.man 2014-11-04 09:38:35.301523047 +0100 @@ -1,5 +1,10 @@ -.ig -Copyright (C) 1989-2000, 2001, 2009 Free Software Foundation, Inc. +.TH @G@INDXBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@indxbib \- make inverted index for bibliographic databases +. +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -16,10 +21,11 @@ translations approved by the Free Software Foundation instead of in the original English. .. -.TH @G@INDXBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -@g@indxbib \- make inverted index for bibliographic databases +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .nr a \n(.j .ad l .nr i \n(.i @@ -43,7 +49,12 @@ .OP \-t n .RI [\ filename \|.\|.\|.\ ] .ad \na +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B @g@indxbib makes an inverted index for the bibliographic databases in .IR filename \|.\|.\|. @@ -52,23 +63,31 @@ .BR @g@lookbib (@MAN1EXT@), and .BR lkbib (@MAN1EXT@). +. The index will be named .IB filename @INDEX_SUFFIX@\fR; -the index is written to a temporary file which is then renamed to this. +the index is written to a temporary file which is then renamed to +this. +. If no filenames are given on the command line because the .B \-f option has been used, and no .B \-o option is given, the index will be named .BR @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ . +. +. .LP Bibliographic databases are divided into records by blank lines. Within a record, each fields starts with a .B % character at the beginning of a line. +. Fields have a one letter name which follows the .B % character. +. +. .LP The values set by the .BR \-c , @@ -81,33 +100,44 @@ manner appropriate to these options; the original keys will be used for verifying that any record found using the index actually contains the keys. +. This means that a user of an index need not know whether these options were used in the creation of the index, provided that not all the keys to be searched for would have been discarded during indexing and that the user supplies at least the part of each key that would have remained after being truncated during indexing. +. The value set by the .B \-i option is also stored in the index and will be used in verifying records found using the index. +. +. +.\" -------------------------------------------------------------------- .SH OPTIONS -.PP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. +. .TP .B \-v Print the version number. +. .TP .B \-w Index whole files. +. Each file is a separate record. +. .TP .BI \-c file Read the list of common words from .I file instead of .BR @COMMON_WORDS_FILE@ . +. .TP .BI \-d dir Use @@ -115,14 +145,17 @@ as the pathname of the current working directory to store in the index, instead of the path printed by .BR pwd (1). +. Usually .I dir will be a symbolic link that points to the directory printed by .BR pwd (1). +. .TP .BI \-f file Read the files to be indexed from .IR file . +. If .I file is @@ -131,19 +164,23 @@ The .B \-f option can be given at most once. +. .TP .BI \-i string -Don't index the contents of fields whose names are in +Don\[aq]t index the contents of fields whose names are in .IR string . +. Initially .I string is .BR XYZ . +. .TP .BI \-h n Use the first prime greater than or equal to .I n for the size of the hash table. +. Larger values of .I n will usually make searching faster, @@ -151,61 +188,90 @@ and .B @g@indxbib use more memory. +. Initially .I n is 997. +. .TP .BI \-k n Use at most .I n keys per input record. +. Initially .I n is 100. +. .TP .BI \-l n Discard keys that are shorter than .IR n . +. Initially .I n is 3. +. .TP .BI \-n n Discard the .I n most common words. +. Initially .I n is 100. +. .TP .BI \-o basename The index should be named .IB basename @INDEX_SUFFIX@\fR. +. .TP .BI \-t n Truncate keys to .IR n . +. Initially .I n is 6. +. +. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP \w'\fBindxbib\fIXXXXXX'u+2n .IB filename @INDEX_SUFFIX@ Index. +. .TP .B @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ Default index name. +. .TP .B @COMMON_WORDS_FILE@ List of common words. +. .TP .BI indxbib XXXXXX Temporary file. +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR @g@refer (@MAN1EXT@), .BR lkbib (@MAN1EXT@), .BR @g@lookbib (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/indxbib/Makefile.sub groff-1.22.3/src/utils/indxbib/Makefile.sub --- groff-1.22.2/src/utils/indxbib/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/indxbib/Makefile.sub 2014-11-04 09:38:35.301523047 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils indxbib' +# +# File position: /src/utils/indxbib/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=indxbib$(EXEEXT) MAN1=indxbib.n XLIBS=$(LIBBIB) $(LIBGROFF) @@ -10,6 +34,7 @@ CSRCS=\ $(srcdir)/signal.c NAMEPREFIX=$(g) +RM=rm -f install_data: $(srcdir)/eign -test -d $(DESTDIR)$(datadir) \ @@ -19,14 +44,22 @@ -test -d $(DESTDIR)$(datasubdir) \ || $(mkinstalldirs) $(DESTDIR)$(datasubdir) if test -f /usr/lib/eign; then \ - rm -f $(DESTDIR)$(common_words_file); \ + $(MK) $(DESTDIR)$(common_words_file); \ ln -s /usr/lib/eign $(DESTDIR)$(common_words_file) 2>/dev/null \ - || ln /usr/lib/eign $(DESTDIR)$(common_words_file) 2>/dev/null \ - || cp /usr/lib/eign $(DESTDIR)$(common_words_file); \ + || ln /usr/lib/eign $(DESTDIR)$(common_words_file) 2>/dev/null \ + || cp /usr/lib/eign $(DESTDIR)$(common_words_file); \ else \ - rm -f $(DESTDIR)$(common_words_file); \ + $(RM) $(DESTDIR)$(common_words_file); \ $(INSTALL_DATA) $(srcdir)/eign $(DESTDIR)$(common_words_file); \ fi uninstall_sub: - -rm -f $(DESTDIR)$(common_words_file) + $(RM) $(DESTDIR)$(common_words_file) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/indxbib/signal.c groff-1.22.3/src/utils/indxbib/signal.c --- groff-1.22.2/src/utils/indxbib/signal.c 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/indxbib/signal.c 2014-11-04 09:38:35.301523047 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 2001, 2003, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/lkbib/lkbib.cpp groff-1.22.3/src/utils/lkbib/lkbib.cpp --- groff-1.22.2/src/utils/lkbib/lkbib.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lkbib/lkbib.cpp 2014-11-04 09:38:35.305522997 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/lkbib/lkbib.man groff-1.22.3/src/utils/lkbib/lkbib.man --- groff-1.22.2/src/utils/lkbib/lkbib.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lkbib/lkbib.man 2014-11-04 09:38:35.305522997 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2000, 2001, 2004, 2009 - Free Software Foundation, Inc. +.TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +lkbib \- search bibliographic databases +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,6 +26,9 @@ the original English. .. . +.\" -------------------------------------------------------------------- +.\" Definitions +.\" -------------------------------------------------------------------- . .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. @@ -26,15 +37,10 @@ . el .TP "\\$1" .. . -. -.TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -lkbib \- search bibliographic databases -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B lkbib [ .B \-v @@ -50,25 +56,27 @@ ] .IR key \|.\|.\|. . -.PP -It is possible to have whitespace between a command line option and its -parameter. -. . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B lkbib searches bibliographic databases for references that contain the keys .IR key \|.\|.\|.\& and prints any references found on the standard output. +. .B lkbib will search any databases given by .B \-p options, and then a default database. +. The default database is taken from the .SB REFER environment variable if it is set, otherwise it is .BR @DEFAULT_INDEX@ . +. For each database .I filename to be searched, @@ -80,7 +88,14 @@ each index can cover multiple databases. . . +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- +. +It is possible to have whitespace between a command line option and its +parameter. +. +. .TP .B \-v Print the version number. @@ -89,6 +104,7 @@ .BI \-p filename Search .IR filename . +. Multiple .B \-p options can be used. @@ -104,18 +120,25 @@ Only require the first .I n characters of keys to be given. +. Initially .I n is\~6. . . +.\" -------------------------------------------------------------------- .SH ENVIRONMENT +.\" -------------------------------------------------------------------- +. .TP \w'\fBREFER'u+2n .SB REFER Default database. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'\fB@DEFAULT_INDEX@'u+2n .B @DEFAULT_INDEX@ Default database to be used if the @@ -127,11 +150,20 @@ Index files. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR @g@refer (@MAN1EXT@), .BR @g@lookbib (@MAN1EXT@), .BR @g@indxbib (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/lkbib/Makefile.sub groff-1.22.3/src/utils/lkbib/Makefile.sub --- groff-1.22.2/src/utils/lkbib/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lkbib/Makefile.sub 2014-11-04 09:38:35.305522997 +0100 @@ -1,6 +1,38 @@ +# Makefile.sub for `src utils lkbib' +# +# File position: /src/utils/lkbib/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=lkbib$(EXEEXT) MAN1=lkbib.n XLIBS=$(LIBBIB) $(LIBGROFF) MLIB=$(LIBM) OBJS=lkbib.$(OBJEXT) CCSRCS=$(srcdir)/lkbib.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/lookbib/lookbib.cpp groff-1.22.3/src/utils/lookbib/lookbib.cpp --- groff-1.22.2/src/utils/lookbib/lookbib.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lookbib/lookbib.cpp 2014-11-04 09:38:35.297523097 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2002, 2003, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/lookbib/lookbib.man groff-1.22.3/src/utils/lookbib/lookbib.man --- groff-1.22.2/src/utils/lookbib/lookbib.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lookbib/lookbib.man 2014-11-04 09:38:35.297523097 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2000, 2001, 2004, 2009 - Free Software Foundation, Inc. +.TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@lookbib \- search bibliographic databases +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,15 +26,10 @@ the original English. .. . -. -.TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -@g@lookbib \- search bibliographic databases -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B @g@lookbib [ .B \-v @@ -40,7 +43,10 @@ .IR filename \|.\|.\|. . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B @g@lookbib prints a prompt on the standard error (unless the standard input is not a terminal), @@ -50,6 +56,7 @@ for references containing those keywords, prints any references found on the standard output, and repeats this process until the end of input. +. For each database .I filename to be searched, @@ -61,8 +68,10 @@ each index can cover multiple databases. . . +.\" -------------------------------------------------------------------- .SH OPTIONS -.PP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. . @@ -86,17 +95,29 @@ is\~6. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .TP \w'\fIfilename\fB@INDEX_SUFFIX@'u+2n .IB filename @INDEX_SUFFIX@ Index files. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR @g@refer (@MAN1EXT@), .BR lkbib (@MAN1EXT@), .BR @g@indxbib (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/lookbib/Makefile.sub groff-1.22.3/src/utils/lookbib/Makefile.sub --- groff-1.22.2/src/utils/lookbib/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/lookbib/Makefile.sub 2014-11-04 09:38:35.297523097 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils lookbib' +# +# File position: /src/utils/lookbib/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=lookbib$(EXEEXT) MAN1=lookbib.n XLIBS=$(LIBBIB) $(LIBGROFF) @@ -5,3 +29,11 @@ OBJS=lookbib.$(OBJEXT) CCSRCS=$(srcdir)/lookbib.cpp NAMEPREFIX=$(g) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/pfbtops/Makefile.sub groff-1.22.3/src/utils/pfbtops/Makefile.sub --- groff-1.22.2/src/utils/pfbtops/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/pfbtops/Makefile.sub 2014-11-04 09:38:35.314522884 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils pfbtops' +# +# File position: /src/utils/pfbtops/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=pfbtops$(EXEEXT) MAN1=pfbtops.n OBJS=pfbtops.$(OBJEXT) @@ -5,3 +29,11 @@ XLIBS=$(LIBGROFF) MLIB=$(LIBM) LINK.c=$(CCC) $(CCFLAGS) $(LDFLAGS) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/pfbtops/pfbtops.c groff-1.22.3/src/utils/pfbtops/pfbtops.c --- groff-1.22.2/src/utils/pfbtops/pfbtops.c 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/pfbtops/pfbtops.c 2014-11-04 09:38:35.314522884 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 2001, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/pfbtops/pfbtops.man groff-1.22.3/src/utils/pfbtops/pfbtops.man --- groff-1.22.2/src/utils/pfbtops/pfbtops.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/pfbtops/pfbtops.man 2014-11-04 09:38:35.314522884 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-1995, 2001, 2003, 2004, 2009, 2011 - Free Software Foundation, Inc. +.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +pfbtops \- translate a PostScript font in .pfb format to ASCII +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -18,15 +26,10 @@ the original English. .. . -. -.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -pfbtops \- translate a PostScript font in .pfb format to ASCII -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B pfbtops [ .B \-v @@ -36,37 +39,57 @@ ] . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B pfbtops translates a PostScript font in .B .pfb format to ASCII, splitting overlong lines in text packets into smaller chunks. +. If .I pfb_file is omitted the pfb file will be read from the standard input. +. The ASCII format PostScript font will be written on the standard output. +. PostScript fonts for MS-DOS are normally supplied in .B .pfb format. . +. .LP The resulting ASCII format PostScript font can be used with groff. +. It must first be listed in .B @FONTDIR@/devps/download and .BR @FONTDIR@/devpdf/download . . +. +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- .TP .B \-v Print the version number. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR grops (@MAN1EXT@), .BR gropdf (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/tfmtodit/Makefile.sub groff-1.22.3/src/utils/tfmtodit/Makefile.sub --- groff-1.22.2/src/utils/tfmtodit/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/tfmtodit/Makefile.sub 2014-11-04 09:38:35.288523209 +0100 @@ -1,6 +1,38 @@ +# Makefile.sub for `src utils tfmtodit' +# +# File position: /src/utils/tfmtodit/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=tfmtodit$(EXEEXT) MAN1=tfmtodit.n XLIBS=$(LIBGROFF) MLIB=$(LIBM) OBJS=tfmtodit.$(OBJEXT) CCSRCS=$(srcdir)/tfmtodit.cpp + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/tfmtodit/tfmtodit.cpp groff-1.22.3/src/utils/tfmtodit/tfmtodit.cpp --- groff-1.22.2/src/utils/tfmtodit/tfmtodit.cpp 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/tfmtodit/tfmtodit.cpp 2014-11-04 09:38:35.288523209 +0100 @@ -1,6 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2004, 2009, 2011 - Free Software Foundation, Inc. +/* Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/tfmtodit/tfmtodit.man groff-1.22.3/src/utils/tfmtodit/tfmtodit.man --- groff-1.22.2/src/utils/tfmtodit/tfmtodit.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/tfmtodit/tfmtodit.man 2014-11-04 09:38:35.288523209 +0100 @@ -1,6 +1,14 @@ -.ig -Copyright (C) 1989-2000, 2001, 2002, 2009 - Free Software Foundation, Inc. +.TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +tfmtodit \- create font files for use with groff \-Tdvi +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,6 +25,11 @@ translations approved by the Free Software Foundation instead of in the original English. .. +. +.\" -------------------------------------------------------------------- +.\" Definitions +.\" -------------------------------------------------------------------- +. .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X .el .ds tx TeX .\" Like TP, but if specified indent is more than half @@ -25,11 +38,13 @@ .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. -.TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -.SH NAME -tfmtodit \- create font files for use with groff \-Tdvi +. +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS -.nr a \n(.j +.\" -------------------------------------------------------------------- +. +nr a \n(.j .ad l .nr i \n(.i .in +\w'\fBtfmtodit 'u @@ -47,19 +62,28 @@ .I font .br .ad \na +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B tfmtodit creates a font file for use with .B groff \-Tdvi\fR. +. .I tfm_file is the name of the \*(tx font metric file for the font. +. .I map_file is a file giving the groff names for characters in the font; this file should consist of a sequence of lines of the form: .IP .I n c1 c2 \fR.\|.\|. +. +. .LP where .I n @@ -68,12 +92,17 @@ .IR c1 , .IR c2 ,.\|.\|. are the groff names of the character. +. If a character has no groff names but exists in the tfm file, then it will be put in the groff font file as an unnamed character. +. .I font is the name of the groff font file. +. The groff font file is written to .IR font . +. +. .LP The .B \-s @@ -84,27 +113,34 @@ .B troff should search it whenever a character is not found in the current font.) +. If the font is special, it should be listed in the .B fonts command in the DESC file; if it is not special, there is no need to list it, since .B troff -can automatically mount it when it's first used. +can automatically mount it when it\[aq]s first used. +. +. .LP -To do a good job of math typesetting, groff requires -font metric information not present in the tfm file. +To do a good job of math typesetting, groff requires font metric +information not present in the tfm file. +. The reason for this is that \*(tx has separate math italic fonts whereas groff uses normal italic fonts for math. -The additional information required by groff is given by the -two arguments to the +. +The additional information required by groff is given by the two +arguments to the .B math_fit macro in the Metafont programs for the Computer Modern fonts. +. In a text font (a font for which .B math_fitting is false), Metafont normally ignores these two arguments. -Metafont can be made to put this information in the gf file -by loading the following definition after +. +Metafont can be made to put this information in the gf file by loading +the following definition after .B cmbase when creating .BR cm.base : @@ -142,57 +178,86 @@ should be specified with the .B \-g option. +. The .B \-g option should not be given for a font for which .B math_fitting is true. +. +. +.\" -------------------------------------------------------------------- .SH OPTIONS -.PP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. +. .TP .B \-v Print the version number. +. .TP .B \-s The font is special. +. The effect of this option is to add the .B special command to the font file. +. .TP .BI \-k n The skewchar of this font is at position .IR n . +. .I n should be an integer; it may be given in decimal, -or with a leading +or with a leading .B 0 in octal, or with a leading .B 0x in hexadecimal. -The effect of this option is to ignore any kerns whose second component -is the specified character. +. +The effect of this option is to ignore any kerns whose second +component is the specified character. +. .TP .BI \-g gf_file .I gf_file is a gf file produced by Metafont containing special and numspecial commands giving additional font metric information. +. +. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. .Tp \w'\fB@FONTDIR@/devdvi/DESC'u+2n .B @FONTDIR@/devdvi/DESC Device description file. +. .TP .BI @FONTDIR@/devdvi/ F Font description file for font .IR F . +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@), .BR grodvi (@MAN1EXT@), .BR groff_font (@MAN5EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/src/utils/xtotroff/Makefile.in groff-1.22.3/src/utils/xtotroff/Makefile.in --- groff-1.22.2/src/utils/xtotroff/Makefile.in 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/xtotroff/Makefile.in 2014-11-04 09:38:35.331522672 +0100 @@ -1,5 +1,4 @@ -# Copyright (C) 2004, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -29,6 +28,8 @@ xtotroff=$(builddir)/xtotroff DPIS=75 100 +RM=rm -f + all: @echo "Say \`make fonts' to generate fonts for gxditview." @@ -36,26 +37,34 @@ fonts=`sed -e 's/[ ].*//' $(driverdir)/FontMap`; \ for dpi in $(DPIS); do \ echo Making devX$$dpi; \ - test -d $(devdir)/devX$$dpi || \ - $(mkinstalldirs) $(devdir)/devX$$dpi; \ - rm -f $(devdir)/devX$$dpi/DESC; \ + test -d $(devdir)/devX$$dpi \ + || $(mkinstalldirs) $(devdir)/devX$$dpi; \ + $(RM) $(devdir)/devX$$dpi/DESC; \ sed -e "s/res 75/res $$dpi/" $(driverdir)/DESC.in \ >$(devdir)/devX$$dpi/DESC; \ (cd $(devdir)/devX$$dpi; \ - rm -f Makefile.sub; \ + $(RM) Makefile.sub; \ echo DEV=X$$dpi >Makefile.sub; \ echo DEVFILES=DESC $$fonts >>Makefile.sub; \ $(xtotroff) -r $$dpi -s 10 $(driverdir)/FontMap); \ echo Making devX$$dpi-12; \ - test -d $(devdir)/devX$$dpi-12 || \ - $(mkinstalldirs) $(devdir)/devX$$dpi-12; \ - rm -f $(devdir)/devX$$dpi-12/DESC; \ + test -d $(devdir)/devX$$dpi-12 \ + || $(mkinstalldirs) $(devdir)/devX$$dpi-12; \ + $(RM) $(devdir)/devX$$dpi-12/DESC; \ sed -e "s/res 75/res $$dpi/" \ -e 's/unitwidth 10/unitwidth 12/' $(driverdir)/DESC.in \ >$(devdir)/devX$$dpi-12/DESC; \ (cd $(devdir)/devX$$dpi-12; \ - rm -f Makefile.sub; \ + $(RM) Makefile.sub; \ echo DEV=X$$dpi-12 >Makefile.sub; \ echo DEVFILES=DESC $$fonts >>Makefile.sub; \ $(xtotroff) -r $$dpi -s 12 $(driverdir)/FontMap); \ done + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/xtotroff/Makefile.sub groff-1.22.3/src/utils/xtotroff/Makefile.sub --- groff-1.22.2/src/utils/xtotroff/Makefile.sub 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/xtotroff/Makefile.sub 2014-11-04 09:38:35.331522672 +0100 @@ -1,3 +1,27 @@ +# Makefile.sub for `src utils xtotroff' +# +# File position: /src/utils/stotroff/Makefile.sub +# +# Copyright (C) 2014 Free Software Foundation, Inc. +# +# This file is part of `font utf8' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . +# +######################################################################## + PROG=xtotroff$(EXEEXT) MAN1=xtotroff.n MLIB=$(LIBM) @@ -6,3 +30,11 @@ EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXt -lX11 $(X_EXTRA_LIBS) OBJS=xtotroff.$(OBJEXT) CSRCS=$(srcdir)/xtotroff.c + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/src/utils/xtotroff/xtotroff.c groff-1.22.3/src/utils/xtotroff/xtotroff.c --- groff-1.22.2/src/utils/xtotroff/xtotroff.c 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/xtotroff/xtotroff.c 2014-11-04 09:38:35.331522672 +0100 @@ -1,5 +1,4 @@ -/* Copyright (C) 1992, 2001, 2003, 2004, 2005, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/src/utils/xtotroff/xtotroff.man groff-1.22.3/src/utils/xtotroff/xtotroff.man --- groff-1.22.2/src/utils/xtotroff/xtotroff.man 2013-02-07 13:06:07.000000000 +0100 +++ groff-1.22.3/src/utils/xtotroff/xtotroff.man 2014-11-04 09:38:35.331522672 +0100 @@ -1,5 +1,14 @@ -.ig -Copyright (C) 2004, 2009 Free Software Foundation, Inc. +.TH XTOTROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +xtotroff \- convert X font metrics into GNU troff font metrics +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2004-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -17,15 +26,10 @@ the original English. .. . -. -.TH XTOTROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.SH NAME -xtotroff \- convert X font metrics into GNU troff font metrics -. -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B xtotroff [ .BI \-r \%resolution @@ -39,7 +43,10 @@ .I FontMap . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. .B xtotroff takes a .IR FontMap , @@ -49,11 +56,13 @@ creates GNU .B troff metric files for all fonts listed. +. Each line in .I FontMap consists of GNU .B troff font name and an X font name (XLFD) pattern, separated by whitespace. +. Example: . .PP @@ -63,19 +72,23 @@ .fi .in . +. .PP The wildcards in the patterns are filled with the arguments to the .B \-r and .B \-s switches. +. If a font name is still ambiguous, .B xtotroff aborts. . . +.\" -------------------------------------------------------------------- .SH OPTIONS -.PP +.\" -------------------------------------------------------------------- +. It is possible to have whitespace between a command line option and its parameter. . @@ -83,13 +96,16 @@ .BI \-r resolution Set the resolution for all font patterns in .IR FontMap . +. The value is used for both the horizontal and vertical resolution. +. If not specified, a resolution of 75dpi is assumed. . .TP .BI \-s point-size Set the point size for all font patterns in .IR FontMap . +. If not specified, a size of 10pt is assumed. . .TP @@ -97,13 +113,25 @@ Print the version number. . . +.\" -------------------------------------------------------------------- .SH BUGS -The only supported font encodings are `iso8859-1' and `adobe-fontspecific'. +.\" -------------------------------------------------------------------- +The only supported font encodings are \[oq]iso8859-1\[cq] and +\[cq]adobe-fontspecific\[cq]. . . +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR gxditview (@MAN1EXT@) . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/test-groff.in groff-1.22.3/test-groff.in --- groff-1.22.2/test-groff.in 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/test-groff.in 2014-11-04 09:38:35.146524985 +0100 @@ -1,7 +1,6 @@ #! /bin/sh # -# Copyright (C) 1989-2000, 2001-2005, 2009, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. # # This file is part of groff. # diff -ruN groff-1.22.2/tmac/62bit.tmac groff-1.22.3/tmac/62bit.tmac --- groff-1.22.2/tmac/62bit.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/62bit.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,7 +1,8 @@ +.\" -*- nroff -*- +.\" .\" 62bit.tmac .\" -.\" Copyright (C) 2003, 2006, 2009 -.\" Free Software Foundation, Inc. +.\" Copyright (C) 2003-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/a4.tmac groff-1.22.3/tmac/a4.tmac --- groff-1.22.2/tmac/a4.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/a4.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" a4.tmac .\" .\" Set up groff for A4 paper. Must be called before any other macro diff -ruN groff-1.22.2/tmac/andoc.tmac groff-1.22.3/tmac/andoc.tmac --- groff-1.22.2/tmac/andoc.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/andoc.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,11 +1,12 @@ +.\" -*- nroff -*- +.\" .\" andoc.tmac .\" .\" Load either an-old.tmac or doc.tmac. Multiple man pages can be .\" handled. .\" .\" -.\" Copyright (C) 1991, 1995, 2000, 2002, 2008, 2009 -.\" Free Software Foundation, Inc. +.\" Copyright (C) 1991-2014 Free Software Foundation, Inc. .\" Written by James Clark (jjc@jclark.com) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/an-ext.tmac groff-1.22.3/tmac/an-ext.tmac --- groff-1.22.2/tmac/an-ext.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/an-ext.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,14 +1,14 @@ +.\" -*- nroff -*- +.\" .\" an-ext.tmac .\" +.\" Copyright (C) 2007-2014 Free Software Foundation, Inc. +.\" .\" Written by Eric S. Raymond .\" Werner Lemberg .\" -.\" Version 2012-Mar-05 -.\" -.\" Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc. .\" You may freely use, modify and/or distribute this file. .\" -.\" .\" The code below provides extension macros for the `man' macro package. .\" Care has been taken to make the code portable; groff extensions are .\" properly hidden so that all troff implementations can use it without @@ -183,15 +183,18 @@ . .\" Start example. .de EX +. do ds mF \\n[.fam] . nr mE \\n(.f . nf . nh +. do fam C . ft CW .. . . .\" End example. .de EE +. do fam \\*(mF . ft \\n(mE . fi . hy \\n(HY diff -ruN groff-1.22.2/tmac/an-old.tmac groff-1.22.3/tmac/an-old.tmac --- groff-1.22.2/tmac/an-old.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/an-old.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,7 +1,8 @@ +.\" -*- nroff -*- +.\" .\" an-old.tmac .\" -.\" Copyright (C) 1989-1992, 2001-2005, 2007-2009, 2011 -.\" Free Software Foundation, Inc. +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" Written by James Clark (jjc@jclark.com) .\" .\" This file is part of groff. @@ -122,7 +123,11 @@ .\} . .de set-an-margin +. nr an-level 1 . nr an-margin \\n[IN] +. nr an-saved-margin1 \\n[IN] +. nr an-prevailing-indent \\n[IN] +. nr an-saved-prevailing-indent1 \\n[IN] .. . .ds an-extra1 @@ -198,9 +203,7 @@ . PD . if !r SN \ . nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings -. nr an-level 1 . set-an-margin -. nr an-prevailing-indent \\n[IN] . nr an-tag-sep 1n . . nr an-no-space-flag 0 @@ -342,9 +345,7 @@ . .de1 SH . sp \\n[PD]u -. nr an-level 1 . set-an-margin -. nr an-prevailing-indent \\n[IN] . fi . in \\n[an-margin]u . ti 0 @@ -361,9 +362,7 @@ . .de1 SS . sp \\n[PD]u -. nr an-level 1 . set-an-margin -. nr an-prevailing-indent \\n[IN] . fi . in \\n[IN]u . ti \\n[SN]u @@ -406,8 +405,10 @@ . if \\n[.$] .nr an-prevailing-indent (n;\\$1) . it 1 an-trap . in 0 -. ll -\\n[an-margin]u -. if !\\n[an-div?] .di an-div +. if !\\n[an-div?] \{\ +. ll -\\n[an-margin]u +. di an-div +. \} . nr an-div? 1 .. . diff -ruN groff-1.22.2/tmac/an.tmac groff-1.22.3/tmac/an.tmac --- groff-1.22.2/tmac/an.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/an.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .\" an.tmac .\" .do mso andoc.tmac diff -ruN groff-1.22.2/tmac/composite.tmac groff-1.22.3/tmac/composite.tmac --- groff-1.22.2/tmac/composite.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/composite.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .\" composite.tmac . .do composite ga u0300 diff -ruN groff-1.22.2/tmac/cp1047.tmac groff-1.22.3/tmac/cp1047.tmac --- groff-1.22.2/tmac/cp1047.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/cp1047.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" cp1047.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/cs.tmac groff-1.22.3/tmac/cs.tmac --- groff-1.22.2/tmac/cs.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/cs.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -2,7 +2,7 @@ .\" .\" Czech localization for groff .\" -.\" Copyright (C) 2007, 2009 Free Software Foundation, Inc. +.\" Copyright (C) 2007-2014 Free Software Foundation, Inc. .\" Written by Marcela Ma¹láòová (mmaslano@redhat.com) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/den.tmac groff-1.22.3/tmac/den.tmac --- groff-1.22.2/tmac/den.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/den.tmac 2014-11-04 09:38:35.532520159 +0100 @@ -2,7 +2,7 @@ .\" .\" German localization for groff (new orthography) .\" -.\" Copyright (C) 2006, 2009 Free Software Foundation, Inc. +.\" Copyright (C) 2006-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/de.tmac groff-1.22.3/tmac/de.tmac --- groff-1.22.2/tmac/de.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/de.tmac 2014-11-04 09:38:35.533520146 +0100 @@ -2,8 +2,8 @@ .\" .\" German localization for groff .\" -.\" Copyright (C) 2006, 2009 Free Software Foundation, Inc. -.\" Written by Werner Lemberg (wl@gnu.org) +.\" Copyright (C) 2006-2014 Free Software Foundation, Inc. +.\" Written by Werner Lberg (wl@gnu.org) .\" .\" This file is part of groff. .\" diff -ruN groff-1.22.2/tmac/devtag.tmac groff-1.22.3/tmac/devtag.tmac --- groff-1.22.2/tmac/devtag.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/devtag.tmac 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .ig devtag.tmac - macro package for adding tags to roff documents. @@ -10,7 +11,7 @@ This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2004-2014 Free Software Foundation, Inc. written by Gaius Mulley . groff is free software; you can redistribute it and/or modify it under diff -ruN groff-1.22.2/tmac/doc-common groff-1.22.3/tmac/doc-common --- groff-1.22.2/tmac/doc-common 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc-common 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -37,6 +39,7 @@ . .nr %A 1 .nr %B 1 +.nr %C 1 .nr %D 1 .nr %I 1 .nr %J 1 @@ -484,7 +487,23 @@ .ds doc-operating-system-NetBSD-5.0.1 5.0.1 .ds doc-operating-system-NetBSD-5.0.2 5.0.2 .ds doc-operating-system-NetBSD-5.1 5.1 +.ds doc-operating-system-NetBSD-5.1.2 5.1.2 +.ds doc-operating-system-NetBSD-5.1.3 5.1.3 +.ds doc-operating-system-NetBSD-5.1.4 5.1.4 +.ds doc-operating-system-NetBSD-5.2 5.2 +.ds doc-operating-system-NetBSD-5.2.1 5.2.1 +.ds doc-operating-system-NetBSD-5.2.2 5.2.2 .ds doc-operating-system-NetBSD-6.0 6.0 +.ds doc-operating-system-NetBSD-6.0.1 6.0.1 +.ds doc-operating-system-NetBSD-6.0.2 6.0.2 +.ds doc-operating-system-NetBSD-6.0.3 6.0.3 +.ds doc-operating-system-NetBSD-6.0.4 6.0.4 +.ds doc-operating-system-NetBSD-6.0.5 6.0.5 +.ds doc-operating-system-NetBSD-6.1 6.1 +.ds doc-operating-system-NetBSD-6.1.1 6.1.1 +.ds doc-operating-system-NetBSD-6.1.2 6.1.2 +.ds doc-operating-system-NetBSD-6.1.3 6.1.3 +.ds doc-operating-system-NetBSD-6.1.4 6.1.4 . .ds doc-operating-system-OpenBSD-2.0 2.0 .ds doc-operating-system-OpenBSD-2.1 2.1 @@ -517,6 +536,12 @@ .ds doc-operating-system-OpenBSD-4.8 4.8 .ds doc-operating-system-OpenBSD-4.9 4.9 .ds doc-operating-system-OpenBSD-5.0 5.0 +.ds doc-operating-system-OpenBSD-5.1 5.1 +.ds doc-operating-system-OpenBSD-5.2 5.2 +.ds doc-operating-system-OpenBSD-5.3 5.3 +.ds doc-operating-system-OpenBSD-5.4 5.4 +.ds doc-operating-system-OpenBSD-5.5 5.5 +.ds doc-operating-system-OpenBSD-5.6 5.6 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -535,6 +560,7 @@ .ds doc-operating-system-FreeBSD-2.2.6 2.2.6 .ds doc-operating-system-FreeBSD-2.2.7 2.2.7 .ds doc-operating-system-FreeBSD-2.2.8 2.2.8 +.ds doc-operating-system-FreeBSD-2.2.9 2.2.9 .ds doc-operating-system-FreeBSD-3.0 3.0 .ds doc-operating-system-FreeBSD-3.1 3.1 .ds doc-operating-system-FreeBSD-3.2 3.2 @@ -571,10 +597,17 @@ .ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 +.ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.0 8.0 .ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-8.2 8.2 +.ds doc-operating-system-FreeBSD-8.3 8.3 +.ds doc-operating-system-FreeBSD-8.4 8.4 .ds doc-operating-system-FreeBSD-9.0 9.0 +.ds doc-operating-system-FreeBSD-9.1 9.1 +.ds doc-operating-system-FreeBSD-9.2 9.2 +.ds doc-operating-system-FreeBSD-9.3 9.3 +.ds doc-operating-system-FreeBSD-10.0 10.0 . .ds doc-operating-system-Darwin-8.0.0 8.0.0 .ds doc-operating-system-Darwin-8.1.0 8.1.0 @@ -597,6 +630,7 @@ .ds doc-operating-system-Darwin-9.6.0 9.6.0 .ds doc-operating-system-Darwin-9.7.0 9.7.0 .ds doc-operating-system-Darwin-9.8.0 9.8.0 +.ds doc-operating-system-Darwin-10.0.0 10.0.0 .ds doc-operating-system-Darwin-10.1.0 10.1.0 .ds doc-operating-system-Darwin-10.2.0 10.2.0 .ds doc-operating-system-Darwin-10.3.0 10.3.0 @@ -604,7 +638,22 @@ .ds doc-operating-system-Darwin-10.5.0 10.5.0 .ds doc-operating-system-Darwin-10.6.0 10.6.0 .ds doc-operating-system-Darwin-10.7.0 10.7.0 +.ds doc-operating-system-Darwin-10.8.0 10.8.0 .ds doc-operating-system-Darwin-11.0.0 11.0.0 +.ds doc-operating-system-Darwin-11.1.0 11.1.0 +.ds doc-operating-system-Darwin-11.2.0 11.2.0 +.ds doc-operating-system-Darwin-11.3.0 11.3.0 +.ds doc-operating-system-Darwin-11.4.0 11.4.0 +.ds doc-operating-system-Darwin-11.5.0 11.5.0 +.ds doc-operating-system-Darwin-12.0.0 12.0.0 +.ds doc-operating-system-Darwin-12.1.0 12.1.0 +.ds doc-operating-system-Darwin-12.2.0 12.2.0 +.ds doc-operating-system-Darwin-13.0.0 13.0.0 +.ds doc-operating-system-Darwin-13.1.0 13.1.0 +.ds doc-operating-system-Darwin-13.2.0 13.2.0 +.ds doc-operating-system-Darwin-13.3.0 13.3.0 +.ds doc-operating-system-Darwin-13.4.0 13.4.0 +.ds doc-operating-system-Darwin-14.0.0 14.0.0 . .ds doc-operating-system-DragonFly-1.0 1.0 .ds doc-operating-system-DragonFly-1.1 1.1 @@ -613,21 +662,40 @@ .ds doc-operating-system-DragonFly-1.4 1.4 .ds doc-operating-system-DragonFly-1.5 1.5 .ds doc-operating-system-DragonFly-1.6 1.6 +.ds doc-operating-system-DragonFly-1.7 1.7 .ds doc-operating-system-DragonFly-1.8 1.8 .ds doc-operating-system-DragonFly-1.8.1 1.8.1 +.ds doc-operating-system-DragonFly-1.9 1.9 .ds doc-operating-system-DragonFly-1.10 1.10 +.ds doc-operating-system-DragonFly-1.11 1.11 .ds doc-operating-system-DragonFly-1.12 1.12 .ds doc-operating-system-DragonFly-1.12.2 1.12.2 +.ds doc-operating-system-DragonFly-1.13 1.13 .ds doc-operating-system-DragonFly-2.0 2.0 +.ds doc-operating-system-DragonFly-2.1 2.1 .ds doc-operating-system-DragonFly-2.2 2.2 +.ds doc-operating-system-DragonFly-2.3 2.3 .ds doc-operating-system-DragonFly-2.4 2.4 +.ds doc-operating-system-DragonFly-2.5 2.5 .ds doc-operating-system-DragonFly-2.6 2.6 +.ds doc-operating-system-DragonFly-2.7 2.7 .ds doc-operating-system-DragonFly-2.8 2.8 .ds doc-operating-system-DragonFly-2.9 2.9 .ds doc-operating-system-DragonFly-2.9.1 2.9.1 .ds doc-operating-system-DragonFly-2.10 2.10 .ds doc-operating-system-DragonFly-2.10.1 2.10.1 .ds doc-operating-system-DragonFly-2.11 2.11 +.ds doc-operating-system-DragonFly-2.12 2.12 +.ds doc-operating-system-DragonFly-2.13 2.13 +.ds doc-operating-system-DragonFly-3.0 3.0 +.ds doc-operating-system-DragonFly-3.1 3.1 +.ds doc-operating-system-DragonFly-3.2 3.2 +.ds doc-operating-system-DragonFly-3.3 3.3 +.ds doc-operating-system-DragonFly-3.4 3.4 +.ds doc-operating-system-DragonFly-3.5 3.5 +.ds doc-operating-system-DragonFly-3.6 3.6 +.ds doc-operating-system-DragonFly-3.7 3.7 +.ds doc-operating-system-DragonFly-3.8 3.8 . .de Os . ds doc-command-name @@ -732,7 +800,9 @@ . ds doc-command-name . . ie \n[.$] \{\ -. ie (\n[.$] == 3) \ +. ie "\$1"$Mdocdate:" \ +. ds doc-date-string \$2\~\$3, \$4 +. el .ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 . el \{\ . ds doc-date-string "\*[doc-date-\n[mo]] diff -ruN groff-1.22.2/tmac/doc-ditroff groff-1.22.3/tmac/doc-ditroff --- groff-1.22.2/tmac/doc-ditroff 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc-ditroff 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" diff -ruN groff-1.22.2/tmac/doc-nroff groff-1.22.3/tmac/doc-nroff --- groff-1.22.2/tmac/doc-nroff 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc-nroff 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" diff -ruN groff-1.22.2/tmac/doc-old.tmac groff-1.22.3/tmac/doc-old.tmac --- groff-1.22.2/tmac/doc-old.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc-old.tmac 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,4 @@ +.\" -*- nroff -*- .\" .\" Copyright (c) 1990 The Regents of the University of California. .\" All rights reserved. diff -ruN groff-1.22.2/tmac/doc-syms groff-1.22.3/tmac/doc-syms --- groff-1.22.2/tmac/doc-syms 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc-syms 2014-11-04 09:38:35.533520146 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -202,6 +204,8 @@ .as doc-str-At-v6 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] .ds doc-str-At-v7 \&Version\~7 .as doc-str-At-v7 " \*[doc-Tn-font-size]AT&T UNIX\*[doc-str-At] +.ds doc-str-At-III \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~III +.as doc-str-At-III " \*[doc-Tn-font-size]UNIX\*[doc-str-At] .ds doc-str-At-V \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V .as doc-str-At-V " \*[doc-Tn-font-size]UNIX\*[doc-str-At] .ds doc-str-At-V.1 \*[doc-Tn-font-size]AT&T\*[doc-str-At] System\~V Release\~1 @@ -684,6 +688,7 @@ .ds doc-str-St--ieee754 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 754-1985 .ds doc-str-St--ieee1275-94 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1275-1994 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) +.ds doc-str-St--iso8601 \*[doc-Tn-font-size]ISO\*[doc-str-St] 8601 .ds doc-str-St--iso8802-3 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 8802-3:1989 . .de St diff -ruN groff-1.22.2/tmac/doc.tmac groff-1.22.3/tmac/doc.tmac --- groff-1.22.2/tmac/doc.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/doc.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -3423,6 +3425,8 @@ . . nr doc-book-count-saved \n[doc-book-count] . ds doc-book-name-saved "\*[doc-book-name] +. nr doc-city-count-saved \n[doc-city-count] +. ds doc-city-name-saved "\*[doc-city-name] . nr doc-date-count-saved \n[doc-date-count] . ds doc-date-saved "\*[doc-date] . nr doc-publisher-count-saved \n[doc-publisher-count] @@ -3565,6 +3569,8 @@ . . nr doc-book-count \n[doc-book-count-saved] . ds doc-book-name "\*[doc-book-name-saved] +. nr doc-city-count \n[doc-city-count-saved] +. ds doc-city-name "\*[doc-city-name-saved] . nr doc-date-count \n[doc-date-count-saved] . ds doc-date "\*[doc-date-saved] . nr doc-publisher-count \n[doc-publisher-count-saved] @@ -5190,6 +5196,8 @@ .\" NS doc-author-nameXXX .\" NS doc-book-count .\" NS doc-book-name +.\" NS doc-city-count +.\" NS doc-city-name .\" NS doc-corporate-count .\" NS doc-corporate-name .\" NS doc-date @@ -5228,6 +5236,7 @@ . nr doc-reference-title-count 0 . nr doc-url-count 0 . nr doc-volume-count 0 +. nr doc-city-count 0 . nr doc-date-count 0 . nr doc-page-number-count 0 . nr doc-book-count 0 @@ -5243,6 +5252,7 @@ . ds doc-reference-title-name-for-book . ds doc-url-name . ds doc-volume-name +. ds doc-city-name . ds doc-date . ds doc-page-number-string . ds doc-book-name @@ -5357,6 +5367,13 @@ . doc-finish-reference \n[doc-corporate-count] . \} . +. if \n[doc-city-count] \{\ +. unformat doc-city-name +. chop doc-city-name +. nop \*[doc-city-name]\c +. doc-finish-reference \n[doc-city-count] +. \} +. . if \n[doc-date-count] \{\ . unformat doc-date . chop doc-date @@ -5528,6 +5545,60 @@ .. . . +.\" NS doc-city-count global register +.\" NS counter of city references +. +.nr doc-city-count 0 +. +. +.\" NS doc-city-name global box +.\" NS string of collected city references +. +.ds doc-city-name +. +. +.\" NS %C user macro +.\" NS [reference] city +.\" NS +.\" NS modifies: +.\" NS doc-arg-ptr +.\" NS doc-curr-font +.\" NS doc-curr-size +.\" NS doc-city-count +.\" NS doc-macro-name +.\" NS doc-reference-count +.\" NS +.\" NS local variables: +.\" NS doc-env-%C +.\" NS +.\" NS width register `%C' set in doc-common +. +.de %C +. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\ +. tm Usage: .%C city_name ... (#\n[.c]) +. return +. \} +. +. nr doc-city-count +1 +. nr doc-reference-count +1 +. +. ds doc-macro-name %C +. doc-parse-args \$@ +. +. nr doc-arg-ptr +1 +. nr doc-curr-font \n[.f] +. nr doc-curr-size \n[.ps] +. +. \" append to reference box +. boxa doc-city-name +. ev doc-env-%C +. evc 0 +. in 0 +. nf +. doc-do-references +.. +. +. .\" NS doc-date-count global register .\" NS counter of date references . diff -ruN groff-1.22.2/tmac/dvi.tmac groff-1.22.3/tmac/dvi.tmac --- groff-1.22.2/tmac/dvi.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/dvi.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" dvi.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/ec.tmac groff-1.22.3/tmac/ec.tmac --- groff-1.22.2/tmac/ec.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/ec.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" ec.tmac .\" .\" Switch to EC fonts. diff -ruN groff-1.22.2/tmac/eqnrc groff-1.22.3/tmac/eqnrc --- groff-1.22.2/tmac/eqnrc 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/eqnrc 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Startup file for eqn. .if !d EQ .ds EQ .if !d EN .ds EN diff -ruN groff-1.22.2/tmac/e.tmac groff-1.22.3/tmac/e.tmac --- groff-1.22.2/tmac/e.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/e.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" @(#)e.tmac 2.31 (Berkeley) 5/21/88 .\" Modified by James Clark for use with groff. .\" diff -ruN groff-1.22.2/tmac/europs.tmac groff-1.22.3/tmac/europs.tmac --- groff-1.22.2/tmac/europs.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/europs.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" europs.tmac . .do char \[eu] \f[EURO]\N'0' diff -ruN groff-1.22.2/tmac/fallbacks.tmac groff-1.22.3/tmac/fallbacks.tmac --- groff-1.22.2/tmac/fallbacks.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/fallbacks.tmac 2014-11-04 09:38:35.534520134 +0100 @@ -1,7 +1,11 @@ +.\" -*- nroff -*- +.\" .\" fallbacks.tmac .\" .\" This file contains generic fallback characters. . +.nr _C \n(.C +.cp 0 . .\" fall back to GREEK CAPITAL LETTER DELTA for INCREMENT .fchar \[u2206] \[u0394] @@ -58,4 +62,6 @@ .fchar \[u217e] d .fchar \[u217f] m . +.cp \n[_C] +. .\" EOF diff -ruN groff-1.22.2/tmac/groff_man.man groff-1.22.3/tmac/groff_man.man --- groff-1.22.2/tmac/groff_man.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_man.man 2014-11-04 09:38:35.534520134 +0100 @@ -1,6 +1,15 @@ -.ig -Copyright (C) 1999-2005, 2007-2009, 2011 -Free Software Foundation, Inc. +.\" -*- nroff -*- +.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_man \- groff man macros to support generation of man pages +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1999-2014 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 @@ -18,20 +27,28 @@ the original English. .. . +.de au +This manual page was originally written for the Debian GNU/Linux +system by +.MT sgk@debian.org +Susan G.\& Kleinmann +.ME . + +It was corrected and updated by +.MT wl@gnu.org +Werner Lemberg +.ME . + +The extension macros were documented (and partly designed) by +.MT esr@thyrsus.com +Eric S.\& Raymond +.ME ; +he also wrote the portability advice. +.. . -.TH GROFF_MAN @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -.\" ---------------------------------------------------------------- -. -.SH NAME -. -groff_man \- groff `man' macros to support generation of man pages -. -. -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY "groff\ \-man" .RI [ options @@ -47,9 +64,9 @@ .YS . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . The .B man @@ -63,15 +80,16 @@ package. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH OPTIONS +.\" -------------------------------------------------------------------- . The .B man macros understand the following command line options (which define various registers). . +. .TP .B \-rcR=1 This option (the default if in nroff mode) creates a single, very @@ -81,23 +99,27 @@ .B \-rcR=0 to disable it. . +. .TP .B \-rC1 If more than one manual page is given on the command line, number the pages continuously, rather than starting each at\~1. . +. .TP .B \-rD1 Double-sided printing. . Footers for even and odd pages are formatted differently. . +. .TP .BI \-rFT= dist Set distance of the footer relative to the bottom of the page if negative or relative to the top if positive. . -The default is -0.5i. +The default is \-0.5i. +. . .TP .BI \-rHY= flags @@ -110,28 +132,31 @@ . These values are additive; the default is\~14. . +. .TP .BI \-rIN= width Set body text indentation to .IR width . +. The default is 7n for .IR nroff , 7.2n for .IR troff . +. For .IR nroff , -this value should always be an integer multiple of unit `n' to get -consistent indentation. +this value should always be an integer multiple of unit \[oq]n\[cq] to +get consistent indentation. +. . .TP .BI \-rLL= line-length Set line length. . -If this option is not given, -the line length is set to respect any value set by a prior `.ll' request, -(which +If this option is not given, the line length is set to respect any +value set by a prior \[oq].ll\[cq] request (which .I must -be in effect when the `.TH' macro is invoked), +be in effect when the \[oq].TH\[cq] macro is invoked), if this differs from the built\-in default for the formatter; otherwise it defaults to 78n in .I nroff @@ -139,28 +164,31 @@ .I troff mode. . +. .IP -Note that the use of a `.ll' request to initialize the line length -is supported for backward compatibility with some versions of the +Note that the use of a \[oq].ll\[cq] request to initialize the line +length is supported for backward compatibility with some versions of +the .B man program; -direct initialization of the `LL' register should +direct initialization of the \[oq]LL\[cq] register should .I always be preferred to the use of such a request. -In particular, note that a `.ll\ 65n' request does +. +In particular, note that a \[oq].ll\ 65n\[cq] request does .I not preserve the normal .I nroff default line length, (the .B man -default initialization to 78n prevails), -whereas, -the `-rLL=65n' option, or an equivalent `.nr\ LL\ 65n' -request preceding the use of the `TH' macro, +default initialization to 78n prevails), whereas, the +\[oq]\-rLL=65n\[cq] option, or an equivalent \[oq].nr\ LL\ 65n\[cq] +request preceding the use of the \[oq]TH\[cq] macro, .I does set a line length of 65n. . +. .TP .BI \-rLT= title-length Set title length. @@ -168,12 +196,14 @@ If this option is not given, the title length defaults to the line length. . +. .TP .BI \-rP nnn Enumeration of pages start with .I nnn rather than with\~1. . +. .TP .BI \-rS xx Base document font size is @@ -182,12 +212,14 @@ .RI ( xx can be 10, 11, or\~12) rather than 10\~points. . +. .TP .BI \-rSN= width Set sub-subheading indentation to .IR width . The default is 3n. . +. .TP .BI \-rX nnn After page\~\c @@ -198,181 +230,101 @@ .IR nnn c, etc. . -For example, the option `\-rX2' produces the following page +For example, the option \[oq]\-rX2\[cq] produces the following page numbers: 1, 2, 2a, 2b, 2c, etc. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . This section describes the available macros for manual pages. . For further customization, put additional macros and requests into the file -.B man.local +.BR man.local , which is loaded immediately after the .B man package. . -.TP -.BI .TH " title section \fR[\fPextra1\fR]\fP \fR[\fPextra2\fR]\fP \fR[\fPextra3\fR]" -Set the title of the -.I man\~page -to -.I title -and the section to -.IR section , -which must take on a value between 1 and\~8. -. -The value -.I section -may also have a string appended, e.g. `.pm', to indicate a specific -subsection of the -.IR \%man\~pages . -Both -.I title -and -.I section -are positioned at the left and right in the header line (with -.I section -in parentheses immediately appended to -.IR title . -.I extra1 -is positioned in the middle of the footer line. -.I extra2 -is positioned at the left in the footer line (or at the left on -even pages and at the right on odd pages if double-sided printing is -active). -.I extra3 -is centered in the header line. . -.IP -For HTML output, headers and footers are completely suppressed. +.TP +.B .EX +.TQ +.B .EE +Example/End Example. . -.IP -Additionally, this macro starts a new page; the new line number is\~1 -again (except if the `-rC1' option is given on the command line) -- -this feature is intended only for formatting multiple -.IR \%man\~pages ; -a single -.I \%man\~page -should contain exactly one -.B TH -macro at the beginning of the file. +After +.BR .EX , +filling is disabled and the font is set to constant-width. . -.TP -.BI .SH " \fR[\fPtext for a heading\fR]\fP" -Set up an unnumbered section heading sticking out to the left. +This is useful for formatting code, command, and configuration-file +examples. . -Prints out all the text following -.B SH -up to the end of the line (or the text in the next input line if there -is no argument to -.BR SH ) -in bold face -(or the font specified by the string -.BR HF ), -one size larger than the base document size. +The +.B EE +macro restores filling and restores the previous font. . -Additionally, the left margin and the indentation for the following -text is reset to the default values. . -.TP -.BI .SS " \fR[\fPtext for a heading\fR]\fP" -Set up a secondary, unnumbered section heading. +.IP +These macros are defined on many (but not all) legacy Unix systems +running classic troff. . -Prints out all the text following -.B SS -up to the end of the line (or the text in the next input line if there -is no argument to -.BR SS ) -in bold face -(or the font specified by the string -.BR HF ), -at the same size as the base document size. +To be certain your page will be portable to those systems, copy +their definitions from the +.B \%an-ext.tmac +file of a +.BR groff +installation. . -Additionally, the left margin and the indentation for the following -text is reset to the default values. . .TP -.BI .TP " \fR[\fPnnn\fR]\fP" -Set up an indented paragraph with label. +.BI .HP " \fR[\fPnnn\fR]\fP" +Set up a paragraph with hanging left indentation. . The indentation is set to .I nnn -if that argument is supplied (the default unit is `n' if omitted), -otherwise it is set to the previous indentation value specified with -.BR TP , -.BR IP , +if that argument is supplied (the default unit is \[oq]n\[cq] if +omitted), otherwise it is set to the previous indentation value +specified with +.BR .TP , +.BR .IP , or -.B HP +.B .HP (or to the default value if none of them have been used yet). . -.IP -The first input line of text following this macro is interpreted as a -string to be printed flush-left, as it is appropriate for a label. -. -It is not interpreted as part of a paragraph, so there is no attempt -to fill the first line with text from the following input lines. -. -Nevertheless, if the label is not as wide as the indentation the -paragraph starts at the same line (but indented), continuing on the -following lines. -. -If the label is wider than the indentation the descriptive part of the -paragraph begins on the line following the label, entirely indented. +Font size and face are reset to its default values. . -Note that neither font shape nor font size of the label is set to a -default value; on the other hand, the rest of the text has default -font settings. +The following paragraph illustrates the effect of this macro with +hanging indentation set to\~4 (enclosed by +.B .RS +and +.B .RE +to set the left margin temporarily to the current indentation): . -.IP -The -.B TP -macro is the macro used for the explanations you are just reading. . -.TP -.B .TQ -The -.B TQ -macro sets up header continuation for a .TP macro. +.RS +.HP 4 +This is a paragraph following an invocation of the +.B HP +macro. . -With it, you can stack up any number of labels (such as in a -glossary, or list of commands) before beginning the indented -paragraph. +As you can see, it produces a paragraph where all lines but the first +are indented. +.RE . -For an example, look just past the next paragraph. . .IP -This macro is not defined on legacy Unix systems running classic -troff. -. -To be certain your page will be portable to those systems, -copy its definition from the -.B \%an-ext.tmac -file of a -.BR groff -installation. -. -.TP -.B .LP -.TQ -.B .PP -.TQ -.B .P -These macros are mutual aliases. +Use of this presentation-level macro is deprecated. . -Any of them causes a line break at the current position, followed by a -vertical space downwards by the amount specified by the -.B PD -macro. +While it is universally portable to legacy Unix systems, a hanging +indentation cannot be expressed naturally under HTML, and many +HTML-based manual viewers simply interpret it as a starter for a +normal paragraph. . -The font size and shape are reset to the default value (normally 10pt -Roman). +Thus, any information or distinction you tried to express with the +indentation may be lost. . -Finally, the current left margin and the indentation is reset to the -default values. . .TP .BI .IP " \fR[\fPdesignator\fR]\fP \fR[\fPnnn\fR]\fP" @@ -382,28 +334,35 @@ . The indentation is set to .I nnn -if that argument is supplied (the default unit is `n' if omitted), -otherwise it is set to the previous indentation value specified with -.BR TP , -.BR IP , +if that argument is supplied (the default unit is \[oq]n\[cq] if +omitted), otherwise it is set to the previous indentation value +specified with +.BR .TP , +.BR .IP , or -.B HP +.B .HP (or to the default value if none of them have been used yet). . Font size and face of the paragraph (but not the designator) are reset to its default values. . +. .IP To start an indented paragraph with a particular indentation but -without a designator, use `""' (two doublequotes) as the second -argument. +without a designator, use \[oq]""\[cq] (two doublequotes) as the +second argument. +. . .IP For example, the following paragraphs were all set up with bullets as -the designator, using `.IP\ \\(bu\ 4'. +the designator, using \[oq].IP\ \\(bu\ 4\[cq]. +. +The whole block has been enclosed with +.B .RS +and +.B .RE +to set the left margin temporarily to the current indentation value. . -The whole block has been enclosed with `.RS' and `.RE' to set the left -margin temporarily to the current indentation value. . .RS .IP \(bu 4 @@ -412,12 +371,14 @@ .B man package to format lists. . +. .IP \(bu 4 .B HP is another. . This macro produces a paragraph with a left hanging indentation. . +. .IP \(bu 4 .B TP is another. @@ -426,111 +387,224 @@ paragraph. .RE . +. .TP -.BI .HP " \fR[\fPnnn\fR]\fP" -Set up a paragraph with hanging left indentation. +.B .LP +.TQ +.B .PP +.TQ +.B .P +These macros are mutual aliases. . -The indentation is set to -.I nnn -if that argument is supplied (the default unit is `n' if omitted), -otherwise it is set to the previous indentation value specified with -.BR TP , -.BR IP , -or -.B HP -(or to the default value if none of them have been used yet). +Any of them causes a line break at the current position, followed by a +vertical space downwards by the amount specified by the +.B PD +macro. . -Font size and face are reset to its default values. +The font size and shape are reset to the default value (normally 10pt +Roman). . -The following paragraph illustrates the effect of this macro with -hanging indentation set to\~4 (enclosed by -.B .RS -and -.B .RE -to set the left margin temporarily to the current indentation): +Finally, the current left margin and the indentation is reset to the +default values. . -.RS -.HP 4 -This is a paragraph following an invocation of the -.B HP -macro. . -As you can see, it produces a paragraph where all lines but the first -are indented. +.TP +.BI .RE " \fR[\fPnnn\fR]\fP" +This macro moves the left margin back to level +.IR nnn , +restoring the previous left margin. . -.RE -.IP -Use of this presentation-level macro is deprecated. +If no argument is given, it moves one level back. . -While it is universally portable to legacy Unix systems, a hanging -indentation cannot be expressed naturally under HTML, and many -HTML-based manual viewers simply interpret it as a starter for a -normal paragraph. +The first level (i.e., no call to +.B .RS +yet) has number\~1, and each call to +.B .RS +increases the level by\~1. . -Thus, any information or distinction you tried to express with the -indentation may be lost. . .TP .BI .RS " \fR[\fPnnn\fR]\fP" This macro moves the left margin to the right by the value .I nnn -if specified (default unit is `n'); otherwise it is set to the +if specified (default unit is \[oq]n\[cq]); otherwise it is set to the previous indentation value specified with -.BR TP , -.BR IP , +.BR .TP , +.BR .IP , or -.B HP +.B .HP (or to the default value if none of them have been used yet). . The indentation value is then set to the default. . +. .IP Calls to the .B RS macro can be nested. . +. .TP -.BI .RE " \fR[\fPnnn\fR]\fP" -This macro moves the left margin back to level -.IR nnn , -restoring the previous left margin. +.BI .SH " \fR[\fPtext for a heading\fR]\fP" +Set up an unnumbered section heading sticking out to the left. . -If no argument is given, it moves one level back. +Prints out all the text following +.B .SH +up to the end of the line (or the text in the next input line if there +is no argument to +.BR .SH ) +in bold face +(or the font specified by the string +.BR HF ), +one size larger than the base document size. +. +Additionally, the left margin and the indentation for the following +text is reset to the default values. . -The first level (i.e., no call to -.B RS -yet) has number\~1, and each call to -.B RS -increases the level by\~1. . .TP -.B .EX -.TQ -.B .EE -Example/End Example. +.BI .SS " \fR[\fPtext for a heading\fR]\fP" +Set up a secondary, unnumbered section heading. . -After -.BR EX , -filling is disabled and the font is set to constant-width. +Prints out all the text following +.B .SS +up to the end of the line (or the text in the next input line if there +is no argument to +.BR .SS ) +in bold face +(or the font specified by the string +.BR HF ), +at the same size as the base document size. +. +Additionally, the left margin and the indentation for the following +text is reset to the default values. . -This is useful for formatting code, command, and -configuration-file examples. . +.TP +.BI .TH " title section \fR[\fPextra1\fR]\fP \fR[\fPextra2\fR]\fP \fR[\fPextra3\fR]" +Set the title of the +.I man\~page +to +.I title +and the section to +.IR section , +which must take on a value between 1 and\~8. +. +The value +.I section +may also have a string appended, e.g.\& \[oq].pm\[cq], to indicate a +specific subsection of the +.IR \%man\~pages . +. +Both +.I title +and +.I section +are positioned at the left and right in the header line (with +.I section +in parentheses immediately appended to +.IR title . +. +.I extra1 +is positioned in the middle of the footer line. +. +.I extra2 +is positioned at the left in the footer line (or at the left on +even pages and at the right on odd pages if double-sided printing is +active). +. +.I extra3 +is centered in the header line. +. +. +.IP +For HTML output, headers and footers are completely suppressed. +. +. +.IP +Additionally, this macro starts a new page; the new line number is\~1 +again (except if the \[oq]\-rC1\[cq] option is given on the command +line) -- this feature is intended only for formatting multiple +.IR \%man\~pages ; +a single +.I \%man\~page +should contain exactly one +.B TH +macro at the beginning of the file. +. +. +.TP +.BI .TP " \fR[\fPnnn\fR]\fP" +Set up an indented paragraph with label. +. +The indentation is set to +.I nnn +if that argument is supplied (the default unit is \[oq]n\[cq] if omitted), +otherwise it is set to the previous indentation value specified with +.BR .TP , +.BR .IP , +or +.B .HP +(or to the default value if none of them have been used yet). +. +. +.IP +The first input line of text following this macro is interpreted as a +string to be printed flush-left, as it is appropriate for a label. +. +It is not interpreted as part of a paragraph, so there is no attempt +to fill the first line with text from the following input lines. +. +Nevertheless, if the label is not as wide as the indentation the +paragraph starts at the same line (but indented), continuing on the +following lines. +. +If the label is wider than the indentation the descriptive part of the +paragraph begins on the line following the label, entirely indented. +. +Note that neither font shape nor font size of the label is set to a +default value; on the other hand, the rest of the text has default +font settings. +. +. +.IP The -.B EE -macro restores filling and restores the previous font. +.B TP +macro is the macro used for the explanations you are just reading. +. +. +.TP +.B .TQ +The +.B TQ +macro sets up header continuation for a +.B TP +macro. +. +With it, you can stack up any number of labels (such as in a +glossary, or list of commands) before beginning the indented +paragraph. +. +For an example, look up the documentation of the +.BR LP , +.BR PP , +and +.BR P +macros. +. . .IP -These macros are defined on many (but not all) legacy Unix systems -running classic troff. +This macro is not defined on legacy Unix systems running classic +troff. . -To be certain your page will be portable to those systems, copy -their definitions from the +To be certain your page will be portable to those systems, +copy its definition from the .B \%an-ext.tmac file of a .BR groff installation. . +. .PP To summarize, the following macros cause a line break with the insertion of vertical space (which amount can be changed with the @@ -555,21 +629,22 @@ also cause a break but no insertion of vertical space. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH "MACROS TO SET FONTS" +.\" -------------------------------------------------------------------- . The standard font is Roman; the default text size is 10\~point. . +. .TP -.BI .SM " \fR[\fPtext\fR]\fP" -Causes the text on the same line or the text on the next input line to -appear in a font that is one point size smaller than the default font. +.BI .B " \fR[\fPtext\fR]\fP" +Causes +.I text +to appear in bold face. +. +If no text is present on the line where the macro is called the text +of the next input line appears in bold face. . -.TP -.BI .SB " \fR[\fPtext\fR]\fP" -Causes the text on the same line or the text on the next input line to -appear in boldface font, one point size smaller than the default font. . .TP .BI ".BI " text @@ -580,42 +655,51 @@ . Thus . +. .RS .IP \&.BI this "word and" that . +. .PP -would cause `this' and `that' to appear in bold face, while `word and' -appears in italics. +would cause \[oq]this\[cq] and \[oq]that\[cq] to appear in bold face, +while \[oq]word and\[cq] appears in italics. .RE . +. .TP -.BI ".IB " text -Causes text to appear alternately in italic and bold face. +.BI ".BR " text +Causes text on the same line to appear alternately in bold face and +roman. . The text must be on the same line as the macro call. . +. .TP -.BI ".RI " text -Causes text on the same line to appear alternately in roman and -italic. +.BI .I " \fR[\fPtext\fR]\fP" +Causes +.I text +to appear in italic. +. +If no text is present on the line where the macro is called the text +of the next input line appears in italic. . -The text must be on the same line as the macro call. . .TP -.BI ".IR " text -Causes text on the same line to appear alternately in italic and -roman. +.BI ".IB " text +Causes text to appear alternately in italic and bold face. . The text must be on the same line as the macro call. . +. .TP -.BI ".BR " text -Causes text on the same line to appear alternately in bold face and +.BI ".IR " text +Causes text on the same line to appear alternately in italic and roman. . The text must be on the same line as the macro call. . +. .TP .BI ".RB " text Causes text on the same line to appear alternately in roman and bold @@ -623,28 +707,30 @@ . The text must be on the same line as the macro call. . +. .TP -.BI .B " \fR[\fPtext\fR]\fP" -Causes -.I text -to appear in bold face. +.BI ".RI " text +Causes text on the same line to appear alternately in roman and +italic. +. +The text must be on the same line as the macro call. . -If no text is present on the line where the macro is called the text -of the next input line appears in bold face. . .TP -.BI .I " \fR[\fPtext\fR]\fP" -Causes -.I text -to appear in italic. +.BI .SB " \fR[\fPtext\fR]\fP" +Causes the text on the same line or the text on the next input line to +appear in boldface font, one point size smaller than the default font. . -If no text is present on the line where the macro is called the text -of the next input line appears in italic. . +.TP +.BI .SM " \fR[\fPtext\fR]\fP" +Causes the text on the same line or the text on the next input line to +appear in a font that is one point size smaller than the default font. . -.\" ----------------------------------------------------------------- . +.\" -------------------------------------------------------------------- .SH "MACROS TO DESCRIBE HYPERLINKS AND EMAIL ADDRESSES" +.\" -------------------------------------------------------------------- . The following macros are not defined on legacy Unix systems running classic troff. @@ -656,43 +742,48 @@ .BR groff installation. . +. .PP Using these macros helps ensure that you get hyperlinks when your manual page is rendered in a browser or other program that is Web-enabled. . +. .TP -.BI .UR " URL" +.BI .MT " address" .TQ -.BI .UE " \fR[\fPpunctuation\fR]\fP" -Wrap a World Wide Web hyperlink. +.BI .ME " \fR[\fPpunctuation\fR]\fP" +Wrap an email address. . -The argument to -.B UR -is the URL; thereafter, lines until -.B UE -are collected and used as the link text. +The argument of +.B .MT +is the address; text following, until +.BR .ME , +is a name to be associated with the address. . Any argument to the -.B UE -macro is pasted to the end of the text. +.B ME +macro is pasted to the end of the link text. . On a device that is not a browser, . +. .RS .IP .EX -this is a link to -\&.UR http://\e:randomsite.org/\e:fubar -some random site -\&.UE , -given as an example +contact +\&.MT fred.foonly@\e:fubar.net +Fred Foonly +\&.ME +for more information .EE .RE . +. .IP -usually displays like this: \[lq]this is a link to some random -site , given as an example\[rq]. +usually displays like this: \[lq]contact Fred Foonly + for more information\[rq]. +. . .IP The use of @@ -700,49 +791,53 @@ to insert hyphenless breakpoints is a groff extension and can be omitted. . +. .TP -.BI .MT " address" +.BI .UR " URL" .TQ -.BI .ME " \fR[\fPpunctuation\fR]\fP" -Wrap an email address. +.BI .UE " \fR[\fPpunctuation\fR]\fP" +Wrap a World Wide Web hyperlink. . -The argument of -.B MT -is the address; text following, until -.BR ME , -is a name to be associated with the address. +The argument to +.B .UR +is the URL; thereafter, lines until +.B .UE +are collected and used as the link text. . Any argument to the -.B ME -macro is pasted to the end of the link text. +.B UE +macro is pasted to the end of the text. . On a device that is not a browser, . +. .RS .IP .EX -contact -\&.UR fred.foonly@\e:fubar.net -Fred Foonly -\&.UE -for more information +this is a link to +\&.UR http://\e:randomsite.org/\e:fubar +some random site +\&.UE , +given as an example .EE .RE . +. .IP -usually displays like this: \[lq]contact Fred Foonly - for more information\[rq]. +usually displays like this: \[lq]this is a link to some random +site , given as an example\[rq]. +. . .IP The use of .B \e: -to insert hyphenless breakpoints is a groff extension and can -be omitted. +to insert hyphenless breakpoints is a groff extension and can be +omitted. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH "MACROS TO DESCRIBE COMMAND SYNOPSES" +.\" -------------------------------------------------------------------- . The following macros are not defined on legacy Unix systems running classic troff. @@ -754,12 +849,24 @@ .BR groff installation. . +. .PP These macros are a convenience for authors. +. They also assist automated translation tools and help browsers in recognizing command synopses and treating them differently from running text. . +. +.TP +.BI .OP " key value" +Describe an optional command argument. +. +The arguments of this macro are set surrounded by option braces +in the default Roman font; the first argument is printed with +a bold face, while the second argument is typeset as italic. +. +. .TP .BI .SY " command" Begin synopsis. @@ -767,29 +874,24 @@ Takes a single argument, the name of a command. . Text following, until closed by -.BR YS , +.BR .YS , is set with a hanging indentation with the width of .I command plus a space. . This produces the traditional look of a Unix command synopsis. . -.TP -.BI .OP " key value" -Describe an optional command argument. -. -The arguments of this macro are set surrounded by option braces -in the default Roman font; the first argument is printed with -a bold face, while the second argument is typeset as italic. . .TP .B .YS This macro restores normal indentation at the end of a command synopsis. . +. .PP Here is a real example: . +. .IP .EX \&.SY groff @@ -814,9 +916,11 @@ \&.YS .EE . +. .PP produces the following output: . +. .RS .PP .SY groff @@ -841,6 +945,7 @@ .YS .RE . +. .PP If necessary, you might use .B br @@ -850,24 +955,44 @@ (unornamented) syntax for a required command argument or filename. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH "MISCELLANEOUS" +.\" -------------------------------------------------------------------- . The default indentation is 7.2n in troff mode and 7n in nroff mode except for -.B grohtml +.BR grohtml , which ignores indentation. . +. +.TP +.BI .AT " \fR[\fPsystem \fR[\fPrelease\fR]]\fP" +Alter the footer for use with \f[CR]AT&T\f[] +.IR \%man\~pages . +This command exists only for compatibility; don\[aq]t use it. +. +See the +.I groff +info manual for more. +. +. +.TP +.B .BT +Print the footer string. +. +Redefine this macro to get control of the footer. +. +. .TP .B .DT Set tabs every 0.5\~inches. . Since this macro is always called during a .B TH -request, it makes sense to call it only if the tab positions have been +macro, it makes sense to call it only if the tab positions have been changed. . +. .IP Use of this presentation-level macro is deprecated. . @@ -875,7 +1000,7 @@ and tabbing are not readily available. . Thus, information or distinctions that you use -.B DT +.B .DT to express are likely to be lost. . If you feel tempted to use it, you should probably be composing a @@ -883,13 +1008,14 @@ .BR @g@tbl (@MAN1EXT@) markup instead. . +. .TP .BI .PD " \fR[\fPnnn\fR]\fP" Adjust the empty space before a new paragraph or section. . -The optional argument gives the amount of space (default unit is `v'); -without parameter, the value is reset to its default value (1\~line in -nroff mode, 0.4v\~otherwise). +The optional argument gives the amount of space (default unit is +\[oq]v\[cq]); without parameter, the value is reset to its default +value (1\~line in nroff mode, 0.4v\~otherwise). . This affects the macros .BR SH , @@ -904,6 +1030,7 @@ and .BR HP . . +. .IP Use of this presentation-level macro is deprecated. . @@ -911,55 +1038,41 @@ inter-paragraph spacing is not readily available. . Thus, information or distinctions that you use -.B PD +.B .PD to express are likely to be lost. . +. .TP -.BI .AT " \fR[\fPsystem \fR[\fPrelease\fR]]\fP" -Alter the footer for use with \f[CR]AT&T\f[] -.IR \%man\~pages . -This command exists only for compatibility; don't use it. +.B .PT +Print the header string. +. +Redefine this macro to get control of the header. . -See the -.I groff -info manual for more. . .TP .BI .UC " \fR[\fPversion\fR]\fP" Alter the footer for use with \f[CR]BSD\f[] .IR man\~pages . -This command exists only for compatibility; don't use it. +This command exists only for compatibility; don\[aq]t use it. . See the .I groff info manual for more. . -.TP -.B .PT -Print the header string. -. -Redefine this macro to get control of the header. -. -.TP -.B .BT -Print the footer string. -. -Redefine this macro to get control of the footer. . .PP The following strings are defined: . -.TP -.B \e*S -Switch back to the default font size. . .TP .B \e*R -The `registered' sign. +The \[oq]registered\[cq] sign. +. . .TP -.B \e*(Tm -The `trademark' sign. +.B \e*S +Switch back to the default font size. +. . .TP .B \e*(lq @@ -967,13 +1080,20 @@ .B \e*(rq Left and right quote. . -This is equal to `\e(lq' and `\e(rq', respectively. +This is equal to \[oq]\e(lq\[cq] and \[oq]\e(rq\\[cq], respectively. +. . .TP .B \e*(HF The typeface used to print headings and subheadings. . -The default is `B'. +The default is \[oq]B\[cq]. +. +. +.TP +.B \e*(Tm +The \[oq]trademark\[cq] sign. +. . .PP If a preprocessor like @@ -984,29 +1104,32 @@ .I \%man\~page look like this: . +. .PP .RS -.BI '\e"\ word +.BI '\e"\ word\"" .RE . +. .PP Note the single space character after the double quote. .I word -consists of letters for the needed preprocessors: `e' for +consists of letters for the needed preprocessors: \[oq]e\[cq] for .BR @g@eqn , -`r' for +\[oq]r\[cq] for .BR @g@refer , -and `t' for +and \[oq]t\[cq] for .BR @g@tbl . +. Modern implementations of the .B man program read this first line and automatically call the right preprocessor(s). . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH "PORTABILITY AND TROFF REQUESTS" +.\" -------------------------------------------------------------------- . Since the .B man @@ -1022,6 +1145,7 @@ .I groff info pages for a complete reference of all requests. . +. .PP Note, however, that using raw troff requests is likely to make your page render poorly on the (increasingly common) class of viewers that @@ -1029,19 +1153,21 @@ . Troff requests make implicit assumptions about things like character and page sizes that may break in an HTML environment; also, many of -these viewers don't interpret the full troff vocabulary, a problem -which can lead to portions of your text being silently dropped. +these viewers don\[aq]t interpret the full troff vocabulary, a problem +that can lead to portions of your text being silently dropped. +. . .PP For portability to modern viewers, it is best to write your page entirely in the requests described on this page. . Further, it is best to completely avoid those we have described as -`presentation-level' -.RB ( HP , -.BR PD , +\[oq]presentation-level\[cq] +.RB ( .HP , +.BR .PD , and -.BR DT ). +.BR .DT ). +. . .PP The macros we have described as extensions @@ -1056,9 +1182,9 @@ If in doubt, copy the implementation onto your page. . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .TP .B man.tmac @@ -1067,21 +1193,24 @@ These are wrapper files to call .BR andoc.tmac . . +. .TP .B andoc.tmac -Use this file in case you don't know whether the +Use this file in case you don\[aq]t know whether the .B man macros or the .B mdoc package should be used. Multiple man pages (in either format) can be handled. . +. .TP .B an-old.tmac Most .B man macros are contained in this file. . +. .TP .B an-ext.tmac The extension macro definitions for @@ -1101,25 +1230,27 @@ definitions into their pages, and maintainers of troff or its workalikes are encouraged to re-use them. . +. .IP Note that the definitions for these macros are read after the call of .BR TH , so they will replace macros of the same names given at the beginning of your file. +. If you must use your own definitions for these macros, they must be given after calling .BR TH . . +. .TP .B man.local Local changes and customizations should be put into this file. . . -.\" ----------------------------------------------------------------- -. +.ad l +.\" -------------------------------------------------------------------- .SH "SEE ALSO" -. -.PP +.\" -------------------------------------------------------------------- .BR @g@tbl (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), .BR @g@refer (@MAN1EXT@), @@ -1128,27 +1259,18 @@ .BR groff_mdoc (7) . . -.\" ----------------------------------------------------------------- -. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- .SH AUTHORS +.\" -------------------------------------------------------------------- +.au . -This manual page was originally written for the Debian GNU/Linux -system by -.MT sgk@debian.org -Susan G. Kleinmann -.ME . -. -It was corrected and updated by -.MT wl@gnu.org -Werner Lemberg -.ME . -. -The extension macros were documented (and partly designed) by -.MT esr@thyrsus.com -Eric S. Raymond -.ME ; -he also wrote the portability advice. . +.\" -------------------------------------------------------------------- +.\" ### Emacs settings: .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/tmac/groff_mdoc.man groff-1.22.3/tmac/groff_mdoc.man --- groff-1.22.2/tmac/groff_mdoc.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_mdoc.man 2014-11-04 09:38:35.535520121 +0100 @@ -1,4 +1,4 @@ -.\" t +'\" t .\" groff_mdoc.man .\" .\" A complete reference of the mdoc macro package for GNU troff. @@ -9,7 +9,7 @@ .\" Warning: You can't format this file with the old mdoc macros! .\" .\" -.\" Copyright (c) 1990, 1993 +.\" Copyright (C) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ page layout macros make up the .Em "page structure domain" which consists of macros for titles, section headers, displays and lists -\- essentially items which affect the physical position of text on a +\(en essentially items which affect the physical position of text on a formatted page. In addition to the page structure domain, there are two more domains, the .Em manual @@ -399,7 +399,7 @@ This method is useful for strings which are not expected to overlap a line boundary. An alternative is to use -.Ql \e~ , +.Ql \e\[ti] , a paddable (i.e.\& stretchable), unbreakable space (this is a .Tn GNU .Xr troff 1 @@ -576,25 +576,28 @@ \&.\e" The following commands should be uncommented and \&.\e" used where appropriate. \&.\e" .Sh IMPLEMENTATION NOTES -\&.\e" This next command is for sections 2, 3 and 9 function -\&.\e" return values only. +\&.\e" This next command is for sections 2, 3, and 9 only +\&.\e" (function return values). \&.\e" .Sh RETURN VALUES -\&.\e" This next command is for sections 1, 6, 7 and 8 only. +\&.\e" This next command is for sections 1, 6, 7, and 8 only. \&.\e" .Sh ENVIRONMENT \&.\e" .Sh FILES +\&.\e" This next command is for sections 1, 6, and 8 only +\&.\e" (command return values to the shell). +\&.\e" .Sh EXIT STATUS \&.\e" .Sh EXAMPLES -\&.\e" This next command is for sections 1, 6, 7, 8 and 9 only -\&.\e" (command return values (to shell) and -\&.\e" fprintf/stderr type diagnostics). +\&.\e" This next command is for sections 1, 4, 6, 7, 8, and 9 only +\&.\e" (fprintf/stderr type diagnostics). \&.\e" .Sh DIAGNOSTICS \&.\e" .Sh COMPATIBILITY -\&.\e" This next command is for sections 2, 3 and 9 error -\&.\e" and signal handling only. +\&.\e" This next command is for sections 2, 3, 4, and 9 only +\&.\e" (settings of the errno variable). \&.\e" .Sh ERRORS \&.\e" .Sh SEE ALSO \&.\e" .Sh STANDARDS \&.\e" .Sh HISTORY \&.\e" .Sh AUTHORS +\&.\e" .Sh CAVEATS \&.\e" .Sh BUGS .Ed .Pp @@ -646,7 +649,7 @@ . .Bl -tag -width 6n -offset indent .It Li .Xx Xo -.Aq foo +.Aq foo .Brq bar1 | bar2 .Op \-test1 Op \-test2 | \-test3 .No ... @@ -873,24 +876,29 @@ 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, 1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.0.3, -3.1, 3.1.1, 4.0, 4.0.1, 5.0, 5.0.1, 5.0.2, 5.1, 6.0 +3.1, 3.1.1, 4.0, 4.0.1, 5.0, 5.0.1, 5.0.2, 5.1, 5.1.2, 5.1.3, 5.1.4, +5.2, 5.2.1, 5.2.2, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.1, 6.1.1, +6.1.2, 6.1.3, 6.1.4 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, -5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1, 7.2, 7.3, 8.0, -8.1, 8.2, 9.0 +5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1, 7.2, 7.3, 7.4, +8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3, 10.0 .It OpenBSD 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, -5.0 +5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6 .It DragonFly -1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0, 2.2, -2.4, 2.6, 2.8, 2.9, 2.9.1, 2.10, 2.10.1, 2.11 +1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.9, 1.10, 1.12, 1.12.2, +1.13, 2.0, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.9.1, 2.10, 2.10.1, +2.11, 2.12, 2.13, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8 .It Darwin 8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, 8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0, 9.7.0, -9.8.0, 10.1.0, 10.2.0, 10.3.0, 10.4.0, 10.5.0, 10.6.0, 10.7.0, 11.0.0 +9.8.0, 10.1.0, 10.2.0, 10.3.0, 10.4.0, 10.5.0, 10.6.0, 10.7.0, 10.8.0, +11.0.0, 11.1.0, 11.2.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, +13.0.0, 13.1.0, 13.2.0, 13.3.0, 13.4.0, 14.0.0 .El .Ed .Pp @@ -942,6 +950,20 @@ With any other number of arguments, the current date is used, ignoring the parameters. .Pp +As a special exception, the format +.Bd -filled -offset indent +.Li .Dd $Mdocdate: +.Aq month +.Aq day +.Aq year +.Li $ +.Ed +.Pp +is also recognized. +It is used in +.Ox +manuals to automatically insert the current date when committing. +.Pp This macro is neither callable nor parsed. .El . @@ -1477,7 +1499,7 @@ . .Ss "Functions (Library Routines)" . -The +The .Ql .Fn macro is modeled on .Tn ANSI\~C @@ -1679,7 +1701,7 @@ .Dl Usage: .Lb Ao argument Ac ... .Pp Available arguments to -.Ql .Lb +.Ql .Lb and their results are: . .Pp @@ -2127,6 +2149,8 @@ .Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent .It Li \-ieee754 .St -ieee754 +.It Li \-iso8601 +.St -iso8601 .It Li \-iso8802\-3 .St -iso8802-3 .El @@ -2212,7 +2236,7 @@ .Ao version Ac are possible: .Pp -.Dl 32v, v1, v2, v3, v4, v5, v6, v7, V, V.1, V.2, V.3, V.4 +.Dl 32v, v1, v2, v3, v4, v5, v6, v7, III, V, V.1, V.2, V.3, V.4 . .Ss "BSD Macro" . @@ -2365,7 +2389,7 @@ .Pp .Bl -tag -width ".Sy \&Sy | Fl symbolic" -compact -offset indent .It Sy \&Em | Fl emphasis -Same as if the +Same as if the .Ql .Em macro was used for the entire block of text. .It Sy \&Li | Fl literal @@ -2637,7 +2661,7 @@ .It Li .%B Book title. .It Li .%C -City/place (not implemented yet). +City/place. .It Li .%D Date. .It Li .%I @@ -2684,7 +2708,8 @@ \&.%A "John Foo" \&.%T "Implementation Notes on foobar(1)" \&.%R "Technical Report ABC\-DE\-12\-345" -\&.%Q "Drofnats College, Nowhere" +\&.%Q "Drofnats College" +\&.%C "Nowhere" \&.%D "April 1991" \&.Re .Ed @@ -2697,7 +2722,8 @@ .%A "John Foo" .%T "Implementation Notes on foobar(1)" .%R "Technical Report ABC-DE-12-345" -.%Q "Drofnats College, Nowhere" +.%Q "Drofnats College" +.%C "Nowhere" .%D "April 1991" .Re .Ed @@ -2981,7 +3007,7 @@ .Sx "Exit Status" . . .It Li ".Sh COMPATIBILITY" -Known compatibility issues (e.g. deprecated options or parameters) +Known compatibility issues (e.g.\& deprecated options or parameters) should be listed here. . .It Li ".Sh ERRORS" @@ -3067,7 +3093,7 @@ . .Bl -tag -width ".Li .Pp" .It Li .Pp -The +The .Ql .Pp paragraph command may be used to specify a line space where necessary. The macro is not necessary after a @@ -3333,7 +3359,7 @@ Indent by one default indent value or tab. The default indent value is also used for the .Ql .D1 -and +and .Ql .Dl macros, so one is guaranteed the two types of displays will line up. The indentation value is normally set to\~6n or about two thirds of an inch @@ -3984,7 +4010,7 @@ It allows a break right before the return value (usually a single digit) which is bad typographical behaviour. Use -.Ql \e~ +.Ql \e\[ti] to tie the return value to the previous word. . .It Li .Hf @@ -4194,7 +4220,7 @@ .It Pa mdoc.local Local additions and customizations. .It Pa andoc.tmac -Use this file if you don't know whether the +Use this file if you don't know whether the .Nm \-mdoc or the .Nm \-man diff -ruN groff-1.22.2/tmac/groff_me.man groff-1.22.3/tmac/groff_me.man --- groff-1.22.2/tmac/groff_me.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_me.man 2014-11-04 09:38:35.535520121 +0100 @@ -1,5 +1,12 @@ -.\" t -.\" Copyright (c) 1980 The Regents of the University of California. +'\" t +.hc % +.TH GROFF_ME @MAN7EXT@ "@MDATE@" "@VERSION@" +.UC 3 +.SH NAME +groff_me \- troff macros for formatting papers +. +. +.\" Copyright (C) 1980 The Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms are permitted @@ -19,12 +26,12 @@ .\" Modified for groff by jjc@jclark.com .\" Changed to use TBL and eliminate low-level troff hackery by ESR .\" (this enables it to be lifted to structural markup). -.hc % -.TH GROFF_ME @MAN7EXT@ "@MDATE@" "@VERSION@" -.UC 3 -.SH NAME -groff_me \- troff macros for formatting papers +. +. +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B "groff \-me" [ options ] file ... @@ -32,21 +39,30 @@ .B "groff \-m\ me" [ options ] file ... +. +. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. This manual page describes the GNU version of the \-me macros, which is part of the groff document formatting system. +. This version can be used with both GNU troff and Unix troff. +. This package of .I troff macro definitions provides a canned formatting facility for technical papers in various formats. +. +. .PP The macro requests are defined below. +. Many .I troff -requests are unsafe in conjunction with -this package, however, these requests may be used with -impunity after the first .pp: +requests are unsafe in conjunction with this package, however, these +requests may be used with impunity after the first \&.pp: .TS l l. \&.bp begin new page @@ -54,7 +70,7 @@ \&.sp n insert n spacing lines \&.ls n (line spacing) n=1 single, n=2 double space \&.na no alignment of right margin -\&.ce n center next n lines +\&.ce n center next n lines \&.ul n underline next n lines .TE .PP @@ -66,44 +82,80 @@ .I tbl preprocessors is acceptable as input. +. +. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- +. /usr/share/groff/1.21/tmac/me.tmac (a wrapper file for e.tmac) .br /usr/share/groff/1.21/tmac/e.tmac +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- +. .BR groff (1), .BR troff (1) .br -\-me Reference Manual, Eric P. Allman +\-me Reference Manual, Eric P.\& Allman .br Writing Papers with Groff Using \-me -.tr &. +. +. +.\" -------------------------------------------------------------------- .SH REQUESTS +.\" -------------------------------------------------------------------- +. This list is incomplete; see .I "The \-me Reference Manual" for interesting details. +. +. .PP +.na .TS -expand; -l l l l. +l l l lx. Request Initial Causes Explanation Value Break _ -\&.(c \- yes Begin centered block -\&.(d \- no Begin delayed text +\&.(c \- yes T{ +Begin centered block +T} +\&.(d \- no T{ +Begin delayed text +T} \&.(f \- no Begin footnote \&.(l \- yes Begin list -\&.(q \- yes Begin major quote -\&.(x \fIx\fR \- no Begin indexed item in index -\&.(z \- no Begin floating keep -\&.)c \- yes End centered block -\&.)d \- yes End delayed text +\&.(q \- yes T{ +Begin major quote +T} +\&.(x \fIx\fR \- no T{ +Begin indexed item in index +T} +\&.(z \- no T{ +Begin floating keep +T} +\&.)c \- yes T{ +End centered block +T} +\&.)d \- yes T{ +End delayed text +T} \&.)f \- yes End footnote \&.)l \- yes End list -\&.)q \- yes End major quote -\&.)x \- yes End index item -\&.)z \- yes End floating keep +\&.)q \- yes T{ +End major quote +T} +\&.)x \- yes T{ +End index item +T} +\&.)z \- yes T{ +End floating keep +T} \&.++ \fIm H\fR \- no T{ Define paper section. .I m @@ -124,12 +176,16 @@ T} \&.+c \fIT\fR \- yes T{ Begin chapter (or appendix, etc., as -set by .++). +set by \&.++). .I T is the chapter title. T} -\&.1c 1 yes One column format on a new page. -\&.2c 1 yes Two column format. +\&.1c 1 yes T{ +One column format on a new page. +T} +\&.2c 1 yes T{ +Two column format. +T} \&.EN \- yes T{ Space after equation produced by @@ -151,12 +207,22 @@ .I C to center the equation. T} -\&.GE \- yes End \fIgremlin\fP picture. -\&.GS \- yes Begin \fIgremlin\fP picture. -\&.PE \- yes End \fIpic\fP picture. -\&.PS \- yes Begin \fIpic\fP picture. +\&.GE \- yes T{ +End \fIgremlin\fP picture. +T} +\&.GS \- yes T{ +Begin \fIgremlin\fP picture. +T} +\&.PE \- yes T{ +End \fIpic\fP picture. +T} +\&.PS \- yes T{ +Begin \fIpic\fP picture. +T} \&.TE \- yes End table. -\&.TH \- yes End heading section of table. +\&.TH \- yes T{ +End heading section of table. +T} \&.TS \fIx\fR \- yes T{ Begin table; if \fIx\fR is .I H @@ -173,20 +239,38 @@ This indent is used to set the indent on regular text (like paragraphs). T} -\&.bc no yes Begin new column +\&.bc no yes T{ +Begin new column +T} \&.bi \fIx\fR no no T{ Print .I x in bold italics (nofill only) T} -\&.bu \- yes Begin bulleted paragraph -\&.bx \fIx\fR no no Print \fIx\fR in a box (nofill only). -\&.ef \fI\'x\'y\'z\'\fR \'\'\'\' no Set even footer to x y z -\&.eh \fI\'x\'y\'z\'\fR \'\'\'\' no Set even header to x y z -\&.fo \fI\'x\'y\'z\'\fR \'\'\'\' no Set footer to x y z -\&.hx \- no Suppress headers and footers on next page. -\&.he \fI\'x\'y\'z\'\fR \'\'\'\' no Set header to x y z -\&.hl \- yes Draw a horizontal line +\&.bu \- yes T{ +Begin bulleted paragraph +T} +\&.bx \fIx\fR no no T{ +Print \fIx\fR in a box (nofill only). +T} +\&.ef \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set even footer to x y z +T} +\&.eh \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set even header to x y z +T} +\&.fo \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set footer to x y z +T} +\&.hx \- no T{ +Suppress headers and footers on next page. +T} +\&.he \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set header to x y z +T} +\&.hl \- yes T{ +Draw a horizontal line +T} \&.i \fIx\fR no no T{ Italicize .I x; @@ -202,17 +286,31 @@ .I y ens (default 5). T} -\&.lp yes yes Start left-blocked paragraph. -\&.np 1 yes Start numbered paragraph. -\&.of \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd footer to x y z -\&.oh \fI\'x\'y\'z\'\fR \'\'\'\' no Set odd header to x y z -\&.pd \- yes Print delayed text. +\&.lp yes yes T{ +Start left-blocked paragraph. +T} +\&.np 1 yes T{ +Start numbered paragraph. +T} +\&.of \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set odd footer to x y z +T} +\&.oh \fI\'x\'y\'z\'\fR \'\'\'\' no T{ +Set odd header to x y z +T} +\&.pd \- yes T{ +Print delayed text. +T} \&.pp no yes T{ Begin paragraph. First line indented. T} -\&.r yes no Roman text follows. -\&.re \- no Reset tabs to default values. +\&.r yes no T{ +Roman text follows. +T} +\&.re \- no T{ +Reset tabs to default values. +T} \&.sh \fIn x\fR \- yes T{ Section head follows, font automatically bold. @@ -235,14 +333,19 @@ .I n points. T} -\&.tp no yes Begin title page. +\&.tp no yes T{ +Begin title page. +T} \&.u \fIx\fR \- no T{ Underline argument (even in \fItroff\fR). (Nofill only). T} -\&.uh \- yes Like .sh but unnumbered. +\&.uh \- yes T{ +Like .sh but unnumbered. +T} \&.xp \fIx\fR \- no Print index. .TE +.ad . .\" Local Variables: diff -ruN groff-1.22.2/tmac/groff_ms.man groff-1.22.3/tmac/groff_ms.man --- groff-1.22.2/tmac/groff_ms.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_ms.man 2014-11-04 09:38:35.535520121 +0100 @@ -1,7 +1,17 @@ '\" t -.ig -Copyright (C) 1989-1995, 2001-2007, 2009-2011 - Free Software Foundation, Inc. +.do nr groff_ms_C \n[.C] +.cp 0 +.TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_ms \- groff ms macros +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 1989-2014 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -19,20 +29,16 @@ the original English. .. . -.do nr groff_ms_C \n[.C] -.cp 0 -. -.TH GROFF_MS @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -. -. -.SH NAME -. -groff_ms \- groff ms macros -. -. +.de au +Original manual page by James Clark et al, rewritten by +.MT lkollar@despammed.com +Larry Kollar +.ME . +.. . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .B groff .B \-ms @@ -53,8 +59,9 @@ ] . . -. +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- . This manual page describes the GNU version of the .I ms @@ -62,32 +69,34 @@ part of the .I groff typesetting system. +. The .I ms -macros are mostly compatible with the -documented behavior of the 4.3 +macros are mostly compatible with the documented behavior of the 4.3 .SM BSD Unix .I ms macros (see .I Differences from troff ms below for details). +. The .I ms -macros are suitable for reports, letters, books, and -technical documentation. -. +macros are suitable for reports, letters, books, and technical +documentation. . . +.\" -------------------------------------------------------------------- .SH USAGE +.\" -------------------------------------------------------------------- . The .I ms -macro package expects files to have -a certain amount of structure. -The simplest documents can begin with a paragraph macro -and consist of text separated by paragraph macros -or even blank lines. +macro package expects files to have a certain amount of structure. +. +The simplest documents can begin with a paragraph macro and consist of +text separated by paragraph macros or even blank lines. +. Longer documents have a structure as follows: . .TP @@ -99,26 +108,28 @@ prints the cover page information on its own page; otherwise it prints the information on the first page with your document text immediately following. +. Other document formats found in AT&T .I troff -are specific to AT&T -or Berkeley, and are not supported in +are specific to AT&T or Berkeley, and are not supported in .IR "groff ms" . . .TP .B "Format and layout" By setting number registers, -you can change your document's type (font and size), +you can change your document\[aq]s type (font and size), margins, spacing, headers and footers, and footnotes. -See +. +See .I "Document control registers" below for more details. . .TP .B "Cover page" A cover page consists of a title, -and optionally the author's name and institution, +and optionally the author\[aq]s name and institution, an abstract, and the date. +. See .I "Cover page macros" below for more details. @@ -136,16 +147,20 @@ macro at the end of your document. . . +.\" -------------------------------------------------------------------- .SS "Document control registers" +.\" -------------------------------------------------------------------- . The following table lists the document control number registers. +. For the sake of consistency, set registers related to margins at the beginning of your document, or just after the .B RP macro. . +. .LP .ne 12 .B Margin settings @@ -237,8 +252,8 @@ FI Footnote indent next footnote 2n FF Footnote format next footnote 0 FPS Point size next footnote \[rs]n[PS]-2 -FVS Vert. spacing next footnote \[rs]n[FPS]+2 -FPD Para. spacing next footnote \[rs]n[PD]/2 +FVS Vert.\& spacing next footnote \[rs]n[FPS]+2 +FPD Para.\& spacing next footnote \[rs]n[PD]/2 _ .TE .RE @@ -260,7 +275,9 @@ .RE . . +.\" -------------------------------------------------------------------- .SS "Cover page macros" +.\" -------------------------------------------------------------------- . Use the following macros to create a cover page for your document in the order shown. @@ -268,7 +285,9 @@ .TP .B .RP [no] Specifies the report format for your document. +. The report format creates a separate cover page. +. With no .B RP macro, @@ -287,8 +306,9 @@ on page\~1 of the document. . .TP -.B .P1 +.B .P1 (P-one) Prints the header on page\~1. +. The default is to suppress the header. . .TP @@ -297,6 +317,7 @@ or the arguments to the macro if any, on the title page (if specified) and in the footers. +. This is the default for .IR nroff . . @@ -306,12 +327,14 @@ or the arguments to the macro if any, on the title page (if specified) but not in the footers. +. This is the default for .IR troff . . .TP .B .TL Specifies the document title. +. .I Groff collects text following the .B TL @@ -319,22 +342,26 @@ . .TP .B .AU -Specifies the author's name. +Specifies the author\[aq]s name. +. You can specify multiple authors by using an .B AU macro for each author. . .TP .B .AI -Specifies the author's institution. +Specifies the author\[aq]s institution. +. You can specify multiple institutions. . .TP .B .AB [no] Begins the abstract. +. The default is to print the word .BR ABSTRACT , centered and in italics, above the text of the abstract. +. The option .B no suppresses this heading. @@ -344,7 +371,9 @@ End the abstract. . . +.\" -------------------------------------------------------------------- .SS Paragraphs +.\" -------------------------------------------------------------------- . Use the .B PP @@ -353,26 +382,30 @@ .B LP macro to create paragraphs with no initial indent. . +. .PP The .B QP macro indents all text at both left and right margins. +. The effect is identical to the HTML .B
          -element. -The next paragraph or heading -returns margins to normal. +. +The next paragraph or heading returns margins to normal. +. . .PP The .B XP macro produces an exdented paragraph. +. The first line of the paragraph begins at the left margin, and subsequent lines are indented (the opposite of .BR PP ). . +. .PP For each of the above paragraph types, and also for any list entry introduced by the @@ -386,12 +419,14 @@ number of lines which must be printed, after the start of the paragraph, and before any page break occurs. +. If there is insufficient space remaining on the current page to accommodate this number of lines, then a page break is forced .I before the first line of the paragraph is printed. . +. .PP Similarly, when a section heading @@ -405,6 +440,7 @@ .I minimum number of lines of the paragraph which must be kept on the same page as the heading. +. If insufficient space remains on the current page to accommodate the heading and this number of lines of paragraph text, then a page break is forced @@ -412,16 +448,20 @@ the heading is printed. . . +.\" -------------------------------------------------------------------- .SS Headings +.\" -------------------------------------------------------------------- . Use headings to create a hierarchical structure for your document. +. By default, the .I ms macros print headings in .B bold using the same font family and point size as the body text. +. For output devices which support scalable fonts, this behaviour may be modified, by defining the document control registers, @@ -429,12 +469,14 @@ and .BR PSINCR . . +. .PP The following heading macros are available: . .TP .BI .NH\ xx Numbered heading. +. The argument .I xx is either a numeric argument to indicate the @@ -442,6 +484,7 @@ .I S\ xx\ xx\ \c ".\|.\|." to set the section number explicitly. +. If you specify heading levels out of sequence, such as invoking .B ".NH\ 3" @@ -463,6 +506,7 @@ for each level by which the heading level is less than the value of .BR GROWPS . +. For example, the sequence: . @@ -529,6 +573,7 @@ by aliasing .B SN-STYLE accordingly. +. By default, .B SN-STYLE is initialised by defining the alias @@ -566,6 +611,7 @@ and .B SN-NO-DOT (with this terminating period omitted). +. The string .B SN is also defined, @@ -603,6 +649,7 @@ .BI .NH\ xx with the same value of .IR xx . +. For example, given the same settings for .BR PS , @@ -631,7 +678,9 @@ text. . . +.\" -------------------------------------------------------------------- .SS Highlighting +.\" -------------------------------------------------------------------- . The .I ms @@ -642,6 +691,7 @@ .B ".B [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in .BR "bold type" . +. If you specify a second argument, .I groff prints it in the previous font after @@ -649,10 +699,12 @@ (this allows you to set punctuation after the highlighted text without highlighting the punctuation). +. Similarly, it prints the third argument (if any) in the previous font .B before the first argument. +. For example, .RS . @@ -674,6 +726,7 @@ .B ".R [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in roman (or regular) type. +. It operates similarly to the .B B macro otherwise. @@ -689,6 +742,7 @@ .TP .B ".CW [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in a constant width face. +. It operates similarly to the .B B macro otherwise. @@ -696,6 +750,7 @@ .TP .B ".BI [\fItxt\fP [\fIpost\fP [\fIpre\fP]]]" Sets its first argument in bold italic type. +. It operates similarly to the .B B macro otherwise. @@ -703,24 +758,27 @@ .TP .BI ".BX [" txt ] Prints its argument and draws a box around it. +. If you want to box a string that contains spaces, use a digit-width space (\[rs]0). . .TP .BI ".UL [" txt " [" post ]] Prints its first argument with an underline. +. If you specify a second argument, .I groff -prints it in the previous font after -the underlined text, with no intervening space. +prints it in the previous font after the underlined text, with no +intervening space. . .TP .B .LG Prints all text following in larger type (2\~points larger than the current point size) until the next font size, highlighting, paragraph, or heading macro. -You can specify this macro multiple times -to enlarge the point size as needed. +. +You can specify this macro multiple times to enlarge the point size as +needed. . .TP .B .SM @@ -728,8 +786,9 @@ smaller type (2\~points smaller than the current point size) until the next type size, highlighting, paragraph, or heading macro. -You can specify this macro multiple times -to reduce the point size as needed. +. +You can specify this macro multiple times to reduce the point size as +needed. . .TP .B .NL @@ -746,34 +805,43 @@ as a superscript. . . +.\" -------------------------------------------------------------------- .SS Indents +.\" -------------------------------------------------------------------- . You may need to indent sections of text. +. A typical use for indents is to create nested lists and sublists. . +. .PP Use the .B RS and .B RE macros to start and end a section of indented text, respectively. +. The .B PI register controls the amount of indent. . +. .PP -You can nest indented sections as deeply as needed by -using multiple, nested pairs of +You can nest indented sections as deeply as needed by using multiple, +nested pairs of .B RS and .BR RE . . . +.\" -------------------------------------------------------------------- .SS Lists +.\" -------------------------------------------------------------------- . The .B IP macro handles duties for all lists. +. Its syntax is as follows: . .TP @@ -792,37 +860,47 @@ The .I width specifies the indent for the body of each list item. -Once specified, the indent remains the same for all -list items in the document until specified again. +. +Once specified, the indent remains the same for all list items in the +document until specified again. .\" ----- .br .ne 15 . . +.\" -------------------------------------------------------------------- .SS "Tab stops" +.\" -------------------------------------------------------------------- . Use the .B ta request to set tab stops as needed. +. Use the .B TA macro to reset tabs to the default (every 5n). +. You can redefine the .B TA macro to create a different set of default tab stops. . . +.\" -------------------------------------------------------------------- .SS "Displays and keeps" +.\" -------------------------------------------------------------------- . Use displays to show text-based examples or figures (such as code listings). -Displays turn off filling, so lines of code can be -displayed as-is without inserting +. +Displays turn off filling, so lines of code can be displayed as-is +without inserting .B br requests in between each line. -Displays can be +. +Displays can be .I kept on a single page, or allowed to break across pages. +. The following table shows the display types available. .RS .ne 11 @@ -852,6 +930,7 @@ Use the .B DE macro to end any display type. +. The macros .B Ds and @@ -861,12 +940,14 @@ and .BR DE , respectively, but they have been removed, and should no longer be used. +. X11 documents which actually use .B Ds and .B De always load a specific macro file from the X11 distribution (macros.t) which provides proper definitions for the two macros. +. .PP To .I keep @@ -878,6 +959,7 @@ and .B KE macros. +. The .B KS macro begins a block of text to be kept on a single page, @@ -885,6 +967,7 @@ .B KE macro ends the block. . +. .PP You can specify a .I "floating keep" @@ -893,20 +976,24 @@ and .B KE macros. +. If the keep cannot fit on the current page, .I groff holds the contents of the keep and allows text following the keep (in the source file) to fill in the remainder of the current page. +. When the page breaks, whether by an explicit .B bp request or by reaching the end of the page, .I groff prints the floating keep at the top of the new page. +. This is useful for printing large graphics or tables that do not need to appear exactly where specified. . +. .PP The macros .B B1 @@ -917,14 +1004,17 @@ begins the box, and .B .B2 ends it. +. Text in the box is automatically placed in a diversion (keep). . . +.\" -------------------------------------------------------------------- .SS "Tables, figures, equations, and references" +.\" -------------------------------------------------------------------- . The -.I -ms +.I \-ms macros support the standard .I groff preprocessors: @@ -933,6 +1023,7 @@ .IR eqn , and .IR refer . +. Mark text meant for preprocessors by enclosing it in pairs of tags as follows: . @@ -941,6 +1032,7 @@ Denotes a table, to be processed by the .I tbl preprocessor. +. The optional .BR H "\~argument" instructs @@ -949,6 +1041,7 @@ up to the .B TH macro. +. .I Groff prints the header at the beginning of the table; if the table runs onto another page, @@ -960,6 +1053,7 @@ Denotes a graphic, to be processed by the .I pic preprocessor. +. You can create a .I pic file by hand, using the @@ -974,6 +1068,7 @@ Denotes an equation, to be processed by the .I eqn preprocessor. +. The optional .I align argument can be @@ -989,6 +1084,7 @@ Denotes a reference, to be processed by the .I refer preprocessor. +. The GNU .IR @g@refer (@MAN1EXT@) manual page provides a comprehensive reference @@ -996,11 +1092,14 @@ bibliographic database. . . +.\" -------------------------------------------------------------------- .SS Footnotes +.\" -------------------------------------------------------------------- . The .I ms macros provide a flexible footnote system. +. You can specify a numbered footnote by using the .B \[rs]** escape, followed by the text of the footnote @@ -1010,6 +1109,7 @@ .B FE macros. . +. .PP You can specify symbolic footnotes by placing the mark character (such as @@ -1022,6 +1122,7 @@ .B FE macros. . +. .PP You can control how .I groff @@ -1052,6 +1153,7 @@ .RE You can use footnotes safely within keeps and displays, but avoid using numbered footnotes within floating keeps. +. You can set a second .B \[rs]** between a @@ -1070,7 +1172,9 @@ .BR \[rs]** . . . +.\" -------------------------------------------------------------------- .SS "Headers and footers" +.\" -------------------------------------------------------------------- . There are three ways to define headers and footers: . @@ -1086,6 +1190,7 @@ and .B RF to set the left, center, and right footers. +. This works best for documents that do not distinguish between odd and even pages. . @@ -1099,18 +1204,21 @@ and .B EF macros to define footers for the odd and even pages. +. This is more flexible than defining the individual strings. +. The syntax for these macros is as follows: .RS . .IP -.B ".OH '\fIleft\fP'\fIcenter\fP'\fIright\fP'" +.B ".OH '\fIleft\/\fP'\,\fIcenter\/\fP'\,\fIright\/\fP'" .RE . .IP -You can replace the quote (') marks with any character not +You can replace the quote (\[aq]) marks with any character not appearing in the header or footer text. . +. .PP You can also redefine the .B PT @@ -1118,6 +1226,7 @@ .B BT macros to change the behavior of the header and footer, respectively. +. The header process also calls the (undefined) .B HD macro after @@ -1127,9 +1236,12 @@ (for example, to draw a line below the header). . . +.\" -------------------------------------------------------------------- .SS Margins +.\" -------------------------------------------------------------------- . You control margins using a set of number registers. +. The following table lists the register names and defaults: .RS .ne 8 @@ -1156,14 +1268,19 @@ derive the right margin. . . +.\" -------------------------------------------------------------------- .SS "Multiple columns" +.\" -------------------------------------------------------------------- . The .I ms macros can set text in as many columns as will reasonably fit on the page. +. The following macros are available. +. All of them force a page break if a multi-column mode is already set. +. However, if the current mode is single-column, starting a multi-column mode does .I not @@ -1180,27 +1297,32 @@ .TP .BI ".MC [" width " [" gutter ]] Multi-column mode. +. If you specify no arguments, it is equivalent to the .B 2C macro. +. Otherwise, .I width is the width of each column and .I gutter is the space between columns. +. The .B MINGW number register is the default gutter width. . . +.\" -------------------------------------------------------------------- .SS "Creating a table of contents" +.\" -------------------------------------------------------------------- . -Wrap text that you want to appear in the -table of contents in +Wrap text that you want to appear in the table of contents in .B XS and .B XE macros. +. Use the .B TC macro to print the table of contents at the end of the document, @@ -1208,13 +1330,16 @@ .B i (Roman numeral\~1). . +. .PP You can manually create a table of contents by specifying a page number as the first argument to .BR XS . +. Add subsequent entries using the .B XA macro. +. For example: .RS . @@ -1230,37 +1355,44 @@ \&.\|.\|. \&.XE .fi -.RE +.RE . -.LP +.LP Use the -.B PX +.B PX macro to print a manually-generated table of contents without resetting the page number. . +. .PP If you give the argument .B no to either .B PX -or +or .BR TC , .I groff suppresses printing the title specified by the -.B \[rs]*[TOC] +.B \[rs]*[TOC] string. . . +.\" -------------------------------------------------------------------- .SS "Fractional point sizes" +.\" -------------------------------------------------------------------- . Traditionally, the .I ms -macros only support integer values for the document's font size and -vertical spacing. -To overcome this restriction, values larger than or equal to 1000 are taken -as fractional values, multiplied by 1000. -For example, `.nr\~PS\~10250' sets the font size to 10.25 points. +macros only support integer values for the document\[aq]s font size +and vertical spacing. +. +To overcome this restriction, values larger than or equal to 1000 are +taken as fractional values, multiplied by 1000. +. +For example, \[oq].nr\~PS\~10250\[cq] sets the font size to 10.25 +points. +. . .LP The following four registers accept fractional point sizes: @@ -1270,30 +1402,35 @@ and .BR FVS . . +. .LP Due to backwards compatibility, the value of .B VS must be smaller than 40000 (this is 40.0 points). . . -. +.\" -------------------------------------------------------------------- .SH "DIFFERENCES FROM troff ms" +.\" -------------------------------------------------------------------- . The .I "groff ms" macros are a complete re-implementation, using no original AT&T code. +. Since they take advantage of the extended features in .IR groff , they cannot be used with AT&T .IR troff . +. Other differences include: . .IP \(bu 3n The internals of .I "groff ms" differ from the internals of Unix -.IR ms . +.IR ms . +. Documents that depend upon implementation details of Unix .I ms may not format properly with @@ -1307,30 +1444,33 @@ . .IP \(bu Some Bell Labs localisms are not implemented by default. +. However, if you call the otherwise undocumented -.BR SC +.BR SC section-header macro, you will enable implementations of three other archaic Bell Labs macros: .BR UC , .BR P1 , -and +and .BR P2 . -These are not enabled by default because (a)\~they were not documented, -in the original +. +These are not enabled by default because (a)\~they were not documented, +in the original .IR "ms manual" , and (b)\~the .B P1 -and +and .B UC macros both collide with different macros in the Berkeley version of .IR ms . . .IP -These emulations are sufficient to give back the 1976 Kernighan\~& Cherry -paper -.I "Typsetting Mathematics \(en User's Guide" +These emulations are sufficient to give back the 1976 Kernighan\~& +Cherry paper +.I "Typesetting Mathematics \(en User\[aq]s Guide" its section headings, and restore some text that had gone missing as arguments of undefined macros. +. No warranty express or implied is given as to how well the typographic details these produce match the original Bell Labs macros. . @@ -1368,6 +1508,7 @@ .B GW number registers can be used to control the column width and gutter width, respectively. +. These number registers are not used in .IR "groff ms" . . @@ -1375,10 +1516,13 @@ Macros that cause a reset (paragraphs, headings, etc.\&) may change the indent. -Macros that change the indent do not increment or decrement -the indent, but rather set it absolutely. -This can cause problems for documents that define -additional macros of their own. +. +Macros that change the indent do not increment or decrement the +indent, but rather set it absolutely. +. +This can cause problems for documents that define additional macros of +their own. +. The solution is to use not the .B in request but instead the @@ -1396,8 +1540,9 @@ but is not used by the Unix .I ms macros. -Documents that need to determine whether -they are being formatted with Unix +. +Documents that need to determine whether they are being formatted with +Unix .I ms or .I "groff ms" @@ -1412,6 +1557,7 @@ number register must stay undefined until the first .B ms macro is evaluated. +. This implies that .B PO should not be used early in the document, unless it is changed also: @@ -1420,7 +1566,9 @@ .ne 23 . . +.\" -------------------------------------------------------------------- .SS Strings +.\" -------------------------------------------------------------------- . You can redefine the following strings to adapt the .I "groff ms" @@ -1449,48 +1597,55 @@ _ .TE . +. .PP The .B \[rs]*- string produces an em dash \[em] like this. . +. .PP Use .B \[rs]*Q and .B \[rs]*U -to get a left and right typographer's quote, +to get a left and right typographer\[aq]s quote, respectively, in .I troff (and plain quotes in .IR nroff ). - . . +.\" -------------------------------------------------------------------- .SS Text Settings +.\" -------------------------------------------------------------------- . The .B FAM string sets the default font family. +. If this string is undefined at initialization, it is set to Times. . +. .LP -The point size, vertical spacing, and inter-paragraph spacing for footnotes -are controlled by the number registers +The point size, vertical spacing, and inter-paragraph spacing for +footnotes are controlled by the number registers .BR FPS , .BR FVS , and .BR FPD ; at initialization these are set to -.BR \[rs]n(PS-2 , +.BR \[rs]n(PS\-2 , .BR \[rs]n[FPS]+2 , and .BR \[rs]n(PD/2 , respectively. +. If any of these registers are defined before initialization, the initialization macro does not change them. . +. .LP The hyphenation flags (as set by the .B hy @@ -1499,33 +1654,36 @@ register; the default is\~14. . +. .PP Improved accent marks -(as originally defined in Berkeley's +(as originally defined in Berkeley\[aq]s .I ms version) are available by specifying the .B AM macro at the beginning of your document. -You can place an accent over most characters -by specifying the string defining the accent -directly after the character. +. +You can place an accent over most characters by specifying the string +defining the accent directly after the character. +. For example, -.B n\[rs]*~ +.B n\[rs]*\[ti] produces an n with a tilde over it. . . -. +.\" -------------------------------------------------------------------- .SH "NAMING CONVENTIONS" +.\" -------------------------------------------------------------------- . -. -.LP The following conventions are used for names of macros, strings and number registers. +. External names available to documents that use the .I "groff ms" macros contain only uppercase letters and digits. . +. .LP Internally the macros are divided into modules; naming conventions are as follows: @@ -1553,6 +1711,7 @@ Constructed names used to implement arrays are of the form .IB \%array ! index\fR. . +. .PP Thus the groff ms macros reserve the following names: . @@ -1567,8 +1726,9 @@ Names containing only uppercase letters and digits. . . -. +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- . .B @MACRODIR@/ms.tmac (a wrapper file for @@ -1578,7 +1738,10 @@ . . . +.\" -------------------------------------------------------------------- +.ad l .SH "SEE ALSO" +.\" -------------------------------------------------------------------- . .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), @@ -1590,16 +1753,19 @@ by Trent Fisher and Werner Lemberg. . . +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au . -.SH AUTHOR -. -Original manual page by James Clark -.IR "et al" ; -rewritten by Larry Kollar -(\fIlkollar@despammed.com\fR). . .cp \n[groff_ms_C] . +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/tmac/groff_trace.man groff-1.22.3/tmac/groff_trace.man --- groff-1.22.2/tmac/groff_trace.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_trace.man 2014-11-04 09:38:35.535520121 +0100 @@ -1,17 +1,20 @@ -.ig -groff_trace.7 - -File position: /tmac/groff_trace.man - -Last update: 05 Jan 2009 +.TH GROFF_TRACE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groff_trace \- groff macro package trace.tmac +. +.\" groff_trace.7 +.\" File position: /tmac/groff_trace.man +. +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2002-2014 Free Software Foundation, Inc. This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2002, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. - -written by Bernd Warken . - Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the @@ -22,12 +25,15 @@ FDL in the main directory of the groff source package. .. . +.de au +Written by +.MT groff-bernd.warken-72@web.de +Bernd Warken +.ME . +.. +. .ds Ellipsis .\|.\|.\&\" . -.TH GROFF_TRACE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -. -.SH NAME -groff_trace \- groff macro package trace.tmac . .\" -------------------------------------------------------------------- .SH SYNOPSIS @@ -40,6 +46,7 @@ .IR \*[Ellipsis] ] .YS . +. .\" -------------------------------------------------------------------- .SH DESCRIPTION .\" -------------------------------------------------------------------- @@ -61,6 +68,7 @@ This tracing process is activated by specifying the groff or troff command line option .BR \-m\ trace . +. This works also with the .BR groffer (@MAN1EXT@) viewer program. @@ -68,19 +76,21 @@ A finer control can be obtained by including the macro file within the document by the groff macro call .BR .mso\ trace.tmac . +. Only macros that are defined after this line are traced. . . .P If command line option .B \-r\ trace-full=1 -is given (or if this register is set in the document), number and string -register assignments together with some other requests are traced also. +is given (or if this register is set in the document), number and +string register assignments together with some other requests are +traced also. . . .P -If some other macro package should be traced as well it must be specified -after +If some other macro package should be traced as well it must be +specified after .B \-m\ trace on the command line. . @@ -106,6 +116,7 @@ on the terminal, the normal formatted output (standard output) is redirected to the nirvana device .IR /dev/null . +. The resulting diagnostic messages are displayed directly below the corresponding example. . @@ -117,12 +128,12 @@ .RS .P .EX -\fIsh#\fP echo '. +\fIsh#\fP echo \[aq]. > .de test_macro > .. > .test_macro > .test_macro some dummy arguments -> ' | groff -m trace >/dev/null +> \[aq] | groff \-m trace > /dev/null *** .de test_macro *** de trace enter: .test_macro @@ -144,14 +155,14 @@ .RS .P .EX -\fIsh#\fP echo '. +\fIsh#\fP echo \[aq]. > .de child > .. > .de parent > .child > .. > .parent -> ' | groff -m trace >/dev/null +> \[aq] | groff \-m trace > /dev/null *** .de child *** .de parent @@ -175,7 +186,7 @@ .RS .P .EX -\fIsh#\fP echo '. +\fIsh#\fP echo \[aq]. > .de before > .. > .mso trace.tmac @@ -184,7 +195,7 @@ > .before > .after > .before -> ' | groff >/dev/null +> \[aq] | groff > /dev/null *** de trace enter: .after *** trace exit: .after @@ -214,21 +225,25 @@ request (and its cousins), macro arguments are expanded one level more. . This causes problems if an argument contains four backslashes or more -to prevent too early expansion of the backslash. For example, this -macro call +to prevent too early expansion of the backslash. +. +For example, this macro call . .IP .EX \&.foo \e\e\e\en[bar] .EE . +. .P -normally passes `\e\en[bar]' to macro `.foo', but with the redefined +normally passes \[oq]\e\en[bar]\[cq] to macro \[oq].foo\[cq], but with +the redefined .B .de -request it passes `\en[bar]' instead. +request it passes \[oq]\en[bar]\[cq] instead. +. . .P -The solution to this problem is to use groff's +The solution to this problem is to use groff\[aq]s .B \eE escape which is an escape character not interpreted in copy mode, for example @@ -267,30 +282,6 @@ . . .\" -------------------------------------------------------------------- -.SH AUTHOR -.\" -------------------------------------------------------------------- -. -Copyright (C) 2002, 2006, 2007, 2008 Free Software Foundation, Inc. -. -.P -This document is distributed under the terms of the FDL (GNU Free -Documentation License) version 1.1 or later. -. -You should have received a copy of the FDL on your system, it is also -available on-line at the -.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 Bernd Warken . -. -. -.\" -------------------------------------------------------------------- .SH "SEE ALSO" .\" -------------------------------------------------------------------- . @@ -321,6 +312,17 @@ .BR info (1) file. . +. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au +. +. .\" Local Variables: .\" mode: nroff .\" End: diff -ruN groff-1.22.2/tmac/groff_www.man groff-1.22.3/tmac/groff_www.man --- groff-1.22.2/tmac/groff_www.man 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/groff_www.man 2014-11-04 09:38:35.535520121 +0100 @@ -1,66 +1,91 @@ .TH GROFF_WWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" -.\" Copyright (C) 2000-2006, 2008, 2009, 2011 -.\" Free Software Foundation, Inc. -.\" Written by Gaius Mulley (gaius@glam.ac.uk) -.\" -.\" This file is part of groff. -.\" -.\" groff is free software; you can redistribute it and/or modify it under -.\" the terms of the GNU General Public License as published by the Free -.\" Software Foundation, either version 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 . -.\" -.\" user level guide to using the -mwww macroset -.\" +.SH NAME +groff_www \- groff macros for authoring web pages +. +.\" User level guide to using the -mwww macroset . .do nr groff_www_C \n[.C] .cp 0 -. .do mso www.tmac . +. +.\" -------------------------------------------------------------------- +.\" Legal Terms +.\" -------------------------------------------------------------------- +. +.de co +Copyright \[co] 2000-2014 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 +.UR http://www.gnu.org/licenses/ +GPLs +.UE . +.. +. +.de au +.B \%grohtml +was written by +.MTO gaius@glam.ac.uk "Gaius Mulley" +.. +. .\" we need the .LK here as we use it in the middle as an example -- .\" once the user requests .LK then the automatic generation of links .\" at the top of the document is suppressed. .LK . -. -.SH NAME -groff_www \- groff macros for authoring web pages .HR . . +.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- +. .B "groff \-mwww" [ options ] file ... . . +.\" -------------------------------------------------------------------- .SH DESCRIPTION +.\" -------------------------------------------------------------------- +. This manual page describes the GNU \-mwww macro package, which is part of the groff document formatting system. +. The manual page is very a basic guide, and the html device driver .RB ( \%grohtml ) has been completely rewritten but still remains as in an alpha state. +. It has been included into the distribution so that a lot of people have a chance to test it. +. Note that this macro file is automatically called (via the .B troffrc file) if you use .B \-Thtml or .BR \-Txhtml . +. +. .PP To see the hyperlinks in action, please format this man page with the .B \%grohtml device. +. +. .PP Here is a summary of the functions found in this macro set. .TS @@ -101,6 +126,8 @@ \&.LNE@end the two-column table. \&.LINKSTYLE@initialize default url attributes. .TE +. +. .PP Output of the .BR pic , @@ -111,19 +138,27 @@ preprocessors is acceptable as input. . . +.\" -------------------------------------------------------------------- .SH REQUESTS +.\" -------------------------------------------------------------------- +. .TP .B .JOBNAME filename Split output into multiple HTML files. -A file is split whenever a .SH or .NH\ 1 is encountered. +. +A file is split whenever a \&.SH or \&.NH\ 1 is encountered. +. Its argument is the file stem name for future output files. +. This option is equivalent to -.BR \%grohtml 's +.BR \%grohtml \[aq]s .B \-j option. +. .TP .B .HX n Specify the cut off depth when generating links from section headings. +. For example, a parameter of\~2 would cause .B \%grohtml to generate a list of links for @@ -132,6 +167,7 @@ .B .NH\ 2 but not for .BR .NH\ 3 . +. Whereas .RS .IP @@ -143,6 +179,7 @@ tells .B \%grohtml that no heading links should be created at all. +. Another method for turning automatic headings off is by issuing the the command line switch .B \-P\-l @@ -163,8 +200,11 @@ generates .TAG URL a URL using either one, two or three arguments. -The first parameter is the actual URL, the second is the name of the link, -and the third is optional stuff to be printed immediately afterwards. +. +The first parameter is the actual URL, the second is the name of the +link, and the third is optional stuff to be printed immediately +afterwards. +. If .B description and @@ -172,19 +212,21 @@ are absent then the .B url becomes the anchor text. +. Hyphenation is disabled while printing the actual URL; -explicit breakpoints -should be inserted with the +explicit breakpoints should be inserted with the .B \[rs]: escape. +. Here is how to encode .URL http://\:foo.\:org/ "foo" : .RS .IP .B .URL http://\[rs]:foo.\[rs]:org/ "foo" : .RE +. .IP -If this is processed by a device other than +If this is processed by a device other than .B \-Thtml or .B \-Txhtml @@ -193,40 +235,50 @@ .IP foo \[la]\f[C]http://foo.org\f[]\[ra]: .RE +. .IP The URL macro can be of any type; for example we can reference -.URL pic.html "Eric Raymond's pic guide" +.URL pic.html "Eric Raymond\[aq]s pic guide" by: .RS .IP -.B .URL pic.html \[dq]Eric Raymond's pic guide\[dq] +.B .URL pic.html \[dq]Eric Raymond\[aq]s pic guide\[dq] .RE . .TP .B .MTO address [description] [after] Generate an email html reference. +. The first argument is mandatory as the email address. -The optional second argument is the text you see in your browser +. +The optional second argument is the text you see in your browser. +. If an empty argument is given, .B address is used instead. +. An optional third argument is stuff printed immediately afterwards. +. Hyphenation is disabled while printing the actual email address. -For example, +. +For example, .MTO joe@user.org "Joe User" was achieved by the following macro: .RS .IP .B .MTO joe@user.org \[dq]Joe User\[dq] .RE +. .IP -Note that all the URLs actually are treated as consuming no textual space -in groff. +Note that all the URLs actually are treated as consuming no textual +space in groff. +. This could be considered as a bug since it causes some problems. +. To circumvent this, .B www.tmac -inserts a zero-width character which expands to a harmless space (only if -run with +inserts a zero-width character which expands to a harmless space (only +if run with .B \-Thtml or .BR \-Txhtml ). @@ -234,13 +286,19 @@ .TP .B .FTP url [description] [after] indicates that data can be obtained via ftp. +. The first argument is the url and the second is the browser text. -A third argument, similar to the macros above, is intended for stuff printed -immediately afterwards. +. +A third argument, similar to the macros above, is intended for stuff +printed immediately afterwards. +. The second and the third parameter are optional. +. Hyphenation is disabled while printing the actual URL. +. As an example, here the location of the .FTP ftp://\:ftp.gnu.org/ "GNU ftp server" . +. The macro example above was specified by: .RS .IP @@ -250,12 +308,15 @@ .TP .B .TAG name Generates an html name tag from its argument. +. This can then be referenced using the .URL #URL URL macro. +. As you can see, you must precede the tag name with .B # since it is a local reference. +. This link was achieved via placing a TAG in the URL description above; the source looks like this: .RS @@ -273,39 +334,48 @@ .RE . .TP -.B .IMG [-R|-L|-C] filename [width] [height] +.B .IMG [\-R|\-L|\-C] filename [width] [height] Include a picture into the document. +. The first argument is the horizontal location: right, left, or center .RB ( \-R , .BR \-L , or .BR \-C ). -Alignment is centered by default (-C). +. +Alignment is centered by default (\-C). +. The second argument is the filename. +. The optional third and fourth arguments are the width and height. +. If the width is absent it defaults to 1\~inch. +. If the height is absent it defaults to the width. +. This maps onto an html img tag. +. If you are including a png image then it is advisable to use the .B PIMG macro. . .TP -.B .PIMG [-R|-L|-C] filename [width [height]] +.B .PIMG [\-R|\-L|\-C] filename [width [height]] Include an image in PNG format. +. This macro takes exactly the same parameters as the .B IMG macro; it has the advantage of working with postscript and html devices also since it can automatically convert the image into the EPS format, -using the following programs -of the +using the following programs of the .B netpbm package: .BR pngtopnm , .BR pnmcrop , and .BR pnmtops . -If the document isn't processed with +. +If the document isn\[aq]t processed with .B \-Thtml or .B \-Txhtml @@ -314,47 +384,61 @@ option of groff. . .TP -.B .MPIMG [-R|-L] [-G gap] filename [width [height]] +.B .MPIMG [\-R|\-L] [\-G gap] filename [width [height]] Place a PNG image on the margin and wrap text around it. +. The first parameters are optional. +. The alignment: left or right .RB ( \-L or .BR \-R ) specifies the margin where the picture is placed at. +. The default alignment is left -.RB ( -L ). +.RB ( \-L ). +. Optionally, .BI \-G \~gap -can be used to arrange a gap between the picture -and the text that wraps around it. +can be used to arrange a gap between the picture and the text that +wraps around it. +. The default gap width is zero. +. .br The first non-optional argument is the filename. +. The optional following arguments are the width and height. +. If the width is absent it defaults to 1\~inch. +. If the height is absent it defaults to the width. +. Example: .RS .IP .nf .ft B -\&.MPIMG -L -G 2c foo.png 3c 1.5c +\&.MPIMG \-L \-G 2c foo.png 3c 1.5c .ft P .fi .RE +. .IP -The height and width may also be given as percentages. The PostScript -device calculates the width from the +The height and width may also be given as percentages. +. +The PostScript device calculates the width from the .B .l register and the height from the .B .p -register. For example: +register. +. +For example: .RS .IP .nf .ft B -\&.MPIMG -L -G 2c foo.png 15% +\&.MPIMG \-L \-G 2c foo.png 15% .ft P .fi .RE @@ -362,10 +446,13 @@ .TP .B .HnS n Begin heading. +. The numeric heading level .I n is specified by the first parameter. +. Use this macro if your headings contain URL, FTP or MTO macros. +. Example: .RS .IP @@ -374,7 +461,7 @@ \&.HnS 1 \&.HR GNU Troff -\&.URL http://groff.ffii.org (Groff) +\&.URL http://groff.ffii.org (Groff) \&\(em a \&.URL http://www.gnu.org/ GNU \&project. @@ -385,23 +472,27 @@ .ft P .fi .RE +. .IP -In this case you might wish to -disable automatic links to headings. +In this case you might wish to disable automatic links to headings. +. This can be done via .B \-P\-l from the command line. .\" or by using a call to `.HX 0'. - +. . .TP .B .HnE End heading. . +. .TP .B .LK .TAG LK -Force \%grohtml to place the automatically generated links at this position. +Force \%grohtml to place the automatically generated links at this +position. +. If this manual page has been processed with .B \-Thtml or @@ -416,6 +507,7 @@ .B \-Thtml and .BR \-Txhtml . +. No effect for all other devices. . .TP @@ -426,22 +518,27 @@ .TP .B .HTL Generate an HTML title only. -This differs from the +. +This differs from the .B TL macro of the .B ms macro package which generates both an HTML title and an

          heading. -Use it to provide an HTML title as search engine fodder but a graphic title -in the document. -The macro terminates when a space or break is seen (.sp, .br). +. +Use it to provide an HTML title as search engine fodder but a graphic +title in the document. +. +The macro terminates when a space or break is seen (.sp, \&.br). . .TP .B .HEAD Add arbitrary HTML data to the block. +. Ignored if not processed with .B \-Thtml or .BR \-Txhtml . +. Example: .RS .IP @@ -457,13 +554,16 @@ .TP .B .HTML All text after this macro is treated as raw html. +. If the document is processed without .B \-Thtml or .B \-Txhtml then the macro is ignored. -Internally, this macro is used as a building block for other higher-level -macros. +. +Internally, this macro is used as a building block for other +higher-level macros. +. .IP For example, the .B BGIMG @@ -479,14 +579,18 @@ .fi .RE . +. .TP .B .DC l text [color] Produce a drop capital. +. The first parameter is the letter to be dropped and enlarged, the second parameter .B text -is the ajoining text whose height the first letter should not exceed. +is the adjoining text whose height the first letter should not exceed. +. The optional third parameter is the color of the dropped letter. +. It defaults to black. . .TP @@ -500,34 +604,43 @@ .TP .B ".ALN [color] [percentage]" Place section heading links automatically to the left of the main text. +. The color argument is optional and if present indicates which HTML background color is to be used under the links. +. The optional percentage indicates the amount of width to devote to displaying the links. +. The default values are #eeeeee and 30 for color and percentage width, respectively. +. This macro should only be called once at the beginning of the document. -After calling this macro each section heading emits an HTML table consisting -of the links in the left and the section text on the right. +. +After calling this macro each section heading emits an HTML table +consisting of the links in the left and the section text on the right. . .TP .B ".LNS" Start a new two-column table with links in the left column. -This can be called if the document has text before the first .SH and if .ALN -is used. -Typically this is called just before the first paragraph and after the main -title as it indicates that text after this point should be positioned to the -right of the left-hand navigational links. +. +This can be called if the document has text before the first \&.SH and +if \&.ALN is used. +. +Typically this is called just before the first paragraph and after the +main title as it indicates that text after this point should be +positioned to the right of the left-hand navigational links. . .TP .B ".LNE" End a two-column table. -This should be called at the end of the document if .ALN was used. +. +This should be called at the end of the document if \&.ALN was used. . .TP .B ".LINKSTYLE color [ fontstyle [ openglyph closeglyph ] ]" -Initialize default url attributes to be used if this macro set is not used -with the HTML device. +Initialize default url attributes to be used if this macro set is not +used with the HTML device. +. The macro set initializes itself with the following call .RS .IP @@ -537,46 +650,69 @@ .ft P .fi .RE +. .IP but these values will be superseded by a user call to LINKSTYLE. . +. +.\" -------------------------------------------------------------------- .SH SECTION HEADING LINKS +.\" -------------------------------------------------------------------- +. By default .B \%grohtml generates links to all section headings and places these at the top of the -html document. (See +html document. +. +(See .URL #LK LINKS for details of how to switch this off or alter the position). . . +.\" -------------------------------------------------------------------- .SH LIMITATIONS OF GROHTML +.\" -------------------------------------------------------------------- +. .LP .B tbl information is currently rendered as a PNG image. . . +.\" -------------------------------------------------------------------- .SH FILES +.\" -------------------------------------------------------------------- @MACRODIR@/www.tmac . . +.\" -------------------------------------------------------------------- +.SH BUGS +.\" -------------------------------------------------------------------- +. +Report bugs to the +.MTO bug-groff@\:gnu.org "Groff Bug Mailing List" . +. +Include a complete, self-contained example that will allow the bug to +be reproduced, and say which version of groff you are using. +. +. +.\" -------------------------------------------------------------------- .SH "SEE ALSO" +.\" -------------------------------------------------------------------- .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@) .BR \%grohtml (@MAN1EXT@), .BR netpbm (1) . . -.SH AUTHOR -.B \%grohtml -was written by -.MTO gaius@glam.ac.uk "Gaius Mulley" -. +.\" -------------------------------------------------------------------- +.SH COPYING +.\" -------------------------------------------------------------------- +.co +.\" -------------------------------------------------------------------- +.SH AUTHORS +.\" -------------------------------------------------------------------- +.au . -.SH BUGS -Report bugs to the -.MTO bug-groff@\:gnu.org "Groff Bug Mailing List" . -Include a complete, self-contained example that will allow the bug to be -reproduced, and say which version of groff you are using. . .cp \n[groff_www_C] . diff -ruN groff-1.22.2/tmac/html-end.tmac groff-1.22.3/tmac/html-end.tmac --- groff-1.22.2/tmac/html-end.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/html-end.tmac 2014-11-04 09:38:35.535520121 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" html-end.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/html.tmac groff-1.22.3/tmac/html.tmac --- groff-1.22.2/tmac/html.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/html.tmac 2014-11-04 09:38:35.535520121 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" html.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/ja.tmac groff-1.22.3/tmac/ja.tmac --- groff-1.22.2/tmac/ja.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/ja.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -2,7 +2,7 @@ .\" .\" Japanese localization for groff .\" -.\" Copyright (C) 2009, 2010 Free Software Foundation, Inc. +.\" Copyright (C) 2009-2014 Free Software Foundation, Inc. .\" Written by Fumitoshi UKAI and .\" Colin Watson .\" diff -ruN groff-1.22.2/tmac/latin1.tmac groff-1.22.3/tmac/latin1.tmac --- groff-1.22.2/tmac/latin1.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/latin1.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" latin1.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/latin2.tmac groff-1.22.3/tmac/latin2.tmac --- groff-1.22.2/tmac/latin2.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/latin2.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" latin2.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/latin5.tmac groff-1.22.3/tmac/latin5.tmac --- groff-1.22.2/tmac/latin5.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/latin5.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" latin5.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/latin9.tmac groff-1.22.3/tmac/latin9.tmac --- groff-1.22.2/tmac/latin9.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/latin9.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" latin9.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/lbp.tmac groff-1.22.3/tmac/lbp.tmac --- groff-1.22.2/tmac/lbp.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/lbp.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" lbp.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/lj4.tmac groff-1.22.3/tmac/lj4.tmac --- groff-1.22.2/tmac/lj4.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/lj4.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" lj4.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/Makefile.sub groff-1.22.3/tmac/Makefile.sub --- groff-1.22.2/tmac/Makefile.sub 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/Makefile.sub 2014-11-04 09:38:35.537520096 +0100 @@ -1,21 +1,26 @@ -# Copyright (C) 1989-2007, 2009-2012 -# Free Software Foundation, Inc. +# Makefile.sub for `tmac' +# +# File position: /tmac/Makefile.sub +# +# Copyright (C) 1989-2014 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 . +# +######################################################################## MAN7=\ groff_ms.n \ @@ -78,6 +83,8 @@ sys_tmac_prefix= pnmtops_nosetpage="pnmtops" +RM=rm -f + all: stamp-strip stamp-wrap stamp-sed install_data: $(NORMALFILES) $(SPECIALFILES) man.local \ @@ -94,35 +101,35 @@ done; \ fi for f in $(NORMALFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(tmacdir)/$$f; \ done - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac $(INSTALL_DATA) $(srcdir)/s.tmac \ $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac $(INSTALL_DATA) $(srcdir)/an.tmac \ $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac - -rm -f $(DESTDIR)$(tmacdir)/www.tmac + $(RM) $(DESTDIR)$(tmacdir)/www.tmac $(INSTALL_DATA) www.tmac-sed $(DESTDIR)$(tmacdir)/www.tmac for f in $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ $(INSTALL_DATA) $$f-s $(DESTDIR)$(tmacdir)/$$f; \ done -test -d $(DESTDIR)$(mdocdir) || $(mkinstalldirs) $(DESTDIR)$(mdocdir) for f in $(MDOCFILES); do \ - rm -f $(DESTDIR)$(mdocdir)/$$f; \ + $(RM) $(DESTDIR)$(mdocdir)/$$f; \ $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \ done - -test -f $(DESTDIR)$(localtmacdir)/man.local || \ - $(INSTALL_DATA) $(srcdir)/man.local \ - $(DESTDIR)$(localtmacdir)/man.local - -test -f $(DESTDIR)$(localtmacdir)/mdoc.local || \ - $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local + -test -f $(DESTDIR)$(localtmacdir)/man.local \ + || $(INSTALL_DATA) $(srcdir)/man.local \ + $(DESTDIR)$(localtmacdir)/man.local + -test -f $(DESTDIR)$(localtmacdir)/mdoc.local \ + || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local stamp-strip: $(STRIPFILES) $(MDOCFILES) mdoc.local for f in $(STRIPFILES) $(MDOCFILES) mdoc.local; do \ - rm -f $$f-s; \ + $(RM) $$f-s; \ sed -f $(srcdir)/strip.sed $(srcdir)/$$f >$$f-s; \ done touch $@ @@ -130,7 +137,7 @@ stamp-wrap: if test -n "$(tmac_wrap)"; then \ for m in ""$(tmac_wrap); do \ - rm -f $$m-wrap; \ + $(RM) $$m-wrap; \ if test "$$m" = an; then \ echo .do mso andoc.tmac >>$$m-wrap; \ fi; \ @@ -141,30 +148,37 @@ touch $@ stamp-sed: www.tmac - rm -f www.tmac-sed; \ sed -e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \ - $(srcdir)/www.tmac > www.tmac-sed; + $(srcdir)/www.tmac > www.tmac-sed touch $@ uninstall_sub: -if test -n "$(tmac_wrap)"; then \ for m in ""$(tmac_wrap); do \ - rm -f $(DESTDIR)$(systemtmacdir)/$$m.tmac; \ + $(RM) $(DESTDIR)$(systemtmacdir)/$$m.tmac; \ done; \ fi -for f in $(NORMALFILES) $(STRIPFILES); do \ - rm -f $(DESTDIR)$(tmacdir)/$$f; \ + $(RM) $(DESTDIR)$(tmacdir)/$$f; \ done - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac - -rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac - -rm -f $(DESTDIR)$(tmacdir)/www.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac + $(RM) $(DESTDIR)$(tmacdir)/www.tmac -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \ $(srcdir)/man.local; then \ - rm -f $(DESTDIR)$(localtmacdir)/man.local; \ + $(RM) $(DESTDIR)$(localtmacdir)/man.local; \ fi -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \ $(srcdir)/mdoc.local; then \ - rm -f $(DESTDIR)$(localtmacdir)/mdoc.local; \ + $(RM) $(DESTDIR)$(localtmacdir)/mdoc.local; \ fi - -for f in $(MDOCFILES); do rm -f $(DESTDIR)$(mdocdir)/$$f; done - -rmdir $(DESTDIR)$(mdocdir) + -for f in $(MDOCFILES); do $(RM) $(DESTDIR)$(mdocdir)/$$f; done + -test -d $(DESTDIR)$(mdocdir) && rmdir $(DESTDIR)$(mdocdir) + +######################################################################## +# Emacs settings +######################################################################## +# +# Local Variables: +# mode: makefile +# End: diff -ruN groff-1.22.2/tmac/mandoc.tmac groff-1.22.3/tmac/mandoc.tmac --- groff-1.22.2/tmac/mandoc.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/mandoc.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" mandoc.tmac .\" .do mso andoc.tmac diff -ruN groff-1.22.2/tmac/man.local groff-1.22.3/tmac/man.local --- groff-1.22.2/tmac/man.local 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/man.local 2014-11-04 09:38:35.537520096 +0100 @@ -1,2 +1,4 @@ +.\" -*- nroff -*- +.\" .\" This file is loaded after an-old.tmac. .\" Put any local modifications to an-old.tmac here. diff -ruN groff-1.22.2/tmac/man.tmac groff-1.22.3/tmac/man.tmac --- groff-1.22.2/tmac/man.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/man.tmac 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" man.tmac .\" .do mso andoc.tmac diff -ruN groff-1.22.2/tmac/man.ultrix groff-1.22.3/tmac/man.ultrix --- groff-1.22.2/tmac/man.ultrix 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/man.ultrix 2014-11-04 09:38:35.537520096 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Install this as man.local if you're using Ultrix. .\" Ultrix specific additions to groff -man macros. .\" Written by James Clark from a specification by Martyn.Johnson@cl.cam.ac.uk. diff -ruN groff-1.22.2/tmac/mdoc.local groff-1.22.3/tmac/mdoc.local --- groff-1.22.2/tmac/mdoc.local 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/mdoc.local 2014-11-04 09:38:35.537520096 +0100 @@ -1,2 +1,4 @@ +.\" -*- nroff -*- +.\" .\" This file is loaded after doc.tmac. .\" Put any local modifications to doc.tmac here. diff -ruN groff-1.22.2/tmac/mdoc.tmac groff-1.22.3/tmac/mdoc.tmac --- groff-1.22.2/tmac/mdoc.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/mdoc.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" mdoc.tmac .\" .do mso doc.tmac diff -ruN groff-1.22.2/tmac/me.tmac groff-1.22.3/tmac/me.tmac --- groff-1.22.2/tmac/me.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/me.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" me.tmac .\" .do mso e.tmac diff -ruN groff-1.22.2/tmac/ms.tmac groff-1.22.3/tmac/ms.tmac --- groff-1.22.2/tmac/ms.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/ms.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" ms.tmac .\" .do mso s.tmac diff -ruN groff-1.22.2/tmac/papersize.tmac groff-1.22.3/tmac/papersize.tmac --- groff-1.22.2/tmac/papersize.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/papersize.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" papersize.tmac .\" .\" Set up groff for various paper sizes. diff -ruN groff-1.22.2/tmac/pdf.tmac groff-1.22.3/tmac/pdf.tmac --- groff-1.22.2/tmac/pdf.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/pdf.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,8 +1,10 @@ +.\" -*- nroff -*- +. .ig pdf.tmac - Copyright (C) 2011-2013 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. Written by Deri James This file is part of groff. @@ -574,7 +576,10 @@ .\" 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 +.ds PDFBOOKMARK.NAME "\\*[pdf:href-N]\\*[pdf:href-D] +.pdf*href.set \\*[PDFBOOKMARK.NAME] \\$1 +.ds pdf:look(\\*[PDFBOOKMARK.NAME]) \\$* +.if dPDF.EXPORT .tm .ds pdf:look(\\*[PDFBOOKMARK.NAME]) \\$* .\" .\" .\" Irrespective of whether this marker is created, or not, @@ -702,7 +707,9 @@ . \" \#. if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR] . nr pdf:bm.width \\w'\\*[PDFHREF.DESC]' -. nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\X'pdf: markstart \\n[rst] \\n[rsb] \\n[PDFHREF.LEADING] \\*[pdf:href.link]'\\*[PDFHREF.DESC]\X'pdf: markend'\m[]\c +. nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\c +. device pdf: markstart \\n[rst] \\n[rsb] \\n[PDFHREF.LEADING] \\*[pdf:href.link] +. nop \&\\*[PDFHREF.DESC]\X'pdf: markend'\m[]\c . \" . \" Clean up the temporary registers and strings, used to . \" compute the "hot-spot" bounds, and format the reference, diff -ruN groff-1.22.2/tmac/pic.tmac groff-1.22.3/tmac/pic.tmac --- groff-1.22.2/tmac/pic.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/pic.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" pic.tmac .\" .de PS diff -ruN groff-1.22.2/tmac/psatk.tmac groff-1.22.3/tmac/psatk.tmac --- groff-1.22.2/tmac/psatk.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/psatk.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" psatk.tmac .\" .\" Implementation of the ATK PB and PE macros for use with groff and grops. diff -ruN groff-1.22.2/tmac/psfig.tmac groff-1.22.3/tmac/psfig.tmac --- groff-1.22.2/tmac/psfig.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/psfig.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" psfig.tmac .\" .\" These are macros to make psfig work with groff. diff -ruN groff-1.22.2/tmac/psold.tmac groff-1.22.3/tmac/psold.tmac --- groff-1.22.2/tmac/psold.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/psold.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" psold.tmac .\" .\" In newer PostScript printers, text fonts contain all ISO Latin-1 diff -ruN groff-1.22.2/tmac/pspic.tmac groff-1.22.3/tmac/pspic.tmac --- groff-1.22.2/tmac/pspic.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/pspic.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" pspic.tmac .\" .\" Define the PSPIC macro. diff -ruN groff-1.22.2/tmac/ps.tmac groff-1.22.3/tmac/ps.tmac --- groff-1.22.2/tmac/ps.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/ps.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" ps.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/ptx.tmac groff-1.22.3/tmac/ptx.tmac --- groff-1.22.2/tmac/ptx.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/ptx.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" ptx.tmac .\" .\" Provide `.xx' macro to format permuted index entries as created diff -ruN groff-1.22.2/tmac/refer-me.tmac groff-1.22.3/tmac/refer-me.tmac --- groff-1.22.2/tmac/refer-me.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/refer-me.tmac 2014-11-04 09:38:35.538520084 +0100 @@ -4,7 +4,7 @@ .\" .\" Refer support for me macros. .\" -.\" Copyright (C) 2011 Free Software Foundation, Inc. +.\" Copyright (C) 2011-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/refer-ms.tmac groff-1.22.3/tmac/refer-ms.tmac --- groff-1.22.2/tmac/refer-ms.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/refer-ms.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -4,7 +4,7 @@ .\" .\" Refer support for ms macros. .\" -.\" Copyright (C) 2011 Free Software Foundation, Inc. +.\" Copyright (C) 2011-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/refer.tmac groff-1.22.3/tmac/refer.tmac --- groff-1.22.2/tmac/refer.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/refer.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -4,7 +4,7 @@ .\" .\" This is an interface to `refer', originally part of `s.tmac'. .\" -.\" Copyright (C) 2011 Free Software Foundation, Inc. +.\" Copyright (C) 2011-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/safer.tmac groff-1.22.3/tmac/safer.tmac --- groff-1.22.2/tmac/safer.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/safer.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" This file is no longer needed; it has been replaced with a built-in .\" solution. .\" diff -ruN groff-1.22.2/tmac/s.tmac groff-1.22.3/tmac/s.tmac --- groff-1.22.2/tmac/s.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/s.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -3,9 +3,7 @@ s.tmac -Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2006, 2007, - 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1989-2014 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff -ruN groff-1.22.2/tmac/sv.tmac groff-1.22.3/tmac/sv.tmac --- groff-1.22.2/tmac/sv.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/sv.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -2,7 +2,7 @@ .\" .\" Swedish localization for groff .\" -.\" Copyright (C) 2006, 2009 Free Software Foundation, Inc. +.\" Copyright (C) 2006-2014 Free Software Foundation, Inc. .\" Written by Werner Lemberg (wl@gnu.org) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/trace.tmac groff-1.22.3/tmac/trace.tmac --- groff-1.22.2/tmac/trace.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/trace.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -1,11 +1,11 @@ +.\" -*- nroff -*- +.\" .\" trace.tmac .\" .\" Load this before a macro package that you want to trace. .\" .\" -.\" Copyright (C) 1989, 1990, 1991, 1992, 2000, 2002, 2003, 2004, 2006, -.\" 2007, 2008, 2009 -.\" Free Software Foundation, Inc. +.\" Copyright (C) 1989-2014 Free Software Foundation, Inc. .\" Written by James Clark (jjc@jclark.com) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/trans.tmac groff-1.22.3/tmac/trans.tmac --- groff-1.22.2/tmac/trans.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/trans.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -2,7 +2,7 @@ .\" .\" Localization for groff .\" -.\" Copyright (C) 2006, 2009 Free Software Foundation, Inc. +.\" Copyright (C) 2006-2014 Free Software Foundation, Inc. .\" Written by Fabrice Ménard (menard.fabrice@wanadoo.fr) .\" .\" This file is part of groff. diff -ruN groff-1.22.2/tmac/troffrc groff-1.22.3/tmac/troffrc --- groff-1.22.2/tmac/troffrc 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/troffrc 2014-11-04 09:38:35.539520071 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Startup file for troff. . .\" This is tested by pic. diff -ruN groff-1.22.2/tmac/troffrc-end groff-1.22.3/tmac/troffrc-end --- groff-1.22.2/tmac/troffrc-end 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/troffrc-end 2014-11-04 09:38:35.539520071 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" final startup file for troff . .\" this file is parsed after all macro sets have been read diff -ruN groff-1.22.2/tmac/tty-char.tmac groff-1.22.3/tmac/tty-char.tmac --- groff-1.22.2/tmac/tty-char.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/tty-char.tmac 2014-11-04 09:38:35.539520071 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" tty-char.tmac .\" .\" This file defines standard troff characters and some groff characters for diff -ruN groff-1.22.2/tmac/tty.tmac groff-1.22.3/tmac/tty.tmac --- groff-1.22.2/tmac/tty.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/tty.tmac 2014-11-04 09:38:35.540520059 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" tty.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/tmac/unicode.tmac groff-1.22.3/tmac/unicode.tmac --- groff-1.22.2/tmac/unicode.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/unicode.tmac 2014-11-04 09:38:35.540520059 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" unicode.tmac .\" .char - \[hy] diff -ruN groff-1.22.2/tmac/www.tmac groff-1.22.3/tmac/www.tmac --- groff-1.22.2/tmac/www.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/www.tmac 2014-11-04 09:38:35.540520059 +0100 @@ -10,8 +10,7 @@ This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 2001-2014 Free Software Foundation, Inc. written by Gaius Mulley , with additions by Werner Lemberg and Bernd Warken . @@ -520,10 +519,13 @@ .\" .\" Generate an HTML name NAME. .\" Define string TAG_NAME to TEXT, if present, otherwise to \n[PN]. +.\" Register PN is the current page number. .\" .de TAG . HTML " . ie '\\$2'' \ +. if !rPN \ +. nr PN \\n% . ds TAG_\\$1 \\n[PN]\" . el \ . ds TAG_\\$1 \\$2\" diff -ruN groff-1.22.2/tmac/Xps.tmac groff-1.22.3/tmac/Xps.tmac --- groff-1.22.2/tmac/Xps.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/Xps.tmac 2014-11-04 09:38:35.540520059 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" Xps.tmac .\" .do mso ps.tmac diff -ruN groff-1.22.2/tmac/X.tmac groff-1.22.3/tmac/X.tmac --- groff-1.22.2/tmac/X.tmac 2013-02-07 13:06:08.000000000 +0100 +++ groff-1.22.3/tmac/X.tmac 2014-11-04 09:38:35.540520059 +0100 @@ -1,3 +1,5 @@ +.\" -*- nroff -*- +.\" .\" X.tmac .\" .nr _C \n(.C diff -ruN groff-1.22.2/TODO groff-1.22.3/TODO --- groff-1.22.2/TODO 2013-02-07 13:06:06.000000000 +0100 +++ groff-1.22.3/TODO 2014-11-04 09:38:35.147524972 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2000-2014 Free Software Foundation, Inc. +# +# This file is part of `groffer' which is part of `groff'. +# +# `groff' is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 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 +# . + Unicode input: Making groff 21bit input-clean.