svn commit: r310550 - in vendor/heirloom-doctools/dist: checknr eqn eqn/eqn.d grap mpm pic ptx refer soelim troff troff/libhnj troff/nroff.d troff/troff.d troff/troff.d/dhtml troff/troff.d/dpost.d ...

Baptiste Daroussin bapt at FreeBSD.org
Sun Dec 25 17:53:13 UTC 2016


Author: bapt
Date: Sun Dec 25 17:53:10 2016
New Revision: 310550
URL: https://svnweb.freebsd.org/changeset/base/310550

Log:
  Import heirloom doctools 2016-11-06

Added:
  vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7.in   (contents, props changed)
  vendor/heirloom-doctools/dist/grap/grap.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/ptx/ptx.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/refer/lookbib.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/refer/refer.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/refer/roffbib.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/soelim/soelim.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/nroff.d/nroff.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/B.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/BI.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/C.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CB.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CI.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CR.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CW.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/H.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HB.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HI.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/I.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/R.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/S.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mcolor.7.in   (contents, props changed)
  vendor/heirloom-doctools/dist/troff/troff.d/troff.1.in   (contents, props changed)
  vendor/heirloom-doctools/dist/vgrind/vgrind.1.in   (contents, props changed)
Deleted:
  vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7
  vendor/heirloom-doctools/dist/grap/grap.1
  vendor/heirloom-doctools/dist/ptx/ptx.1
  vendor/heirloom-doctools/dist/refer/lookbib.1
  vendor/heirloom-doctools/dist/refer/refer.1
  vendor/heirloom-doctools/dist/refer/roffbib.1
  vendor/heirloom-doctools/dist/soelim/soelim.1
  vendor/heirloom-doctools/dist/troff/nroff.d/nroff.1
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.1
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/B
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/BI
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/C
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CB
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CI
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CR
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/CW
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/H
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HB
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/HI
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/I
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/R
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/S
  vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/mcolor.7
  vendor/heirloom-doctools/dist/troff/troff.d/troff.1
  vendor/heirloom-doctools/dist/vgrind/vgrind.1
Modified:
  vendor/heirloom-doctools/dist/checknr/checknr.c
  vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk
  vendor/heirloom-doctools/dist/eqn/io.c
  vendor/heirloom-doctools/dist/grap/Makefile.mk
  vendor/heirloom-doctools/dist/grap/grapl.l
  vendor/heirloom-doctools/dist/grap/main.c
  vendor/heirloom-doctools/dist/mpm/page.cc
  vendor/heirloom-doctools/dist/pic/input.c
  vendor/heirloom-doctools/dist/pic/main.c
  vendor/heirloom-doctools/dist/pic/picl.l
  vendor/heirloom-doctools/dist/ptx/Makefile.mk
  vendor/heirloom-doctools/dist/ptx/ptx.c
  vendor/heirloom-doctools/dist/refer/Makefile.mk
  vendor/heirloom-doctools/dist/refer/hunt2.c
  vendor/heirloom-doctools/dist/soelim/Makefile.mk
  vendor/heirloom-doctools/dist/soelim/soelim.c
  vendor/heirloom-doctools/dist/troff/ext.h
  vendor/heirloom-doctools/dist/troff/libhnj/Makefile.mk
  vendor/heirloom-doctools/dist/troff/libhnj/test.c
  vendor/heirloom-doctools/dist/troff/n1.c
  vendor/heirloom-doctools/dist/troff/n2.c
  vendor/heirloom-doctools/dist/troff/n3.c
  vendor/heirloom-doctools/dist/troff/n5.c
  vendor/heirloom-doctools/dist/troff/n7.c
  vendor/heirloom-doctools/dist/troff/n8.c
  vendor/heirloom-doctools/dist/troff/n9.c
  vendor/heirloom-doctools/dist/troff/ni.c
  vendor/heirloom-doctools/dist/troff/nii.c
  vendor/heirloom-doctools/dist/troff/nroff.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/nroff.d/n6.c
  vendor/heirloom-doctools/dist/troff/nroff.d/pt.h
  vendor/heirloom-doctools/dist/troff/tdef.h
  vendor/heirloom-doctools/dist/troff/troff.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/afm.c
  vendor/heirloom-doctools/dist/troff/troff.d/afm.h
  vendor/heirloom-doctools/dist/troff/troff.d/dhtml/dhtml.l
  vendor/heirloom-doctools/dist/troff/troff.d/dhtml/lib.c
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/dpost.c
  vendor/heirloom-doctools/dist/troff/troff.d/dpost.d/misc.c
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/font/devhtml/makefont.c
  vendor/heirloom-doctools/dist/troff/troff.d/otf.c
  vendor/heirloom-doctools/dist/troff/troff.d/otfdump.c
  vendor/heirloom-doctools/dist/troff/troff.d/pt.h
  vendor/heirloom-doctools/dist/troff/troff.d/t10.c
  vendor/heirloom-doctools/dist/troff/troff.d/t6.c
  vendor/heirloom-doctools/dist/troff/troff.d/ta.c
  vendor/heirloom-doctools/dist/troff/troff.d/tmac.d/Makefile.mk
  vendor/heirloom-doctools/dist/troff/troff.d/troff.h
  vendor/heirloom-doctools/dist/vgrind/Makefile.mk
  vendor/heirloom-doctools/dist/vgrind/regexp.c
  vendor/heirloom-doctools/dist/vgrind/vgrindefs.c

Modified: vendor/heirloom-doctools/dist/checknr/checknr.c
==============================================================================
--- vendor/heirloom-doctools/dist/checknr/checknr.c	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/checknr/checknr.c	Sun Dec 25 17:53:10 2016	(r310550)
@@ -427,7 +427,7 @@ prop(int i)
 
 /* ARGSUSED */
 static void
-chkcmd(char *line, char *mac)
+chkcmd(char *line __unused, char *mac)
 {
 	int i;
 

Modified: vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk
==============================================================================
--- vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/eqn/eqn.d/Makefile.mk	Sun Dec 25 17:53:10 2016	(r310550)
@@ -8,7 +8,7 @@ FLAGS = -I. -I.. -I../../include $(DEFIN
 .c.o:
 	$(CC) $(_CFLAGS) $(FLAGS) -c $<
 
-all: eqn
+all: eqn eqnchar.7
 
 eqn: $(OBJ)
 	$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o eqn
@@ -29,10 +29,13 @@ install:
 	$(INSTALL) -c -m 644 eqnchar.7 $(ROOT)$(MANDIR)/man7/eqnchar.7
 
 clean:
-	rm -f $(OBJ) eqn e.c y.tab.* core log *~
+	rm -f $(OBJ) eqn e.c y.tab.* core log *~ eqnchar.7
 
 mrproper: clean
 
+eqnchar.7: eqnchar.7.in
+	sed 's"/usr/pub/"$(ROOT)$(PUBDIR)/"' eqnchar.7.in > $@
+
 diacrit.o: ../diacrit.c ../e.h y.tab.h
 eqnbox.o: ../eqnbox.c ../e.h
 font.o: ../font.c ../e.h

Added: vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/dist/eqn/eqn.d/eqnchar.7.in	Sun Dec 25 17:53:10 2016	(r310550)
@@ -0,0 +1,212 @@
+'\" e
+.\" Sccsid @(#)eqnchar.7b	1.2 (gritter) 12/9/05
+.\" Derived from eqnchar(7), Unix 7th edition:
+.\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"   Redistributions of source code and documentation must retain the
+.\"    above copyright notice, this list of conditions and the following
+.\"    disclaimer.
+.\"   Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"   All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"      This product includes software developed or owned by Caldera
+.\"      International, Inc.
+.\"   Neither the name of Caldera International, Inc. nor the names of
+.\"    other contributors may be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
+.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.TH EQNCHAR 7 "12/9/05" "Heirloom Documentation Tools" "BSD System Compatibility"
+.EQ
+tdefine ciplus % "\o'\(pl\(ci'" %
+ndefine ciplus % O+ %
+tdefine citimes % "\o'\(mu\(ci'" %
+ndefine citimes % Ox %
+tdefine =wig % "\(eq\h'-\w'\(eq'u-\w'\s-2\(ap'u/2u'\v'-.4m'\s-2\z\(ap\(ap\s+2\v'.4m'\h'\w'\(eq'u-\w'\s-2\(ap'u/2u'" %
+ndefine =wig % ="~" %
+tdefine bigstar % "\o'\(pl\(mu'" %
+ndefine bigstar % X|- %
+tdefine =dot % "\z\(eq\v'-.6m'\h'.2m'\s+2.\s-2\v'.6m'\h'.1m'" %
+ndefine =dot % = dot %
+tdefine orsign % "\s-2\v'-.15m'\z\e\e\h'-.05m'\z\(sl\(sl\v'.15m'\s+2" %
+ndefine orsign % \e/ %
+tdefine andsign % "\s-2\v'-.15m'\z\(sl\(sl\h'-.05m'\z\e\e\v'.15m'\s+2" %
+ndefine andsign % /\e %
+tdefine =del % "\v'.3m'\z=\v'-.6m'\h'.3m'\s-1\(*D\s+1\v'.3m'" %
+ndefine =del % = to DELTA %
+tdefine oppA % "\s-2\v'-.15m'\z\e\e\h'-.05m'\z\(sl\(sl\v'-.15m'\h'-.75m'\z-\z-\h'.2m'\z-\z-\v'.3m'\h'.4m'\s+2" %
+ndefine oppA % V- %
+tdefine oppE %"\s-3\v'.2m'\z\(em\v'-.5m'\z\(em\v'-.5m'\z\(em\v'.55m'\h'.9m'\z\(br\z\(br\v'.25m'\s+3" %
+ndefine oppE % E/ %
+tdefine incl % "\s-1\z\(or\h'-.1m'\v'-.45m'\z\(em\v'.7m'\z\(em\v'.2m'\(em\v'-.45m'\s+1" %
+ndefine incl % C_ %
+tdefine nomem % "\o'\(mo\(sl'" %
+ndefine nomem % C-/ %
+tdefine angstrom % "\fR\zA\v'-.3m'\h'.2m'\(de\v'.3m'\fP\h'.2m'" %
+ndefine angstrom % A to o %
+tdefine star %{ roman "\v'.5m'\s+3*\s-3\v'-.5m'"}%
+ndefine star % * %
+tdefine || % \(or\(or %
+tdefine <wig % "\z<\v'.4m'\(ap\v'-.4m'" %
+ndefine <wig %{ < from "~" }%
+tdefine >wig % "\z>\v'.4m'\(ap\v'-.4m'" %
+ndefine >wig %{ > from "~" }%
+tdefine langle % "\s-3\b'\(sl\e'\s0" %
+ndefine langle %<%
+tdefine rangle % "\s-3\b'\e\(sl'\s0" %
+ndefine rangle %>%
+tdefine hbar % "\zh\v'-.6m'\h'.05m'\(ru\v'.6m'" %
+ndefine hbar % h\u-\d %
+ndefine ppd % _| %
+tdefine ppd % "\o'\(ru\s-2\(or\s+2'" %
+tdefine <-> % "\o'\(<-\(->'" %
+ndefine <-> % "<-->" %
+tdefine <=> % "\s-2\z<\v'.05m'\h'.2m'\z=\h'.55m'=\h'-.6m'\v'-.05m'>\s+2" %
+ndefine <=> % "<=>" %
+tdefine |< % "\o'<\(or'" %
+ndefine |< % <| %
+tdefine |> % "\o'>\(or'" %
+ndefine |> % |> %
+tdefine ang % "\v'-.15m'\z\s-2\(sl\s+2\v'.15m'\(ru" %
+ndefine ang % /_ %
+tdefine rang % "\z\(or\h'.15m'\(ru" %
+ndefine rang % L %
+tdefine 3dot % "\v'-.8m'\z.\v'.5m'\z.\v'.5m'.\v'-.2m'" %
+ndefine 3dot % .\u.\u.\d\d %
+tdefine thf % ".\v'-.5m'.\v'.5m'." %
+ndefine thf % ..\u.\d %
+tdefine quarter % roman \(14 %
+ndefine quarter % 1/4 %
+tdefine 3quarter % roman \(34 %
+ndefine 3quarter % 3/4 %
+tdefine degree % \(de %
+ndefine degree % nothing sup o %
+tdefine square % \(sq %
+ndefine square % [] %
+tdefine circle % \(ci %
+ndefine circle % O %
+tdefine blot % "\fB\(sq\fP" %
+ndefine blot % HIX %
+tdefine bullet % \(bu %
+ndefine bullet % oxe %
+tdefine -wig % "\(~=" %
+ndefine -wig % - to "~" %
+tdefine wig % \(ap %
+ndefine wig % "~" %
+tdefine prop % \(pt %
+ndefine prop % oc %
+tdefine empty % \(es %
+ndefine empty % O/ %
+tdefine member % \(mo %
+ndefine member % C- %
+tdefine cup % \(cu %
+ndefine cup % U %
+define cap % \(ca %
+define subset % \(sb %
+define supset % \(sp %
+define !subset % \(ib %
+define !supset % \(ip %
+.EN
+.SH NAME
+eqnchar \- special character definitions for eqn
+.SH SYNOPSIS
+.HP
+.ad l
+.nh
+.B eqn /usr/pub/eqnchar
+.RB [ files ]
+.B | troff
+.RB [ options ]
+.HP
+.B neqn /usr/pub/eqnchar
+.RB [ files ]
+.B | nroff
+.RB [ options ]
+.br
+.hy 1
+.ad b
+.SH DESCRIPTION
+.I Eqnchar
+contains
+.I troff
+and
+.I nroff
+character definitions for constructing characters that are not
+available on the Graphic Systems typesetter.
+These definitions are primarily intended for use with
+.I eqn
+and
+.IR neqn .
+It contains
+definitions for the following characters
+.PP
+.nf
+.ta \w'angstrom  'u \n(.lu/3u +\w'angstrom  'u \n(.lu*2u/3u +\w'angstrom  'u
+.EQ
+"ciplus"	ciplus	"|\||"	||	"square"	square
+.EN
+.EQ
+"citimes"	citimes	"langle"	langle	"circle"	circle
+.EN
+.EQ
+"wig"	wig	"rangle"	rangle	"blot"	blot
+.EN
+.EQ
+"-wig"	-wig	"hbar"	hbar	"bullet"	bullet
+.EN
+.EQ
+">wig"	>wig	"ppd"	ppd	"prop"	prop
+.EN
+.EQ
+"<wig"	<wig	"<->"	<->	"empty"	empty
+.EN
+.EQ
+"=wig"	=wig	"<=>"	<=>	"member"	member
+.EN
+.EQ
+"star"	star	"|\|"	|<	"nomem"	nomem
+.EN
+.EQ
+"bigstar"	bigstar	"|\|>"	|>	"cup"	cup
+.EN
+.EQ
+"=dot"	=dot	"ang"	ang	"cap"	cap
+.EN
+.EQ
+"orsign"	orsign	"rang"	rang	"incl"	incl
+.EN
+.EQ
+"andsign"	andsign	"3dot"	3dot	"subset"	subset
+.EN
+.EQ
+"=del"	=del	"thf"	thf	"supset"	supset
+.EN
+.EQ
+"oppA"	oppA	"quarter"	quarter	"!subset"	!subset
+.EN
+.EQ
+"oppE"	oppE	"3quarter"	3quarter	"!supset"	!supset
+.EN
+.EQ
+"angstrom"	angstrom	"degree"	degree
+.EN
+.SH FILES
+/usr/pub/eqnchar
+.SH SEE ALSO
+troff(1), eqn(1)

Modified: vendor/heirloom-doctools/dist/eqn/io.c
==============================================================================
--- vendor/heirloom-doctools/dist/eqn/io.c	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/eqn/io.c	Sun Dec 25 17:53:10 2016	(r310550)
@@ -25,6 +25,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <libgen.h>
+#include "global.h"
 
 static char	*in;	/* input buffer */
 static size_t	insize;	/* input buffer size */
@@ -283,7 +284,7 @@ setfile(int argc, char **argv) {
 }
 
 void
-yyerror(char *unused) {;}
+yyerror(char *unused __unused) {;}
 
 void
 init(void) {

Modified: vendor/heirloom-doctools/dist/grap/Makefile.mk
==============================================================================
--- vendor/heirloom-doctools/dist/grap/Makefile.mk	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/grap/Makefile.mk	Sun Dec 25 17:53:10 2016	(r310550)
@@ -8,7 +8,7 @@ YFLAGS = -d
 .c.o:
 	$(CC) $(_CFLAGS) $(FLAGS) -c $<
 
-all: grap.c grapl.c grap
+all: grap.c grapl.c grap grap.1
 
 grap: $(OBJ)
 	$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -lm -o grap
@@ -23,10 +23,13 @@ install:
 	$(INSTALL) -c -m 644 grap.1 $(ROOT)$(MANDIR)/man1/grap.1
 
 clean:
-	rm -f $(OBJ) grapl.c grap.c y.tab.h grap core log *~
+	rm -f $(OBJ) grapl.c grap.c y.tab.h grap core log *~ grap.1
 
 mrproper: clean
 
+grap.1: grap.1.in
+	sed 's"/usr/ucblib/"$(ROOT)$(LIBDIR)/"' grap.1.in > $@
+
 coord.o: coord.c grap.h y.tab.h
 for.o: for.c grap.h y.tab.h
 frame.o: frame.c grap.h y.tab.h

Added: vendor/heirloom-doctools/dist/grap/grap.1.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/dist/grap/grap.1.in	Sun Dec 25 17:53:10 2016	(r310550)
@@ -0,0 +1,430 @@
+.\"
+.\" Changes by Gunnar Ritter, Freiburg i. Br., Germany, October 2005.
+.\"
+.\" Derived from Plan 9 v4 /opt/unix/plan9v4/sys/man/1/grap
+.\"
+.\" Copyright (C) 2003, Lucent Technologies Inc. and others.
+.\" All Rights Reserved.
+.\"
+.\" Distributed under the terms of the Lucent Public License Version 1.02.
+.\"
+.\" Sccsid @(#)grap.1	1.5 (gritter) 2/2/07
+.TH GRAP 1 "2/2/07" "Heirloom Documentation Tools" "User Commands"
+.SH NAME
+grap \- pic preprocessor for drawing graphs
+.SH SYNOPSIS
+\fBgrap\fR [\fB\-SU\fR] [\fIfile\fR]
+.SH DESCRIPTION
+.I Grap
+is a
+.IR pic (1)
+preprocessor for drawing graphs on a typesetter.
+Graphs are surrounded by the
+.I troff
+`commands'
+.B \&.G1
+and
+.BR  \&.G2 .
+Data are scaled and plotted,
+with tick marks supplied automatically.
+Commands exist to modify the frame,
+add labels, override the default ticks,
+change the plotting style,
+define coordinate ranges and transformations,
+and include data from files.
+In addition,
+.I grap
+provides the same loops, conditionals, and macro processing that
+.I pic
+does.
+.PP
+.BI frame
+.B ht
+.I e
+.B wid
+.I e
+.B top
+.B dotted
+.IR ... :
+Set the frame around the graph to specified
+.B ht
+and
+.BR wid ;
+default is 2 by 3 (inches).
+The line
+.I styles
+.RB ( dotted ,
+.BR dashed ,
+.BR invis ,
+.BR solid
+(default))
+of the 
+.I sides
+.RB ( top ,
+.BR bot ,
+.BR left ,
+.BR right )
+of the frame can be set
+independently.
+.PP
+.B label
+.I side
+.B \&"a label"
+.B \&"as a set of strings"
+.IR adjust :
+Place label on specified side; default side is bottom.
+.I adjust
+is
+.B up
+(or
+.B down
+.B left
+.BR right )
+.I expr
+to shift default position;
+.B width
+.I expr
+sets the width explicitly.
+.PP
+.BI ticks
+.I side
+.B in
+.B at
+.IR "optname expr, expr, ..." :
+Put ticks on
+.I side
+at
+.I "expr, ...,
+and label with
+.I \&"expr"\f1.
+If any
+.I expr
+is followed by "...", label tick with "...",
+and turn off all automatic labels.
+If "..." contains
+.BR %f 's,
+they will be interpreted as
+.B printf
+formatting instructions for the tick value.
+Ticks point
+.B in
+or
+.B out
+(default out).
+Tick iterator: instead of
+.B at
+.IR \&... ,
+use
+.BI from
+.I expr
+.B to
+.I expr
+.B by
+.I "op expr
+where
+.I op
+is optionally
+.B +\-*/
+for additive or multiplicative steps.
+.B by
+can be omitted, to give steps of size 1.
+If no ticks are requested, they are supplied automatically;
+suppress this with
+.B ticks
+.BR off .
+Automatic ticks normally
+leave a margin of 7% on each side; set this to anything by
+.B margin
+.B =
+.IR expr .
+.PP
+.B grid
+.I "side linedesc"
+.B at
+.IR "optname expr, expr, ..." :
+Draw grids perpendicular to
+.I side
+in style
+.I linedesc
+at
+.I "expr, ....\&
+Iterators and labels work as with ticks.
+.PP
+.B coord
+.I optname
+.B x
+.I "min, max"
+.B y
+.I "min, max"
+.B "log x
+.BR " log y" :
+Set range of coords and optional log scaling on either or both.
+This overrides computation of data range.
+Default value of
+.I optname
+is current coordinate system
+(each
+.B coord
+defines a new coordinate system).
+.PP
+.B plot
+.I \&"str"
+.B at
+.IR point ;
+.B
+.I \&"str"
+.B at
+.IR point :
+Put
+.I str
+at
+.IR point .
+Text position can be qualified with
+.BR rjust ,
+.BR ljust ,
+.BR above ,
+.BR below
+after "...".
+.PP
+.B line
+.B from
+.I point
+.B to
+.IR "point linedesc" :
+Draw line from here to there.
+.B arrow
+works in place of
+.BR line .
+.PP
+.B next
+.I optname
+.B at
+.IR "point linedesc" :
+Continue plot of data in
+.I optname to
+.IR point ;
+default is current.
+.PP
+.BI draw
+.IR "optname linedesc ..." :
+Set mode for
+.BR next :
+use this style from now on,
+and plot "..." at each point (if given).
+.PP
+.BI new
+.IR "optname linedesc ..." :
+Set mode for
+.BR next ,
+but disconnect from previous.
+.PP
+A list of numbers
+.I "x y1 y2 y3 ...
+is treated as 
+.B plot
+.B bullet
+.B at
+.IR x,y1 ;
+.B plot
+.B bullet
+.B at
+.IR x,y2 ;
+etc., or as
+.B next
+.B at
+.I x,y1
+etc., if
+.B draw
+is specified.
+Abscissae of 1,2,3,... are provided if there is only one input number per line.
+.PP
+A
+point
+.I "optname expr, expr
+maps the point to the named coordinate system.
+A
+.I linedesc
+is one of
+.B dot
+.B dash
+.B invis
+.B solid
+optionally followed by an expression.
+.PP
+.BI define
+.I name
+.BI { whatever } \f1:
+Define a macro.
+There are macros already defined for standard plotting
+symbols like
+.BR bullet ,
+.BR circle ,
+.BR star ,
+.BR plus ,
+etc., in
+.BR /sys/lib/grap.defines ,
+which is included if it exists.
+.PP
+.I var
+.B =
+.IR expr :
+Evaluate an expression.
+Operators are
+.B=
+.B +
+.B \-
+.B *
+and
+.BR / .
+Functions are
+.B log
+and
+.B exp
+(both base 10),
+.BR sin ,
+.BR cos ,
+.BR sqrt ;
+.B rand
+returns random number on [0,1);
+.BI max( e , e )\f1,
+.BI min( e , e )\f1,
+.BI int( e )\f1.
+.PP
+.B print
+.IR expr ;
+.B print
+\fR"\f2...\fR"\f1:
+As a debugging aid, print
+.I expr
+or
+.I string
+on the standard error.
+.PP
+.B copy
+\fR"\fIfile name\fR"\fR:
+Include this file right here.
+.PP
+.B copy
+.B thru
+.IR macro :
+Pass rest of input (until
+.BR \&.G2 )
+through
+.IR macro ,
+treating each field (non-blank, or "...") as an argument.
+.I macro
+can be the name of a macro previously defined,
+or the body of one in place, like
+.BR "/plot $1 at $2,$3/" .
+.PP
+.B copy
+.B thru
+.I macro
+.B until
+\fR"\fIstring\fR"\fR:
+Stop copy when input is
+.I string
+(left-justified).
+.PP
+.BI pic
+.IR "remainder of line" :
+Copy to output with leading blanks removed.
+.PP
+.BI graph
+.IR "Name pic-position" :
+Start a new frame, place it at specified position,
+e.g.,
+.B graph
+.B Thing2
+.BR "with .sw at Thing1.se + (0.1,0)" .
+.I Name
+must be capitalized to keep
+.I pic
+happy.
+.PP
+.BI \&. "anything at beginning of
+.IR line :
+Copied verbatim.
+.PP
+.B sh
+.BI % anything
+.BR % :
+Pass everything between the
+.BR % 's
+to the shell;
+as with macros,
+.B %
+may be any character and
+.I anything
+may include newlines.
+The
+.B \-S
+option disables execution of the shell command;
+the
+.B \-U
+option reverts the effect of a previous
+.IR \-S .
+.PP
+.B #
+.IR anything :
+A comment, which is discarded.
+.PP
+Order is mostly irrelevant; no category is mandatory.
+Any arguments on the
+.B \&.G1
+line are placed on the generated
+.B \&.PS
+line for
+.IR pic .
+.\".SH EXAMPLES
+.\".EX
+.\".ps -1
+.\".vs -1
+.\"\&.G1
+.\"frame ht 1 top invis right invis
+.\"coord x 0, 10 y 1, 3 log y
+.\"ticks left in at 1 "bottommost tick", 2,3 "top tick"
+.\"ticks bot in from 0 to 10 by 2
+.\"label bot "silly graph"
+.\"label left "left side label" "here"
+.\"grid left dashed at 2.5
+.\"copy thru / circle at $1,$2 /
+.\"1 1
+.\"2 1.5
+.\"3 2
+.\"4 1.5
+.\"10 3
+.\"\&.G2
+.\".G1
+.\"frame ht 1 top invis right invis
+.\"coord x 0, 10 y 1, 3 log y
+.\"ticks left in at 1 "bottommost tick", 2,3 "top tick"
+.\"ticks bot in from 0 to 10 by 2
+.\"label bot "silly graph"
+.\"label left "left side label" "here"
+.\"grid left dashed at 2.5
+.\"copy thru / circle at $1,$2 /
+.\"1 1
+.\"2 1.5
+.\"3 2
+.\"4 1.5
+.\"10 3
+.\".G2
+.\".ps
+.\".vs
+.\".EE
+.SH FILES
+.TP
+.B /usr/ucblib/grap.defines
+definitions of standard plotting characters, e.g., bullet
+.\".SH SOURCE
+.\".B /sys/src/cmd/grap
+.SH "SEE ALSO"
+.IR pic (1), 
+.IR troff (1)
+.br
+J. L. Bentley and B. W. Kernighan,
+``GRAP\(emA Language for Typesetting Graphs'',
+.I
+Unix Research System Programmer's Manual,
+Tenth Edition, Volume 2.

Modified: vendor/heirloom-doctools/dist/grap/grapl.l
==============================================================================
--- vendor/heirloom-doctools/dist/grap/grapl.l	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/grap/grapl.l	Sun Dec 25 17:53:10 2016	(r310550)
@@ -12,6 +12,7 @@
 
 /*	Sccsid @(#)grapl.l	1.4 (gritter) 11/22/05	*/
 %}
+%option nounput
 %Start A str def thru sh
 
 %{
@@ -237,10 +238,3 @@ WS	[ \t]
 <str>.		{ CADD; }
 
 %%
-
-#ifdef	FLEX_SCANNER
-void xxcruft(void)
-{
-	unput(0);
-}
-#endif	/* FLEX_SCANNER */

Modified: vendor/heirloom-doctools/dist/grap/main.c
==============================================================================
--- vendor/heirloom-doctools/dist/grap/main.c	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/grap/main.c	Sun Dec 25 17:53:10 2016	(r310550)
@@ -17,8 +17,12 @@
 #include <string.h>
 #include <unistd.h>
 #include "grap.h"
+#include "global.h"
 #include "y.tab.h"
 
+static void onintr(int n);
+static void fpecatch(int n);
+
 int	dbg	= 0;
 
 #define GRAPDEFINES LIBDIR "/grap.defines"
@@ -48,8 +52,6 @@ extern void getdata(void);
 int
 main(int argc, char *argv[])
 {
-	extern void onintr(int), fpecatch(int);
-
 	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 		signal(SIGINT, onintr);
 	signal(SIGFPE, fpecatch);
@@ -102,14 +104,14 @@ main(int argc, char *argv[])
 }
 
 /*ARGSUSED*/
-void onintr(int n)
+static void onintr(int n __unused)
 {
 	if (!dbg)
 		unlink(tempfile);
 	exit(1);
 }
 
-void fpecatch(int n)
+static void fpecatch(int n)
 {
 	WARNING("floating point exception");
 	onintr(n);

Modified: vendor/heirloom-doctools/dist/mpm/page.cc
==============================================================================
--- vendor/heirloom-doctools/dist/mpm/page.cc	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/mpm/page.cc	Sun Dec 25 17:53:10 2016	(r310550)
@@ -147,25 +147,9 @@ static void justify(stream *scratch, int
 		}
 }
 
-// If r were added to s, would the height of the composed result be at most maxht?
-int wouldfit(range *r, stream *s, int maxht)
-{
-	if (r->rawht() + s->rawht() <= maxht)
-		return 1;		// the conservative test succeeded
-	stream scratch;			// local playground for costly test
-	for (stream cd = *s; cd.more(); cd.advance())
-		scratch.append(cd.current());
-	scratch.append(r);
-	movefloats(&scratch, ((double) scratch.rawht())/maxht);
-	trimspace(&scratch);
-	int retval = scratch.height() <= maxht;
-	scratch.freeall();
-	return retval;
-}
-
 // If s1 were added to s, would the height of the composed result be at most maxht?
 // The computational structure is similar to that above.
-int wouldfit(stream *s1, stream *s, int maxht)
+static int wouldfit(stream *s1, stream *s, int maxht)
 {
 	if (s1->rawht() + s->rawht() <= maxht)
 		return 1;
@@ -316,7 +300,7 @@ void multicol::dump()
 }
 
 // From the head of queue qp, peel off a piece whose raw height is at most space.
-int peeloff(stream *qp, int space)
+static int peeloff(stream *qp, int space)
 {
 	stream *s1 = qp->current()->children();
 	if (!(s1 && s1->more() && s1->current()->height() <= space))

Modified: vendor/heirloom-doctools/dist/pic/input.c
==============================================================================
--- vendor/heirloom-doctools/dist/pic/input.c	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/pic/input.c	Sun Dec 25 17:53:10 2016	(r310550)
@@ -492,8 +492,6 @@ void eprint(void)	/* try to print contex
 	ep = ebuf;
 }
 
-void yywrap(void) {}
-
 static char	*newfile = 0;		/* filename for file copy */
 char	*untilstr = 0;		/* string that terminates a thru */
 int	thru	= 0;		/* 1 if copying thru macro */

Modified: vendor/heirloom-doctools/dist/pic/main.c
==============================================================================
--- vendor/heirloom-doctools/dist/pic/main.c	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/pic/main.c	Sun Dec 25 17:53:10 2016	(r310550)
@@ -17,6 +17,7 @@
 #include	"pic.h"
 #include	"y.tab.h"
 
+static void reset(void);
 extern const char	version[];
 
 obj	**objlist = 0;		/* store the elements here */
@@ -208,7 +209,7 @@ void getdata(void)
 	char *p, *buf = NULL, *buf1 = NULL;
 	size_t size = 0;
 	int ln;
-	void reset(void), openpl(char *), closepl(char *);
+	void openpl(char *), closepl(char *);
 	int yyparse(void);
 
 	curfile->lineno = 0;
@@ -281,7 +282,7 @@ void getdata(void)
 	free(buf1);
 }
 
-void reset(void)
+static void reset(void)
 {
 	obj *op;
 	int i;

Modified: vendor/heirloom-doctools/dist/pic/picl.l
==============================================================================
--- vendor/heirloom-doctools/dist/pic/picl.l	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/pic/picl.l	Sun Dec 25 17:53:10 2016	(r310550)
@@ -12,6 +12,8 @@
 
 /*	Sccsid @(#)picl.l	1.9 (gritter) 8/6/06	*/
 %}
+%option noyywrap
+%option nounput
 %Start A str def xsc br thru sh
 %e 1700
 %k 150
@@ -47,7 +49,6 @@ extern	struct	symtab	symtab[];
 
 int	yyback(int *, int);
 int	yylook(void);
-int	yywrap(void);
 
 #define	CADD	cbuf[clen++]=yytext[0]; \
 		if (clen>=CBUFLEN-1) { WARNING("string too long", cbuf); BEGIN A; }

Modified: vendor/heirloom-doctools/dist/ptx/Makefile.mk
==============================================================================
--- vendor/heirloom-doctools/dist/ptx/Makefile.mk	Sun Dec 25 17:40:18 2016	(r310549)
+++ vendor/heirloom-doctools/dist/ptx/Makefile.mk	Sun Dec 25 17:53:10 2016	(r310550)
@@ -5,7 +5,7 @@ FLAGS = -DLIBDIR='"$(LIBDIR)"' $(EUC) -I
 .c.o:
 	$(CC) $(_CFLAGS) $(FLAGS) -c $<
 
-all: ptx
+all: ptx ptx.1
 
 ptx: $(OBJ)
 	$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o ptx
@@ -18,6 +18,12 @@ install:
 	$(INSTALL) -c -m 644 eign $(ROOT)$(LIBDIR)/eign
 
 clean:
-	rm -f $(OBJ) ptx core log *~
+	rm -f $(OBJ) ptx core log *~ ptx.1
 
 mrproper: clean
+
+ptx.1: ptx.1.in
+	sed -e "s'/usr/5bin/sort'`which sort`'" \
+	    -e 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(BINDIR)/"' \
+	    -e 's"/usr/ucblib/"$(ROOT)$(LIBDIR)/"' \
+	    ptx.1.in > $@

Added: vendor/heirloom-doctools/dist/ptx/ptx.1.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/heirloom-doctools/dist/ptx/ptx.1.in	Sun Dec 25 17:53:10 2016	(r310550)
@@ -0,0 +1,158 @@
+.\"
+.\" Sccsid @(#)ptx.1	1.6 (gritter) 2/2/07
+.\" Parts taken from ptx(1), Unix 7th edition:
+.\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"   Redistributions of source code and documentation must retain the
+.\"    above copyright notice, this list of conditions and the following
+.\"    disclaimer.
+.\"   Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"   All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"      This product includes software developed or owned by Caldera
+.\"      International, Inc.
+.\"   Neither the name of Caldera International, Inc. nor the names of
+.\"    other contributors may be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
+.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.Dd February 2, 2007
+.Dt PTX 1
+.Os
+.Sh NAME
+.Nm ptx
+.Nd permuted index
+.Sh SYNOPSIS
+.Nm
+.Op Fl ftr
+.Op Fl w Ar n
+.Op Fl g Ar n
+.Op Fl o Ar only
+.Op Fl i Ar ignore
+.Op Fl b Ar break
+.Op Ar input Op Ar output
+.Sh DESCRIPTION
+.Nm
+generates a permuted index to file
+.Ar input
+on file
+.Ar output
+(standard input and output default).
+It has three phases: the first does the permutation, generating
+one line for each keyword in an input line.
+The keyword is rotated to the front.
+The permuted file is then
+sorted.
+Finally, the sorted lines are rotated so the keyword
+comes at the middle of the page.
+.Nm
+produces output in the form:
+.Bd -literal -offset XXXXX
+\&.xx "tail" "before keyword" "keyword and after" "head"
+.Ed
+.Pp
+where .xx may be an
+.Cm nroff
+or
+.Xr troff  1
+macro
+for user-defined formatting.
+Once choice for this macro is supplied in the
+.Sq Fl mptx
+macro package.
+The
+.Em before keyword
+and
+.Em keyword and after
+fields incorporate as much of the line as will fit
+around the keyword when it is printed at the middle of the page.

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


More information about the svn-src-all mailing list