aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/util')
-rw-r--r--libXfont/src/util/fontxlfd.c4
-rw-r--r--libXfont/src/util/makefile11
2 files changed, 13 insertions, 2 deletions
diff --git a/libXfont/src/util/fontxlfd.c b/libXfont/src/util/fontxlfd.c
index 462554006..664d7598f 100644
--- a/libXfont/src/util/fontxlfd.c
+++ b/libXfont/src/util/fontxlfd.c
@@ -36,6 +36,7 @@ from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <float.h>
#include <X11/fonts/fontmisc.h>
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/fontxlfd.h>
@@ -202,7 +203,6 @@ xlfd_round_double(double x)
defined(__hppa__) || \
defined(__amd64__) || defined(__amd64) || \
defined(sgi)
-#include <float.h>
/* if we have IEEE 754 fp, we can round to binary digits... */
@@ -242,7 +242,7 @@ xlfd_round_double(double x)
j = 1 << ((DBL_MANT_DIG-XLFD_NDIGITS_2) & 0x07);
for (; i<7; i++) {
k = d.b[i] + j;
- d.b[i] = k;
+ d.b[i] = k&0xff;
if (k & 0x100) j = 1;
else break;
}
diff --git a/libXfont/src/util/makefile b/libXfont/src/util/makefile
new file mode 100644
index 000000000..323daef95
--- /dev/null
+++ b/libXfont/src/util/makefile
@@ -0,0 +1,11 @@
+LIBRARY = libutil
+
+INCLUDES += ../stubs
+
+CSRCS = atom.c fontaccel.c fontnames.c fontutil.c fontxlfd.c format.c miscutil.c \
+ patcache.c private.c utilbitmap.c
+
+INCLUDES := ../.. $(INCLUDES)
+
+
+