svn commit: r313958 - head/contrib/mdocml

Baptiste Daroussin bapt at FreeBSD.org
Sun Feb 19 17:46:39 UTC 2017


Author: bapt
Date: Sun Feb 19 17:46:37 2017
New Revision: 313958
URL: https://svnweb.freebsd.org/changeset/base/313958

Log:
  Import mandoc 1.4.1rc2

Added:
  head/contrib/mdocml/catman.8
     - copied unchanged from r313957, vendor/mdocml/dist/catman.8
  head/contrib/mdocml/catman.c
     - copied unchanged from r313957, vendor/mdocml/dist/catman.c
  head/contrib/mdocml/man.options.1
     - copied unchanged from r313957, vendor/mdocml/dist/man.options.1
  head/contrib/mdocml/mandocd.8
     - copied unchanged from r313957, vendor/mdocml/dist/mandocd.8
  head/contrib/mdocml/mandocd.c
     - copied unchanged from r313957, vendor/mdocml/dist/mandocd.c
  head/contrib/mdocml/test-O_DIRECTORY.c
     - copied unchanged from r313957, vendor/mdocml/dist/test-O_DIRECTORY.c
  head/contrib/mdocml/test-cmsg.c
     - copied unchanged from r313957, vendor/mdocml/dist/test-cmsg.c
  head/contrib/mdocml/test-recvmsg.c
     - copied unchanged from r313957, vendor/mdocml/dist/test-recvmsg.c
Modified:
  head/contrib/mdocml/INSTALL
  head/contrib/mdocml/LICENSE
  head/contrib/mdocml/Makefile
  head/contrib/mdocml/Makefile.depend
  head/contrib/mdocml/NEWS
  head/contrib/mdocml/TODO
  head/contrib/mdocml/apropos.1
  head/contrib/mdocml/cgi.c
  head/contrib/mdocml/chars.c
  head/contrib/mdocml/compat_fts.c
  head/contrib/mdocml/configure
  head/contrib/mdocml/configure.local.example
  head/contrib/mdocml/dba.c
  head/contrib/mdocml/dbm_map.c
  head/contrib/mdocml/eqn_term.c
  head/contrib/mdocml/gmdiff
  head/contrib/mdocml/html.c
  head/contrib/mdocml/html.h
  head/contrib/mdocml/libmandoc.h
  head/contrib/mdocml/libmdoc.h
  head/contrib/mdocml/main.c
  head/contrib/mdocml/man.1
  head/contrib/mdocml/man_html.c
  head/contrib/mdocml/man_term.c
  head/contrib/mdocml/manconf.h
  head/contrib/mdocml/mandoc.1
  head/contrib/mdocml/mandoc.css
  head/contrib/mdocml/mandoc.h
  head/contrib/mdocml/mandoc_aux.h
  head/contrib/mdocml/mandoc_char.7
  head/contrib/mdocml/mandoc_html.3
  head/contrib/mdocml/mandocdb.c
  head/contrib/mdocml/manpath.c
  head/contrib/mdocml/mdoc.7
  head/contrib/mdocml/mdoc.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/preconv.c
  head/contrib/mdocml/read.c
  head/contrib/mdocml/roff.c
  head/contrib/mdocml/roff.h
  head/contrib/mdocml/tag.c
  head/contrib/mdocml/tbl_html.c
  head/contrib/mdocml/term_ps.c
  head/contrib/mdocml/tree.c
Directory Properties:
  head/contrib/mdocml/   (props changed)

Modified: head/contrib/mdocml/INSTALL
==============================================================================
--- head/contrib/mdocml/INSTALL	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/INSTALL	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,4 +1,4 @@
-$Id: INSTALL,v 1.17 2016/07/19 22:40:33 schwarze Exp $
+$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $
 
 About mdocml, the portable mandoc distribution
 ----------------------------------------------
@@ -16,7 +16,7 @@ tech@ mailing list, too.
 
 Enjoy using the mandoc toolset!
 
-Ingo Schwarze, Karlsruhe, July 2016
+Ingo Schwarze, Karlsruhe, February 2017
 
 
 Installation
@@ -31,15 +31,21 @@ Regarding how packages and ports are mai
 system, please consult your operating system documentation.
 To install mandoc manually, the following steps are needed:
 
-1. If you want to build the CGI program, man.cgi(8), too, run the
-command "echo BUILD_CGI=1 > configure.local".  Then run "cp
-cgi.h.examples cgi.h" and edit cgi.h as desired.
+1. If you want to build the CGI program, man.cgi(8), too,
+run the command "echo BUILD_CGI=1 >> configure.local".
+Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired.
+
+2. If you also want to build the new catman(8) utility, run the
+command "echo BUILD_CATMAN=1 >> configure.local".  Note that it
+is unlikely to be a drop-in replacement providing the same
+functionality as your system's "catman", if your operating
+system contains one.
 
-2. Define MANPATH_DEFAULT in configure.local
+3. Define MANPATH_DEFAULT in configure.local
 if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate
 for your operating system.
 
-3. Run "./configure".
+4. Run "./configure".
 This script attempts autoconfiguration of mandoc for your system.
 Read both its standard output and the file "Makefile.local" it
 generates.  If anything looks wrong or different from what you
@@ -49,27 +55,31 @@ result seems right to you.
 On Solaris 10 and earlier, you may have to run "ksh ./configure"
 because the native /bin/sh lacks some POSIX features.
 
-4. Run "make".
+5. Run "make".
 Any POSIX-compatible make, in particular both BSD make and GNU make,
 should work.  If the build fails, look at "configure.local.example"
 and go back to step 2.
 
-5. Run "make -n install" and check whether everything will be
+6. Run "make -n install" and check whether everything will be
 installed to the intended places.  Otherwise, put some *DIR or *NM*
-variables into "configure.local" and go back to step 3.
+variables into "configure.local" and go back to step 4.
 
-6. Run "sudo make install".  If you intend to build a binary
+7. Optionally run the regression suite.
+Basically, that amounts to "cd regress && ./regress.pl".
+But you should probably look at "./mandoc -l regress/regress.pl.1"
+first.
+
+8. Run "sudo make install".  If you intend to build a binary
 package using some kind of fake root mechanism, you may need a
 command like "make DESTDIR=... install".  Read the *-install targets
 in the "Makefile" to understand how DESTDIR is used.
 
-7. Run the command "sudo
-makewhatis" to build mandoc.db(5) databases in all the directory
-trees configured in step 6.  Whenever installing new manual pages,
-re-run makewhatis(8) to update the databases, or apropos(1) will
-not find the new pages.
+9. Run the command "sudo makewhatis" to build mandoc.db(5) databases
+in all the directory trees configured in step 6.  Whenever installing
+new manual pages, re-run makewhatis(8) to update the databases, or
+apropos(1) will not find the new pages.
 
-8. To set up a man.cgi(8) server, read its manual page.
+10. To set up a man.cgi(8) server, read its manual page.
 
 Note that some man(7) pages may contain low-level roff(7) markup
 that mandoc does not yet understand.  On some BSD systems using
@@ -87,9 +97,10 @@ The following libraries are required:
 
 2. The fts(3) directory traversion functions.
 If your system does not have them, the bundled compatibility version
-will be used, so you need not worry in that case.  But be careful: the
-glibc version of fts(3) is known to be broken on 32bit platforms,
-see <https://sourceware.org/bugzilla/show_bug.cgi?id=15838>.
+will be used, so you need not worry in that case.  But be careful: old
+glibc versions of fts(3) were known to be broken on 32bit platforms,
+see <https://sourceware.org/bugzilla/show_bug.cgi?id=11460>.
+That was presumably fixed in glibc-2.23.
 If you run into that problem, set "HAVE_FTS=0" in configure.local.
 
 3. Marc Espie's ohash(3) library.

Modified: head/contrib/mdocml/LICENSE
==============================================================================
--- head/contrib/mdocml/LICENSE	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/LICENSE	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,4 +1,4 @@
-$Id: LICENSE,v 1.13 2016/10/18 14:15:33 schwarze Exp $
+$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $
 
 With the exceptions noted below, all code and documentation
 contained in the mdocml toolkit is protected by the Copyright
@@ -10,6 +10,7 @@ Copyright (c) 2009, 2010, 2011, 2012 Joe
 Copyright (c) 2013 Franco Fichtner <franco at lastsummer.de>
 Copyright (c) 2014 Baptiste Daroussin <bapt at freebsd.org>
 Copyright (c) 2016 Ed Maste <emaste at freebsd.org>
+Copyright (c) 2017 Michael Stapelberg <stapelberg at debian.org>
 Copyright (c) 1999, 2004 Marc Espie <espie at openbsd.org>
 Copyright (c) 1998, 2004, 2010 Todd C. Miller <Todd.Miller at courtesan.com>
 Copyright (c) 2008 Otto Moerbeek <otto at drijf.net>

Modified: head/contrib/mdocml/Makefile
==============================================================================
--- head/contrib/mdocml/Makefile	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/Makefile	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,7 +1,7 @@
-# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $
+# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $
 #
 # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps at bsd.lv>
-# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze at openbsd.org>
+# Copyright (c) 2011, 2013-2017 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
@@ -15,11 +15,12 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-VERSION = 1.14.0
+VERSION = 1.14.1
 
 # === LIST OF FILES ====================================================
 
 TESTSRCS	 = test-be32toh.c \
+		   test-cmsg.c \
 		   test-dirent-namlen.c \
 		   test-EFTYPE.c \
 		   test-err.c \
@@ -30,10 +31,12 @@ TESTSRCS	 = test-be32toh.c \
 		   test-mkdtemp.c \
 		   test-nanosleep.c \
 		   test-ntohl.c \
+		   test-O_DIRECTORY.c \
 		   test-ohash.c \
 		   test-PATH_MAX.c \
 		   test-pledge.c \
 		   test-progname.c \
+		   test-recvmsg.c \
 		   test-reallocarray.c \
 		   test-rewb-bsd.c \
 		   test-rewb-sysv.c \
@@ -49,6 +52,7 @@ TESTSRCS	 = test-be32toh.c \
 		   test-wchar.c
 
 SRCS		 = att.c \
+		   catman.c \
 		   cgi.c \
 		   chars.c \
 		   compat_err.c \
@@ -89,6 +93,7 @@ SRCS		 = att.c \
 		   mandoc.c \
 		   mandoc_aux.c \
 		   mandoc_ohash.c \
+		   mandocd.c \
 		   mandocdb.c \
 		   manpage.c \
 		   manpath.c \
@@ -128,6 +133,7 @@ DISTFILES	 = INSTALL \
 		   NEWS \
 		   TODO \
 		   apropos.1 \
+		   catman.8 \
 		   cgi.h.example \
 		   compat_fts.h \
 		   compat_ohash.h \
@@ -156,6 +162,7 @@ DISTFILES	 = INSTALL \
 		   man.cgi.8 \
 		   man.conf.5 \
 		   man.h \
+		   man.options.1 \
 		   manconf.h \
 		   mandoc.1 \
 		   mandoc.3 \
@@ -169,6 +176,7 @@ DISTFILES	 = INSTALL \
 		   mandoc_html.3 \
 		   mandoc_malloc.3 \
 		   mandoc_ohash.h \
+		   mandocd.8 \
 		   mansearch.3 \
 		   mansearch.h \
 		   mchars_alloc.3 \
@@ -280,6 +288,12 @@ CGI_OBJS	 = $(MANDOC_HTML_OBJS) \
 		   cgi.o \
 		   out.o
 
+MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
+		   $(MANDOC_TERM_OBJS) \
+		   mandocd.o \
+		   out.o \
+		   tag.o
+
 MANPAGE_OBJS	 = $(DBM_OBJS) \
 		   manpage.o \
 		   manpath.o
@@ -298,6 +312,7 @@ WWW_MANS	 = apropos.1.html \
 		   man.1.html \
 		   mandoc.1.html \
 		   soelim.1.html \
+		   man.cgi.3.html \
 		   mandoc.3.html \
 		   mandoc_escape.3.html \
 		   mandoc_headers.3.html \
@@ -311,11 +326,12 @@ WWW_MANS	 = apropos.1.html \
 		   eqn.7.html \
 		   man.7.html \
 		   mandoc_char.7.html \
+		   mandocd.8.html \
 		   mdoc.7.html \
 		   roff.7.html \
 		   tbl.7.html \
+		   catman.8.html \
 		   makewhatis.8.html \
-		   man.cgi.3.html \
 		   man.cgi.8.html \
 		   man.h.html \
 		   manconf.h.html \
@@ -334,11 +350,7 @@ include Makefile.local
 
 # === DEPENDENCY HANDLING ==============================================
 
-all: base-build $(BUILD_TARGETS) Makefile.local
-
-base-build: mandoc demandoc soelim
-
-cgi-build: man.cgi
+all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local
 
 install: base-install $(INSTALL_TARGETS)
 
@@ -360,13 +372,14 @@ clean:
 	rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
 	rm -f mandoc $(MAIN_OBJS)
 	rm -f man.cgi $(CGI_OBJS)
+	rm -f mandocd catman $(MANDOCD_OBJS)
 	rm -f manpage $(MANPAGE_OBJS)
 	rm -f demandoc $(DEMANDOC_OBJS)
 	rm -f soelim $(SOELIM_OBJS)
 	rm -f $(WWW_MANS) $(WWW_OBJS)
 	rm -rf *.dSYM
 
-base-install: base-build
+base-install: mandoc demandoc soelim
 	mkdir -p $(DESTDIR)$(BINDIR)
 	mkdir -p $(DESTDIR)$(SBINDIR)
 	mkdir -p $(DESTDIR)$(MANDIR)/man1
@@ -375,29 +388,29 @@ base-install: base-build
 	mkdir -p $(DESTDIR)$(MANDIR)/man8
 	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
 	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
-	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
-	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
-	ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
-	ln -f $(DESTDIR)$(BINDIR)/mandoc \
+	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
+	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
+	$(LN) $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
+	$(LN) $(DESTDIR)$(BINDIR)/mandoc \
 		$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
 	$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
 	$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
 	$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
 	$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
-	ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
+	$(LN) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
 		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
-	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
+	$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
 	$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
-	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
-	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
-	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
-	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
-	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
+	$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
+	$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
+	$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
+	$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
+	$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
 	$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
 	$(INSTALL_MAN) makewhatis.8 \
 		$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
 
-lib-install: base-build
+lib-install: libmandoc.a
 	mkdir -p $(DESTDIR)$(LIBDIR)
 	mkdir -p $(DESTDIR)$(INCLUDEDIR)
 	mkdir -p $(DESTDIR)$(MANDIR)/man3
@@ -407,13 +420,70 @@ lib-install: base-build
 	$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
 		mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
 
-cgi-install: cgi-build
+cgi-install: man.cgi
 	mkdir -p $(DESTDIR)$(CGIBINDIR)
 	mkdir -p $(DESTDIR)$(HTDOCDIR)
 	$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR)
 	$(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR)
 
-Makefile.local config.h: configure ${TESTSRCS}
+catman-install: mandocd catman
+	mkdir -p $(DESTDIR)$(SBINDIR)
+	mkdir -p $(DESTDIR)$(MANDIR)/man8
+	$(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR)
+	$(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
+	$(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8
+	$(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
+
+uninstall:
+	rm -f $(DESTDIR)$(BINDIR)/mandoc
+	rm -f $(DESTDIR)$(BINDIR)/demandoc
+	rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
+	rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN)
+	rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
+	rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
+	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
+	rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1
+	rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1
+	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
+	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
+	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
+	rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
+	rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5
+	rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5
+	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7
+	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7
+	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7
+	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7
+	rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7
+	rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7
+	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
+	rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi
+	rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css
+	rm -f $(DESTDIR)$(SBINDIR)/mandocd
+	rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN)
+	rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8
+	rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8
+	rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a
+	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3
+	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3
+	rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3
+	rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3
+	rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3
+	rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3
+	rm -f $(DESTDIR)$(INCLUDEDIR)/man.h
+	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h
+	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
+	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
+	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
+	rmdir $(DESTDIR)$(INCLUDEDIR)
+
+regress: all
+	cd regress && ./regress.pl
+
+regress-clean:
+	cd regress && ./regress.pl . clean
+
+Makefile.local config.h: configure $(TESTSRCS)
 	@echo "$@ is out of date; please run ./configure"
 	@exit 1
 
@@ -429,6 +499,12 @@ manpage: $(MANPAGE_OBJS) libmandoc.a
 man.cgi: $(CGI_OBJS) libmandoc.a
 	$(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)
 
+mandocd: $(MANDOCD_OBJS) libmandoc.a
+	$(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD)
+
+catman: catman.o libmandoc.a
+	$(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD)
+
 demandoc: $(DEMANDOC_OBJS) libmandoc.a
 	$(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD)
 
@@ -453,14 +529,40 @@ depend: config.h
 		Makefile.depend > Makefile.tmp
 	mv Makefile.tmp Makefile.depend
 
+regress-distclean:
+	@find regress \
+		-name '.#*' -o \
+		-name '*.orig' -o \
+		-name '*.rej' -o \
+		-name '*.core' \
+		-exec rm -i {} \;
+
+regress-distcheck:
+	@find regress ! -type d ! -type f
+	@find regress -type f \
+		! -path '*/CVS/*' \
+		! -name Makefile \
+		! -name Makefile.inc \
+		! -name '*.in' \
+		! -name '*.out_ascii' \
+		! -name '*.out_utf8' \
+		! -name '*.out_html' \
+		! -name '*.out_lint' \
+		! -path regress/regress.pl \
+		! -path regress/regress.pl.1
+
 dist: mdocml.sha256
 
 mdocml.sha256: mdocml.tar.gz
 	sha256 mdocml.tar.gz > $@
 
 mdocml.tar.gz: $(DISTFILES)
+	ls regress/*/*/*.mandoc_* && exit 1 || true
 	mkdir -p .dist/mdocml-$(VERSION)/
 	$(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION)
+	cp -pR regress .dist/mdocml-$(VERSION)
+	find .dist/mdocml-$(VERSION)/regress \
+	    -type d -name CVS -print0 | xargs -0 rm -rf
 	chmod 755 .dist/mdocml-$(VERSION)/configure
 	( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) )
 	rm -rf .dist/

Modified: head/contrib/mdocml/Makefile.depend
==============================================================================
--- head/contrib/mdocml/Makefile.depend	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/Makefile.depend	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,4 +1,5 @@
 att.o: att.c config.h roff.h mdoc.h libmdoc.h
+catman.o: catman.c config.h compat_fts.h
 cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h
 chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h
 compat_err.o: compat_err.c config.h
@@ -39,6 +40,7 @@ man_validate.o: man_validate.c config.h 
 mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h
 mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h
 mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h
+mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h
 mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h
 manpage.o: manpage.c config.h manconf.h mansearch.h
 manpath.o: manpath.c config.h mandoc_aux.h manconf.h

Modified: head/contrib/mdocml/NEWS
==============================================================================
--- head/contrib/mdocml/NEWS	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/NEWS	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,7 +1,131 @@
-$Id: NEWS,v 1.12 2016/07/14 11:09:06 schwarze Exp $
+$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $
 
 This file lists the most important changes in the mdocml.bsd.lv distribution.
 
+Changes in version 1.14.1, released on February XXX, 2017
+
+    --- MAJOR NEW FEATURES ---
+ * apropos(1): Reimplement complete semantic search functionality
+   without the dependency on SQLite3, using only POSIX APIs.
+   This comes with a completely new mandoc.db(5) file format.
+ * man(1): Support more than one tag entry for the same search term,
+   plus some minor improvements to the less(1) :t support.
+ * -Thtml: Use real macro names for CSS classes.
+   Systematic cleanup of and many improvements to mandoc.css.
+ * -Thtml: Produce human readable HTML code by using indentation
+   and better line breaks.  Improve various HTML elements,
+   and trim several useless ones.
+ * New catman(8) utility, still somewhat experimental.
+ * Now includes a portable version of the OpenBSD mandoc regression
+   suite, see regress/regress.pl.1 for details.
+    --- REMOVED FUNCTIONALITY ---
+ * Operating systems that don't provide mmap(3) are no longer supported.
+ * Drop support for manpath(1).  Even if your system has manpath(1),
+   it is simpler to use MANPATH_DEFAULT in configure.local for
+   operating system defaults, man.conf(5) for machine-specific
+   modifications, and ${MANPATH}, -m, and -M for user preferences
+   than to bother with the complexity of manpath(1).
+ * makewhatis(8) -p: No longer warn about missing MLINKS since these
+   are no longer needed for anything.
+    --- MINOR NEW FEATURES ---
+ * mdoc(7): Warn about invalid punctuation and content below NAME.
+ * mdoc(7): Warn about .Xr lacking the second argument (section).
+ * mdoc(7): Warn about violations of the rule "new sentence, new line".
+ * roff(7): Warn about trailing whitespace at the end of comments.
+ * mdoc(7): Improve rendering of double quotes.
+ * mdoc(7): Always do text production in the validator, never in the
+   formatters.  Cleaner, simpler, shorter, helps NetBSD apropos(1)
+   and also makes -Ttree output more useful.
+ * -Ttree: Show metadata and some additional node flags.
+   New -Onoval output option to show the unvalidated tree.
+    --- RELIABILITY BUGFIXES ---
+ * man(1): Make "man -l" work with standard input from a pipe or file,
+   as long as standard output is a terminal.
+ * man(7): Fix out of bounds read access if a text node immediately
+   preceded the first .SH header.
+ * mdoc(7): Fix out of bounds read access for .Bl without a type
+   but with a width.
+ * mdoc(7): Fix out of bounds read access for .Bl -column starting
+   with a tab character instead of a child .It macro.
+ * mdoc(7): Fix syntax tree corruption leading to segfaults caused
+   by stray block end macros in nested blocks of mismatching type.
+ * man(1): Fix NULL dereference when the first of multiple pages
+   shown was preformatted.
+ * mdoc(7): Fix syntax tree corruption leading to NULL dereference
+   caused by partial implicit macros inside .Bl -column table cells.
+ * mdoc(7): Fix syntax tree corruption leading to NULL dereference
+   for macro sequences like .Bl .Bl .It Bo .El .It.
+ * mdoc(7): Fix syntax tree corruption leading to NULL dereference
+   caused by .Ta following a nested .Bl -column breaking another block.
+ * mdoc(7): Fix syntax tree corruption sometimes leading to NULL
+   dereference caused by indirectly broken .Nd or .Nm blocks.
+ * mdoc(7) -Thtml: Fix a NULL dereference for .Bl -column with 0 columns.
+ * mdoc(7): Fix NULL dereference in some specific cases of a
+   block-end macro calling another block-end macro.
+ * mdoc(7): Fix NULL dereference if the only child of the head
+   of the first .Sh was an empty in-line macro.
+ * eqn(7): Fix NULL dereference in the terminal formatter
+   for empty matrices and empty square roots.
+ * mdoc(7): Fix an assertion failure for a .Bd without a type that
+   breaks another block.
+ * mdoc(7): Fix an assertion failure that happened for some .Bl -column
+   lists containing a column width of "-4n", "-3n", or "-2n".
+ * mdoc(7): Fix an assertion failure caused by .Bl -column without .It
+   but containing eqn(7) or tbl(7) code.
+ * roff(7): Fix an assertion failure caused by \z\[u00FF] with -Tps/-Tpdf.
+ * roff(7): Fix an assertion failures caused by whitespace inside \o''
+   (overstrike) sequences.
+ * -Thtml: Fix an assertion failure caused by -Oman or -Oincludes of
+   excessive length.
+    --- PORTABILITY IMPROVEMENTS ---
+ * man(1): Do not mix stdio narrow and wide stream orientation
+   on stdout, which could cause output corruption on glibc.
+ * mandoc(1): Autodetect a suitable locale for -Tutf8 mode.
+ * ./configure: Autodetect whether PATH_MAX and O_DIRECTORY are defined.
+ * ./configure: Autodetect if nanosleep(3) needs -lrt.
+ * ./configure: Provide an ${LN} configuration variable.
+ * ./configure: Put compiler arguments that may contain -l at the end.
+    --- MINOR BUGFIXES ---
+ * mdoc(7): Fix SYNOPSIS output if the first child of .Nm is a macro.
+ * mdoc(7) -Thtml: Improve formatting of .Bl -tag with short tags.
+ * man(7) -Thtml: Preserve whitespace in .nf (nofill) mode.
+ * mandoc(1): Error out on invalid output options on the command line.
+    --- STRUCTURAL CHANGES, no functional change ---
+ * Redesign part of the mandoc_html(3) interfaces, making them much
+   easier to use and reducing the amount of code by a few hundred lines.
+    --- THANKS TO ---
+ * Michael Stapelberg (Debian) for designing the new mandocd(8)
+   and parts of the new catman(8), and for a number of patches
+   and bug reports.
+ * Baptiste Daroussin (FreeBSD) for profiling the new makewhatis(8)
+   implementation and suggesting an algorithmic improvement which
+   more than doubled performance, and for a few bug reports.
+ * Ed Maste (FreeBSD) for an important patch improving reproducibility
+   of builds in makewhatis(8), and for a few bug reports.
+ * Theo Buehler (OpenBSD) for more than ten important bug reports,
+   most of them found by systematic afl(1) fuzzing.
+ * Benny Lofgren, David Dahlberg, and in particular Vadim Zhukov
+   for crucial help in getting .Bl -tag CSS formatting fixed.
+ * Svyatoslav Mishyn (Crux Linux) for an initial version of the
+   patch to autodetect a suitable locale for -Tutf8 mode.
+ * Jason McIntyre (OpenBSD) for multiple useful discussions
+   and a number of bug reports.
+ * Alexander Bluhm, Andrew Fresh, Antoine Jacoutot, Antony Bentley,
+   Christian Weisgerber, Jonathan Gray, Marc Espie, Martijn van Duren,
+   Stuart Henderson, Ted Unangst, Theo de Raadt (OpenBSD), Abhinav
+   Upadhyay, Christos Zoulas, Kamil Rytarowski, Sevan Janiyan,
+   Thomas Klausner (NetBSD), Aaron M. Ucko, Bdale Garbee, Reiner
+   Herrmann, Shane Kerr (Debian), Leah Neukirchen (Void Linux),
+   Daniel Sabogal (Alpine Linux), Yuri Pankov (illumos),
+   Carsten Kunze (Heirloom roff), Kristaps Dzonsons (bsd.lv),
+   Anton Lindqvist, Jan Stary, Jeremy A. Mates, Mark Patruck,
+   Pavan Maddamsetti, Sean Levy <attila at stalphonsos.com>, and
+   Tiago Silva for bug reports.
+ * Brent Cook, Marc Espie, Philip Guenther, Todd Miller (OpenBSD)
+   and Markus Waldeck for useful discussions.
+ * And as usual, OpenCSW for providing me with a Solaris 9/10/11
+   testing environment.
+
 Changes in version 1.13.4, released on July 14, 2016
 
     --- MAJOR NEW FEATURES ---
@@ -109,7 +233,7 @@ Changes in version 1.13.4, released on J
    again resulting in more than half a dozen important bug reports.
  * Svyatoslav Mishyn (Crux Linux) for some patches, several bug
    reports, and extensive release testing.
- * Christian Neukirchen (void Linux) for a number of compatibility
+ * Leah Neukirchen (Void Linux) for a number of compatibility
    patches and suggestions and several bug reports.
  * Christos Zoulas (NetBSD) for a bug fix patch and some useful
    suggestions for cleanup.

Modified: head/contrib/mdocml/TODO
==============================================================================
--- head/contrib/mdocml/TODO	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/TODO	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,6 +1,6 @@
 ************************************************************************
 * Official mandoc TODO.
-* $Id: TODO,v 1.223 2017/01/17 15:32:43 schwarze Exp $
+* $Id: TODO,v 1.234 2017/02/18 11:53:33 schwarze Exp $
 ************************************************************************
 
 Many issues are annotated for difficulty as follows:
@@ -193,10 +193,6 @@ are mere guesses, and some may be wrong.
   uqs@  Thu, 2 Jun 2011 11:33:35 +0200
   loc *  exist **  algo ***  size *  imp **
 
---- missing man features -----------------------------------------------
-
-- -T[x]html doesn't stipulate non-collapsing spaces in literal mode
-
 --- missing tbl features -----------------------------------------------
 
 - horizontal lines in the layout still consume data cells
@@ -223,13 +219,16 @@ are mere guesses, and some may be wrong.
 - support mdoc(7) and man(7) macros inside tbl(7) code;
   probably requires the parser reorg and letting tbl(7)
   use roff_node such that macro sets can mix;
-  informed by bapt@ that FreeBSD needs this.
+  informed by bapt@ that FreeBSD needs this: 3 Jan 2015 23:32:23 +0100
   loc ***  exist **  algo ***  size **  imp ***
 
 - look at the POSIX manuals in the books/man-pages-posix port,
   they use some unsupported tbl(7) features.
   loc *  exist **  algo **  size **  imp ***
 
+- look what Joerg Schilling manual pages use
+  Thu, 19 Mar 2015 18:31:48 +0100
+
 - use Unicode U+2500 to U+256C for table borders
   in tbl(7) -Tutf-8 output
   suggested by bentley@  Tue, 14 Oct 2014 04:10:55 -0600
@@ -263,15 +262,6 @@ are mere guesses, and some may be wrong.
   even for apropos title line output; req by bapt@
   loc *  exist *  algo *  size *  imp ***
 
-- makewhatis(8) for preformatted pages:
-  parse the section number from the header line
-  and compare to the section number from the directory name
-  loc *  exist *  algo *  size *  imp **
-
-- Does makewhatis(8) detect missing NAME sections, missing names,
-  and missing descriptions in all the file formats?
-  loc *  exist *  algo *  size *  imp ***
-
 - 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
@@ -300,6 +290,8 @@ are mere guesses, and some may be wrong.
 - look at AT&T DWB http://www2.research.att.com/sw/download
   Carsten Kunze <carsten dot kunze at arcor dot de> has patches
   Mon, 4 Aug 2014 17:01:28 +0200
+  ported version: https://github.com/n-t-roff/DWB3.3
+  Carsten Kunze  Wed, 22 Apr 2015 11:21:43 +0200
 
 - 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
@@ -334,6 +326,9 @@ are mere guesses, and some may be wrong.
   https://github.com/schmonz/ikiwiki/compare/mandoc
   Amitai Schlair  Mon, 19 May 2014 14:05:53 -0400
 
+- check features of the Slackware man.conf(5) format
+  Carsten Kunze  Wed, 11 Mar 2015 17:57:24 +0100
+
 ************************************************************************
 * formatting issues: ugly output
 ************************************************************************
@@ -394,7 +389,7 @@ are mere guesses, and some may be wrong.
   reveals lots of bugs both in groff and mandoc...
   reported by bentley@  Wed, 22 May 2013 23:49:30 -0600
 
---- PDF issues ---------------------------------------------------------
+--- PostScript and PDF issues ------------------------------------------
 
 - PDF output doesn't use a monospaced font for .Bd -literal
   Example: "mandoc -Tpdf afterboot.8 > output.pdf && pdfviewer output.pdf".
@@ -404,21 +399,11 @@ are mere guesses, and some may be wrong.
   instructions from juanfra@  Wed, 11 Jun 2014 02:21:01 +0200
     add a new <</Type /Font>> block to the PDF files with /BaseFont /Courier
     and change the /Name from /F0 to the new font (/F5 (?)).
+  re-reported by tb@ Mon, 16 Mar 2015 16:47:21 +0100
   loc *  exist **  algo **  size *  imp **
 
 --- HTML issues --------------------------------------------------------
 
-- <dl><dt><dd> formatting is ugly
-  hints are easy to find on the web, e.g.
-  http://stackoverflow.com/questions/1713048/
-  see also matthew@  Fri, 18 Jul 2014 19:25:12 -0700
-  loc *  exist *  algo **  size *  imp ***
-
-- In -man -Thtml, .nf does not preserve indentation.
-  It should either convert blanks to  
-  or use <pre> rather than <div> (like .Bd -literal does).
-  Reported by afresh1@  12 Apr 2016 14:35:45 -0700
-
 - .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal
   space, see for example random(3).  Introduced in
   http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92
@@ -427,6 +412,9 @@ are mere guesses, and some may be wrong.
 
 - jsg on icb, Nov 3, 2014:
   try to guess Xr in man(7) for hyperlinking
+  and render them with <a class="Xr" href=...>
+  https://github.com/Debian/debiman/issues/15
+  loc *  exist *  algo **  size **  imp **
 
 - The tables used to render the three-part page headers actually force
   the width of the <body> to the max-width given for <html>.
@@ -435,9 +423,6 @@ are mere guesses, and some may be wrong.
   http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1
   loc *  exist *  algo **  size *  imp ***
 
-- consider whether <var> can be used for Ar Dv Er Ev Fa Va.
-  from bentley@  Wed, 13 Aug 2014 09:17:55 -0600
-
 - generate <img> tags in HTML
   idea from florian@  Tue, 7 Apr 2015 00:26:28 +0000
   may be possible to implement with .Lk img://something.png alt_text
@@ -454,6 +439,9 @@ are mere guesses, and some may be wrong.
   Steffen Nurpmeso  Sat, 08 Nov 2014 13:34:59 +0100
   loc *  exist **  algo **  size *  imp **
 
+- .Lk formatting for long links with line breaks
+  Franco Fichtner  8 Oct 2013 00:33:42 +0200
+
 - In .Bl -enum -width 0n, groff continues one the same line after
   the number, mandoc breaks the line.
   mail to kristaps@  Mon, 20 Jul 2009 02:21:39 +0200
@@ -498,6 +486,7 @@ are mere guesses, and some may be wrong.
   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
+  reported again by Bruce Evans Fri, 17 Feb 2017 21:22:44 +0100 via bapt@
   loc ***  exist ***  algo ***  size **  imp ***
   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.
@@ -508,12 +497,6 @@ are mere guesses, and some may be wrong.
   we want three blank lines, not two as in mandoc.
   loc **  exist **  algo **  size *  imp **
 
-- 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
-  loc *  exist *  algo *  size *  imp *
-
 - Sequences of multiple man(7) paragraphs (.PP, .IP) interspersed
   with .ps and .nf/.fi produce execessive blank lines, see libJudy
   and graphics/dcmtk.  The parser reorg may help with this.
@@ -535,21 +518,10 @@ are mere guesses, and some may be wrong.
   to access the manpath and mandoc.db(3) after parsing.
   asked for by jmc@ Fri, 4 Dec 2015 22:39:40 +0000
 
-- Report errors in -O suboption parsing.
-  loc *  exist *  algo *  size *  imp **
-
 - warn when .Sh or .Ss contain other macros
   Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034
   loc *  exist *  algo *  size *  imp **
 
-- check that MANDOCERR_BADTAB is thrown in the right cases,
-  i.e. when finding a literal tab character in fill mode,
-  and possibly change the wording of the warning message
-  to refer to fill mode, not literal mode
-  See the mail from Werner LEMBERG on the groff list,
-  Fri, 14 Feb 2014 18:54:42 +0100 (CET)
-  loc *  exist **  algo **  size *  imp **
-
 - warn about attempts to call non-callable macros
   Steffen Nurpmeso  Tue, 11 Nov 2014 22:55:16 +0100
   Note that formatting is inconsistent in groff.
@@ -558,9 +530,6 @@ are mere guesses, and some may be wrong.
   all over mdoc_macro.c and all subtly different.
   loc **  exist **  algo **  size **  imp **
 
-- warn about "new sentence, new line"
-  loc **  exist **  algo ***  size *  imp **
-
 - mandoc_special does not really check the escape sequence,
   but just the overall format
   loc **  exist **  algo ***  size **  imp **
@@ -580,13 +549,6 @@ are mere guesses, and some may be wrong.
 * documentation issues
 ************************************************************************
 
-- mention hyphenation rules:
-  breaking at letter-letter in text mode (not macro args)
-  proper hyphenation is unimplemented
-
-- talk about spacing around delimiters
-  to jmc@, kristaps@  Sat, 23 Apr 2011 17:41:27 +0200
-
 - mark macros as: page structure domain, manual domain, general text domain
   is this useful?
 
@@ -606,14 +568,8 @@ Several areas can be cleaned up to make 
 
 - 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
-  loc *  exist **  algo **  size *  imp **
-
 ************************************************************************
 * structural issues
 ************************************************************************
@@ -648,9 +604,6 @@ Several areas can be cleaned up to make 
    output through libz.
  - Sandbox (see OpenSSH).
  - Enable caching support via HTTP 304 and If-Modified-Since.
- - Allow for cgi.h to be overridden by CGI environment variables.
-   Otherwise, binary distributions will inherit the compile-time
-   behaviour, which is not optimal.
  - Have Mac OSX systems automatically disable -static compilation of the
    CGI: -static isn't supported.
 

Modified: head/contrib/mdocml/apropos.1
==============================================================================
--- head/contrib/mdocml/apropos.1	Sun Feb 19 17:42:05 2017	(r313957)
+++ head/contrib/mdocml/apropos.1	Sun Feb 19 17:46:37 2017	(r313958)
@@ -1,4 +1,4 @@
-.\"	$Id: apropos.1,v 1.39 2015/04/03 08:46:17 schwarze Exp $
+.\"	$Id: apropos.1,v 1.40 2017/01/31 19:44:04 schwarze Exp $
 .\"
 .\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps at bsd.lv>
 .\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze at openbsd.org>
@@ -15,7 +15,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: April 3 2015 $
+.Dd $Mdocdate: January 31 2017 $
 .Dt APROPOS 1
 .Os
 .Sh NAME
@@ -468,6 +468,10 @@ and in
 .Ox 5.6
 for
 .Nm whatis .
+The options
+.Fl acfhIKklOTWw
+appeared in
+.Ox 5.7 .
 .Sh AUTHORS
 .An -nosplit
 .An Bill Joy

Copied: head/contrib/mdocml/catman.8 (from r313957, vendor/mdocml/dist/catman.8)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/mdocml/catman.8	Sun Feb 19 17:46:37 2017	(r313958, copy of r313957, vendor/mdocml/dist/catman.8)
@@ -0,0 +1,186 @@
+.\"	$Id: catman.8,v 1.7 2017/02/06 19:04:21 schwarze Exp $
+.\"
+.\" Copyright (c) 2017 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
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: February 6 2017 $
+.Dt CATMAN 8
+.Os
+.Sh NAME
+.Nm catman
+.Nd format all manual pages below a directory
+.Sh SYNOPSIS
+.Nm catman
+.Op Fl I Cm os Ns = Ns Ar name
+.Op Fl T Ar output
+.Ar srcdir dstdir
+.Sh DESCRIPTION
+The
+.Nm
+utility assumes that all files below
+.Ar srcdir
+are manual pages in
+.Xr mdoc 7
+and
+.Xr man 7
+format and formats all of them, storing the formatted versions in
+the same relative paths below
+.Ar dstdir .
+Subdirectories of
+.Ar dstdir
+are created as needed.
+Existing files are not explicitly deleted, but possibly overwritten.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl I Cm os Ns = Ns Ar name
+Override the default operating system
+.Ar name
+for the
+.Xr mdoc 7
+.Ic Os
+and for the
+.Xr man 7
+.Ic TH
+macro.
+.It Fl T Ar output
+Output format.
+The
+.Ar output
+argument can be
+.Cm ascii ,
+.Cm utf8 ,
+or
+.Cm html ;
+see
+.Xr mandoc 1 .
+In
+.Cm html
+output mode, the
+.Cm fragment
+output option is implied.
+Other output options are not supported.
+.El
+.Sh IMPLEMENTATION NOTES
+Since this version avoids
+.Xr fork 2
+and
+.Xr exec 3
+overhead and uses the much faster
+.Sy mandoc
+parsers and formatters rather than
+.Sy groff ,
+it may be about one order of magnitude faster than other
+.Nm
+implementations.
+.Sh EXIT STATUS
+.Ex -std
+.Pp
+Possible errors include:
+.Bl -bullet
+.It
+missing, invalid, or excessive command line arguments
+.It
+failure to change the current working directory to
+.Ar srcdir
+.It
+failure to open
+.Ar dstdir
+.It
+communication failure with
+.Xr mandocd 8
+.It
+resource exhaustion, for example file descriptor, process table,
+or memory exhaustion
+.El
+.Pp
+Except for memory exhaustion and similar system-level failures,
+failures while trying to open, read, parse, or format individual
+manual pages, to save individual formatted files to the file system,
+or even to create directories do not cause
+.Nm
+to return an error exit status.
+In such cases,
+.Nm
+will simply continue with the next file or subdirectory.
+.Sh SEE ALSO
+.Xr mandoc 1 ,
+.Xr mandocd 8
+.Sh HISTORY
+A
+.Nm
+utility first appeared in
+.Fx 1.0 .
+Other, incompatible implementations appeared in
+.Nx 1.0
+and in
+.Sy man-db No 2.2 .
+.Pp
+This version appeared in version 1.14.1 of the
+.Sy mandoc
+toolkit.
+.Sh AUTHORS
+.An -nosplit
+The first
+.Nm
+implementation was a short shell script by
+.An Christoph Robitschko
+in July 1993.
+.Pp
+The
+.Nx
+implementations were written by
+.An J. T. Conklin Aq Mt jtc at netbsd.org
+in 1993,
+.An Christian E. Hopps Aq Mt chopps at netbsd.org
+in 1994,
+and
+.An Dante Profeta Aq Mt dante at netbsd.org
+in 1999; the
+.Sy man-db
+implementation by
+.An Graeme W. Wilford

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


More information about the svn-src-all mailing list