svn commit: r319717 - in head: contrib/mdocml usr.bin/mandoc

Baptiste Daroussin bapt at FreeBSD.org
Thu Jun 8 19:40:03 UTC 2017


Author: bapt
Date: Thu Jun  8 19:40:00 2017
New Revision: 319717
URL: https://svnweb.freebsd.org/changeset/base/319717

Log:
  Import mandoc snapshot 2017-06-08
  
  It implements missing man(7) macros used in base by kerberos/ntp and makes them
  supported by mandoc.
  
  This import should have been done before the removal of groff.
  
  Reported by:	gordon

Added:
  head/contrib/mdocml/mdoc_markdown.c
     - copied unchanged from r319716, vendor/mdocml/dist/mdoc_markdown.c
  head/contrib/mdocml/roff_html.c
     - copied unchanged from r319716, vendor/mdocml/dist/roff_html.c
  head/contrib/mdocml/roff_term.c
     - copied unchanged from r319716, vendor/mdocml/dist/roff_term.c
  head/contrib/mdocml/roff_validate.c
     - copied unchanged from r319716, vendor/mdocml/dist/roff_validate.c
  head/contrib/mdocml/term_tab.c
     - copied unchanged from r319716, vendor/mdocml/dist/term_tab.c
Deleted:
  head/contrib/mdocml/man_hash.c
  head/contrib/mdocml/manpage.c
  head/contrib/mdocml/mdoc_hash.c
Modified:
  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/catman.8
  head/contrib/mdocml/cgi.c
  head/contrib/mdocml/cgi.h.example
  head/contrib/mdocml/chars.c
  head/contrib/mdocml/configure
  head/contrib/mdocml/configure.local.example
  head/contrib/mdocml/eqn.c
  head/contrib/mdocml/gmdiff
  head/contrib/mdocml/html.c
  head/contrib/mdocml/html.h
  head/contrib/mdocml/libman.h
  head/contrib/mdocml/libmandoc.h
  head/contrib/mdocml/libmdoc.h
  head/contrib/mdocml/main.c
  head/contrib/mdocml/main.h
  head/contrib/mdocml/makewhatis.8
  head/contrib/mdocml/man.1
  head/contrib/mdocml/man.7
  head/contrib/mdocml/man.c
  head/contrib/mdocml/man.cgi.3
  head/contrib/mdocml/man.cgi.8
  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.css
  head/contrib/mdocml/mandoc.h
  head/contrib/mdocml/mandoc_char.7
  head/contrib/mdocml/mandoc_headers.3
  head/contrib/mdocml/mandoc_html.3
  head/contrib/mdocml/mandocd.8
  head/contrib/mdocml/mandocdb.c
  head/contrib/mdocml/mansearch.3
  head/contrib/mdocml/mansearch.c
  head/contrib/mdocml/mansearch.h
  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_state.c
  head/contrib/mdocml/mdoc_term.c
  head/contrib/mdocml/mdoc_validate.c
  head/contrib/mdocml/out.c
  head/contrib/mdocml/out.h
  head/contrib/mdocml/read.c
  head/contrib/mdocml/roff.7
  head/contrib/mdocml/roff.c
  head/contrib/mdocml/roff.h
  head/contrib/mdocml/soelim.1
  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/term_ps.c
  head/contrib/mdocml/tree.c
  head/usr.bin/mandoc/Makefile
Directory Properties:
  head/contrib/mdocml/   (props changed)

Modified: head/contrib/mdocml/LICENSE
==============================================================================
--- head/contrib/mdocml/LICENSE	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/LICENSE	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,11 +1,11 @@
-$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $
+$Id: LICENSE,v 1.15 2017/02/21 00:37:03 schwarze Exp $
 
 With the exceptions noted below, all code and documentation
 contained in the mdocml toolkit is protected by the Copyright
 of the following developers:
 
 Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps at bsd.lv>
-Copyright (c) 2010-2016 Ingo Schwarze <schwarze at openbsd.org>
+Copyright (c) 2010-2017 Ingo Schwarze <schwarze at openbsd.org>
 Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger <joerg at netbsd.org>
 Copyright (c) 2013 Franco Fichtner <franco at lastsummer.de>
 Copyright (c) 2014 Baptiste Daroussin <bapt at freebsd.org>

Modified: head/contrib/mdocml/Makefile
==============================================================================
--- head/contrib/mdocml/Makefile	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/Makefile	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $
+# $Id: Makefile,v 1.512 2017/05/07 17:31:45 schwarze Exp $
 #
 # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps at bsd.lv>
 # Copyright (c) 2011, 2013-2017 Ingo Schwarze <schwarze at openbsd.org>
@@ -85,7 +85,6 @@ SRCS		 = att.c \
 		   lib.c \
 		   main.c \
 		   man.c \
-		   man_hash.c \
 		   man_html.c \
 		   man_macro.c \
 		   man_term.c \
@@ -95,15 +94,14 @@ SRCS		 = att.c \
 		   mandoc_ohash.c \
 		   mandocd.c \
 		   mandocdb.c \
-		   manpage.c \
 		   manpath.c \
 		   mansearch.c \
 		   mdoc.c \
 		   mdoc_argv.c \
-		   mdoc_hash.c \
 		   mdoc_html.c \
 		   mdoc_macro.c \
 		   mdoc_man.c \
+		   mdoc_markdown.c \
 		   mdoc_state.c \
 		   mdoc_term.c \
 		   mdoc_validate.c \
@@ -112,6 +110,9 @@ SRCS		 = att.c \
 		   preconv.c \
 		   read.c \
 		   roff.c \
+		   roff_html.c \
+		   roff_term.c \
+		   roff_validate.c \
 		   soelim.c \
 		   st.c \
 		   tag.c \
@@ -124,6 +125,7 @@ SRCS		 = att.c \
 		   term.c \
 		   term_ascii.c \
 		   term_ps.c \
+		   term_tab.c \
 		   tree.c
 
 DISTFILES	 = INSTALL \
@@ -198,7 +200,6 @@ DISTFILES	 = INSTALL \
 		   $(TESTSRCS)
 
 LIBMAN_OBJS	 = man.o \
-		   man_hash.o \
 		   man_macro.o \
 		   man_validate.o
 
@@ -206,7 +207,6 @@ LIBMDOC_OBJS	 = att.o \
 		   lib.o \
 		   mdoc.o \
 		   mdoc_argv.o \
-		   mdoc_hash.o \
 		   mdoc_macro.o \
 		   mdoc_state.o \
 		   mdoc_validate.o \
@@ -214,6 +214,7 @@ LIBMDOC_OBJS	 = att.o \
 
 LIBROFF_OBJS	 = eqn.o \
 		   roff.o \
+		   roff_validate.o \
 		   tbl.o \
 		   tbl_data.o \
 		   tbl_layout.o \
@@ -250,16 +251,17 @@ MANDOC_HTML_OBJS = eqn_html.o \
 		   html.o \
 		   man_html.o \
 		   mdoc_html.o \
+		   roff_html.o \
 		   tbl_html.o
 
-MANDOC_MAN_OBJS  = mdoc_man.o
-
 MANDOC_TERM_OBJS = eqn_term.o \
 		   man_term.o \
 		   mdoc_term.o \
+		   roff_term.o \
 		   term.o \
 		   term_ascii.o \
 		   term_ps.o \
+		   term_tab.o \
 		   tbl_term.o
 
 DBM_OBJS	 = dbm.o \
@@ -279,6 +281,8 @@ MAIN_OBJS	 = $(MANDOC_HTML_OBJS) \
 		   $(DBA_OBJS) \
 		   main.o \
 		   manpath.o \
+		   mdoc_man.o \
+		   mdoc_markdown.o \
 		   out.o \
 		   tag.o \
 		   tree.o
@@ -294,10 +298,6 @@ MANDOCD_OBJS	 = $(MANDOC_HTML_OBJS) \
 		   out.o \
 		   tag.o
 
-MANPAGE_OBJS	 = $(DBM_OBJS) \
-		   manpage.o \
-		   manpath.o
-
 DEMANDOC_OBJS	 = demandoc.o
 
 SOELIM_OBJS	 = soelim.o \
@@ -373,7 +373,6 @@ clean:
 	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)
@@ -388,17 +387,16 @@ base-install: mandoc demandoc soelim
 	mkdir -p $(DESTDIR)$(MANDIR)/man8
 	$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
 	$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
-	$(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)
+	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN)
+	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS)
+	cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS)
+	cd $(DESTDIR)$(SBINDIR) && \
+		$(LN) ${BIN_FROM_SBIN}/mandoc $(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) $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
-		$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
+	cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1
 	$(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
@@ -475,7 +473,7 @@ uninstall:
 	rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h
 	rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h
 	rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h
-	rmdir $(DESTDIR)$(INCLUDEDIR)
+	[ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR)
 
 regress: all
 	cd regress && ./regress.pl
@@ -492,9 +490,6 @@ libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS)
 
 mandoc: $(MAIN_OBJS) libmandoc.a
 	$(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD)
-
-manpage: $(MANPAGE_OBJS) libmandoc.a
-	$(CC) -o $@ $(LDFLAGS) $(MANPAGE_OBJS) libmandoc.a $(LDADD)
 
 man.cgi: $(CGI_OBJS) libmandoc.a
 	$(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD)

Modified: head/contrib/mdocml/Makefile.depend
==============================================================================
--- head/contrib/mdocml/Makefile.depend	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/Makefile.depend	Thu Jun  8 19:40:00 2017	(r319717)
@@ -28,11 +28,10 @@ demandoc.o: demandoc.c config.h roff.h man.h mdoc.h ma
 eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h
 eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h
 eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h
-html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h
+html.o: html.c config.h mandoc_aux.h mandoc.h roff.h out.h html.h manconf.h main.h
 lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in
 main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h
 man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h
-man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h
 man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h
 man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h
 man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h
@@ -42,15 +41,14 @@ mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_au
 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
 mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h
 mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
 mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
-mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h
 mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h
 mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
 mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h
+mdoc_markdown.o: mdoc_markdown.c mandoc_aux.h mandoc.h roff.h mdoc.h main.h
 mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h
 mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h
 mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
@@ -58,7 +56,10 @@ msec.o: msec.c config.h mandoc.h libmandoc.h msec.in
 out.o: out.c config.h mandoc_aux.h mandoc.h out.h
 preconv.o: preconv.c config.h mandoc.h libmandoc.h
 read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h
-roff.o: roff.c config.h mandoc.h mandoc_aux.h roff.h libmandoc.h roff_int.h libroff.h predefs.in
+roff.o: roff.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h roff.h libmandoc.h roff_int.h libroff.h predefs.in
+roff_html.o: roff_html.c roff.h out.h html.h
+roff_term.o: roff_term.c roff.h out.h term.h
+roff_validate.o: roff_validate.c mandoc.h roff.h libmandoc.h roff_int.h
 soelim.o: soelim.c config.h compat_stringlist.h
 st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in
 tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h
@@ -71,4 +72,5 @@ tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h
 term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h
 term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h manconf.h main.h
 term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h manconf.h main.h
+term_tab.o: term_tab.c mandoc_aux.h out.h term.h
 tree.o: tree.c config.h mandoc.h roff.h mdoc.h man.h main.h

Modified: head/contrib/mdocml/NEWS
==============================================================================
--- head/contrib/mdocml/NEWS	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/NEWS	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,8 +1,8 @@
-$Id: NEWS,v 1.20 2017/02/16 14:38:12 schwarze Exp $
+$Id: NEWS,v 1.21 2017/02/21 00:37:03 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
+Changes in version 1.14.1, released on February 21, 2017
 
     --- MAJOR NEW FEATURES ---
  * apropos(1): Reimplement complete semantic search functionality
@@ -95,28 +95,32 @@ Changes in version 1.14.1, released on February XXX, 2
    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.
+   and parts of the new catman(8), for release testing, 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,
+ * Theo Buehler (OpenBSD) for almost twenty 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.
+   patch to autodetect a suitable locale for -Tutf8 mode
+   and for release testing.
  * Jason McIntyre (OpenBSD) for multiple useful discussions
    and a number of bug reports.
+ * Sevan Janiyan (NetBSD) for extensive release testing and multiple
+   bug reports.
+ * Thomas Klausner and Christos Zoulas (NetBSD), Yuri Pankov (illumos),
+   and Leah Neukirchen (Void Linux) for release testing and bug reports.
+ * Ulrich Spoerlein (FreeBSD) for release testing.
  * 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),
+   Upadhyay, Kamil Rytarowski (NetBSD), Aaron M. Ucko, Bdale Garbee,
+   Reiner Herrmann, Shane Kerr (Debian), Daniel Sabogal (Alpine Linux),
    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

Modified: head/contrib/mdocml/TODO
==============================================================================
--- head/contrib/mdocml/TODO	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/TODO	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,6 +1,6 @@
 ************************************************************************
 * Official mandoc TODO.
-* $Id: TODO,v 1.234 2017/02/18 11:53:33 schwarze Exp $
+* $Id: TODO,v 1.237 2017/05/16 19:06:30 schwarze Exp $
 ************************************************************************
 
 Many issues are annotated for difficulty as follows:
@@ -61,18 +61,6 @@ are mere guesses, and some may be wrong.
   reported by brad@  Sat, 15 Jan 2011 15:45:23 -0500
   loc ***  exist ***  algo ***  size **  imp *
 
-- .ta (tab settings)
-  #1 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100
-  ircbug(1) gnats(1) reported by brad@  Sat, 15 Jan 2011 15:50:51 -0500
-  also Tcl_NewStringObj(3) via wiz@  Wed, 5 Mar 2014 22:27:43 +0100
-  also posix2time(3) Carsten Kunze  Mon, 1 Dec 2014 13:03:10 +0100
-  loc **  exist ***  algo **  size **  imp ***
-
-- .ti (temporary indent)
-  found by naddy@ in xloadimage(1) [devel/libvstr] vstr(3)
-  found by bentley@ in nmh(1)  Mon, 23 Apr 2012 13:38:28 -0600
-  loc **  exist **  algo **  size *  imp ** (parser reorg helps a lot)
-
 - .while and .shift
   found by jca@ in ratpoison(1)  Sun, 30 Jun 2013 12:01:09 +0200
   loc *  exist **  algo **  size **  imp **
@@ -273,12 +261,6 @@ are mere guesses, and some may be wrong.
 - kettenis wants base roff, ms, and me  Fri, 1 Jan 2010 22:13:15 +0100 (CET)
   loc **  exist **  algo **  size ***  imp *
 
-- Vsevolod Stakhov (FreeBSD) needs either a markdown output formatter
-  for mandoc -mdoc or a markdown to mdoc converter because they
-  have to maintain manuals needed both in markdown and mdoc format.
-  Look at the libsoldout (markdown -> whatever)
-  loc *  exist *  algo *  size **  imp **
-
 --- compatibility checks -----------------------------------------------
 
 - is .Bk implemented correctly in modern groff?
@@ -566,8 +548,6 @@ are mere guesses, and some may be wrong.
 
 Several areas can be cleaned up to make mandoc even faster.  These are
 
-- improve hashing mechanism for macros (quite important: performance)
-
 - the PDF file is HUGE: this can be reduced by using relative offsets
 
 ************************************************************************
@@ -613,3 +593,10 @@ Several areas can be cleaned up to make mandoc even fa
 
 - use uname(1) to set doc-default-operating-system at install time
   tobimensch  Mon, 1 Dec 2014 00:25:07 +0100
+
+- apostrophe (39), circumflex (94), grave (96), tilde (126)
+  in manuals: \(aq, \(ha, \`, \(ti
+  Re: [Groff] ASCII Minus Sign in man Pages.
+  bentley@ 26 Apr 2017 10:02:06 -0600
+  Do we need to fix existing manuals?
+  Do we need to fix the definition of the mdoc(7) language?

Modified: head/contrib/mdocml/apropos.1
==============================================================================
--- head/contrib/mdocml/apropos.1	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/apropos.1	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,7 +1,7 @@
-.\"	$Id: apropos.1,v 1.40 2017/01/31 19:44:04 schwarze Exp $
+.\"	$Id: apropos.1,v 1.45 2017/03/27 18:51:36 schwarze Exp $
 .\"
 .\" Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps at bsd.lv>
-.\" Copyright (c) 2011, 2012, 2014 Ingo Schwarze <schwarze at openbsd.org>
+.\" Copyright (c) 2011, 2012, 2014, 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,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: January 31 2017 $
+.Dd $Mdocdate: March 27 2017 $
 .Dt APROPOS 1
 .Os
 .Sh NAME
@@ -24,7 +24,7 @@
 .Nd search manual page databases
 .Sh SYNOPSIS
 .Nm
-.Op Fl acfhklw
+.Op Fl afk
 .Op Fl C Ar file
 .Op Fl M Ar path
 .Op Fl m Ar path
@@ -89,12 +89,6 @@ Specify an alternative configuration
 in
 .Xr man.conf 5
 format.
-.It Fl c
-In
-.Fl a
-mode, copy the formatted manual pages to the standard output without using
-.Xr more 1
-to paginate them.
 .It Fl f
 Search for all words in
 .Ar expression
@@ -102,37 +96,12 @@ in manual page names only.
 The search is case insensitive and matches whole words only.
 In this mode, macro keys, comparison operators, and logical operators
 are not available.
-This overrides any earlier
-.Fl k
-and
-.Fl l
-options.
-.It Fl h
-Instead of showing the title lines, show the SYNOPSIS sections, just like
-.Xr man 1
-.Fl h
-would.
 .It Fl k
 Support the full
 .Ar expression
 syntax.
-This overrides any earlier
-.Fl f
-and
-.Fl l
-options.
 It is the default for
 .Nm .
-.It Fl l
-An alias for
-.Xr mandoc 1
-.Fl a .
-This overrides any earlier
-.Fl f ,
-.Fl k ,
-and
-.Fl w
-options.
 .It Fl M Ar path
 Use the colon-separated path instead of the default list of paths
 searched for
@@ -162,14 +131,16 @@ By default, pages from all sections are shown.
 See
 .Xr man 1
 for a listing of sections.
-.It Fl w
-Instead of showing title lines, show the pathnames of the matching
-manual pages, just like
-.Xr man 1
-.Fl w
-would.
 .El
 .Pp
+The options
+.Fl chlw
+are also supported and are documented in
+.Xr man 1 .
+The options
+.Fl fkl
+are mutually exclusive and override each other.
+.Pp
 An
 .Ar expression
 consists of search terms joined by logical operators
@@ -237,8 +208,29 @@ is evaluated case-insensitively.
 Has no effect on substring terms.
 .El
 .Pp
-Results are sorted by manual sections and names, with output formatted as
+Results are sorted according to the following criteria:
+.Bl -enum
+.It
+The manpath directory tree the page is found in, according to the
+order specified with
+.Fl M ,
+.Fl m ,
+the
+.Ev MANPATH
+environment variable, the
+.Xr man.conf 5
+configuration file, or the default documented in
+.Xr man.conf 5 .
+.It
+The section number in ascending numerical order.
+.It
+The page name in ascending
+.Xr ascii 7
+alphabetical order, case-insensitive.
+.El
 .Pp
+Each output line is formatted as
+.Pp
 .D1 name[, name...](sec) \- description
 .Pp
 Where
@@ -341,25 +333,25 @@ Text production:
 .It Ev MANPAGER
 Any non-empty value of the environment variable
 .Ev MANPAGER
-will be used instead of the standard pagination program,
-.Xr more 1 .
+is used instead of the standard pagination program,
+.Xr more 1 ;
+see
+.Xr man 1
+for details.
+Only used if
+.Fl a
+or
+.Fl l
+is specified.
 .It Ev MANPATH
-The standard search path used by
+A colon-separated list of directories to search for manual pages; see
 .Xr man 1
-may be changed by specifying a path in the
-.Ev MANPATH
-environment variable.
-Invalid paths, or paths without manual databases, are ignored.
+for details.
 Overridden by
-.Fl M .
-If
-.Ev MANPATH
-begins with a colon, it is appended to the default list;
-if it ends with a colon, it is prepended to the default list;
-or if it contains two adjacent colons,
-the standard search path is inserted between the colons.
-If none of these conditions are met, it overrides the
-standard search path.
+.Fl M ,
+ignored if
+.Fl l
+is specified.
 .It Ev PAGER
 Specifies the pagination program to use when
 .Ev MANPAGER
@@ -367,7 +359,12 @@ is not defined.
 If neither PAGER nor MANPAGER is defined,
 .Xr more 1
 .Fl s
-will be used.
+is used.
+Only used if
+.Fl a
+or
+.Fl l
+is specified.
 .El
 .Sh FILES
 .Bl -tag -width "/etc/man.conf" -compact

Modified: head/contrib/mdocml/catman.8
==============================================================================
--- head/contrib/mdocml/catman.8	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/catman.8	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,4 +1,4 @@
-.\"	$Id: catman.8,v 1.7 2017/02/06 19:04:21 schwarze Exp $
+.\"	$Id: catman.8,v 1.8 2017/03/18 19:56:01 schwarze Exp $
 .\"
 .\" Copyright (c) 2017 Ingo Schwarze <schwarze at openbsd.org>
 .\"
@@ -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: February 6 2017 $
+.Dd $Mdocdate: March 18 2017 $
 .Dt CATMAN 8
 .Os
 .Sh NAME
@@ -49,7 +49,7 @@ Override the default operating system
 .Ar name
 for the
 .Xr mdoc 7
-.Ic Os
+.Ic \&Os
 and for the
 .Xr man 7
 .Ic TH

Modified: head/contrib/mdocml/cgi.c
==============================================================================
--- head/contrib/mdocml/cgi.c	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/cgi.c	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,4 +1,4 @@
-/*	$Id: cgi.c,v 1.147 2017/02/08 13:34:27 schwarze Exp $ */
+/*	$Id: cgi.c,v 1.154 2017/04/19 01:00:03 schwarze Exp $ */
 /*
  * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps at bsd.lv>
  * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze at usta.de>
@@ -76,11 +76,12 @@ static	void		 pg_error_badrequest(const char *);
 static	void		 pg_error_internal(void);
 static	void		 pg_index(const struct req *);
 static	void		 pg_noresult(const struct req *, const char *);
+static	void		 pg_redirect(const struct req *, const char *);
 static	void		 pg_search(const struct req *);
 static	void		 pg_searchres(const struct req *,
 				struct manpage *, size_t);
 static	void		 pg_show(struct req *, const char *);
-static	void		 resp_begin_html(int, const char *);
+static	void		 resp_begin_html(int, const char *, const char *);
 static	void		 resp_begin_http(int, const char *);
 static	void		 resp_catman(const struct req *, const char *);
 static	void		 resp_copy(const char *);
@@ -345,8 +346,9 @@ resp_copy(const char *filename)
 }
 
 static void
-resp_begin_html(int code, const char *msg)
+resp_begin_html(int code, const char *msg, const char *file)
 {
+	char	*cp;
 
 	resp_begin_http(code, msg);
 
@@ -356,10 +358,20 @@ resp_begin_html(int code, const char *msg)
 	       "  <meta charset=\"UTF-8\"/>\n"
 	       "  <link rel=\"stylesheet\" href=\"%s/mandoc.css\""
 	       " type=\"text/css\" media=\"all\">\n"
-	       "  <title>%s</title>\n"
+	       "  <title>",
+	       CSS_DIR);
+	if (file != NULL) {
+		if ((cp = strrchr(file, '/')) != NULL)
+			file = cp + 1;
+		if ((cp = strrchr(file, '.')) != NULL) {
+			printf("%.*s(%s) - ", (int)(cp - file), file, cp + 1);
+		} else
+			printf("%s - ", file);
+	}
+	printf("%s</title>\n"
 	       "</head>\n"
 	       "<body>\n",
-	       CSS_DIR, CUSTOMIZE_TITLE);
+	       CUSTOMIZE_TITLE);
 
 	resp_copy(MAN_DIR "/header.html");
 }
@@ -492,7 +504,7 @@ static void
 pg_index(const struct req *req)
 {
 
-	resp_begin_html(200, NULL);
+	resp_begin_html(200, NULL, NULL);
 	resp_searchform(req, FOCUS_QUERY);
 	printf("<p>\n"
 	       "This web interface is documented in the\n"
@@ -509,7 +521,7 @@ pg_index(const struct req *req)
 static void
 pg_noresult(const struct req *req, const char *msg)
 {
-	resp_begin_html(200, NULL);
+	resp_begin_html(200, NULL, NULL);
 	resp_searchform(req, FOCUS_QUERY);
 	puts("<p>");
 	puts(msg);
@@ -521,7 +533,7 @@ static void
 pg_error_badrequest(const char *msg)
 {
 
-	resp_begin_html(400, "Bad Request");
+	resp_begin_html(400, "Bad Request", NULL);
 	puts("<h1>Bad Request</h1>\n"
 	     "<p>\n");
 	puts(msg);
@@ -534,12 +546,29 @@ pg_error_badrequest(const char *msg)
 static void
 pg_error_internal(void)
 {
-	resp_begin_html(500, "Internal Server Error");
+	resp_begin_html(500, "Internal Server Error", NULL);
 	puts("<p>Internal Server Error</p>");
 	resp_end_html();
 }
 
 static void
+pg_redirect(const struct req *req, const char *name)
+{
+	printf("Status: 303 See Other\r\n"
+	    "Location: /");
+	if (*scriptname != '\0')
+		printf("%s/", scriptname);
+	if (strcmp(req->q.manpath, req->p[0]))
+		printf("%s/", req->q.manpath);
+	if (req->q.arch != NULL)
+		printf("%s/", req->q.arch);
+	printf("%s", name);
+	if (req->q.sec != NULL)
+		printf(".%s", req->q.sec);
+	printf("\r\nContent-Type: text/html; charset=utf-8\r\n\r\n");
+}
+
+static void
 pg_searchres(const struct req *req, struct manpage *r, size_t sz)
 {
 	char		*arch, *archend;
@@ -562,47 +591,25 @@ pg_searchres(const struct req *req, struct manpage *r,
 		 * If we have just one result, then jump there now
 		 * without any delay.
 		 */
-		printf("Status: 303 See Other\r\n");
-		printf("Location: http://%s/%s%s%s/%s",
-		    HTTP_HOST, scriptname,
-		    *scriptname == '\0' ? "" : "/",
-		    req->q.manpath, r[0].file);
-		printf("\r\n"
-		     "Content-Type: text/html; charset=utf-8\r\n"
-		     "\r\n");
+		printf("Status: 303 See Other\r\n"
+		    "Location: /");
+		if (*scriptname != '\0')
+			printf("%s/", scriptname);
+		if (strcmp(req->q.manpath, req->p[0]))
+			printf("%s/", req->q.manpath);
+		printf("%s\r\n"
+		    "Content-Type: text/html; charset=utf-8\r\n\r\n",
+		    r[0].file);
 		return;
 	}
 
-	resp_begin_html(200, NULL);
-	resp_searchform(req,
-	    req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY);
-
-	if (sz > 1) {
-		puts("<table class=\"results\">");
-		for (i = 0; i < sz; i++) {
-			printf("  <tr>\n"
-			       "    <td>"
-			       "<a class=\"Xr\" href=\"/%s%s%s/%s\">",
-			    scriptname, *scriptname == '\0' ? "" : "/",
-			    req->q.manpath, r[i].file);
-			html_print(r[i].names);
-			printf("</a></td>\n"
-			       "    <td><span class=\"Nd\">");
-			html_print(r[i].output);
-			puts("</span></td>\n"
-			     "  </tr>");
-		}
-		puts("</table>");
-	}
-
 	/*
 	 * In man(1) mode, show one of the pages
 	 * even if more than one is found.
 	 */
 
+	iuse = 0;
 	if (req->q.equal || sz == 1) {
-		puts("<hr>");
-		iuse = 0;
 		priouse = 20;
 		archpriouse = 3;
 		for (i = 0; i < sz; i++) {
@@ -635,6 +642,36 @@ pg_searchres(const struct req *req, struct manpage *r,
 			priouse = prio;
 			iuse = i;
 		}
+		resp_begin_html(200, NULL, r[iuse].file);
+	} else
+		resp_begin_html(200, NULL, NULL);
+
+	resp_searchform(req,
+	    req->q.equal || sz == 1 ? FOCUS_NONE : FOCUS_QUERY);
+
+	if (sz > 1) {
+		puts("<table class=\"results\">");
+		for (i = 0; i < sz; i++) {
+			printf("  <tr>\n"
+			       "    <td>"
+			       "<a class=\"Xr\" href=\"/");
+			if (*scriptname != '\0')
+				printf("%s/", scriptname);
+			if (strcmp(req->q.manpath, req->p[0]))
+				printf("%s/", req->q.manpath);
+			printf("%s\">", r[i].file);
+			html_print(r[i].names);
+			printf("</a></td>\n"
+			       "    <td><span class=\"Nd\">");
+			html_print(r[i].output);
+			puts("</span></td>\n"
+			     "  </tr>");
+		}
+		puts("</table>");
+	}
+
+	if (req->q.equal || sz == 1) {
+		puts("<hr>");
 		resp_show(req, r[iuse].file);
 	}
 
@@ -803,7 +840,8 @@ resp_format(const struct req *req, const char *file)
 	conf.fragment = 1;
 	conf.style = mandoc_strdup(CSS_DIR "/mandoc.css");
 	usepath = strcmp(req->q.manpath, req->p[0]);
-	mandoc_asprintf(&conf.man, "/%s%s%%N.%%S",
+	mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S",
+	    scriptname, *scriptname == '\0' ? "" : "/",
 	    usepath ? req->q.manpath : "", usepath ? "/" : "");
 
 	mparse_result(mp, &man, NULL);
@@ -886,7 +924,7 @@ pg_show(struct req *req, const char *fullpath)
 		return;
 	}
 
-	resp_begin_html(200, NULL);
+	resp_begin_html(200, NULL, file);
 	resp_searchform(req, FOCUS_NONE);
 	resp_show(req, file);
 	resp_end_html();
@@ -956,9 +994,13 @@ pg_search(const struct req *req)
 		}
 	}
 
-	if (0 == mansearch(&search, &paths, argc, argv, &res, &ressz))
+	res = NULL;
+	ressz = 0;
+	if (req->isquery && req->q.equal && argc == 1)
+		pg_redirect(req, argv[0]);
+	else if (mansearch(&search, &paths, argc, argv, &res, &ressz) == 0)
 		pg_noresult(req, "You entered an invalid query.");
-	else if (0 == ressz)
+	else if (ressz == 0)
 		pg_noresult(req, "No results found.");
 	else
 		pg_searchres(req, res, ressz);
@@ -978,6 +1020,22 @@ main(void)
 	const char	*querystring;
 	int		 i;
 
+#if HAVE_PLEDGE
+	/*
+	 * The "rpath" pledge could be revoked after mparse_readfd()
+	 * if the file desciptor to "/footer.html" would be opened
+	 * up front, but it's probably not worth the complication
+	 * of the code it would cause: it would require scattering
+	 * pledge() calls in multiple low-level resp_*() functions.
+	 */
+
+	if (pledge("stdio rpath", NULL) == -1) {
+		warn("pledge");
+		pg_error_internal();
+		return EXIT_FAILURE;
+	}
+#endif
+
 	/* Poor man's ReDoS mitigation. */
 
 	itimer.it_value.tv_sec = 2;
@@ -1015,7 +1073,8 @@ main(void)
 
 	if (*path != '\0') {
 		parse_path_info(&req, path);
-		if (req.q.manpath == NULL || access(path, F_OK) == -1)
+		if (req.q.manpath == NULL || req.q.sec == NULL ||
+		    *req.q.query == '\0' || access(path, F_OK) == -1)
 			path = "";
 	} else if ((querystring = getenv("QUERY_STRING")) != NULL)
 		parse_query_string(&req, querystring);

Modified: head/contrib/mdocml/cgi.h.example
==============================================================================
--- head/contrib/mdocml/cgi.h.example	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/cgi.h.example	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,6 +1,5 @@
 /* Example compile-time configuration file for man.cgi(8). */
 
-#define	HTTP_HOST "mdocml.bsd.lv"
 #define	SCRIPT_NAME "cgi-bin/man.cgi"
 #define	MAN_DIR "/man"
 #define	CSS_DIR ""

Modified: head/contrib/mdocml/chars.c
==============================================================================
--- head/contrib/mdocml/chars.c	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/chars.c	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,7 +1,7 @@
-/*	$Id: chars.c,v 1.69 2017/02/17 18:28:06 schwarze Exp $ */
+/*	$Id: chars.c,v 1.70 2017/06/02 12:43:52 schwarze Exp $ */
 /*
  * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps at bsd.lv>
- * Copyright (c) 2011, 2014, 2015 Ingo Schwarze <schwarze at openbsd.org>
+ * Copyright (c) 2011, 2014, 2015, 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
@@ -81,6 +81,10 @@ static struct ln lines[] = {
 	{ "sh",			"#",		0x0023	},
 	{ "CR",			"_|",		0x21b5	},
 	{ "OK",			"\\/",		0x2713	},
+	{ "CL",			"<club>",	0x2663	},
+	{ "SP",			"<spade>",	0x2660	},
+	{ "HE",			"<heart>",	0x2665	},
+	{ "DI",			"<diamond>",	0x2666	},
 
 	/* Legal symbols. */
 	{ "co",			"(C)",		0x00a9	},
@@ -161,6 +165,7 @@ static struct ln lines[] = {
 	{ "uA",			"=\b^",		0x21d1	},
 	{ "dA",			"=\bv",		0x21d3	},
 	{ "vA",			"^=v",		0x21d5	},
+	{ "an",			"-",		0x23af	},
 
 	/* Logic. */
 	{ "AN",			"^",		0x2227	},
@@ -234,11 +239,20 @@ static struct ln lines[] = {
 	{ "Ah",			"N",		0x2135	},
 	{ "Im",			"I",		0x2111	},
 	{ "Re",			"R",		0x211c	},
+	{ "wp",			"P",		0x2118	},
 	{ "pd",			"a",		0x2202	},
 	{ "-h",			"/h",		0x210f	},
+	{ "hbar",		"/h",		0x210f	},
 	{ "12",			"1/2",		0x00bd	},
 	{ "14",			"1/4",		0x00bc	},
 	{ "34",			"3/4",		0x00be	},
+	{ "18",			"1/8",		0x215B	},
+	{ "38",			"3/8",		0x215C	},
+	{ "58",			"5/8",		0x215D	},
+	{ "78",			"7/8",		0x215E	},
+	{ "S1",			"1",		0x00B9	},
+	{ "S2",			"2",		0x00B2	},
+	{ "S3",			"3",		0x00B3	},
 
 	/* Ligatures. */
 	{ "ff",			"ff",		0xfb00	},
@@ -354,6 +368,8 @@ static struct ln lines[] = {
 	{ "fm",			"\'",		0x2032	},
 	{ "sd",			"''",		0x2033	},
 	{ "mc",			",\bu",		0x00b5	},
+	{ "Of",			"_\ba",		0x00aa	},
+	{ "Om",			"_\bo",		0x00ba	},
 
 	/* Greek characters. */
 	{ "*A",			"A",		0x0391	},

Modified: head/contrib/mdocml/configure
==============================================================================
--- head/contrib/mdocml/configure	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/configure	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: configure,v 1.61 2017/02/18 12:24:24 schwarze Exp $
+# $Id: configure,v 1.62 2017/03/04 16:36:29 schwarze Exp $
 #
 # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze at openbsd.org>
 #
@@ -91,6 +91,7 @@ HAVE_WCHAR=
 PREFIX="/usr/local"
 BINDIR=
 SBINDIR=
+BIN_FROM_SBIN=
 INCLUDEDIR=
 LIBDIR=
 MANDIR=
@@ -458,14 +459,15 @@ echo "config.h: written" 1>&3
 
 exec > Makefile.local
 
-[ -z "${BINDIR}"     ] && BINDIR="${PREFIX}/bin"
-[ -z "${SBINDIR}"    ] && SBINDIR="${PREFIX}/sbin"
-[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include/mandoc"
-[ -z "${LIBDIR}"     ] && LIBDIR="${PREFIX}/lib/mandoc"
-[ -z "${MANDIR}"     ] && MANDIR="${PREFIX}/man"
+[ -z "${BINDIR}"          ] && BINDIR="${PREFIX}/bin"
+[ -z "${SBINDIR}"         ] && SBINDIR="${PREFIX}/sbin"
+[ -z "${BIN_FROM_SBIN}"   ] && BIN_FROM_SBIN="../bin"
+[ -z "${INCLUDEDIR}"      ] && INCLUDEDIR="${PREFIX}/include/mandoc"
+[ -z "${LIBDIR}"          ] && LIBDIR="${PREFIX}/lib/mandoc"
+[ -z "${MANDIR}"          ] && MANDIR="${PREFIX}/man"
 
-[ -z "${HTDOCDIR}"   ] && HTDOCDIR="${WWWPREFIX}/htdocs"
-[ -z "${CGIBINDIR}"  ] && CGIBINDIR="${WWWPREFIX}/cgi-bin"
+[ -z "${HTDOCDIR}"        ] && HTDOCDIR="${WWWPREFIX}/htdocs"
+[ -z "${CGIBINDIR}"       ] && CGIBINDIR="${WWWPREFIX}/cgi-bin"
 
 [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM="${INSTALL} -m 0555"
 [ -z "${INSTALL_LIB}"     ] && INSTALL_LIB="${INSTALL} -m 0444"
@@ -493,6 +495,7 @@ STATIC		= ${STATIC}
 PREFIX		= ${PREFIX}
 BINDIR		= ${BINDIR}
 SBINDIR		= ${SBINDIR}
+BIN_FROM_SBIN	= ${BIN_FROM_SBIN}
 INCLUDEDIR	= ${INCLUDEDIR}
 LIBDIR		= ${LIBDIR}
 MANDIR		= ${MANDIR}

Modified: head/contrib/mdocml/configure.local.example
==============================================================================
--- head/contrib/mdocml/configure.local.example	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/configure.local.example	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,4 +1,4 @@
-# $Id: configure.local.example,v 1.29 2017/02/18 12:24:24 schwarze Exp $
+# $Id: configure.local.example,v 1.30 2017/03/04 16:36:29 schwarze Exp $
 #
 # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze at openbsd.org>
 #
@@ -84,6 +84,13 @@ PREFIX="/usr/local"
 BINDIR="${PREFIX}/bin"
 SBINDIR="${PREFIX}/sbin"
 MANDIR="${PREFIX}/man"
+
+# If BINDIR and SBINDIR are not subdirectories of the same parent
+# directory or if the basename(1) of BINDIR differs from "bin",
+# the relative path from SBINDIR to BINDIR is also needed.
+# The default is:
+
+BIN_FROM_SBIN="../bin"
 
 # Some distributions may want to avoid naming conflicts
 # with the configuration files of other man(1) implementations.

Modified: head/contrib/mdocml/eqn.c
==============================================================================
--- head/contrib/mdocml/eqn.c	Thu Jun  8 19:30:47 2017	(r319716)
+++ head/contrib/mdocml/eqn.c	Thu Jun  8 19:40:00 2017	(r319717)
@@ -1,4 +1,4 @@
-/*	$Id: eqn.c,v 1.61 2016/01/08 00:50:45 schwarze Exp $ */
+/*	$Id: eqn.c,v 1.62 2017/03/11 15:43:04 schwarze Exp $ */
 /*
  * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps at bsd.lv>
  * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze at openbsd.org>
@@ -366,15 +366,19 @@ eqn_def_find(struct eqn_node *ep, const char *key, siz
 static const char *
 eqn_next(struct eqn_node *ep, char quote, size_t *sz, int repl)
 {
+	static size_t	 last_len;
+	static int	 lim;
+
 	char		*start, *next;
-	int		 q, diff, lim;

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


More information about the svn-src-all mailing list