aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libXfont/ChangeLog228
-rw-r--r--libXfont/Makefile.in7
-rw-r--r--libXfont/README6
-rw-r--r--libXfont/aclocal.m46
-rw-r--r--libXfont/config.guess30
-rw-r--r--libXfont/config.sub17
-rwxr-xr-x[-rw-r--r--]libXfont/configure74
-rw-r--r--libXfont/configure.ac44
-rw-r--r--libXfont/doc/Makefile.in2
-rw-r--r--libXfont/include/X11/fonts/bitmap.h18
-rw-r--r--libXfont/include/X11/fonts/fntfil.h14
-rw-r--r--libXfont/include/X11/fonts/fontmisc.h2
-rw-r--r--libXfont/include/X11/fonts/fontutil.h10
-rw-r--r--libXfont/missing4
-rw-r--r--libXfont/src/FreeType/Makefile.in2
-rw-r--r--libXfont/src/FreeType/ftfuncs.c2
-rw-r--r--libXfont/src/FreeType/ftfuncs.h10
-rw-r--r--libXfont/src/FreeType/fttools.c8
-rw-r--r--libXfont/src/Makefile.am2
-rw-r--r--libXfont/src/Makefile.in4
-rw-r--r--libXfont/src/bitmap/Makefile.am24
-rw-r--r--libXfont/src/bitmap/Makefile.in37
-rw-r--r--libXfont/src/bitmap/bitmap.c14
-rw-r--r--libXfont/src/bitmap/bitmapfunc.c43
-rw-r--r--libXfont/src/bitmap/bitscale.c26
-rw-r--r--libXfont/src/bitmap/fontink.c2
-rw-r--r--libXfont/src/bitmap/snfstr.h2
-rw-r--r--libXfont/src/builtins/Makefile.in2
-rw-r--r--libXfont/src/builtins/builtin.h4
-rw-r--r--libXfont/src/builtins/dir.c6
-rw-r--r--libXfont/src/builtins/file.c6
-rw-r--r--libXfont/src/builtins/fonts.c2
-rw-r--r--libXfont/src/builtins/fpe.c2
-rw-r--r--libXfont/src/builtins/render.c2
-rw-r--r--libXfont/src/fc/Makefile.in2
-rw-r--r--libXfont/src/fc/fsconvert.c2
-rw-r--r--libXfont/src/fc/fserve.c28
-rw-r--r--libXfont/src/fc/fserve.h2
-rw-r--r--libXfont/src/fc/fslibos.h2
-rw-r--r--libXfont/src/fc/fstrans.c2
-rw-r--r--libXfont/src/fontfile/Makefile.in2
-rw-r--r--libXfont/src/fontfile/bitsource.c16
-rw-r--r--libXfont/src/fontfile/catalogue.c26
-rw-r--r--libXfont/src/fontfile/dirfile.c4
-rw-r--r--libXfont/src/fontfile/fontencc.c2
-rwxr-xr-x[-rw-r--r--]libXfont/src/fontfile/fontfile.c82
-rw-r--r--libXfont/src/fontfile/fontscale.c8
-rw-r--r--libXfont/src/fontfile/gunzip.c14
-rw-r--r--libXfont/src/fontfile/renderers.c10
-rw-r--r--libXfont/src/stubs/Makefile.am2
-rw-r--r--libXfont/src/stubs/Makefile.in12
-rw-r--r--libXfont/src/stubs/cauthgen.c1
-rw-r--r--libXfont/src/stubs/csignal.c1
-rw-r--r--libXfont/src/stubs/delfntcid.c1
-rw-r--r--libXfont/src/stubs/errorf.c1
-rw-r--r--libXfont/src/stubs/fatalerror.c13
-rw-r--r--libXfont/src/stubs/findoldfnt.c1
-rw-r--r--libXfont/src/stubs/getcres.c1
-rw-r--r--libXfont/src/stubs/getdefptsize.c1
-rw-r--r--libXfont/src/stubs/getnewfntcid.c1
-rw-r--r--libXfont/src/stubs/gettime.c1
-rw-r--r--libXfont/src/stubs/initfshdl.c1
-rw-r--r--libXfont/src/stubs/regfpefunc.c34
-rw-r--r--libXfont/src/stubs/rmfshdl.c3
-rw-r--r--libXfont/src/stubs/servclient.c9
-rw-r--r--libXfont/src/stubs/setfntauth.c1
-rw-r--r--libXfont/src/stubs/stfntcfnt.c1
-rw-r--r--libXfont/src/stubs/stubs.h53
-rw-r--r--libXfont/src/stubs/stubsinit.c82
-rw-r--r--libXfont/src/util/Makefile.in2
-rw-r--r--libXfont/src/util/atom.c4
-rw-r--r--libXfont/src/util/fontaccel.c4
-rw-r--r--libXfont/src/util/fontutil.c28
-rw-r--r--libXfont/src/util/format.c22
-rw-r--r--libXfont/src/util/miscutil.c14
-rw-r--r--libXfont/src/util/patcache.c24
-rw-r--r--libXfont/src/util/private.c4
-rwxr-xr-x[-rw-r--r--]libXfont/src/util/utilbitmap.c20
-rw-r--r--packages.txt2
79 files changed, 788 insertions, 420 deletions
diff --git a/libXfont/ChangeLog b/libXfont/ChangeLog
index 201ab8a11..2d5c38345 100644
--- a/libXfont/ChangeLog
+++ b/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/libXfont/Makefile.in b/libXfont/Makefile.in
index 6fe25c244..dc9e7e5f9 100644
--- a/libXfont/Makefile.in
+++ b/libXfont/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -107,7 +107,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/include/X11/fonts/fontconf.h.in \
$(srcdir)/xfont.pc.in $(libXfontinclude_HEADERS) AUTHORS \
COPYING ChangeLog INSTALL README compile config.guess \
- config.sub install-sh missing ltmain.sh
+ config.sub depcomp install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -798,9 +798,10 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
diff --git a/libXfont/README b/libXfont/README
index 65f1aa437..c95c3cf1f 100644
--- a/libXfont/README
+++ b/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/libXfont/aclocal.m4 b/libXfont/aclocal.m4
index e65b6ecd5..4b434b58c 100644
--- a/libXfont/aclocal.m4
+++ b/libXfont/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.14 -*- Autoconf -*-
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.14], [],
+m4_if([$1], [1.14.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14])dnl
+[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/libXfont/config.guess b/libXfont/config.guess
index b79252d6b..9afd67620 100644
--- a/libXfont/config.guess
+++ b/libXfont/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2013-11-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -1260,16 +1260,26 @@ EOF
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
diff --git a/libXfont/config.sub b/libXfont/config.sub
index 8b612ab89..61cb4bc22 100644
--- a/libXfont/config.sub
+++ b/libXfont/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2013-10-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@ case $basic_machine in
| avr | avr32 \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -265,6 +265,7 @@ case $basic_machine in
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -324,7 +325,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -372,7 +373,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -381,6 +382,7 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -794,7 +796,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -830,7 +832,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1546,6 +1548,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
diff --git a/libXfont/configure b/libXfont/configure
index 765aaf3db..2cea137c5 100644..100755
--- a/libXfont/configure
+++ b/libXfont/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libXfont 1.4.8.
+# Generated by GNU Autoconf 2.68 for libXfont 1.5.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -631,8 +631,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=''
@@ -691,6 +691,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
@@ -1440,7 +1442,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]...
@@ -1510,7 +1512,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
@@ -1537,12 +1539,13 @@ Optional Features:
errors (default: disabled)
--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
@@ -1560,8 +1563,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
@@ -1649,7 +1654,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.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2175,7 +2180,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.68. Invocation command line was
$ $0 $@
@@ -3043,7 +3048,7 @@ fi
# Define the identity of the package.
PACKAGE='libXfont'
- VERSION='1.4.8'
+ VERSION='1.5.0'
cat >>confdefs.h <<_ACEOF
@@ -18986,6 +18991,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
@@ -19012,7 +19026,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
@@ -19138,12 +19152,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`
else
pkg_failed=yes
fi
@@ -19154,12 +19168,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`
else
pkg_failed=yes
fi
@@ -19177,14 +19191,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 "xproto xtrans fontsproto < 2.1.3 fontenc" 2>&1`
+ XFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xproto xtrans fontsproto >= 2.1.3 fontenc" 2>&1`
else
- XFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xproto xtrans fontsproto < 2.1.3 fontenc" 2>&1`
+ XFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors "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
@@ -19723,6 +19737,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
@@ -20152,7 +20170,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.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20218,7 +20236,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.68,
with options \\"\$ac_cs_config\\"
diff --git a/libXfont/configure.ac b/libXfont/configure.ac
index ea3368442..471b266aa 100644
--- a/libXfont/configure.ac
+++ b/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/libXfont/doc/Makefile.in b/libXfont/doc/Makefile.in
index fcace4ba3..32ad39d25 100644
--- a/libXfont/doc/Makefile.in
+++ b/libXfont/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/include/X11/fonts/bitmap.h b/libXfont/include/X11/fonts/bitmap.h
index c02342759..7309ac60a 100644
--- a/libXfont/include/X11/fonts/bitmap.h
+++ b/libXfont/include/X11/fonts/bitmap.h
@@ -74,10 +74,10 @@ typedef struct _BitmapFont {
#define NUM_SEGMENTS(n) \
(((n)+BITMAP_FONT_SEGMENT_SIZE-1)/BITMAP_FONT_SEGMENT_SIZE)
-extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count,
- unsigned char *chars, FontEncoding charEncoding,
+extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count,
+ unsigned char *chars, FontEncoding charEncoding,
unsigned long *glyphCount, CharInfoPtr *glyphs );
-extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count,
+extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count,
unsigned char *chars, FontEncoding charEncoding,
unsigned long *glyphCount, xCharInfo **glyphs );
@@ -88,14 +88,14 @@ extern int bitmapComputeWeight ( FontPtr pFont );
extern void BitmapRegisterFontFileFunctions ( void );
-extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont,
+extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont,
int flags, FontEntryPtr entry, char *fileName,
- FontScalablePtr vals, fsBitmapFormat format,
- fsBitmapFormatMask fmask,
+ FontScalablePtr vals, fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
FontPtr non_cachable_font );
-extern int BitmapGetInfoScalable ( FontPathElementPtr fpe,
- FontInfoPtr pFontInfo, FontEntryPtr entry,
- FontNamePtr fontName, char *fileName,
+extern int BitmapGetInfoScalable ( FontPathElementPtr fpe,
+ FontInfoPtr pFontInfo, FontEntryPtr entry,
+ FontNamePtr fontName, char *fileName,
FontScalablePtr vals );
#endif /* _BITMAP_H_ */
diff --git a/libXfont/include/X11/fonts/fntfil.h b/libXfont/include/X11/fonts/fntfil.h
index a32df63d7..24be79a66 100644
--- a/libXfont/include/X11/fonts/fntfil.h
+++ b/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/libXfont/include/X11/fonts/fontmisc.h b/libXfont/include/X11/fonts/fontmisc.h
index 73a824789..d3926a73e 100644
--- a/libXfont/include/X11/fonts/fontmisc.h
+++ b/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/libXfont/include/X11/fonts/fontutil.h b/libXfont/include/X11/fonts/fontutil.h
index 71d507b1a..ed55b89e9 100644
--- a/libXfont/include/X11/fonts/fontutil.h
+++ b/libXfont/include/X11/fonts/fontutil.h
@@ -8,17 +8,17 @@ extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *,
int *, int *, int *);
extern void FontComputeInfoAccelerators(FontInfoPtr);
-extern void GetGlyphs ( FontPtr font, unsigned long count,
- unsigned char *chars, FontEncoding fontEncoding,
+extern void GetGlyphs ( FontPtr font, unsigned long count,
+ unsigned char *chars, FontEncoding fontEncoding,
unsigned long *glyphcount, CharInfoPtr *glyphs );
-extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
+extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
unsigned long count, ExtentInfoRec *info );
-extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
+extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
unsigned char *chars, ExtentInfoRec *info );
extern Bool ParseGlyphCachingMode ( char *str );
extern void InitGlyphCaching ( void );
extern void SetGlyphCachingMode ( int newmode );
-extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
+extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
Bool charset_subset );
#endif /* _FONTUTIL_H_ */
diff --git a/libXfont/missing b/libXfont/missing
index cdea51493..db98974ff 100644
--- a/libXfont/missing
+++ b/libXfont/missing
@@ -1,7 +1,7 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -160,7 +160,7 @@ give_advice ()
;;
autom4te*)
echo "You might have modified some maintainer files that require"
- echo "the 'automa4te' program to be rebuilt."
+ echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
diff --git a/libXfont/src/FreeType/Makefile.in b/libXfont/src/FreeType/Makefile.in
index f185aca7f..9c0e25006 100644
--- a/libXfont/src/FreeType/Makefile.in
+++ b/libXfont/src/FreeType/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c
index f8b01835c..3dd8eb946 100644
--- a/libXfont/src/FreeType/ftfuncs.c
+++ b/libXfont/src/FreeType/ftfuncs.c
@@ -1073,6 +1073,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/libXfont/src/FreeType/ftfuncs.h b/libXfont/src/FreeType/ftfuncs.h
index 068a59523..6545dfabd 100644
--- a/libXfont/src/FreeType/ftfuncs.h
+++ b/libXfont/src/FreeType/ftfuncs.h
@@ -158,7 +158,7 @@ typedef struct _FTFont{
static int FreeTypeOpenFace(FTFacePtr *facep, char *FTFileName, char *realFileName, int faceNumber);
static void FreeTypeFreeFace(FTFacePtr face);
-static int
+static int
FreeTypeOpenInstance(FTInstancePtr *instancep, FTFacePtr face,
char *FTFileName, FTNormalisedTransformationPtr trans,
int spacing, FontBitmapFormatPtr bmfmt,
@@ -169,20 +169,20 @@ FreeTypeInstanceGetGlyph(unsigned idx, int flags, CharInfoPtr *g, FTInstancePtr
static int
FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
xCharInfo **metrics, FTInstancePtr instance );
-static int
-FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
+static int
+FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
FTInstancePtr instance, int hasMetrics );
static void FreeTypeFreeFont(FTFontPtr font);
static void FreeTypeFreeXFont(FontPtr pFont, int freeProps);
static void FreeTypeUnloadXFont(FontPtr pFont);
static int
-FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
+FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
char *fontname, int rawAverageWidth, Bool font_properties);
static int FreeTypeFontGetGlyph(unsigned code, int flags, CharInfoPtr *g, FTFontPtr font);
static int
FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
char *FTFileName, FontScalablePtr vals, FontEntryPtr entry,
- FontBitmapFormatPtr bmfmt, FT_Int32 load_flags,
+ FontBitmapFormatPtr bmfmt, FT_Int32 load_flags,
struct TTCapInfo *tmp_ttcap, char *dynStrTTCapCodeRange,
int ttcap_spacing );
diff --git a/libXfont/src/FreeType/fttools.c b/libXfont/src/FreeType/fttools.c
index a0e34d021..a85d3ee72 100644
--- a/libXfont/src/FreeType/fttools.c
+++ b/libXfont/src/FreeType/fttools.c
@@ -119,17 +119,17 @@ FTGetName(FT_Face face, int nid, int pid, int eid, FT_SfntName *name_return)
return 0;
}
-int
+int
FTGetEnglishName(FT_Face face, int nid, char *name_return, int name_len)
{
FT_SfntName name;
int len;
- if(FTGetName(face, nid,
+ if(FTGetName(face, nid,
TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, &name) ||
- FTGetName(face, nid,
+ FTGetName(face, nid,
TT_PLATFORM_APPLE_UNICODE, -1, &name))
- return FTu2a(name.string_len, name.string, name_return,
+ return FTu2a(name.string_len, name.string, name_return,
MSBFirst, name_len);
/* Pretend that Apple Roman is ISO 8859-1. */
diff --git a/libXfont/src/Makefile.am b/libXfont/src/Makefile.am
index cd09ab99f..33fd135c1 100644
--- a/libXfont/src/Makefile.am
+++ b/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/libXfont/src/Makefile.in b/libXfont/src/Makefile.in
index 6d92fd150..7396a7d46 100644
--- a/libXfont/src/Makefile.in
+++ b/libXfont/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -432,7 +432,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/libXfont/src/bitmap/Makefile.am b/libXfont/src/bitmap/Makefile.am
index 99682d9db..0f2d10a02 100644
--- a/libXfont/src/bitmap/Makefile.am
+++ b/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/libXfont/src/bitmap/Makefile.in b/libXfont/src/bitmap/Makefile.in
index 5aa1a4a7b..4f654aa67 100644
--- a/libXfont/src/bitmap/Makefile.in
+++ b/libXfont/src/bitmap/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -78,6 +78,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.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
@@ -92,9 +96,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@)
@@ -135,7 +146,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;; \
@@ -315,19 +326,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/libXfont/src/bitmap/bitmap.c b/libXfont/src/bitmap/bitmap.c
index 1ceb4bb17..0a379eb08 100644
--- a/libXfont/src/bitmap/bitmap.c
+++ b/libXfont/src/bitmap/bitmap.c
@@ -36,8 +36,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/fonts/bitmap.h>
int
-bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
- FontEncoding charEncoding,
+bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
+ FontEncoding charEncoding,
unsigned long *glyphCount, /* RETURN */
CharInfoPtr *glyphs) /* RETURN */
{
@@ -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;
@@ -126,8 +130,8 @@ bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
static CharInfoRec nonExistantChar;
int
-bitmapGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
- FontEncoding charEncoding,
+bitmapGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
+ FontEncoding charEncoding,
unsigned long *glyphCount, /* RETURN */
xCharInfo **glyphs) /* RETURN */
{
diff --git a/libXfont/src/bitmap/bitmapfunc.c b/libXfont/src/bitmap/bitmapfunc.c
index 653ff5d55..049c39967 100644
--- a/libXfont/src/bitmap/bitmapfunc.c
+++ b/libXfont/src/bitmap/bitmapfunc.c
@@ -32,34 +32,25 @@ 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 */,
+ int (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,
+ int /* bit */, int /* byte */,
int /* glyph */, int /* scan */);
- int (*ReadInfo) ( FontInfoPtr /* pFontInfo */,
+ int (*ReadInfo) ( FontInfoPtr /* pFontInfo */,
FontFilePtr /* file */ );
} BitmapFileFunctionsRec, *BitmapFileFunctionsPtr;
@@ -108,8 +99,8 @@ static BitmapFileFunctionsRec readers[] = {
#define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING)
static int
-BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
- FontEntryPtr entry, char *fileName,
+BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
+ FontEntryPtr entry, char *fileName,
fsBitmapFormat format, fsBitmapFormatMask fmask,
FontPtr non_cachable_font) /* We don't do licensing */
{
@@ -153,7 +144,7 @@ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
}
static int
-BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
FontEntryPtr entry, char *fileName)
{
FontFilePtr file;
@@ -254,3 +245,11 @@ BitmapGetRenderIndex(FontRendererPtr renderer)
{
return renderer - renderers;
}
+
+#else
+void
+BitmapRegisterFontFileFunctions (void)
+{
+ /* nothing to do */
+}
+#endif /* XFONT_PCFFORMAT || XFONT_SNFFORMAT || XFONT_BDFFORMAT */
diff --git a/libXfont/src/bitmap/bitscale.c b/libXfont/src/bitmap/bitscale.c
index 130dffd86..caeb96384 100644
--- a/libXfont/src/bitmap/bitscale.c
+++ b/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>
@@ -64,7 +48,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,
@@ -601,9 +585,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);
@@ -755,6 +739,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 */
@@ -815,8 +801,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/libXfont/src/bitmap/fontink.c b/libXfont/src/bitmap/fontink.c
index ad7091fa6..f4898da10 100644
--- a/libXfont/src/bitmap/fontink.c
+++ b/libXfont/src/bitmap/fontink.c
@@ -98,7 +98,7 @@ FontCharInkMetrics(FontPtr pFont, CharInfoPtr pCI, xCharInfo *pInk)
found_ascent:
pInk->ascent = vpos - descent + 1;
- p = ((unsigned char *) pCI->bits) + bitmapByteWidthPadded *
+ p = ((unsigned char *) pCI->bits) + bitmapByteWidthPadded *
(descent + ascent - 1) + bitmapByteWidth;
for (vpos = descent + ascent; --vpos >= 0;) {
diff --git a/libXfont/src/bitmap/snfstr.h b/libXfont/src/bitmap/snfstr.h
index 148bb1fcc..8f39ded01 100644
--- a/libXfont/src/bitmap/snfstr.h
+++ b/libXfont/src/bitmap/snfstr.h
@@ -175,7 +175,7 @@ typedef struct _snfFontInfo {
} snfFontInfoRec;
extern void SnfSetFormat ( int bit, int byte, int glyph, int scan );
-extern int snfReadFont ( FontPtr pFont, FontFilePtr file,
+extern int snfReadFont ( FontPtr pFont, FontFilePtr file,
int bit, int byte, int glyph, int scan );
extern int snfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
diff --git a/libXfont/src/builtins/Makefile.in b/libXfont/src/builtins/Makefile.in
index 03a53346a..0f03cc924 100644
--- a/libXfont/src/builtins/Makefile.in
+++ b/libXfont/src/builtins/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/src/builtins/builtin.h b/libXfont/src/builtins/builtin.h
index 75dff8d85..f9a4cea27 100644
--- a/libXfont/src/builtins/builtin.h
+++ b/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/libXfont/src/builtins/dir.c b/libXfont/src/builtins/dir.c
index cd50cef56..2eb197d2b 100644
--- a/libXfont/src/builtins/dir.c
+++ b/libXfont/src/builtins/dir.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -149,7 +149,7 @@ BuiltinAliasesRestore (BuiltinAliasPtr a_cur_tab,
}
int
-BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
+BuiltinReadDirectory (const char *directory, FontDirectoryPtr *pdir)
{
FontDirectoryPtr dir;
int i;
@@ -195,7 +195,7 @@ BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
}
for (i = 0; i < builtin_alias_count; i++)
{
- if (!FontFileAddFontAlias (dir,
+ if (!FontFileAddFontAlias (dir,
(char *) builtin_alias[i].alias_name,
(char *) builtin_alias[i].font_name))
{
diff --git a/libXfont/src/builtins/file.c b/libXfont/src/builtins/file.c
index 549253926..93527c127 100644
--- a/libXfont/src/builtins/file.c
+++ b/libXfont/src/builtins/file.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -83,14 +83,14 @@ static int
BuiltinClose (BufFilePtr f, int unused)
{
BuiltinIOPtr io = ((BuiltinIOPtr) f->private);
-
+
free (io);
return 1;
}
FontFilePtr
-BuiltinFileOpen (char *name)
+BuiltinFileOpen (const char *name)
{
int i;
BuiltinIOPtr io;
diff --git a/libXfont/src/builtins/fonts.c b/libXfont/src/builtins/fonts.c
index 9a9d7d273..38921783d 100644
--- a/libXfont/src/builtins/fonts.c
+++ b/libXfont/src/builtins/fonts.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/libXfont/src/builtins/fpe.c b/libXfont/src/builtins/fpe.c
index 689f22a52..4f5d4cf7e 100644
--- a/libXfont/src/builtins/fpe.c
+++ b/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/libXfont/src/builtins/render.c b/libXfont/src/builtins/render.c
index 4d1048394..2be0053b9 100644
--- a/libXfont/src/builtins/render.c
+++ b/libXfont/src/builtins/render.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/libXfont/src/fc/Makefile.in b/libXfont/src/fc/Makefile.in
index 6663a417b..5200ab7e6 100644
--- a/libXfont/src/fc/Makefile.in
+++ b/libXfont/src/fc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/src/fc/fsconvert.c b/libXfont/src/fc/fsconvert.c
index 7a6033119..18b0c0d1c 100644
--- a/libXfont/src/fc/fsconvert.c
+++ b/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/libXfont/src/fc/fserve.c b/libXfont/src/fc/fserve.c
index 1e1093cd5..92b0d53da 100644
--- a/libXfont/src/fc/fserve.c
+++ b/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;
@@ -1615,7 +1615,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)
{
@@ -1633,7 +1633,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;
/*
@@ -1807,7 +1807,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)
@@ -2161,7 +2161,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. */
@@ -2333,17 +2333,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;
}
@@ -2403,7 +2403,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;
@@ -2459,7 +2459,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;
@@ -2630,7 +2630,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;
@@ -3362,7 +3362,7 @@ _fs_start_reconnect (FSFpePtr conn)
static FSFpePtr
-_fs_init_conn (char *servername)
+_fs_init_conn (const char *servername)
{
FSFpePtr conn;
diff --git a/libXfont/src/fc/fserve.h b/libXfont/src/fc/fserve.h
index 5999861b6..502e201d5 100644
--- a/libXfont/src/fc/fserve.h
+++ b/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/libXfont/src/fc/fslibos.h b/libXfont/src/fc/fslibos.h
index c49f52e5b..c1f0eded2 100644
--- a/libXfont/src/fc/fslibos.h
+++ b/libXfont/src/fc/fslibos.h
@@ -62,7 +62,7 @@ from The Open Group.
# endif
#endif
#ifndef OPEN_MAX
-#if defined(SVR4)
+#if defined(SVR4)
#define OPEN_MAX 256
#else
#include <sys/param.h>
diff --git a/libXfont/src/fc/fstrans.c b/libXfont/src/fc/fstrans.c
index 74a884e63..a96c0414b 100644
--- a/libXfont/src/fc/fstrans.c
+++ b/libXfont/src/fc/fstrans.c
@@ -19,7 +19,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <dix-config.h>
diff --git a/libXfont/src/fontfile/Makefile.in b/libXfont/src/fontfile/Makefile.in
index 91da64e99..527859c98 100644
--- a/libXfont/src/fontfile/Makefile.in
+++ b/libXfont/src/fontfile/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/src/fontfile/bitsource.c b/libXfont/src/fontfile/bitsource.c
index 1b79c2bcb..c73f41f9c 100644
--- a/libXfont/src/fontfile/bitsource.c
+++ b/libXfont/src/fontfile/bitsource.c
@@ -101,14 +101,14 @@ FontFileEmptyBitmapSource(void)
}
int
-FontFileMatchBitmapSource (FontPathElementPtr fpe,
- FontPtr *pFont,
- int flags,
- FontEntryPtr entry,
- FontNamePtr zeroPat,
- FontScalablePtr vals,
- fsBitmapFormat format,
- fsBitmapFormatMask fmask,
+FontFileMatchBitmapSource (FontPathElementPtr fpe,
+ FontPtr *pFont,
+ int flags,
+ FontEntryPtr entry,
+ FontNamePtr zeroPat,
+ FontScalablePtr vals,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
Bool noSpecificSize)
{
int source;
diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c
index d5721ab68..dbfb1cc25 100644
--- a/libXfont/src/fontfile/catalogue.c
+++ b/libXfont/src/fontfile/catalogue.c
@@ -41,7 +41,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;
}
@@ -117,7 +117,7 @@ CatalogueUnrefFPEs (FontPathElementPtr fpe)
if (subfpe->refcount == 0)
{
FontFileFreeFPE (subfpe);
- free(subfpe->name);
+ free((void *) subfpe->name);
free(subfpe);
}
}
@@ -160,6 +160,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
#ifndef _MSC_VER
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)
@@ -193,15 +194,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
@@ -210,7 +212,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
if (FontFileInitFPE (subfpe) != Successful)
{
- free(subfpe->name);
+ free((void *) subfpe->name);
free(subfpe);
continue;
}
@@ -283,7 +285,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)
@@ -317,7 +319,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;
@@ -342,7 +344,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;
@@ -378,7 +380,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);
@@ -416,7 +418,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/libXfont/src/fontfile/dirfile.c b/libXfont/src/fontfile/dirfile.c
index 639310c31..38ced7573 100644
--- a/libXfont/src/fontfile/dirfile.c
+++ b/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/libXfont/src/fontfile/fontencc.c b/libXfont/src/fontfile/fontencc.c
index 79977851d..4bdb495e1 100644
--- a/libXfont/src/fontfile/fontencc.c
+++ b/libXfont/src/fontfile/fontencc.c
@@ -48,7 +48,7 @@ font_encoding_find(const char *encoding_name, const char *filename)
}
unsigned
-font_encoding_recode(unsigned code,
+font_encoding_recode(unsigned code,
FontEncPtr encoding, FontMapPtr mapping)
{
if(encoding != mapping->encoding) {
diff --git a/libXfont/src/fontfile/fontfile.c b/libXfont/src/fontfile/fontfile.c
index 7372d3ece..55aa98d4d 100644..100755
--- a/libXfont/src/fontfile/fontfile.c
+++ b/libXfont/src/fontfile/fontfile.c
@@ -56,7 +56,7 @@ ISOLatin1ToLower(unsigned char source)
}
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++)
@@ -68,9 +68,9 @@ CopyISOLatin1Lowered(char *dest, char *source, int length)
* Map FPE functions to renderer functions
*/
-static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
- fsBitmapFormat format,
+static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
+ fsBitmapFormat format,
fsBitmapFormatMask fmask,
FontPtr non_cachable_font);
@@ -152,14 +152,14 @@ FontFileResetFPE (FontPathElementPtr fpe)
if (FontFileDirectoryChanged (dir))
{
/* can't do it, so tell the caller to close and re-open */
- return FPEResetFailed;
+ return FPEResetFailed;
}
- else
+ else
{
if (dir->nonScalable.used > 0)
if (!FontFileRegisterBitmapSource (fpe))
{
- return FPEResetFailed;
+ return FPEResetFailed;
}
return Successful;
}
@@ -174,7 +174,7 @@ FontFileFreeFPE (FontPathElementPtr fpe)
}
static int
-transfer_values_to_alias(char *entryname, int entrynamelength,
+transfer_values_to_alias(char *entryname, int entrynamelength,
char *resolvedname,
char **aliasName, FontScalablePtr vals)
{
@@ -286,10 +286,10 @@ transfer_values_to_alias(char *entryname, int entrynamelength,
/* ARGSUSED */
int
-FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
- XID id, FontPtr *pFont, char **aliasName,
+ XID id, FontPtr *pFont, char **aliasName,
FontPtr non_cachable_font)
{
FontDirectoryPtr dir;
@@ -305,7 +305,7 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
Bool noSpecificSize;
int nranges;
fsRange *ranges;
-
+
if (namelen >= MAXFONTNAMELEN)
return AllocError;
dir = (FontDirectoryPtr) fpe->private;
@@ -543,8 +543,8 @@ FontFileCloseFont (FontPathElementPtr fpe, FontPtr pFont)
}
static int
-FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
+FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
fsBitmapFormat format, fsBitmapFormatMask fmask,
FontPtr non_cachable_font)
{
@@ -561,7 +561,7 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
return BadFontName;
strcpy (fileName, dir->directory);
strcat (fileName, bitmap->fileName);
- ret = (*bitmap->renderer->OpenBitmap)
+ ret = (*bitmap->renderer->OpenBitmap)
(fpe, pFont, flags, entry, fileName, format, fmask,
non_cachable_font);
if (ret == Successful)
@@ -573,8 +573,8 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
}
int
-FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
+FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
fsBitmapFormat format, fsBitmapFormatMask fmask)
{
return FontFileOpenBitmapNCF (fpe, pFont, flags, entry, format, fmask,
@@ -582,7 +582,7 @@ FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
}
static int
-FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
FontEntryPtr entry)
{
FontBitmapEntryPtr bitmap;
@@ -603,8 +603,8 @@ FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
}
static void
-_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
- FontNamePtr nameptr, char *zeroChars,
+_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
+ FontNamePtr nameptr, char *zeroChars,
FontScalablePtr vals, fsRange *ranges,
int nranges, int *max)
{
@@ -720,8 +720,8 @@ _FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
/* ARGSUSED */
static int
-_FontFileListFonts (pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max, FontNamesPtr names,
+_FontFileListFonts (pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max, FontNamesPtr names,
int mark_aliases)
{
FontDirectoryPtr dir;
@@ -827,15 +827,15 @@ 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);
}
int
-FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep, int mark_aliases)
{
LFWIDataPtr data;
@@ -865,8 +865,8 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
int
-FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 0);
@@ -874,8 +874,8 @@ FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
/* ARGSUSED */
static int
-FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
- char **namep, int *namelenp,
+FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
FontInfoPtr *pFontInfo)
{
FontDirectoryPtr dir;
@@ -891,14 +891,14 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
Bool noSpecificSize;
int nranges;
fsRange *ranges;
-
+
char *name = *namep;
int namelen = *namelenp;
-
+
if (namelen >= MAXFONTNAMELEN)
return AllocError;
dir = (FontDirectoryPtr) fpe->private;
-
+
/* Match non-scalable pattern */
CopyISOLatin1Lowered (lowerName, name, namelen);
lowerName[namelen] = '\0';
@@ -915,7 +915,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
tmpName.length = strlen(lowerName);
entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName);
}
-
+
if (entry)
{
switch (entry->type) {
@@ -947,7 +947,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
{
ret = BadFontName;
}
-
+
if (ret != BadFontName)
{
if (ranges) free(ranges);
@@ -978,7 +978,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
tmpName.ndashes = entry->name.ndashes;
}
}
-
+
if (entry)
{
noSpecificSize = FALSE; /* TRUE breaks XLFD enhancements */
@@ -1034,7 +1034,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
vals.xlfdName = origName;
vals.ranges = ranges;
vals.nranges = nranges;
-
+
/* Make a new scaled instance */
if (strlen(dir->directory) + strlen(scalable->fileName) >=
sizeof(fileName)) {
@@ -1070,8 +1070,8 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
}
int
-FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
- char **namep, int *namelenp,
+FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
FontInfoPtr *pFontInfo,
int *numFonts, pointer private)
{
@@ -1099,15 +1099,15 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
}
int
-FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 1);
}
int
-FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
+FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
char **namep, int *namelenp, char **resolvedp,
int *resolvedlenp, pointer private)
{
diff --git a/libXfont/src/fontfile/fontscale.c b/libXfont/src/fontfile/fontscale.c
index eb8d0bb58..bfaa7ec00 100644
--- a/libXfont/src/fontfile/fontscale.c
+++ b/libXfont/src/fontfile/fontscale.c
@@ -39,7 +39,7 @@ in this Software without prior written authorization from The Open Group.
#endif
Bool
-FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
+FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
FontPtr pFont, char *bitmapName)
{
FontScalableEntryPtr scalable;
@@ -79,7 +79,7 @@ FontFileSwitchStringsToBitmapPointers (FontDirectoryPtr dir)
FontEntryPtr nonScalable;
FontScaledPtr scaled;
FontScalableExtraPtr extra;
-
+
scalable = dir->scalable.entries;
nonScalable = dir->nonScalable.entries;
for (s = 0; s < dir->scalable.used; s++)
@@ -377,12 +377,12 @@ MatchScalable (FontScalablePtr a, FontScalablePtr b)
a->ranges[i].max_char_low != b->ranges[i].max_char_low ||
a->ranges[i].max_char_high != b->ranges[i].max_char_high)
return FALSE;
-
+
return TRUE;
}
FontScaledPtr
-FontFileFindScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
+FontFileFindScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
int noSpecificSize)
{
FontScalableEntryPtr scalable;
diff --git a/libXfont/src/fontfile/gunzip.c b/libXfont/src/fontfile/gunzip.c
index 9fa3eed00..84a4eaf45 100644
--- a/libXfont/src/fontfile/gunzip.c
+++ b/libXfont/src/fontfile/gunzip.c
@@ -66,7 +66,7 @@ BufFilePushZIP (BufFilePtr f)
BufZipFileClose);
}
-static int
+static int
BufZipFileClose(BufFilePtr f, int flag)
{
xzip_buf *x = (xzip_buf *)f->private;
@@ -76,16 +76,16 @@ BufZipFileClose(BufFilePtr f, int flag)
return 1;
}
-/* here's the real work.
+/* here's the real work.
-- we need to put stuff in f.buffer, update f.left and f.bufp,
then return the first byte (or BUFFILEEOF).
- -- to do this, we need to get stuff into avail_in, and next_in,
+ -- to do this, we need to get stuff into avail_in, and next_in,
and call inflate appropriately.
-- we may also need to add CRC maintenance - if inflate tells us
Z_STREAM_END, we then have 4bytes CRC and 4bytes length...
gzio.c:gzread shows most of the mechanism.
*/
-static int
+static int
BufZipFileFill (BufFilePtr f)
{
xzip_buf *x = (xzip_buf *)f->private;
@@ -139,7 +139,7 @@ BufZipFileFill (BufFilePtr f)
}
}
f->bufp = x->b;
- f->left = BUFFILESIZE - x->z.avail_out;
+ f->left = BUFFILESIZE - x->z.avail_out;
if (f->left >= 0) {
f->left--;
@@ -150,7 +150,7 @@ BufZipFileFill (BufFilePtr f)
}
/* there should be a BufCommonSkip... */
-static int
+static int
BufZipFileSkip (BufFilePtr f, int c)
{
/* BufFileRawSkip returns the count unchanged.
@@ -192,7 +192,7 @@ BufZipFileSkip (BufFilePtr f, int c)
#define RESERVED 0xE0 /* bits 5..7: reserved */
#define GET(f) do {c = BufFileGet(f); if (c == BUFFILEEOF) return c;} while(0)
-static int
+static int
BufCheckZipHeader(BufFilePtr f)
{
int c, flags;
diff --git a/libXfont/src/fontfile/renderers.c b/libXfont/src/fontfile/renderers.c
index e17d6a77e..7c341f6d8 100644
--- a/libXfont/src/fontfile/renderers.c
+++ b/libXfont/src/fontfile/renderers.c
@@ -41,7 +41,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
@@ -56,8 +56,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);
@@ -65,7 +65,7 @@ FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority)
}
for (i = 0; i < renderers.number; i++) {
- if (!strcasecmp (renderers.renderers[i].renderer->fileSuffix,
+ if (!strcasecmp (renderers.renderers[i].renderer->fileSuffix,
renderer->fileSuffix)) {
if(renderers.renderers[i].priority >= priority) {
if(renderers.renderers[i].priority == priority) {
@@ -100,7 +100,7 @@ FontFileMatchRenderer (char *fileName)
int i;
int fileLen;
FontRendererPtr r;
-
+
fileLen = strlen (fileName);
for (i = 0; i < renderers.number; i++)
{
diff --git a/libXfont/src/stubs/Makefile.am b/libXfont/src/stubs/Makefile.am
index 23e3bd1c6..7eb16d41a 100644
--- a/libXfont/src/stubs/Makefile.am
+++ b/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/libXfont/src/stubs/Makefile.in b/libXfont/src/stubs/Makefile.in
index 833bbe7ee..83336e1ac 100644
--- a/libXfont/src/stubs/Makefile.in
+++ b/libXfont/src/stubs/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -93,9 +93,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@)
@@ -321,7 +321,6 @@ libstubs_la_SOURCES = \
csignal.c \
delfntcid.c \
errorf.c \
- fatalerror.c \
findoldfnt.c \
getcres.c \
getdefptsize.c \
@@ -333,6 +332,7 @@ libstubs_la_SOURCES = \
servclient.c \
setfntauth.c \
stfntcfnt.c \
+ stubsinit.c \
stubs.h
all: all-am
@@ -394,7 +394,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@
@@ -406,6 +405,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/libXfont/src/stubs/cauthgen.c b/libXfont/src/stubs/cauthgen.c
index 026c52d17..10086e434 100644
--- a/libXfont/src/stubs/cauthgen.c
+++ b/libXfont/src/stubs/cauthgen.c
@@ -10,5 +10,6 @@
weak int
client_auth_generation(ClientPtr client)
{
+ OVERRIDE_SYMBOL(client_auth_generation, client);
return 0;
}
diff --git a/libXfont/src/stubs/csignal.c b/libXfont/src/stubs/csignal.c
index e6fdeae1b..dd88b3d36 100644
--- a/libXfont/src/stubs/csignal.c
+++ b/libXfont/src/stubs/csignal.c
@@ -10,5 +10,6 @@
weak Bool
ClientSignal(ClientPtr client)
{
+ OVERRIDE_SYMBOL(ClientSignal,client);
return True;
}
diff --git a/libXfont/src/stubs/delfntcid.c b/libXfont/src/stubs/delfntcid.c
index ca713286c..8113b9f29 100644
--- a/libXfont/src/stubs/delfntcid.c
+++ b/libXfont/src/stubs/delfntcid.c
@@ -10,4 +10,5 @@
weak void
DeleteFontClientID(Font id)
{
+ OVERRIDE_SYMBOL(DeleteFontClientID, id);
}
diff --git a/libXfont/src/stubs/errorf.c b/libXfont/src/stubs/errorf.c
index fd32965a4..d2de6c64b 100644
--- a/libXfont/src/stubs/errorf.c
+++ b/libXfont/src/stubs/errorf.c
@@ -10,4 +10,5 @@
weak void
ErrorF(const char *f, ...)
{
+ OVERRIDE_VA_SYMBOL(VErrorF, f);
}
diff --git a/libXfont/src/stubs/fatalerror.c b/libXfont/src/stubs/fatalerror.c
deleted file mode 100644
index 1549ad3ea..000000000
--- a/libXfont/src/stubs/fatalerror.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "stubs.h"
-
-#ifdef __SUNPRO_C
-#pragma weak FatalError
-#endif
-
-weak void
-FatalError(const char *f, ...)
-{
-}
diff --git a/libXfont/src/stubs/findoldfnt.c b/libXfont/src/stubs/findoldfnt.c
index 7a0008409..c73279eb4 100644
--- a/libXfont/src/stubs/findoldfnt.c
+++ b/libXfont/src/stubs/findoldfnt.c
@@ -10,5 +10,6 @@
weak FontPtr
find_old_font(FSID id)
{
+ OVERRIDE_SYMBOL(find_old_font, id);
return (FontPtr)NULL;
}
diff --git a/libXfont/src/stubs/getcres.c b/libXfont/src/stubs/getcres.c
index 0b98f46e3..27a918080 100644
--- a/libXfont/src/stubs/getcres.c
+++ b/libXfont/src/stubs/getcres.c
@@ -10,5 +10,6 @@
weak FontResolutionPtr
GetClientResolutions(int *num)
{
+ OVERRIDE_SYMBOL(GetClientResolutions, num);
return (FontResolutionPtr) 0;
}
diff --git a/libXfont/src/stubs/getdefptsize.c b/libXfont/src/stubs/getdefptsize.c
index 0b9e40999..50c1b182c 100644
--- a/libXfont/src/stubs/getdefptsize.c
+++ b/libXfont/src/stubs/getdefptsize.c
@@ -10,5 +10,6 @@
weak int
GetDefaultPointSize(void)
{
+ OVERRIDE_SYMBOL(GetDefaultPointSize);
return 0;
}
diff --git a/libXfont/src/stubs/getnewfntcid.c b/libXfont/src/stubs/getnewfntcid.c
index e2fe8bb15..d31ccf111 100644
--- a/libXfont/src/stubs/getnewfntcid.c
+++ b/libXfont/src/stubs/getnewfntcid.c
@@ -10,5 +10,6 @@
weak Font
GetNewFontClientID(void)
{
+ OVERRIDE_SYMBOL(GetNewFontClientID);
return (Font)0;
}
diff --git a/libXfont/src/stubs/gettime.c b/libXfont/src/stubs/gettime.c
index 7b2d3b34c..1b20f62a4 100644
--- a/libXfont/src/stubs/gettime.c
+++ b/libXfont/src/stubs/gettime.c
@@ -10,5 +10,6 @@
weak unsigned long
GetTimeInMillis (void)
{
+ OVERRIDE_SYMBOL(GetTimeInMillis);
return 0;
}
diff --git a/libXfont/src/stubs/initfshdl.c b/libXfont/src/stubs/initfshdl.c
index a14dafffc..e1c0b2454 100644
--- a/libXfont/src/stubs/initfshdl.c
+++ b/libXfont/src/stubs/initfshdl.c
@@ -11,5 +11,6 @@ weak int
init_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler)
{
+ OVERRIDE_SYMBOL(init_fs_handlers, fpe, block_handler);
return Successful;
}
diff --git a/libXfont/src/stubs/regfpefunc.c b/libXfont/src/stubs/regfpefunc.c
index a79b4bf92..ae12a011d 100644
--- a/libXfont/src/stubs/regfpefunc.c
+++ b/libXfont/src/stubs/regfpefunc.c
@@ -7,22 +7,26 @@
#pragma weak RegisterFPEFunctions
#endif
-weak int
-RegisterFPEFunctions(NameCheckFunc name_func,
- InitFpeFunc init_func,
- FreeFpeFunc free_func,
- ResetFpeFunc reset_func,
- OpenFontFunc open_func,
- CloseFontFunc close_func,
- ListFontsFunc list_func,
- StartLfwiFunc start_lfwi_func,
- NextLfwiFunc next_lfwi_func,
- WakeupFpeFunc wakeup_func,
- ClientDiedFunc client_died,
- LoadGlyphsFunc load_glyphs,
- StartLaFunc start_list_alias_func,
- NextLaFunc next_list_alias_func,
+weak int
+RegisterFPEFunctions(NameCheckFunc name_func,
+ InitFpeFunc init_func,
+ FreeFpeFunc free_func,
+ ResetFpeFunc reset_func,
+ OpenFontFunc open_func,
+ CloseFontFunc close_func,
+ ListFontsFunc list_func,
+ StartLfwiFunc start_lfwi_func,
+ NextLfwiFunc next_lfwi_func,
+ WakeupFpeFunc wakeup_func,
+ ClientDiedFunc client_died,
+ LoadGlyphsFunc load_glyphs,
+ StartLaFunc start_list_alias_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/libXfont/src/stubs/rmfshdl.c b/libXfont/src/stubs/rmfshdl.c
index d0bdd3d98..22a30916c 100644
--- a/libXfont/src/stubs/rmfshdl.c
+++ b/libXfont/src/stubs/rmfshdl.c
@@ -7,9 +7,10 @@
#pragma weak remove_fs_handlers
#endif
-weak void
+weak void
remove_fs_handlers(FontPathElementPtr fpe,
BlockHandlerProcPtr blockHandler,
Bool all)
{
+ OVERRIDE_SYMBOL(remove_fs_handlers, fpe, blockHandler, all);
}
diff --git a/libXfont/src/stubs/servclient.c b/libXfont/src/stubs/servclient.c
index 9b6cebb3f..f85e08eb1 100644
--- a/libXfont/src/stubs/servclient.c
+++ b/libXfont/src/stubs/servclient.c
@@ -8,3 +8,12 @@
#endif
weak void *serverClient = 0;
+
+void *__GetServerClient(void);
+
+void *
+__GetServerClient(void)
+{
+ OVERRIDE_DATA(serverClient);
+ return serverClient;
+}
diff --git a/libXfont/src/stubs/setfntauth.c b/libXfont/src/stubs/setfntauth.c
index 0c7ecccde..371807e7a 100644
--- a/libXfont/src/stubs/setfntauth.c
+++ b/libXfont/src/stubs/setfntauth.c
@@ -10,5 +10,6 @@
weak int
set_font_authorizations(char **authorizations, int *authlen, ClientPtr client)
{
+ OVERRIDE_SYMBOL(set_font_authorizations, authorizations, authlen, client);
return 0;
}
diff --git a/libXfont/src/stubs/stfntcfnt.c b/libXfont/src/stubs/stfntcfnt.c
index 5fc17452f..d490988c5 100644
--- a/libXfont/src/stubs/stfntcfnt.c
+++ b/libXfont/src/stubs/stfntcfnt.c
@@ -10,5 +10,6 @@
weak int
StoreFontClientFont(FontPtr pfont, Font id)
{
+ OVERRIDE_SYMBOL(StoreFontClientFont, pfont, id);
return 0;
}
diff --git a/libXfont/src/stubs/stubs.h b/libXfont/src/stubs/stubs.h
index 7f0eef298..7d499d5b6 100644
--- a/libXfont/src/stubs/stubs.h
+++ b/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.
@@ -29,13 +77,12 @@
#endif
extern FontPtr find_old_font ( FSID id );
-extern int set_font_authorizations ( char **authorizations,
- int *authlen,
+extern int set_font_authorizations ( char **authorizations,
+ int *authlen,
ClientPtr client );
extern unsigned long GetTimeInMillis (void);
extern void ErrorF(const char *format, ...);
-extern void FatalError(const char *format, ...);
/* end of file */
diff --git a/libXfont/src/stubs/stubsinit.c b/libXfont/src/stubs/stubsinit.c
new file mode 100644
index 000000000..fc52332b1
--- /dev/null
+++ b/libXfont/src/stubs/stubsinit.c
@@ -0,0 +1,82 @@
+#include "stubs.h"
+
+#if defined(NO_WEAK_SYMBOLS) && defined(PIC)
+
+#ifdef WIN32
+#include <X11/Xwindows.h>
+#define DLOPEN_SELF() GetModuleHandle(NULL)
+#define DLSYM(h,f) GetProcAddress(h,f)
+#else
+#include <dlfcn.h>
+#define DLOPEN_SELF() dlopen(NULL, RTLD_LOCAL)
+#define DLSYM(h,f) dlsym(h, f)
+#endif
+
+int (*__client_auth_generation)(ClientPtr) = NULL;
+Bool (*__ClientSignal)(ClientPtr) = NULL;
+void (*__DeleteFontClientID)(Font) = NULL;
+void (*__VErrorF)(const char *, va_list) = NULL;
+FontPtr (*__find_old_font)(FSID) = NULL;
+FontResolutionPtr (*__GetClientResolutions)(int *) = NULL;
+int (*__GetDefaultPointSize)(void) = NULL;
+Font (*__GetNewFontClientID)(void) = NULL;
+unsigned long (*__GetTimeInMillis)(void) = NULL;
+int (*__init_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr) = NULL;
+int (*__RegisterFPEFunctions)(NameCheckFunc, InitFpeFunc, FreeFpeFunc,
+ ResetFpeFunc, OpenFontFunc, CloseFontFunc, ListFontsFunc,
+ StartLfwiFunc, NextLfwiFunc, WakeupFpeFunc, ClientDiedFunc,
+ LoadGlyphsFunc, StartLaFunc, NextLaFunc, SetPathFunc) = NULL;
+void (*__remove_fs_handlers)(FontPathElementPtr, BlockHandlerProcPtr, Bool) = NULL;
+void **__ptr_serverClient = NULL;
+int (*__set_font_authorizations)(char **, int *, ClientPtr) = NULL;
+int (*__StoreFontClientFont)(FontPtr, Font) = NULL;
+Atom (*__MakeAtom)(const char *, unsigned, int) = NULL;
+int (*__ValidAtom)(Atom) = NULL;
+char *(*__NameForAtom)(Atom) = NULL;
+unsigned long *__ptr_serverGeneration = NULL;
+void (*__register_fpe_functions)(void) = NULL;
+
+#define INIT_SYMBOL(sym) \
+ if (!__##sym) \
+ __##sym = (typeof(__##sym)) DLSYM(handle, #sym)
+#define INIT_DATA(sym) \
+ if (!__ptr_##sym) \
+ __ptr_##sym = (typeof(__ptr_##sym)) DLSYM(handle, #sym)
+
+int
+_font_init_stubs (void)
+{
+ static int inited = FALSE;
+ static void *handle = NULL;
+
+ if (inited)
+ return inited;
+ if (!handle)
+ handle = DLOPEN_SELF();
+
+ INIT_SYMBOL(client_auth_generation);
+ INIT_SYMBOL(ClientSignal);
+ INIT_SYMBOL(DeleteFontClientID);
+ INIT_SYMBOL(VErrorF);
+ INIT_SYMBOL(find_old_font);
+ INIT_SYMBOL(GetClientResolutions);
+ INIT_SYMBOL(GetDefaultPointSize);
+ INIT_SYMBOL(GetNewFontClientID);
+ INIT_SYMBOL(GetTimeInMillis);
+ INIT_SYMBOL(init_fs_handlers);
+ INIT_SYMBOL(RegisterFPEFunctions);
+ INIT_SYMBOL(remove_fs_handlers);
+ INIT_SYMBOL(set_font_authorizations);
+ INIT_SYMBOL(StoreFontClientFont);
+ INIT_SYMBOL(MakeAtom);
+ INIT_SYMBOL(ValidAtom);
+ INIT_SYMBOL(NameForAtom);
+ INIT_SYMBOL(register_fpe_functions);
+ INIT_DATA(serverClient);
+ INIT_DATA(serverGeneration);
+
+ inited = TRUE;
+ return inited;
+}
+
+#endif /* NO_WEAK_SYMBOLS && PIC */
diff --git a/libXfont/src/util/Makefile.in b/libXfont/src/util/Makefile.in
index a1675f9d9..2b2c721d8 100644
--- a/libXfont/src/util/Makefile.in
+++ b/libXfont/src/util/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c
index 37811f91e..5f7f1c66d 100644
--- a/libXfont/src/util/atom.c
+++ b/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/libXfont/src/util/fontaccel.c b/libXfont/src/util/fontaccel.c
index c5915dba9..db03e73b5 100644
--- a/libXfont/src/util/fontaccel.c
+++ b/libXfont/src/util/fontaccel.c
@@ -82,7 +82,7 @@ FontComputeInfoAccelerators(FontInfoPtr pFontInfo)
pFontInfo->inkInside = FALSE;
}
-int
+int
FontCouldBeTerminal(FontInfoPtr pFontInfo)
{
if ((pFontInfo->minbounds.leftSideBearing >= 0) &&
@@ -95,7 +95,7 @@ FontCouldBeTerminal(FontInfoPtr pFontInfo)
pFontInfo->minbounds.ascent != pFontInfo->fontAscent ||
pFontInfo->minbounds.descent != pFontInfo->fontDescent)) {
/* blow off font with nothing but a SPACE */
- if (pFontInfo->maxbounds.ascent == 0 &&
+ if (pFontInfo->maxbounds.ascent == 0 &&
pFontInfo->maxbounds.descent == 0)
return FALSE;
return TRUE;
diff --git a/libXfont/src/util/fontutil.c b/libXfont/src/util/fontutil.c
index 22f6119ae..2c5ea6f3b 100644
--- a/libXfont/src/util/fontutil.c
+++ b/libXfont/src/util/fontutil.c
@@ -45,10 +45,10 @@ static int defaultGlyphCachingMode = DEFAULT_GLYPH_CACHING_MODE;
int glyphCachingMode = DEFAULT_GLYPH_CACHING_MODE;
void
-GetGlyphs(FontPtr font,
- unsigned long count,
- unsigned char *chars,
- FontEncoding fontEncoding,
+GetGlyphs(FontPtr font,
+ unsigned long count,
+ unsigned char *chars,
+ FontEncoding fontEncoding,
unsigned long *glyphcount, /* RETURN */
CharInfoPtr *glyphs) /* RETURN */
{
@@ -59,9 +59,9 @@ GetGlyphs(FontPtr font,
#define MAX(a,b) ((a)>(b)?(a):(b))
void
-QueryGlyphExtents(FontPtr pFont,
- CharInfoPtr *charinfo,
- unsigned long count,
+QueryGlyphExtents(FontPtr pFont,
+ CharInfoPtr *charinfo,
+ unsigned long count,
ExtentInfoRec *info)
{
register unsigned long i;
@@ -131,9 +131,9 @@ QueryGlyphExtents(FontPtr pFont,
}
Bool
-QueryTextExtents(FontPtr pFont,
- unsigned long count,
- unsigned char *chars,
+QueryTextExtents(FontPtr pFont,
+ unsigned long count,
+ unsigned char *chars,
ExtentInfoRec *info)
{
xCharInfo **charinfo;
@@ -182,7 +182,7 @@ QueryTextExtents(FontPtr pFont,
}
cm = pFont->info.constantMetrics;
pFont->info.constantMetrics = FALSE;
- QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal,
+ QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal,
n - firstReal, info);
pFont->info.constantMetrics = cm;
free(charinfo);
@@ -227,9 +227,9 @@ SetGlyphCachingMode(int newmode)
/* add_range(): Add range to a list of ranges, with coalescence */
int
-add_range(fsRange *newrange,
- int *nranges,
- fsRange **range,
+add_range(fsRange *newrange,
+ int *nranges,
+ fsRange **range,
Bool charset_subset)
{
int first, last, middle;
diff --git a/libXfont/src/util/format.c b/libXfont/src/util/format.c
index f5424fe41..c1f9762fa 100644
--- a/libXfont/src/util/format.c
+++ b/libXfont/src/util/format.c
@@ -6,11 +6,11 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Network Computing Devices or Digital
- * not be used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Network Computing
- * Devices and Digital make no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. Network Computing
+ * Devices and Digital make no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
@@ -59,12 +59,12 @@ from The Open Group.
#include <X11/fonts/fontutil.h>
int
-CheckFSFormat(fsBitmapFormat format,
- fsBitmapFormatMask fmask,
- int *bit_order,
- int *byte_order,
- int *scan,
- int *glyph,
+CheckFSFormat(fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ int *bit_order,
+ int *byte_order,
+ int *scan,
+ int *glyph,
int *image)
{
/* convert format to what the low levels want */
diff --git a/libXfont/src/util/miscutil.c b/libXfont/src/util/miscutil.c
index 3d802d2f5..631748f67 100644
--- a/libXfont/src/util/miscutil.c
+++ b/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
+extern unsigned long serverGeneration;
+
+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/libXfont/src/util/patcache.c b/libXfont/src/util/patcache.c
index 548105a00..210101584 100644
--- a/libXfont/src/util/patcache.c
+++ b/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;
@@ -66,7 +66,7 @@ void
EmptyFontPatternCache (FontPatternCachePtr cache)
{
int i;
-
+
for (i = 0; i < NBUCKETS; i++)
cache->buckets[i] = 0;
for (i = 0; i < NENTRIES; i++)
@@ -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);
}
@@ -127,9 +127,9 @@ Hash (const char *string, int len)
/* add entry */
void
-CacheFontPattern (FontPatternCachePtr cache,
- char *pattern,
- int patlen,
+CacheFontPattern (FontPatternCachePtr cache,
+ const char *pattern,
+ int patlen,
FontPtr pFont)
{
FontPatternCacheEntryPtr e;
@@ -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);
@@ -173,8 +173,8 @@ CacheFontPattern (FontPatternCachePtr cache,
/* find matching entry */
FontPtr
-FindCachedFontPattern (FontPatternCachePtr cache,
- char *pattern,
+FindCachedFontPattern (FontPatternCachePtr cache,
+ const char *pattern,
int patlen)
{
int hash;
@@ -195,7 +195,7 @@ FindCachedFontPattern (FontPatternCachePtr cache,
}
void
-RemoveCachedFontPattern (FontPatternCachePtr cache,
+RemoveCachedFontPattern (FontPatternCachePtr cache,
FontPtr pFont)
{
FontPatternCacheEntryPtr e;
@@ -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;
}
}
diff --git a/libXfont/src/util/private.c b/libXfont/src/util/private.c
index 36715b1fa..e55e19368 100644
--- a/libXfont/src/util/private.c
+++ b/libXfont/src/util/private.c
@@ -42,7 +42,7 @@ AllocateFontPrivateIndex (void)
return _FontPrivateAllocateIndex++;
}
-FontPtr
+FontPtr
CreateFontRec (void)
{
FontPtr pFont;
@@ -51,7 +51,7 @@ CreateFontRec (void)
size = sizeof(FontRec) + (sizeof(pointer) * _FontPrivateAllocateIndex);
pFont = malloc(size);
-
+
if(pFont) {
bzero((char*)pFont, size);
pFont->maxPrivate = _FontPrivateAllocateIndex - 1;
diff --git a/libXfont/src/util/utilbitmap.c b/libXfont/src/util/utilbitmap.c
index 619f72eaa..3790365ee 100644..100755
--- a/libXfont/src/util/utilbitmap.c
+++ b/libXfont/src/util/utilbitmap.c
@@ -38,8 +38,8 @@ in this Software without prior written authorization from The Open Group.
*/
int
-RepadBitmap (char *pSrc, char *pDst,
- unsigned int srcPad, unsigned int dstPad,
+RepadBitmap (char *pSrc, char *pDst,
+ unsigned int srcPad, unsigned int dstPad,
int width, int height)
{
int srcWidthBytes,dstWidthBytes;
@@ -47,33 +47,33 @@ RepadBitmap (char *pSrc, char *pDst,
char *pTmpSrc,*pTmpDst;
switch (srcPad) {
- case 1:
+ case 1:
srcWidthBytes = (width+7)>>3;
break;
case 2:
srcWidthBytes = ((width+15)>>4)<<1;
break;
- case 4:
+ case 4:
srcWidthBytes = ((width+31)>>5)<<2;
break;
- case 8:
- srcWidthBytes = ((width+63)>>6)<<3;
+ case 8:
+ srcWidthBytes = ((width+63)>>6)<<3;
break;
default:
return 0;
}
switch (dstPad) {
- case 1:
+ case 1:
dstWidthBytes = (width+7)>>3;
break;
case 2:
dstWidthBytes = ((width+15)>>4)<<1;
break;
- case 4:
+ case 4:
dstWidthBytes = ((width+31)>>5)<<2;
break;
- case 8:
- dstWidthBytes = ((width+63)>>6)<<3;
+ case 8:
+ dstWidthBytes = ((width+63)>>6)<<3;
break;
default:
return 0;
diff --git a/packages.txt b/packages.txt
index 01efc6b32..162081ecf 100644
--- a/packages.txt
+++ b/packages.txt
@@ -54,7 +54,7 @@ libXau git version
libXaw-1.0.12
libXdmcp git version
libXext git version
-libXfont-1.4.8
+libXfont-1.5.0
libXft git version
libXinerama git version
libXmu git version