summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/groff/libgroff
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/groff/libgroff')
-rw-r--r--gnu/usr.bin/groff/libgroff/Makefile23
-rw-r--r--gnu/usr.bin/groff/libgroff/cset.cc2
-rw-r--r--gnu/usr.bin/groff/libgroff/font.cc6
3 files changed, 29 insertions, 2 deletions
diff --git a/gnu/usr.bin/groff/libgroff/Makefile b/gnu/usr.bin/groff/libgroff/Makefile
new file mode 100644
index 0000000..ba150356
--- /dev/null
+++ b/gnu/usr.bin/groff/libgroff/Makefile
@@ -0,0 +1,23 @@
+# Makefile for libgroff
+
+LIB= groff
+SRCS= assert.cc change_lf.cc cmap.cc cset.cc device.cc errarg.cc\
+ error.cc fatal.cc filename.cc font.cc fontfile.cc lf.cc\
+ lineno.cc macropath.cc nametoindex.cc new.cc prime.cc\
+ progname.cc ptable.cc searchpath.cc string.cc strsave.cc\
+ tmpfile.cc illegal.cc version.cc
+SRCS+= iftoa.c itoa.c matherr.c
+CFLAGS+= -I$(.CURDIR)/../include
+
+NOMAN= noman
+NOPROFILE= noprofile
+
+CLEANFILES+= version.cc
+version.cc: $(.CURDIR)/../VERSION
+ @${ECHO} Making version.cc
+ @echo const char \*version_string = \"`cat $(.CURDIR)/../VERSION`\"\; >$@
+
+install:
+
+.include "../Makefile.cfg"
+.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/groff/libgroff/cset.cc b/gnu/usr.bin/groff/libgroff/cset.cc
index fcba164..603202a 100644
--- a/gnu/usr.bin/groff/libgroff/cset.cc
+++ b/gnu/usr.bin/groff/libgroff/cset.cc
@@ -33,7 +33,7 @@ cset csprint(CSET_BUILTIN);
cset csgraph(CSET_BUILTIN);
cset cscntrl(CSET_BUILTIN);
-#ifdef isascii
+#ifdef isascii && !defined(__FreeBSD__) /* FreeBSD uses rune based ctypes */
#define ISASCII(c) isascii(c)
#else
#define ISASCII(c) (1)
diff --git a/gnu/usr.bin/groff/libgroff/font.cc b/gnu/usr.bin/groff/libgroff/font.cc
index 55c772d..6e05a8a 100644
--- a/gnu/usr.bin/groff/libgroff/font.cc
+++ b/gnu/usr.bin/groff/libgroff/font.cc
@@ -194,7 +194,11 @@ static int scale_round(int n, int x, int y)
}
else {
if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
- return (n*x - y2)/y;
+ {
+ // XXX simplify expression to work around bug in gcc-2.6.0
+ int tmp = n*x - y2;
+ return tmp/y;
+ }
return int(n*double(x)/double(y) - .5);
}
}
OpenPOWER on IntegriCloud