aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-10-25 16:12:45 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-10-25 16:12:45 +0000
commit6db6db4b7f38f7760b90ec861a39b5ccb9df5ba9 (patch)
tree4c2c4a63a90dbcb77b7e6860bb662b5ddecdedf5
parentab1717bb35d85041e0184f79daa1313a1306dc01 (diff)
downloadsrc-6db6db4b7f38f7760b90ec861a39b5ccb9df5ba9.tar.gz
src-6db6db4b7f38f7760b90ec861a39b5ccb9df5ba9.zip
Import heirloom doctools snapshot 20161025vendor/heirloom-doctools/20161025
Notes
Notes: svn path=/vendor/heirloom-doctools/dist/; revision=307921 svn path=/vendor/heirloom-doctools/20161025/; revision=307922; tag=vendor/heirloom-doctools/20161025
-rw-r--r--checknr/Makefile.mk4
-rw-r--r--col/Makefile.mk4
-rwxr-xr-xconfigure3
-rw-r--r--eqn/checkeq.d/Makefile.mk4
-rw-r--r--eqn/eqn.d/Makefile.mk4
-rw-r--r--eqn/eqnchar.d/Makefile.mk6
-rw-r--r--eqn/lex.c2
-rw-r--r--eqn/neqn.d/Makefile.mk4
-rw-r--r--grap/Makefile.mk4
-rw-r--r--mk.config11
-rw-r--r--mpm/Makefile.mk6
-rw-r--r--pic/Makefile.mk4
-rw-r--r--picpack/Makefile.mk4
-rw-r--r--ptx/Makefile.mk4
-rw-r--r--refer/Makefile.mk16
-rw-r--r--refer/glue3.c2
-rw-r--r--soelim/Makefile.mk4
-rw-r--r--tbl/Makefile.mk4
-rw-r--r--troff/ext.h6
-rw-r--r--troff/libhnj/Makefile.mk4
-rw-r--r--troff/n1.c184
-rw-r--r--troff/n2.c5
-rw-r--r--troff/n5.c18
-rw-r--r--troff/nroff.d/Makefile.mk4
-rw-r--r--troff/troff.d/Makefile.mk8
-rw-r--r--troff/troff.d/devaps/Makefile.mk6
-rw-r--r--troff/troff.d/dhtml/Makefile.mk4
-rw-r--r--troff/troff.d/dpost.d/Makefile.mk4
-rw-r--r--troff/troff.d/dpost.d/dpost.c4
-rw-r--r--troff/troff.d/dpost.d/ps_include.c2
-rw-r--r--troff/troff.d/draw.c1
-rw-r--r--troff/troff.d/font/Makefile.mk2
-rw-r--r--troff/troff.d/font/devhtml/Makefile.mk2
-rw-r--r--troff/troff.d/t10.c121
-rw-r--r--version.mk2
-rw-r--r--vgrind/Makefile.mk4
36 files changed, 338 insertions, 133 deletions
diff --git a/checknr/Makefile.mk b/checknr/Makefile.mk
index 646fc7dc7553..8f83a7f008bc 100644
--- a/checknr/Makefile.mk
+++ b/checknr/Makefile.mk
@@ -3,12 +3,12 @@ OBJ = checknr.o
FLAGS = $(DEFINES) -I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: checknr
checknr: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o checknr
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o checknr
install:
$(INSTALL) -c checknr $(ROOT)$(BINDIR)/checknr
diff --git a/col/Makefile.mk b/col/Makefile.mk
index d739a4dd19ff..279f8c977fd5 100644
--- a/col/Makefile.mk
+++ b/col/Makefile.mk
@@ -7,7 +7,7 @@ FLAGS = $(DEFINES) -I../include
all: $(BIN)
$(BIN): $(OBJ)
- $(CC) ${CFLAGS} $(LDFLAGS) $(OBJ) -o $(BIN)
+ $(CC) ${_CFLAGS} $(_LDFLAGS) $(OBJ) -o $(BIN)
install:
$(INSTALL) -c $(BIN) $(ROOT)$(BINDIR)/$(BIN)
@@ -19,4 +19,4 @@ clean:
mrproper: clean
.c.o:
- ${CC} ${CFLAGS} ${CPPFLAGS} $(FLAGS) -c $<
+ ${CC} ${_CFLAGS} $(FLAGS) -c $<
diff --git a/configure b/configure
index 0afb7c398090..8af08409c78e 100755
--- a/configure
+++ b/configure
@@ -86,7 +86,7 @@ gen_mk () {
[ -n "$LIB_AVLBST" ] && echo "LIB_AVLBST=$LIB_AVLBST" >> $OUTMK
[ -n "$LIB_LEX" ] && echo "LIB_LEX=$LIB_LEX" >> $OUTMK
[ -n "$__CDBG" ] && echo "__CDBG=$__CDBG" >> $OUTMK
- [ -n "$__SAN" ] && echo "__SAN=$__SAN" >> $OUTMK
+ [ -n "$__CLDBG" ] && echo "__CLDBG=$__CLDBG" >> $OUTMK
cat $INMK >> $OUTMK || exit 1
}
check_make () {
@@ -225,6 +225,7 @@ rm -f $LOG
gen_mk
check_make
+#check_Sanitizer
check_lex
check_strlcpy
check_strlcat
diff --git a/eqn/checkeq.d/Makefile.mk b/eqn/checkeq.d/Makefile.mk
index 5e13d2021deb..773061a45dde 100644
--- a/eqn/checkeq.d/Makefile.mk
+++ b/eqn/checkeq.d/Makefile.mk
@@ -4,12 +4,12 @@ OBJ = checkeq.o
FLAGS =
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: checkeq
checkeq: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o checkeq
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o checkeq
install:
$(INSTALL) -c checkeq $(ROOT)$(BINDIR)/checkeq
diff --git a/eqn/eqn.d/Makefile.mk b/eqn/eqn.d/Makefile.mk
index d6e573ce1344..a02ba2525ef6 100644
--- a/eqn/eqn.d/Makefile.mk
+++ b/eqn/eqn.d/Makefile.mk
@@ -6,12 +6,12 @@ OBJ = diacrit.o e.o eqnbox.o font.o fromto.o funny.o glob.o integral.o \
FLAGS = -I. -I.. -I../../include $(DEFINES)
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: eqn
eqn: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o eqn
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o eqn
e.c: e.y
$(YACC) -d ../e.y
diff --git a/eqn/eqnchar.d/Makefile.mk b/eqn/eqnchar.d/Makefile.mk
index 6154b87c0596..7ea014187d16 100644
--- a/eqn/eqnchar.d/Makefile.mk
+++ b/eqn/eqnchar.d/Makefile.mk
@@ -1,7 +1,7 @@
FILES = ascii eqnchar greek iso utf-8
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(EUC) -c $<
+ $(CC) $(_CFLAGS) $(EUC) -c $<
all: $(FILES)
@@ -9,10 +9,10 @@ utf-8: genutf8
-./genutf8 >utf-8
genutf8: genutf8.o
- -$(CC) $(CFLAGS) $(LDFLAGS) genutf8.o $(LIBS) -o genutf8
+ -$(CC) $(_CFLAGS) $(_LDFLAGS) genutf8.o $(LIBS) -o genutf8
genutf8.o: genutf8.c
- -$(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(EUC) -c genutf8.c
+ -$(CC) $(_CFLAGS) $(EUC) -c genutf8.c
install: all
test -d $(ROOT)$(PUBDIR) || mkdir -p $(ROOT)$(PUBDIR)
diff --git a/eqn/lex.c b/eqn/lex.c
index 6815801c92d3..d1cd2982c5ed 100644
--- a/eqn/lex.c
+++ b/eqn/lex.c
@@ -299,7 +299,7 @@ include(void) {
void
delim(void) {
yyval.token = eqnreg = 0;
- if (cstr(token, 0, SSIZE) || token[0] & 0200 || token[1] & 0200)
+ if (cstr(token, 0, SSIZE))
error(FATAL, "Bizarre delimiters at %.20s", token);
lefteq = token[0];
righteq = token[1];
diff --git a/eqn/neqn.d/Makefile.mk b/eqn/neqn.d/Makefile.mk
index bb924fcdacf6..cd8f3c6419c7 100644
--- a/eqn/neqn.d/Makefile.mk
+++ b/eqn/neqn.d/Makefile.mk
@@ -6,12 +6,12 @@ OBJ = diacrit.o e.o eqnbox.o font.o fromto.o funny.o glob.o integral.o \
FLAGS = -I. -I.. -I../../include -DNEQN $(DEFINES)
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: neqn
neqn: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o neqn
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o neqn
e.c: e.y
$(YACC) -d ../e.y
diff --git a/grap/Makefile.mk b/grap/Makefile.mk
index 8fa3f470c883..4c82266d1311 100644
--- a/grap/Makefile.mk
+++ b/grap/Makefile.mk
@@ -6,12 +6,12 @@ FLAGS = -DLIBDIR='"$(LIBDIR)"' $(DEFINES) -I../include
YFLAGS = -d
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: grap.c grapl.c grap
grap: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -lm -o grap
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -lm -o grap
y.tab.h: grap.c
diff --git a/mk.config b/mk.config
index ebd5e1de3ebf..14997a1cf342 100644
--- a/mk.config
+++ b/mk.config
@@ -83,7 +83,7 @@ STRIP=strip
#
# Compiler flags.
#
-#CFLAGS=
+_CFLAGS=$(CFLAGS) $(_CPPFLAGS) $(__CDBG) $(__CLDBG)
#
# C preprocessor flags.
@@ -91,17 +91,12 @@ STRIP=strip
# Use -D_GNU_SOURCE for Linux with GNU libc.
# Use -D_INCLUDE__STDC_A1_SOURCE for HP-UX.
#
-CPPFLAGS=-D_GNU_SOURCE
-
-#
-# Warning flags for the compiler.
-#
-#WARN=
+_CPPFLAGS=$(CPPFLAGS) -D_GNU_SOURCE
#
# Linker flags.
#
-#LDFLAGS=
+_LDFLAGS=$(LDFLAGS) $(__CLDBG)
#
# Additional libraries to link with.
diff --git a/mpm/Makefile.mk b/mpm/Makefile.mk
index cc6e7892d6f4..ec96125a133d 100644
--- a/mpm/Makefile.mk
+++ b/mpm/Makefile.mk
@@ -3,15 +3,15 @@ OBJ = misc.o page.o queue.o range.o slug.o version.o
FLAGS = $(EUC) $(DEFINES) -I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
.cc.o:
- $(CXX) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CXX) $(_CFLAGS) $(FLAGS) -c $<
all: pm
pm: $(OBJ)
- $(CXX) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -lm -o pm
+ $(CXX) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -lm -o pm
install: all
test -d $(ROOT)$(LIBDIR) || mkdir -p $(ROOT)$(LIBDIR)
diff --git a/pic/Makefile.mk b/pic/Makefile.mk
index 0816eeddbda2..6ead567cd6cd 100644
--- a/pic/Makefile.mk
+++ b/pic/Makefile.mk
@@ -7,12 +7,12 @@ FLAGS = $(DEFINES) -I../include
YFLAGS = -d
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: picy.c picl.c pic
pic: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -lm -o pic
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -lm -o pic
y.tab.h: picy.c
diff --git a/picpack/Makefile.mk b/picpack/Makefile.mk
index 2dbad352069a..38cfbae65af5 100644
--- a/picpack/Makefile.mk
+++ b/picpack/Makefile.mk
@@ -3,12 +3,12 @@ OBJ = picpack.o
FLAGS = -I../troff/troff.d/dpost.d
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: picpack
picpack: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o picpack
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o picpack
install:
$(INSTALL) -c picpack $(ROOT)$(BINDIR)/picpack
diff --git a/ptx/Makefile.mk b/ptx/Makefile.mk
index c20c920512fb..dda3ba05f725 100644
--- a/ptx/Makefile.mk
+++ b/ptx/Makefile.mk
@@ -3,12 +3,12 @@ OBJ = ptx.o
FLAGS = -DLIBDIR='"$(LIBDIR)"' $(EUC) -I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: ptx
ptx: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o ptx
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o ptx
install:
$(INSTALL) -c ptx $(ROOT)$(BINDIR)/ptx
diff --git a/refer/Makefile.mk b/refer/Makefile.mk
index 60d3b6ee583d..2c5761825339 100644
--- a/refer/Makefile.mk
+++ b/refer/Makefile.mk
@@ -15,31 +15,31 @@ FLAGS = -DMACDIR='"$(MACDIR)"' -DREFDIR='"$(REFDIR)"' $(EUC) $(DEFINES) \
-I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: refer addbib lookbib sortbib roffbib indxbib mkey inv hunt papers/runinv
cd papers && PATH=..:$$PATH sh runinv
refer: $(ROBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(ROBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(ROBJ) $(LIBS) -o $@
addbib: $(AOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(AOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(AOBJ) $(LIBS) -o $@
lookbib: $(LOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(LOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(LOBJ) $(LIBS) -o $@
sortbib: $(SOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(SOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(SOBJ) $(LIBS) -o $@
mkey: $(MOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(MOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(MOBJ) $(LIBS) -o $@
inv: $(IOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(IOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(IOBJ) $(LIBS) -o $@
hunt: $(HOBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(HOBJ) $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(HOBJ) $(LIBS) -o $@
indxbib: indxbib.sh
rm -f $@
diff --git a/refer/glue3.c b/refer/glue3.c
index 5b560bdcba46..14278158573a 100644
--- a/refer/glue3.c
+++ b/refer/glue3.c
@@ -74,7 +74,7 @@ corout(char *_in, char *out, const char *rprog, char *arg, int outlen)
return 0;
}
-# define ALEN 50
+# define ALEN 100
int
callhunt(char *_in, char *out, char *arg, int outlen)
diff --git a/soelim/Makefile.mk b/soelim/Makefile.mk
index 4d4740dbd464..ada1441b7e9f 100644
--- a/soelim/Makefile.mk
+++ b/soelim/Makefile.mk
@@ -3,12 +3,12 @@ OBJ = soelim.o
FLAGS =
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: soelim
soelim: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o soelim
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o soelim
install:
$(INSTALL) -c soelim $(ROOT)$(BINDIR)/soelim
diff --git a/tbl/Makefile.mk b/tbl/Makefile.mk
index 1d90f5f23e9a..9830deb784da 100644
--- a/tbl/Makefile.mk
+++ b/tbl/Makefile.mk
@@ -4,12 +4,12 @@ OBJ = t0.o t1.o t2.o t3.o t4.o t5.o t6.o t7.o t8.o t9.o tb.o tc.o te.o \
FLAGS = -DMACDIR='"$(MACDIR)"' -I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: tbl
tbl: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o tbl
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o tbl
install:
$(INSTALL) -c tbl $(ROOT)$(BINDIR)/tbl
diff --git a/troff/ext.h b/troff/ext.h
index 91815e91ffaf..9a523b2c5664 100644
--- a/troff/ext.h
+++ b/troff/ext.h
@@ -276,6 +276,8 @@ extern void cvtime(void);
extern int ctoi(register char *);
extern void mesg(int);
extern void errprint(const char *, ...);
+#define fdprintf xxfdprintf
+extern void fdprintf(int, const char *, ...);
extern char *roff_sprintf(char *, size_t, const char *, ...);
extern int control(register int, register int);
extern int getrq2(void);
@@ -442,6 +444,10 @@ extern void casehylen(void);
extern void casehypp(void);
extern void casepshape(void);
extern void caselpfx(void);
+#undef min
+#undef max
+extern int max(int, int);
+extern int min(int, int);
extern void casece(void);
extern void caserj(void);
extern void casebrnl(void);
diff --git a/troff/libhnj/Makefile.mk b/troff/libhnj/Makefile.mk
index 30ede3c72596..0609fa08b34f 100644
--- a/troff/libhnj/Makefile.mk
+++ b/troff/libhnj/Makefile.mk
@@ -1,7 +1,7 @@
FLAGS =
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
OBJ = hnjalloc.o hyphen.o
@@ -11,7 +11,7 @@ libhnj.a: $(OBJ)
$(AR) crs $@ $(OBJ)
test: test.o libhnj.a
- $(CC) $(CFLAGS) $(LDFLAGS) test.o -L. -lhnj -o test
+ $(CC) $(_CFLAGS) $(_LDFLAGS) test.o -L. -lhnj -o test
install:
diff --git a/troff/n1.c b/troff/n1.c
index f77a8c979ca8..0dd2455599d2 100644
--- a/troff/n1.c
+++ b/troff/n1.c
@@ -110,6 +110,14 @@ 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
+#define vfdprintf xxvfdprintf
+static void vfdprintf(int fd, const char *fmt, va_list ap);
+#endif
static tchar setyon(void);
static void _setenv(void);
static tchar setZ(void);
@@ -597,6 +605,182 @@ errprint(const char *s, ...) /* error message printer */
va_end(ap);
}
+#ifndef NROFF
+/*
+ * Scaled down version of C Library printf.
+ * Only %s %u %d (==%u) %o %c %x %D are recognized.
+ */
+#undef putchar
+#define putchar(n) (*pfbp++ = (n)) /* NO CHECKING! */
+
+static char pfbuf[NTM];
+static char *pfbp = pfbuf;
+
+void
+fdprintf(int fd, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfdprintf(fd, fmt, ap);
+ va_end(ap);
+}
+
+static void
+vfdprintf(int fd, const char *fmt, va_list ap)
+{
+ register int c;
+ char *s;
+ register int i;
+
+ pfbp = pfbuf;
+loop:
+ while ((c = *fmt++) != '%') {
+ if (c == '\0') {
+ if (fd == 2)
+ write(STDERR_FILENO, pfbuf, pfbp - pfbuf);
+ else {
+ *pfbp = 0;
+ pfbp = pfbuf;
+ while (*pfbp) {
+ *obufp++ = *pfbp++;
+ if (obufp >= &obuf[OBUFSZ])
+ flusho();
+ }
+ }
+ return;
+ }
+ putchar(c);
+ }
+ c = *fmt++;
+ if (c == 'd' || c == 'u' || c == 'o' || c == 'x') {
+ i = va_arg(ap, int);
+ printlong(i, c);
+ } else if (c == 'c') {
+ if (c > 0177 || c < 040)
+ putchar('\\');
+ putchar(va_arg(ap, int) & 0177);
+ } else if (c == 's') {
+ s = va_arg(ap, char *);
+ while ((c = *s++))
+ putchar(c);
+ } else if (c == 'D') {
+ printn(va_arg(ap, long), 10);
+ } else if (c == 'O') {
+ printn(va_arg(ap, long), 8);
+ } else if (c == 'e' || c == 'E' ||
+ c == 'f' || c == 'F' ||
+ c == 'g' || c == 'G') {
+ char tmp[40];
+ char fmt[] = "%%";
+ fmt[1] = c;
+ snprintf(s = tmp, sizeof(tmp), fmt, va_arg(ap, double));
+ while ((c = *s++))
+ putchar(c);
+ } else if (c == 'p') {
+ i = (intptr_t)va_arg(ap, void *);
+ putchar('0');
+ putchar('x');
+ printlong(i, 'x');
+ } else if (c == 'l') {
+ c = *fmt++;
+ if (c == 'd' || c == 'u' || c == 'o' || c == 'x') {
+ i = va_arg(ap, long);
+ printlong(i, c);
+ } else if (c == 'c') {
+ i = va_arg(ap, int);
+ if (c & ~0177) {
+#ifdef EUC
+ char mb[MB_LEN_MAX];
+ int j, n;
+ n = wctomb(mb, i);
+ for (j = 0; j < n; j++)
+ putchar(mb[j]&0377);
+#endif /* EUC */
+ } else
+ putchar(i);
+ }
+ } else if (c == 'C') {
+ extern int nchtab;
+ tchar t = va_arg(ap, tchar);
+ if ((i = cbits(t)) < 0177) {
+ putchar(i);
+ } else if (i < 128 + nchtab) {
+ putchar('\\');
+ putchar('(');
+ putchar(chname[chtab[i-128]]);
+ putchar(chname[chtab[i-128]+1]);
+ }
+ else if ((i = tr2un(i, fbits(t))) != -1)
+ goto U;
+ } else if (c == 'U') {
+ i = va_arg(ap, int);
+ U:
+ putchar('U');
+ putchar('+');
+ if (i < 0x1000)
+ putchar('0');
+ if (i < 0x100)
+ putchar('0');
+ if (i < 0x10)
+ putchar('0');
+ printn((long)i, 16);
+#ifdef EUC
+ if (iswprint(i)) {
+ char mb[MB_LEN_MAX];
+ int j, n;
+ n = wctomb(mb, i);
+ putchar(' ');
+ putchar('(');
+ for (j = 0; j < n; j++)
+ putchar(mb[j]&0377);
+ putchar(')');
+ }
+#endif /* EUC */
+ }
+ goto loop;
+}
+#endif /* !NROFF */
+
+
+static void
+printlong(long i, int fmt)
+{
+ switch (fmt) {
+ case 'd':
+ if (i < 0) {
+ putchar('-');
+ i = -i;
+ }
+ /*FALLTHRU*/
+ case 'u':
+ printn(i, 10);
+ break;
+ case 'o':
+ printn(i, 8);
+ break;
+ case 'x':
+ printn(i, 16);
+ break;
+ }
+}
+
+/*
+ * Print an unsigned integer in base b.
+ */
+static void printn(register long n, register long b)
+{
+ register long a;
+
+ if (n < 0) { /* shouldn't happen */
+ putchar('-');
+ n = -n;
+ }
+ if ((a = n / b))
+ printn(a, b);
+ putchar("0123456789ABCDEF"[(int)(n%b)]);
+}
+
/* returns pointer to \0 that ends the string */
/* VARARGS2 */
diff --git a/troff/n2.c b/troff/n2.c
index c61985e17a36..74bb7e3ffc2a 100644
--- a/troff/n2.c
+++ b/troff/n2.c
@@ -52,7 +52,6 @@
* output, cleanup
*/
-#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
@@ -237,10 +236,10 @@ outtp(tchar i)
#ifdef EUC
if (iscopy(i))
- dprintf(ptid, "%lc", j);
+ fdprintf(ptid, "%lc", j);
else
#endif /* EUC */
- dprintf(ptid, "%c", j);
+ fdprintf(ptid, "%c", j);
#endif
}
diff --git a/troff/n5.c b/troff/n5.c
index 0819514d8443..85426fc6f07d 100644
--- a/troff/n5.c
+++ b/troff/n5.c
@@ -418,6 +418,24 @@ caselpfx(void)
}
}
+int
+max(int aa, int bb)
+{
+ if (aa > bb)
+ return (aa);
+ else
+ return (bb);
+}
+
+int
+min(int aa, int bb)
+{
+ if (aa < bb)
+ return (aa);
+ else
+ return (bb);
+}
+
static void
cerj(int dorj)
{
diff --git a/troff/nroff.d/Makefile.mk b/troff/nroff.d/Makefile.mk
index 6e41be4ae956..82c9667083af 100644
--- a/troff/nroff.d/Makefile.mk
+++ b/troff/nroff.d/Makefile.mk
@@ -13,12 +13,12 @@ FLAGS = -DNROFF -DUSG $(EUC) -I. -I.. -I../../include -DMACDIR='"$(MACDIR)"' \
-I$(BST)
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: nroff
nroff: $(OBJ) $(LIBHNJ)/libhnj.a
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o nroff
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o nroff
install:
$(INSTALL) -c nroff $(ROOT)$(BINDIR)/nroff
diff --git a/troff/troff.d/Makefile.mk b/troff/troff.d/Makefile.mk
index 630646cd7917..1cddedf88880 100644
--- a/troff/troff.d/Makefile.mk
+++ b/troff/troff.d/Makefile.mk
@@ -10,18 +10,18 @@ FLAGS = -DUSG $(EUC) -I. -I.. -I../../include -DMACDIR='"$(MACDIR)"' \
-DSHELL='"$(SHELL)"' -DRELEASE='"$(RELEASE)"' $(DEFINES) -I$(BST)
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: troff ta otfdump
troff: $(OBJ) $(LIBHNJ)/libhnj.a
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o troff
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) -L$(LIBHNJ) -lhnj $(LIBS) -o troff
ta: draw.o ta.o
- $(CC) $(CFLAGS) $(LDFLAGS) draw.o ta.o $(LIBS) -lm -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) draw.o ta.o $(LIBS) -lm -o $@
otfdump: otfdump.o otfdump_vs.o
- $(CC) $(CFLAGS) $(LDFLAGS) otfdump.o otfdump_vs.o $(LIBS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) otfdump.o otfdump_vs.o $(LIBS) -o $@
install:
$(INSTALL) -c troff $(ROOT)$(BINDIR)/troff
diff --git a/troff/troff.d/devaps/Makefile.mk b/troff/troff.d/devaps/Makefile.mk
index e38fffbdd64b..1c62d7beb93f 100644
--- a/troff/troff.d/devaps/Makefile.mk
+++ b/troff/troff.d/devaps/Makefile.mk
@@ -6,15 +6,15 @@ FONTS = B I R S CT CW CX GB GI GR GS HI HK HX PO PX S1 SC SM TX DESC \
FLAGS = -I. -I.. -DFNTDIR='"$(FNTDIR)"'
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: daps makedev fonts HM.out
daps: $(OBJ)
- $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -lm -o daps
+ $(CC) $(_LDFLAGS) $(OBJ) $(LIBS) -lm -o daps
makedev: makedev.o
- $(CC) $(LDFLAGS) makedev.o $(LIBS) -o makedev
+ $(CC) $(_LDFLAGS) makedev.o $(LIBS) -o makedev
fonts: makedev
for i in $(FONTS); \
diff --git a/troff/troff.d/dhtml/Makefile.mk b/troff/troff.d/dhtml/Makefile.mk
index 2df615f95fb4..4d75906a9cdb 100644
--- a/troff/troff.d/dhtml/Makefile.mk
+++ b/troff/troff.d/dhtml/Makefile.mk
@@ -17,10 +17,10 @@ clean:
mrproper: clean
$(BIN): $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) -o $@
.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) -c $<
char.o: char.h main.h $(BST)/bst.h lib.h tr_out.h
dhtml.o: dhtml.h tr_out.h char.h main.h
diff --git a/troff/troff.d/dpost.d/Makefile.mk b/troff/troff.d/dpost.d/Makefile.mk
index d3d161638b4c..b2594b800192 100644
--- a/troff/troff.d/dpost.d/Makefile.mk
+++ b/troff/troff.d/dpost.d/Makefile.mk
@@ -8,12 +8,12 @@ FLAGS = -I. -I.. -DFNTDIR='"$(FNTDIR)"' -DPSTDIR='"$(PSTDIR)"' $(EUC) \
$(DEFINES) -I../../../include -I.. -I$(BST)
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: dpost
dpost: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o dpost
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o dpost
install:
$(INSTALL) -c dpost $(ROOT)$(BINDIR)/dpost
diff --git a/troff/troff.d/dpost.d/dpost.c b/troff/troff.d/dpost.d/dpost.c
index dd5c5465721b..60c0b210fa42 100644
--- a/troff/troff.d/dpost.d/dpost.c
+++ b/troff/troff.d/dpost.d/dpost.c
@@ -2419,7 +2419,7 @@ t_supply(char *fnt) /* supply a font */
while (*fnt == ' ' || *fnt == '\t')
fnt++;
- for (np = font; *np && *np != ' ' && *np != '\t' && *np != '\n'; np++);
+ for (np = fnt; *np && *np != ' ' && *np != '\t' && *np != '\n'; np++);
if (*np == '\0' || *np == '\n')
return;
*np = '\0';
@@ -3303,7 +3303,7 @@ t_sf(int forceflush)
fprintf(tf, "%d %g changefont\n", fontname[font].fontslant, (fontname[font].fontheight != 0) ? (double)fontname[font].fontheight : (double)fractsize);
}
- if (tracked < 0 || tracked > 0 && forceflush)
+ if (tracked < 0 || (tracked > 0 && forceflush))
t_strack();
} /* End of t_sf */
diff --git a/troff/troff.d/dpost.d/ps_include.c b/troff/troff.d/dpost.d/ps_include.c
index 3b463daf29d9..bd65398f2672 100644
--- a/troff/troff.d/dpost.d/ps_include.c
+++ b/troff/troff.d/dpost.d/ps_include.c
@@ -167,6 +167,8 @@ ps_include(
break;
case DOCUMENTNEEDEDRESOURCES:
goto needres;
+ case NORMAL: /* TODO: case is not in original code */
+ break;
}
continue;
} else
diff --git a/troff/troff.d/draw.c b/troff/troff.d/draw.c
index e513bd08b61c..564618f55187 100644
--- a/troff/troff.d/draw.c
+++ b/troff/troff.d/draw.c
@@ -49,6 +49,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include "global.h"
#define PI 3.141592654
#define hmot(n) hpos += n
#define hgoto(n) hpos = n
diff --git a/troff/troff.d/font/Makefile.mk b/troff/troff.d/font/Makefile.mk
index 703c9772214b..0d6b566c1437 100644
--- a/troff/troff.d/font/Makefile.mk
+++ b/troff/troff.d/font/Makefile.mk
@@ -6,7 +6,7 @@ FONTS = AB AI AR AX BI CB CI CO CW CX GR HB HI HX Hb Hi Hr Hx \
FLAGS = -I. -I.. -DFNTDIR='"$(FNTDIR)"'
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(CPPFLAGS) $(FLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all:
diff --git a/troff/troff.d/font/devhtml/Makefile.mk b/troff/troff.d/font/devhtml/Makefile.mk
index 12d19bcb9bb8..41a74b5d9f18 100644
--- a/troff/troff.d/font/devhtml/Makefile.mk
+++ b/troff/troff.d/font/devhtml/Makefile.mk
@@ -20,4 +20,4 @@ clean:
mrproper: clean
$(BIN): $(OBJS)
- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) -o $@
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJS) -o $@
diff --git a/troff/troff.d/t10.c b/troff/troff.d/t10.c
index f858225de80e..4a883041224a 100644
--- a/troff/troff.d/t10.c
+++ b/troff/troff.d/t10.c
@@ -50,7 +50,6 @@
* contributors.
*/
-#include <stdio.h>
#include <stdlib.h>
#include "tdef.h"
#include <ctype.h>
@@ -290,22 +289,22 @@ ptinit(void)
kern = xflag;
if (ascii)
return;
- dprintf(ptid, "x T %s\n", devname);
- dprintf(ptid, "x res %d %d %d\n", Inch, Hor, Vert);
- dprintf(ptid, "x init\n"); /* do initialization for particular device */
+ fdprintf(ptid, "x T %s\n", devname);
+ fdprintf(ptid, "x res %d %d %d\n", Inch, Hor, Vert);
+ fdprintf(ptid, "x init\n"); /* do initialization for particular device */
/*
for (i = 1; i <= nfonts; i++)
- dprintf(ptid, "x font %d %s\n", i, fontbase[i]->namefont);
- dprintf(ptid, "x xxx fonts=%d sizes=%d unit=%d\n", nfonts, nsizes, Unitwidth);
- dprintf(ptid, "x xxx nchtab=%d lchname=%d nfitab=%d\n",
+ fdprintf(ptid, "x font %d %s\n", i, fontbase[i]->namefont);
+ fdprintf(ptid, "x xxx fonts=%d sizes=%d unit=%d\n", nfonts, nsizes, Unitwidth);
+ fdprintf(ptid, "x xxx nchtab=%d lchname=%d nfitab=%d\n",
dev.nchtab, dev.lchname, dev.nchtab+128-32);
- dprintf(ptid, "x xxx sizes:\nx xxx ");
+ fdprintf(ptid, "x xxx sizes:\nx xxx ");
for (i = 0; i < nsizes; i++)
- dprintf(ptid, " %d", pstab[i]);
- dprintf(ptid, "\nx xxx chars:\nx xxx ");
+ fdprintf(ptid, " %d", pstab[i]);
+ fdprintf(ptid, "\nx xxx chars:\nx xxx ");
for (i = 0; i < dev.nchtab; i++)
- dprintf(ptid, " %s", &chname[chtab[i]]);
- dprintf(ptid, "\nx xxx\n");
+ fdprintf(ptid, " %s", &chname[chtab[i]]);
+ fdprintf(ptid, "\nx xxx\n");
*/
#ifdef EUC
ptlocale(setlocale(LC_CTYPE, NULL));
@@ -415,9 +414,9 @@ ptout(register tchar i)
if (linkout)
ptlink(linkout);
/*
- dprintf(ptid, "x xxx end of line: hpos=%d, vpos=%d\n", hpos, vpos);
+ fdprintf(ptid, "x xxx end of line: hpos=%d, vpos=%d\n", hpos, vpos);
*/
- dprintf(ptid, "n%d %d\n", b, a); /* be nice to chuck */
+ fdprintf(ptid, "n%d %d\n", b, a); /* be nice to chuck */
}
tchar *
@@ -456,7 +455,7 @@ ptout0(tchar *pi, tchar *pend)
ptlead();
if (esc)
ptesc();
- dprintf(ptid, "x X ");
+ fdprintf(ptid, "x X ");
/*
* not guaranteed of finding a XOFF if a word overflow
* error occured, so also bound this loop by olinep
@@ -480,9 +479,9 @@ ptout0(tchar *pi, tchar *pend)
ptps();
j = f = u2pts(sbits(i));
if (j != f && xflag && dev.anysize)
- dprintf(ptid, "x H -23 %g\n", f);
+ fdprintf(ptid, "x H -23 %g\n", f);
else
- dprintf(ptid, "x H %d\n", j);
+ fdprintf(ptid, "x H %d\n", j);
return(pi+outsize);
}
if (k == SLANT) {
@@ -491,7 +490,7 @@ ptout0(tchar *pi, tchar *pend)
if (xfont != mfont)
ptfont();
}
- dprintf(ptid, "x S %d\n", (int)sbits(i)-180);
+ fdprintf(ptid, "x S %d\n", (int)sbits(i)-180);
return(pi+outsize);
}
if (k == WORDSP) {
@@ -627,23 +626,23 @@ ptout0(tchar *pi, tchar *pend)
switch ((c=cbits(pi[1]))) {
case DRAWCIRCLE: /* circle */
case DRAWCIRCLEFI:
- dprintf(ptid, "D%c %d\n", c, dx); /* dx is diameter */
+ fdprintf(ptid, "D%c %d\n", c, dx); /* dx is diameter */
w = 0;
hpos += dx;
break;
case DRAWELLIPSE:
case DRAWELLIPSEFI:
- dprintf(ptid, "D%c %d %d\n", c, dx, dy);
+ fdprintf(ptid, "D%c %d %d\n", c, dx, dy);
w = 0;
hpos += dx;
break;
case DRAWLINE: /* line */
k = cbits(pi[2]);
- dprintf(ptid, "D%c %d %d ", DRAWLINE, dx, dy);
+ fdprintf(ptid, "D%c %d %d ", DRAWLINE, dx, dy);
if (k < 128)
- dprintf(ptid, "%c\n", k);
+ fdprintf(ptid, "%c\n", k);
else
- dprintf(ptid, "%s\n", &chname[chtab[k - 128]]);
+ fdprintf(ptid, "%s\n", &chname[chtab[k - 128]]);
w = 0;
hpos += dx;
vpos += dy;
@@ -655,7 +654,7 @@ ptout0(tchar *pi, tchar *pend)
dy2 = absmot(pi[6]);
if (isnmot(pi[6]))
dy2 = -dy2;
- dprintf(ptid, "D%c %d %d %d %d\n", DRAWARC,
+ fdprintf(ptid, "D%c %d %d %d %d\n", DRAWARC,
dx, dy, dx2, dy2);
w = 0;
hpos += dx + dx2;
@@ -663,13 +662,13 @@ ptout0(tchar *pi, tchar *pend)
break;
case DRAWSPLINE: /* spline */
default: /* something else; copy it like spline */
- dprintf(ptid, "D%c %d %d", (int)cbits(pi[1]), dx, dy);
+ fdprintf(ptid, "D%c %d %d", (int)cbits(pi[1]), dx, dy);
w = 0;
hpos += dx;
vpos += dy;
if (cbits(pi[3]) == DRAWFCN || cbits(pi[4]) == DRAWFCN) {
/* it was somehow defective */
- dprintf(ptid, "\n");
+ fdprintf(ptid, "\n");
break;
}
for (n = 5; cbits(pi[n]) != DRAWFCN; n += 2) {
@@ -679,11 +678,11 @@ ptout0(tchar *pi, tchar *pend)
dy = absmot(pi[n+1]);
if (isnmot(pi[n+1]))
dy = -dy;
- dprintf(ptid, " %d %d", dx, dy);
+ fdprintf(ptid, " %d %d", dx, dy);
hpos += dx;
vpos += dy;
}
- dprintf(ptid, "\n");
+ fdprintf(ptid, "\n");
break;
}
for (n = 3; cbits(pi[n]) != DRAWFCN; n++)
@@ -716,7 +715,7 @@ ptout0(tchar *pi, tchar *pend)
if (esc += bd)
ptesc();
if (k < 128) {
- dprintf(ptid, "c%c\n", k);
+ fdprintf(ptid, "c%c\n", k);
} else
pnc(k, a);
if (z)
@@ -735,13 +734,13 @@ pnc(int k, struct afmtab *a) {
if (k >= nchtab + 128) {
if (a && (j = a->fitab[k-nchtab-128-32]) < a->nchars &&
a->nametab[j] != NULL) {
- dprintf(ptid, "CPS%s\n", a->nametab[j]);
+ fdprintf(ptid, "CPS%s\n", a->nametab[j]);
} else {
- dprintf(ptid, "N%d\n",
+ fdprintf(ptid, "N%d\n",
k - (html ? 0 : (nchtab + 128)) );
}
} else {
- dprintf(ptid, "C%s\n", &chname[chtab[k - 128]]);
+ fdprintf(ptid, "C%s\n", &chname[chtab[k - 128]]);
}
}
@@ -767,7 +766,7 @@ pthorscale(int always)
{
if (horscale || mhorscale) {
if (always || mhorscale != horscale)
- dprintf(ptid, "x X HorScale %g\n",
+ fdprintf(ptid, "x X HorScale %g\n",
horscale ? horscale : 1.0);
mhorscale = horscale;
} else
@@ -779,7 +778,7 @@ pttrack(int always)
{
if (xflag && (lasttrack || lettrack || mtrack)) {
if (always || mtrack != (lasttrack + lettrack))
- dprintf(ptid, "x X Track %d\n", lasttrack + lettrack);
+ fdprintf(ptid, "x X Track %d\n", lasttrack + lettrack);
mtrack = lasttrack + lettrack;
} else
mtrack = 0;
@@ -805,9 +804,9 @@ ptps(void)
if ((z = zoomtab[xfont]) != 0 && dev.anysize && xflag)
s *= z;
if (dev.anysize && xflag && (!found || (z != 0 && z != 1)))
- dprintf(ptid, "s-23 %g\n", s);
+ fdprintf(ptid, "s-23 %g\n", s);
else
- dprintf(ptid, "s%d\n", (int)s); /* really should put out string rep of size */
+ fdprintf(ptid, "s%d\n", (int)s); /* really should put out string rep of size */
mpts = i;
mzoom = z;
pttrack(0);
@@ -818,7 +817,7 @@ void
ptfont(void)
{
mfont = xfont;
- dprintf(ptid, "f%d\n", xfont);
+ fdprintf(ptid, "f%d\n", xfont);
mtrack = 0;
pttrack(1);
pthorscale(1);
@@ -829,13 +828,13 @@ ptfpcmd(int f, const char *s, char *path, int flags)
{
if (ascii)
return;
- dprintf(ptid, "x font %d %s", f, s);
+ fdprintf(ptid, "x font %d %s", f, s);
if (path) {
- dprintf(ptid, " %s", path);
+ fdprintf(ptid, " %s", path);
if (flags)
- dprintf(ptid, " %d", flags);
+ fdprintf(ptid, " %d", flags);
}
- dprintf(ptid, "\n");
+ fdprintf(ptid, "\n");
ptfont(); /* make sure that it gets noticed */
}
@@ -844,7 +843,7 @@ ptlead(void)
{
vpos += lead;
if (!ascii)
- dprintf(ptid, "V%d\n", vpos);
+ fdprintf(ptid, "V%d\n", vpos);
lead = 0;
}
@@ -858,9 +857,9 @@ ptesc(void)
oput(esc/10 + '0');
oput(esc%10 + '0');
} else
- dprintf(ptid, "%d", esc);
+ fdprintf(ptid, "%d", esc);
} else
- dprintf(ptid, "H%d\n", hpos);
+ fdprintf(ptid, "H%d\n", hpos);
esc = 0;
}
@@ -869,7 +868,7 @@ ptsupplyfont(char *fontname, char *file)
{
if (ascii)
return;
- dprintf(ptid, "x X SupplyFont %s %s\n", fontname, file);
+ fdprintf(ptid, "x X SupplyFont %s %s\n", fontname, file);
}
void
@@ -877,7 +876,7 @@ ptpapersize(void)
{
if (ascii || mediasize.flag == 0)
return;
- dprintf(ptid, "x X PaperSize %d %d %d\n",
+ fdprintf(ptid, "x X PaperSize %d %d %d\n",
mediasize.val[2], mediasize.val[3],
mediasize.flag&2?1:0);
}
@@ -886,7 +885,7 @@ static void
cut1(const char *name, struct box *bp)
{
if (bp->flag)
- dprintf(ptid, "x X %s %d %d %d %d\n", name,
+ fdprintf(ptid, "x X %s %d %d %d %d\n", name,
bp->val[0], bp->val[1], bp->val[2], bp->val[3]);
}
@@ -914,7 +913,7 @@ ptlocale(const char *cp)
}
if (ascii || realpage == 0 || lp == NULL || dev.lc_ctype == 0)
return;
- dprintf(ptid, "x X LC_CTYPE %s\n", lp);
+ fdprintf(ptid, "x X LC_CTYPE %s\n", lp);
}
static void
@@ -927,9 +926,9 @@ ptanchor(int n)
for (rp = anchors; rp; rp = rp->next)
if (rp->cnt == n) {
if (html) {
- dprintf(ptid, "x X Anchor %s\n", rp->name);
+ fdprintf(ptid, "x X Anchor %s\n", rp->name);
} else {
- dprintf(ptid, "x X Anchor %d,%d %s\n",
+ fdprintf(ptid, "x X Anchor %d,%d %s\n",
vpos + lead - lss, hpos + esc, rp->name);
}
break;
@@ -944,15 +943,15 @@ _ptlink(int n, struct ref *rstart, const char *type)
if (ascii)
return;
if (html && !n) {
- dprintf(ptid, "x X %s\n", type);
+ fdprintf(ptid, "x X %s\n", type);
return;
}
for (rp = rstart; rp; rp = rp->next)
if (rp->cnt == n) {
if (html)
- dprintf(ptid, "x X %s %s\n", type, rp->name);
+ fdprintf(ptid, "x X %s %s\n", type, rp->name);
else
- dprintf(ptid, "x X %s %d,%d,%d,%d %s\n",
+ fdprintf(ptid, "x X %s %d,%d,%d,%d %s\n",
type,
linkhp, vpos + pts2u(1),
hpos + esc, vpos - pts * 8 / 10,
@@ -993,7 +992,7 @@ ptyon(int i)
ptlead();
if (esc)
ptesc();
- dprintf(ptid, "x X ");
+ fdprintf(ptid, "x X ");
savip = ip;
ip = (filep)cp->mx;
app = 1;
@@ -1085,7 +1084,7 @@ newpage(int n) /* called at end of each output page (we hope) */
vpos = 0;
if (ascii)
return;
- dprintf(ptid, "p%d\n", n); /* new page */
+ fdprintf(ptid, "p%d\n", n); /* new page */
for (i = 0; i <= nfonts; i++) {
if (fontbase[i] == NULL)
continue;
@@ -1093,13 +1092,13 @@ newpage(int n) /* called at end of each output page (we hope) */
struct afmtab *a = afmtab[(fontbase[i]->afmpos)-1];
if (a->encpath == NULL)
a->encpath = afmencodepath(a->path);
- dprintf(ptid, "x font %d %s %s %d\n", i,
+ fdprintf(ptid, "x font %d %s %s %d\n", i,
macname(fontlab[i]),
a->encpath, (int)a->spec);
if (a->supply)
ptsupplyfont(a->fontname, a->supply);
} else if (fontbase[i]->namefont[0])
- dprintf(ptid, "x font %d %s\n", i, macname(fontlab[i]));
+ fdprintf(ptid, "x font %d %s\n", i, macname(fontlab[i]));
}
ptps();
ptfont();
@@ -1111,13 +1110,13 @@ newpage(int n) /* called at end of each output page (we hope) */
void
pttrailer(void)
{
- dprintf(ptid, "x trailer\n");
+ fdprintf(ptid, "x trailer\n");
}
void
ptstop(void)
{
- dprintf(ptid, "x stop\n");
+ fdprintf(ptid, "x stop\n");
}
void
@@ -1127,11 +1126,11 @@ dostop(void)
return;
ptlead();
vpos = 0;
- /* dprintf(ptid, "x xxx end of page\n");*/
+ /* fdprintf(ptid, "x xxx end of page\n");*/
if (!nofeed)
pttrailer();
ptlead();
- dprintf(ptid, "x pause\n");
+ fdprintf(ptid, "x pause\n");
flusho();
mpts = mfont = 0;
ptesc();
diff --git a/version.mk b/version.mk
index 92176c8f9c84..4c5894631243 100644
--- a/version.mk
+++ b/version.mk
@@ -1,2 +1,2 @@
-RELEASE = Git snapshot 161006
+RELEASE = Git snapshot 161025
#RELEASE = release 160308
diff --git a/vgrind/Makefile.mk b/vgrind/Makefile.mk
index d167fccda151..9ad1c5eec9e4 100644
--- a/vgrind/Makefile.mk
+++ b/vgrind/Makefile.mk
@@ -3,12 +3,12 @@ OBJ = regexp.o vfontedpr.o vgrindefs.o version.o
FLAGS = $(EUC) -DLIBDIR='"$(LIBDIR)"' $(DEFINES) -I../include
.c.o:
- $(CC) $(CFLAGS) $(WARN) $(FLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(_CFLAGS) $(FLAGS) -c $<
all: vgrind vfontedpr
vfontedpr: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o vfontedpr
+ $(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o vfontedpr
vgrind: vgrind.sh
rm -f $@