summaryrefslogtreecommitdiff
path: root/x11/xfstt
diff options
context:
space:
mode:
authormef <mef@pkgsrc.org>2012-06-13 08:15:13 +0000
committermef <mef@pkgsrc.org>2012-06-13 08:15:13 +0000
commit8e505fa8a8567489ee1f75ae1d941b625bf347a7 (patch)
tree040393ff6b55cdc2f580ff2e902dfcee62e5a2e9 /x11/xfstt
parentbd2ee7cadfd696e5a3d739518fc62be49678a4c0 (diff)
downloadpkgsrc-8e505fa8a8567489ee1f75ae1d941b625bf347a7.tar.gz
(1) Bump version x11/xfstt 1.6 to 1.9 based on PR pkg/45478
(2) Some pkglint flags cleared, (comment on patches, INSTALATION_DIRS) (3) (No change) Consider dropping to support gcc-2.95 (huge patches). 1.9 (2012-05-02) Fix file descriptor leaks. Fix directory resource leaks and segfaults on opening errors. Reset the umask before creating the temporary directory. Rewrite showttf to use XCB instead of X11. 1.8 (2010-11-09) Remove the obsolete `--multi' option. Bump gettext dependency to 0.18. -- Use --previous in msgmerge to help translators. Blank unused fields of the fsError struct when sending an error. Fix segfaults on font open errors (thanks to Edward Welbourne). Handle mmap failures which might end up as segfaults otherwise. Fix crashes with fortify support when: -- Listing fonts (thanks to Erik Devriendt). -- Setting info file magic and type fields (thanks to Niall Creech). Fix segfault on fonts with unknown cmap format. Add SIGHUP handler to re-sync fonts cache. Do not hardcode any path component in the man page. Code cleanup: -- Fixed several compiler warnings. -- Constify types. -- Refactor client state into a new struct. -- Refactor font protocol error reply handling. -- Remove unused or duped includes. -- Switch more C `char *' strings to C++ strings. -- Use C++ algorithm instead of custom code. -- Always include "config.h" first. -- Use <stdint.h> instead of our own types. Build system cleanup: -- Detect system endianness at build time. -- Enable silent rules by default if support is available. -- Do not use AM_MAINTAINER_MODE. -- Make X11 usage selectable at configure time (new `--with-x11'). -- Always build (but not install) extra tools. -- Use pkg-config to get fontsproto and x11 module flags. -- Fix `make distcheck'. 1.7 (2005-11-30) Made gettext external. Use autoreconf instead of `autogen.sh'. Changed mail address. Generate the manpage at build time, to use variable paths and version. Remove win32 obsolete code. Use new error, warning and info functions. Changed some data types names. Fix hyphen used as minus sign in manpage. Fix build failure on Irix with gcc 3.2 (thanks to Dirk Tilger). Add IPv6 support. Update FSF's address.
Diffstat (limited to 'x11/xfstt')
-rw-r--r--x11/xfstt/MESSAGE6
-rw-r--r--x11/xfstt/Makefile17
-rw-r--r--x11/xfstt/PLIST5
-rw-r--r--x11/xfstt/distinfo45
-rw-r--r--x11/xfstt/patches/patch-aa4
-rw-r--r--x11/xfstt/patches/patch-ab4
-rw-r--r--x11/xfstt/patches/patch-ac20
-rw-r--r--x11/xfstt/patches/patch-ae19
-rw-r--r--x11/xfstt/patches/patch-af226
-rw-r--r--x11/xfstt/patches/patch-ag119
-rw-r--r--x11/xfstt/patches/patch-ah13
-rw-r--r--x11/xfstt/patches/patch-ai183
-rw-r--r--x11/xfstt/patches/patch-aj47
-rw-r--r--x11/xfstt/patches/patch-ak22
-rw-r--r--x11/xfstt/patches/patch-al5
-rw-r--r--x11/xfstt/patches/patch-am5
-rw-r--r--x11/xfstt/patches/patch-an5
-rw-r--r--x11/xfstt/patches/patch-ao5
-rw-r--r--x11/xfstt/patches/patch-ap5
-rw-r--r--x11/xfstt/patches/patch-aq12
-rw-r--r--x11/xfstt/patches/patch-ar5
-rw-r--r--x11/xfstt/patches/patch-as41
-rw-r--r--x11/xfstt/patches/patch-at47
23 files changed, 513 insertions, 347 deletions
diff --git a/x11/xfstt/MESSAGE b/x11/xfstt/MESSAGE
index 76320df3934..61626dbe4f2 100644
--- a/x11/xfstt/MESSAGE
+++ b/x11/xfstt/MESSAGE
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.7 2005/09/28 14:15:50 rillig Exp $
+$NetBSD: MESSAGE,v 1.8 2012/06/13 08:15:13 mef Exp $
To use xfstt, you will need to perform the following steps:
@@ -10,8 +10,8 @@ To use xfstt, you will need to perform the following steps:
${PREFIX}/lib/X11/fonts/TTF/
2. In case you don't have PKG_RCD_SCRIPTS set in your /etc/mk.conf, copy
- ${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}/xfstt to /etc/rc.d/xfstt and add the following
- line into your /etc/rc.conf
+ ${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}/xfstt to /etc/rc.d/xfstt and add the
+ following line into your /etc/rc.conf
xfstt=YES
diff --git a/x11/xfstt/Makefile b/x11/xfstt/Makefile
index a868730e1b6..98d1394c5df 100644
--- a/x11/xfstt/Makefile
+++ b/x11/xfstt/Makefile
@@ -1,20 +1,20 @@
-# $NetBSD: Makefile,v 1.31 2008/08/31 07:35:09 dholland Exp $
+# $NetBSD: Makefile,v 1.32 2012/06/13 08:15:13 mef Exp $
#
-DISTNAME= xfstt-1.6
-PKGREVISION= 5
+DISTNAME= xfstt-1.9
CATEGORIES= x11 net fonts
MASTER_SITES= http://download.berlios.de/xfstt/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://developer.berlios.de/projects/xfstt/
COMMENT= TrueType font server for X11
+LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
USE_LANGUAGES= c c++
USE_X11BASE= YES
-USE_TOOLS+= gmake
+USE_TOOLS+= gmake pkg-config
GNU_CONFIGURE= YES
# There isn't really any l10n yet, only some preliminary i18n support.
@@ -23,7 +23,11 @@ CONFIGURE_ARGS+= --disable-nls
CXXFLAGS+= -fomit-frame-pointer -ffast-math
RCD_SCRIPTS= xfstt
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+INSTALLATION_DIRS= bin \
+ ${PKGMANDIR}/man1 \
+ lib/X11/fonts/TTF \
+ share/doc/xfstt \
+ share/examples/xfstt
SUBST_CLASSES+= paths
SUBST_FILES.paths= doc/FAQ doc/xfstt.1x
@@ -34,9 +38,6 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/xfstt ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doc/xfstt.1x \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/xfstt.1
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/fonts/TTF
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/xfstt
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/xfstt
cd ${WRKSRC} && ( \
${INSTALL_DATA} doc/FAQ CHANGES TODO THANKS \
${DESTDIR}${PREFIX}/share/doc/xfstt/ ; \
diff --git a/x11/xfstt/PLIST b/x11/xfstt/PLIST
index 17563475a33..a6b94b1d333 100644
--- a/x11/xfstt/PLIST
+++ b/x11/xfstt/PLIST
@@ -1,9 +1,6 @@
-@comment $NetBSD: PLIST,v 1.8 2009/06/14 18:25:16 joerg Exp $
+@comment $NetBSD: PLIST,v 1.9 2012/06/13 08:15:13 mef Exp $
bin/xfstt
man/man1/xfstt.1
-share/doc/xfstt/CHANGES
share/doc/xfstt/FAQ
-share/doc/xfstt/THANKS
-share/doc/xfstt/TODO
share/examples/rc.d/xfstt
share/examples/xfstt/font.properties
diff --git a/x11/xfstt/distinfo b/x11/xfstt/distinfo
index 2aeadeb78df..e62c3c850c2 100644
--- a/x11/xfstt/distinfo
+++ b/x11/xfstt/distinfo
@@ -1,24 +1,23 @@
-$NetBSD: distinfo,v 1.10 2005/02/23 17:36:23 wiz Exp $
+$NetBSD: distinfo,v 1.11 2012/06/13 08:15:13 mef Exp $
-SHA1 (xfstt-1.6.tar.gz) = 7fe623b27d85c5611346376d2b84e549db038c17
-RMD160 (xfstt-1.6.tar.gz) = aade2698cda4df67e57a8ac63a57712082e1e6b4
-Size (xfstt-1.6.tar.gz) = 346346 bytes
-SHA1 (patch-aa) = 771f503ee245ac4dcbbd8adf5f7b1746cb39c6e0
-SHA1 (patch-ab) = 18d41c9121c4b95b22a831fb987a97c90a8c0a86
-SHA1 (patch-ac) = 0733764a5eae4965120ae43c06e62f8f9e995fe8
-SHA1 (patch-ae) = 8765af1c37f1b0efd4107d27758428bccbea364e
-SHA1 (patch-af) = 876e7f631e206c145890ec1e5a4cf40d7ffa2af1
-SHA1 (patch-ag) = 30c5906f533522e354b12016f70954393fcb867a
-SHA1 (patch-ah) = abc3ab3d6760bba444fed6cdd062751c769d5a93
-SHA1 (patch-ai) = a117a6bf3387ec06531c9043dab3e34433fb82e6
-SHA1 (patch-aj) = 3562509882f0fb4504288374560f1613c0f79744
-SHA1 (patch-ak) = 346701fffc5b922865bf5ef6174f9773c72cc285
-SHA1 (patch-al) = 87c30429450e081041aa0313c11dda9f38e9a963
-SHA1 (patch-am) = 0a5526f321d1e0679d27ac7c6b580d01640ae651
-SHA1 (patch-an) = 472d6a0c8f0aacefc58a3e794dc5010223f80c32
-SHA1 (patch-ao) = e005c5305b820fd39af5d4fd5125ba0f537f414e
-SHA1 (patch-ap) = 5daeeb6a0fc26f9caa50bada3cda0a81a0a3695e
-SHA1 (patch-aq) = 5daad9fc85b5265f47a00d7e091ad398022bc5a3
-SHA1 (patch-ar) = 2640fad66919f224c3a4dcf0c79342843fa660bb
-SHA1 (patch-as) = 64339660e6204d9712389429342ebadd96f72cba
-SHA1 (patch-at) = 1a9e7243f2d36b280a3e4baffa3871ec1ee4ed29
+SHA1 (xfstt-1.9.tar.gz) = 0bc390a4908ca530b7cb4b67faad3f3abeba7a65
+RMD160 (xfstt-1.9.tar.gz) = 6463f2b81846708d9f101fc384419be8cf37fbbe
+Size (xfstt-1.9.tar.gz) = 286939 bytes
+SHA1 (patch-aa) = bd4f364d42acd1d0a734b12f140c5a07004c09cb
+SHA1 (patch-ab) = 78dc21537e86e5533e747e7bab3e5280087fa43b
+SHA1 (patch-ac) = 18b4593735ce1e80c55c54a89293e672d22fceac
+SHA1 (patch-af) = e742a5461925c72e5647b8cfa8e83d1de77ac231
+SHA1 (patch-ag) = 270ba4fcaecc289c8b170792481f8353d54498e2
+SHA1 (patch-ah) = f563d157e5f23c3badb4e10de77e4db633b072ca
+SHA1 (patch-ai) = 04f35f960614df376960d1ff1e1d410120c0598e
+SHA1 (patch-aj) = 5afb7cacfdfa542701ca29ee2d78fa98050c6df8
+SHA1 (patch-ak) = 72cf7c168e9684aabb0ff95b9bff752c888151fb
+SHA1 (patch-al) = 7e766d1a52b7c5c2183d67db1da759b170007c66
+SHA1 (patch-am) = 4424107b9c2b8c9167560733ef1ce89d2e86fa09
+SHA1 (patch-an) = 1936547506bb83e50d9cbf7579df2f18e695ac29
+SHA1 (patch-ao) = 8be98e207b5e709dea51d33b26595dafc508c1df
+SHA1 (patch-ap) = 83d5c81bfe6fb7e78794792cf37b7a63575cef22
+SHA1 (patch-aq) = 71b49c068ce83706f5cbcda8adfa8df6b3d24e06
+SHA1 (patch-ar) = b909ab488f71045eb1b60fba33297c8245441d60
+SHA1 (patch-as) = fac3a5e2664b55289ffeb2947bf1c6d4a6afb2dc
+SHA1 (patch-at) = 4a8416c983d25f4ef118bf073c035626ee28b8c5
diff --git a/x11/xfstt/patches/patch-aa b/x11/xfstt/patches/patch-aa
index 655c7235a53..bfca549dcac 100644
--- a/x11/xfstt/patches/patch-aa
+++ b/x11/xfstt/patches/patch-aa
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.5 2004/01/25 20:46:19 wiz Exp $
+$NetBSD: patch-aa,v 1.6 2012/06/13 08:15:14 mef Exp $
+
+Convert hardcoded PATH to @PREFIX@
--- doc/FAQ.orig 2003-08-07 08:59:03.000000000 +0200
+++ doc/FAQ 2004-01-01 20:44:46.000000000 +0100
diff --git a/x11/xfstt/patches/patch-ab b/x11/xfstt/patches/patch-ab
index 0c8d2ff2c14..9777a6ee6ed 100644
--- a/x11/xfstt/patches/patch-ab
+++ b/x11/xfstt/patches/patch-ab
@@ -1,4 +1,6 @@
-$NetBSD: patch-ab,v 1.4 2004/01/01 20:06:11 salo Exp $
+$NetBSD: patch-ab,v 1.5 2012/06/13 08:15:14 mef Exp $
+
+Remove unnecessary comment.
--- doc/examples/font.properties.orig 2003-04-07 05:59:16.000000000 +0200
+++ doc/examples/font.properties 2004-01-01 20:46:52.000000000 +0100
diff --git a/x11/xfstt/patches/patch-ac b/x11/xfstt/patches/patch-ac
index d2f876e1b8a..a1bca003b31 100644
--- a/x11/xfstt/patches/patch-ac
+++ b/x11/xfstt/patches/patch-ac
@@ -1,15 +1,17 @@
-$NetBSD: patch-ac,v 1.5 2004/01/25 20:46:20 wiz Exp $
+$NetBSD: patch-ac,v 1.6 2012/06/13 08:15:14 mef Exp $
---- src/Makefile.in.orig 2003-08-07 08:58:28.000000000 +0200
-+++ src/Makefile.in 2004-01-01 20:51:39.000000000 +0100
-@@ -163,8 +163,8 @@
- target_alias = @target_alias@
-
- localedir = $(datadir)/locale
+Adjust fontdir and cachedir to pkgsrc style.
+
+--- src/Makefile.in.orig 2010-11-09 13:29:50.000000000 +0900
++++ src/Makefile.in 2011-10-17 11:57:56.000000000 +0900
+@@ -244,8 +244,8 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
-fontdir = $(datadir)/fonts/truetype
-cachedir = $(localstatedir)/cache/xfstt
+fontdir = $(prefix)/lib/X11/fonts/TTF
+cachedir = $(prefix)/lib/X11/fonts/TTF
pidfile = $(localstatedir)/run/xfstt.pid
-
- LDADD = @LIBINTL@ -L$(top_srcdir)/libfstt -lfstt
+ LDADD = @LIBINTL@ -L$(top_builddir)/libfstt -lfstt
+ AM_CPPFLAGS = -DLOCALEDIR=\""$(localedir)\"" -DFONTDIR=\""$(fontdir)\"" \
diff --git a/x11/xfstt/patches/patch-ae b/x11/xfstt/patches/patch-ae
deleted file mode 100644
index 501394772c1..00000000000
--- a/x11/xfstt/patches/patch-ae
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-ae,v 1.7 2004/01/25 20:46:20 wiz Exp $
-
---- doc/xfstt.1x.orig 2002-11-14 13:08:07.000000000 +0100
-+++ doc/xfstt.1x 2003-02-22 10:43:49.000000000 +0100
-@@ -58,12 +58,12 @@
- .I "\-\-dir name"
- Change xfstt's font directory.
- The default directory is
--.IR /usr/share/fonts/truetype .
-+.IR @PREFIX@/lib/X11/fonts/TTF .
- .TP
- .I "\-\-cache name"
- Change xfstt's font cache directory.
- The default directory is
--.IR /var/cache/xfstt .
-+.IR @PREFIX@/lib/X11/fonts/TTF .
- .TP
- .I "\-\-pidfile name"
- Change xfstt's pidfile location.
diff --git a/x11/xfstt/patches/patch-af b/x11/xfstt/patches/patch-af
index f8fdeaee660..a7792f4af13 100644
--- a/x11/xfstt/patches/patch-af
+++ b/x11/xfstt/patches/patch-af
@@ -1,8 +1,11 @@
-$NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-af,v 1.2 2012/06/13 08:15:14 mef Exp $
---- src/xfstt.cc.orig Thu Aug 7 08:31:47 2003
-+++ src/xfstt.cc Sat Feb 14 23:04:55 2004
-@@ -397,7 +397,7 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- src/xfstt.cc.orig 2012-03-21 02:23:17.000000000 +0900
++++ src/xfstt.cc 2012-06-13 11:47:32.000000000 +0900
+@@ -436,7 +436,7 @@
} else
mapIndex = 0;
@@ -11,7 +14,7 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
*buf0 = buf - buf0;
return *buf0 + 1;
-@@ -451,7 +451,7 @@
+@@ -495,7 +495,7 @@
strncpy(buf, (char *)&fn, sizeof(fn));
strncpy(buf + sizeof(fn), fontName, ttfn->nameLen);
buf[fn.nameLen] = 0;
@@ -20,16 +23,16 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
return fn.nameLen + 1;
}
-@@ -464,7 +464,7 @@
+@@ -509,7 +509,7 @@
if (fid == xfs->fid)
return xfs;
- debug("fid = %ld not found!\n", fid);
+ debug1("fid = %ld not found!\n", fid);
- if (sd) {
- fsError reply;
-@@ -482,7 +482,7 @@
+ return 0;
+ }
+@@ -529,7 +529,7 @@
openFont(TTFont *ttFont, FontParams *fp, Rasterizer *raster,
int fid, Encoding *encoding)
{
@@ -37,8 +40,8 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+ debug3("point %d, pixel %d, res %d\n",
fp->point[0], fp->pixel[0], fp->resolution[0]);
- if (!ttFont || ttFont->badFont())
-@@ -536,7 +536,7 @@
+ if (!ttFont)
+@@ -587,7 +587,7 @@
fp->point[3] = (fp->pixel[3] * 72 + 36) / fp->resolution[1];
}
@@ -47,7 +50,7 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
fp->resolution[0]);
// init rasterizer
-@@ -576,7 +576,7 @@
+@@ -630,7 +630,7 @@
return 0;
// parse attributes
@@ -56,27 +59,36 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
fp->point[0], fp->pixel[0], fp->resolution[0]);
int m_index = 0, p_index = 0, r_index = 0;
-@@ -701,8 +701,8 @@
+@@ -769,8 +769,8 @@
if (!encoding)
encoding = encodings[0];
-- debug("\nopenXLFD(\"%s\"), %s\n", xlfdName, encoding->strName);
+- debug("\nopenXLFD(\"%s\"), %s\n", xlfdName, encoding->Name.c_str());
- debug("size %d, resx %d, resy %d\n",
-+ debug2("\nopenXLFD(\"%s\"), %s\n", xlfdName, encoding->strName);
++ debug2("\nopenXLFD(\"%s\"), %s\n", xlfdName, encoding->Name.c_str());
+ debug3("size %d, resx %d, resy %d\n",
fp->point[0], fp->resolution[0], fp->resolution[1]);
TTFNdata* ttfn = (TTFNdata *)(infoBase + sizeof(TTFNheader));
-@@ -876,7 +876,7 @@
- sd = accept(sd_unix, (struct sockaddr *)&s_unix, &saLength);
- else if (!noTCP && FD_ISSET(sd_inet, &sdlist))
- sd = accept(sd_inet, (struct sockaddr *)&s_inet, &saLength);
-- debug("accept(saLength = %d) = %d\n", saLength, sd);
-+ debug2("accept(saLength = %d) = %d\n", saLength, sd);
+@@ -1047,7 +1047,7 @@
+ conn.sd_max = conn.sd_list[n];
+ }
+
+- debug("connection setup (sockets = %d)\n", conn.sd_list_used);
++ debug1("connection setup (sockets = %d)\n", conn.sd_list_used);
+
+ return 0;
+ }
+@@ -1074,7 +1074,7 @@
+ }
+ }
+
+- debug("accept(%d) = %d\n", conn.sd_list[n], sd);
++ debug2("accept(%d) = %d\n", conn.sd_list[n], sd);
return sd;
}
-@@ -901,9 +901,9 @@
+@@ -1097,9 +1097,9 @@
return 0;
}
@@ -86,60 +98,84 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
- debug("version %d.%d\n", req->major_version, req->minor_version);
+ debug2("version %d.%d\n", req->major_version, req->minor_version);
- if ((req->byteOrder == 'l' && (*(U32 *)req & 0xff) != 'l')
- || (req->byteOrder == 'B' && ((*(U32 *)req >> 24) & 0xff) != 'B')) {
-@@ -955,7 +955,7 @@
+ if ((req->byteOrder == 'l' && (*(uint32_t *)req & 0xff) != 'l') ||
+ (req->byteOrder == 'B' && ((*(uint32_t *)req >> 24) & 0xff) != 'B'))
+@@ -1150,7 +1150,7 @@
- register U8 *p, *end = fe->bitmaps + fe->bmplen;
+ register uint8_t *p, *end = fe->bitmaps + fe->bmplen;
if ((fe->bmpFormat ^ hint) & BitmapFormatMaskByte) {
- debug("slpswap SLP=%d\n", LOGSLP);
+ debug1("slpswap SLP=%d\n", LOGSLP);
p = fe->bitmaps;
switch (LOGSLP) {
case 3:
-@@ -987,7 +987,7 @@
+@@ -1182,7 +1182,7 @@
}
- if ((format != LOGSLP) && (hint & BitmapFormatByteOrderMask == 0)) {
+ if ((format != LOGSLP) && ((hint & BitmapFormatByteOrderMask) == 0)) {
- debug("fmtswap SLP=%d -> fmt=%d\n", LOGSLP, format);
+ debug2("fmtswap SLP=%d -> fmt=%d\n", LOGSLP, format);
p = fe->bitmaps;
if (LOGSLP == 3 && format == 4) {
for (; p < end; p += 2)
-@@ -1045,7 +1045,7 @@
- check_length(int sd, int seqno, fsReq *req, int expected_size)
- {
- if (req->length < (expected_size >> 2)) {
+@@ -1246,7 +1246,7 @@
+ int size = client.req.length << 2;
+
+ if (size < expected_size) {
- debug("packet size mismatch: %d received bytes, "
+ debug2("packet size mismatch: %d received bytes, "
- "%d expected bytes\n", req->length << 2, expected_size);
- send_fserror(sd, seqno);
+ "%d expected bytes\n", size, expected_size);
+ fs_client_error(client, FSBadLength);
return 0;
-@@ -1080,7 +1080,7 @@
- fsReq *fsreq = (fsReq *)buf;
- int length = fsreq->length << 2;
- if (length > MAXREQSIZE) {
+@@ -1277,14 +1277,14 @@
+ #ifdef DEBUG
+ debug("===STARTREQ=========== %d\n", l);
+ for (i = 0; i < sz_fsReq; ++i)
+- debug("%02X ", client.buf[i]);
++ debug1("%02X ", client.buf[i]);
+ debug("\n");
+ sync();
+ #endif
+
+ int size = client.req.length << 2;
+ if (size > MAXREQSIZE) {
- debug("too much data: %d bytes (max=%d)\n",
+ debug2("too much data: %d bytes (max=%d)\n",
- length, MAXREQSIZE);
- send_fserror(sd, seqno);
+ size, MAXREQSIZE);
+ fs_client_error(client, FSBadLength);
break;
-@@ -1182,12 +1182,12 @@
+@@ -1298,13 +1298,13 @@
+
+ #ifdef DEBUG
+ for (i = sz_fsReq; i < size; ++i) {
+- debug("%02X ", client.buf[i]);
++ debug1("%02X ", client.buf[i]);
+ if ((i & 3) == 3)
+ debug(" ");
+ if ((i & 15) == (15 - sz_fsReq))
+ debug("\n");
+ }
+- debug("\n===ENDREQ============= %d\n", size);
++ debug1("\n===ENDREQ============= %d\n", size);
+ sync();
+ #endif
+
+@@ -1382,12 +1382,12 @@
{
- fsSetEventMaskReq *req = (fsSetEventMaskReq *)buf;
- event_mask = req->event_mask;
-- debug("FS_SetEventMask %04X\n", event_mask);
-+ debug1("FS_SetEventMask %04X\n", event_mask);
+ fsSetEventMaskReq *req = (fsSetEventMaskReq *)client.buf;
+ client.event_mask = req->event_mask;
+- debug("FS_SetEventMask %04X\n", client.event_mask);
++ debug1("FS_SetEventMask %04X\n", client.event_mask);
}
break;
case FS_GetEventMask:
-- debug("FS_GetEventMask = %04X\n", event_mask);
-+ debug1("FS_GetEventMask = %04X\n", event_mask);
+- debug("FS_GetEventMask = %04X\n", client.event_mask);
++ debug1("FS_GetEventMask = %04X\n", client.event_mask);
{
fsGetEventMaskReply reply;
reply.type = FS_Reply;
-@@ -1241,7 +1241,7 @@
+@@ -1441,7 +1441,7 @@
fsResolution *res = (fsResolution *)(req + 1);
@@ -148,7 +184,7 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
for (; --numres >= 0; ++res) {
if (!defaultres) {
fp0.resolution[0] = res->x_resolution;
-@@ -1250,7 +1250,7 @@
+@@ -1450,7 +1450,7 @@
res->point_size /= 10;
fp0.point[0] = fp0.point[1] = res->point_size;
fp0.point[2] = fp0.point[3] = 0;
@@ -157,7 +193,7 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
res->x_resolution, res->y_resolution,
res->point_size / 10);
}
-@@ -1289,7 +1289,7 @@
+@@ -1489,7 +1489,7 @@
break;
pattern[req->nbytes] = 0;
@@ -166,35 +202,26 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pattern, req->maxNames);
fsListFontsReply reply;
-@@ -1323,7 +1323,7 @@
+@@ -1523,7 +1523,7 @@
buf += len;
++reply.nFonts;
}
- debug("Found %ld fonts\n", reply.nFonts);
+ debug1("Found %ld fonts\n", reply.nFonts);
- reply.length = (sizeof(reply) + (buf - replybuf)
+ reply.length = (sizeof(reply) + (buf - client.replybuf)
+ 3) >> 2;
-@@ -1358,7 +1358,7 @@
- error.sequenceNumber = seqno;
- error.length = sizeof(error) >> 2;
-
-- debug(" fsError size = %u bytes, %u ints\n",
-+ debug2(" fsError size = %u bytes, %u ints\n",
- sizeof(error), error.length);
- write(sd, (void *)&error, sizeof(error));
- #endif
-@@ -1370,7 +1370,7 @@
- fsOpenBitmapFontReq *req = (fsOpenBitmapFontReq *)buf;
+@@ -1562,7 +1562,7 @@
+ fsOpenBitmapFontReq *req = (fsOpenBitmapFontReq *)client.buf;
char *fontName = (char *)(req + 1) + 1;
- fontName[*(U8 *)(req + 1)] = 0;
+ fontName[*(uint8_t *)(req + 1)] = 0;
- debug("FS_OpenBitmapFont \"%s\"", fontName);
+ debug1("FS_OpenBitmapFont \"%s\"", fontName);
raster->format = (req->format_hint >> 8) & 3;
if (req->format_hint & 0x0c)
-@@ -1399,7 +1399,7 @@
- write(sd, (void *)&reply, sizeof(reply));
+@@ -1585,7 +1585,7 @@
+ fs_client_error(client, FSBadName);
debug(" not found\n");
}
- debug("fhint = %04lX, fmask = %04lX, fid = %ld\n",
@@ -202,18 +229,18 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
req->format_hint, req->format_mask, req->fid);
}
break;
-@@ -1407,7 +1407,7 @@
+@@ -1593,7 +1593,7 @@
case FS_QueryXInfo:
{
- fsQueryXInfoReq *req = (fsQueryXInfoReq *)buf;
+ fsQueryXInfoReq *req = (fsQueryXInfoReq *)client.buf;
- debug("FS_QueryXInfo fid = %ld\n", req->id);
+ debug1("FS_QueryXInfo fid = %ld\n", req->id);
struct {
fsQueryXInfoReply s1;
-@@ -1439,10 +1439,10 @@
+@@ -1625,10 +1625,10 @@
reply.s1.font_hdr_char_range_max_char_low
- = (U8)fi->lastChar;
+ = (uint8_t)fi->lastChar;
- debug("minchar = 0x%02X%02X, ",
+ debug2("minchar = 0x%02X%02X, ",
@@ -224,7 +251,7 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
reply.s1.font_hdr_char_range_max_char_high,
reply.s1.font_hdr_char_range_max_char_low);
-@@ -1466,11 +1466,11 @@
+@@ -1652,11 +1652,11 @@
reply.s1.font_header_font_ascent = fe->yWinAscent;
reply.s1.font_header_font_descent = fe->yWinDescent;
@@ -239,9 +266,9 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
fe->xAdvanceMin, fe->xAdvanceMax);
// we need to have some property data, otherwise
-@@ -1494,10 +1494,10 @@
+@@ -1680,10 +1680,10 @@
{
- fsQueryXExtents16Req *req = (fsQueryXExtents16Req *)buf;
+ fsQueryXExtents16Req *req = (fsQueryXExtents16Req *)client.buf;
- debug("FS_QueryXExtents%s fid = %ld, ",
+ debug2("FS_QueryXExtents%s fid = %ld, ",
@@ -252,18 +279,32 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
req->range, req->num_ranges);
int item_size = (req->reqType == FS_QueryXExtents8)
-@@ -1535,7 +1535,7 @@
+@@ -1722,7 +1722,7 @@
for (; nranges > 0; nranges -= 2, ptr += 2) {
ptr[0] = ntohs(ptr[0]);
ptr[1] = ntohs(ptr[1]);
- debug("rg %d..%d\n",ptr[0],ptr[1]);
+ debug2("rg %d..%d\n",ptr[0],ptr[1]);
- for (U16 j = ptr[0]; j <= ptr[1]; ++j)
+ for (uint16_t j = ptr[0]; j <= ptr[1]; ++j)
(ext++)->left = j;
}
-@@ -1591,9 +1591,9 @@
+@@ -1762,10 +1762,10 @@
+ }
+
+ #if DEBUG & 2
+- debug("GM[%3d = %3d] = ", ch, glyphNo);
+- debug("(l= %d, r= %d, ",
++ debug1("GM[%3d = %3d] = ", ch, glyphNo);
++ debug2("(l= %d, r= %d, ",
+ ext->left, ext->right);
+- debug("w= %d, a= %d, d= %d);\n",
++ debug3("w= %d, a= %d, d= %d);\n",
+ ext->width, ext->ascent, ext->descent);
+ #endif
+ }
+@@ -1780,9 +1780,9 @@
{
- fsQueryXBitmaps16Req *req = (fsQueryXBitmaps16Req *)buf;
+ fsQueryXBitmaps16Req *req = (fsQueryXBitmaps16Req *)client.buf;
- debug("FS_QueryXBitmaps16 fid = %ld, fmt = %04lX\n",
+ debug2("FS_QueryXBitmaps16 fid = %ld, fmt = %04lX\n",
@@ -273,30 +314,39 @@ $NetBSD: patch-af,v 1.1 2004/02/14 22:27:30 kristerw Exp $
req->range, req->num_ranges);
int item_size = (req->reqType == FS_QueryXExtents8)
-@@ -1633,7 +1633,7 @@
+@@ -1823,7 +1823,7 @@
for (; nranges > 0; nranges -= 2, ptr += 2) {
ptr[0] = ntohs(ptr[0]);
ptr[1] = ntohs(ptr[1]);
- debug("rg %d..%d\n",ptr[0],ptr[1]);
+ debug2("rg %d..%d\n",ptr[0],ptr[1]);
- for (U16 j = ptr[0]; j <= ptr[1]; ++j)
+ for (uint16_t j = ptr[0]; j <= ptr[1]; ++j)
(ofs++)->position = j;
}
-@@ -1713,7 +1713,7 @@
+@@ -1868,7 +1868,7 @@
+ ofs->position = ci->tmpofs;
+
+ #if DEBUG & 2
+- debug("OFS[%3d = %3d] = %ld\n",
++ debug2("OFS[%3d = %3d] = %ld\n",
+ ch, glyphNo, ofs->position);
+ #endif
+ }
+@@ -1905,7 +1905,7 @@
case FS_CloseFont:
{
- fsCloseReq *req = (fsCloseReq *)buf;
+ fsCloseReq *req = (fsCloseReq *)client.buf;
- debug("FS_CloseFont fid = %ld\n", req->id);
+ debug1("FS_CloseFont fid = %ld\n", req->id);
- XFSFont *xfs = findFont(req->id, sd, seqno);
+ XFSFont *xfs = fs_find_font(req->id, client);
if (xfs) {
-@@ -1725,7 +1725,7 @@
+@@ -1917,7 +1917,7 @@
break;
default:
-- debug("Unknown FS request 0x%02X !\n", fsreq->reqType);
-+ debug1("Unknown FS request 0x%02X !\n", fsreq->reqType);
- {
- fsRequestError reply;
- reply.type = FS_Error;
+- debug("Unknown FS request 0x%02X !\n", client.req.reqType);
++ debug1("Unknown FS request 0x%02X !\n", client.req.reqType);
+ fs_client_error(client, FSBadRequest);
+ break;
+ }
diff --git a/x11/xfstt/patches/patch-ag b/x11/xfstt/patches/patch-ag
index 858245ed5de..a1120982751 100644
--- a/x11/xfstt/patches/patch-ag
+++ b/x11/xfstt/patches/patch-ag
@@ -1,17 +1,120 @@
-$NetBSD: patch-ag,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ag,v 1.2 2012/06/13 08:15:14 mef Exp $
---- libfstt/rafile.cc.orig Sat Feb 14 22:06:38 2004
-+++ libfstt/rafile.cc Sat Feb 14 22:07:03 2004
-@@ -200,7 +200,7 @@
- #else
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+
+--- libfstt/rafile.cc.orig 2012-03-03 00:33:23.000000000 +0900
++++ libfstt/rafile.cc 2012-06-13 11:50:50.000000000 +0900
+@@ -68,10 +68,10 @@
+ debug("Memory holes:\n");
+ for (int i = 0; i < memidx; ++i)
+ if (memdbg[i].ptr)
+- debug("MEM hole[%3d] = %p\n", i, memdbg[i].ptr);
++ debug2("MEM hole[%3d] = %p\n", i, memdbg[i].ptr);
+
+ if (memcount != 0)
+- debug("MEM hole: memcount = %d\n", memcount);
++ debug1("MEM hole: memcount = %d\n", memcount);
+ }
+
+ void *
+@@ -81,8 +81,8 @@
+
+ memused += size;
+
+- debug("MEM new[](%5d) = %p", size, ptr);
+- debug(", memcount = %d, memidx = %d", ++memcount, memidx);
++ debug2("MEM new[](%5d) = %p", size, ptr);
++ debug2(", memcount = %d, memidx = %d", ++memcount, memidx);
+
+ int i = memidx;
+
+@@ -90,7 +90,7 @@
+ if (i <= 0)
+ i = memidx++;
+
+- debug(", idx = %d, used %d\n", i, memused);
++ debug2(", idx = %d, used %d\n", i, memused);
+
+ memdbg[i].ptr = ptr;
+ memdbg[i].len = size;
+@@ -101,15 +101,15 @@
+ void
+ operator delete[](void *ptr)
+ {
+- debug("MEM delete[](%p)", ptr);
+- debug(", memcount = %d, memidx = %d\n", --memcount, memidx);
++ debug1("MEM delete[](%p)", ptr);
++ debug2(", memcount = %d, memidx = %d\n", --memcount, memidx);
+
+ int i = memidx;
+ while (--i >= 0 && memdbg[i].ptr != ptr);
+ if (i >= 0) {
+ memdbg[i].ptr = 0;
+ memused -= memdbg[i].len;
+- debug(", idx = %d, used %d\n", i, memused);
++ debug2(", idx = %d, used %d\n", i, memused);
+ if (++i == memidx)
+ --memidx;
+ } else
+@@ -124,15 +124,15 @@
+ void *ptr = malloc(size);
+ memused += size;
+
+- debug("MEM new(%7d) = %p", size, ptr);
+- debug(", memcount = %d, memidx = %d", ++memcount, memidx);
++ debug2("MEM new(%7d) = %p", size, ptr);
++ debug2(", memcount = %d, memidx = %d", ++memcount, memidx);
+
+ int i = memidx;
+ while (--i >= 0 && memdbg[i].ptr);
+ if (i <= 0)
+ i = memidx++;
+
+- debug(", idx = %d, used %d\n", i, memused);
++ debug2(", idx = %d, used %d\n", i, memused);
+
+ memdbg[i].ptr = ptr;
+ memdbg[i].len = size;
+@@ -143,15 +143,15 @@
+ void
+ operator delete(void *ptr)
+ {
+- debug("MEM delete(%p)", ptr);
+- debug(", memcount = %d, memidx = %d", --memcount, memidx);
++ debug1("MEM delete(%p)", ptr);
++ debug2(", memcount = %d, memidx = %d", --memcount, memidx);
+
+ int i = memidx;
+ while (--i >= 0 && memdbg[i].ptr != ptr);
+ if (i >= 0) {
+ memdbg[i].ptr = 0;
+ memused -= memdbg[i].len;
+- debug(", idx = %d, used %d\n", i, memused);
++ debug2(", idx = %d, used %d\n", i, memused);
+ if (++i == memidx)
+ --memidx;
+ } else
+@@ -166,7 +166,7 @@
+ {
int fd = open(fileName, O_RDONLY);
- if (fd <= 0) {
+ if (fd < 0) {
- debug("Cannot open \"%s\"\n", fileName);
+ debug1("Cannot open \"%s\"\n", fileName);
- ptr = base = 0;
+ ptr = absbase = base = 0;
+ return;
+ }
+@@ -176,7 +176,7 @@
+ base = (uint8_t *)mmap(0L, length, PROT_READ, MAP_SHARED, fd, 0L);
+ close(fd);
+ if (base == MAP_FAILED) {
+- debug("MMap failed '%s'\n", strerror(errno));
++ debug1("MMap failed '%s'\n", strerror(errno));
+ ptr = absbase = base = 0;
return;
}
-@@ -237,7 +237,7 @@
+@@ -203,7 +203,7 @@
checksum += readUInt() & (-1 << ((-length & 3) << 3));
ptr = saveptr;
diff --git a/x11/xfstt/patches/patch-ah b/x11/xfstt/patches/patch-ah
index 55b2970d741..68c65b99b94 100644
--- a/x11/xfstt/patches/patch-ah
+++ b/x11/xfstt/patches/patch-ah
@@ -1,9 +1,12 @@
-$NetBSD: patch-ah,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ah,v 1.2 2012/06/13 08:15:14 mef Exp $
---- libfstt/raster_draw.cc.orig Sat Feb 14 22:09:49 2004
-+++ libfstt/raster_draw.cc Sat Feb 14 22:10:01 2004
-@@ -228,7 +228,7 @@
- Rasterizer::drawBitmap(U8 *const bmp, int height, int dX)
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/raster_draw.cc.orig 2010-10-04 23:22:48.000000000 +0900
++++ libfstt/raster_draw.cc 2011-10-17 12:17:55.000000000 +0900
+@@ -226,7 +226,7 @@
+ Rasterizer::drawBitmap(uint8_t *const bmp, int height, int dX)
{
// sort horizontal/vertical dots
- debug("dropoutControl = %d\n", gs.dropout_control);
diff --git a/x11/xfstt/patches/patch-ai b/x11/xfstt/patches/patch-ai
index 666cb480598..c6fd912bfcc 100644
--- a/x11/xfstt/patches/patch-ai
+++ b/x11/xfstt/patches/patch-ai
@@ -1,8 +1,11 @@
-$NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ai,v 1.2 2012/06/13 08:15:14 mef Exp $
---- libfstt/raster_hints.cc.orig Sat Feb 14 22:10:14 2004
-+++ libfstt/raster_hints.cc Sat Feb 14 22:39:52 2004
-@@ -123,7 +123,7 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/raster_hints.cc.orig 2012-03-03 00:33:23.000000000 +0900
++++ libfstt/raster_hints.cc 2012-06-13 11:53:44.000000000 +0900
+@@ -121,7 +121,7 @@
int val = cvtTab->nextVal();
// (ld 2048 = 11) - (SHIFT = 6) = 5
cvt[i] = ((val * scale + 32) >> 6) << xxexp;
@@ -11,7 +14,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
if (ttFont->prepTable == 0)
-@@ -198,13 +198,13 @@
+@@ -196,13 +196,13 @@
y -= gs.round_phase - gs.round_thold;
y &= -gs.round_period;
y += gs.round_phase;
@@ -27,7 +30,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
}
if (y < 0) return 0;
-@@ -214,8 +214,8 @@
+@@ -212,8 +212,8 @@
inline int
GraphicsState::absNewMeasure(int dx11D6, int dy11D6)
{
@@ -38,7 +41,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int dist = dx11D6 * p_vec_x + dy11D6 * p_vec_y + 0x2000;
dist >>= 14;
-@@ -225,8 +225,8 @@
+@@ -223,8 +223,8 @@
inline int
GraphicsState::absOldMeasure(int dx11D6, int dy11D6)
{
@@ -49,8 +52,8 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int dist = dx11D6 * dp_vec_x + dy11D6 * dp_vec_y + 0x2000;
dist >>= 14;
-@@ -237,7 +237,7 @@
- Rasterizer::newMeasure(const point& p2, const point& p1)
+@@ -235,7 +235,7 @@
+ Rasterizer::newMeasure(const Point &p2, const Point &p1)
{
int dist = gs.absNewMeasure(p2.xnow - p1.xnow, p2.ynow - p1.ynow);
- debug("\nnewMeasure p[%d]-p[%d] = %f",
@@ -58,8 +61,8 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
&p2 - p[1], &p1 - p[1], dist / FSHIFT);
return dist;
-@@ -247,7 +247,7 @@
- Rasterizer::oldMeasure(const point& p2, const point& p1)
+@@ -245,7 +245,7 @@
+ Rasterizer::oldMeasure(const Point &p2, const Point &p1)
{
int dist = gs.absOldMeasure(p2.xold - p1.xold, p2.yold - p1.yold);
- debug("\noldMeasure p[%d]-p[%d] = %f",
@@ -67,7 +70,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
&p2 - p[1], &p1 - p[1], dist / FSHIFT);
return dist;
}
-@@ -271,9 +271,9 @@
+@@ -269,9 +269,9 @@
vx = 0;
vy = 0;
}
@@ -80,7 +83,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
void
-@@ -295,22 +295,22 @@
+@@ -293,22 +293,22 @@
vx = 0;
vy = 0;
}
@@ -93,7 +96,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
inline void
- GraphicsState::movePoint(point& pp, int len11D6)
+ GraphicsState::movePoint(Point &pp, int len11D6)
{
- debug("\nmovePoint by %f", len11D6 / FSHIFT);
- debug("\t(%d %d)", pp.xnow, pp.ynow);
@@ -109,7 +112,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
void
-@@ -350,7 +350,7 @@
+@@ -348,7 +348,7 @@
assert(stack >= stackbase);
int opc = f->readUByte();
@@ -118,7 +121,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
switch (opc) {
// pushing onto the stack
-@@ -363,11 +363,11 @@
+@@ -361,11 +361,11 @@
case PUSHB04: case PUSHB05:
case PUSHB06: case PUSHB07:
m = opc - (PUSHB00 - 1);
@@ -132,7 +135,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if ((m & 7) == 0)
debug("\n>\t\t");
}
-@@ -381,10 +381,10 @@
+@@ -379,10 +379,10 @@
case PUSHW04: case PUSHW05:
case PUSHW06: case PUSHW07:
m = opc - (PUSHW00 - 1);
@@ -145,7 +148,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if ((m & 7) == 0)
debug("\n>\t\t");
}
-@@ -396,12 +396,12 @@
+@@ -394,12 +394,12 @@
m = *stack;
assert(m >= 0 && m < sizeStor);
*stack = stor[m];
@@ -160,7 +163,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
assert(n >= 0 && n < sizeStor);
stor[n] = m;
break;
-@@ -413,7 +413,7 @@
+@@ -411,7 +411,7 @@
n = *(stack--);
assert(n >= 0 && n < sizeCvt);
cvt[n] = m;
@@ -169,7 +172,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case WCVTF:
m = *(stack--);
-@@ -421,13 +421,13 @@
+@@ -419,13 +419,13 @@
assert(n >= 0 && n < sizeCvt);
//XXX: how does one scale a scalar with the ((xx,xy),(yx,yy)) matrix???
cvt[n] = ((m * (xx + yy) + 32) >> 6) << xxexp;
@@ -185,7 +188,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
// accessing the graphics state
-@@ -493,7 +493,7 @@
+@@ -491,7 +491,7 @@
case SDPVTL0:
m = *(stack--);
n = *(stack--);
@@ -194,7 +197,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
oldLine2vector(gs.zp1[n], gs.zp2[m], gs.dp_vec_x, gs.dp_vec_y);
newLine2vector(gs.zp1[n], gs.zp2[m], gs.p_vec_x, gs.p_vec_y);
gs.recalc();
-@@ -501,7 +501,7 @@
+@@ -499,7 +499,7 @@
case SDPVTL1:
m = *(stack--);
n = *(stack--);
@@ -203,7 +206,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
oldLine2vector(gs.zp1[n], gs.zp2[m], gs.dp_vec_y, gs.dp_vec_x);
gs.dp_vec_x = -gs.dp_vec_x;
newLine2vector(gs.zp1[n], gs.zp2[m], gs.p_vec_y, gs.p_vec_x);
-@@ -511,7 +511,7 @@
+@@ -509,7 +509,7 @@
case SPVTL0:
m = *(stack--);
n = *(stack--);
@@ -212,7 +215,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
newLine2vector(gs.zp1[n], gs.zp2[m], gs.p_vec_x, gs.p_vec_y);
gs.dp_vec_x = gs.p_vec_x;
gs.dp_vec_y = gs.p_vec_y;
-@@ -520,7 +520,7 @@
+@@ -518,7 +518,7 @@
case SPVTL1:
m = *(stack--);
n = *(stack--);
@@ -221,7 +224,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
newLine2vector(gs.zp1[n], gs.zp2[m], gs.p_vec_y, gs.p_vec_x);
gs.dp_vec_y = gs.p_vec_y = -gs.p_vec_y;
gs.dp_vec_x = gs.p_vec_x;
-@@ -529,14 +529,14 @@
+@@ -527,14 +527,14 @@
case SFVTL0:
m = *(stack--);
n = *(stack--);
@@ -238,7 +241,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
newLine2vector(gs.zp1[n], gs.zp2[m], gs.f_vec_y, gs.f_vec_x);
gs.f_vec_y = -gs.f_vec_y;
gs.recalc();
-@@ -550,58 +550,58 @@
+@@ -548,58 +548,58 @@
case SPVFS:
gs.dp_vec_y = gs.p_vec_y = *(stack--);
gs.dp_vec_x = gs.p_vec_x = *(stack--);
@@ -308,7 +311,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
assert(m >= 0 && m <= 1);
gs.zp2 = gs.zp1 = gs.zp0 = p[m];
break;
-@@ -631,7 +631,7 @@
+@@ -629,7 +629,7 @@
break;
case SROUND:
m = *(stack--);
@@ -317,7 +320,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.round_state = ROUND_SUPER;
n = (m >> 6) & 3;
gs.round_period = 0x20 << n;
-@@ -643,12 +643,12 @@
+@@ -641,12 +641,12 @@
gs.round_thold = (gs.round_period >> 3) * (m - 4);
else
gs.round_thold = gs.round_period - 1;
@@ -332,7 +335,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.round_state = ROUND_SUPER45;
gs.round_period = 1444 >> (7 - ((m >> 6) & 3));
gs.round_phase = (gs.round_period * (m & 0x30)) >> 6;
-@@ -657,21 +657,21 @@
+@@ -655,21 +655,21 @@
gs.round_thold = (gs.round_period * (m - 4)) >> 3;
else
gs.round_thold = gs.round_period - 1;
@@ -358,7 +361,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (gs.instr_control == 1)
if (m && grid_fitting >= 0)
grid_fitting = -grid_fitting;
-@@ -685,24 +685,24 @@
+@@ -683,24 +683,24 @@
if (m & 0x0800 && mppem > (m & 0xff)) gs.dropout_control = 0;
if (m & 0x1000 && (xy || yx)) gs.dropout_control = 0;
if (m & 0x2000 && xx == yy) gs.dropout_control = 0;
@@ -388,7 +391,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case FLIPON:
gs.auto_flip = 1;
-@@ -715,37 +715,37 @@
+@@ -713,37 +713,37 @@
case SANGW:
// angle_weight is obsolete!
m = *(stack--);
@@ -434,7 +437,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp = &gs.zp2[n];
if (gs.zp2 == p[1]) {
int i = gs.absNewMeasure(pp->xnow, pp->ynow);
-@@ -758,15 +758,15 @@
+@@ -756,15 +756,15 @@
case MD0:
m = *(stack--);
n = *stack;
@@ -454,7 +457,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
*stack = oldMeasure(gs.zp0[n], gs.zp1[m]); // Thanks David
break;
case MPPEM:
-@@ -775,11 +775,11 @@
+@@ -773,11 +773,11 @@
if (m < 0)
m = -m;
*(++stack) = m;
@@ -468,7 +471,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
// outline manipulation
-@@ -787,7 +787,7 @@
+@@ -785,7 +785,7 @@
case FLIPPT:
for (m = gs.loop; --m >= 0;) {
n = *(stack--);
@@ -477,7 +480,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.zp1[n].flags ^= ON_CURVE;
}
gs.loop = 1;
-@@ -795,7 +795,7 @@
+@@ -793,7 +793,7 @@
case FLIPRGON:
m = *(stack--);
n = *(stack--);
@@ -486,7 +489,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp = &gs.zp1[n];
for (m -= n-1; --m >= 0; ++pp)
pp->flags |= ON_CURVE;
-@@ -803,7 +803,7 @@
+@@ -801,7 +801,7 @@
case FLIPRGOFF:
m = *(stack--);
n = *(stack--);
@@ -495,7 +498,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp = &gs.zp1[n];
for (m -= n-1; --m >= 0; ++pp)
pp->flags &= ~ON_CURVE;
-@@ -814,8 +814,8 @@
+@@ -812,8 +812,8 @@
n = gs.absNewMeasure(pp->xnow - pp->xold, pp->ynow - pp->yold);
for (m = gs.loop; --m >= 0;) {
int i = *(stack--);
@@ -506,7 +509,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.movePoint(gs.zp2[i], n);
}
gs.loop = 1;
-@@ -826,14 +826,14 @@
+@@ -824,14 +824,14 @@
m = *(stack--);
assert(m >= 0 && m < sizeContours);
pp = (opc & 1) ? &gs.zp0[gs.rp1] : &gs.zp1[gs.rp2];
@@ -523,7 +526,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.movePoint(gs.zp2[i], n);
}
}
-@@ -841,32 +841,32 @@
+@@ -839,32 +839,32 @@
case SHZ0:
case SHZ1:
m = *(stack--);
@@ -533,7 +536,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp = (opc & 1) ? &gs.zp0[gs.rp1] : &gs.zp1[gs.rp2];
n = gs.absNewMeasure(pp->xnow - pp->xold, pp->ynow - pp->yold);
assert(m >= 0 && m <= 1);
- for (point *pp1 = p[m], *pp2 = pp1 + nPoints[m]; pp1 < pp2; ++pp1) {
+ for (Point *pp1 = p[m], *pp2 = pp1 + nPoints[m]; pp1 < pp2; ++pp1) {
if (pp1 == pp) continue;
- debug("\nSHZ p[%d] by %f", pp1 - p[m], n / FSHIFT);
- debug("\t(%d %d) -> ", pp1->xnow, pp1->ynow);
@@ -564,7 +567,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
gs.loop = 1;
break;
-@@ -876,8 +876,8 @@
+@@ -874,8 +874,8 @@
n = *(stack--);
gs.rp2 = n;
gs.rp1 = gs.rp0;
@@ -575,7 +578,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.zp0 == p[1], gs.rp0);
if (gs.zp1 == p[1]) {
int i = newMeasure(p[1][n], gs.zp0[gs.rp0]);
-@@ -895,9 +895,9 @@
+@@ -893,9 +893,9 @@
case MDAP0:
case MDAP1:
gs.rp0 = gs.rp1 = *(stack--);
@@ -587,7 +590,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp->flags |= gs.flags;
if (opc & 1) {
#if 0 // XXX
-@@ -905,11 +905,11 @@
+@@ -903,11 +903,11 @@
pp->xnow = round(pp->xnow);
if (gs.f_vec_y)
pp->ynow = round(pp->ynow);
@@ -601,7 +604,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
#endif
}
break;
-@@ -917,10 +917,10 @@
+@@ -915,10 +915,10 @@
case MIAP1:
m = *(stack--);
gs.rp0 = gs.rp1 = *(stack--);
@@ -615,7 +618,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (gs.zp0 != p[0]) {
pp = &p[1][gs.rp0];
int i = gs.absNewMeasure(pp->xnow, pp->ynow);
-@@ -929,7 +929,7 @@
+@@ -927,7 +927,7 @@
m = i;
m = round(m);
}
@@ -624,7 +627,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.movePoint(gs.zp0[gs.rp0], m - i);
} else { // magic in the twilight zone
pp = &p[0][gs.rp0];
-@@ -959,18 +959,18 @@
+@@ -957,18 +957,18 @@
case MDRP1E: case MDRP1F:
gs.rp2 = *(stack--);
gs.rp1 = gs.rp0;
@@ -645,11 +648,11 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.rp0 = gs.rp2;
- debug("\nmdrp1.wanted = %d", n);
+ debug1("\nmdrp1.wanted = %d", n);
- if (opc & 0x08)
+ if (opc & 0x08) {
if (n >= 0) {
if (n < +gs.min_distance)
-@@ -981,7 +981,7 @@
- }
+@@ -980,7 +980,7 @@
+ }
if (opc & 0x04)
n = round(n);
- debug("\nmdrp2.wanted = %d", n);
@@ -657,7 +660,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
// XXX: ignore black/gray/white for now
gs.movePoint(gs.zp1[gs.rp2], n - m);
break;
-@@ -1005,10 +1005,10 @@
+@@ -1004,10 +1004,10 @@
m = *(stack--);
gs.rp2 = *(stack--);
pp = &gs.zp1[gs.rp2];
@@ -670,7 +673,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (((m >= 0)? +m : -m) < +gs.swidth_cut_in)
m = (m >= 0) ? +gs.swidth_value : -gs.swidth_value;
-@@ -1016,7 +1016,7 @@
+@@ -1015,7 +1015,7 @@
if ((n^m) < 0 && gs.auto_flip) {
m = -m;
@@ -679,7 +682,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
if (opc & 0x04) {
if (((m>n) ? m - n : n - m) >= +gs.cvt_cut_in)
-@@ -1041,7 +1041,7 @@
+@@ -1040,7 +1040,7 @@
case ALIGNRP:
for (m = gs.loop; --m >= 0;) {
int n = *(stack--);
@@ -688,7 +691,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int i = newMeasure(gs.zp0[gs.rp0], gs.zp1[n]);
gs.movePoint(gs.zp1[n], i);
}
-@@ -1051,7 +1051,7 @@
+@@ -1050,7 +1050,7 @@
{
m = *(stack--);
n = *(stack--);
@@ -697,8 +700,8 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int i = newMeasure(gs.zp0[m], gs.zp1[n]) >> 1;
gs.movePoint(gs.zp0[m], -i);
gs.movePoint(gs.zp1[n], +i);
-@@ -1065,9 +1065,9 @@
- point* pp4 = &gs.zp0[*(stack--)];
+@@ -1064,9 +1064,9 @@
+ Point *pp4 = &gs.zp0[*(stack--)];
m = *(stack--);
- debug("ISECT p[%d] ", m);
@@ -710,7 +713,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int f1 = (pp1->xnow - pp3->xnow) * (pp4->ynow - pp3->ynow) -
(pp1->ynow - pp3->ynow) * (pp4->xnow - pp3->xnow);
-@@ -1087,7 +1087,7 @@
+@@ -1086,7 +1086,7 @@
MULDIV(f1, pp2->ynow - pp1->ynow, f2);
}
@@ -719,7 +722,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
break;
case AA:
-@@ -1097,9 +1097,9 @@
+@@ -1096,9 +1096,9 @@
case IP:
for (m = gs.loop; --m >= 0;) {
int n = *(stack--);
@@ -732,7 +735,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
interpolate(gs.zp2[n], gs.zp1[gs.rp2], gs.zp0[gs.rp1]);
debug("\n");
}
-@@ -1108,13 +1108,13 @@
+@@ -1107,13 +1107,13 @@
case UTP:
m = *(stack--);
gs.zp0[m].flags &= ~(X_TOUCHED | Y_TOUCHED);
@@ -742,22 +745,22 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
case IUP0:
pp = p[1];
for (m = 0; m < nEndPoints; ++m) {
- point* last = p[1] + endPoints[m];
+ Point *last = p[1] + endPoints[m];
- debug("IUP0 p[%d .. %d]", pp - p[1], last - p[1]);
+ debug2("IUP0 p[%d .. %d]", pp - p[1], last - p[1]);
doIUP0(pp, last);
pp = last + 1;
}
-@@ -1123,7 +1123,7 @@
+@@ -1122,7 +1122,7 @@
pp = p[1];
for (m = 0; m < nEndPoints; ++m) {
- point* last = p[1] + endPoints[m];
+ Point *last = p[1] + endPoints[m];
- debug("IUP1 p[%d .. %d]", pp - p[1], last - p[1]);
+ debug2("IUP1 p[%d .. %d]", pp - p[1], last - p[1]);
doIUP1(pp, last);
pp = last + 1;
}
-@@ -1138,11 +1138,11 @@
+@@ -1137,11 +1137,11 @@
n = 0;
deltap_label:
m = *(stack--);
@@ -772,7 +775,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
stack -= m << 1;
break;
}
-@@ -1150,8 +1150,8 @@
+@@ -1149,8 +1149,8 @@
while (--m >= 0) {
int pno = *(stack--);
int arg = *(stack--);
@@ -783,7 +786,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (n > (arg & 0xf0))
break;
if (n == (arg & 0xf0)) {
-@@ -1159,7 +1159,7 @@
+@@ -1158,7 +1158,7 @@
if (arg >= 0)
++arg;
arg <<= (SHIFT - gs.delta_shift);
@@ -792,7 +795,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
arg / FSHIFT,
gs.zp0[pno].xnow, gs.zp0[pno].ynow);
#if 0
-@@ -1169,7 +1169,7 @@
+@@ -1168,7 +1168,7 @@
gs.zp0[pno].ynow += (arg * gs.f_vec_y) >> 14;
gs.zp0[pno].flags |= gs.flags;
#endif
@@ -801,7 +804,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.zp0[pno].xnow, gs.zp0[pno].ynow);
}
}
-@@ -1198,8 +1198,8 @@
+@@ -1197,8 +1197,8 @@
n = 0;
deltac_label:
m = *(stack--);
@@ -812,7 +815,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
n += mppem - gs.delta_base;
if (n < 0 || n > 15) {
stack -= m << 1;
-@@ -1209,7 +1209,7 @@
+@@ -1208,7 +1208,7 @@
while (--m >= 0) {
int cno = *(stack--);
int arg = *(stack--);
@@ -821,7 +824,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
cno, arg, n >> 4);
if (n > (arg & 0xf0))
break;
-@@ -1217,10 +1217,10 @@
+@@ -1216,10 +1216,10 @@
arg = (arg & 15) - 8;
if (arg >= 0) ++arg;
arg <<= SHIFT - gs.delta_shift;
@@ -834,7 +837,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
}
#ifndef DEBUG
-@@ -1230,8 +1230,8 @@
+@@ -1229,8 +1229,8 @@
while (--m >= 0) {
int cno = *(stack--);
int arg = *(stack--);
@@ -845,7 +848,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
};
#endif
break;
-@@ -1241,7 +1241,7 @@
+@@ -1240,7 +1240,7 @@
case DUP:
m = *stack;
*(++stack) = m;
@@ -854,7 +857,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case POP:
debug("POP");
-@@ -1260,20 +1260,20 @@
+@@ -1259,20 +1259,20 @@
case DEPTH:
m = stack - stackbase;
*(++stack) = m;
@@ -878,7 +881,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
for (; --m > 0; ++stack)
stack[0] = stack[1];
*stack = n;
-@@ -1283,15 +1283,15 @@
+@@ -1282,15 +1282,15 @@
*(stack - 0) = *(stack - 2);
*(stack - 2) = *(stack - 1);
*(stack - 1) = m;
@@ -897,7 +900,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (!m)
skipHints(f);
break;
-@@ -1305,7 +1305,7 @@
+@@ -1304,7 +1304,7 @@
break;
case JROT:
m = *(stack--);
@@ -906,7 +909,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (m)
goto jump_relative;
debug("not taken");
-@@ -1313,7 +1313,7 @@
+@@ -1312,7 +1312,7 @@
break;
case JROF:
m = *(stack--);
@@ -915,7 +918,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (!m)
goto jump_relative;
debug("not taken");
-@@ -1322,81 +1322,81 @@
+@@ -1321,81 +1321,81 @@
case JMPR:
jump_relative:
m = *(stack--);
@@ -1011,7 +1014,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case DIV:
m = *(stack--);
-@@ -1405,46 +1405,46 @@
+@@ -1404,46 +1404,46 @@
*stack = (n << SHIFT) / m;
else
*stack = (n >= 0) ? 0x7ffffff : -0x7ffffff;
@@ -1066,7 +1069,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case ROUND00: case ROUND01:
case ROUND02: case ROUND03:
-@@ -1452,7 +1452,7 @@
+@@ -1451,7 +1451,7 @@
m = *stack;
// XXX: ignore black/gray/white for now
*stack = round(m);
@@ -1075,7 +1078,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
case NROUND00: case NROUND01:
case NROUND02: case NROUND03:
-@@ -1460,11 +1460,11 @@
+@@ -1459,11 +1459,11 @@
m = *stack;
// XXX: ignore black/gray/white for now
*stack = m;
@@ -1089,7 +1092,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
assert(m >= 0 && m < sizeFDefs);
fdefs[m].f = f;
fdefs[m].offset = f->tell();
-@@ -1476,7 +1476,7 @@
+@@ -1475,7 +1475,7 @@
return;
case IDEF:
m = *(stack--);
@@ -1098,7 +1101,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
assert(m >= 0 && m < sizeIDefs);
idefs[m].f = f;
idefs[m].offset = f->tell();
-@@ -1486,7 +1486,7 @@
+@@ -1485,7 +1485,7 @@
case CALL:
{
m = *(stack--);
@@ -1107,7 +1110,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
assert(m >= 0 && m < sizeFDefs);
int ofs = f->tell();
-@@ -1500,7 +1500,7 @@
+@@ -1499,7 +1499,7 @@
{
m = *(stack--);
n = *(stack--);
@@ -1116,7 +1119,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
int ofs = f->tell();
FDefs* fd = &fdefs[m];
-@@ -1524,19 +1524,19 @@
+@@ -1523,19 +1523,19 @@
if (m & GLYPH_STRETCHED)
if (xx != yy)
*stack |= IS_STRETCHED;
@@ -1139,7 +1142,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
f->seekAbsolute(ofs);
}
-@@ -1578,7 +1578,7 @@
+@@ -1574,7 +1574,7 @@
debug("\nskipping...");
for (int depth = 0;;) {
int opc = f->readUByte();
@@ -1148,7 +1151,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
switch (opc) {
case NPUSHB:
opc = f->readUByte() + PUSHB00 - 1;
-@@ -1642,7 +1642,7 @@
+@@ -1637,7 +1637,7 @@
dist = MULDIV(doldp1, dnew21, dold21) - dnewp1;
}
@@ -1157,7 +1160,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
gs.movePoint(pp, dist);
}
-@@ -1653,11 +1653,11 @@
+@@ -1647,11 +1647,11 @@
int dold21 = p2->yold - p1->yold;
int doldp1 = pp->yold - p1->yold;
@@ -1172,7 +1175,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if ((dold21 ^ doldp1) < 0 || doldp1 == 0)
pp->ynow = pp->yold + p1->ynow - p1->yold;
-@@ -1666,11 +1666,11 @@
+@@ -1660,11 +1660,11 @@
pp->ynow = pp->yold + p2->ynow - p2->yold;
else {
int dnew21 = p2->ynow - p1->ynow;
@@ -1185,8 +1188,8 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+ debug2(" -> %d %d\n", pp->xnow, pp->ynow);
}
-
-@@ -1680,11 +1680,11 @@
+ void
+@@ -1673,11 +1673,11 @@
int dold21 = p2->xold - p1->xold;
int doldp1 = pp->xold - p1->xold;
@@ -1201,7 +1204,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if ((dold21 ^ doldp1) < 0 || doldp1 == 0)
pp->xnow = pp->xold + p1->xnow - p1->xold;
-@@ -1693,11 +1693,11 @@
+@@ -1686,11 +1686,11 @@
pp->xnow = pp->xold + p2->xnow - p2->xold;
else {
int dnew21 = p2->xnow - p1->xnow;
@@ -1214,4 +1217,4 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+ debug2(" -> %d %d\n", pp->xnow, pp->ynow);
}
-
+ void
diff --git a/x11/xfstt/patches/patch-aj b/x11/xfstt/patches/patch-aj
index e28ef8cc321..5e03a31d590 100644
--- a/x11/xfstt/patches/patch-aj
+++ b/x11/xfstt/patches/patch-aj
@@ -1,8 +1,11 @@
-$NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-aj,v 1.2 2012/06/13 08:15:14 mef Exp $
---- libfstt/raster_scale.cc.orig Sat Feb 14 22:41:45 2004
-+++ libfstt/raster_scale.cc Sat Feb 14 22:48:38 2004
-@@ -102,8 +102,8 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/raster_scale.cc.orig 2010-10-04 23:22:48.000000000 +0900
++++ libfstt/raster_scale.cc 2011-10-17 12:43:12.000000000 +0900
+@@ -103,8 +103,8 @@
void
Rasterizer::setPointSize(int _xx, int _xy, int _yx, int _yy, int xres, int yres)
{
@@ -13,7 +16,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (!(_xx | _xy) || !(_yx | _yy))
_xx = _yy = 12;
-@@ -135,9 +135,9 @@
+@@ -136,9 +136,9 @@
xx >>= 1; xy >>= 1;
yx >>= 1; yy >>= 1;
}
@@ -26,7 +29,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (ttFont)
applyTransformation();
-@@ -153,7 +153,7 @@
+@@ -154,7 +154,7 @@
Rasterizer::applyTransformation()
{
int emUnits = ttFont->getEmUnits();
@@ -35,7 +38,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
for (; emUnits > 2048 && xxexp > 0; --xxexp)
emUnits >>= 1;
-@@ -168,11 +168,11 @@
+@@ -169,11 +169,11 @@
mppem = (mppemx + mppemy) >> 1;
@@ -51,17 +54,17 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (grid_fitting)
calcCVT();
-@@ -265,7 +265,7 @@
- int
- Rasterizer::putChar8Bitmap(char c, U8 *bmp, U8 *endbmp, GlyphMetrics *gm)
+@@ -267,7 +267,7 @@
+ Rasterizer::putChar8Bitmap(char c, uint8_t *bmp, uint8_t *endbmp,
+ GlyphMetrics *gm)
{
- debug("charNo8 = %d", c);
+ debug1("charNo8 = %d", c);
int glyphNo = ttFont->getGlyphNo8(c);
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
}
-@@ -275,7 +275,7 @@
- Rasterizer::putChar16Bitmap(int c, U8 *bmp, U8 *endbmp, GlyphMetrics *gm)
+@@ -278,7 +278,7 @@
+ GlyphMetrics *gm)
{
int glyphNo = ttFont->getGlyphNo16(c);
- debug("charNo16 = %d", c);
@@ -69,16 +72,16 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
return putGlyphBitmap(glyphNo, bmp, endbmp, gm);
}
-@@ -283,7 +283,7 @@
- int
- Rasterizer::putGlyphBitmap(int glyphNo, U8 *bmp, U8 *endbmp, GlyphMetrics *gm)
+@@ -287,7 +287,7 @@
+ Rasterizer::putGlyphBitmap(int glyphNo, uint8_t *bmp, uint8_t *endbmp,
+ GlyphMetrics *gm)
{
- debug("\n=============== glyphNo %d ==================\n", glyphNo);
+ debug1("\n=============== glyphNo %d ==================\n", glyphNo);
GlyphTable *g = ttFont->glyphTable;
g->setupGlyph(ttFont->points, ttFont->endPoints);
-@@ -374,8 +374,8 @@
+@@ -378,8 +378,8 @@
gm->xAdvance = hdmx;
}
@@ -89,7 +92,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
drawGlyph(bmp, endbmp);
-@@ -400,7 +400,7 @@
+@@ -404,7 +404,7 @@
int val = xmin - lsb;
pp->xold = scaleX(val, 0);
pp->yold = scaleY(0, val);
@@ -98,7 +101,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
pp->xnow = (pp->xold + 32) & -64;
pp->ynow = (pp->yold + 32) & -64;
#if 0
-@@ -408,7 +408,7 @@
+@@ -412,7 +412,7 @@
val = pp->xnow = pp->ynow = 0;
pp->xold = pp->yold = 0;
#endif
@@ -107,9 +110,9 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
// prepare phantom point 1
val += advanceWidth;
-@@ -456,12 +456,12 @@
+@@ -457,12 +457,12 @@
debug("\n=== grid fitted outline ===\n");
- point *pp = p[1];
+ Point *pp = p[1];
for (int i = 0, j = 0; i < nPoints[1] + 2; ++i, ++pp) {
- debug("p[%d]\t%6d %6d ", i, pp->xold, pp->yold);
- debug("-> %6d %6d", pp->xnow, pp->ynow);
@@ -122,5 +125,5 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 22:27:30 kristerw Exp $
- debug(" %c", (pp->flags & ON_CURVE) ? '*' : ' ');
+ debug1(" %c", (pp->flags & ON_CURVE) ? '*' : ' ');
- #ifdef WIN32
- debug(" (%6d %6d)", pp->xgoal, pp->ygoal);
+ debug("\n");
+ if (i == endPoints[j]) {
diff --git a/x11/xfstt/patches/patch-ak b/x11/xfstt/patches/patch-ak
index fd7b089ac75..b3ac04e947e 100644
--- a/x11/xfstt/patches/patch-ak
+++ b/x11/xfstt/patches/patch-ak
@@ -1,8 +1,11 @@
-$NetBSD: patch-ak,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ak,v 1.2 2012/06/13 08:15:15 mef Exp $
---- libfstt/table_cmap.cc.orig Sat Feb 14 22:49:01 2004
-+++ libfstt/table_cmap.cc Sat Feb 14 22:49:28 2004
-@@ -76,7 +76,7 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/table_cmap.cc.orig 2012-03-03 00:33:23.000000000 +0900
++++ libfstt/table_cmap.cc 2012-06-13 11:56:02.000000000 +0900
+@@ -74,7 +74,7 @@
case -1: // no encoding tables
break;
default: // unknown table format
@@ -11,7 +14,7 @@ $NetBSD: patch-ak,v 1.1 2004/02/14 22:27:30 kristerw Exp $
break;
}
}
-@@ -97,7 +97,7 @@
+@@ -95,7 +95,7 @@
return 0;
seekAbsolute(subtableOffset + 6 + unicode);
int glyphNo = readUByte();
@@ -20,21 +23,20 @@ $NetBSD: patch-ak,v 1.1 2004/02/14 22:27:30 kristerw Exp $
return glyphNo;
} else if (format == TRIMMED_MAPPING) {
if ((unicode < f6FirstCode)
-@@ -200,7 +200,7 @@
+@@ -202,7 +202,7 @@
seekAbsolute(subtableOffset + 16 + (f4NSegments << 1));
- U16 i = readUShort();
+ uint16_t i = readUShort();
- debug("First Unicode = %d\n", i);
+ debug1("First Unicode = %d\n", i);
return i;
}
-@@ -216,7 +216,7 @@
+@@ -220,6 +220,6 @@
seekAbsolute(subtableOffset + 14 + ((f4NSegments - 2) << 1));
- U16 i = readUShort();
+ uint16_t i = readUShort();
- debug("Last Unicode = %d\n", i);
+ debug1("Last Unicode = %d\n", i);
return i;
}
-
diff --git a/x11/xfstt/patches/patch-al b/x11/xfstt/patches/patch-al
index ab7d81156a0..4eb9e357498 100644
--- a/x11/xfstt/patches/patch-al
+++ b/x11/xfstt/patches/patch-al
@@ -1,4 +1,7 @@
-$NetBSD: patch-al,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-al,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_ebdt.cc.orig Sat Feb 14 22:50:02 2004
+++ libfstt/table_ebdt.cc Sat Feb 14 22:50:21 2004
diff --git a/x11/xfstt/patches/patch-am b/x11/xfstt/patches/patch-am
index 6a9f9d7cb36..c1f8c2b637c 100644
--- a/x11/xfstt/patches/patch-am
+++ b/x11/xfstt/patches/patch-am
@@ -1,4 +1,7 @@
-$NetBSD: patch-am,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-am,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_eblc.cc.orig Sat Feb 14 22:50:50 2004
+++ libfstt/table_eblc.cc Sat Feb 14 22:52:29 2004
diff --git a/x11/xfstt/patches/patch-an b/x11/xfstt/patches/patch-an
index bdcca8e70b4..b02895687f9 100644
--- a/x11/xfstt/patches/patch-an
+++ b/x11/xfstt/patches/patch-an
@@ -1,4 +1,7 @@
-$NetBSD: patch-an,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-an,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_gasp.cc.orig Sat Feb 14 22:55:38 2004
+++ libfstt/table_gasp.cc Sat Feb 14 22:55:52 2004
diff --git a/x11/xfstt/patches/patch-ao b/x11/xfstt/patches/patch-ao
index 29871ea57fd..38735d5df62 100644
--- a/x11/xfstt/patches/patch-ao
+++ b/x11/xfstt/patches/patch-ao
@@ -1,4 +1,7 @@
-$NetBSD: patch-ao,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ao,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_glyf.cc.orig Sat Feb 14 22:56:09 2004
+++ libfstt/table_glyf.cc Sat Feb 14 22:56:19 2004
diff --git a/x11/xfstt/patches/patch-ap b/x11/xfstt/patches/patch-ap
index b43103538a4..80adbeb8942 100644
--- a/x11/xfstt/patches/patch-ap
+++ b/x11/xfstt/patches/patch-ap
@@ -1,4 +1,7 @@
-$NetBSD: patch-ap,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ap,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_hdmx.cc.orig Sat Feb 14 22:56:47 2004
+++ libfstt/table_hdmx.cc Sat Feb 14 22:57:11 2004
diff --git a/x11/xfstt/patches/patch-aq b/x11/xfstt/patches/patch-aq
index 1947902b9ea..c4c1f35deac 100644
--- a/x11/xfstt/patches/patch-aq
+++ b/x11/xfstt/patches/patch-aq
@@ -1,12 +1,14 @@
-$NetBSD: patch-aq,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-aq,v 1.2 2012/06/13 08:15:15 mef Exp $
---- libfstt/table_hmtx.cc.orig Sat Feb 14 22:57:32 2004
-+++ libfstt/table_hmtx.cc Sat Feb 14 22:57:41 2004
-@@ -41,6 +41,6 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/table_hmtx.cc.orig 2012-03-03 00:33:23.000000000 +0900
++++ libfstt/table_hmtx.cc 2012-06-13 11:57:37.000000000 +0900
+@@ -39,5 +39,5 @@
*advWidth = readUShort();
}
*lsdBear = readSShort();
- debug("hmtx(%d) = {%d, %d}\n", glyphNo, *advWidth, *lsdBear);
+ debug3("hmtx(%d) = {%d, %d}\n", glyphNo, *advWidth, *lsdBear);
}
-
diff --git a/x11/xfstt/patches/patch-ar b/x11/xfstt/patches/patch-ar
index 21b384986ec..f786ecfd976 100644
--- a/x11/xfstt/patches/patch-ar
+++ b/x11/xfstt/patches/patch-ar
@@ -1,4 +1,7 @@
-$NetBSD: patch-ar,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-ar,v 1.2 2012/06/13 08:15:15 mef Exp $
+
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
--- libfstt/table_ltsh.cc.orig Sat Feb 14 22:58:03 2004
+++ libfstt/table_ltsh.cc Sat Feb 14 22:58:12 2004
diff --git a/x11/xfstt/patches/patch-as b/x11/xfstt/patches/patch-as
index 60b33a34f87..44467d75add 100644
--- a/x11/xfstt/patches/patch-as
+++ b/x11/xfstt/patches/patch-as
@@ -1,27 +1,30 @@
-$NetBSD: patch-as,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-as,v 1.2 2012/06/13 08:15:15 mef Exp $
---- libfstt/ttf.h.orig Sat Feb 14 22:04:00 2004
-+++ libfstt/ttf.h Sat Feb 14 22:55:14 2004
-@@ -49,10 +49,21 @@
- #endif
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/ttf.h.orig 2010-10-04 23:22:48.000000000 +0900
++++ libfstt/ttf.h 2011-10-17 12:57:55.000000000 +0900
+@@ -47,10 +47,21 @@
+ using std::string;
#ifndef DEBUG
--# define debug(format, ...)
-+# define debug(format)
-+# define debug1(format, X1)
-+# define debug2(format, X1, X2)
-+# define debug3(format, X1, X2, X3)
-+# define debug4(format, X1, X2, X3, X4)
-+# define debug5(format, X1, X2, X3, X4, X5)
+-# define debug(format, ...) while (0) { }
++# define debug(format) while (0) { }
++# define debug1(format, X1) while (0) { }
++# define debug2(format, X1, X2) while (0) { }
++# define debug3(format, X1, X2, X3) while (0) { }
++# define debug4(format, X1, X2, X3, X4) while (0) { }
++# define debug5(format, X1, X2, X3, X4, X5) while (0) { }
# define STATIC static
#else
--# define debug(format, ...) fprintf(outfile, format, ##__VA_ARGS__)
-+# define debug(format) fprintf(outfile, format)
-+# define debug1(format, X1) fprintf(outfile, format, X1)
-+# define debug2(format, X1, X2) fprintf(outfile, format, X1, X2)
-+# define debug3(format, X1, X2, X3) fprintf(outfile, format, X1, X2, X3)
-+# define debug4(format, X1, X2, X3, X4) fprintf(outfile, format, X1, X2, X3, X4)
-+# define debug5(format, X1, X2, X3, X4, X5) fprintf(outfile, format, X1, X2, X3, X4, X5)
+-# define debug(format, ...) fprintf(stderr, format, ##__VA_ARGS__)
++# define debug(format) fprintf(stderr, format)
++# define debug1(format, X1) fprintf(stderr, format, X1)
++# define debug2(format, X1, X2) fprintf(stderr, format, X1, X2)
++# define debug3(format, X1, X2, X3) fprintf(stderr, format, X1, X2, X3)
++# define debug4(format, X1, X2, X3, X4) fprintf(stderr, format, X1, X2, X3, X4)
++# define debug5(format, X1, X2, X3, X4, X5) fprintf(stderr, format, X1, X2, X3, X4, X5)
+# defube debug4(
# define STATIC
#endif
diff --git a/x11/xfstt/patches/patch-at b/x11/xfstt/patches/patch-at
index e9be7e93ef4..c6cbbb948f6 100644
--- a/x11/xfstt/patches/patch-at
+++ b/x11/xfstt/patches/patch-at
@@ -1,8 +1,11 @@
-$NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $
+$NetBSD: patch-at,v 1.2 2012/06/13 08:15:15 mef Exp $
---- libfstt/ttfont.cc.orig Thu Aug 7 08:20:44 2003
-+++ libfstt/ttfont.cc Sat Feb 14 23:17:22 2004
-@@ -37,7 +37,7 @@
+Convert varargs-macros to old-style macros, to make the package
+compile when using gcc 2.95.
+
+--- libfstt/ttfont.cc.orig 2010-10-04 23:22:48.000000000 +0900
++++ libfstt/ttfont.cc 2011-10-17 13:02:01.000000000 +0900
+@@ -35,7 +35,7 @@
ebdtTable(0), eblcTable(0),
mortTable(0), vheaTable(0)
{
@@ -11,7 +14,7 @@ $NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $
if (openError())
return;
-@@ -296,7 +296,7 @@
+@@ -286,7 +286,7 @@
maxWidth = headTable->xmax - headTable->xmin;
maxWidth += headTable->emUnits >> 5; // +3%
maxWidth = maxWidth * mppemx / headTable->emUnits;
@@ -20,7 +23,7 @@ $NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
return maxWidth;
-@@ -317,7 +317,7 @@
+@@ -307,7 +307,7 @@
// XXX: width = getMaxWidth(mppemx):
width += headTable->emUnits >> 5; // +3%
width = width * mppemx / headTable->emUnits;
@@ -29,26 +32,26 @@ $NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $
}
return width;
-@@ -352,7 +352,7 @@
- U8 *headTable = 0;
+@@ -343,7 +343,7 @@
+ uint8_t *headTable = 0;
int nTables = (buf[4] << 8) + buf[5];
- debug("nTables = %d\n", nTables);
+ debug1("nTables = %d\n", nTables);
for (int i = 0; i < nTables; ++i) {
- U8 *b = &buf[12 + i * 16];
-@@ -361,24 +361,24 @@
+ uint8_t *b = &buf[12 + i * 16];
+@@ -352,24 +352,24 @@
int length = (b[12] << 24) + (b[13] << 16) + (b[14] << 8) + b[15];
int check = checksum(buf + offset, length);
- debug("offset = %08X, length = %08X\n", offset, length);
+ debug2("offset = %08X, length = %08X\n", offset, length);
- b[4] = (U8)(check >> 24);
- b[5] = (U8)(check >> 16);
- b[6] = (U8)(check >> 8);
- b[7] = (U8)check;
+ b[4] = (uint8_t)(check >> 24);
+ b[5] = (uint8_t)(check >> 16);
+ b[6] = (uint8_t)(check >> 8);
+ b[7] = (uint8_t)check;
- debug("checksum[%d] = %08X\n", i, check);
+ debug2("checksum[%d] = %08X\n", i, check);
@@ -65,19 +68,11 @@ $NetBSD: patch-at,v 1.1 2004/02/14 22:27:30 kristerw Exp $
- debug("csAdjust = %08X\n", check);
+ debug1("csAdjust = %08X\n", check);
- headTable[8] = (U8)(check >> 24);
- headTable[9] = (U8)(check >> 16);
-@@ -458,14 +458,14 @@
- xlfd += "-normal-" + strSubFamily + '-';
-
- for (i = xlfd.begin(); i < xlfd.end(); i++)
-- *i = std::tolower(*i);
-+ *i = tolower(*i);
+ headTable[8] = (uint8_t)(check >> 24);
+ headTable[9] = (uint8_t)(check >> 16);
+@@ -437,7 +437,7 @@
- if (p_strFamily)
- delete p_strFamily;
- if (p_strSubFamily)
- delete p_strSubFamily;
+ std::transform(xlfd.begin(), xlfd.end(), xlfd.begin(), char_tolower);
- debug("xlfd = \"%s\"\n", xlfd.c_str());
+ debug1("xlfd = \"%s\"\n", xlfd.c_str());