aboutsummaryrefslogtreecommitdiffstats
path: root/troff/troff.d/dpost.d
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 /troff/troff.d/dpost.d
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
Diffstat (limited to 'troff/troff.d/dpost.d')
-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
4 files changed, 16 insertions, 9 deletions
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 */