Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Oct 2016 00:25:51 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r307810 - in vendor/heirloom-doctools/20161016: . checknr eqn eqn/checkeq.d eqn/eqnchar.d grap include mpm pic picpack ptx refer tbl troff troff/libhnj troff/nroff.d troff/troff.d troff...
Message-ID:  <201610230025.u9N0Ppb9094263@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Oct 23 00:25:51 2016
New Revision: 307810
URL: https://svnweb.freebsd.org/changeset/base/307810

Log:
  tag import of heirloom-doctools 20161016

Added:
  vendor/heirloom-doctools/20161016/
     - copied from r306788, vendor/heirloom-doctools/dist/
  vendor/heirloom-doctools/20161016/compat.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/compat.c
Replaced:
  vendor/heirloom-doctools/20161016/checknr/checknr.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/checknr/checknr.c
  vendor/heirloom-doctools/20161016/eqn/checkeq.d/checkeq.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c
  vendor/heirloom-doctools/20161016/eqn/diacrit.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/diacrit.c
  vendor/heirloom-doctools/20161016/eqn/e.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/e.h
  vendor/heirloom-doctools/20161016/eqn/eqnbox.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/eqnbox.c
  vendor/heirloom-doctools/20161016/eqn/eqnchar.d/genutf8.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/eqnchar.d/genutf8.c
  vendor/heirloom-doctools/20161016/eqn/funny.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/funny.c
  vendor/heirloom-doctools/20161016/eqn/integral.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/integral.c
  vendor/heirloom-doctools/20161016/eqn/io.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/io.c
  vendor/heirloom-doctools/20161016/eqn/lex.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/lex.c
  vendor/heirloom-doctools/20161016/eqn/lookup.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/lookup.c
  vendor/heirloom-doctools/20161016/eqn/matrix.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/matrix.c
  vendor/heirloom-doctools/20161016/eqn/paren.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/paren.c
  vendor/heirloom-doctools/20161016/eqn/shift.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/shift.c
  vendor/heirloom-doctools/20161016/eqn/text.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/eqn/text.c
  vendor/heirloom-doctools/20161016/grap/coord.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/coord.c
  vendor/heirloom-doctools/20161016/grap/grap.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/grap.h
  vendor/heirloom-doctools/20161016/grap/input.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/input.c
  vendor/heirloom-doctools/20161016/grap/main.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/main.c
  vendor/heirloom-doctools/20161016/grap/misc.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/grap/misc.c
  vendor/heirloom-doctools/20161016/include/global.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/include/global.h
  vendor/heirloom-doctools/20161016/mpm/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/mpm/Makefile.mk
  vendor/heirloom-doctools/20161016/mpm/misc.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/mpm/misc.h
  vendor/heirloom-doctools/20161016/pic/arcgen.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/arcgen.c
  vendor/heirloom-doctools/20161016/pic/blockgen.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/blockgen.c
  vendor/heirloom-doctools/20161016/pic/for.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/for.c
  vendor/heirloom-doctools/20161016/pic/input.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/input.c
  vendor/heirloom-doctools/20161016/pic/main.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/main.c
  vendor/heirloom-doctools/20161016/pic/misc.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/misc.c
  vendor/heirloom-doctools/20161016/pic/pic.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/pic.h
  vendor/heirloom-doctools/20161016/pic/picl.l
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/picl.l
  vendor/heirloom-doctools/20161016/pic/pltroff.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/pltroff.c
  vendor/heirloom-doctools/20161016/pic/symtab.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/pic/symtab.c
  vendor/heirloom-doctools/20161016/picpack/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/picpack/Makefile.mk
  vendor/heirloom-doctools/20161016/picpack/picpack.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/picpack/picpack.c
  vendor/heirloom-doctools/20161016/ptx/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/ptx/Makefile.mk
  vendor/heirloom-doctools/20161016/ptx/ptx.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/ptx/ptx.c
  vendor/heirloom-doctools/20161016/refer/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/Makefile.mk
  vendor/heirloom-doctools/20161016/refer/deliv2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/deliv2.c
  vendor/heirloom-doctools/20161016/refer/glue1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/glue1.c
  vendor/heirloom-doctools/20161016/refer/glue3.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/glue3.c
  vendor/heirloom-doctools/20161016/refer/glue4.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/glue4.c
  vendor/heirloom-doctools/20161016/refer/glue5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/glue5.c
  vendor/heirloom-doctools/20161016/refer/hunt1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt1.c
  vendor/heirloom-doctools/20161016/refer/hunt2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt2.c
  vendor/heirloom-doctools/20161016/refer/hunt5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt5.c
  vendor/heirloom-doctools/20161016/refer/hunt6.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt6.c
  vendor/heirloom-doctools/20161016/refer/hunt7.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt7.c
  vendor/heirloom-doctools/20161016/refer/hunt8.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt8.c
  vendor/heirloom-doctools/20161016/refer/hunt9.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/hunt9.c
  vendor/heirloom-doctools/20161016/refer/inv1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/inv1.c
  vendor/heirloom-doctools/20161016/refer/inv2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/inv2.c
  vendor/heirloom-doctools/20161016/refer/inv3.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/inv3.c
  vendor/heirloom-doctools/20161016/refer/inv5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/inv5.c
  vendor/heirloom-doctools/20161016/refer/inv6.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/inv6.c
  vendor/heirloom-doctools/20161016/refer/mkey1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/mkey1.c
  vendor/heirloom-doctools/20161016/refer/mkey2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/mkey2.c
  vendor/heirloom-doctools/20161016/refer/refer..c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer..c
  vendor/heirloom-doctools/20161016/refer/refer0.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer0.c
  vendor/heirloom-doctools/20161016/refer/refer1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer1.c
  vendor/heirloom-doctools/20161016/refer/refer2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer2.c
  vendor/heirloom-doctools/20161016/refer/refer3.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer3.c
  vendor/heirloom-doctools/20161016/refer/refer5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer5.c
  vendor/heirloom-doctools/20161016/refer/refer6.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer6.c
  vendor/heirloom-doctools/20161016/refer/refer7.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer7.c
  vendor/heirloom-doctools/20161016/refer/refer8.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/refer8.c
  vendor/heirloom-doctools/20161016/refer/shell.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/shell.c
  vendor/heirloom-doctools/20161016/refer/sortbib.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/sortbib.c
  vendor/heirloom-doctools/20161016/refer/tick.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/refer/tick.c
  vendor/heirloom-doctools/20161016/tbl/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/Makefile.mk
  vendor/heirloom-doctools/20161016/tbl/t..c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t..c
  vendor/heirloom-doctools/20161016/tbl/t0.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t0.c
  vendor/heirloom-doctools/20161016/tbl/t1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t1.c
  vendor/heirloom-doctools/20161016/tbl/t3.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t3.c
  vendor/heirloom-doctools/20161016/tbl/t4.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t4.c
  vendor/heirloom-doctools/20161016/tbl/t5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t5.c
  vendor/heirloom-doctools/20161016/tbl/t8.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/t8.c
  vendor/heirloom-doctools/20161016/tbl/tb.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tb.c
  vendor/heirloom-doctools/20161016/tbl/tc.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tc.c
  vendor/heirloom-doctools/20161016/tbl/te.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/te.c
  vendor/heirloom-doctools/20161016/tbl/tg.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tg.c
  vendor/heirloom-doctools/20161016/tbl/tm.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tm.c
  vendor/heirloom-doctools/20161016/tbl/ts.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/ts.c
  vendor/heirloom-doctools/20161016/tbl/tt.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tt.c
  vendor/heirloom-doctools/20161016/tbl/tu.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tu.c
  vendor/heirloom-doctools/20161016/tbl/tv.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/tbl/tv.c
  vendor/heirloom-doctools/20161016/troff/ext.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/ext.h
  vendor/heirloom-doctools/20161016/troff/libhnj/hnjalloc.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/libhnj/hnjalloc.c
  vendor/heirloom-doctools/20161016/troff/n1.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n1.c
  vendor/heirloom-doctools/20161016/troff/n2.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n2.c
  vendor/heirloom-doctools/20161016/troff/n3.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n3.c
  vendor/heirloom-doctools/20161016/troff/n4.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n4.c
  vendor/heirloom-doctools/20161016/troff/n5.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n5.c
  vendor/heirloom-doctools/20161016/troff/n7.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n7.c
  vendor/heirloom-doctools/20161016/troff/n8.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n8.c
  vendor/heirloom-doctools/20161016/troff/n9.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/n9.c
  vendor/heirloom-doctools/20161016/troff/nroff.d/draw.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/nroff.d/draw.c
  vendor/heirloom-doctools/20161016/troff/nroff.d/n10.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/nroff.d/n10.c
  vendor/heirloom-doctools/20161016/troff/nroff.d/n6.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/nroff.d/n6.c
  vendor/heirloom-doctools/20161016/troff/nroff.d/pt.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/nroff.d/pt.h
  vendor/heirloom-doctools/20161016/troff/tdef.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/tdef.h
  vendor/heirloom-doctools/20161016/troff/troff.d/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/Makefile.mk
  vendor/heirloom-doctools/20161016/troff/troff.d/afm.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/afm.c
  vendor/heirloom-doctools/20161016/troff/troff.d/afm.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/afm.h
  vendor/heirloom-doctools/20161016/troff/troff.d/devaps/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/devaps/Makefile.mk
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/Makefile.mk
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/Makefile.mk
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/color.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/color.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/dpost.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/dpost.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.h
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/draw.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/draw.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/gen.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/gen.h
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/misc.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/misc.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/ps_include.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/ps_include.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/request.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/request.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/request.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/request.h
  vendor/heirloom-doctools/20161016/troff/troff.d/draw.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/draw.c
  vendor/heirloom-doctools/20161016/troff/troff.d/fontmap.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/fontmap.c
  vendor/heirloom-doctools/20161016/troff/troff.d/fontmap.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/fontmap.h
  vendor/heirloom-doctools/20161016/troff/troff.d/otf.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/otf.c
  vendor/heirloom-doctools/20161016/troff/troff.d/otfdump.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/otfdump.c
  vendor/heirloom-doctools/20161016/troff/troff.d/pt.h
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/pt.h
  vendor/heirloom-doctools/20161016/troff/troff.d/t10.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/t10.c
  vendor/heirloom-doctools/20161016/troff/troff.d/t6.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/troff/troff.d/t6.c
  vendor/heirloom-doctools/20161016/vgrind/vfontedpr.c
     - copied unchanged from r307809, vendor/heirloom-doctools/dist/vgrind/vfontedpr.c
Deleted:
  vendor/heirloom-doctools/20161016/picpack/getopt.c
  vendor/heirloom-doctools/20161016/troff/troff.d/devaps/getopt.c
  vendor/heirloom-doctools/20161016/troff/troff.d/dpost.d/getopt.c

Copied: vendor/heirloom-doctools/20161016/checknr/checknr.c (from r307809, vendor/heirloom-doctools/dist/checknr/checknr.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/20161016/checknr/checknr.c	Sun Oct 23 00:25:51 2016	(r307810, copy of r307809, vendor/heirloom-doctools/dist/checknr/checknr.c)
@@ -0,0 +1,637 @@
+/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*	from OpenSolaris "checknr.c	1.8	05/06/02 SMI"	*/
+
+/*
+ * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
+ */
+#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4 || __GNUC__ >= 4
+#define	USED	__attribute__ ((used))
+#elif defined __GNUC__
+#define	USED	__attribute__ ((unused))
+#else
+#define	USED
+#endif
+static const char sccsid[] USED = "@(#)/usr/ucb/checknr.sl	1.3 (gritter) 11/6/05";
+
+/*
+ * checknr: check an nroff/troff input file for matching macro calls.
+ * we also attempt to match size and font changes, but only the embedded
+ * kind.  These must end in \s0 and \fP resp.  Maybe more sophistication
+ * later but for now think of these restrictions as contributions to
+ * structured typesetting.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include "global.h"
+
+static	int	maxstk;	/* Stack size */
+#define	MAXBR	100	/* Max number of bracket pairs known */
+#define	MAXCMDS	500	/* Max number of commands known */
+
+/*
+ * The stack on which we remember what we've seen so far.
+ */
+static struct stkstr {
+	int opno;	/* number of opening bracket */
+	int pl;		/* '+', '-', ' ' for \s, 1 for \f, 0 for .ft */
+	int parm;	/* parm to size, font, etc */
+	int lno;	/* line number the thing came in in */
+} *stk;
+static int stktop;
+
+/*
+ * The kinds of opening and closing brackets.
+ */
+static struct brstr {
+	char *opbr;
+	char *clbr;
+} br[MAXBR] = {
+	/* A few bare bones troff commands */
+#define	SZ	0
+	{ "sz",	"sz" },	/* also \s */
+#define	FT	1
+	{ "ft",	"ft" },	/* also \f */
+	/* the -mm package */
+	{ "AL",	"LE" },
+	{ "AS",	"AE" },
+	{ "BL",	"LE" },
+	{ "BS",	"BE" },
+	{ "DF",	"DE" },
+	{ "DL",	"LE" },
+	{ "DS",	"DE" },
+	{ "FS",	"FE" },
+	{ "ML",	"LE" },
+	{ "NS",	"NE" },
+	{ "RL",	"LE" },
+	{ "VL",	"LE" },
+	/* the -ms package */
+	{ "AB",	"AE" },
+	{ "BD",	"DE" },
+	{ "CD",	"DE" },
+	{ "DS",	"DE" },
+	{ "FS",	"FE" },
+	{ "ID",	"DE" },
+	{ "KF",	"KE" },
+	{ "KS",	"KE" },
+	{ "LD",	"DE" },
+	{ "LG",	"NL" },
+	{ "QS",	"QE" },
+	{ "RS",	"RE" },
+	{ "SM",	"NL" },
+	{ "XA",	"XE" },
+	{ "XS",	"XE" },
+	/* The -me package */
+	{ "(b",	")b" },
+	{ "(c",	")c" },
+	{ "(d",	")d" },
+	{ "(f",	")f" },
+	{ "(l",	")l" },
+	{ "(q",	")q" },
+	{ "(x",	")x" },
+	{ "(z",	")z" },
+	/* Things needed by preprocessors */
+	{ "EQ",	"EN" },
+	{ "TS",	"TE" },
+	/* Refer */
+	{ "[",	"]" },
+	{ NULL,	NULL }
+};
+
+/*
+ * All commands known to nroff, plus macro packages.
+ * Used so we can complain about unrecognized commands.
+ */
+static char *knowncmds[MAXCMDS] = {
+"$c", "$f", "$h", "$p", "$s", "(b", "(c", "(d", "(f", "(l", "(q", "(t",
+"(x", "(z", ")b", ")c", ")d", ")f", ")l", ")q", ")t", ")x", ")z", "++",
+"+c", "1C", "1c", "2C", "2c", "@(", "@)", "@C", "@D", "@F", "@I", "@M",
+"@c", "@e", "@f", "@h", "@m", "@n", "@o", "@p", "@r", "@t", "@z", "AB",
+"AE", "AF", "AI", "AL", "AM", "AS", "AT", "AU", "AX", "B",  "B1", "B2",
+"BD", "BE", "BG", "BL", "BS", "BT", "BX", "C1", "C2", "CD", "CM", "CT",
+"D",  "DA", "DE", "DF", "DL", "DS", "DT", "EC", "EF", "EG", "EH", "EM",
+"EN", "EQ", "EX", "FA", "FD", "FE", "FG", "FJ", "FK", "FL", "FN", "FO",
+"FQ", "FS", "FV", "FX", "H",  "HC", "HD", "HM", "HO", "HU", "I",  "ID",
+"IE", "IH", "IM", "IP", "IX", "IZ", "KD", "KE", "KF", "KQ", "KS", "LB",
+"LC", "LD", "LE", "LG", "LI", "LP", "MC", "ME", "MF", "MH", "ML", "MR",
+"MT", "ND", "NE", "NH", "NL", "NP", "NS", "OF", "OH", "OK", "OP", "P",
+"P1", "PF", "PH", "PP", "PT", "PX", "PY", "QE", "QP", "QS", "R",  "RA",
+"RC", "RE", "RL", "RP", "RQ", "RS", "RT", "S",  "S0", "S2", "S3", "SA",
+"SG", "SH", "SK", "SM", "SP", "SY", "T&", "TA", "TB", "TC", "TD", "TE",
+"TH", "TL", "TM", "TP", "TQ", "TR", "TS", "TX", "UL", "US", "UX", "VL",
+"WC", "WH", "XA", "XD", "XE", "XF", "XK", "XP", "XS", "[",  "[-", "[0",
+"[1", "[2", "[3", "[4", "[5", "[<", "[>", "[]", "]",  "]-", "]<", "]>",
+"][", "ab", "ac", "ad", "af", "am", "ar", "as", "b",  "ba", "bc", "bd",
+"bi", "bl", "bp", "br", "bx", "c.", "c2", "cc", "ce", "cf", "ch",
+"chop", "cs", "ct", "cu", "da", "de", "di", "dl", "dn", "do", "ds",
+"dt", "dw", "dy", "ec", "ef", "eh", "el", "em", "eo", "ep", "ev",
+"evc", "ex", "fallback", "fc", "feature", "fi", "fl", "flig", "fo",
+"fp", "ft", "ftr", "fz", "fzoom", "hc", "he", "hidechar", "hl", "hp",
+"ht", "hw", "hx", "hy", "hylang", "i", "ie", "if", "ig", "in", "ip",
+"it", "ix", "kern", "kernafter", "kernbefore", "kernpair", "lc", "lg",
+"lhang", "lc_ctype", "li", "ll", "ln", "lo", "lp", "ls", "lt", "m1",
+"m2", "m3", "m4", "mc", "mk", "mo", "n1", "n2", "na", "ne", "nf", "nh",
+"nl", "nm", "nn", "np", "nr", "ns", "nx", "of", "oh", "os", "pa",
+"papersize", "pc", "pi", "pl", "pm", "pn", "po", "pp", "ps", "q",
+"r",  "rb", "rd", "re", "recursionlimit", "return", "rhang", "rm",
+"rn", "ro", "rr", "rs", "rt", "sb", "sc", "sh", "shift", "sk", "so",
+"sp", "ss", "st", "sv", "sz", "ta", "tc", "th", "ti", "tl", "tm", "tp",
+"tr", "track", "u",  "uf", "uh", "ul", "vs", "wh", "xflag", "xp", "yr",
+0
+};
+
+static	int	lineno;		/* current line number in input file */
+static	char	*line;		/* the current line */
+static	size_t	linesize;	/* allocated size of current line */
+static	char	*cfilename;	/* name of current file */
+static	int	nfiles;		/* number of files to process */
+static	int	fflag;		/* -f: ignore \f */
+static	int	sflag;		/* -s: ignore \s */
+static	int	ncmds;		/* size of knowncmds */
+static	int	slot;		/* slot in knowncmds found by binsrch */
+
+static void growstk(void);
+static void usage(void);
+static void process(FILE *f);
+static void complain(int i);
+static void prop(int i);
+static void chkcmd(char *line, char *mac);
+static void nomatch(char *mac);
+static int eq(char *s1, char *s2);
+static void pe(int lineno);
+static void checkknown(char *mac);
+static void addcmd(char *line);
+static void addmac(char *mac);
+static int binsrch(char *mac);
+
+static void
+growstk(void)
+{
+	stktop++;
+	if (stktop >= maxstk) {
+		maxstk *= 2;
+		stk = realloc(stk, sizeof *stk * maxstk);
+	}
+}
+
+int
+main(int argc, char **argv)
+{
+	FILE *f;
+	int i;
+	char *cp, *cq, c;
+
+	stk = calloc(sizeof *stk, maxstk = 100);
+	/* Figure out how many known commands there are */
+	while (knowncmds[ncmds])
+		ncmds++;
+	while (argc > 1 && argv[1][0] == '-') {
+		switch (argv[1][1]) {
+
+		/* -a: add pairs of macros */
+		case 'a':
+			/* look for empty macro slots */
+			for (i = 0; br[i].opbr; i++)
+				;
+			cp = &argv[1][3];
+			while (*cp) {
+				size_t s;
+				if (i >= MAXBR - 3) {
+					printf("Only %d known pairs allowed\n",
+							MAXBR/2);
+					exit(1);
+				}
+				for (cq = cp; *cq && *cq != '.'; cq++);
+				if (*cq != '.')
+					usage();
+				*cq = 0;
+				s = cq - cp + 1;
+				br[i].opbr = malloc(s);
+				n_strcpy(br[i].opbr, cp, s);
+				*cq = '.';
+				cp = &cq[1];
+				for (cq = cp; *cq && *cq != '.'; cq++);
+				c = *cq;
+				*cq = 0;
+				s = cq - cp + 1;
+				br[i].clbr = malloc(s);
+				n_strcpy(br[i].clbr, cp, s);
+				*cq = c;
+				cp = c ? &cq[1] : cq;
+				/* knows pairs are also known cmds */
+				addmac(br[i].opbr);
+				addmac(br[i].clbr);
+				i++;
+			}
+			break;
+
+		/* -c: add known commands */
+		case 'c':
+			cp = &argv[1][3];
+			while (*cp) {
+				for (cq = cp; *cq && *cq != '.'; cq++);
+				c = *cq;
+				*cq = 0;
+				addmac(cp);
+				*cq = c;
+				cp = c ? &cq[1] : cq;
+			}
+			break;
+
+		/* -f: ignore font changes */
+		case 'f':
+			fflag = 1;
+			break;
+
+		/* -s: ignore size changes */
+		case 's':
+			sflag = 1;
+			break;
+		default:
+			usage();
+		}
+		argc--; argv++;
+	}
+
+	nfiles = argc - 1;
+
+	if (nfiles > 0) {
+		for (i = 1; i < argc; i++) {
+			cfilename = argv[i];
+			f = fopen(cfilename, "r");
+			if (f == NULL) {
+				perror(cfilename);
+				exit(1);
+				}
+			else {
+				process(f);
+				fclose(f);
+			}
+		}
+	} else {
+		cfilename = "stdin";
+		process(stdin);
+	}
+	return (0);
+}
+
+static void
+usage(void)
+{
+	printf("Usage: checknr -s -f -a.xx.yy.xx.yy... -c.xx.xx.xx...\n");
+	exit(1);
+}
+
+static void
+process(FILE *f)
+{
+	int i, n;
+	char mac[512];	/* The current macro or nroff command */
+	int pl;
+
+	stktop = -1;
+	for (lineno = 1; getline(&line, &linesize, f) > 0; lineno++) {
+		if (line[0] == '.') {
+			/*
+			 * find and isolate the macro/command name.
+			 */
+			strncpy(mac, line+1, sizeof mac-1)[sizeof mac-1] = 0;
+			if (isspace(mac[0]&0377)) {
+				pe(lineno);
+				printf("Empty command\n");
+			} else {
+				for (i = 1; mac[i]; i++)
+					if (isspace(mac[i]&0377)) {
+						mac[i] = 0;
+						break;
+					}
+			}
+
+			/*
+			 * Is it a known command?
+			 */
+			checkknown(mac);
+
+			/*
+			 * Should we add it?
+			 */
+			if (eq(mac, "de"))
+				addcmd(line);
+
+			chkcmd(line, mac);
+		}
+
+		/*
+		 * At this point we process the line looking
+		 * for \s and \f.
+		 */
+		for (i = 0; line[i]; i++)
+			if (line[i] == '\\' && (i == 0 || line[i-1] != '\\')) {
+				if (!sflag && line[++i] == 's') {
+					pl = line[++i]&0377;
+					if (isdigit(pl)) {
+						n = pl - '0';
+						pl = ' ';
+					} else
+						n = 0;
+					while (isdigit(line[++i]&0377))
+						n = 10 * n + line[i] - '0';
+					i--;
+					if (n == 0) {
+						if (stk[stktop].opno == SZ) {
+							stktop--;
+						} else {
+							pe(lineno);
+							printf(
+						"unmatched \\s0\n");
+						}
+					} else {
+						growstk();
+						stk[stktop].opno = SZ;
+						stk[stktop].pl = pl;
+						stk[stktop].parm = n;
+						stk[stktop].lno = lineno;
+					}
+				} else if (!fflag && line[i] == 'f') {
+					n = line[++i];
+					if (n == 'P') {
+						if (stk[stktop].opno == FT) {
+							stktop--;
+						} else {
+							pe(lineno);
+							printf(
+						"unmatched \\fP\n");
+						}
+					} else {
+						growstk();
+						stk[stktop].opno = FT;
+						stk[stktop].pl = 1;
+						stk[stktop].parm = n;
+						stk[stktop].lno = lineno;
+					}
+				}
+			}
+	}
+	/*
+	 * We've hit the end and look at all this stuff that hasn't been
+	 * matched yet!  Complain, complain.
+	 */
+	for (i = stktop; i >= 0; i--) {
+		complain(i);
+	}
+}
+
+static void
+complain(int i)
+{
+	pe(stk[i].lno);
+	printf("Unmatched ");
+	prop(i);
+	printf("\n");
+}
+
+static void
+prop(int i)
+{
+	if (stk[i].pl == 0)
+		printf(".%s", br[stk[i].opno].opbr);
+	else switch (stk[i].opno) {
+	case SZ:
+		printf("\\s%c%d", stk[i].pl, stk[i].parm);
+		break;
+	case FT:
+		printf("\\f%c", stk[i].parm);
+		break;
+	default:
+		printf("Bug: stk[%d].opno = %d = .%s, .%s",
+			i, stk[i].opno, br[stk[i].opno].opbr,
+			br[stk[i].opno].clbr);
+	}
+}
+
+/* ARGSUSED */
+static void
+chkcmd(char *line, char *mac)
+{
+	int i;
+
+	/*
+	 * Check to see if it matches top of stack.
+	 */
+	if (stktop >= 0 && eq(mac, br[stk[stktop].opno].clbr))
+		stktop--;	/* OK. Pop & forget */
+	else {
+		/* No. Maybe it's an opener */
+		for (i = 0; br[i].opbr; i++) {
+			if (eq(mac, br[i].opbr)) {
+				/* Found. Push it. */
+				growstk();
+				stk[stktop].opno = i;
+				stk[stktop].pl = 0;
+				stk[stktop].parm = 0;
+				stk[stktop].lno = lineno;
+				break;
+			}
+			/*
+			 * Maybe it's an unmatched closer.
+			 * NOTE: this depends on the fact
+			 * that none of the closers can be
+			 * openers too.
+			 */
+			if (eq(mac, br[i].clbr)) {
+				nomatch(mac);
+				break;
+			}
+		}
+	}
+}
+
+static void
+nomatch(char *mac)
+{
+	int i, j;
+
+	/*
+	 * Look for a match further down on stack
+	 * If we find one, it suggests that the stuff in
+	 * between is supposed to match itself.
+	 */
+	for (j = stktop; j >= 0; j--)
+		if (eq(mac, br[stk[j].opno].clbr)) {
+			/* Found.  Make a good diagnostic. */
+			if (j == stktop-2) {
+				/*
+				 * Check for special case \fx..\fR and don't
+				 * complain.
+				 */
+				if (stk[j+1].opno == FT &&
+				    stk[j+1].parm != 'R' &&
+				    stk[j+2].opno == FT &&
+				    stk[j+2].parm == 'R') {
+					stktop = j -1;
+					return;
+				}
+				/*
+				 * We have two unmatched frobs.  Chances are
+				 * they were intended to match, so we mention
+				 * them together.
+				 */
+				pe(stk[j+1].lno);
+				prop(j+1);
+				printf(" does not match %d: ", stk[j+2].lno);
+				prop(j+2);
+				printf("\n");
+			} else for (i = j+1; i <= stktop; i++) {
+				complain(i);
+			}
+			stktop = j-1;
+			return;
+		}
+	/* Didn't find one.  Throw this away. */
+	pe(lineno);
+	printf("Unmatched .%s\n", mac);
+}
+
+/* eq: are two strings equal? */
+static int
+eq(char *s1, char *s2)
+{
+	return (strcmp(s1, s2) == 0);
+}
+
+/* print the first part of an error message, given the line number */
+static void
+pe(int lineno)
+{
+	if (nfiles > 1)
+		printf("%s: ", cfilename);
+	printf("%d: ", lineno);
+}
+
+static void
+checkknown(char *mac)
+{
+
+	if (eq(mac, "."))
+		return;
+	if (binsrch(mac) >= 0)
+		return;
+	if (mac[0] == '\\' && mac[1] == '"')	/* comments */
+		return;
+
+	pe(lineno);
+	printf("Unknown command: .%s\n", mac);
+}
+
+/*
+ * We have a .de xx line in "line".  Add xx to the list of known commands.
+ */
+static void
+addcmd(char *line)
+{
+	char *mac;
+
+	/* grab the macro being defined */
+	mac = line+4;
+	while (isspace(*mac&0377))
+		mac++;
+	if (*mac == 0) {
+		pe(lineno);
+		printf("illegal define: %s\n", line);
+		return;
+	}
+	mac[2] = 0;
+	if (isspace(mac[1]&0377) || mac[1] == '\\')
+		mac[1] = 0;
+	addmac(mac);
+}
+
+/*
+ * Add mac to the list.  We should really have some kind of tree
+ * structure here but this is a quick-and-dirty job and I just don't
+ * have time to mess with it.  (I wonder if this will come back to haunt
+ * me someday?)  Anyway, I claim that .de is fairly rare in user
+ * nroff programs, and the loop below is pretty fast.
+ */
+static void
+addmac(char *mac)
+{
+	char **src, **dest, **loc;
+	size_t s;
+
+	if (binsrch(mac) >= 0) {	/* it's OK to redefine something */
+#ifdef DEBUG
+		printf("binsrch(%s) -> already in table\n", mac);
+#endif
+		return;
+	}
+	/* binsrch sets slot as a side effect */
+#ifdef DEBUG
+printf("binsrch(%s) -> %d\n", mac, slot);
+#endif
+	if (ncmds >= MAXCMDS) {
+		printf("Only %d known commands allowed\n", MAXCMDS);
+		exit(1);
+	}
+	loc = &knowncmds[slot];
+	src = &knowncmds[ncmds-1];
+	dest = src+1;
+	while (dest > loc)
+		*dest-- = *src--;
+	s = strlen(mac) + 1;
+	*loc = malloc(s);
+	n_strcpy(*loc, mac, s);
+	ncmds++;
+#ifdef DEBUG
+	printf("after: %s %s %s %s %s, %d cmds\n",
+	    knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot],
+	    knowncmds[slot+1], knowncmds[slot+2], ncmds);
+#endif
+}
+
+/*
+ * Do a binary search in knowncmds for mac.
+ * If found, return the index.  If not, return -1.
+ */
+static int
+binsrch(char *mac)
+{
+	char *p;	/* pointer to current cmd in list */
+	int d;		/* difference if any */
+	int mid;	/* mid point in binary search */
+	int top, bot;	/* boundaries of bin search, inclusive */
+
+	top = ncmds-1;
+	bot = 0;
+	while (top >= bot) {
+		mid = (top+bot)/2;
+		p = knowncmds[mid];
+		d = p[0] - mac[0];
+		if (d == 0)
+			d = strcmp(&p[1], &mac[1]);
+		if (d == 0)
+			return (mid);
+		if (d < 0)
+			bot = mid + 1;
+		else
+			top = mid - 1;
+	}
+	slot = bot;	/* place it would have gone */
+	return (-1);
+}

Copied: vendor/heirloom-doctools/20161016/compat.c (from r307809, vendor/heirloom-doctools/dist/compat.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/20161016/compat.c	Sun Oct 23 00:25:51 2016	(r307810, copy of r307809, vendor/heirloom-doctools/dist/compat.c)
@@ -0,0 +1,47 @@
+/* Carsten Kunze, 2016 */
+
+#include <string.h>
+
+#ifndef HAVE_STRLCPY
+size_t
+strlcpy(char *dst, const char *src, size_t dstsize) {
+	size_t srcsize;
+	/* Not conform to strlcpy, but avoids to access illegal memory in case
+	 * of unterminated strings */
+	for (srcsize = 0; srcsize < dstsize; srcsize++)
+		if (!src[srcsize])
+			break;
+	if (dstsize > srcsize)
+		dstsize = srcsize;
+	else if (dstsize)
+		dstsize--;
+	if (dstsize)
+		/* assumes non-overlapping buffers */
+		memcpy(dst, src, dstsize);
+	dst[dstsize] = 0;
+	return srcsize;
+}
+#endif
+
+#ifndef HAVE_STRLCAT
+size_t
+strlcat(char *dst, const char *src, size_t dstsize) {
+	size_t ld, ls;
+	for (ld = 0; ld < dstsize - 1; ld++)
+		if (!dst[ld])
+			break;
+	dst += ld;
+	dstsize -= ld;
+	for (ls = 0; ls < dstsize; ls++)
+		if (!src[ls])
+			break;
+	if (dstsize > ls)
+		dstsize = ls;
+	else if (dstsize)
+		dstsize--;
+	if (dstsize)
+		memcpy(dst, src, dstsize);
+	dst[dstsize] = 0;
+	return ld + ls;
+}
+#endif

Copied: vendor/heirloom-doctools/20161016/eqn/checkeq.d/checkeq.c (from r307809, vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/20161016/eqn/checkeq.d/checkeq.c	Sun Oct 23 00:25:51 2016	(r307810, copy of r307809, vendor/heirloom-doctools/dist/eqn/checkeq.d/checkeq.c)
@@ -0,0 +1,128 @@
+/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*	from OpenSolaris "checkeq.c	1.6	05/06/02 SMI"	*/
+
+/*
+ * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
+ */
+#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4 || __GNUC__ >= 4
+#define	USED	__attribute__ ((used))
+#elif defined __GNUC__
+#define	USED	__attribute__ ((unused))
+#else
+#define	USED
+#endif
+static const char sccsid[] USED = "@(#)/usr/ucb/checkeq.sl	4.1 (gritter) 9/15/05";
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static void check(FILE *);
+
+static	FILE	*fin;
+static	int	delim	= '$';
+
+int
+main(int argc, char **argv)
+{
+	if (argc <= 1)
+		check(stdin);
+	else
+		while (--argc > 0) {
+			if ((fin = fopen(*++argv, "r")) == NULL) {
+				perror(*argv);
+				exit(1);
+			}
+			printf("%s:\n", *argv);
+			check(fin);
+			fclose(fin);
+		}
+	return (0);
+}
+
+static void
+check(FILE *f)
+{
+	int start, line, eq, ndel, totdel;
+	char *in = NULL, *p;
+	size_t insize = 0;
+
+	start = eq = line = ndel = totdel = 0;
+	while (getline(&in, &insize, f) > 0) {
+		line++;
+		ndel = 0;
+		for (p = in; *p; p++)
+			if (*p == delim)
+				ndel++;
+		if (*in == '.' && *(in+1) == 'E' && *(in+2) == 'Q') {
+			if (eq++)
+				printf("   Spurious EQ, line %d\n", line);
+			if (totdel)
+				printf("   EQ in %c%c, line %d\n",
+				    delim, delim, line);
+		} else if (*in == '.' && *(in+1) == 'E' && *(in+2) == 'N') {
+			if (eq == 0)
+				printf("   Spurious EN, line %d\n", line);
+			else
+				eq = 0;
+			if (totdel > 0)
+				printf("   EN in %c%c, line %d\n",
+				    delim, delim, line);
+			start = 0;
+		} else if (eq && *in == 'd' && *(in+1) == 'e' &&
+		    *(in+2) == 'l' && *(in+3) == 'i' && *(in+4) == 'm') {
+			for (p = in+5; *p; p++)
+				if (*p != ' ') {
+					if (*p == 'o' && *(p+1) == 'f')
+						delim = 0;
+					else
+						delim = *p;
+					break;
+				}
+			if (delim == 0)
+				printf("   Delim off, line %d\n", line);
+			else
+				printf("   New delims %c%c, line %d\n",
+				    delim, delim, line);
+		}
+		if (ndel > 0 && eq > 0)
+			printf("   %c%c in EQ, line %d\n", delim,
+			    delim, line);
+		if (ndel == 0)
+			continue;
+		totdel += ndel;
+		if (totdel%2) {
+			if (start == 0)
+				start = line;
+			else {
+				printf("   %d line %c%c, lines %d-%d\n",
+				    line-start+1, delim, delim, start, line);
+				start = line;
+			}
+		} else {
+			if (start > 0) {
+				printf("   %d line %c%c, lines %d-%d\n",
+				    line-start+1, delim, delim, start, line);
+				start = 0;
+			}
+			totdel = 0;
+		}
+	}
+	if (totdel)
+		printf("   Unfinished %c%c\n", delim, delim);
+	if (eq)
+		printf("   Unfinished EQ\n");
+}

Copied: vendor/heirloom-doctools/20161016/eqn/diacrit.c (from r307809, vendor/heirloom-doctools/dist/eqn/diacrit.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/20161016/eqn/diacrit.c	Sun Oct 23 00:25:51 2016	(r307810, copy of r307809, vendor/heirloom-doctools/dist/eqn/diacrit.c)
@@ -0,0 +1,128 @@
+/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+     
+/*
+ * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
+ * All Rights Reserved.
+ */
+
+/*	from OpenSolaris "diacrit.c	1.6	05/06/02 SMI"	 SVr4.0 1.1		*/
+
+/*
+ * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
+ *
+ * Sccsid @(#)diacrit.c	1.7 (gritter) 1/13/08
+ */
+
+#include "e.h"
+#include "y.tab.h"
+
+void
+diacrit(int p1, int type) {
+	int c, t;
+#ifndef NEQN
+	float effps;
+#endif /* NEQN */
+
+	c = oalloc();
+	t = oalloc();
+#ifdef NEQN
+	nrwid(p1, ps, p1);
+	printf(".nr 10 %gu\n", (float)max(eht[p1]-ebase[p1]-VERT(2),0));
+#else /* NEQN */
+	effps = EFFPS(ps);
+	nrwid(p1, effps, p1);
+	printf(".nr 10 %gp\n", VERT(max(eht[p1]-ebase[p1]-EM(1,ps),0)));	/* vertical shift if high */
+	printf(".if \\n(ct>1 .nr 10 \\n(10+\\s%s.25m\\s0\n", tsize(effps));
+	if (type != HAT && type != TILDE) {
+		printf(".nr %d \\s%s.1m\\s0\n", t, tsize(effps));	/* horiz shift if high */
+		printf(".if \\n(ct>1 .nr %d \\s%s.15m\\s0\n", t, tsize(effps));
+	} else
+		printf(".nr %d 0\n", t);
+#endif /* NEQN */
+	switch(type) {
+		case VEC:	/* vec */
+#ifndef NEQN
+			printf(".ds %d \\v'-.4m'\\s%s\\(->\\s0\\v'.4m'\n",
+			    c, tsize(max(effps-3, 6)));
+			break;
+#endif /* NEQN */
+		case DYAD:	/* dyad */
+#ifdef NEQN
+			printf(".ds %d \\v'-12p'_\\v'12p'\n", c);
+#else /* !NEQN */
+			printf(".ds %d \\v'-.4m'\\s%s\\z\\(<-\\(->\\s0\\v'.4m'\n",
+			    c, tsize(max(effps-3, 6)));
+#endif /* !NEQN */
+			break;
+		case HAT:
+			printf(".ds %d ^\n", c);
+			break;
+		case TILDE:
+			printf(".ds %d ~\n", c);
+			break;
+		case DOT:
+#ifndef NEQN
+			printf(".ds %d \\s%s\\v'-.67m'.\\v'.67m'\\s0\n", c, tsize(effps));
+#else /* NEQN */
+			printf(".ds %d \\v'-12p'.\\v'12p'\n", c);
+#endif /* NEQN */
+			break;
+		case DOTDOT:
+#ifndef NEQN
+			printf(".ds %d \\s%s\\v'-.67m'..\\v'.67m\\s0'\n", c, tsize(effps));
+#else /* NEQN */
+			printf(".ds %d \\v'-12p'..\\v'12p'\n", c);
+#endif /* NEQN */
+			break;
+		case BAR:
+#ifndef NEQN
+			printf(".ds %d \\s%s\\v'.28m'\\h'.05m'\\l'\\n(%du-.1m\\(rn'\\h'.05m'\\v'-.28m'\\s0\n",
+				c, tsize(effps), p1);
+#else /* NEQN */
+			printf(".ds %d \\v'-12p'\\l'\\n(%du'\\v'12p'\n", 
+				c, p1);
+#endif /* NEQN */
+			break;
+		case UNDER:
+#ifndef NEQN
+			printf(".ds %d \\l'\\n(%du\\(ul'\n", c, p1);
+			printf(".nr %d 0\n", t);
+			printf(".nr 10 0-%gp\n", ebase[p1]);
+#else /* NEQN */
+			printf(".ds %d \\l'\\n(%du'\n", c, p1);
+#endif /* NEQN */
+			break;
+		}
+	nrwid(c, ps, c);
+#ifndef NEQN
+	if (!ital(lfont[p1]))
+		printf(".nr %d 0\n", t);
+	printf(".as %d \\h'-\\n(%du-\\n(%du/2u+\\n(%du'\\v'0-\\n(10u'\\*(%d", 
+		p1, p1, c, t, c);
+	printf("\\v'\\n(10u'\\h'-\\n(%du+\\n(%du/2u-\\n(%du'\n", c, p1, t);
+	/* BUG - should go to right end of widest */
+#else /* NEQN */
+	printf(".as %d \\h'-\\n(%du-\\n(%du/2u'\\v'0-\\n(10u'\\*(%d", 
+		p1, p1, c, c);
+	printf("\\v'\\n(10u'\\h'-\\n(%du+\\n(%du/2u'\n", c, p1);
+#endif /* NEQN */
+#ifndef NEQN
+	if (type != UNDER)
+		eht[p1] += VERT(EM(0.15, ps));	/* 0.15m */
+	if(dbg)printf(".\tdiacrit: %c over S%d, lf=%c, rf=%c, h=%g,b=%g\n",
+		type, p1, lfont[p1], rfont[p1], eht[p1], ebase[p1]);
+#else /* NEQN */
+	if (type != UNDER)
+		eht[p1] += VERT(1);
+	if (dbg) printf(".\tdiacrit: %c over S%d, h=%d, b=%d\n", type, p1, eht[p1], ebase[p1]);
+#endif /* NEQN */
+	ofree(c); ofree(t);
+}

Copied: vendor/heirloom-doctools/20161016/eqn/e.h (from r307809, vendor/heirloom-doctools/dist/eqn/e.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/20161016/eqn/e.h	Sun Oct 23 00:25:51 2016	(r307810, copy of r307809, vendor/heirloom-doctools/dist/eqn/e.h)
@@ -0,0 +1,178 @@
+/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+     
+/*
+ * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
+ * All Rights Reserved.
+ */
+
+/*	from "e.h	1.5	05/06/02 SMI"	"ucbeqn:e.h 1.1" */
+
+/*
+ * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
+ *
+ * Sccsid @(#)e.h	1.13 (gritter) 1/13/08
+ */
+
+/*
+ * Changes Copyright (c) 2014 Carsten Kunze (carsten.kunze at arcor.de)
+ */
+
+#include <stdio.h>
+#include <inttypes.h>
+#include "global.h"
+
+#define	FATAL	1
+#define	ROM	'1'
+#ifndef NEQN
+#define	ITAL	'2'
+#define	BLD	'3'
+#else /* NEQN */
+#define	ITAL	'1'
+#define	BLD	'1'
+#endif /* NEQN */
+
+#define	rom(c)	(((c) & 0177) == ROM)
+#define	ital(c)	(((c) & 0177) == ITAL)
+#define	bld(c)	(((c) & 0177) == BLD)
+

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610230025.u9N0Ppb9094263>