svn commit: r261344 - in head: contrib/mdocml lib/libmandoc usr.bin/mandoc

Ulrich Spoerlein uqs at FreeBSD.org
Sat Feb 1 09:28:00 UTC 2014


Author: uqs
Date: Sat Feb  1 09:27:57 2014
New Revision: 261344
URL: http://svnweb.freebsd.org/changeset/base/261344

Log:
  Merge mdocml v1.12.3 into head
  
  MFC after:	2 weeks

Added:
  head/contrib/mdocml/NEWS
     - copied unchanged from r261328, vendor/mdocml/dist/NEWS
  head/contrib/mdocml/TODO
     - copied unchanged from r261328, vendor/mdocml/dist/TODO
Modified:
  head/contrib/mdocml/arch.in
  head/contrib/mdocml/chars.c
  head/contrib/mdocml/chars.in
  head/contrib/mdocml/config.h
  head/contrib/mdocml/eqn.7
  head/contrib/mdocml/html.c
  head/contrib/mdocml/html.h
  head/contrib/mdocml/lib.in
  head/contrib/mdocml/libman.h
  head/contrib/mdocml/libmandoc.h
  head/contrib/mdocml/libmdoc.h
  head/contrib/mdocml/libroff.h
  head/contrib/mdocml/main.c
  head/contrib/mdocml/man.7
  head/contrib/mdocml/man.c
  head/contrib/mdocml/man.h
  head/contrib/mdocml/man_html.c
  head/contrib/mdocml/man_macro.c
  head/contrib/mdocml/man_term.c
  head/contrib/mdocml/man_validate.c
  head/contrib/mdocml/mandoc.1
  head/contrib/mdocml/mandoc.3
  head/contrib/mdocml/mandoc.c
  head/contrib/mdocml/mandoc.h
  head/contrib/mdocml/mandoc_char.7
  head/contrib/mdocml/mdoc.7
  head/contrib/mdocml/mdoc.c
  head/contrib/mdocml/mdoc.h
  head/contrib/mdocml/mdoc_argv.c
  head/contrib/mdocml/mdoc_html.c
  head/contrib/mdocml/mdoc_macro.c
  head/contrib/mdocml/mdoc_man.c
  head/contrib/mdocml/mdoc_term.c
  head/contrib/mdocml/mdoc_validate.c
  head/contrib/mdocml/out.c
  head/contrib/mdocml/predefs.in
  head/contrib/mdocml/read.c
  head/contrib/mdocml/roff.7
  head/contrib/mdocml/roff.c
  head/contrib/mdocml/st.in
  head/contrib/mdocml/tbl.7
  head/contrib/mdocml/tbl.c
  head/contrib/mdocml/tbl_data.c
  head/contrib/mdocml/tbl_html.c
  head/contrib/mdocml/tbl_layout.c
  head/contrib/mdocml/tbl_term.c
  head/contrib/mdocml/term.c
  head/contrib/mdocml/term.h
  head/contrib/mdocml/term_ascii.c
  head/contrib/mdocml/tree.c
  head/lib/libmandoc/Makefile
  head/usr.bin/mandoc/Makefile
Directory Properties:
  head/contrib/mdocml/   (props changed)

Copied: head/contrib/mdocml/NEWS (from r261328, vendor/mdocml/dist/NEWS)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/mdocml/NEWS	Sat Feb  1 09:27:57 2014	(r261344, copy of r261328, vendor/mdocml/dist/NEWS)
@@ -0,0 +1,370 @@
+$Id: NEWS,v 1.3 2013/10/13 16:06:50 schwarze Exp $
+
+This file lists the most important changes in the mdocml.bsd.lv distribution.
+
+Changes in version 1.12.3, released on December 31, 2013
+
+ * In the mdoc(7) SYNOPSIS, line breaks and hanging indentation
+   now work correctly for .Fo/.Fa/.Fc and .Fn blocks.
+   Thanks to Franco Fichtner for doing part of the work.
+ * The mdoc(7) .Bk macro got some addititonal bugfixes.
+ * In mdoc(7) macro arguments, double quotes can now be quoted
+   by doubling them, just like in man(7).
+   Thanks to Tsugutomo ENAMI for the patch.
+ * At the end of man(7) macro lines, end-of-sentence spacing
+   now works.  Thanks to Franco Fichtner for the patch.
+ * For backward compatibility, the man(7) parser now supports the
+   man-ext .UR/.UE (uniform resource identifier) block macros.
+ * The man(7) parser now handles closing blocks that are not open
+   more gracefully.
+ * The man(7) parser now ignores blank lines right after .SH and .SS.
+ * In the man(7) formatter, reset indentation when leaving a block,
+   not just when entering the next one.
+ * The roff(7) .nr request now supports incrementing and decrementing
+   number registers and stops parsing the number right before the
+   first non-digit character.
+ * The roff(7) parser now supports the alternative escape sequence
+   syntax \C'uXXXX' for Unicode characters.
+ * The roff(7) parser now parses and ignores the .fam (font family)
+   and .hw (hyphenation points) requests and the \d and \u escape
+   sequences.
+ * The roff(7) manual got a new ESCAPE SEQUENCE REFERENCE.
+
+Changes in version 1.12.2, released on Oktober 5, 2013
+
+ * The mdoc(7) to man(7) converter, to be called as mandoc -Tman,
+   is now fully functional.
+ * The mandoc(1) utility now supports the -Ios (default operating system)
+   input option, and the -Tutf8 output mode now actually works.
+ * The mandocdb(8) utility no longer truncates existing databases when
+   starting to build new ones, but only replaces them when the build
+   actually succeeds.
+ * The man(7) parser now supports the PD macro (paragraph distance),
+   and (for GNU man-ext compatibility only) EX (example block) and EE
+   (example end).  Plus several bugfixes regarding indentation, line
+   breaks, and vertical spacing, and regarding RS following TP.
+ * The roff(7) parser now supports the \f(BI (bold+italic) font escape,
+   the \z (zero cursor advance) escape and the cc (change control
+   character) and it (input line trap) requests. Plus bugfixes regarding
+   the \t (tab) escape, nested escape sequences, and conditional requests.
+ * In mdoc(7), several bugs were fixed related to UTF-8 output of quoting
+   enclosures, delimiter handling, list indentation and horizontal and
+   vertical spacing, formatting of the Lk, %U, and %C macros, plus some
+   bugfixes related to the handling of syntax errors like badly nested
+   font blocks, stray Ta macros outside column lists, unterminated It Xo
+   blocks, and non-text children of Nm blocks.
+ * In tbl(7), the width of horizontal spans and the vertical spacing
+   around tables was corrected, and in man(7) files, a crash was fixed
+   that was triggered by some particular unclosed T{ macros.
+ * For mandoc developers, we now provide a tbl(3) library manual and
+   gmdiff, a very small, very simplistic groff-versus-mandoc output
+   comparison tool.
+ * Provide this NEWS file.
+
+Changes in version 1.12.1, released on March 23, 2012
+
+ * Significant work on apropos(1) and mandocdb(8). These tools are now
+   much more robust.  A whatis(1) implementation is now handled as an
+   apropos(1) mode.  These tools are also able to minimally handle
+   pre-formatted pages, that is, those already formatted by another
+   utility such as GNU troff.
+ * The man.cgi(7) script is also now available for wider testing.
+   It interfaces with mandocdb(8) manuals cached by catman(8).
+   HTML output is generated on-the-fly by libmandoc or internal
+   methods to convert pre-formatted pages.
+ * The mailing list archive for the discuss and tech lists are being
+   hosted by Gmane at gmane.comp.tools.mdocml.user and
+   gmane.comp.tools.mdocml.devel, respectively.
+
+Changes in version 1.12.0, released on October 8, 2011
+
+ * This version features a new, work-in-progress mandoc(1) output mode:
+   -Tman.  This mode allows a system maintainer to distribute man(7)
+   media for older systems that may not natively support mdoc(7), such
+   as old Solaris systems.
+ * The -Ofragment option was added to mandoc(1)'s -Thtml and -Txhtml modes.
+ * While adding features, an apropos(1) utility has been merged from the
+   mandoc-tools sandbox.  This interfaces with mandocdb(8) for semantic
+   search of manual content.  apropos(1) is different from the traditional
+   apropos primarily in allowing keyword search (such as for functions,
+   utilities, etc.) and regular expressions.  Note that the calling
+   syntax for apropos is likely to change as it settles down.
+ * In documentation news, the mdoc(7) and man(7) manuals have been
+   made considerably more readable by adding MACRO OVERVIEW sections, by
+   moving the gory details of the LANGUAGE SYNTAX to the roff(7) manual,
+   and by moving the very technical MACRO SYNTAX sections down to the
+   bottom of the page.
+ * Furthermore, for tbl(7), the -Tascii mode horizontal spacing of tables
+   was rewritten completely.  It is now compatible with groff(1), both
+   with and without frames and rulers.
+ * Nesting of indented blocks is now supported in man(7), and several
+   bugs were fixed regarding indentation and alignment.
+ * The page headers in mdoc(7) are now nicer for very long titles.
+
+Changes in version 1.11.7, released on September 2, 2011
+
+ * Added demandoc(1) utility for stripping away macros and escapes.
+   This replaces the historical deroff(1) utility.
+ * Also improved the mdoc(7) and man(7) manuals.
+
+Changes in version 1.11.6, released on August 16, 2011
+
+ * Handling of tr macro in roff(7) implemented.  This makes Perl
+   documentation much more readable.  Hyphenation is also now enabled in
+   man(7) format documents.  Many other general improvements have been
+   implemented.
+
+Changes in version 1.11.5, released on July 24, 2011
+
+ * Significant eqn(7) improvements.  mdocml can now parse arbitrary eqn
+   input (although few GNU extensions are accepted, nor is mixing
+   low-level roff with eqn).  See the eqn(7) manual for details.
+   For the time being, equations are rendered as simple in-line text.
+   The equation parser satisfies the language specified in the
+   Second Edition User's Guide:
+   http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps
+
+Changes in version 1.11.4, released on July 12, 2011
+
+ * Bug-fixes and clean-ups across all systems, especially in mandocdb(8)
+   and the man(7) parser.  This release was significantly assisted by
+   participants in OpenBSD's c2k11.  Thanks!
+
+Changes in version 1.11.3, released on May 26, 2011
+
+ * Introduce locale-encoding of output with the -Tlocale output option and
+   Unicode escaped-character input.  See mandoc(1) and mandoc_char(7),
+   respectively, for details.  This allows for non-ASCII characters (e.g.,
+   \[u5000]) to be rendered in the locale's encoding, if said environment
+   supports wide-character encoding (if it does not, -Tascii is used
+   instead).  Locale support can be turned off at compile time by removing
+   -DUSE_WCHAR in the Makefile, in which case -Tlocale is always a synonym
+   for -Tascii.
+ * Furthermore, multibyte-encoded documents, such as those in UTF-8, may
+   be on-the-fly recoded into mandoc(1) input by using the newly-added
+   preconv(1) utility.  Note: in the future, this feature may be
+   integrated into mandoc(1).
+
+Changes in version 1.11.2, released on May 12, 2011
+
+ * Corrected some installation issues in version 1.11.1.
+ * Further migration to libmandoc.
+ * Initial public release (this utility is very much under development)
+   of mandocdb(8).  This utility produces keyword databases of manual
+   content, which features semantic querying of manual content.
+
+Changes in version 1.11.1, released on April 4, 2011
+
+ * The earlier libroff, libmdoc, and libman soup have been merged into
+   a single library, libmandoc, which manages all aspects of parsing
+   real manuals, from line-handling to tbl(7) parsing.
+ * As usual, many general fixes and improvements have also occurred.
+   In particular, a great deal of redundancy and superfluous code has
+   been removed with the merging of the backend libraries.
+ * see also the changes in 1.10.10
+
+Changes in version 1.10.10, March 20, 2011, NOT released
+
+ * Initial eqn(7) functionality is in place.  For the time being,
+   this is limited to the recognition of equation blocks;
+   future version of mdocml will expand upon this framework.
+
+Changes in version 1.10.9, released on January 7, 2011
+
+ * Many back-end fixes have been implemented: argument handling (quoting),
+   man(7) improvements, error/warning classes, and many more.
+ * Initial tbl(7) functionality (see the "TS", "TE", and "T&" macros in
+   the roff(7) manual) has been merged from tbl.bsd.lv.  Output is still
+   minimal, especially for -Thtml and -Txhtml, but manages to at least
+   display data.  This means that mandoc(1) now has built-in support
+   for two troff preprocessors via libroff: soelim(1) and tbl(1).
+
+Changes in version 1.10.8, released on December 24, 2010
+
+ * Overhauled the -Thtml and -Txhtml output modes.  They now display
+   readable output in arbitrary browsers, including text-based ones like
+   lynx(1).  See HTML and XHTML manuals in the DOCUMENTATION section
+   for examples.  Attention: available style-sheet classes have been
+   considerably changed!  See the example.style.css file for details.
+   Lastly, libmdoc and libman have been cleaned up and reduced in size
+   and complexity.
+ * see also the changes in 1.10.7
+
+Changes in version 1.10.7, December 6, 2010, NOT released
+
+ Significant improvements merged from OpenBSD downstream, including:
+ * many new roff(7) components,
+ * in-line implementation of troff's soelim(1),
+ * broken-block handling,
+ * overhauled error classifications, and
+ * cleaned up handling of error conditions.
+
+Changes in version 1.10.6, released on September 27, 2010
+
+ * Calling conventions for mandoc(1) have changed: -W improved and -f
+   deprecated.
+ * Non-ASCII characters are also now uniformly discarded.
+ * Lots of documentation improvements.
+ * Many incremental fixes accomodating for groff's more interesting
+   productions.
+ * Lastly, pod2man(1) preambles are now fully accepted after some
+   considerable roff(7) and special character support.
+
+Changes in version 1.10.5, released on July 27, 2010
+
+ * Primarily a bug-fix and polish release, but including -Tpdf support
+   in mandoc(1) by way of "Summer of Code".  Highlights:
+ * fix "Sm" and "Bd" handling
+ * fix end-of-sentence handling for embedded sentences
+ * polish man(7) documentation
+ * document all mdoc(7) macros
+ * polish mandoc(1) -Tps output
+ * lots of internal clean-ups in character escapes
+ * un-break literal contexts in man(7) documents
+ * improve -Thtml output for -man
+ * add mandoc(1) -Tpdf support
+
+Changes in version 1.10.4, released on July 12, 2010
+
+ * Lots of features developed during both "Summer of Code" and the
+   OpenBSD c2k10 hackathon:
+ * minimal "ds" roff(7) symbols are supported
+ * beautified SYNOPSIS section output
+ * acceptance of scope-block breakage in mdoc(7)
+ * clarify error message status
+ * many minor bug-fixes and formatting issues resolved
+ * see also changes in 1.10.3
+
+Changes in version 1.10.3, June 29, 2010, NOT released
+
+ * variable font-width and paper-size support in mandoc(1) -Tps output
+ * "Bk" mdoc(7) support
+
+Changes in version 1.10.2, released on June 19, 2010
+
+ * Small release featuring text-decoration in -Tps output,
+   a few minor relaxations of errors, and some optimisations.
+
+Changes in version 1.10.1, released on June 7, 2010
+
+ * This primarily focusses on the "Bl" and "It" macros described in
+   mdoc(7).  Multi-line column support is now fully compatible with groff,
+   as are implicit list entries for columns.
+ * Removed manuals(7) in favour of http://manpages.bsd.lv.
+ * The way we handle the SYNOPSIS section (see the SYNOPSIS documentation
+   in MANUAL STRUCTURE) has also been considerably simplified compared
+   to groff's method.
+ * Furthermore, the -Owidth=width output option has been added to -Tascii,
+   see mandoc(1).
+ * Lastly, initial PostScript output has been added with the -Tps option
+   to mandoc(1).  It's brutally simple at the moment: fixed-font, with no
+   font decorations.
+
+Changes in version 1.10.0, released on May 29, 2010
+
+ * Release consisting of the results from the m2k10 hackathon and up-merge
+   from OpenBSD.  This requires a significant note of thanks to Ingo
+   Schwarze (OpenBSD) and Joerg Sonnenberger (NetBSD) for their hard work,
+   and again to Joerg for hosting m2k10.  Highlights (mostly cribbed from
+   Ingo's m2k10 report) follow in no particular order:
+ * a libroff preprocessor in front of libmdoc and libman stripping out
+   roff(7) instructions;
+ * end-of-sentence (EOS) detection in free-form and macro lines;
+ * correct handling of tab-separated columnar lists in mdoc(7);
+ * improved main calling routines to optionally use mmap(3) for better
+   performance;
+ * cleaned up exiting when invoked as -Tlint or over multiple files
+   with -fign-errors;
+ * error and warning message handling re-written to be unified for
+   libroff, libmdoc, and libman;
+ * handling of badly-nested explicit-scoped macros;
+ * improved free-form text parsing in libman and libmdoc;
+ * significant GNU troff compatibility improvements in -Tascii,
+   largely in terms of spacing;
+ * a regression framework for making sure the many fragilities of GNU
+   troff aren't trampled in subsequent work;
+ * support for -Tascii breaking at hyphens encountered in free-form text;
+ * and many more minor fixes and improvements
+
+Changes in version 1.9.25, released on May 13, 2010
+
+ * Fixed handling of "\*(Ba" escape.
+ * Backed out -fno-ign-chars (pointless complexity).
+ * Fixed erroneous breaking of literal lines.
+ * Fixed SYNOPSIS breaking lines before non-initial macros.
+ * Changed default section ordering.
+ * Most importantly, the framework for end-of-sentence double-spacing is
+   in place, now implemented for the "end-of-sentence, end-of-line" rule.
+ * This is a stable roll-back point before the mandoc hackathon in Rostock!
+
+Changes in version 1.9.24, released on May 9, 2010
+
+ * Rolled back break-at-hyphen.
+ * -DUGLY is now the default (no feature splits!).
+ * Free-form text is not de-chunked any more: lines are passed
+   whole-sale into the front-end, including whitespace.
+ * Added mailing lists.
+
+Changes in version 1.9.23, released on April 7, 2010
+
+ * mdocml has been linked to the OpenBSD build.
+ * This version incorporates many small changes, mostly from patches
+   by OpenBSD, allowing crufty manuals to slip by with warnings instead
+   of erroring-out.
+ * Some subtle semantic issues, such as punctuation scope, have also
+   been fixed.
+ * Lastly, some issues with -Thtml have been fixed, which prompted an
+   update to the online manual pages style layout.
+
+Changes in version 1.9.22, released on March 31, 2010
+
+ * Adjusted merge of the significant work by Ingo Schwarze
+   in getting "Xo" blocks (block full implicit, e.g., "It"
+   for non-columnar lists) to work properly.  This isn't
+   enabled by default: you must specify -DUGLY as a compiler
+   flag (see the Makefile for details).
+
+Changes in version 1.9.20, released on March 30, 2010
+
+ * More efforts to get roff instructions in man(7) documents under
+   control.  Note that roff instructions embedded in line-scoped,
+   next-line macros (e.g. "B") are not supported.
+ * Leading punctuation for mdoc(7) macros, such as "Fl ( ( a",
+   are now correctly handled.
+
+Changes in version 1.9.18, released on March 27, 2010
+
+ * Many fixes (largely pertaining to scope)
+   and improvements (e.g., handling of apostrophe-control macros,
+   which fixes the strange "BR" seen in some macro output)
+   to handling roff instructions in man(7) documents.
+
+Changes in version 1.9.17, released on March 25, 2010
+
+ * Accept perlpod(1) standard preamble.
+ * Also accept (and discard) "de", "dei", "am", "ami", and "ig"
+   roff macro blocks.
+
+Changes in version 1.9.16, released on March 22, 2010
+
+ * Inspired by patches and bug reports by Ingo Schwarze,
+   allowed man(7) to accept non-printing elements to be nested
+   within next-line scopes, such as "br" within "B" or "TH",
+   which is valid roff.
+ * Longsoon architecture also noted and Makefile cleaned up.
+
+Changes in version 1.9.15, released on February 18, 2010
+
+ * Moved to our new BSD.lv home.
+ * XHTML is now an acceptable output mode for mandoc(1);
+ * "Xr" made more compatible with groff;
+ * "Vt" fixed when invoked in SYNOPSIS;
+ * "\\" escape removed;
+ * end-of-line white-space detected for all lines;
+ * subtle bug fixed in list display for some modes;
+ * compatibility layer checked in for compilation in diverse
+   UNIX systems;
+ * and column lengths handled correctly.
+
+For older releases, see the ChangeLog files
+in http://mdocml.bsd.lv/snapshots/ .

Copied: head/contrib/mdocml/TODO (from r261328, vendor/mdocml/dist/TODO)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/mdocml/TODO	Sat Feb  1 09:27:57 2014	(r261344, copy of r261328, vendor/mdocml/dist/TODO)
@@ -0,0 +1,330 @@
+************************************************************************
+* Official mandoc TODO.
+* $Id: TODO,v 1.162 2013/12/25 14:40:34 schwarze Exp $
+************************************************************************
+
+************************************************************************
+* crashes
+************************************************************************
+
+None known.
+
+************************************************************************
+* missing features
+************************************************************************
+
+--- missing roff features ----------------------------------------------
+
+- roff.c should treat \n(.H>23 and \n(.V>19 in the pod2man(1)
+  preamble as true, see for example AUTHORS in MooseX::Getopt.3p
+  reported by Andreas Voegele <mail at andreasvoegele dot com>
+  Tue, 22 Nov 2011 15:34:47 +0100 on ports@
+
+- .ad (adjust margins)
+  .ad l -- adjust left margin only (flush left)
+  .ad r -- adjust right margin only (flush right)
+  .ad c -- center text on line
+  .ad b -- adjust both margins (alias: .ad n)
+  .na   -- temporarily disable adjustment without changing the mode
+  .ad   -- re-enable adjustment without changing the mode
+  Adjustment mode is ignored while in no-fill mode (.nf).
+
+- .as (append to string)
+  found by jca@ in ratpoison(1)  Sun, 30 Jun 2013 12:01:09 +0200
+  
+- .ce (center N lines)
+  found by naddy@ in xloadimage(1)
+  found by Juan Francisco Cantero Hurtado <iam at juanfra dot info>
+           in lang/racket(1)  Thu, 20 Jun 2013 03:19:11 +0200
+
+- .fc (field control)
+  found by naddy@ in xloadimage(1)
+  
+- .ll (line length)
+  found by naddy@ in textproc/enchant(1)  Sat, 12 Oct 2013 03:27:10 +0200
+
+- .nr third argument (auto-increment step size, requires \n+)
+  found by bentley@ in sbcl(1)  Mon, 9 Dec 2013 18:36:57 -0700
+
+- .ns (no-space mode) occurs in xine-config(1)
+  reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
+
+- .ta (tab settings) occurs in ircbug(1) and probably gnats(1)
+  reported by brad@  Sat, 15 Jan 2011 15:50:51 -0500
+
+- .ti (temporary indent)
+  found by naddy@ in xloadimage(1)
+  found by bentley@ in nmh(1)  Mon, 23 Apr 2012 13:38:28 -0600
+
+- .while and .shift 
+  found by jca@ in ratpoison(1)  Sun, 30 Jun 2013 12:01:09 +0200
+
+- \c (interrupted text) should prevent the line break
+  even inside .Bd literal; that occurs in chat(8)
+  also found in cclive(1) - DocBook output
+
+- \h horizontal move
+  found in cclive(1) DocBook output
+  Anthony J. Bentley on discuss@  Sat, 21 Sep 2013 22:29:34 -0600
+
+- \n+ and \n- numerical register increment and decrement
+  found by bentley@ in sbcl(1)  Mon, 9 Dec 2013 18:36:57 -0700
+
+- using undefined strings or macros defines them to be empty
+  wl@  Mon, 14 Nov 2011 14:37:01 +0000
+
+--- missing mdoc features ----------------------------------------------
+
+- fix bad block nesting involving multiple identical explicit blocks
+  see the OpenBSD mdoc_macro.c 1.47 commit message
+
+- .Bl -column .Xo support is missing
+  ultimate goal:
+  restore .Xr and .Dv to
+  lib/libc/compat-43/sigvec.3
+  lib/libc/gen/signal.3
+  lib/libc/sys/sigaction.2
+
+- edge case: decide how to deal with blk_full bad nesting, e.g.
+  .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1)
+  from jmc@  Wed, 14 Jul 2010 18:10:32 +0100
+
+- \\ is now implemented correctly
+  * when defining strings and macros using .ds and .de
+  * when parsing roff(7) and man(7) macro arguments
+  It does not yet work in mdoc(7) macro arguments
+  because libmdoc does not yet use mandoc_getarg().
+  Also check what happens in plain text, it must be identical to \e.
+
+- .Bd -filled should not be the same as .Bd -ragged, but align both
+  the left and right margin.  In groff, it is implemented in terms
+  of .ad b, which we don't have either.  Found in cksum(1).
+
+- implement blank `Bl -column', such as
+  .Bl -column
+  .It foo Ta bar
+  .El
+
+- explicitly disallow nested `Bl -column', which would clobber internal
+  flags defined for struct mdoc_macro
+
+- In .Bl -column .It, the end of the line probably has to be regarded
+  as an implicit .Ta, if there could be one, see the following mildly
+  ugly code from login.conf(5):
+    .Bl -column minpasswordlen program xetcxmotd
+    .It path Ta path Ta value of Dv _PATH_DEFPATH
+    .br
+    Default search path.
+  reported by Michal Mazurek <akfaew at jasminek dot net>
+  via jmc@ Thu, 7 Apr 2011 16:00:53 +0059
+
+- inside `.Bl -column' phrases, punctuation is handled like normal
+  text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -."
+
+- inside `.Bl -column' phrases, TERMP_IGNDELIM handling by `Pf'
+  is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab."
+  but should give "ab ."
+
+- set a meaningful default if no `Bl' list type is assigned
+
+- have a blank `It' head for `Bl -tag' not puke
+
+- prohibit `Nm' from having non-text HEAD children
+  (e.g., NetBSD mDNSShared/dns-sd.1)
+  (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
+
+- When there is free text in the SYNOPSIS and that free text contains
+  the .Nm macro, groff somehow understands to treat the .Nm as an in-line
+  macro, while mandoc treats it as a block macro and breaks the line.
+  No idea how the logic for distinguishing in-line and block instances
+  should be, needs investigation.
+  uqs@  Thu, 2 Jun 2011 11:03:51 +0200
+  uqs@  Thu, 2 Jun 2011 11:33:35 +0200
+
+--- missing man features -----------------------------------------------
+
+- groff an-ext.tmac macros (.UR, .UE) occur in xine(5)
+  reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
+  also occur in freeciv-client(6) freeciv-server(6) freeciv-modpack(6)
+  reported by bentley@  Tue, 30 Oct 2012 01:05:57 -0600
+
+- -T[x]html doesn't stipulate non-collapsing spaces in literal mode
+
+--- missing tbl features -----------------------------------------------
+
+- implement basic non-parametric .de to support e.g. sox(1)
+  reported by naddy@ Sat, 16 Oct 2010 23:51:57 +0200
+  *** sox(1) still doesn't work, tbl(1) errors need investigation
+
+- allow standalone `.' to be interpreted as an end-of-layout
+  delimiter instead of being thrown away as a no-op roff line
+  reported by Yuri Pankov, Wed 18 May 2011 11:34:59 CEST
+
+--- missing misc features ----------------------------------------------
+
+- italic correction (\/) in PostScript mode
+  Werner LEMBERG on groff at gnu dot org  Sun, 10 Nov 2013 12:47:46
+
+- The whatis(1) utility looks for whole words in Nm.
+  If the file name of a page does not agree with the contents of any
+  of its Nm macros (e.g. pool(9)), add the file name as an Nm entry
+  to the mandoc.db as well, such that whatis(1) finds it.
+  If there is a page with a file name that does not appear as a substring
+  neither in Nm nor in Nd, the same fix would allow finding that page
+  with apropos(1) using the file name as a key, as well.
+  Issue reported by tedu@  Fri, 05 Jul 2013 21:15:23 -0400
+
+- clean up escape sequence handling, creating three classes:
+  (1) fully implemented, or parsed and ignored without loss of content
+  (2) unimplemented, potentially causing loss of content
+      or serious mangling of formatting (e.g. \n) -> ERROR
+      see textproc/mgdiff(1) for nice examples
+  (3) undefined, just output the character -> perhaps WARNING
+
+- look at pages generated from reStructeredText, e.g. devel/mercurial hg(1)
+  These are a weird mixture of man(7) and custom autogenerated low-level
+  roff stuff.  Figure out to what extent we can cope.
+  For details, see http://docutils.sourceforge.net/rst.html
+  noted by stsp@  Sat, 24 Apr 2010 09:17:55 +0200
+  reminded by nicm@  Mon, 3 May 2010 09:52:41 +0100
+
+- look at pages generated from Texinfo source by yat2m, e.g. security/gnupg
+  First impression is not that bad.
+
+- check compatibility with Plan9:
+  http://swtch.com/usr/local/plan9/tmac/tmac.an
+  http://swtch.com/plan9port/man/man7/man.html
+  "Anthony J. Bentley" <anthonyjbentley at gmail.com> 28 Dec 2010 21:58:40 -0700
+
+************************************************************************
+* formatting issues: ugly output
+************************************************************************
+
+- a column list with blank `Ta' cells triggers a spurrious
+  start-with-whitespace printing of a newline
+
+- In .Bl -column,
+  .It Em Authentication<tab>Key Length
+  ought to render "Key Length" with emphasis, too,
+  see OpenBSD iked.conf(5).
+  reported again Nicolas Joly via wiz@ Wed, 12 Oct 2011 00:20:00 +0200
+
+- empty phrases in .Bl column produce too few blanks
+  try e.g. .Bl -column It Ta Ta
+  reported by millert Fri, 02 Apr 2010 16:13:46 -0400
+
+- .%T can have trailing punctuation.  Currently, it puts the trailing
+  punctuation into a trailing MDOC_TEXT element inside its own scope.
+  That element should rather be outside its scope, such that the
+  punctuation does not get underlines.  This is not trivial to
+  implement because .%T then needs some features of in_line_eoln() -
+  slurp all arguments into one single text element - and one feature
+  of in_line() - put trailing punctuation out of scope.
+  Found in mount_nfs(8) and exports(5), search for "Appendix".
+
+- Trailing punctuation after .%T triggers EOS spacing, at least
+  outside .Rs (eek!).  Simply setting ARGSFL_DELIM for .%T is not
+  the right solution, it sends mandoc into an endless loop.
+  reported by Nicolas Joly  Sat, 17 Nov 2012 11:49:54 +0100
+
+- in enclosures, mandoc sometimes fancies a bogus end of sentence
+  reminded by jmc@  Thu, 23 Sep 2010 18:13:39 +0059
+
+- formatting /usr/local/man/man1/latex2man.1 with groff and mandoc
+  reveals lots of bugs both in groff and mandoc...
+  reported by bentley@  Wed, 22 May 2013 23:49:30 -0600
+
+************************************************************************
+* formatting issues: gratuitous differences
+************************************************************************
+
+- .Rv (and probably .Ex) print different text if an `Nm' has been named
+  or not (run a manual without `Nm blah' to see this).  I'm not sure
+  that this exists in the wild, but it's still an error.
+
+- In .Bl -bullet, the groff bullet is "+\b+\bo\bo", the mandoc bullet
+  is just "o\bo".
+  see for example OpenBSD ksh(1)
+
+- .Pp between two .It in .Bl -column should produce one,
+  not two blank lines, see e.g. login.conf(5).
+  reported by jmc@  Sun, 17 Apr 2011 14:04:58 +0059
+  reported again by sthen@  Wed, 18 Jan 2012 02:09:39 +0000 (UTC)
+
+- If the *first* line after .It is .Pp, break the line right after
+  the tag, do not pad with space characters before breaking.
+  See the description of the a, c, and i commands in sed(1).
+
+- If the first line after .It is .D1, do not assert a blank line
+  in between, see for example tmux(1).
+  reported by nicm@  13 Jan 2011 00:18:57 +0000
+
+- Trailing punctuation after .It should trigger EOS spacing.
+  reported by Nicolas Joly  Sat, 17 Nov 2012 11:49:54 +0100
+  Probably, this should be fixed somewhere in termp_it_pre(), not sure.
+
+- .Nx 1.0a
+  should be "NetBSD 1.0A", not "NetBSD 1.0a",
+  see OpenBSD ccdconfig(8).
+
+- In .Bl -tag, if a tag exceeds the right margin and must be continued
+  on the next line, it must be indented by -width, not width+1;
+  see "rule block|pass" in OpenBSD ifconfig(8).
+
+- When the -width string contains macros, the macros must be rendered
+  before measuring the width, for example
+    .Bl -tag -width ".Dv message"
+  in magic(5), located in src/usr.bin/file, is the same
+  as -width 7n, not -width 11n.
+  The same applies to .Bl -column column widths;
+  reported again by Nicolas Joly Thu, 1 Mar 2012 13:41:26 +0100 via wiz@ 5 Mar
+  reported again by Franco Fichtner Fri, 27 Sep 2013 21:02:28 +0200
+  An easy partial fix would be to just skip the first word if it starts
+  with a dot, including any following white space, when measuring.
+
+- The \& zero-width character counts as output.
+  That is, when it is alone on a line between two .Pp,
+  we want three blank lines, not two as in mandoc.
+
+- Header lines of excessive length:
+  Port OpenBSD man_term.c rev. 1.25 to mdoc_term.c
+  and document it in mdoc(7) and man(7) COMPATIBILITY
+  found while talking to Chris Bennett
+
+- trailing whitespace must be ignored even when followed by a font escape,
+  see for example 
+    makes
+    \fBdig \fR
+    operate in batch mode
+  in dig(1).
+
+************************************************************************
+* performance issues
+************************************************************************
+
+Several areas can be cleaned up to make mandoc even faster.  These are 
+
+- improve hashing mechanism for macros (quite important: performance)
+
+- improve hashing mechanism for characters (not as important)
+
+- the PDF file is HUGE: this can be reduced by using relative offsets
+
+- instead of re-initialising the roff predefined-strings set before each
+  parse, create a read-only version the first time and copy it 
+
+************************************************************************
+* structural issues
+************************************************************************
+
+- We use the input line number at several places to distinguish
+  same-line from different-line input.  That plainly doesn't work
+  with user-defined macros, leading to random breakage.
+
+- Find better ways to prevent endless loops
+  in roff(7) macro and string expansion.
+ 
+- Finish cleanup of date handling.
+  Decide which formats should be recognized where.
+  Update both mdoc(7) and man(7) documentation.
+  Triggered by  Tim van der Molen  Tue, 22 Feb 2011 20:30:45 +0100

Modified: head/contrib/mdocml/arch.in
==============================================================================
--- head/contrib/mdocml/arch.in	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/arch.in	Sat Feb  1 09:27:57 2014	(r261344)
@@ -1,4 +1,4 @@
-/*	$Id: arch.in,v 1.12 2012/01/28 14:02:17 joerg Exp $ */
+/*	$Id: arch.in,v 1.14 2013/09/16 22:12:57 schwarze Exp $ */
 /*
  * Copyright (c) 2009 Kristaps Dzonsons <kristaps at bsd.lv>
  *
@@ -38,9 +38,9 @@ LINE("arm",		"ARM")
 LINE("arm26",		"ARM26")
 LINE("arm32",		"ARM32")
 LINE("armish",		"ARMISH")
+LINE("armv7",		"ARMv7")
 LINE("aviion",		"AViiON")
 LINE("atari",		"ATARI")
-LINE("beagle",		"Beagle")
 LINE("bebox",		"BeBox")
 LINE("cats",		"cats")
 LINE("cesfic",		"CESFIC")
@@ -81,6 +81,7 @@ LINE("netwinder",	"NetWinder")
 LINE("news68k",		"NeWS68k")
 LINE("newsmips",	"NeWSMIPS")
 LINE("next68k",		"NeXT68k")
+LINE("octeon",		"OCTEON")
 LINE("ofppc",		"OFPPC")
 LINE("palm",		"Palm")
 LINE("pc532",		"PC532")

Modified: head/contrib/mdocml/chars.c
==============================================================================
--- head/contrib/mdocml/chars.c	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/chars.c	Sat Feb  1 09:27:57 2014	(r261344)
@@ -1,4 +1,4 @@
-/*	$Id: chars.c,v 1.52 2011/11/08 00:15:23 kristaps Exp $ */
+/*	$Id: chars.c,v 1.54 2013/06/20 22:39:30 schwarze Exp $ */
 /*
  * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps at bsd.lv>
  * Copyright (c) 2011 Ingo Schwarze <schwarze at openbsd.org>
@@ -37,7 +37,7 @@ struct	ln {
 	int		  unicode;
 };
 
-#define	LINES_MAX	  328
+#define	LINES_MAX	  329
 
 #define CHAR(in, ch, code) \
 	{ NULL, (in), (ch), (code) },
@@ -77,7 +77,7 @@ mchars_alloc(void)
 	 */
 
 	tab = mandoc_malloc(sizeof(struct mchars));
-	htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
+	htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln *));
 
 	for (i = 0; i < LINES_MAX; i++) {
 		hash = (int)lines[i].code[0] - PRINT_LO;

Modified: head/contrib/mdocml/chars.in
==============================================================================
--- head/contrib/mdocml/chars.in	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/chars.in	Sat Feb  1 09:27:57 2014	(r261344)
@@ -1,4 +1,4 @@
-/*	$Id: chars.in,v 1.42 2011/10/02 10:02:26 kristaps Exp $ */
+/*	$Id: chars.in,v 1.43 2013/06/20 22:39:30 schwarze Exp $ */
 /*
  * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps at bsd.lv>
  *
@@ -42,6 +42,7 @@ CHAR("&",			"",		0)
 CHAR("^",			"",		0)
 CHAR("|",			"",		0)
 CHAR("}",			"",		0)
+CHAR("t",			"",		0)
 
 /* Accents. */
 CHAR("a\"",			"\"",		779)

Modified: head/contrib/mdocml/config.h
==============================================================================
--- head/contrib/mdocml/config.h	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/config.h	Sat Feb  1 09:27:57 2014	(r261344)
@@ -7,6 +7,7 @@
 
 #include <stdio.h>
 
+#define VERSION "1.12.3"
 #define HAVE_FGETLN
 #define HAVE_STRPTIME
 #define HAVE_GETSUBOPT
@@ -31,14 +32,16 @@
 #  endif
 #endif
 
-#if defined(__APPLE__)
-# define htobe32(x) OSSwapHostToBigInt32(x)
-# define betoh32(x) OSSwapBigToHostInt32(x)
-# define htobe64(x) OSSwapHostToBigInt64(x)
-# define betoh64(x) OSSwapBigToHostInt64(x)
-#elif defined(__linux__)
-# define betoh32(x) be32toh(x)
-# define betoh64(x) be64toh(x)
+#ifndef HAVE_BETOH64
+#  if defined(__APPLE__)
+#    define betoh64(x) OSSwapBigToHostInt64(x)
+#    define htobe64(x) OSSwapHostToBigInt64(x)
+#  elif defined(__sun)
+#    define betoh64(x) BE_64(x)
+#    define htobe64(x) BE_64(x)
+#  else
+#    define betoh64(x) be64toh(x)
+#  endif
 #endif
 
 #ifndef HAVE_STRLCAT

Modified: head/contrib/mdocml/eqn.7
==============================================================================
--- head/contrib/mdocml/eqn.7	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/eqn.7	Sat Feb  1 09:27:57 2014	(r261344)
@@ -1,4 +1,4 @@
-.\"	$Id: eqn.7,v 1.28 2011/09/25 18:37:09 schwarze Exp $
+.\"	$Id: eqn.7,v 1.29 2013/07/13 19:41:16 schwarze Exp $
 .\"
 .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps at bsd.lv>
 .\"
@@ -14,7 +14,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: September 25 2011 $
+.Dd $Mdocdate: July 13 2013 $
 .Dt EQN 7
 .Os
 .Sh NAME
@@ -276,5 +276,4 @@ was added in 2011.
 This
 .Nm
 reference was written by
-.An Kristaps Dzonsons ,
-.Mt kristaps at bsd.lv .
+.An Kristaps Dzonsons Aq Mt kristaps at bsd.lv .

Modified: head/contrib/mdocml/html.c
==============================================================================
--- head/contrib/mdocml/html.c	Sat Feb  1 06:58:16 2014	(r261343)
+++ head/contrib/mdocml/html.c	Sat Feb  1 09:27:57 2014	(r261344)
@@ -1,7 +1,7 @@
-/*	$Id: html.c,v 1.150 2011/10/05 21:35:17 kristaps Exp $ */
+/*	$Id: html.c,v 1.152 2013/08/08 20:07:47 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps at bsd.lv>
- * Copyright (c) 2011 Ingo Schwarze <schwarze at openbsd.org>
+ * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze at openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -235,6 +235,9 @@ print_metaf(struct html *h, enum mandoc_
 	case (ESCAPE_FONTBOLD):
 		font = HTMLFONT_BOLD;
 		break;
+	case (ESCAPE_FONTBI):
+		font = HTMLFONT_BI;
+		break;
 	case (ESCAPE_FONT):
 		/* FALLTHROUGH */
 	case (ESCAPE_FONTROMAN):
@@ -253,17 +256,27 @@ print_metaf(struct html *h, enum mandoc_
 	h->metal = h->metac;
 	h->metac = font;
 
-	if (HTMLFONT_NONE != font)
-		h->metaf = HTMLFONT_BOLD == font ?
-			print_otag(h, TAG_B, 0, NULL) :
-			print_otag(h, TAG_I, 0, NULL);
+	switch (font) {
+	case (HTMLFONT_ITALIC):
+		h->metaf = print_otag(h, TAG_I, 0, NULL);
+		break;
+	case (HTMLFONT_BOLD):
+		h->metaf = print_otag(h, TAG_B, 0, NULL);
+		break;
+	case (HTMLFONT_BI):
+		h->metaf = print_otag(h, TAG_B, 0, NULL);
+		print_otag(h, TAG_I, 0, NULL);
+		break;
+	default:
+		break;
+	}
 }
 
 int
 html_strlen(const char *cp)
 {
-	int		 ssz, sz;
-	const char	*seq, *p;
+	size_t		 rsz;
+	int		 skip, sz;
 
 	/*
 	 * Account for escaped sequences within string length
@@ -274,10 +287,21 @@ html_strlen(const char *cp)
 	 */
 
 	sz = 0;
-	while (NULL != (p = strchr(cp, '\\'))) {
-		sz += (int)(p - cp);
-		++cp;
-		switch (mandoc_escape(&cp, &seq, &ssz)) {
+	skip = 0;
+	while (1) {
+		rsz = strcspn(cp, "\\");
+		if (rsz) {
+			cp += rsz;
+			if (skip) {
+				skip = 0;
+				rsz--;
+			}
+			sz += rsz;
+		}
+		if ('\0' == *cp)
+			break;
+		cp++;
+		switch (mandoc_escape(&cp, NULL, NULL)) {
 		case (ESCAPE_ERROR):
 			return(sz);
 		case (ESCAPE_UNICODE):
@@ -285,15 +309,19 @@ html_strlen(const char *cp)
 		case (ESCAPE_NUMBERED):
 			/* FALLTHROUGH */
 		case (ESCAPE_SPECIAL):
-			sz++;
+			if (skip)
+				skip = 0;
+			else
+				sz++;
+			break;
+		case (ESCAPE_SKIPCHAR):
+			skip = 1;
 			break;
 		default:
 			break;
 		}
 	}
-
-	assert(sz >= 0);
-	return(sz + strlen(cp));
+	return(sz);
 }
 
 static int
@@ -308,6 +336,12 @@ print_encode(struct html *h, const char 
 	nospace = 0;
 
 	while ('\0' != *p) {
+		if (HTML_SKIPCHAR & h->flags && '\\' != *p) {
+			h->flags &= ~HTML_SKIPCHAR;
+			p++;
+			continue;
+		}
+
 		sz = strcspn(p, rejs);
 
 		fwrite(p, 1, sz, stdout);
@@ -338,6 +372,33 @@ print_encode(struct html *h, const char 
 			break;
 
 		switch (esc) {
+		case (ESCAPE_FONT):
+			/* FALLTHROUGH */
+		case (ESCAPE_FONTPREV):
+			/* FALLTHROUGH */
+		case (ESCAPE_FONTBOLD):
+			/* FALLTHROUGH */
+		case (ESCAPE_FONTITALIC):
+			/* FALLTHROUGH */
+		case (ESCAPE_FONTBI):
+			/* FALLTHROUGH */
+		case (ESCAPE_FONTROMAN):
+			if (0 == norecurse)
+				print_metaf(h, esc);
+			continue;
+		case (ESCAPE_SKIPCHAR):
+			h->flags |= HTML_SKIPCHAR;
+			continue;
+		default:
+			break;
+		}
+
+		if (h->flags & HTML_SKIPCHAR) {
+			h->flags &= ~HTML_SKIPCHAR;
+			continue;
+		}
+
+		switch (esc) {
 		case (ESCAPE_UNICODE):
 			/* Skip passed "u" header. */
 			c = mchars_num2uc(seq + 1, len - 1);
@@ -356,19 +417,6 @@ print_encode(struct html *h, const char 
 			else if (-1 == c && 1 == len)
 				putchar((int)*seq);
 			break;
-		case (ESCAPE_FONT):
-			/* FALLTHROUGH */
-		case (ESCAPE_FONTPREV):
-			/* FALLTHROUGH */
-		case (ESCAPE_FONTBOLD):
-			/* FALLTHROUGH */
-		case (ESCAPE_FONTITALIC):
-			/* FALLTHROUGH */
-		case (ESCAPE_FONTROMAN):

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list