summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2014-09-27 17:42:16 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2014-09-27 17:42:16 +0000
commit51b0f9ed188811d70f54ebfa527706d8fc346184 (patch)
tree48e9483d968453ba1b7d3e2626b10bb6d9ee4c29 /lib
parent23b49e80e5298d9e6bb8f43778cff767717d93ea (diff)
Update to libXfont 1.5.0
Tested together with xserver 1.16.1 by naddy@, jsg@ & kettenis@
Diffstat (limited to 'lib')
-rw-r--r--lib/libXfont/ChangeLog228
-rw-r--r--lib/libXfont/Makefile.bsd-wrapper4
-rw-r--r--lib/libXfont/README6
-rw-r--r--lib/libXfont/configure74
-rw-r--r--lib/libXfont/configure.ac44
-rw-r--r--lib/libXfont/include/X11/fonts/fntfil.h14
-rw-r--r--lib/libXfont/include/X11/fonts/fontmisc.h2
-rw-r--r--lib/libXfont/src/FreeType/ftfuncs.c2
-rw-r--r--lib/libXfont/src/Makefile.am2
-rw-r--r--lib/libXfont/src/Makefile.in2
-rw-r--r--lib/libXfont/src/bitmap/Makefile.am24
-rw-r--r--lib/libXfont/src/bitmap/Makefile.in35
-rw-r--r--lib/libXfont/src/bitmap/bitmap.c6
-rw-r--r--lib/libXfont/src/bitmap/bitmapfunc.c31
-rw-r--r--lib/libXfont/src/bitmap/bitscale.c26
-rw-r--r--lib/libXfont/src/builtins/builtin.h4
-rw-r--r--lib/libXfont/src/builtins/dir.c2
-rw-r--r--lib/libXfont/src/builtins/file.c2
-rw-r--r--lib/libXfont/src/builtins/fpe.c2
-rw-r--r--lib/libXfont/src/fc/fsconvert.c2
-rw-r--r--lib/libXfont/src/fc/fserve.c28
-rw-r--r--lib/libXfont/src/fc/fserve.h2
-rw-r--r--lib/libXfont/src/fontfile/catalogue.c26
-rw-r--r--lib/libXfont/src/fontfile/dirfile.c4
-rw-r--r--lib/libXfont/src/fontfile/fontfile.c16
-rw-r--r--lib/libXfont/src/fontfile/renderers.c6
-rw-r--r--lib/libXfont/src/stubs/Makefile.am2
-rw-r--r--lib/libXfont/src/stubs/Makefile.in10
-rw-r--r--lib/libXfont/src/stubs/cauthgen.c5
-rw-r--r--lib/libXfont/src/stubs/csignal.c5
-rw-r--r--lib/libXfont/src/stubs/delfntcid.c5
-rw-r--r--lib/libXfont/src/stubs/errorf.c5
-rw-r--r--lib/libXfont/src/stubs/fatalerror.c9
-rw-r--r--lib/libXfont/src/stubs/findoldfnt.c5
-rw-r--r--lib/libXfont/src/stubs/getcres.c5
-rw-r--r--lib/libXfont/src/stubs/getdefptsize.c5
-rw-r--r--lib/libXfont/src/stubs/getnewfntcid.c5
-rw-r--r--lib/libXfont/src/stubs/gettime.c5
-rw-r--r--lib/libXfont/src/stubs/initfshdl.c5
-rw-r--r--lib/libXfont/src/stubs/regfpefunc.c4
-rw-r--r--lib/libXfont/src/stubs/rmfshdl.c1
-rw-r--r--lib/libXfont/src/stubs/servclient.c13
-rw-r--r--lib/libXfont/src/stubs/setfntauth.c5
-rw-r--r--lib/libXfont/src/stubs/stfntcfnt.c5
-rw-r--r--lib/libXfont/src/stubs/stubs.h49
-rw-r--r--lib/libXfont/src/util/atom.c4
-rw-r--r--lib/libXfont/src/util/miscutil.c12
-rw-r--r--lib/libXfont/src/util/patcache.c14
48 files changed, 549 insertions, 223 deletions
diff --git a/lib/libXfont/ChangeLog b/lib/libXfont/ChangeLog
index 201ab8a11..2d5c38345 100644
--- a/lib/libXfont/ChangeLog
+++ b/lib/libXfont/ChangeLog
@@ -1,12 +1,129 @@
-commit 6ed205bd618f3f3016e34ab132019d53d0623576
+commit ad4f4d8a2d0730c0ea3c09210bf921638b4682bc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date: Thu May 15 19:21:07 2014 -0700
+Date: Sat Jul 19 09:49:23 2014 -0700
- libXfont 1.4.8
+ libXfont 1.5.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-commit 23a7a10aaada0a4b00272b512bd430545ce799e3
+commit b19cf2a78f7f721c43d0d9e2f32b71fc746142a3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Jul 7 13:18:18 2014 -0700
+
+ libXfont 1.4.99.901
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0dcdd82059c69ec417bb094f4da2afef7cc1426a
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date: Sun Apr 6 14:18:32 2014 -0500
+
+ Make shared library work on Cygwin/MinGW
+
+ Weak symbols on PE platforms do not work the same way as on ELF
+ platforms, hence we have been unable to have a fully functional shared
+ libXfont until now. This patch works around these issues so that we
+ can fix that.
+
+ In summary, only when compiling shared libraries on NO_WEAK_SYMBOLS
+ platforms, when the first stub is called, the invoking program is first
+ checked to determine if it exports the stubbed functions. Then, for
+ every stub call, if the function is exported by the loader, it is called
+ instead of the stub code.
+
+ serverClient and serverGeneration are data pointers, and therefore are
+ replaced by getter functions. ErrorF is variadic, so the override is
+ routed through VErrorF instead. FatalError has no va_list equivalent,
+ but it is not actually used in libXfont and therefore should be safe to
+ remove.
+
+ This requires all X servers to export their symbols, which requires
+ forthcoming patches for hw/xwin and xfs; the other xservers (including
+ tigervnc) already do this via LD_EXPORT_SYMBOLS_FLAG.
+
+ Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+ Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 783a406d6258509abfbdc54c0b32366dcaf13044
+Author: Keith Packard <keithp@keithp.com>
+Date: Mon Apr 21 13:37:00 2014 -0700
+
+ Use default glyphs when getting 16-bit font with 8-bit text
+
+ When accessing a 16-bit font with firstRow > 0 with 8-bit text, check
+ to see if the font has a default character and return that for every
+ incoming character.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+ Reviewed-by: Eric Anholt <eric@anholt.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e8d20171fe04dbdc5f97739d5a59e02f0b091ba0
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu May 15 23:04:23 2014 -0700
+
+ Don't build unused code in bitmapfunc.c if all bitmap formats are disabled
+
+ If the only bitmaps we support are builtins, don't need the code to
+ register all the bitmap font file handlers.
+
+ Fixes gcc warnings:
+ bitmapfunc.c:110:1: warning: 'BitmapOpenBitmap' defined but not used [-Wunused-function]
+ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
+ ^
+ bitmapfunc.c:155:1: warning: 'BitmapGetInfoBitmap' defined but not used [-Wunused-function]
+ BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+ ^
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Rémi Cardona <remi@gentoo.org>
+
+commit c2b7758d268fd98e09c3e66a0e7717b47ff12a47
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu May 15 22:44:38 2014 -0700
+
+ Don't compile bitmap source files for disabled formats
+
+ pcfread.c is a special case - it's needed for either reading pcf files
+ from disk (--enable-pcfformat) or from the builtin fonts in memory
+ (--enable-builtins), so needed a new AM_CONDITIONAL case.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Rémi Cardona <remi@gentoo.org>
+
+commit a81f1a9bd3cd0a9d45d93d5b9e392b4e08ac60f7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu May 15 20:43:34 2014 -0700
+
+ Drop imake/monolithic compatibility #define mapping
+
+ Require the #defines from configure.ac now that we're not sharing source
+ with the imake builds any longer.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Rémi Cardona <remi@gentoo.org>
+
+commit 37595cfd4feaf031552d66f96dc6d58686f9c851
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu May 15 20:26:41 2014 -0700
+
+ Change default to disabling SNF support
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Rémi Cardona <remi@gentoo.org>
+
+commit 9f677e55c7bf07df280427f127af21e5b70f1e03
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu May 15 20:21:29 2014 -0700
+
+ Use AS_HELP_STRING to provide help for AC_ARG_ENABLE & AC_ARG_WITH options
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Rémi Cardona <remi@gentoo.org>
+
+commit d338f81df1e188eb16e1d6aeea7f4800f89c1218
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri May 2 19:24:17 2014 -0700
@@ -18,9 +135,8 @@ Date: Fri May 2 19:24:17 2014 -0700
bound reads when looping over these items in the reply.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
- (cherry picked from commit d338f81df1e188eb16e1d6aeea7f4800f89c1218)
-commit a455f111eb2779e3258d49c1c003d3023d1b9bab
+commit 5fa73ac18474be3032ee7af9c6e29deab163ea39
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri May 2 19:24:17 2014 -0700
@@ -32,9 +148,8 @@ Date: Fri May 2 19:24:17 2014 -0700
over the strings in the reply.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
- (cherry picked from commit 5fa73ac18474be3032ee7af9c6e29deab163ea39)
-commit 2b7b6f21ec67c2e4fdc3cee9db3199a6edef5c5c
+commit 520683652564c2a4e42328ae23eef9bb63271565
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:03:24 2014 -0700
@@ -49,9 +164,8 @@ Date: Fri Apr 25 23:03:24 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 520683652564c2a4e42328ae23eef9bb63271565)
-commit 573c3fdcb934ca1f3243f6ced40e1f037ea6cefe
+commit a3f21421537620fc4e1f844a594a4bcd9f7e2bd8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:03:05 2014 -0700
@@ -65,9 +179,8 @@ Date: Fri Apr 25 23:03:05 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit a3f21421537620fc4e1f844a594a4bcd9f7e2bd8)
-commit 4b762a7eb73d4d84466331be2d48565561018fc1
+commit a42f707f8a62973f5e8bbcd08afb10a79e9cee33
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:54 2014 -0700
@@ -81,9 +194,8 @@ Date: Fri Apr 25 23:02:54 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit a42f707f8a62973f5e8bbcd08afb10a79e9cee33)
-commit e6d9db84113650c4f4d9bebddb60cdb72690d798
+commit c578408c1fd4db09e4e3173f8a9e65c81cc187c1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:42 2014 -0700
@@ -98,9 +210,8 @@ Date: Fri Apr 25 23:02:42 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit c578408c1fd4db09e4e3173f8a9e65c81cc187c1)
-commit fb4ecda3014744fa690959da9c5b09233b73c016
+commit 491291cabf78efdeec8f18b09e14726a9030cc8f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:34 2014 -0700
@@ -115,9 +226,8 @@ Date: Fri Apr 25 23:02:34 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 491291cabf78efdeec8f18b09e14726a9030cc8f)
-commit 633005ac24a44dacaf6beb3ed240ae0ea7e022d7
+commit 0f1a5d372c143f91a602bdf10c917d7eabaee09b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:25 2014 -0700
@@ -142,9 +252,8 @@ Date: Fri Apr 25 23:02:25 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 0f1a5d372c143f91a602bdf10c917d7eabaee09b)
-commit 647d9ea15e34779afa442d362997d92488778907
+commit cbb64aef35960b2882be721f4b8fbaa0fb649d12
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:12 2014 -0700
@@ -158,9 +267,8 @@ Date: Fri Apr 25 23:02:12 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit cbb64aef35960b2882be721f4b8fbaa0fb649d12)
-commit 23dcf6b1da8b5088856aef12b4a3f4581836f63a
+commit 891e084b26837162b12f841060086a105edde86d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:02:00 2014 -0700
@@ -179,9 +287,8 @@ Date: Fri Apr 25 23:02:00 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 891e084b26837162b12f841060086a105edde86d)
-commit 26643c0c3f4e53945516e20e00dfbb4d69a39c65
+commit 05c8020a49416dd8b7510cbba45ce4f3fc81a7dc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:01:48 2014 -0700
@@ -202,9 +309,8 @@ Date: Fri Apr 25 23:01:48 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 05c8020a49416dd8b7510cbba45ce4f3fc81a7dc)
-commit 0a37bf2d9977db81573f300b0dc203df8fe108b5
+commit 2f5e57317339c526e6eaee1010b0e2ab8089c42e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 25 23:01:11 2014 -0700
@@ -225,18 +331,32 @@ Date: Fri Apr 25 23:01:11 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
- (cherry picked from commit 2f5e57317339c526e6eaee1010b0e2ab8089c42e)
-commit c1ccb7d4eb34c99178ace3956768abfb4cf866fd
+commit 2a5111af9e03a55bd099c6c3a5b9a7fd3dfce76f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Apr 24 22:11:08 2014 -0700
+
+ fs_send_open_font needs to allow namelen of 0 when FontReopen is set
+
+ When _fs_load_glyphs calls fs_send_open_font with FontReopen set, it
+ passes a NULL name and namelen of 0, since fs_send_open_font is going
+ to reuse the previous name.
+
+ This overly restrictive check was added in XFree86 4.3.99.12:
+ http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c.diff?r1=3.23&r2=3.24
+ http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c?rev=3.24&content-type=text/vnd.viewcvs-markup
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 77902e1422315963364fcba3736ff9b5b0f32d47
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Apr 22 23:49:29 2014 -0700
Clean up warnings when src/fc is built with -DDEBUG
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
- (cherry picked from commit 77902e1422315963364fcba3736ff9b5b0f32d47)
-commit e9a07053d2b5aa55634c2bb2fd080fae77020e3c
+commit f75f7bde4cedc36d5ca1289988b3daebb80528d2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Apr 22 23:45:41 2014 -0700
@@ -246,15 +366,28 @@ Date: Tue Apr 22 23:45:41 2014 -0700
-DDEBUG to CPPFLAGS when building.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
- (cherry picked from commit f75f7bde4cedc36d5ca1289988b3daebb80528d2)
-commit 9b41f3d0c7c430a2909c9455eff347e714f0c4b4
+commit 21f5d3ec9d833b8bce08d0749b8001e1e88544ac
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Apr 21 22:05:20 2014 -0700
+
+ Bump version to 1.4.99.0 for master branch (to become 1.5)
+
+ libXfont 1.5.0 will be synchronized with the fontsproto 2.1.3 API
+ changes needed for xorg-server 1.16 branch.
+
+ libXfont 1.4.x will be left for stable release branch for older
+ Xserver releases.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5a398a55ccdd92d0ff05793692ef8e57f3a50198
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 20 18:10:07 2014 -0700
- Require fontsproto < 2.1.3 for matching function prototypes
+ Require fontsproto 2.1.3 for matching function prototypes
- Building libXfont-1.4.x against fontsproto 2.1.3 causes clang
+ Building current libXfont git against fontsproto 2.1.2 causes clang
complaints of:
patcache.c:130:1: error: conflicting types for 'CacheFontPattern'
@@ -269,7 +402,7 @@ Date: Sun Apr 20 18:10:07 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
-commit 371f8582a33235afa1b61d76e4fe98bdc9d7c083
+commit c77a0784bdfc8c178f0742689cf6ae02a2fce37f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 20 17:59:14 2014 -0700
@@ -284,9 +417,8 @@ Date: Sun Apr 20 17:59:14 2014 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
- (cherry picked from commit c77a0784bdfc8c178f0742689cf6ae02a2fce37f)
-commit 5bb34807642589e5b592b04418855fd059fc5022
+commit c8855746aec2a9b732502da0ca3258b4e701c61a
Author: Peter Harris <pharris@opentext.com>
Date: Mon Apr 7 14:25:02 2014 -0400
@@ -297,7 +429,27 @@ Date: Mon Apr 7 14:25:02 2014 -0400
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
- (cherry picked from commit c8855746aec2a9b732502da0ca3258b4e701c61a)
+
+commit a96cc1f032a059da89319ceccb6659c8edd446fb
+Author: Keith Packard <keithp@keithp.com>
+Date: Fri Nov 15 21:46:15 2013 +0900
+
+ Warning fixes.
+
+ Many const char issues.
+
+ One extra 'i' declared in ScaleFont; we can just use the same 'i' as
+ exists at the top level scope.
+
+ Also ignore bad-function-cast in ftfuncs.c and bitscale.c because
+ we're casting the return value from floor or ceil from double to
+ int. As floor and ceil are kinda designed to generate integer results,
+ it's pretty clear that we're doing what we want and that the compiler
+ is generating noise. I'm not sure why bad-function-cast is ever a good
+ warning to turn on, but I'll leave that for another day.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+ Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
commit 2a3429413df27224ceeddd22500ce43b5431d698
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/lib/libXfont/Makefile.bsd-wrapper b/lib/libXfont/Makefile.bsd-wrapper
index d05e33a47..37bd3d185 100644
--- a/lib/libXfont/Makefile.bsd-wrapper
+++ b/lib/libXfont/Makefile.bsd-wrapper
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.12 2014/01/07 20:42:20 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.13 2014/09/27 17:42:14 matthieu Exp $
.include <bsd.xconf.mk>
-SHARED_LIBS= Xfont 11.0
+SHARED_LIBS= Xfont 12.0
CONFIGURE_ARGS+= --with-xmlto=no
diff --git a/lib/libXfont/README b/lib/libXfont/README
index 65f1aa437..c95c3cf1f 100644
--- a/lib/libXfont/README
+++ b/lib/libXfont/README
@@ -43,9 +43,9 @@ configure script takes various options to enable or disable them:
snf bitmap fonts - standard bitmap font format prior to X11R5 in 1991,
remains only for backwards compatibility. Unlike pcf, snf files
are architecture specific, and contain less font information
- than pcf files. snf fonts are deprecated and may be disabled
- by default in future libXfont releases.
- Enabled by default, disable via --disable-snfformat.
+ than pcf files. snf fonts are deprecated and support for them
+ may be removed in future libXfont releases.
+ Disabled by default, enable via --disable-snfformat.
-- Font services:
diff --git a/lib/libXfont/configure b/lib/libXfont/configure
index bae818c25..2ea839610 100644
--- a/lib/libXfont/configure
+++ b/lib/libXfont/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libXfont 1.4.8.
+# Generated by GNU Autoconf 2.69 for libXfont 1.5.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -651,8 +651,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libXfont'
PACKAGE_TARNAME='libXfont'
-PACKAGE_VERSION='1.4.8'
-PACKAGE_STRING='libXfont 1.4.8'
+PACKAGE_VERSION='1.5.0'
+PACKAGE_STRING='libXfont 1.5.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -711,6 +711,8 @@ XFONT_SNFFORMAT_FALSE
XFONT_SNFFORMAT_TRUE
XFONT_BDFFORMAT_FALSE
XFONT_BDFFORMAT_TRUE
+XFONT_PCF_OR_BUILTIN_FALSE
+XFONT_PCF_OR_BUILTIN_TRUE
XFONT_PCFFORMAT_FALSE
XFONT_PCFFORMAT_TRUE
XFONT_BUILTINS_FALSE
@@ -1462,7 +1464,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libXfont 1.4.8 to adapt to many kinds of systems.
+\`configure' configures libXfont 1.5.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1532,7 +1534,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libXfont 1.4.8:";;
+ short | recursive ) echo "Configuration of libXfont 1.5.0:";;
esac
cat <<\_ACEOF
@@ -1559,12 +1561,13 @@ Optional Features:
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-devel-docs Enable building the developer documentation
(default: yes)
- --disable-freetype
- --disable-builtins
- --disable-pcfformat
- --disable-bdfformat
- --disable-snfformat
- --disable-fc
+ --disable-freetype Build freetype backend (default: enabled)
+ --disable-builtins Support builtin fonts (default: enabled)
+ --disable-pcfformat Support PCF format bitmap fonts (default: enabled)
+ --disable-bdfformat Support BDF format bitmap fonts (default: enabled)
+ --enable-snfformat Support SNF format bitmap fonts (default: disabled)
+ --disable-fc Support connections to xfs servers (default:
+ enabled)
--enable-unix-transport Enable UNIX domain socket transport
--enable-tcp-transport Enable TCP socket transport
--enable-ipv6 Enable IPv6 support
@@ -1582,8 +1585,10 @@ Optional Packages:
--with-xmlto Use xmlto to regenerate documentation (default:
auto)
--with-fop Use fop to regenerate documentation (default: auto)
- --with-freetype-config=PROG Use FreeType configuration program PROG
- --with-bzip2 Support bzip2 compressed bitmap fonts
+ --with-freetype-config=PROG
+ Use FreeType configuration program PROG
+ --with-bzip2 Use libbz2 to support bzip2 compressed bitmap fonts
+ (default: no)
Some influential environment variables:
CC C compiler command
@@ -1675,7 +1680,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libXfont configure 1.4.8
+libXfont configure 1.5.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2201,7 +2206,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libXfont $as_me 1.4.8, which was
+It was created by libXfont $as_me 1.5.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3030,7 +3035,7 @@ fi
# Define the identity of the package.
PACKAGE='libXfont'
- VERSION='1.4.8'
+ VERSION='1.5.0'
cat >>confdefs.h <<_ACEOF
@@ -18762,6 +18767,15 @@ $as_echo "#define XFONT_PCFFORMAT 1" >>confdefs.h
XFONT_BITMAP=yes
fi
+ if test "x$XFONT_PCFFORMAT" = xyes -o "x$XFONT_BUILTINS" = xyes; then
+ XFONT_PCF_OR_BUILTIN_TRUE=
+ XFONT_PCF_OR_BUILTIN_FALSE='#'
+else
+ XFONT_PCF_OR_BUILTIN_TRUE='#'
+ XFONT_PCF_OR_BUILTIN_FALSE=
+fi
+
+
# Check whether --enable-bdfformat was given.
if test "${enable_bdfformat+set}" = set; then :
enableval=$enable_bdfformat; XFONT_BDFFORMAT=$enableval
@@ -18788,7 +18802,7 @@ fi
if test "${enable_snfformat+set}" = set; then :
enableval=$enable_snfformat; XFONT_SNFFORMAT=$enableval
else
- XFONT_SNFFORMAT=yes
+ XFONT_SNFFORMAT=no
fi
if test "x$XFONT_SNFFORMAT" = xyes; then
@@ -18914,12 +18928,12 @@ if test -n "$XFONT_CFLAGS"; then
pkg_cv_XFONT_CFLAGS="$XFONT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto < 2.1.3 fontenc\""; } >&5
- ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto < 2.1.3 fontenc") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto >= 2.1.3 fontenc\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto >= 2.1.3 fontenc") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XFONT_CFLAGS=`$PKG_CONFIG --cflags "xproto xtrans fontsproto < 2.1.3 fontenc" 2>/dev/null`
+ pkg_cv_XFONT_CFLAGS=`$PKG_CONFIG --cflags "xproto xtrans fontsproto >= 2.1.3 fontenc" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18931,12 +18945,12 @@ if test -n "$XFONT_LIBS"; then
pkg_cv_XFONT_LIBS="$XFONT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto < 2.1.3 fontenc\""; } >&5
- ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto < 2.1.3 fontenc") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto xtrans fontsproto >= 2.1.3 fontenc\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "xproto xtrans fontsproto >= 2.1.3 fontenc") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XFONT_LIBS=`$PKG_CONFIG --libs "xproto xtrans fontsproto < 2.1.3 fontenc" 2>/dev/null`
+ pkg_cv_XFONT_LIBS=`$PKG_CONFIG --libs "xproto xtrans fontsproto >= 2.1.3 fontenc" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18957,14 +18971,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- XFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto xtrans fontsproto < 2.1.3 fontenc" 2>&1`
+ XFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto xtrans fontsproto >= 2.1.3 fontenc" 2>&1`
else
- XFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto xtrans fontsproto < 2.1.3 fontenc" 2>&1`
+ XFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto xtrans fontsproto >= 2.1.3 fontenc" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$XFONT_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (xproto xtrans fontsproto < 2.1.3 fontenc) were not met:
+ as_fn_error $? "Package requirements (xproto xtrans fontsproto >= 2.1.3 fontenc) were not met:
$XFONT_PKG_ERRORS
@@ -19504,6 +19518,10 @@ if test -z "${XFONT_PCFFORMAT_TRUE}" && test -z "${XFONT_PCFFORMAT_FALSE}"; then
as_fn_error $? "conditional \"XFONT_PCFFORMAT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${XFONT_PCF_OR_BUILTIN_TRUE}" && test -z "${XFONT_PCF_OR_BUILTIN_FALSE}"; then
+ as_fn_error $? "conditional \"XFONT_PCF_OR_BUILTIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${XFONT_BDFFORMAT_TRUE}" && test -z "${XFONT_BDFFORMAT_FALSE}"; then
as_fn_error $? "conditional \"XFONT_BDFFORMAT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19921,7 +19939,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libXfont $as_me 1.4.8, which was
+This file was extended by libXfont $as_me 1.5.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19987,7 +20005,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libXfont config.status 1.4.8
+libXfont config.status 1.5.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/lib/libXfont/configure.ac b/lib/libXfont/configure.ac
index ea3368442..471b266aa 100644
--- a/lib/libXfont/configure.ac
+++ b/lib/libXfont/configure.ac
@@ -21,7 +21,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXfont], [1.4.8],
+AC_INIT([libXfont], [1.5.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])
@@ -67,11 +67,17 @@ XFONT_FONTFILE=no
# FreeType for all scalable (OpenType, TrueType, PostScript) and
# some bitmap formats (BDF & PCF)
#
-AC_ARG_ENABLE(freetype, [ --disable-freetype],[XFONT_FREETYPE=$enableval],[XFONT_FREETYPE=yes])
+AC_ARG_ENABLE(freetype,
+ AS_HELP_STRING([--disable-freetype],
+ [Build freetype backend (default: enabled)]),
+ [XFONT_FREETYPE=$enableval],[XFONT_FREETYPE=yes])
AM_CONDITIONAL(XFONT_FREETYPE, [test x$XFONT_FREETYPE = xyes])
if test x$XFONT_FREETYPE = xyes; then
AC_DEFINE(XFONT_FREETYPE,1,[Support FreeType rasterizer for nearly all font file formats])
- AC_ARG_WITH(freetype-config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=auto)
+ AC_ARG_WITH(freetype-config,
+ AS_HELP_STRING([--with-freetype-config=PROG],
+ [Use FreeType configuration program PROG]),
+ [freetype_config=$withval], [freetype_config=auto])
if test "$freetype_config" = "auto" ; then
PKG_CHECK_MODULES(FREETYPE, freetype2,
@@ -117,7 +123,7 @@ AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz], AC_MSG_ERROR([*** zlib is required]))
AC_ARG_WITH(bzip2,
AS_HELP_STRING([--with-bzip2],
- [Support bzip2 compressed bitmap fonts]),
+ [Use libbz2 to support bzip2 compressed bitmap fonts (default: no)]),
[], [with_bzip2=no])
if test "x$with_bzip2" = xyes; then
AC_CHECK_LIB(bz2, BZ2_bzopen, [Z_LIBS="$Z_LIBS -lbz2"],
@@ -127,28 +133,43 @@ fi
AM_CONDITIONAL(X_BZIP2_FONT_COMPRESSION, [test "x$with_bzip2" = xyes ])
AC_SUBST(Z_LIBS)
-AC_ARG_ENABLE(builtins, [ --disable-builtins ], [XFONT_BUILTINS=$enableval], [XFONT_BUILTINS=yes])
+AC_ARG_ENABLE(builtins,
+ AS_HELP_STRING([--disable-builtins],
+ [Support builtin fonts (default: enabled)]),
+ [XFONT_BUILTINS=$enableval], [XFONT_BUILTINS=yes])
AM_CONDITIONAL(XFONT_BUILTINS, [test "x$XFONT_BUILTINS" = xyes ])
if test "x$XFONT_BUILTINS" = xyes; then
AC_DEFINE(XFONT_BUILTINS,1,[Support built-in fonts])
XFONT_BITMAP=yes
fi
-AC_ARG_ENABLE(pcfformat, [ --disable-pcfformat ], [XFONT_PCFFORMAT=$enableval], [XFONT_PCFFORMAT=yes])
+AC_ARG_ENABLE(pcfformat,
+ AS_HELP_STRING([--disable-pcfformat],
+ [Support PCF format bitmap fonts (default: enabled)]),
+ [XFONT_PCFFORMAT=$enableval], [XFONT_PCFFORMAT=yes])
AM_CONDITIONAL(XFONT_PCFFORMAT, [test "x$XFONT_PCFFORMAT" = xyes])
if test "x$XFONT_PCFFORMAT" = xyes; then
AC_DEFINE(XFONT_PCFFORMAT,1,[Support pcf format bitmap font files])
XFONT_BITMAP=yes
fi
-AC_ARG_ENABLE(bdfformat, [ --disable-bdfformat ], [XFONT_BDFFORMAT=$enableval], [XFONT_BDFFORMAT=yes])
+AM_CONDITIONAL(XFONT_PCF_OR_BUILTIN,
+ [test "x$XFONT_PCFFORMAT" = xyes -o "x$XFONT_BUILTINS" = xyes])
+
+AC_ARG_ENABLE(bdfformat,
+ AS_HELP_STRING([--disable-bdfformat],
+ [Support BDF format bitmap fonts (default: enabled)]),
+ [XFONT_BDFFORMAT=$enableval], [XFONT_BDFFORMAT=yes])
AM_CONDITIONAL(XFONT_BDFFORMAT, [test "x$XFONT_BDFFORMAT" = xyes])
if test "x$XFONT_BDFFORMAT" = xyes; then
AC_DEFINE(XFONT_BDFFORMAT,1,[Support bdf format bitmap font files])
XFONT_BITMAP=yes
fi
-AC_ARG_ENABLE(snfformat, [ --disable-snfformat ], [XFONT_SNFFORMAT=$enableval], [XFONT_SNFFORMAT=yes])
+AC_ARG_ENABLE(snfformat,
+ AS_HELP_STRING([--enable-snfformat],
+ [Support SNF format bitmap fonts (default: disabled)]),
+ [XFONT_SNFFORMAT=$enableval], [XFONT_SNFFORMAT=no])
AM_CONDITIONAL(XFONT_SNFFORMAT, [test "x$XFONT_SNFFORMAT" = xyes])
if test "x$XFONT_SNFFORMAT" = xyes; then
AC_DEFINE(XFONT_SNFFORMAT,1,[Support snf format bitmap font files])
@@ -170,7 +191,10 @@ fi
# Support connection to font servers?
#
-AC_ARG_ENABLE(fc, [ --disable-fc ],[XFONT_FC=$enableval],[XFONT_FC=yes])
+AC_ARG_ENABLE(fc,
+ AS_HELP_STRING([--disable-fc],
+ [Support connections to xfs servers (default: enabled)]),
+ [XFONT_FC=$enableval],[XFONT_FC=yes])
AM_CONDITIONAL(XFONT_FC, [test "x$XFONT_FC" = xyes])
if test "x$XFONT_FC" = xyes; then
AC_DEFINE(XFONT_FC,1,[Support the X Font Services Protocol])
@@ -180,7 +204,7 @@ fi
AC_CHECK_LIB(m, hypot, [MATH_LIBS=-lm
AC_SUBST(MATH_LIBS)], AC_MSG_ERROR([*** libm is required]))
-PKG_CHECK_MODULES(XFONT, [xproto xtrans fontsproto < 2.1.3 fontenc])
+PKG_CHECK_MODULES(XFONT, [xproto xtrans fontsproto >= 2.1.3 fontenc])
# Transport selection macro from xtrans.m4
XTRANS_CONNECTION_FLAGS
diff --git a/lib/libXfont/include/X11/fonts/fntfil.h b/lib/libXfont/include/X11/fonts/fntfil.h
index a32df63d7..24be79a66 100644
--- a/lib/libXfont/include/X11/fonts/fntfil.h
+++ b/lib/libXfont/include/X11/fonts/fntfil.h
@@ -72,12 +72,12 @@ typedef struct _FontRenderer *FontRendererPtr;
#define FontAliasFile "fonts.alias"
#define FontScalableFile "fonts.scale"
-extern int FontFileNameCheck ( char *name );
+extern int FontFileNameCheck ( const char *name );
extern int FontFileInitFPE ( FontPathElementPtr fpe );
extern int FontFileResetFPE ( FontPathElementPtr fpe );
extern int FontFileFreeFPE ( FontPathElementPtr fpe );
extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe,
- Mask flags, char *name, int namelen,
+ Mask flags, const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
XID id, FontPtr *pFont, char **aliasName,
FontPtr non_cachable_font );
@@ -87,14 +87,14 @@ extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont,
fsBitmapFormat format,
fsBitmapFormatMask fmask );
extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
FontNamesPtr names );
extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep, int mark_aliases );
extern int FontFileStartListFontsWithInfo ( pointer client,
FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep );
extern int FontFileListNextFontWithInfo ( pointer client,
FontPathElementPtr fpe,
@@ -103,7 +103,7 @@ extern int FontFileListNextFontWithInfo ( pointer client,
int *numFonts, pointer private );
extern int FontFileStartListFontsAndAliases ( pointer client,
FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep );
extern int FontFileListNextFontOrAlias ( pointer client,
FontPathElementPtr fpe,
@@ -173,7 +173,7 @@ extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe,
fsBitmapFormatMask fmask,
Bool noSpecificSize );
-extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir );
+extern int FontFileReadDirectory ( const char *directory, FontDirectoryPtr *pdir );
extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir );
#endif /* _FONTFILE_H_ */
diff --git a/lib/libXfont/include/X11/fonts/fontmisc.h b/lib/libXfont/include/X11/fonts/fontmisc.h
index 73a824789..d3926a73e 100644
--- a/lib/libXfont/include/X11/fonts/fontmisc.h
+++ b/lib/libXfont/include/X11/fonts/fontmisc.h
@@ -91,7 +91,7 @@ RepadBitmap (
extern void CopyISOLatin1Lowered(
char * /*dest*/,
- char * /*source*/,
+ const char * /*source*/,
int /*length*/
);
diff --git a/lib/libXfont/src/FreeType/ftfuncs.c b/lib/libXfont/src/FreeType/ftfuncs.c
index bca58188b..a4969d12e 100644
--- a/lib/libXfont/src/FreeType/ftfuncs.c
+++ b/lib/libXfont/src/FreeType/ftfuncs.c
@@ -1069,6 +1069,8 @@ FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index,
#endif
}
+#pragma GCC diagnostic ignored "-Wbad-function-cast"
+
int
FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
FTInstancePtr instance, int hasMetrics)
diff --git a/lib/libXfont/src/Makefile.am b/lib/libXfont/src/Makefile.am
index cd09ab99f..33fd135c1 100644
--- a/lib/libXfont/src/Makefile.am
+++ b/lib/libXfont/src/Makefile.am
@@ -65,4 +65,4 @@ libXfont_la_LIBADD = \
libXfont_la_SOURCES = dummy.c
-libXfont_la_LDFLAGS = -version-number 1:4:1
+libXfont_la_LDFLAGS = -version-number 1:4:1 -no-undefined
diff --git a/lib/libXfont/src/Makefile.in b/lib/libXfont/src/Makefile.in
index 4682991cd..583bae72c 100644
--- a/lib/libXfont/src/Makefile.in
+++ b/lib/libXfont/src/Makefile.in
@@ -385,7 +385,7 @@ libXfont_la_LIBADD = \
$(FREETYPE_LIBS) $(Z_LIBS) $(MATH_LIBS) $(XFONT_LIBS)
libXfont_la_SOURCES = dummy.c
-libXfont_la_LDFLAGS = -version-number 1:4:1
+libXfont_la_LDFLAGS = -version-number 1:4:1 -no-undefined
all: all-recursive
.SUFFIXES:
diff --git a/lib/libXfont/src/bitmap/Makefile.am b/lib/libXfont/src/bitmap/Makefile.am
index 99682d9db..0f2d10a02 100644
--- a/lib/libXfont/src/bitmap/Makefile.am
+++ b/lib/libXfont/src/bitmap/Makefile.am
@@ -6,14 +6,24 @@ AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS)
noinst_LTLIBRARIES = libbitmap.la
libbitmap_la_SOURCES = \
- bdfread.c \
- bdfutils.c \
bitmap.c \
bitmapfunc.c \
bitmaputil.c \
bitscale.c \
- fontink.c \
- pcfread.c \
- pcfwrite.c \
- snfread.c \
- snfstr.h
+ fontink.c
+
+if XFONT_BDFFORMAT
+libbitmap_la_SOURCES += bdfread.c bdfutils.c
+endif
+
+if XFONT_PCF_OR_BUILTIN
+libbitmap_la_SOURCES += pcfread.c
+endif
+
+if XFONT_PCFFORMAT
+libbitmap_la_SOURCES += pcfwrite.c
+endif
+
+if XFONT_SNFFORMAT
+libbitmap_la_SOURCES += snfread.c snfstr.h
+endif
diff --git a/lib/libXfont/src/bitmap/Makefile.in b/lib/libXfont/src/bitmap/Makefile.in
index 5103ae959..f74d78a37 100644
--- a/lib/libXfont/src/bitmap/Makefile.in
+++ b/lib/libXfont/src/bitmap/Makefile.in
@@ -50,6 +50,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@XFONT_BDFFORMAT_TRUE@am__append_1 = bdfread.c bdfutils.c
+@XFONT_PCF_OR_BUILTIN_TRUE@am__append_2 = pcfread.c
+@XFONT_PCFFORMAT_TRUE@am__append_3 = pcfwrite.c
+@XFONT_SNFFORMAT_TRUE@am__append_4 = snfread.c snfstr.h
subdir = src/bitmap
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/depcomp
@@ -64,9 +68,16 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libbitmap_la_LIBADD =
-am_libbitmap_la_OBJECTS = bdfread.lo bdfutils.lo bitmap.lo \
- bitmapfunc.lo bitmaputil.lo bitscale.lo fontink.lo pcfread.lo \
- pcfwrite.lo snfread.lo
+am__libbitmap_la_SOURCES_DIST = bitmap.c bitmapfunc.c bitmaputil.c \
+ bitscale.c fontink.c bdfread.c bdfutils.c pcfread.c pcfwrite.c \
+ snfread.c snfstr.h
+@XFONT_BDFFORMAT_TRUE@am__objects_1 = bdfread.lo bdfutils.lo
+@XFONT_PCF_OR_BUILTIN_TRUE@am__objects_2 = pcfread.lo
+@XFONT_PCFFORMAT_TRUE@am__objects_3 = pcfwrite.lo
+@XFONT_SNFFORMAT_TRUE@am__objects_4 = snfread.lo
+am_libbitmap_la_OBJECTS = bitmap.lo bitmapfunc.lo bitmaputil.lo \
+ bitscale.lo fontink.lo $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3) $(am__objects_4)
libbitmap_la_OBJECTS = $(am_libbitmap_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -107,7 +118,7 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libbitmap_la_SOURCES)
-DIST_SOURCES = $(libbitmap_la_SOURCES)
+DIST_SOURCES = $(am__libbitmap_la_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -272,19 +283,9 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS)
noinst_LTLIBRARIES = libbitmap.la
-libbitmap_la_SOURCES = \
- bdfread.c \
- bdfutils.c \
- bitmap.c \
- bitmapfunc.c \
- bitmaputil.c \
- bitscale.c \
- fontink.c \
- pcfread.c \
- pcfwrite.c \
- snfread.c \
- snfstr.h
-
+libbitmap_la_SOURCES = bitmap.c bitmapfunc.c bitmaputil.c bitscale.c \
+ fontink.c $(am__append_1) $(am__append_2) $(am__append_3) \
+ $(am__append_4)
all: all-am
.SUFFIXES:
diff --git a/lib/libXfont/src/bitmap/bitmap.c b/lib/libXfont/src/bitmap/bitmap.c
index 9b20fafe9..0a379eb08 100644
--- a/lib/libXfont/src/bitmap/bitmap.c
+++ b/lib/libXfont/src/bitmap/bitmap.c
@@ -63,8 +63,12 @@ bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
case Linear8Bit:
case TwoD8Bit:
- if (pFont->info.firstRow > 0)
+ if (pFont->info.firstRow > 0) {
+ if (pDefault)
+ while (count--)
+ *glyphs++ = pDefault;
break;
+ }
if (pFont->info.allExist && pDefault) {
while (count--) {
c = (*chars++) - firstCol;
diff --git a/lib/libXfont/src/bitmap/bitmapfunc.c b/lib/libXfont/src/bitmap/bitmapfunc.c
index 603d5d904..8c6b3d896 100644
--- a/lib/libXfont/src/bitmap/bitmapfunc.c
+++ b/lib/libXfont/src/bitmap/bitmapfunc.c
@@ -32,29 +32,20 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
-/*
- * Translate monolithic #defines to modular definitions
- */
-
-#ifdef PCFFORMAT
-#define XFONT_PCFFORMAT 1
-#endif
-
-#ifdef SNFFORMAT
-#define XFONT_SNFFORMAT 1
-#endif
-
-#ifdef BDFFORMAT
-#define XFONT_BDFFORMAT 1
-#endif
-
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
+#if XFONT_BDFFORMAT
#include <X11/fonts/bdfint.h>
+#endif
+#if XFONT_PCFFORMAT
#include <X11/fonts/pcf.h>
+#endif
+#if XFONT_SNFFORMAT
#include "snfstr.h"
+#endif
+#if XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT
typedef struct _BitmapFileFunctions {
int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,
int /* bit */, int /* byte */,
@@ -252,3 +243,11 @@ BitmapGetRenderIndex(FontRendererPtr renderer)
{
return renderer - renderers;
}
+
+#else
+void
+BitmapRegisterFontFileFunctions (void)
+{
+ /* nothing to do */
+}
+#endif /* XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT */
diff --git a/lib/libXfont/src/bitmap/bitscale.c b/lib/libXfont/src/bitmap/bitscale.c
index e89ba7ce0..c9af4c031 100644
--- a/lib/libXfont/src/bitmap/bitscale.c
+++ b/lib/libXfont/src/bitmap/bitscale.c
@@ -34,22 +34,6 @@ from The Open Group.
#include <config.h>
#endif
-/*
- * Translate monolithic #defines to modular definitions
- */
-
-#ifdef PCFFORMAT
-#define XFONT_PCFFORMAT 1
-#endif
-
-#ifdef SNFFORMAT
-#define XFONT_SNFFORMAT 1
-#endif
-
-#ifdef BDFFORMAT
-#define XFONT_BDFFORMAT 1
-#endif
-
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
@@ -60,7 +44,7 @@ from The Open Group.
#endif
/* Should get this from elsewhere */
-extern unsigned long serverGeneration;
+extern unsigned long __GetServerGeneration(void);
static void bitmapUnloadScalable (FontPtr pFont);
static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci,
@@ -597,9 +581,9 @@ ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */
char *isStringProp;
int nProps;
- if (bitscaleGeneration != serverGeneration) {
+ if (bitscaleGeneration != __GetServerGeneration()) {
initFontPropTable();
- bitscaleGeneration = serverGeneration;
+ bitscaleGeneration = __GetServerGeneration();
}
nProps = NPROPS + 1 + sizeof(fontPropTable) / sizeof(fontProp) +
sizeof(rawFontPropTable) / sizeof(fontProp);
@@ -751,6 +735,8 @@ compute_xform_matrix(FontScalablePtr vals, double dx, double dy,
* ScaleFont
* returns a pointer to the new scaled font, or NULL (due to AllocError).
*/
+#pragma GCC diagnostic ignored "-Wbad-function-cast"
+
static FontPtr
ScaleFont(FontPtr opf, /* originating font */
double widthMult, /* glyphs width scale factor */
@@ -811,8 +797,6 @@ ScaleFont(FontPtr opf, /* originating font */
needs to be for the output font */
if (vals->nranges)
{
- int i;
-
pfi->allExist = 0;
firstCol = 255;
lastCol = 0;
diff --git a/lib/libXfont/src/builtins/builtin.h b/lib/libXfont/src/builtins/builtin.h
index 75dff8d85..f9a4cea27 100644
--- a/lib/libXfont/src/builtins/builtin.h
+++ b/lib/libXfont/src/builtins/builtin.h
@@ -54,9 +54,9 @@ extern const int builtin_dir_count;
extern const BuiltinAliasRec builtin_alias[];
extern const int builtin_alias_count;
-extern FontFilePtr BuiltinFileOpen (char *);
+extern FontFilePtr BuiltinFileOpen (const char *);
extern int BuiltinFileClose (BufFilePtr, int);
-extern int BuiltinReadDirectory (char *, FontDirectoryPtr *);
+extern int BuiltinReadDirectory (const char *, FontDirectoryPtr *);
extern void BuiltinRegisterFontFileFunctions (void);
extern void BuiltinRegisterFpeFunctions (void);
diff --git a/lib/libXfont/src/builtins/dir.c b/lib/libXfont/src/builtins/dir.c
index 490e7e355..0225bfc99 100644
--- a/lib/libXfont/src/builtins/dir.c
+++ b/lib/libXfont/src/builtins/dir.c
@@ -148,7 +148,7 @@ BuiltinAliasesRestore (BuiltinAliasPtr a_cur_tab,
}
int
-BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
+BuiltinReadDirectory (const char *directory, FontDirectoryPtr *pdir)
{
FontDirectoryPtr dir;
int i;
diff --git a/lib/libXfont/src/builtins/file.c b/lib/libXfont/src/builtins/file.c
index 3f657d99b..93527c127 100644
--- a/lib/libXfont/src/builtins/file.c
+++ b/lib/libXfont/src/builtins/file.c
@@ -90,7 +90,7 @@ BuiltinClose (BufFilePtr f, int unused)
FontFilePtr
-BuiltinFileOpen (char *name)
+BuiltinFileOpen (const char *name)
{
int i;
BuiltinIOPtr io;
diff --git a/lib/libXfont/src/builtins/fpe.c b/lib/libXfont/src/builtins/fpe.c
index 689f22a52..4f5d4cf7e 100644
--- a/lib/libXfont/src/builtins/fpe.c
+++ b/lib/libXfont/src/builtins/fpe.c
@@ -32,7 +32,7 @@ static int font_file_type;
static const char builtin_fonts[] = "built-ins";
static int
-BuiltinNameCheck (char *name)
+BuiltinNameCheck (const char *name)
{
return (strcmp (name, builtin_fonts) == 0);
}
diff --git a/lib/libXfont/src/fc/fsconvert.c b/lib/libXfont/src/fc/fsconvert.c
index 7a6033119..18b0c0d1c 100644
--- a/lib/libXfont/src/fc/fsconvert.c
+++ b/lib/libXfont/src/fc/fsconvert.c
@@ -643,7 +643,7 @@ _fs_unload_font(FontPtr pfont)
FontPtr
fs_create_font (FontPathElementPtr fpe,
- char *name,
+ const char *name,
int namelen,
fsBitmapFormat format,
fsBitmapFormatMask fmask)
diff --git a/lib/libXfont/src/fc/fserve.c b/lib/libXfont/src/fc/fserve.c
index 6c2bd3a81..c6d07725d 100644
--- a/lib/libXfont/src/fc/fserve.c
+++ b/lib/libXfont/src/fc/fserve.c
@@ -147,7 +147,7 @@ static void
_fs_close_server (FSFpePtr conn);
static FSFpePtr
-_fs_init_conn (char *servername);
+_fs_init_conn (const char *servername);
static int
_fs_wait_connect (FSFpePtr conn);
@@ -235,7 +235,7 @@ _fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep)
#endif
static Bool
-fs_name_check(char *name)
+fs_name_check(const char *name)
{
/* Just make sure there is a protocol/ prefix */
return (name && *name != '/' && strchr(name, '/'));
@@ -293,7 +293,7 @@ static int
fs_init_fpe(FontPathElementPtr fpe)
{
FSFpePtr conn;
- char *name;
+ const char *name;
int err;
int ret;
@@ -1617,7 +1617,7 @@ _fs_do_blocked (FSFpePtr conn)
/* ARGSUSED */
static int
fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
XID id, FontPtr *ppfont)
{
@@ -1635,7 +1635,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
if (conn->blockState & FS_GIVE_UP)
return BadFontName;
- if (namelen <= 0 || namelen > sizeof (buf) - 1)
+ if (namelen < 0 || namelen > sizeof (buf) - 1)
return BadFontName;
/*
@@ -1809,7 +1809,7 @@ fs_send_query_bitmaps(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
/* ARGSUSED */
static int
fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
XID id, FontPtr *ppfont,
char **alias, FontPtr non_cachable_font)
@@ -2163,7 +2163,7 @@ fs_send_load_glyphs(pointer client, FontPtr pfont,
}
-extern pointer serverClient; /* This could be any number that
+extern pointer __GetServerClient(void); /* This could be any number that
doesn't conflict with existing
client values. */
@@ -2335,17 +2335,17 @@ fs_load_all_glyphs(FontPtr pfont)
* perform an unpleasant job that, we hope, will never be required.
*/
- while ((err = _fs_load_glyphs(serverClient, pfont, TRUE, 0, 0, NULL)) ==
+ while ((err = _fs_load_glyphs(__GetServerClient(), pfont, TRUE, 0, 0, NULL)) ==
Suspended)
{
if (fs_await_reply (conn) != FSIO_READY)
{
/* Get rid of blockrec */
- fs_client_died(serverClient, pfont->fpe);
+ fs_client_died(__GetServerClient(), pfont->fpe);
err = BadCharRange;
break;
}
- fs_read_reply (pfont->fpe, serverClient);
+ fs_read_reply (pfont->fpe, __GetServerClient());
}
return err;
}
@@ -2405,7 +2405,7 @@ fs_read_list(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
}
static int
-fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
+fs_send_list_fonts(pointer client, FontPathElementPtr fpe, const char *pattern,
int patlen, int maxnames, FontNamesPtr newnames)
{
FSFpePtr conn = (FSFpePtr) fpe->private;
@@ -2461,7 +2461,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
static int
fs_list_fonts(pointer client, FontPathElementPtr fpe,
- char *pattern, int patlen, int maxnames, FontNamesPtr newnames)
+ const char *pattern, int patlen, int maxnames, FontNamesPtr newnames)
{
FSFpePtr conn = (FSFpePtr) fpe->private;
FSBlockDataPtr blockrec;
@@ -2632,7 +2632,7 @@ done:
/* ARGSUSED */
static int
fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
- char *pattern, int len, int maxnames, pointer *pdata)
+ const char *pattern, int len, int maxnames, pointer *pdata)
{
FSFpePtr conn = (FSFpePtr) fpe->private;
FSBlockDataPtr blockrec;
@@ -3363,7 +3363,7 @@ _fs_start_reconnect (FSFpePtr conn)
static FSFpePtr
-_fs_init_conn (char *servername)
+_fs_init_conn (const char *servername)
{
FSFpePtr conn;
diff --git a/lib/libXfont/src/fc/fserve.h b/lib/libXfont/src/fc/fserve.h
index 5999861b6..502e201d5 100644
--- a/lib/libXfont/src/fc/fserve.h
+++ b/lib/libXfont/src/fc/fserve.h
@@ -72,7 +72,7 @@ typedef struct _fs_blocked_extents *FSBlockedExtentPtr;
extern void _fs_convert_char_info ( fsXCharInfo *src, xCharInfo *dst );
extern void _fs_free_props (FontInfoPtr pfi);
extern FontPtr fs_create_font (FontPathElementPtr fpe,
- char *name,
+ const char *name,
int namelen,
fsBitmapFormat format,
fsBitmapFormatMask fmask);
diff --git a/lib/libXfont/src/fontfile/catalogue.c b/lib/libXfont/src/fontfile/catalogue.c
index 623093011..81a1e13f1 100644
--- a/lib/libXfont/src/fontfile/catalogue.c
+++ b/lib/libXfont/src/fontfile/catalogue.c
@@ -40,7 +40,7 @@ static const char CataloguePrefix[] = "catalogue:";
static int CatalogueFreeFPE (FontPathElementPtr fpe);
static int
-CatalogueNameCheck (char *name)
+CatalogueNameCheck (const char *name)
{
return strncmp(name, CataloguePrefix, sizeof(CataloguePrefix) - 1) == 0;
}
@@ -116,7 +116,7 @@ CatalogueUnrefFPEs (FontPathElementPtr fpe)
if (subfpe->refcount == 0)
{
FontFileFreeFPE (subfpe);
- free(subfpe->name);
+ free((void *) subfpe->name);
free(subfpe);
}
}
@@ -158,6 +158,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
CatalogueUnrefFPEs (fpe);
while (entry = readdir(dir), entry != NULL)
{
+ char *name;
snprintf(link, sizeof link, "%s/%s", path, entry->d_name);
len = readlink(link, dest, sizeof dest - 1);
if (len < 0)
@@ -191,15 +192,16 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
* (which uses font->fpe->type) goes to CatalogueCloseFont. */
subfpe->type = fpe->type;
subfpe->name_length = len;
- subfpe->name = malloc (len + 1);
- if (subfpe->name == NULL)
+ name = malloc (len + 1);
+ if (name == NULL)
{
free(subfpe);
continue;
}
- memcpy(subfpe->name, dest, len);
- subfpe->name[len] = '\0';
+ memcpy(name, dest, len);
+ name[len] = '\0';
+ subfpe->name = name;
/* The X server will manipulate the subfpe ref counts
* associated with the font in OpenFont and CloseFont, so we
@@ -208,7 +210,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
if (FontFileInitFPE (subfpe) != Successful)
{
- free(subfpe->name);
+ free((void *) subfpe->name);
free(subfpe);
continue;
}
@@ -280,7 +282,7 @@ CatalogueFreeFPE (FontPathElementPtr fpe)
static int
CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
XID id, FontPtr *pFont, char **aliasName,
FontPtr non_cachable_font)
@@ -314,7 +316,7 @@ CatalogueCloseFont (FontPathElementPtr fpe, FontPtr pFont)
}
static int
-CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat,
+CatalogueListFonts (pointer client, FontPathElementPtr fpe, const char *pat,
int len, int max, FontNamesPtr names)
{
CataloguePtr cat = fpe->private;
@@ -339,7 +341,7 @@ typedef struct _LFWIData {
static int
CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max, pointer *privatep,
+ const char *pat, int len, int max, pointer *privatep,
int mark_aliases)
{
CataloguePtr cat = fpe->private;
@@ -375,7 +377,7 @@ CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
static int
CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep)
{
return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 0);
@@ -413,7 +415,7 @@ CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
static int
CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep)
{
return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 1);
diff --git a/lib/libXfont/src/fontfile/dirfile.c b/lib/libXfont/src/fontfile/dirfile.c
index 639310c31..38ced7573 100644
--- a/lib/libXfont/src/fontfile/dirfile.c
+++ b/lib/libXfont/src/fontfile/dirfile.c
@@ -50,8 +50,10 @@ static int ReadFontAlias ( char *directory, Bool isFile,
static int lexAlias ( FILE *file, char **lexToken );
static int lexc ( FILE *file );
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
int
-FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
+FontFileReadDirectory (const char *directory, FontDirectoryPtr *pdir)
{
char file_name[MAXFONTFILENAMELEN];
char font_name[MAXFONTNAMELEN];
diff --git a/lib/libXfont/src/fontfile/fontfile.c b/lib/libXfont/src/fontfile/fontfile.c
index c55282b66..05a961072 100644
--- a/lib/libXfont/src/fontfile/fontfile.c
+++ b/lib/libXfont/src/fontfile/fontfile.c
@@ -50,7 +50,7 @@ ISOLatin1ToLower(unsigned char source)
}
_X_HIDDEN void
-CopyISOLatin1Lowered(char *dest, char *source, int length)
+CopyISOLatin1Lowered(char *dest, const char *source, int length)
{
int i;
for (i = 0; i < length; i++, source++, dest++)
@@ -69,7 +69,7 @@ static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
FontPtr non_cachable_font);
int
-FontFileNameCheck (char *name)
+FontFileNameCheck (const char *name)
{
#ifndef NCD
#if defined(WIN32)
@@ -254,7 +254,7 @@ transfer_values_to_alias(char *entryname, int entrynamelength,
/* ARGSUSED */
int
FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
XID id, FontPtr *pFont, char **aliasName,
FontPtr non_cachable_font)
@@ -688,7 +688,7 @@ _FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
/* ARGSUSED */
static int
_FontFileListFonts (pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max, FontNamesPtr names,
+ const char *pat, int len, int max, FontNamesPtr names,
int mark_aliases)
{
FontDirectoryPtr dir;
@@ -794,7 +794,7 @@ typedef struct _LFWIData {
} LFWIDataRec, *LFWIDataPtr;
int
-FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
+FontFileListFonts (pointer client, FontPathElementPtr fpe, const char *pat,
int len, int max, FontNamesPtr names)
{
return _FontFileListFonts (client, fpe, pat, len, max, names, 0);
@@ -802,7 +802,7 @@ FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
int
FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep, int mark_aliases)
{
LFWIDataPtr data;
@@ -833,7 +833,7 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
int
FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 0);
@@ -1067,7 +1067,7 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
int
FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 1);
diff --git a/lib/libXfont/src/fontfile/renderers.c b/lib/libXfont/src/fontfile/renderers.c
index 5091922a1..bbcd46694 100644
--- a/lib/libXfont/src/fontfile/renderers.c
+++ b/lib/libXfont/src/fontfile/renderers.c
@@ -40,7 +40,7 @@ static FontRenderersRec renderers;
* XXX Maybe should allow unregistering renders. For now, just clear the
* list at each new generation.
*/
-extern unsigned long serverGeneration;
+extern unsigned long __GetServerGeneration(void);
static unsigned long rendererGeneration = 0;
Bool
@@ -55,8 +55,8 @@ FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority)
int i;
struct _FontRenderersElement *new;
- if (rendererGeneration != serverGeneration) {
- rendererGeneration = serverGeneration;
+ if (rendererGeneration != __GetServerGeneration()) {
+ rendererGeneration = __GetServerGeneration();
renderers.number = 0;
if (renderers.renderers)
free(renderers.renderers);
diff --git a/lib/libXfont/src/stubs/Makefile.am b/lib/libXfont/src/stubs/Makefile.am
index 23e3bd1c6..7eb16d41a 100644
--- a/lib/libXfont/src/stubs/Makefile.am
+++ b/lib/libXfont/src/stubs/Makefile.am
@@ -10,7 +10,6 @@ libstubs_la_SOURCES = \
csignal.c \
delfntcid.c \
errorf.c \
- fatalerror.c \
findoldfnt.c \
getcres.c \
getdefptsize.c \
@@ -22,4 +21,5 @@ libstubs_la_SOURCES = \
servclient.c \
setfntauth.c \
stfntcfnt.c \
+ stubsinit.c \
stubs.h
diff --git a/lib/libXfont/src/stubs/Makefile.in b/lib/libXfont/src/stubs/Makefile.in
index 9a747de58..6103f2f48 100644
--- a/lib/libXfont/src/stubs/Makefile.in
+++ b/lib/libXfont/src/stubs/Makefile.in
@@ -65,9 +65,9 @@ CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libstubs_la_LIBADD =
am_libstubs_la_OBJECTS = cauthgen.lo csignal.lo delfntcid.lo errorf.lo \
- fatalerror.lo findoldfnt.lo getcres.lo getdefptsize.lo \
- getnewfntcid.lo gettime.lo initfshdl.lo regfpefunc.lo \
- rmfshdl.lo servclient.lo setfntauth.lo stfntcfnt.lo
+ findoldfnt.lo getcres.lo getdefptsize.lo getnewfntcid.lo \
+ gettime.lo initfshdl.lo regfpefunc.lo rmfshdl.lo servclient.lo \
+ setfntauth.lo stfntcfnt.lo stubsinit.lo
libstubs_la_OBJECTS = $(am_libstubs_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -278,7 +278,6 @@ libstubs_la_SOURCES = \
csignal.c \
delfntcid.c \
errorf.c \
- fatalerror.c \
findoldfnt.c \
getcres.c \
getdefptsize.c \
@@ -290,6 +289,7 @@ libstubs_la_SOURCES = \
servclient.c \
setfntauth.c \
stfntcfnt.c \
+ stubsinit.c \
stubs.h
all: all-am
@@ -350,7 +350,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csignal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delfntcid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errorf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatalerror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findoldfnt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcres.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdefptsize.Plo@am__quote@
@@ -362,6 +361,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/servclient.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfntauth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stfntcfnt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubsinit.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/lib/libXfont/src/stubs/cauthgen.c b/lib/libXfont/src/stubs/cauthgen.c
index 06f1a343f..10086e434 100644
--- a/lib/libXfont/src/stubs/cauthgen.c
+++ b/lib/libXfont/src/stubs/cauthgen.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak client_auth_generation
+#endif
+
weak int
client_auth_generation(ClientPtr client)
{
+ OVERRIDE_SYMBOL(client_auth_generation, client);
return 0;
}
diff --git a/lib/libXfont/src/stubs/csignal.c b/lib/libXfont/src/stubs/csignal.c
index 3e102ccd0..dd88b3d36 100644
--- a/lib/libXfont/src/stubs/csignal.c
+++ b/lib/libXfont/src/stubs/csignal.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak ClientSignal
+#endif
+
weak Bool
ClientSignal(ClientPtr client)
{
+ OVERRIDE_SYMBOL(ClientSignal,client);
return True;
}
diff --git a/lib/libXfont/src/stubs/delfntcid.c b/lib/libXfont/src/stubs/delfntcid.c
index 0b0a747b5..8113b9f29 100644
--- a/lib/libXfont/src/stubs/delfntcid.c
+++ b/lib/libXfont/src/stubs/delfntcid.c
@@ -3,7 +3,12 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak DeleteFontClientID
+#endif
+
weak void
DeleteFontClientID(Font id)
{
+ OVERRIDE_SYMBOL(DeleteFontClientID, id);
}
diff --git a/lib/libXfont/src/stubs/errorf.c b/lib/libXfont/src/stubs/errorf.c
index 28872e2f8..d2de6c64b 100644
--- a/lib/libXfont/src/stubs/errorf.c
+++ b/lib/libXfont/src/stubs/errorf.c
@@ -3,7 +3,12 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak ErrorF
+#endif
+
weak void
ErrorF(const char *f, ...)
{
+ OVERRIDE_VA_SYMBOL(VErrorF, f);
}
diff --git a/lib/libXfont/src/stubs/fatalerror.c b/lib/libXfont/src/stubs/fatalerror.c
deleted file mode 100644
index 295593ea6..000000000
--- a/lib/libXfont/src/stubs/fatalerror.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "stubs.h"
-
-weak void
-FatalError(const char *f, ...)
-{
-}
diff --git a/lib/libXfont/src/stubs/findoldfnt.c b/lib/libXfont/src/stubs/findoldfnt.c
index 22bd8c1d1..c73279eb4 100644
--- a/lib/libXfont/src/stubs/findoldfnt.c
+++ b/lib/libXfont/src/stubs/findoldfnt.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak find_old_font
+#endif
+
weak FontPtr
find_old_font(FSID id)
{
+ OVERRIDE_SYMBOL(find_old_font, id);
return (FontPtr)NULL;
}
diff --git a/lib/libXfont/src/stubs/getcres.c b/lib/libXfont/src/stubs/getcres.c
index b564f24e6..27a918080 100644
--- a/lib/libXfont/src/stubs/getcres.c
+++ b/lib/libXfont/src/stubs/getcres.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak GetClientResolutions
+#endif
+
weak FontResolutionPtr
GetClientResolutions(int *num)
{
+ OVERRIDE_SYMBOL(GetClientResolutions, num);
return (FontResolutionPtr) 0;
}
diff --git a/lib/libXfont/src/stubs/getdefptsize.c b/lib/libXfont/src/stubs/getdefptsize.c
index 11804ddb0..50c1b182c 100644
--- a/lib/libXfont/src/stubs/getdefptsize.c
+++ b/lib/libXfont/src/stubs/getdefptsize.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak GetDefaultPointSize
+#endif
+
weak int
GetDefaultPointSize(void)
{
+ OVERRIDE_SYMBOL(GetDefaultPointSize);
return 0;
}
diff --git a/lib/libXfont/src/stubs/getnewfntcid.c b/lib/libXfont/src/stubs/getnewfntcid.c
index aefc55372..d31ccf111 100644
--- a/lib/libXfont/src/stubs/getnewfntcid.c
+++ b/lib/libXfont/src/stubs/getnewfntcid.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak GetNewFontClientID
+#endif
+
weak Font
GetNewFontClientID(void)
{
+ OVERRIDE_SYMBOL(GetNewFontClientID);
return (Font)0;
}
diff --git a/lib/libXfont/src/stubs/gettime.c b/lib/libXfont/src/stubs/gettime.c
index 1aca1cc56..1b20f62a4 100644
--- a/lib/libXfont/src/stubs/gettime.c
+++ b/lib/libXfont/src/stubs/gettime.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak GetTimeInMillis
+#endif
+
weak unsigned long
GetTimeInMillis (void)
{
+ OVERRIDE_SYMBOL(GetTimeInMillis);
return 0;
}
diff --git a/lib/libXfont/src/stubs/initfshdl.c b/lib/libXfont/src/stubs/initfshdl.c
index faee9f64d..e1c0b2454 100644
--- a/lib/libXfont/src/stubs/initfshdl.c
+++ b/lib/libXfont/src/stubs/initfshdl.c
@@ -3,9 +3,14 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak init_fs_handlers
+#endif
+
weak int
init_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler)
{
+ OVERRIDE_SYMBOL(init_fs_handlers, fpe, block_handler);
return Successful;
}
diff --git a/lib/libXfont/src/stubs/regfpefunc.c b/lib/libXfont/src/stubs/regfpefunc.c
index fdf22cd75..ae12a011d 100644
--- a/lib/libXfont/src/stubs/regfpefunc.c
+++ b/lib/libXfont/src/stubs/regfpefunc.c
@@ -24,5 +24,9 @@ RegisterFPEFunctions(NameCheckFunc name_func,
NextLaFunc next_list_alias_func,
SetPathFunc set_path_func)
{
+ OVERRIDE_SYMBOL(RegisterFPEFunctions, name_func, init_func, free_func,
+ reset_func, open_func, close_func, list_func, start_lfwi_func,
+ next_lfwi_func, wakeup_func, client_died, load_glyphs,
+ start_list_alias_func, next_list_alias_func, set_path_func);
return 0;
}
diff --git a/lib/libXfont/src/stubs/rmfshdl.c b/lib/libXfont/src/stubs/rmfshdl.c
index b4956611c..22a30916c 100644
--- a/lib/libXfont/src/stubs/rmfshdl.c
+++ b/lib/libXfont/src/stubs/rmfshdl.c
@@ -12,4 +12,5 @@ remove_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr blockHandler,
Bool all)
{
+ OVERRIDE_SYMBOL(remove_fs_handlers, fpe, blockHandler, all);
}
diff --git a/lib/libXfont/src/stubs/servclient.c b/lib/libXfont/src/stubs/servclient.c
index ae51621bf..f85e08eb1 100644
--- a/lib/libXfont/src/stubs/servclient.c
+++ b/lib/libXfont/src/stubs/servclient.c
@@ -3,4 +3,17 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak serverClient
+#endif
+
weak void *serverClient = 0;
+
+void *__GetServerClient(void);
+
+void *
+__GetServerClient(void)
+{
+ OVERRIDE_DATA(serverClient);
+ return serverClient;
+}
diff --git a/lib/libXfont/src/stubs/setfntauth.c b/lib/libXfont/src/stubs/setfntauth.c
index 01d18b125..371807e7a 100644
--- a/lib/libXfont/src/stubs/setfntauth.c
+++ b/lib/libXfont/src/stubs/setfntauth.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak set_font_authorizations
+#endif
+
weak int
set_font_authorizations(char **authorizations, int *authlen, ClientPtr client)
{
+ OVERRIDE_SYMBOL(set_font_authorizations, authorizations, authlen, client);
return 0;
}
diff --git a/lib/libXfont/src/stubs/stfntcfnt.c b/lib/libXfont/src/stubs/stfntcfnt.c
index bf88505b7..d490988c5 100644
--- a/lib/libXfont/src/stubs/stfntcfnt.c
+++ b/lib/libXfont/src/stubs/stfntcfnt.c
@@ -3,8 +3,13 @@
#endif
#include "stubs.h"
+#ifdef __SUNPRO_C
+#pragma weak StoreFontClientFont
+#endif
+
weak int
StoreFontClientFont(FontPtr pfont, Font id)
{
+ OVERRIDE_SYMBOL(StoreFontClientFont, pfont, id);
return 0;
}
diff --git a/lib/libXfont/src/stubs/stubs.h b/lib/libXfont/src/stubs/stubs.h
index fa634e97a..7d499d5b6 100644
--- a/lib/libXfont/src/stubs/stubs.h
+++ b/lib/libXfont/src/stubs/stubs.h
@@ -19,6 +19,54 @@
#endif
#endif
+#if defined(NO_WEAK_SYMBOLS) && defined(PIC)
+#include <stdarg.h>
+extern int _font_init_stubs(void);
+#define OVERRIDE_DATA(sym) \
+ _font_init_stubs(); \
+ if (__ptr_##sym && __ptr_##sym != &sym) \
+ sym = *__ptr_##sym
+#define OVERRIDE_SYMBOL(sym,...) \
+ _font_init_stubs(); \
+ if (__##sym && __##sym != sym) \
+ return (*__##sym)(__VA_ARGS__)
+#define OVERRIDE_VA_SYMBOL(sym,f) \
+ va_list _args; \
+ _font_init_stubs(); \
+ va_start(_args, f); \
+ if (__##sym) \
+ (*__##sym)(f, _args); \
+ va_end(_args)
+
+int (*__client_auth_generation)(ClientPtr);
+Bool (*__ClientSignal)(ClientPtr);
+void (*__DeleteFontClientID)(Font);
+void (*__VErrorF)(const char *, va_list);
+FontPtr (*__find_old_font)(FSID);
+FontResolutionPtr (*__GetClientResolutions)(int *);
+int (*__GetDefaultPointSize)(void);
+Font (*__GetNewFontClientID)(void);
+unsigned long (*__GetTimeInMillis)(void);
+int (*__init_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr);
+int (*__RegisterFPEFunctions)(NameCheckFunc, InitFpeFunc, FreeFpeFunc,
+ ResetFpeFunc, OpenFontFunc, CloseFontFunc, ListFontsFunc,
+ StartLfwiFunc, NextLfwiFunc, WakeupFpeFunc, ClientDiedFunc,
+ LoadGlyphsFunc, StartLaFunc, NextLaFunc, SetPathFunc);
+void (*__remove_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr, Bool);
+void **__ptr_serverClient;
+int (*__set_font_authorizations)(char **, int *, ClientPtr);
+int (*__StoreFontClientFont)(FontPtr, Font);
+Atom (*__MakeAtom)(const char *, unsigned, int);
+int (*__ValidAtom)(Atom);
+char *(*__NameForAtom)(Atom);
+unsigned long *__ptr_serverGeneration;
+void (*__register_fpe_functions)(void);
+#else /* NO_WEAK_SYMBOLS && PIC */
+#define OVERRIDE_DATA(sym)
+#define OVERRIDE_SYMBOL(sym,...)
+#define OVERRIDE_VA_SYMBOL(sym,f)
+#endif
+
/* This is really just a hack for now... __APPLE__ really should be using
* the weak symbols route above, but it's causing an as-yet unresolved issue,
* so we're instead building with flat_namespace.
@@ -36,6 +84,5 @@ extern int set_font_authorizations ( char **authorizations,
extern unsigned long GetTimeInMillis (void);
extern void ErrorF(const char *format, ...);
-extern void FatalError(const char *format, ...);
/* end of file */
diff --git a/lib/libXfont/src/util/atom.c b/lib/libXfont/src/util/atom.c
index 37811f91e..5f7f1c66d 100644
--- a/lib/libXfont/src/util/atom.c
+++ b/lib/libXfont/src/util/atom.c
@@ -158,6 +158,8 @@ MakeAtom(const char *string, unsigned len, int makeit)
int h = 0;
int r;
+ OVERRIDE_SYMBOL(MakeAtom, string, len, makeit);
+
hash = Hash (string, len);
if (hashTable)
{
@@ -230,6 +232,7 @@ MakeAtom(const char *string, unsigned len, int makeit)
weak int
ValidAtom(Atom atom)
{
+ OVERRIDE_SYMBOL(ValidAtom, atom);
return (atom != None) && (atom <= lastAtom);
}
@@ -240,6 +243,7 @@ ValidAtom(Atom atom)
weak char *
NameForAtom(Atom atom)
{
+ OVERRIDE_SYMBOL(NameForAtom, atom);
if (atom != None && atom <= lastAtom)
return reverseMap[atom]->name;
return NULL;
diff --git a/lib/libXfont/src/util/miscutil.c b/lib/libXfont/src/util/miscutil.c
index 3d802d2f5..61c9d11d1 100644
--- a/lib/libXfont/src/util/miscutil.c
+++ b/lib/libXfont/src/util/miscutil.c
@@ -45,14 +45,22 @@ from The Open Group.
extern void BuiltinRegisterFpeFunctions(void);
-#ifndef NO_WEAK_SYMBOLS
/* make sure everything initializes themselves at least once */
weak unsigned long serverGeneration = 1;
-#endif
+
+unsigned long __GetServerGeneration (void);
+
+unsigned long
+__GetServerGeneration (void)
+{
+ OVERRIDE_DATA(serverGeneration);
+ return serverGeneration;
+}
weak void
register_fpe_functions (void)
{
+ OVERRIDE_SYMBOL(register_fpe_functions);
BuiltinRegisterFpeFunctions();
FontFileRegisterFpeFunctions();
#ifdef XFONT_FC
diff --git a/lib/libXfont/src/util/patcache.c b/lib/libXfont/src/util/patcache.c
index 9c05fa13c..210101584 100644
--- a/lib/libXfont/src/util/patcache.c
+++ b/lib/libXfont/src/util/patcache.c
@@ -50,7 +50,7 @@ typedef unsigned char EntryPtr;
typedef struct _FontPatternCacheEntry {
struct _FontPatternCacheEntry *next, **prev;
short patlen;
- char *pattern;
+ const char *pattern;
int hash;
FontPtr pFont; /* associated font */
} FontPatternCacheEntryRec, *FontPatternCacheEntryPtr;
@@ -74,7 +74,7 @@ EmptyFontPatternCache (FontPatternCachePtr cache)
cache->entries[i].next = &cache->entries[i+1];
cache->entries[i].prev = 0;
cache->entries[i].pFont = 0;
- free (cache->entries[i].pattern);
+ free ((void *) cache->entries[i].pattern);
cache->entries[i].pattern = 0;
cache->entries[i].patlen = 0;
}
@@ -107,7 +107,7 @@ FreeFontPatternCache (FontPatternCachePtr cache)
int i;
for (i = 0; i < NENTRIES; i++)
- free (cache->entries[i].pattern);
+ free ((void *) cache->entries[i].pattern);
free (cache);
}
@@ -128,7 +128,7 @@ Hash (const char *string, int len)
/* add entry */
void
CacheFontPattern (FontPatternCachePtr cache,
- char *pattern,
+ const char *pattern,
int patlen,
FontPtr pFont)
{
@@ -154,7 +154,7 @@ CacheFontPattern (FontPatternCachePtr cache,
if (e->next)
e->next->prev = e->prev;
*e->prev = e->next;
- free (e->pattern);
+ free ((void *) e->pattern);
}
/* set pattern */
memcpy (newpat, pattern, patlen);
@@ -174,7 +174,7 @@ CacheFontPattern (FontPatternCachePtr cache,
/* find matching entry */
FontPtr
FindCachedFontPattern (FontPatternCachePtr cache,
- char *pattern,
+ const char *pattern,
int patlen)
{
int hash;
@@ -211,7 +211,7 @@ RemoveCachedFontPattern (FontPatternCachePtr cache,
*e->prev = e->next;
e->next = cache->free;
cache->free = e;
- free (e->pattern);
+ free ((void *) e->pattern);
e->pattern = 0;
}
}