aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 17:53:10 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 17:53:10 +0000
commit80647123fe63c15caa93687028a45f9efee5b669 (patch)
tree6fe6df04e4b2cd506323ad2994b9527dd1ed7193
parent6db6db4b7f38f7760b90ec861a39b5ccb9df5ba9 (diff)
downloadsrc-vendor/heirloom-doctools.tar.gz
src-vendor/heirloom-doctools.zip
Notes
Notes: svn path=/vendor/heirloom-doctools/dist/; revision=310550 svn path=/vendor/heirloom-doctools/20161106/; revision=310551; tag=vendor/heirloom-doctools/20161106
-rw-r--r--checknr/checknr.c2
-rw-r--r--eqn/eqn.d/Makefile.mk7
-rw-r--r--eqn/eqn.d/eqnchar.7.in (renamed from eqn/eqn.d/eqnchar.7)0
-rw-r--r--eqn/io.c3
-rw-r--r--grap/Makefile.mk7
-rw-r--r--grap/grap.1.in (renamed from grap/grap.1)0
-rw-r--r--grap/grapl.l8
-rw-r--r--grap/main.c10
-rw-r--r--mpm/page.cc20
-rw-r--r--pic/input.c2
-rw-r--r--pic/main.c5
-rw-r--r--pic/picl.l3
-rw-r--r--ptx/Makefile.mk10
-rw-r--r--ptx/ptx.1.in (renamed from ptx/ptx.1)0
-rw-r--r--ptx/ptx.c5
-rw-r--r--refer/Makefile.mk14
-rw-r--r--refer/hunt2.c2
-rw-r--r--refer/lookbib.1.in (renamed from refer/lookbib.1)0
-rw-r--r--refer/refer.1.in (renamed from refer/refer.1)0
-rw-r--r--refer/roffbib.1.in (renamed from refer/roffbib.1)0
-rw-r--r--soelim/Makefile.mk7
-rw-r--r--soelim/soelim.1.in (renamed from soelim/soelim.1)4
-rw-r--r--soelim/soelim.c2
-rw-r--r--troff/ext.h4
-rw-r--r--troff/libhnj/Makefile.mk2
-rw-r--r--troff/libhnj/test.c3
-rw-r--r--troff/n1.c25
-rw-r--r--troff/n2.c4
-rw-r--r--troff/n3.c11
-rw-r--r--troff/n5.c6
-rw-r--r--troff/n7.c18
-rw-r--r--troff/n8.c2
-rw-r--r--troff/n9.c8
-rw-r--r--troff/ni.c40
-rw-r--r--troff/nii.c2
-rw-r--r--troff/nroff.d/Makefile.mk9
-rw-r--r--troff/nroff.d/n6.c2
-rw-r--r--troff/nroff.d/nroff.1.in (renamed from troff/nroff.d/nroff.1)0
-rw-r--r--troff/nroff.d/pt.h1
-rw-r--r--troff/tdef.h12
-rw-r--r--troff/troff.d/Makefile.mk9
-rw-r--r--troff/troff.d/afm.c1
-rw-r--r--troff/troff.d/afm.h4
-rw-r--r--troff/troff.d/dhtml/dhtml.l2
-rw-r--r--troff/troff.d/dhtml/lib.c1
-rw-r--r--troff/troff.d/dpost.d/Makefile.mk10
-rw-r--r--troff/troff.d/dpost.d/dpost.1.in (renamed from troff/troff.d/dpost.d/dpost.1)0
-rw-r--r--troff/troff.d/dpost.d/dpost.c14
-rw-r--r--troff/troff.d/dpost.d/misc.c1
-rw-r--r--troff/troff.d/font/devhtml/B.in (renamed from troff/troff.d/font/devhtml/B)0
-rw-r--r--troff/troff.d/font/devhtml/BI.in (renamed from troff/troff.d/font/devhtml/BI)0
-rw-r--r--troff/troff.d/font/devhtml/C.in (renamed from troff/troff.d/font/devhtml/C)0
-rw-r--r--troff/troff.d/font/devhtml/CB.in (renamed from troff/troff.d/font/devhtml/CB)0
-rw-r--r--troff/troff.d/font/devhtml/CI.in (renamed from troff/troff.d/font/devhtml/CI)0
-rw-r--r--troff/troff.d/font/devhtml/CR.in (renamed from troff/troff.d/font/devhtml/CR)0
-rw-r--r--troff/troff.d/font/devhtml/CW.in (renamed from troff/troff.d/font/devhtml/CW)0
-rw-r--r--troff/troff.d/font/devhtml/H.in (renamed from troff/troff.d/font/devhtml/H)0
-rw-r--r--troff/troff.d/font/devhtml/HB.in (renamed from troff/troff.d/font/devhtml/HB)0
-rw-r--r--troff/troff.d/font/devhtml/HI.in (renamed from troff/troff.d/font/devhtml/HI)0
-rw-r--r--troff/troff.d/font/devhtml/I.in (renamed from troff/troff.d/font/devhtml/I)0
-rw-r--r--troff/troff.d/font/devhtml/Makefile.mk10
-rw-r--r--troff/troff.d/font/devhtml/R.in (renamed from troff/troff.d/font/devhtml/R)0
-rw-r--r--troff/troff.d/font/devhtml/S.in (renamed from troff/troff.d/font/devhtml/S)0
-rw-r--r--troff/troff.d/font/devhtml/makefont.c6
-rw-r--r--troff/troff.d/otf.c55
-rw-r--r--troff/troff.d/otfdump.c10
-rw-r--r--troff/troff.d/pt.h4
-rw-r--r--troff/troff.d/t10.c10
-rw-r--r--troff/troff.d/t6.c26
-rw-r--r--troff/troff.d/ta.c28
-rw-r--r--troff/troff.d/tmac.d/Makefile.mk7
-rw-r--r--troff/troff.d/tmac.d/mcolor.7.in (renamed from troff/troff.d/tmac.d/mcolor.7)0
-rw-r--r--troff/troff.d/troff.1.in (renamed from troff/troff.d/troff.1)0
-rw-r--r--troff/troff.d/troff.h2
-rw-r--r--vgrind/Makefile.mk8
-rw-r--r--vgrind/regexp.c4
-rw-r--r--vgrind/vgrind.1.in (renamed from vgrind/vgrind.1)0
-rw-r--r--vgrind/vgrindefs.c5
78 files changed, 270 insertions, 207 deletions
diff --git a/checknr/checknr.c b/checknr/checknr.c
index a98b0adc2d04..e9c5e63e3ad8 100644
--- a/checknr/checknr.c
+++ b/checknr/checknr.c
@@ -427,7 +427,7 @@ prop(int i)
/* ARGSUSED */
static void
-chkcmd(char *line, char *mac)
+chkcmd(char *line __unused, char *mac)
{
int i;
diff --git a/eqn/eqn.d/Makefile.mk b/eqn/eqn.d/Makefile.mk
index a02ba2525ef6..f426b86683ee 100644
--- a/eqn/eqn.d/Makefile.mk
+++ b/eqn/eqn.d/Makefile.mk
@@ -8,7 +8,7 @@ FLAGS = -I. -I.. -I../../include $(DEFINES)
.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
diff --git a/eqn/eqn.d/eqnchar.7 b/eqn/eqn.d/eqnchar.7.in
index b806bc17ba6e..b806bc17ba6e 100644
--- a/eqn/eqn.d/eqnchar.7
+++ b/eqn/eqn.d/eqnchar.7.in
diff --git a/eqn/io.c b/eqn/io.c
index 116267ba14ec..4841dc69f138 100644
--- a/eqn/io.c
+++ b/eqn/io.c
@@ -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) {
diff --git a/grap/Makefile.mk b/grap/Makefile.mk
index 4c82266d1311..26deb07d73e2 100644
--- a/grap/Makefile.mk
+++ b/grap/Makefile.mk
@@ -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
diff --git a/grap/grap.1 b/grap/grap.1.in
index a3a96a5cb2b6..a3a96a5cb2b6 100644
--- a/grap/grap.1
+++ b/grap/grap.1.in
diff --git a/grap/grapl.l b/grap/grapl.l
index 763537270e89..b6d1891e5dab 100644
--- a/grap/grapl.l
+++ b/grap/grapl.l
@@ -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 */
diff --git a/grap/main.c b/grap/main.c
index eb4478945c02..52c77b4ee6a4 100644
--- a/grap/main.c
+++ b/grap/main.c
@@ -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);
diff --git a/mpm/page.cc b/mpm/page.cc
index 95efd405ff1a..7476ccc90f57 100644
--- a/mpm/page.cc
+++ b/mpm/page.cc
@@ -147,25 +147,9 @@ static void justify(stream *scratch, int wantht)
}
}
-// 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))
diff --git a/pic/input.c b/pic/input.c
index d052f67ed5a9..80e90fe9ba10 100644
--- a/pic/input.c
+++ b/pic/input.c
@@ -492,8 +492,6 @@ void eprint(void) /* try to print context around error */
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 */
diff --git a/pic/main.c b/pic/main.c
index 75ed59185837..92acfe9875bc 100644
--- a/pic/main.c
+++ b/pic/main.c
@@ -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;
diff --git a/pic/picl.l b/pic/picl.l
index bffecb429081..7f51e8488d73 100644
--- a/pic/picl.l
+++ b/pic/picl.l
@@ -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; }
diff --git a/ptx/Makefile.mk b/ptx/Makefile.mk
index dda3ba05f725..50ca8460c7b0 100644
--- a/ptx/Makefile.mk
+++ b/ptx/Makefile.mk
@@ -5,7 +5,7 @@ FLAGS = -DLIBDIR='"$(LIBDIR)"' $(EUC) -I../include
.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 > $@
diff --git a/ptx/ptx.1 b/ptx/ptx.1.in
index c5ff8679c899..c5ff8679c899 100644
--- a/ptx/ptx.1
+++ b/ptx/ptx.1.in
diff --git a/ptx/ptx.c b/ptx/ptx.c
index 26f1c13f73ca..be3fab2455b0 100644
--- a/ptx/ptx.c
+++ b/ptx/ptx.c
@@ -156,7 +156,8 @@ GETC(FILE *fp)
{
char mb[MB_LEN_MAX+1];
wchar_t wc;
- int c, i, n;
+ int c, i;
+ size_t n;
mbstate_t state;
if (peekc != WEOF) {
@@ -188,7 +189,7 @@ bad: if ((c = getc(fp)) == EOF)
}
static void
-UNGETC(int c, FILE *fp)
+UNGETC(int c, FILE *fp __unused)
{
peekc = c;
}
diff --git a/refer/Makefile.mk b/refer/Makefile.mk
index 2c5761825339..e6f933b48685 100644
--- a/refer/Makefile.mk
+++ b/refer/Makefile.mk
@@ -17,7 +17,8 @@ FLAGS = -DMACDIR='"$(MACDIR)"' -DREFDIR='"$(REFDIR)"' $(EUC) $(DEFINES) \
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: refer addbib lookbib sortbib roffbib indxbib mkey inv hunt papers/runinv
+all: refer addbib lookbib sortbib roffbib indxbib mkey inv hunt papers/runinv \
+ lookbib.1 refer.1 roffbib.1
cd papers && PATH=..:$$PATH sh runinv
refer: $(ROBJ)
@@ -89,10 +90,19 @@ clean:
rm -f $(ROBJ) refer $(AOBJ) addbib $(LOBJ) lookbib \
$(SOBJ) sortbib roffbib indxbib $(MOBJ) mkey \
$(IOBJ) inv $(HOBJ) hunt papers/runinv core log *~ \
- papers/Ind.i?
+ papers/Ind.i? lookbib.1 refer.1 roffbib.1
mrproper: clean
+lookbib.1: lookbib.1.in
+ sed 's"/usr/ucblib/reftools/"$(ROOT)$(REFDIR)/"' lookbib.1.in > $@
+
+refer.1: refer.1.in
+ sed 's"/usr/ucblib/reftools/"$(ROOT)$(REFDIR)/"' refer.1.in > $@
+
+roffbib.1: roffbib.1.in
+ sed 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(MACDIR)/"' roffbib.1.in > $@
+
addbib.o: addbib.c
deliv2.o: deliv2.c refer..c
glue1.o: glue1.c refer..c
diff --git a/refer/hunt2.c b/refer/hunt2.c
index 804316436abb..76d6727b887f 100644
--- a/refer/hunt2.c
+++ b/refer/hunt2.c
@@ -119,7 +119,7 @@ doquery(long *hpt, int nhash, FILE *fb, int nitem, char **qitem, unsigned *mptr)
}
else
{
- if (master.a[i] == -1) break;
+ if (master.a[i] == (unsigned int)-1) break;
}
}
nf= i;
diff --git a/refer/lookbib.1 b/refer/lookbib.1.in
index 03e7554ce205..03e7554ce205 100644
--- a/refer/lookbib.1
+++ b/refer/lookbib.1.in
diff --git a/refer/refer.1 b/refer/refer.1.in
index 3af187e1aea5..3af187e1aea5 100644
--- a/refer/refer.1
+++ b/refer/refer.1.in
diff --git a/refer/roffbib.1 b/refer/roffbib.1.in
index 815abf8f592d..815abf8f592d 100644
--- a/refer/roffbib.1
+++ b/refer/roffbib.1.in
diff --git a/soelim/Makefile.mk b/soelim/Makefile.mk
index ada1441b7e9f..9e2bf763753c 100644
--- a/soelim/Makefile.mk
+++ b/soelim/Makefile.mk
@@ -5,7 +5,7 @@ FLAGS =
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: soelim
+all: soelim soelim.1
soelim: $(OBJ)
$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o soelim
@@ -16,6 +16,9 @@ install:
$(INSTALL) -c -m 644 soelim.1 $(ROOT)$(MANDIR)/man1/soelim.1
clean:
- rm -f $(OBJ) soelim core log *~
+ rm -f $(OBJ) soelim core log *~ soelim.1
mrproper: clean
+
+soelim.1: soelim.1.in
+ sed 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(MACDIR)/"' soelim.1.in > $@
diff --git a/soelim/soelim.1 b/soelim/soelim.1.in
index 4f676f58ece9..2fca5ec40b55 100644
--- a/soelim/soelim.1
+++ b/soelim/soelim.1.in
@@ -54,10 +54,10 @@ it allows the placement of individual tables
in separate files to be run as a part of a large document.
.PP
Note that inclusion can be suppressed by using
-`\'' instead of `\.', i.e.
+\(oq\(aq\(cq instead of \(oq.\(cq, i.e.
.PP
.DT
- \'so /usr/ucblib/doctools/tmac/s
+ \(aqso /usr/ucblib/doctools/tmac/s
.PP
A sample usage of
.I soelim
diff --git a/soelim/soelim.c b/soelim/soelim.c
index 2652ba61577f..ae79baa10d4b 100644
--- a/soelim/soelim.c
+++ b/soelim/soelim.c
@@ -70,7 +70,7 @@ main(int argc, char **argv)
int process(char *file)
{
- register int n;
+ size_t n;
register int c;
static char *fname = NULL;
static size_t fnsize = 0;
diff --git a/troff/ext.h b/troff/ext.h
index 9a523b2c5664..c1d88845c118 100644
--- a/troff/ext.h
+++ b/troff/ext.h
@@ -116,7 +116,7 @@ extern int em;
extern int eqflg;
extern int error;
extern int esc;
-extern int eschar;
+extern unsigned int eschar;
extern int ev;
extern int fc;
extern char *fchartab;
@@ -159,7 +159,7 @@ extern int noscale;
extern int npn;
extern int npnflg;
extern int nx;
-extern int oldbits;
+extern unsigned int oldbits;
extern struct contab *oldmn;
extern int *olt;
extern int over;
diff --git a/troff/libhnj/Makefile.mk b/troff/libhnj/Makefile.mk
index 0609fa08b34f..68d0d84abbc3 100644
--- a/troff/libhnj/Makefile.mk
+++ b/troff/libhnj/Makefile.mk
@@ -1,4 +1,4 @@
-FLAGS =
+FLAGS = -I../../include
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
diff --git a/troff/libhnj/test.c b/troff/libhnj/test.c
index 7b72bdc903af..3e3c8602e5fc 100644
--- a/troff/libhnj/test.c
+++ b/troff/libhnj/test.c
@@ -1,9 +1,10 @@
#include "hyphen.h"
#include <stdio.h>
#include <string.h>
+#include "global.h"
int
-main(int argc, char **argv)
+main(int argc __unused, char **argv)
{
HyphenDict *hd;
char buf[512], hbuf[512];
diff --git a/troff/n1.c b/troff/n1.c
index 0dd2455599d2..6c74c9d19274 100644
--- a/troff/n1.c
+++ b/troff/n1.c
@@ -110,11 +110,9 @@ wchar_t twc = 0;
static unsigned char escoff[126-31];
static void initg(void);
-static void printlong(long, int);
-static void printn(long, long);
-static char *sprintlong(char *s, long, int);
-static char *sprintn(char *s, long n, int b);
#ifndef NROFF
+static void printn(long, long);
+static void printlong(long, int);
#define vfdprintf xxvfdprintf
static void vfdprintf(int fd, const char *fmt, va_list ap);
#endif
@@ -140,7 +138,6 @@ main(int argc, char **argv)
register char *p;
register int j;
char **oargv;
- const char *s;
size_t l;
setlocale(LC_CTYPE, "");
@@ -631,7 +628,7 @@ vfdprintf(int fd, const char *fmt, va_list ap)
{
register int c;
char *s;
- register int i;
+ size_t i;
pfbp = pfbuf;
loop:
@@ -701,7 +698,7 @@ loop:
putchar(i);
}
} else if (c == 'C') {
- extern int nchtab;
+ extern size_t nchtab;
tchar t = va_arg(ap, tchar);
if ((i = cbits(t)) < 0177) {
putchar(i);
@@ -740,7 +737,6 @@ loop:
}
goto loop;
}
-#endif /* !NROFF */
static void
@@ -780,6 +776,7 @@ static void printn(register long n, register long b)
printn(a, b);
putchar("0123456789ABCDEF"[(int)(n%b)]);
}
+#endif /* !NROFF */
/* returns pointer to \0 that ends the string */
@@ -1471,13 +1468,13 @@ g2:
mbstate_t state;
memset(&state, 0, sizeof state);
if ((n = mbrtowc(&twc, mbbuf1, mbbuf1p-mbbuf1, &state))
- == -1 ||
+ == (size_t)-1 ||
twc & ~(wchar_t)0x1FFFFF) {
illseq(-1, mbbuf1, mbbuf1p-mbbuf1);
mbbuf1p = mbbuf1;
*mbbuf1p = 0;
i &= 0177;
- } else if (n == -2)
+ } else if (n == (size_t)-2)
goto again;
else {
mbbuf1p = mbbuf1;
@@ -1766,7 +1763,7 @@ setuc(void)
size_t i = 0;
tchar r = 0;
#ifndef NROFF
- extern int nchtab;
+ extern size_t nchtab;
#endif
_d = getach();
@@ -2144,10 +2141,10 @@ casechar(int flag __unused)
{
#ifndef NROFF
extern int ps2cc(const char *);
- extern int nchtab;
+ extern size_t nchtab;
#endif
char name[NC];
- int i, k, size = 0;
+ size_t i, k, size = 0;
tchar c, *tp = NULL;
defcf++;
@@ -2209,7 +2206,7 @@ casechar(int flag __unused)
tp[i++] = '\n';
tp[i] = 0;
i = k;
- if (++i >= NCHARS)
+ if (++i >= (size_t)NCHARS)
morechars(i);
free(chartab[k]);
chartab[k] = tp;
diff --git a/troff/n2.c b/troff/n2.c
index 74bb7e3ffc2a..1731c7e930b6 100644
--- a/troff/n2.c
+++ b/troff/n2.c
@@ -163,8 +163,6 @@ pchar1(register tchar i)
tchar _olp[1];
register int j;
filep savip;
- extern void ptout(tchar);
-
j = cbits(i);
if (dip != &d[0]) {
if (i == FLSS)
@@ -240,6 +238,8 @@ outtp(tchar i)
else
#endif /* EUC */
fdprintf(ptid, "%c", j);
+#else
+ (void)i;
#endif
}
diff --git a/troff/n3.c b/troff/n3.c
index cf9adf31c6c8..24c33cdf03e0 100644
--- a/troff/n3.c
+++ b/troff/n3.c
@@ -74,7 +74,7 @@ static struct contab **mhash; /* size must be 128 == the 0177 on line above */
#define blisti(i) (((i)-ENV_BLK*BLK) / BLK)
static filep *blist;
static int nblist;
-static int pagech = '%';
+static size_t pagech = '%';
static int strflg;
static tchar *wbuf;
@@ -523,7 +523,7 @@ de1:
static struct contab *
-findmn1(struct contab **hashp, register int i, int als)
+findmn1(struct contab **hashp, size_t i, int als)
{
register struct contab *p;
@@ -1864,7 +1864,8 @@ caseindex(void)
{
int i, j, n, N;
struct contab *contp;
- int *sp = NULL, as = 0, ns = 0, *np;
+ size_t *sp = NULL;
+ int as = 0, ns = 0, *np;
tchar c;
filep savip;
struct numtab *numtp;
@@ -2057,7 +2058,7 @@ static struct map {
struct map *link;
int n;
} *map[128];
-static char **had;
+static const char **had;
static int hadn;
static int alcd;
@@ -2125,7 +2126,7 @@ casepm(void)
tcnt++;
if (contab[i].als == 0 && (j = (filep) contab[i].mx) != 0) {
k = 1;
- while ((j = blist[blisti(j)]) != (unsigned) ~0) {
+ while ((j = blist[blisti(j)]) != (int) ~0) {
k++;
}
cnt++;
diff --git a/troff/n5.c b/troff/n5.c
index 85426fc6f07d..6ffb9c8a6484 100644
--- a/troff/n5.c
+++ b/troff/n5.c
@@ -875,7 +875,7 @@ loop: for (i = 0; i < NTM - 5 - mb_cur_max; ) {
j = ':';
else if (istrans(c))
j = ')';
- else if (j >= 0 && j < sizeof tmtab && tmtab[j])
+ else if (j >= 0 && j < (int)sizeof tmtab && tmtab[j])
j = tmtab[j];
else if (j == ACUTE)
j = '\'';
@@ -2271,9 +2271,9 @@ casemc(void)
static void
-propchar(int *tp)
+propchar(size_t *tp)
{
- int c, *tpp;
+ size_t c, *tpp;
tchar i;
if (skip(0)) {
diff --git a/troff/n7.c b/troff/n7.c
index 6b13c7bdc05f..fc8851f135bb 100644
--- a/troff/n7.c
+++ b/troff/n7.c
@@ -455,7 +455,7 @@ r:
void
nofill(void)
{
- register int j;
+ size_t j;
register tchar i, nexti;
int k, oev;
@@ -909,7 +909,7 @@ e1:
static int
maybreak(tchar c, int dv)
{
- int i, k = cbits(c);
+ size_t i, k = cbits(c);
if (c & BLBIT)
return 1;
@@ -919,7 +919,7 @@ maybreak(tchar c, int dv)
case IMP:
return 0;
case 0:
- return (!gemu || dv) && (k == '-' || k == EMDASH);
+ return (!gemu || dv) && (k == '-' || k == (size_t)EMDASH);
default:
for (i = 0; breakch[i] && i < NSENT; i++)
if (breakch[i] == k)
@@ -931,7 +931,7 @@ maybreak(tchar c, int dv)
static int
nhychar(tchar c)
{
- int i, k = cbits(c);
+ size_t i, k = cbits(c);
switch (nhych[0]) {
case IMP:
@@ -939,7 +939,7 @@ nhychar(tchar c)
case 0:
if (hyext)
return 0;
- return k == '-' || k == EMDASH;
+ return k == '-' || k == (size_t)EMDASH;
default:
for (i = 0; nhych[i] && i < NSENT; i++)
if (nhych[i] == k)
@@ -1227,7 +1227,7 @@ setnel(void)
int
getword(int x)
{
- register int j, k = 0, w;
+ size_t j, k = 0, w;
register tchar i = 0, *wp, nexti, gotspc = 0, _t;
int noword, n, inword = 0;
int lastsp = ' ';
@@ -1432,10 +1432,10 @@ g1: nexti = GETCH();
collectmb(i);
#endif /* EUC && NROFF && ZWDELIMS */
{
- static int sentchar[] =
+ static size_t sentchar[] =
{ '.', '?', '!', ':', 0 }; /* sentence terminators */
- int *sp, *tp;
- static int transchar[] =
+ size_t *sp, *tp;
+ static size_t transchar[] =
{ '"', '\'', ')', ']', '*', 0, 0 };
transchar[5] = DAGGER;
if ((j != '\n' && j != ' ' && (!padj || j != STRETCH)) ||
diff --git a/troff/n8.c b/troff/n8.c
index 65e9a1b01b8a..72178d263bb1 100644
--- a/troff/n8.c
+++ b/troff/n8.c
@@ -122,7 +122,7 @@ hyphen(tchar *wp)
i = _wdstart = wdstart;
_wdend = wdend;
do {
- if (cbits(*i) == '-' || cbits(*i) == EMDASH ||
+ if (cbits(*i) == '-' || cbits(*i) == (size_t)EMDASH ||
i == _wdend) {
while (wdstart <= i && (punct(*wdstart) ||
(cbits(*wdstart) >= '0' &&
diff --git a/troff/n9.c b/troff/n9.c
index 9e81a65120c7..eb861405a189 100644
--- a/troff/n9.c
+++ b/troff/n9.c
@@ -100,7 +100,7 @@ setz(void)
static int
connectchar(tchar i)
{
- int *cp, c;
+ size_t *cp, c;
c = cbits(i);
if (*connectch) {
@@ -109,7 +109,7 @@ connectchar(tchar i)
return 1;
return 0;
}
- return c == RULE || c == UNDERLINE || c == ROOTEN;
+ return c == (size_t)RULE || c == (size_t)UNDERLINE || c == (size_t)ROOTEN;
}
void
@@ -905,8 +905,8 @@ psskip(struct fg *fp, size_t n)
static int
psgetline(struct fg *fp, char **linebp, size_t *linesize)
{
- int i, n = 0;
- int nl = 0;
+ size_t n = 0;
+ int i, nl = 0;
if (fp->bp == NULL)
fp->bp = fp->buf;
diff --git a/troff/ni.c b/troff/ni.c
index cb9fbe083388..5329fadfc7bb 100644
--- a/troff/ni.c
+++ b/troff/ni.c
@@ -46,6 +46,8 @@
* contributors.
*/
+#include <sys/types.h>
+
#include "tdef.h"
#include "ext.h"
@@ -70,22 +72,22 @@ char *obufp = obuf;
int NN;
struct numtab *numtab;
const struct numtab initnumtab[] = {
- { PAIR('%', 0) },
- { PAIR('n', 'l') },
- { PAIR('y', 'r') },
- { PAIR('h', 'p') },
- { PAIR('c', 't') },
- { PAIR('d', 'n') },
- { PAIR('m', 'o') },
- { PAIR('d', 'y') },
- { PAIR('d', 'w') },
- { PAIR('l', 'n') },
- { PAIR('d', 'l') },
- { PAIR('s', 't') },
- { PAIR('s', 'b') },
- { PAIR('c', '.') },
- { PAIR('$', '$') },
- { 0 }
+ { PAIR('%', 0), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('n', 'l'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('y', 'r'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('h', 'p'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('c', 't'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('d', 'n'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('m', 'o'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('d', 'y'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('d', 'w'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('l', 'n'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('d', 'l'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('s', 't'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('s', 'b'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('c', '.'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { PAIR('$', '$'), 0, 0, 0, NULL, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0 }
};
@@ -98,11 +100,11 @@ char **mfiles;
int nmfi = 0;
int NMF;
#ifndef NROFF
-int oldbits = -1;
+unsigned int oldbits = (unsigned int)-1;
#endif
int init = 1;
int fc = IMP; /* field character */
-int eschar = '\\';
+unsigned int eschar = '\\';
int ecs = '\\';
#ifdef NROFF
int pl = 11*INCH;
@@ -138,7 +140,7 @@ enum warn warn = WARN_FONT;
int NM;
struct contab *contab;
-#define C(a,b) {a, 0, (void(*)(int))b, 0}
+#define C(a,b) {a, 0, (void(*)(int))b, 0, 0, 0, 0}
const struct contab initcontab[] = {
C(PAIR('d', 's'), caseds),
C(PAIR('a', 's'), caseas),
diff --git a/troff/nii.c b/troff/nii.c
index 389fde83866d..56de498e989c 100644
--- a/troff/nii.c
+++ b/troff/nii.c
@@ -46,6 +46,8 @@
* contributors.
*/
+#include <sys/types.h>
+
#include "tdef.h"
#ifdef NROFF
#include "tw.h"
diff --git a/troff/nroff.d/Makefile.mk b/troff/nroff.d/Makefile.mk
index 82c9667083af..2a86c0e8d55c 100644
--- a/troff/nroff.d/Makefile.mk
+++ b/troff/nroff.d/Makefile.mk
@@ -15,7 +15,7 @@ FLAGS = -DNROFF -DUSG $(EUC) -I. -I.. -I../../include -DMACDIR='"$(MACDIR)"' \
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: nroff
+all: nroff nroff.1
nroff: $(OBJ) $(LIBHNJ)/libhnj.a
$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o nroff
@@ -26,10 +26,15 @@ install:
$(INSTALL) -c -m 644 nroff.1 $(ROOT)$(MANDIR)/man1/nroff.1
clean:
- rm -f $(OBJ) nroff core log *~
+ rm -f $(OBJ) nroff core log *~ nroff.1
mrproper: clean
+nroff.1: nroff.1.in
+ sed -e 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(MACDIR)/"' \
+ -e 's"/usr/ucblib/doctools/nterm/"$(ROOT)$(TABDIR)/"' \
+ nroff.1.in > $@
+
draw.o: ../tdef.h ../ext.h
n10.o: n10.c ../tdef.h ../ext.h tw.h pt.h
n6.o: n6.c ../tdef.h tw.h pt.h ../ext.h
diff --git a/troff/nroff.d/n6.c b/troff/nroff.d/n6.c
index 3754bd939dff..a62101202ba9 100644
--- a/troff/nroff.d/n6.c
+++ b/troff/nroff.d/n6.c
@@ -101,7 +101,7 @@ width(register tchar j)
else if (iscontrol(i))
return(0);
}
- if (i==ohc)
+ if ((size_t)i==ohc)
return(0);
#ifdef EUC
if (multi_locale && i >= nchtab + _SPECCHAR_ST) {
diff --git a/troff/nroff.d/nroff.1 b/troff/nroff.d/nroff.1.in
index 9e1a982c9db0..9e1a982c9db0 100644
--- a/troff/nroff.d/nroff.1
+++ b/troff/nroff.d/nroff.1.in
diff --git a/troff/nroff.d/pt.h b/troff/nroff.d/pt.h
index 2f095f371265..e485825c137f 100644
--- a/troff/nroff.d/pt.h
+++ b/troff/nroff.d/pt.h
@@ -13,6 +13,7 @@ extern void specnames(void);
extern int findch(register const char *);
extern void twdone(void);
extern void ptout1(void);
+void ptout(tchar);
extern char *plot(char *);
extern void move(void);
extern void ptlead(void);
diff --git a/troff/tdef.h b/troff/tdef.h
index 38620c4ede8a..434edd2f0e17 100644
--- a/troff/tdef.h
+++ b/troff/tdef.h
@@ -835,7 +835,7 @@ extern struct env {
int _fi;
int _cc;
int _c2;
- int _ohc;
+ size_t _ohc;
int _tdelim;
int _hyf;
int _hyoff;
@@ -922,11 +922,11 @@ extern struct env {
int _wdhyf;
tchar *_hyptr[NHYP];
int _tabtab[NTAB];
- int _sentch[NSENT];
- int _transch[NSENT];
- int _breakch[NSENT];
- int _nhych[NSENT];
- int _connectch[NSENT];
+ size_t _sentch[NSENT];
+ size_t _transch[NSENT];
+ size_t _breakch[NSENT];
+ size_t _nhych[NSENT];
+ size_t _connectch[NSENT];
tchar *_line;
tchar *_word;
int *_wdpenal;
diff --git a/troff/troff.d/Makefile.mk b/troff/troff.d/Makefile.mk
index 1cddedf88880..87de1c911acf 100644
--- a/troff/troff.d/Makefile.mk
+++ b/troff/troff.d/Makefile.mk
@@ -12,7 +12,7 @@ FLAGS = -DUSG $(EUC) -I. -I.. -I../../include -DMACDIR='"$(MACDIR)"' \
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: troff ta otfdump
+all: troff ta otfdump troff.1
troff: $(OBJ) $(LIBHNJ)/libhnj.a
$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o troff
@@ -35,10 +35,15 @@ install:
clean:
rm -f $(OBJ) draw.o ta.o troff ta otfdump otfdump.o otfdump_vs.o \
- core log *~
+ core log *~ troff.1
mrproper: clean
+troff.1: troff.1.in
+ sed -e 's"/usr/ucblib/doctools/font/"$(ROOT)$(FNTDIR)/"' \
+ -e 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(MACDIR)/"' \
+ troff.1.in > $@
+
draw.o: draw.c
makedev.o: makedev.c dev.h
t10.o: t10.c ../tdef.h ../ext.h dev.h afm.h unimap.h troff.h
diff --git a/troff/troff.d/afm.c b/troff/troff.d/afm.c
index b5bea1c35e6f..0f4a7cbfe183 100644
--- a/troff/troff.d/afm.c
+++ b/troff/troff.d/afm.c
@@ -888,7 +888,6 @@ afmget(struct afmtab *a, char *contents, size_t size)
char *cp, *th, *tp;
int n = 0;
enum spec s;
- size_t l;
if ((cp = strrchr(a->file, '/')) == NULL)
cp = a->file;
diff --git a/troff/troff.d/afm.h b/troff/troff.d/afm.h
index 59c601905917..dba71001fdd5 100644
--- a/troff/troff.d/afm.h
+++ b/troff/troff.d/afm.h
@@ -135,11 +135,11 @@ extern int nextprime(int n);
extern unsigned pjw(const char *);
extern char *afmencodepath(const char *);
extern char *afmdecodepath(const char *);
-#ifdef DPOST
#include <stdio.h>
+int fprintenc(FILE *, const char *);
+#ifdef DPOST
extern int otfcff(const char *, char *, size_t, size_t *, size_t *);
extern int otft42(char *, char *, char *, size_t, FILE *);
-extern int fprintenc(FILE *, const char *);
#endif
extern struct dev dev;
diff --git a/troff/troff.d/dhtml/dhtml.l b/troff/troff.d/dhtml/dhtml.l
index c99db26a88a1..ad7d1c72be65 100644
--- a/troff/troff.d/dhtml/dhtml.l
+++ b/troff/troff.d/dhtml/dhtml.l
@@ -32,6 +32,8 @@
#include "main.h"
static int i0;
%}
+%option nounput
+%option noinput
%x X FONT_NUM FONT_NAM T X_X LINK ULINK ANCHOR
WS [ ]
NWS [^ \n]
diff --git a/troff/troff.d/dhtml/lib.c b/troff/troff.d/dhtml/lib.c
index 251223627e05..90018f329b02 100644
--- a/troff/troff.d/dhtml/lib.c
+++ b/troff/troff.d/dhtml/lib.c
@@ -33,6 +33,7 @@
#include <string.h>
#include "main.h"
#include "bst.h"
+#include "lib.h"
void * /* pointer to \0 terminated file contents */
file2ram(char *p, /* path to file */
diff --git a/troff/troff.d/dpost.d/Makefile.mk b/troff/troff.d/dpost.d/Makefile.mk
index b2594b800192..3677592b3d20 100644
--- a/troff/troff.d/dpost.d/Makefile.mk
+++ b/troff/troff.d/dpost.d/Makefile.mk
@@ -10,7 +10,7 @@ FLAGS = -I. -I.. -DFNTDIR='"$(FNTDIR)"' -DPSTDIR='"$(PSTDIR)"' $(EUC) \
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: dpost
+all: dpost dpost.1
dpost: $(OBJ)
$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o dpost
@@ -22,10 +22,16 @@ install:
$(INSTALL) -c -m 644 dpost.1 $(ROOT)$(MANDIR)/man1/dpost.1
clean:
- rm -f $(OBJ) dpost core log *~
+ rm -f $(OBJ) dpost core log *~ dpost.1
mrproper: clean
+dpost.1: dpost.1.in
+ sed -e 's"/usr/ucblib/doctools/font/devpost/postscript/"$(ROOT)$(PSTDIR)/"' \
+ -e 's"/usr/ucblib/doctools/font"$(ROOT)$(FNTDIR)"' \
+ -e 's"/usr/lib/lp/postscript/"$(ROOT)$(PSTDIR)/"' \
+ -e 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(MACDIR)/"' dpost.1.in > $@
+
color.o: color.c gen.h ext.h
dpost.o: dpost.c comments.h gen.h path.h ext.h ../dev.h dpost.h ../afm.h \
asciitype.h
diff --git a/troff/troff.d/dpost.d/dpost.1 b/troff/troff.d/dpost.d/dpost.1.in
index 7a935f823d03..7a935f823d03 100644
--- a/troff/troff.d/dpost.d/dpost.1
+++ b/troff/troff.d/dpost.d/dpost.1.in
diff --git a/troff/troff.d/dpost.d/dpost.c b/troff/troff.d/dpost.d/dpost.c
index 60c0b210fa42..30a33e9c691a 100644
--- a/troff/troff.d/dpost.d/dpost.c
+++ b/troff/troff.d/dpost.d/dpost.c
@@ -1632,7 +1632,8 @@ devcntrl(
char str[4096], *buf, str1[4096];
- int c, n, sz;
+ int c, sz;
+ size_t n;
/*
@@ -1686,7 +1687,7 @@ devcntrl(
break;
case 'f': /* load font in a position */
- fscanf(fp, "%d", &n);
+ fscanf(fp, "%zd", &n);
sget(str, sizeof str, fp);
fgets(buf, sz, fp); /* in case there's a filename */
ungetc('\n', fp); /* fgets() goes too far */
@@ -1698,8 +1699,8 @@ devcntrl(
/* these don't belong here... */
case 'H': /* char height */
- fscanf(fp, "%d", &n);
- if (n != FRACTSIZE)
+ fscanf(fp, "%zd", &n);
+ if (n != (size_t)FRACTSIZE)
t_charht(n, 0);
else {
float f;
@@ -1709,7 +1710,7 @@ devcntrl(
break;
case 'S': /* slant */
- fscanf(fp, "%d", &n);
+ fscanf(fp, "%zd", &n);
t_slant(n);
break;
@@ -1909,7 +1910,6 @@ loadfont (
int nw; /* number of width table entries */
const char *p;
char *path;
- size_t l;
/*
@@ -4578,7 +4578,7 @@ orderbookmarks(void)
int counts[MAXBOOKMARKLEVEL+1];
int refs[MAXBOOKMARKLEVEL+1];
size_t i, j, k, t;
- int lvl = 0;
+ size_t lvl = 0;
/*
* Generate the Count parameter from the given levels.
diff --git a/troff/troff.d/dpost.d/misc.c b/troff/troff.d/dpost.d/misc.c
index b5dc8a4e4858..e79544d0efa9 100644
--- a/troff/troff.d/dpost.d/misc.c
+++ b/troff/troff.d/dpost.d/misc.c
@@ -57,6 +57,7 @@
#include "path.h"
#include "asciitype.h"
+void errprint(char *fmt, ...);
static size_t nolist = 0; /* number of specified ranges */
static int olist[512]; /* processing range pairs */
diff --git a/troff/troff.d/font/devhtml/B b/troff/troff.d/font/devhtml/B.in
index fc9390a7157e..fc9390a7157e 100644
--- a/troff/troff.d/font/devhtml/B
+++ b/troff/troff.d/font/devhtml/B.in
diff --git a/troff/troff.d/font/devhtml/BI b/troff/troff.d/font/devhtml/BI.in
index 8df0242e857d..8df0242e857d 100644
--- a/troff/troff.d/font/devhtml/BI
+++ b/troff/troff.d/font/devhtml/BI.in
diff --git a/troff/troff.d/font/devhtml/C b/troff/troff.d/font/devhtml/C.in
index e9f9fb1bc169..e9f9fb1bc169 100644
--- a/troff/troff.d/font/devhtml/C
+++ b/troff/troff.d/font/devhtml/C.in
diff --git a/troff/troff.d/font/devhtml/CB b/troff/troff.d/font/devhtml/CB.in
index bb929d1a9aa8..bb929d1a9aa8 100644
--- a/troff/troff.d/font/devhtml/CB
+++ b/troff/troff.d/font/devhtml/CB.in
diff --git a/troff/troff.d/font/devhtml/CI b/troff/troff.d/font/devhtml/CI.in
index 3e241d8c28a7..3e241d8c28a7 100644
--- a/troff/troff.d/font/devhtml/CI
+++ b/troff/troff.d/font/devhtml/CI.in
diff --git a/troff/troff.d/font/devhtml/CR b/troff/troff.d/font/devhtml/CR.in
index 6d5683909145..6d5683909145 100644
--- a/troff/troff.d/font/devhtml/CR
+++ b/troff/troff.d/font/devhtml/CR.in
diff --git a/troff/troff.d/font/devhtml/CW b/troff/troff.d/font/devhtml/CW.in
index 497184ad97db..497184ad97db 100644
--- a/troff/troff.d/font/devhtml/CW
+++ b/troff/troff.d/font/devhtml/CW.in
diff --git a/troff/troff.d/font/devhtml/H b/troff/troff.d/font/devhtml/H.in
index 30e1c356c606..30e1c356c606 100644
--- a/troff/troff.d/font/devhtml/H
+++ b/troff/troff.d/font/devhtml/H.in
diff --git a/troff/troff.d/font/devhtml/HB b/troff/troff.d/font/devhtml/HB.in
index a682337d4cd3..a682337d4cd3 100644
--- a/troff/troff.d/font/devhtml/HB
+++ b/troff/troff.d/font/devhtml/HB.in
diff --git a/troff/troff.d/font/devhtml/HI b/troff/troff.d/font/devhtml/HI.in
index 4b1121c8c189..4b1121c8c189 100644
--- a/troff/troff.d/font/devhtml/HI
+++ b/troff/troff.d/font/devhtml/HI.in
diff --git a/troff/troff.d/font/devhtml/I b/troff/troff.d/font/devhtml/I.in
index 347a976a341e..347a976a341e 100644
--- a/troff/troff.d/font/devhtml/I
+++ b/troff/troff.d/font/devhtml/I.in
diff --git a/troff/troff.d/font/devhtml/Makefile.mk b/troff/troff.d/font/devhtml/Makefile.mk
index 41a74b5d9f18..665b77049bb1 100644
--- a/troff/troff.d/font/devhtml/Makefile.mk
+++ b/troff/troff.d/font/devhtml/Makefile.mk
@@ -2,7 +2,12 @@ BIN= makefont
OBJS= $(BIN).o
FONTS= R I B BI C CW CR CI CB H HI HB S
-all: $(BIN)
+.SUFFIXES: .in
+.in: ${BIN}
+ cat $< > $@
+ ./${BIN} $@ >> $@
+
+all: $(BIN) ${FONTS}
install:
d=$(ROOT)$(FNTDIR)/devhtml; test -d $$d || mkdir $$d; \
@@ -11,11 +16,10 @@ install:
sed '1,2d;s/[[:space:]].*//' charset >> $$d/DESC; \
for i in $(FONTS); do \
install -m 644 $$i $$d/; \
- ./$(BIN) $$i >> $$d/$$i; \
done
clean:
- rm -rf $(BIN) $(OBJS)
+ rm -rf $(BIN) $(OBJS) $(FONTS)
mrproper: clean
diff --git a/troff/troff.d/font/devhtml/R b/troff/troff.d/font/devhtml/R.in
index b58aaa066970..b58aaa066970 100644
--- a/troff/troff.d/font/devhtml/R
+++ b/troff/troff.d/font/devhtml/R.in
diff --git a/troff/troff.d/font/devhtml/S b/troff/troff.d/font/devhtml/S.in
index bfcc84e27c7e..bfcc84e27c7e 100644
--- a/troff/troff.d/font/devhtml/S
+++ b/troff/troff.d/font/devhtml/S.in
diff --git a/troff/troff.d/font/devhtml/makefont.c b/troff/troff.d/font/devhtml/makefont.c
index a9b4da08d591..d0587d98dae3 100644
--- a/troff/troff.d/font/devhtml/makefont.c
+++ b/troff/troff.d/font/devhtml/makefont.c
@@ -49,8 +49,10 @@ main(int argc, char **argv) {
char *b, *b0;
ssize_t s;
progname = argv[0];
- if (argc != 2) return usage();
+ if (argc < 2 || argc > 3) return usage();
fontname = argv[1];
+ if (argc == 3)
+ charfile = argv[2];
s = read_file(&b0);
b = b0;
if (!(i = find_font(&b, &s))) {
@@ -189,7 +191,7 @@ next_line(char **b, ssize_t *s) {
static int
usage(void) {
fprintf(stderr,
-"Usage: ./%s <font_name> >> <font_name>\n"
+"Usage: ./%s <font_name> [charsetfile] >> <font_name>\n"
, progname);
return EXIT_FAILURE;
}
diff --git a/troff/troff.d/otf.c b/troff/troff.d/otf.c
index abaec6f55c8f..1733e675646b 100644
--- a/troff/troff.d/otf.c
+++ b/troff/troff.d/otf.c
@@ -63,7 +63,7 @@ unsigned short unitsPerEm;
static short xMin, yMin, xMax, yMax;
static short indexToLocFormat;
static struct afmtab *a;
-static int nc;
+static unsigned long nc;
static int fsType;
static int WeightClass;
static int isFixedPitch;
@@ -1663,7 +1663,8 @@ get_offset_table(void)
static void
get_table_directories(void)
{
- int i, j, o;
+ int i, j;
+ size_t o;
char buf[16];
free(table_directories);
@@ -1750,7 +1751,7 @@ get_bb(int gid, int B[4])
}
static void
-onechar(int gid, int sid)
+onechar(unsigned long gid, int sid)
{
long o;
int w, tp;
@@ -1814,7 +1815,7 @@ static void
get_CFF_Charset(void)
{
int d = 0;
- int gid, i, j, first, nLeft;
+ unsigned long gid, i, j, first, nLeft;
d = get_CFF_Top_DICT_Entry(15);
if (d == 0) {
@@ -2084,7 +2085,7 @@ addunitab(int c __actual_use, int u __actual_use)
static char *got_gid;
static void
-got_mapping(int c, int gid, int addchar)
+got_mapping(int c, unsigned long gid, int addchar)
{
if (gid < nc) {
if (addchar) {
@@ -2515,9 +2516,9 @@ get_OS_2(void)
}
static char *
-GID2SID(int gid)
+GID2SID(unsigned long gid)
{
- if (gid < 0 || gid >= nc)
+ if (gid >= nc)
return NULL;
return getSID(gid2sid[gid]);
}
@@ -2569,18 +2570,18 @@ open_cov(int o)
}
}
-static int
+static unsigned long
get_cov(struct cov *cp)
{
int Start, End;
switch (cp->CoverageFormat) {
default:
- return -1;
+ return (unsigned long)-1;
case 1:
if (cp->cnt < cp->GlyphCount)
return pbe16(&contents[cp->offset+4+2*cp->cnt++]);
- return -1;
+ return (unsigned long)-1;
case 2:
while (cp->cnt < cp->RangeCount) {
Start = pbe16(&contents[cp->offset+4+6*cp->cnt]);
@@ -2594,7 +2595,7 @@ get_cov(struct cov *cp)
cp->gid = Start;
return cp->gid++;
}
- return -1;
+ return (unsigned long)-1;
}
}
@@ -2727,7 +2728,7 @@ static void
kerninit(void)
{
char *cp;
- int i;
+ unsigned long i;
got_kern = 0;
nametable = calloc(nc, sizeof *nametable);
@@ -2739,7 +2740,7 @@ kerninit(void)
#define GID2name(gid) ((gid) < 0 || (gid) >= nc ? NULL : nametable[gid])
static inline void
-kernpair(int first, int second, int x)
+kernpair(unsigned long first, unsigned long second, int x)
{
struct namecache *np1, *np2;
@@ -2767,7 +2768,7 @@ kernfinish(void)
#endif /* !DUMP */
static void
-get_PairValueRecord(int first, int ValueFormat1, int ValueFormat2, int o)
+get_PairValueRecord(int first, int ValueFormat1, int ValueFormat2 __unused, int o)
{
int second;
int x;
@@ -2868,7 +2869,7 @@ get_PairPosFormat2(int o)
}
static void
-get_GPOS_kern1(int _t, int o, const char *_name)
+get_GPOS_kern1(int _t __unused, int o, const char *_name __unused)
{
int PosFormat;
@@ -2881,7 +2882,7 @@ get_GPOS_kern1(int _t, int o, const char *_name)
}
static void
-get_GPOS_kern2(int _t, int o, const char *_name)
+get_GPOS_kern2(int _t __unused, int o, const char *_name __unused)
{
int PosFormat;
@@ -2897,9 +2898,9 @@ static void
get_Ligature(int first, int o)
{
int LigGlyph;
- int CompCount;
+ unsigned int CompCount;
int Component[16];
- int i;
+ unsigned int i;
char *gn;
LigGlyph = pbe16(&contents[o]);
@@ -2969,7 +2970,7 @@ get_LigatureSet(int first, int o)
}
static void
-get_LigatureSubstFormat1(int _t, int o, const char *_name)
+get_LigatureSubstFormat1(int _t __unused, int o, const char *_name __unused)
{
struct cov *cp;
int Coverage;
@@ -3056,9 +3057,9 @@ get_SingleSubstitutionFormat1(int o, const char *name)
{
struct feature *fp;
struct cov *cp;
- int c, d;
+ unsigned long c, d;
int Coverage;
- int DeltaGlyphID;
+ unsigned long DeltaGlyphID;
if (pbe16(&contents[o]) != 1)
return;
@@ -3067,7 +3068,7 @@ get_SingleSubstitutionFormat1(int o, const char *name)
return;
DeltaGlyphID = pbe16(&contents[o+4]);
fp = add_feature(name);
- while ((c = get_cov(cp)) >= 0)
+ while ((c = get_cov(cp)) != (unsigned long)-1)
if ((d = c + DeltaGlyphID) < nc)
add_substitution_pair(fp, c, d);
free_cov(cp);
@@ -3224,7 +3225,7 @@ get_kern_subtable(int o)
static void
get_kern(void)
{
- long o;
+ unsigned long o;
int nTables;
int i, length;
@@ -3450,7 +3451,7 @@ otft42(char *font, char *path, char *_contents, size_t _size, FILE *fp)
{
const char *cp;
int ok = 0;
- int i;
+ unsigned long i;
(void) &ok;
a = NULL;
@@ -3509,14 +3510,14 @@ otft42(char *font, char *path, char *_contents, size_t _size, FILE *fp)
}
fprintf(fp, "end readonly def\n");
}
- fprintf(fp, "/CharStrings %d dict dup begin\n", nc);
+ fprintf(fp, "/CharStrings %lu dict dup begin\n", nc);
for (i = 0; i < nc; i++) {
if ((cp = GID2SID(i)) != NULL &&
(i == 0 || strcmp(cp, ".notdef"))) {
fprintenc(fp, cp);
- fprintf(fp, " %d def\n", i);
+ fprintf(fp, " %lu def\n", i);
} else
- fprintf(fp, "/index0x%02X %d def\n", i, i);
+ fprintf(fp, "/index0x%02lX %lu def\n", i, i);
}
fprintf(fp, "end readonly def\n");
fprintf(fp, "/sfnts[");
diff --git a/troff/troff.d/otfdump.c b/troff/troff.d/otfdump.c
index 283e6ae07d1d..8230de46ba5c 100644
--- a/troff/troff.d/otfdump.c
+++ b/troff/troff.d/otfdump.c
@@ -171,20 +171,22 @@ main(int argc, char **argv)
}
void
-afmaddchar(struct afmtab *a, int C, int tp, int cl, int WX, int B[4], char *N,
- enum spec s, int gid)
+afmaddchar(struct afmtab *a __unused, int C __unused, int tp __unused,
+ int cl __unused, int WX, int B[4] __unused, char *N,
+ enum spec s __unused, int gid __unused)
{
if (N)
print(SHOW_CHARS, "char %s width %d", N, _unitconv(WX));
}
void
-afmalloc(struct afmtab *a, int n)
+afmalloc(struct afmtab *a __unused, int n __unused)
{
}
void
-afmaddkernpair(struct afmtab *a, int ch1, int ch2, int k)
+afmaddkernpair(struct afmtab *a __unused, int ch1 __unused, int ch2 __unused,
+ int k __unused)
{
}
diff --git a/troff/troff.d/pt.h b/troff/troff.d/pt.h
index fcd6c7b5b927..8287a978a18a 100644
--- a/troff/troff.d/pt.h
+++ b/troff/troff.d/pt.h
@@ -7,7 +7,7 @@
/* t6.c */
extern int width(register tchar);
extern void zapwcache(int);
-extern int getcw(register int);
+extern int getcw(size_t);
extern int abscw(int);
extern int onfont(tchar);
extern int getascender(void);
@@ -81,7 +81,7 @@ extern double u2pts(int);
extern void ptinit(void);
extern void specnames(void);
extern int findch(register const char *);
-extern void ptout(register tchar);
+void ptout(register tchar);
extern tchar *ptout0(tchar *, tchar *);
extern void ptps(void);
extern void ptfont(void);
diff --git a/troff/troff.d/t10.c b/troff/troff.d/t10.c
index 4a883041224a..d90916a6c0a2 100644
--- a/troff/troff.d/t10.c
+++ b/troff/troff.d/t10.c
@@ -90,7 +90,7 @@ int Vert;
int Unitwidth;
int nfonts;
static int nsizes;
-int nchtab;
+size_t nchtab;
int lettrack;
float horscale;
@@ -134,7 +134,7 @@ static void ptlink(int);
static void ptulink(int);
static void ptyon(int);
static void ptchar(int, int);
-static void pnc(int, struct afmtab *);
+static void pnc(size_t, struct afmtab *);
void
growfonts(int n)
@@ -227,7 +227,7 @@ ptinit(void)
nfonts = dev.nfonts;
nsizes = dev.nsizes;
nchtab = dev.nchtab;
- if (nchtab >= NCHARS - 128) {
+ if (nchtab >= (size_t)NCHARS - 128) {
errprint("too many special characters in file %s",
termtab);
done3(1);
@@ -350,7 +350,7 @@ specnames(void)
int
findch(register const char *s) /* find char s in chname */
{
- register int i;
+ size_t i;
for (i = 0; i < nchtab; i++)
if (strcmp(s, &chname[chtab[i]]) == 0)
@@ -728,7 +728,7 @@ ptout0(tchar *pi, tchar *pend)
}
static void
-pnc(int k, struct afmtab *a) {
+pnc(size_t k, struct afmtab *a) {
int j;
if (k >= nchtab + 128) {
diff --git a/troff/troff.d/t6.c b/troff/troff.d/t6.c
index b1ae66504c63..33c5229f71a3 100644
--- a/troff/troff.d/t6.c
+++ b/troff/troff.d/t6.c
@@ -73,6 +73,8 @@
#include "troff.h"
#include "fontmap.h"
+int ps2cc(const char *name);
+
/* fitab[f][c] is 0 if c is not on font f */
/* if it's non-zero, c is in fontab[f] at position
* fitab[f][c].
@@ -108,7 +110,7 @@ static int _ps2cc(const char *name, int create);
int
width(register tchar j)
{
- register int i, k;
+ size_t i, k;
_minflg = minflg;
minflg = minspc = 0;
@@ -128,7 +130,7 @@ width(register tchar j)
return(k);
}
i = cbits(j);
- if (html && i >= NCHARS)
+ if (html && i >= (size_t)NCHARS)
i = ' ';
if (i < ' ') {
if (i == '\b')
@@ -207,7 +209,7 @@ zapwcache(int s)
}
int
-getcw(register int i)
+getcw(size_t i)
{
register int k;
register int *p;
@@ -404,7 +406,7 @@ abscw(int n) /* return index of abs char n in fontab[], etc. */
int
onfont(tchar c)
{
- int k = cbits(c);
+ size_t k = cbits(c);
int f = fbits(c);
if (k <= ' ')
@@ -519,7 +521,8 @@ kzap(int f)
static tchar
findchar(tchar c)
{
- int f, i;
+ int f;
+ size_t i;
f = fbits(c);
c = cbits(c);
@@ -573,7 +576,8 @@ getkw(tchar c, tchar e)
{
struct knode *kp;
struct afmtab *a;
- int f, g, i, j, k, n, s, I, J;
+ int f, g, i, j, k, n, s;
+ size_t I, J;
double z;
if (isxfunc(c, CHAR))
@@ -724,7 +728,7 @@ static const struct amap {
tchar
setch(int delim) {
- register int j;
+ size_t j;
char temp[NC];
tchar c, e[2] = {0, 0};
int f;
@@ -831,7 +835,7 @@ tchar setabs(void) /* set absolute char from \C'...' */
n = 0;
n = inumb(&n);
getch();
- if (nonumb || n + nchtab + 128 >= NCHARS)
+ if (nonumb || n + nchtab + 128 >= (size_t)NCHARS)
return 0;
return n + nchtab + 128;
}
@@ -2067,7 +2071,6 @@ loadafm(int nf, int rq, char *file, char *supply, int required, enum spec spec)
struct afmtab *a;
int i, have = 0;
struct namecache *np;
- size_t l;
zapwcache(0);
if (nf < 0)
@@ -2252,7 +2255,8 @@ void
casehidechar(void)
{
int savfont = font, savfont1 = font1;
- int i, j;
+ int j;
+ size_t i;
tchar k;
if (skip(1))
@@ -2871,7 +2875,7 @@ tr2un(tchar i, int f)
a = afmtab[n];
if (a->unitab && i < a->nunitab && a->unitab[i])
return a->unitab[i];
- if (i - 32 >= nchtab + 128)
+ if ((size_t)i - 32 >= nchtab + 128)
i -= nchtab + 128;
if ((n = a->fitab[i - 32]) < a->nchars &&
a->nametab[n] != NULL)
diff --git a/troff/troff.d/ta.c b/troff/troff.d/ta.c
index c3e9d92b4197..a31953f62a4e 100644
--- a/troff/troff.d/ta.c
+++ b/troff/troff.d/ta.c
@@ -112,7 +112,7 @@ x ...\n device control functions:
#define NFONT 10
int output = 0; /* do we do output at all? */
-int nolist = 0; /* output page list if > 0 */
+size_t nolist = 0; /* output page list if > 0 */
int olist[20]; /* pairs of page numbers */
int erase = 1;
@@ -243,7 +243,8 @@ main(int argc, char **argv)
void
outlist(char *s) /* process list of page numbers to be printed */
{
- int n1, n2, i;
+ int n1, n2;
+ size_t i;
nolist = 0;
while (*s && nolist < sizeof olist/sizeof *olist - 1) {
@@ -279,7 +280,7 @@ outlist(char *s) /* process list of page numbers to be printed */
int
in_olist(int n) /* is n in olist? */
{
- int i;
+ size_t i;
if (nolist == 0)
return(1); /* everything is included */
@@ -464,17 +465,17 @@ fileinit(void) /* read in font and code files, etc. */
}
void
-fontprint(int i) /* debugging print of font i (0,...) */
+fontprint(int i __unused) /* debugging print of font i (0,...) */
{
}
void
-loadcode(int n, int nw) /* load codetab on position n (0...); #chars is nw */
+loadcode(int n __unused, int nw __unused) /* load codetab on position n (0...); #chars is nw */
{
}
void
-loadfont(int n, char *s) /* load font info for font s on position n (1...) */
+loadfont(int n __unused, char *s __unused) /* load font info for font s on position n (1...) */
{
}
@@ -518,7 +519,7 @@ int drawdot = '.'; /* draw with this character */
int drawsize = 1; /* shrink by this factor when drawing */
void
-t_init(int reinit) /* initialize device */
+t_init(int reinit __unused) /* initialize device */
{
fflush(stdout);
hpos = vpos = 0;
@@ -686,13 +687,13 @@ t_newline(void) /* do whatever for the end of a line */
}
int
-t_size(int n) /* convert integer to internal size number*/
+t_size(int n __unused) /* convert integer to internal size number*/
{
return 0;
}
int
-t_font(char *s) /* convert string to internal font number */
+t_font(char *s __unused) /* convert string to internal font number */
{
return 0;
}
@@ -807,17 +808,17 @@ put1(int c) /* output char c */
}
void
-setsize(double n) /* set point size to n (internal) */
+setsize(double n __unused) /* set point size to n (internal) */
{
}
void
-t_fp(int n, char *s) /* font position n now contains font s */
+t_fp(int n __unused, char *s __unused) /* font position n now contains font s */
{
}
void
-setfont(int n) /* set font to n */
+setfont(int n __unused) /* set font to n */
{
}
@@ -870,7 +871,8 @@ char *spectab[] ={
static int
sget(char *buf, size_t size, FILE *fp)
{
- int c, n = 0;
+ int c;
+ size_t n = 0;
do
c = getc(fp);
diff --git a/troff/troff.d/tmac.d/Makefile.mk b/troff/troff.d/tmac.d/Makefile.mk
index 444625ce88de..8bb54c185588 100644
--- a/troff/troff.d/tmac.d/Makefile.mk
+++ b/troff/troff.d/tmac.d/Makefile.mk
@@ -24,9 +24,14 @@ install: all $(ROOT)$(MACDIR) $(ROOT)$(MANDIR)/man7
done
clean:
- rm -f andoc bib doc e g m s pm an doc-ditroff
+ rm -f andoc bib doc e g m s pm an doc-ditroff mcolor.7
mrproper: clean
+mcolor.7: mcolor.7.in
+ sed -e 's"/usr/ucblib/doctools/font/devpost/postscript"$(ROOT)$(PSTDIR)"' \
+ -e 's"/usr/ucblib/doctools/tmac"$(ROOT)$(MACDIR)"' \
+ mcolor.7.in > $@
+
$(ROOT)$(MACDIR) $(ROOT)$(MANDIR)/man7:
mkdir -p $@
diff --git a/troff/troff.d/tmac.d/mcolor.7 b/troff/troff.d/tmac.d/mcolor.7.in
index 78408f4fec87..78408f4fec87 100644
--- a/troff/troff.d/tmac.d/mcolor.7
+++ b/troff/troff.d/tmac.d/mcolor.7.in
diff --git a/troff/troff.d/troff.1 b/troff/troff.d/troff.1.in
index 65655d27ee04..65655d27ee04 100644
--- a/troff/troff.d/troff.1
+++ b/troff/troff.d/troff.1.in
diff --git a/troff/troff.d/troff.h b/troff/troff.d/troff.h
index 57c2a2b07e72..d3072e39ed26 100644
--- a/troff/troff.d/troff.h
+++ b/troff/troff.d/troff.h
@@ -51,7 +51,7 @@ extern int *ccstab;
extern int **fallbacktab;
extern float *zoomtab;
-extern int nchtab;
+extern size_t nchtab;
extern char *chname;
extern int c_endash;
diff --git a/vgrind/Makefile.mk b/vgrind/Makefile.mk
index 9ad1c5eec9e4..148c78438109 100644
--- a/vgrind/Makefile.mk
+++ b/vgrind/Makefile.mk
@@ -5,7 +5,7 @@ FLAGS = $(EUC) -DLIBDIR='"$(LIBDIR)"' $(DEFINES) -I../include
.c.o:
$(CC) $(_CFLAGS) $(FLAGS) -c $<
-all: vgrind vfontedpr
+all: vgrind vfontedpr vgrind.1
vfontedpr: $(OBJ)
$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o vfontedpr
@@ -29,6 +29,10 @@ install:
$(INSTALL) -c -m 644 vgrind.1 $(ROOT)$(MANDIR)/man1/vgrind.1
clean:
- rm -f $(OBJ) vfontedpr vgrind retest retest.o core log *~
+ rm -f $(OBJ) vfontedpr vgrind retest retest.o core log *~ vgrind.1
mrproper: clean
+
+vgrind.1: vgrind.1.in
+ sed -e 's"/usr/ucblib/tmac/"$(ROOT)$(MACDIR)/"' \
+ -e 's"/usr/ucblib/"$(ROOT)$(LIBDIR)/"' vgrind.1.in > $@
diff --git a/vgrind/regexp.c b/vgrind/regexp.c
index 185536b5ceba..3d99f3c0781a 100644
--- a/vgrind/regexp.c
+++ b/vgrind/regexp.c
@@ -17,6 +17,10 @@
#include <string.h>
#include <stdlib.h>
+int STRNCMP(register char *s1, register char *s2, register int len);
+char * expmatch ( register char *s, register char *re, register char *mstring);
+char *convexp( char *re);
+
typedef int boolean;
#define TRUE 1
#define FALSE 0
diff --git a/vgrind/vgrind.1 b/vgrind/vgrind.1.in
index ad907958e01a..ad907958e01a 100644
--- a/vgrind/vgrind.1
+++ b/vgrind/vgrind.1.in
diff --git a/vgrind/vgrindefs.c b/vgrind/vgrindefs.c
index 560b45aab43a..31984b260259 100644
--- a/vgrind/vgrindefs.c
+++ b/vgrind/vgrindefs.c
@@ -40,6 +40,11 @@
* doesn't, and because living w/o it is not hard.
*/
+int tgetent(char *bp, char *name, char *file);
+int tgetnum(char *id);
+int tgetflag(char *id);
+char * tgetstr(char *id, char **area);
+
static char *tbuf;
static char *filename;
static int hopcount; /* detect infinite loops in termcap, init 0 */