--- /dev/null
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
--- /dev/null
+commit a52174d1a7562a656559f9bb728a80982b814043
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Oct 20 22:35:18 2010 -0700
+
+ libfontenc 1.1.0
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit af4a0a752c169b2c003978c550d57602af3fbe01
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri May 14 20:15:18 2010 -0700
+
+ Don't need to check if pointer is NULL before calling free()
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+
+commit 2218195ebb18b620f9e8e0adbea6f7c87ace33ce
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri May 14 20:09:21 2010 -0700
+
+ Replace malloc(strlen()) + strcpy() with strdup()
+
+ Now that we use malloc directly instead of xalloc, we can use
+ strdup directly too.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+
+commit 4af0cf6ef7309df18c81a1fd109a168c767d9f3d
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Mon May 10 22:52:42 2010 +0700
+
+ Nuke unnecessary casts
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cfc89d09f1bf0ecbe602578fc80dcf6fe46b1c54
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Mon May 10 22:52:41 2010 +0700
+
+ Expand xalloc/xrealloc/xfree macros
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3db0064e4b6108716767b136ba5867c4cdf57f99
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Mon May 10 22:52:40 2010 +0700
+
+ unifdef FONTENC_NO_LIBFONT
+
+ This symbol was unconditionally defined in Makefile
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 8029fc07fc28e427979c81dd50087083e441d65d
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Mon May 10 22:52:39 2010 +0700
+
+ Nuke RCS tags
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3e00a8c322ea5fd8ea21f83f5861c59aa91ce341
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Mar 29 16:50:34 2010 -0400
+
+ config: update AC_PREREQ statement to 2.60
+
+ Unrelated to the previous patches, the new value simply reflects
+ the reality that the minimum level for autoconf to configure
+ all x.org modules is 2.60 dated June 2006.
+
+ ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 0191826dd2f0fc54dfce72ce729d142ddecbabcf
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Mar 29 14:53:49 2010 -0400
+
+ config: remove the pkgconfig pc.in file from EXTRA_DIST
+
+ Automake always includes it in the tarball.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d2d6e4d88b62aa84e2cc9d229adf32ede81cbf5c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Feb 16 10:37:21 2010 -0500
+
+ config: move CWARNFLAGS from configure.ac to Makefile.am
+
+ Compiler warning flags should be explicitly set in the makefile
+ rather than being merged with other packages compiler flags.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b3807dccab5aee5455137654647c9c083addb31e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Nov 27 20:56:05 2009 -0500
+
+ Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+
+ Now that the INSTALL file is generated.
+ Allows running make maintainer-clean.
+
+commit 79c70fcf676778192e1d7bb0a194d75cb7227506
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Oct 28 14:09:10 2009 -0400
+
+ INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+
+ Add missing INSTALL file. Use standard GNU file on building tarball
+ README may have been updated
+ Remove AUTHORS file as it is empty and no content available yet.
+ Remove NEWS file as it is empty and no content available yet.
+
+commit e7337c1598b8f258122a1f1307b3c83ab6c74a9c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Oct 27 15:07:25 2009 -0400
+
+ Deploy the new XORG_DEFAULT_OPTIONS #24242
+
+ This macro aggregate a number of existing macros that sets commmon
+ X.Org components configuration options. It shields the configuration file from
+ future changes.
+
+commit e3bd17c452be528f773bc976636ecc0c71bdba99
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Oct 26 22:08:43 2009 -0400
+
+ Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+
+ ChangeLog filename is known to Automake and requires no further
+ coding in the makefile.
+
+commit e6631b8352ff83ee69c1076846b4500304d978eb
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Oct 22 12:34:20 2009 -0400
+
+ .gitignore: use common defaults with custom section # 24239
+
+ Using common defaults will reduce errors and maintenance.
+ Only the very small or inexistent custom section need periodic maintenance
+ when the structure of the component changes. Do not edit defaults.
+
+commit 6210f1d458fa765699412b404fb88e40aeebf9e0
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Wed Oct 21 12:47:27 2009 -0700
+
+ This is not a GNU project, so declare it foreign.
+
+ On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
+ > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
+ > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
+ > > was quite annoying to work around since 'autoreconf -fvi' replaces
+ > > it and git wants to commit it. Should these files even be in git?
+ > > Can I nuke them for the betterment of humanity and since they get
+ > > created by autoreconf anyways?
+ >
+ > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
+
+ As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
+ AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
+ of the INSTALL file. It is also part of the 24206 solution.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit eb4dbb8aac0858e1ee7169b2e0b90d5e3223de59
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Tue Oct 13 18:37:00 2009 -0700
+
+ Use font-utils 1.1 macros to find encodings path
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit e609e939f8b2573ac50bdd317733a2fef194965a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Aug 28 14:14:11 2009 +1000
+
+ libfontenc 1.0.5
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 8a0bd244c5da5baae73c51e45b075b1412682e43
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Feb 2 20:34:38 2009 -0800
+
+ Add README with pointers to mailing list, bugzilla & git repos
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit f160a71e9501a9d650fd99e9a080970bfd520abb
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Wed Jan 28 16:25:32 2009 -0200
+
+ Janitor: Correct make distcheck and compiler warnings.
+
+commit 90f2dfbc40d6fa72213f508b0dd85f00965b6194
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 6 15:51:21 2007 -0500
+
+ Add missing PHONY line for automatic ChangeLog generation
+
+commit 1b4ca41a58016053220047b9f77a2eec812c03a0
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Dec 16 01:19:45 2006 +0200
+
+ bump to 1.0.4
+
+commit 38855c00c9efe88af97a5f8208c2e6aef0e9e93f
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Wed Dec 6 18:57:29 2006 +0200
+
+ Makefile.am: make ChangeLog hook safer
+ Make ChangeLog hook as safe as possible.
+
+commit 111a9501c2c01d4b4f00ed221035953bfb256898
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Fri Oct 13 15:20:48 2006 -0400
+
+ Bump to 1.0.3
+
+commit fc19e19275c213f5122b120e7b45f63c302916a1
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Thu Oct 12 18:35:04 2006 -0400
+
+ Fix ChangeLog hook to distcheck.
+
+commit 2de626b53827fa1365c149c3fd2e1e280f8691e2
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 19:31:23 2006 -0700
+
+ Mark character mapping data tables as const
+
+commit 2daccee698507b27113e89b07af371905aa2bcd4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 19:13:17 2006 -0700
+
+ Clear sparse warnings: Using plain integer as NULL pointer
+
+commit b00dcc90e490454fdd983b4bf6d0fa92ab91d0be
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 18:50:44 2006 -0700
+
+ Add XORG_WITH_LINT support for checking source code with lint/sparse/etc.
+
+commit 5d18f978c9085c3c9d9a44c90e73055125e11a68
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 18:50:07 2006 -0700
+
+ Clear sparse warning: non-ANSI function declaration of function 'FontEncDirectory'
+
+commit 1dc8867f53a81d6e1c413d393039747668d27bd4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 18:34:20 2006 -0700
+
+ Replace static ChangeLog with dist-hook to generate from git log
+
+commit 81b27280717dc7e06a9ebbd196fae03a9e719db3
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 18:32:38 2006 -0700
+
+ Add *~ to .gitignore to skip over emacs droppings
+
+commit 187ec5a0cd96c3b6b13b9ccae51e2828db7c6d3e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Wed Oct 4 18:32:07 2006 -0700
+
+ Copy copyright notice/license from source to COPYING
+
+commit 1a9f5d7cb1aba4d65b28b5cdcaa7b68053b733ee
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Jul 13 14:59:16 2006 -0700
+
+ renamed: .cvsignore -> .gitignore
+
+commit 2c2f63d0f17106964c808f8f0ec5bb58f35b4fe5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jun 3 06:33:40 2006 +0000
+
+ Coverity #1523: Dereferencing freed pointer "mapping"
+
+commit f991560c0f599d82b23380de4a681b0d218f5cef
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Apr 26 23:55:31 2006 +0000
+
+ Bump to 1.0.2
+
+commit a9604c242f7f53a8cd26a2764c1a96e25ea2e1a7
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Apr 10 16:15:12 2006 +0000
+
+ Fix another file descriptor leak (related to previous Coverity #544)
+
+commit d86b38b96854bc60d4a2c4595e73cf53aa36d85c
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Fri Apr 7 00:35:36 2006 +0000
+
+ Coverity #544: File a file descriptor leak.
+
+commit 78f355698128454370590040699c2141ae69d7d9
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Dec 21 02:30:06 2005 +0000
+
+ Update package version for X11R7 release.
+
+commit c7a14086fbe226169f7ea5df80c4d885082fb732
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Dec 19 16:28:28 2005 +0000
+
+ Stub COPYING files
+
+commit 55035bfbae0ca22399623d78411cc50bfdee2705
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:36 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit d146b3a17228204ce0fe3bcca72de53cedebf5fb
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Dec 9 06:07:14 2005 +0000
+
+ Bug #5175: Make encodingsdir configurable (David Coulthart and Kevin E.
+ Martin)
+
+commit acb0d67e5f0293f960a923cda6eb359a82f7036e
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 05:49:46 2005 +0000
+
+ Update package version number for X11R7 RC3 release.
+
+commit c2e139f8726cde5bbae609865b609f087b3f651b
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Nov 19 07:15:44 2005 +0000
+
+ Update pkgconfig files to separate library build-time dependencies from
+ application build-time dependencies, and update package deps to work
+ with separate build roots.
+
+commit 21b115927640683b90fc1304f7b921da51aabf64
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Nov 9 21:19:14 2005 +0000
+
+ Update package version number for X11R7 RC2 release.
+
+commit d9ece44e76f0c2dcfacb5ff00e59cae2741e3c96
+Author: Kean Johnson <kean@armory.com>
+Date: Tue Nov 8 06:33:26 2005 +0000
+
+ See ChangeLog entry 2005-11-07 for details.
+
+commit 632f53206e104b372db255c5171c3479d87b683b
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:48:12 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit 49e4c36c1bf2ccc3af576c489abf76bea4bf64b1
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Aug 3 03:28:03 2005 +0000
+
+ Do PKG_CHECK_MODULES on a unique token instead of on "DEP", so builds with
+ a global configure cache don't get confused.
+
+commit 8a6fb4344eb5c13198125996e43a0898a19818f8
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:54 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 9e8be492f61095813f5e9b01c8d54ffb1550f339
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Jul 16 07:51:05 2005 +0000
+
+ Set soversion to 1.0 using -version-number.
+
+commit 11b206733618d73946a8c298d2d5f2183075657f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Jul 13 16:51:34 2005 +0000
+
+ Update INCLUDES to find <X11/fonts/fontenc.h>
+
+commit 85094af610ba990c6bc2377eff1f6f31dffd48e2
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jul 12 21:05:28 2005 +0000
+
+ Remove encodings build system from libfontenc
+
+commit 8deaa94831b1a5926db928a68a6acbbe3ee9a904
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Jul 9 23:31:40 2005 +0000
+
+ Switch from monolithic configuration symbols to modular ones, add backward
+ compatibility for monolithic symbols
+
+commit ec602c9639e4eedb36a570943999fea0a07b5f8c
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Jul 9 21:15:50 2005 +0000
+
+ Add .cvsignore files
+ Depend on xproto, not x11 so we do not link against -X11
+
+commit 0767d4880359983cbe83a4ea396d81efb5d6882b
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sun Jul 3 07:01:00 2005 +0000
+
+ Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
+ Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
+ Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
+ source files in the xserver/xorg tree, predicated on defines of
+ HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
+ <X11/fonts/foo.h>.
+
+commit f6c6acf593686015fa639e3583f70cc6d5f5d7b3
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date: Thu Jun 30 13:21:11 2005 +0000
+
+ Check for zlib
+
+commit 092271385632708fb5dd53dca3dcfc3ead06ef6c
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jun 28 15:40:27 2005 +0000
+
+ modularizeapp.sh: initialize LAST to "" symlink.sh: Add bitmaps for oclock,
+ and an extra textfile for pclcomp
+
+commit 21e552451c095c5668a57765c2eb941750e00ecd
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jun 28 14:48:02 2005 +0000
+
+ Add generation of encodings.dir
+
+commit a18d9ec0c4bfa36460d5e3eba1c5fb8a90086500
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jun 28 14:17:12 2005 +0000
+
+ Add encodings to fontenc build system, plus various fixes to make it
+ distcheck.
+
+commit bcdcaebcd2127f4e7e1c368f341a781b4cf8af6b
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Mon Jun 27 16:09:14 2005 +0000
+
+ - Remove fontenc from Xfont
+ - Add a dependency from Xfont on libfontenc
+ - Add build system for lib/fontenc
+ - xc/lib/font: Change #include "fontenc.h" to #include
+ <X11/fonts/fontenc.h> in some places.
+ - Remove dpsinfo and dpsexec from the app section of symlink.sh
+ - Fix xp.pc.in to add XPRINT_LIBS/CFLAGS instead of X_LIBS/CFLAGS
+
+commit e80fd1617092d128d54a9400a4974ffafbb3083e
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 18:44:23 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit 072f90aeb09035953b966233059139d161d3a5f0
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:32:36 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 7fb87aa305856f07d7a57b3296ade04b1f012f1a
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:11:43 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 993a15d0255a72bdfbc6c2c43e9c164f0919e682
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:35:35 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit eec99218eac07b50f0d25c2789abb5dfcc8f6c9d
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:22:53 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit faa2a922a0dbd16844055f83a159dab92a383376
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Mon Feb 23 20:34:43 2004 +0000
+
+ Import most of XFree86 4.4RC3. This import excludes files which have the
+ new license. If we want to, later we can import 4.4RC3 again and pick
+ up the files that have the new license, but for now the vendor branch
+ is "pure."
+
+commit 7ea6ca71ac6825b9a28510f23c35d8b480752c41
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Dec 19 20:54:44 2003 +0000
+
+ XFree86 4.3.99.902 (RC 2)
+
+commit f431cd8bc5d7fb3a385609c9ac99deabb79ab023
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:50 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit f1b010ee7ae89b23af8fe4c92103db775ae35aed
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:48:50 2003 +0000
+
+ Initial revision
--- /dev/null
+#
+# Copyright 2005 Red Hat, Inc.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# 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 name of Red Hat not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Red Hat makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL RED HAT 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 CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+SUBDIRS = src
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontenc.pc
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+if LINT
+lint:
+ (cd src && $(MAKE) $(MFLAGS) lint)
+endif LINT
--- /dev/null
+libfontenc - font encoding library
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/lib/libfontenc
+
+ http://cgit.freedesktop.org/xorg/lib/libfontenc
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
--- /dev/null
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+aclocal -I m4
+libtoolize
+autoheader
+automake --add-missing
+autoconf -I m4
+#autoreconf -v --install -I m4 || exit 1
+
+cd $ORIGDIR || exit $?
+
+#$srcdir/configure --enable-maintainer-mode "$@"
--- /dev/null
+
+dnl Copyright 2005 Red Hat, Inc.
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Red Hat not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Red Hat makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+
+AC_INIT([libfontenc], [1.1.0],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+ [libfontenc])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+AM_CONFIG_HEADER(config.h)
+
+# Check for progs
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Require X.Org's font util macros 1.1 or later for XORG_FONTROOTDIR
+m4_ifndef([XORG_FONT_MACROS_VERSION],
+ [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
+XORG_FONT_MACROS_VERSION(1.1)
+
+XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings])
+
+# zlib
+
+AC_CHECK_LIB(z, gzclose)
+
+# Check for dependencies
+PKG_CHECK_MODULES(FONTENC, xproto)
+
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+LINT_FLAGS="${LINT_FLAGS} ${FONTENC_CFLAGS}"
+
+
+AC_OUTPUT([Makefile
+ src/Makefile
+ fontenc.pc])
--- /dev/null
+------------------------------------------------------
+Quick Guide To Patching This Package For The Impatient
+------------------------------------------------------
+
+1. Make sure you have quilt installed
+2. Unpack the package as usual with "dpkg-source -x"
+3. Run the "patch" target in debian/rules
+4. Create a new patch with "quilt new" (see quilt(1))
+5. Edit all the files you want to include in the patch with "quilt edit"
+ (see quilt(1)).
+6. Write the patch with "quilt refresh" (see quilt(1))
+7. Run the "clean" target in debian/rules
+
+Alternatively, instead of using quilt directly, you can drop the patch in to
+debian/patches and add the name of the patch to debian/patches/series.
+
+------------------------------------
+Guide To The X Strike Force Packages
+------------------------------------
+
+The X Strike Force team maintains X packages in git repositories on
+git.debian.org in the pkg-xorg subdirectory. Most upstream packages
+are actually maintained in git repositories as well, so they often
+just need to be pulled into git.debian.org in a "upstream-*" branch.
+Otherwise, the upstream sources are manually installed in the Debian
+git repository.
+
+The .orig.tar.gz upstream source file could be generated this
+"upstream-*" branch in the Debian git repository but it is actually
+copied from upstream tarballs directly.
+
+Due to X.org being highly modular, packaging all X.org applications
+as their own independent packages would have created too many Debian
+packages. For this reason, some X.org applications have been grouped
+into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils,
+x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils.
+Most packages, including the X.org server itself and all libraries
+and drivers are, however maintained independently.
+
+The Debian packaging is added by creating the "debian-*" git branch
+which contains the aforementioned "upstream-*" branch plus the debian/
+repository files.
+When a patch has to be applied to the Debian package, two solutions
+are involved:
+* If the patch is available in one of the upstream branches, it
+ may be git'cherry-picked into the Debian repository. In this
+ case, it appears directly in the .diff.gz.
+* Otherwise, the patch is added to debian/patches/ which is managed
+ with quilt as documented in /usr/share/doc/quilt/README.source.
+
+quilt is actually invoked by the Debian X packaging through a larger
+set of scripts called XSFBS. XSFBS brings some other X specific
+features such as managing dependencies and conflicts due to the video
+and input driver ABIs.
+XSFBS itself is maintained in a separate repository at
+ git://git.debian.org/pkg-xorg/xsfbs.git
+and it is pulled inside the other Debian X repositories when needed.
+
+The XSFBS patching system requires a build dependency on quilt. Also
+a dependency on $(STAMP_DIR)/patch has to be added to debian/rules
+so that the XSFBS patching occurs before the actual build. So the
+very first target of the build (likely the one running autoreconf)
+should depend on $(STAMP_DIR)/patch. It should also not depend on
+anything so that parallel builds are correctly supported (nothing
+should probably run while patching is being done). And finally, the
+clean target should depend on the xsfclean target so that patches
+are unapplied on clean.
+
+When the upstream sources contain some DFSG-nonfree files, they are
+listed in text files in debian/prune/ in the "debian-*" branch of
+the Debian repository. XSFBS' scripts then take care of removing
+these listed files during the build so as to generate a modified
+DFSG-free .orig.tar.gz tarball.
--- /dev/null
+libfontenc (1:1.1.0-3slp2) unstable; urgency=low
+
+ * Avoid autoreconf as it has trouble in SB1
+ * Git: 165.213.180.234:slp/pkgs/xorg/lib/libfontenc
+ * Tag: libfontenc_1.1.0-3slp2
+
+ -- Sung-Jin Park <sj76.park@samsung.com> Wed, 30 Mar 2011 16:25:12 +0900
+
+libfontenc (1:1.1.0-2slp2) unstable; urgency=low
+
+ * Remove dependency on xfonts-utils
+ * Git: 165.213.180.234:slp/pkgs/xorg/lib/libfontenc
+ * Tag: libfontenc_1.1.0-2slp2
+
+ -- Sung-Jin Park <sj76.park@samsung.com> Tue, 29 Mar 2011 17:26:01 +0900
+
+libfontenc (1:1.1.0-1slp2) unstable; urgency=low
+
+ * [X11R7.6] upgrade package
+ * Git: 165.213.180.234:slp/pkgs/xorg/lib/libfontenc
+ * Tag: libfontenc_1.1.0-1slp2
+
+ -- SooChan Lim <sc1.lim@samsung.com> Mon, 03 Jan 2011 21:54:08 +0900
+
+libfontenc (1:1.0.5-5slp2) unstable; urgency=low
+
+ * Change the maintainer
+ * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libfontenc
+ * Tag: libfontenc_1.0.5-5slp2
+
+ -- SooChan Lim <sc1.lim@samsung.com> Thu, 02 Dec 2010 13:22:24 +0900
+
+libfontenc (1:1.0.5-4slp2) unstable; urgency=low
+
+ * Update maintainer
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
+ * Tag: libfontenc_1.0.5-4slp2
+
+ -- Sung-Jin Park <sj76.park@samsung.com> Wed, 21 Apr 2010 14:30:20 +0900
+
+libfontenc (1:1.0.5-3slp2) unstable; urgency=low
+
+ * modify the package name
+
+ -- SooChan Lim <sc1.lim@samsung.com> Thu, 25 Mar 2010 17:33:54 +0900
+
+libfontenc (1:1.0.5-2) unstable; urgency=low
+
+ [ Timo Aaltonen ]
+ * Drop pre-dependency on x11-common from libfontenc-dev. This was needed
+ for upgrades from sarge.
+
+ [ Julien Cristau ]
+ * Rename the build directory to not include DEB_BUILD_GNU_TYPE for no
+ good reason. Thanks, Colin Watson!
+ * Remove myself from Uploaders
+
+ [ Cyril Brulebois ]
+ * Add udeb needed for the graphical installer: libfontenc1-udeb.
+ * Add myself to Uploaders.
+ * Bump Standards-Version from 3.7.3 to 3.8.4 (no changes needed).
+
+ -- Cyril Brulebois <kibi@debian.org> Tue, 09 Mar 2010 01:40:29 +0100
+
+libfontenc (1:1.0.5-1) unstable; urgency=low
+
+ [ Brice Goglin ]
+ * Add upstream URL to debian/copyright.
+ * Add a link to www.X.org and a reference to the upstream module
+ in the long description.
+
+ [ Timo Aaltonen ]
+ * New upstream release.
+ * Bump Standards-Version to 3.8.3.
+ * Parse space-separated DEB_BUILD_OPTIONS, and handle parallel=N.
+ * Run autoreconf on build. Add build-deps on automake/libtool and
+ xutils-dev.
+
+ [ Julien Cristau ]
+ * Move -dbg package to the debug section.
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 23 Nov 2009 17:25:06 +0100
+
+libfontenc (1:1.0.4-3) unstable; urgency=low
+
+ * Remove Branden and Fabio from Uploaders with their permission.
+ * Add myself to Uploaders.
+ * Bump Standards-Version to 3.7.3.
+ * Drop the -1 debian revision from the x11proto-core-dev build-dep.
+ * Add Vcs-Git and Vcs-Browser control fields.
+ * libfontenc1{,-dbg} don't need to depend on x11-common.
+ * Use ${binary:Version} instead of the deprecated ${Source-Version}.
+ * Add proper Section control fields for binary packages.
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 12 May 2008 16:24:58 +0200
+
+libfontenc (1:1.0.4-2) unstable; urgency=low
+
+ * Uploading to unstable.
+
+ -- Julien Cristau <jcristau@debian.org> Tue, 10 Apr 2007 18:03:12 +0200
+
+libfontenc (1:1.0.4-1) experimental; urgency=low
+
+ * New upstream release.
+ * Drop obsolete CVS information from the package descriptions, and add
+ XS-Vcs-Git.
+ * Install the upstream changelog.
+
+ -- Julien Cristau <jcristau@debian.org> Fri, 9 Feb 2007 16:08:19 +0100
+
+libfontenc (1:1.0.2-2) unstable; urgency=low
+
+ [ Andres Salomon ]
+ * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build;
+ idempotency fix.
+
+ [ Drew Parsons ]
+ * dbg package has priority extra.
+
+ -- David Nusinow <dnusinow@debian.org> Tue, 29 Aug 2006 20:32:53 +0000
+
+libfontenc (1:1.0.2-1) experimental; urgency=low
+
+ * New upstream release
+ * Bump debhelper compat to 5
+ * Remove extra dep on x11-common from -dev package
+ * Version x11-common pre-dep in -dev package to be 1:7.0.0 to match the rest
+ of Debian and shut lintian up
+ * Bump standards version to 3.7.2.0
+
+ -- David Nusinow <dnusinow@debian.org> Mon, 3 Jul 2006 16:32:31 -0400
+
+libfontenc (1:1.0.1-6) unstable; urgency=low
+
+ [ David MartÃnez Moreno ]
+ * Fix the encoding path to ${datadir}/fonts/X11/encodings in order to
+ generate other encodings (the former one did not exist at all). Thanks
+ Liu Mars. Closes: #366097.
+
+ [ David Nusinow ]
+ * Run dh_install with --list-missing
+
+ -- David Nusinow <dnusinow@debian.org> Tue, 9 May 2006 01:07:49 -0400
+
+libfontenc (1:1.0.1-5) unstable; urgency=low
+
+ * Reorder makeshlib command in rules file so that ldconfig is run
+ properly. Thanks Drew Parsons and Steve Langasek.
+
+ -- David Nusinow <dnusinow@debian.org> Tue, 18 Apr 2006 21:50:03 -0400
+
+libfontenc (1:1.0.1-4) unstable; urgency=low
+
+ * Change --with-encodingsdir to \$${datadir}/fonts/X11/fonts/encodings.
+ Thanks to Denis Barbier and Xin Liu.
+
+ -- David Nusinow <dnusinow@debian.org> Sat, 15 Apr 2006 18:50:21 -0400
+
+libfontenc (1:1.0.1-3) unstable; urgency=low
+
+ * Build with --with-encodingsdir=${datadir}/X11/fonts/encodings to account
+ for where we install the encodings. Thanks Xin Liu. Thanks Daniel Stone
+ for the fix. (closes: #362722)
+
+ -- David Nusinow <dnusinow@debian.org> Sat, 15 Apr 2006 12:17:27 -0400
+
+libfontenc (1:1.0.1-2) unstable; urgency=low
+
+ * Upload to unstable
+
+ -- David Nusinow <dnusinow@debian.org> Thu, 23 Mar 2006 22:44:22 -0500
+
+libfontenc (1:1.0.1-1) experimental; urgency=low
+
+ * First upload to Debian
+
+ -- David Nusinow <dnusinow@debian.org> Thu, 29 Dec 2005 20:50:51 -0500
+
+libfontenc (1.0.0-1) breezy; urgency=low
+
+ * First libfontenc release.
+
+ -- Daniel Stone <daniel.stone@ubuntu.com> Mon, 16 May 2005 22:10:17 +1000
--- /dev/null
+Source: libfontenc
+Section: x11
+Priority: optional
+Maintainer: SooChan Lim <sc1.lim@samsung.com>, Sangjin Lee <lsj119@samsung.com>, Debian X Strike Force <debian-x@lists.debian.org>
+Uploaders: SooChan Lim <sc1.lim@samsung.com>, David Nusinow <dnusinow@debian.org>, Cyril Brulebois <kibi@debian.org>
+Build-Depends: debhelper (>= 5.0.0), x11proto-core-dev (>= 6.8.99.15+cvs.20050722), zlib1g-dev, pkg-config, automake, libtool, xutils-dev (>= 1:7.4+4)
+Standards-Version: 3.8.4
+Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libfontenc
+Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libfontenc.git
+
+Package: libfontenc1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: X11 font encoding library
+ libfontenc is a library which helps font libraries portably determine
+ and deal with different encodings of fonts.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libfontenc
+
+#Package: libfontenc1-udeb
+#XC-Package-Type: udeb
+#Section: debian-installer
+#Architecture: any
+#Depends: ${shlibs:Depends}, ${misc:Depends}
+#Description: X11 font encoding library
+# This is a udeb, or a microdeb, for the debian-installer.
+
+Package: libfontenc1-dbg
+Section: debug
+Architecture: any
+Priority: extra
+Depends: ${shlibs:Depends}, ${misc:Depends}, libfontenc1 (= ${binary:Version})
+Description: X11 font encoding library (debug package)
+ libfontenc is a library which helps font libraries portably determine
+ and deal with different encodings of fonts.
+ .
+ This package contains the debug versions of the library found in libfontenc1.
+ Non-developers likely have little use for this package.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libfontenc
+
+Package: libfontenc-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libfontenc1 (= ${binary:Version}), zlib1g-dev
+Description: X11 font encoding library (development headers)
+ libfontenc is a library which helps font libraries portably determine
+ and deal with different encodings of fonts.
+ .
+ This package contains the development headers for the library found in
+ libfontenc1. Non-developers likely have little use for this package.
+ .
+ More information about X.Org can be found at:
+ <URL:http://www.X.org>
+ <URL:http://xorg.freedesktop.org>
+ <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
+ .
+ This module can be found at
+ git://anongit.freedesktop.org/git/xorg/lib/libfontenc
--- /dev/null
+This package was downloaded from
+http://xorg.freedesktop.org/releases/individual/lib/
+
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
--- /dev/null
+usr/include/X11/*
+usr/lib/libfontenc.a
+usr/lib/libfontenc.la
+usr/lib/libfontenc.so
+usr/lib/pkgconfig/fontenc.pc
--- /dev/null
+usr/lib/libfontenc.so.1*
--- /dev/null
+usr/lib/libfontenc.so.1*
--- /dev/null
+#!/usr/bin/make -f
+# debian/rules for the Debian libfontenc package.
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
+# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
+# Copyright © 2005 David Nusinow <dnusinow@debian.org>
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# set this to the name of the main shlib's binary package
+PACKAGE = libfontenc1
+
+include debian/xsfbs/xsfbs.mk
+
+CFLAGS = -Wall -g
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ confflags += --build=$(DEB_HOST_GNU_TYPE)
+else
+ confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+# confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ #autoreconf -v -f -i -Im4
+ ./autogen.sh
+ mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
+ cd obj-$(DEB_BUILD_GNU_TYPE) && \
+ ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info $(confflags) \
+ --with-encodingsdir=\$${datadir}/fonts/X11/encodings \
+ CFLAGS="$(CFLAGS)"
+ cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
+ >$@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ rm -f config.cache config.log config.status
+ rm -f */config.cache */config.log */config.status
+ rm -f conftest* */conftest*
+ rm -rf autom4te.cache */autom4te.cache
+ rm -rf obj-*
+ rm -f INSTALL aclocal.m4 config.guess config.h.in config.sub configure
+ rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
+ find -name Makefile.in -exec rm -f {} \;
+ #find -name Makefile.in -delete
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+
+# dh_installdocs
+ dh_install --sourcedir=debian/tmp --list-missing
+# dh_installchangelogs ChangeLog
+ dh_link
+ dh_strip --dbg-package=$(PACKAGE)-dbg
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+# dh_makeshlibs --add-udeb=$(PACKAGE)-udeb
+ dh_shlibdeps
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-independent files here.
+binary-indep: build install
+# Nothing to do
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- /dev/null
+version=3
+http://xorg.freedesktop.org/releases/individual/lib/ libfontenc-(.*)\.tar\.gz
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if ! [ -d debian/prune ]; then
+ exit 0
+fi
+
+if [ "x$1" != x--upstream-version ]; then
+ exit 1
+fi
+
+version="$2"
+filename="$3"
+
+if [ -z "$version" ] || ! [ -f "$filename" ]; then
+ exit 1
+fi
+
+dir="$(pwd)"
+tempdir="$(mktemp -d)"
+
+cd "$tempdir"
+tar xf "$dir/$filename"
+cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
+
+tar czf "$dir/$filename" *
+cd "$dir"
+rm -rf "$tempdir"
+echo "Done pruning upstream tarball"
+
+exit 0
--- /dev/null
+#!/usr/bin/make -f
+
+# Debian X Strike Force Build System (XSFBS): Make portion
+
+# Copyright 1996 Stephen Early
+# Copyright 1997 Mark Eichin
+# Copyright 1998-2005, 2007 Branden Robinson
+# Copyright 2005 David Nusinow
+#
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+# Originally by Stephen Early <sde1000@debian.org>
+# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us>
+# Modified by Adam Heath <doogie@debian.org>
+# Modified by Branden Robinson <branden@debian.org>
+# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net>
+# Modified by David Nusinow <dnusinow@debian.org>
+# Acknowledgements to Manoj Srivastava.
+
+# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
+export DH_OPTIONS
+
+# force quilt to not use ~/.quiltrc and to use debian/patches
+QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null
+
+# Set up parameters for the upstream build environment.
+
+# Determine (source) package name from Debian changelog.
+SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \
+ | grep '^Source:' | awk '{print $$2}')
+
+# Determine package version from Debian changelog.
+SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \
+ | grep '^Version:' | awk '{print $$2}')
+
+# Determine upstream version number.
+UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//')
+
+# Determine the source version without the epoch for make-orig-tar-gz
+NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://')
+
+# Figure out who's building this package.
+BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}})
+
+# Find out if this is an official build; an official build has nothing but
+# digits, dots, and/or the codename of a release in the Debian part of the
+# version number. Anything else indicates an unofficial build.
+OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi)
+
+# Set up parameters for the Debian build environment.
+
+# Determine our architecture.
+BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+# Work around some old-time dpkg braindamage.
+BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH))
+# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy.
+ifdef DEB_HOST_ARCH
+ ARCH:=$(DEB_HOST_ARCH)
+else
+ # dpkg-cross sets the ARCH environment variable; if set, use it.
+ ifdef ARCH
+ ARCH:=$(ARCH)
+ else
+ ARCH:=$(BUILD_ARCH)
+ endif
+endif
+
+# $(STAMP_DIR) houses stamp files for complex targets.
+STAMP_DIR:=stampdir
+
+# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place
+# their files.
+DEBTREEDIR:=$(CURDIR)/debian/tmp
+
+# All "important" targets have four lines:
+# 1) A target name that is invoked by a package-building tool or the user.
+# This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart.
+# 2) A line delcaring 1) as a phony target (".PHONY:").
+# 3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may
+# depend on other targets.
+# 4) A line declaring 3) as a member of the $(stampdir_targets) variable; the
+# "$(STAMP_DIR)/" prefix is omitted.
+#
+# This indirection is needed so that the "stamp" files that signify when a rule
+# is done can be located in a separate "stampdir". Recall that make has no way
+# to know when a goal has been met for a phony target (like "build" or
+# "install").
+#
+# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@"
+# so that the target will not be run again. Removing the file will make Make
+# run the target over.
+
+# All phony targets should be declared as dependencies of .PHONY, even if they
+# do not have "($STAMP_DIR)/"-prefixed counterparts.
+
+# Define a harmless default rule to keep things from going nuts by accident.
+.PHONY: default
+default:
+
+# Set up the $(STAMP_DIR) directory.
+.PHONY: stampdir
+stampdir_targets+=stampdir
+stampdir: $(STAMP_DIR)/stampdir
+$(STAMP_DIR)/stampdir:
+ mkdir $(STAMP_DIR)
+ >$@
+
+# Set up the package build directory as quilt expects to find it.
+.PHONY: prepare
+stampdir_targets+=prepare
+prepare: $(STAMP_DIR)/prepare
+$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts
+ >$@
+
+.PHONY: log
+stampdir_targets+=log
+log: $(STAMP_DIR)/log
+$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir
+ mkdir -p $(STAMP_DIR)/log
+
+# Apply all patches to the upstream source.
+.PHONY: patch
+stampdir_targets+=patch
+patch: $(STAMP_DIR)/patch
+$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
+ if ! [ `which quilt` ]; then \
+ echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
+ exit 1; \
+ fi; \
+ if $(QUILT) next >/dev/null 2>&1; then \
+ echo -n "Applying patches..."; \
+ if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
+ cat $(STAMP_DIR)/log/patch; \
+ echo "successful."; \
+ else \
+ cat $(STAMP_DIR)/log/patch; \
+ echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "No patches to apply"; \
+ fi; \
+ >$@
+
+# Revert all patches to the upstream source.
+.PHONY: unpatch
+unpatch: $(STAMP_DIR)/log
+ rm -f $(STAMP_DIR)/patch
+ @echo -n "Unapplying patches..."; \
+ if $(QUILT) applied >/dev/null 2>/dev/null; then \
+ if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
+ cat $(STAMP_DIR)/log/unpatch; \
+ echo "successful."; \
+ else \
+ cat $(STAMP_DIR)/log/unpatch; \
+ echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "nothing to do."; \
+ fi
+
+# Clean the generated maintainer scripts.
+.PHONY: cleanscripts
+cleanscripts:
+ rm -f $(STAMP_DIR)/genscripts
+ rm -f debian/*.config \
+ debian/*.postinst \
+ debian/*.postrm \
+ debian/*.preinst \
+ debian/*.prerm
+
+# Clean the package build tree.
+.PHONY: xsfclean
+xsfclean: cleanscripts unpatch
+ dh_testdir
+ rm -rf .pc
+ rm -rf $(STAMP_DIR)
+ dh_clean
+
+# Remove files from the upstream source tree that we don't need, or which have
+# licensing problems. It must be run before creating the .orig.tar.gz.
+#
+# Note: This rule is for Debian package maintainers' convenience, and is not
+# needed for conventional build scenarios.
+.PHONY: prune-upstream-tree
+prune-upstream-tree:
+ # Ensure we're in the correct directory.
+ dh_testdir
+ grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
+
+# Verify that there are no offsets or fuzz in the patches we apply.
+#
+# Note: This rule is for Debian package maintainers' convenience, and is not
+# needed for conventional build scenarios.
+.PHONY: patch-audit
+patch-audit: prepare unpatch
+ @echo -n "Auditing patches..."; \
+ >$(STAMP_DIR)/log/patch; \
+ FUZZY=; \
+ while [ -n "$$($(QUILT) next)" ]; do \
+ RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
+ case "$$RESULT" in \
+ succeeded) \
+ echo "fuzzy patch: $$($(QUILT) top)" \
+ | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
+ FUZZY=yes; \
+ ;; \
+ FAILED) \
+ echo "broken patch: $$($(QUILT) next)" \
+ | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
+ exit 1; \
+ ;; \
+ esac; \
+ done; \
+ if [ -n "$$FUZZY" ]; then \
+ echo "there were fuzzy patches; please fix."; \
+ exit 1; \
+ else \
+ echo "done."; \
+ fi
+
+# Generate the maintainer scripts.
+.PHONY: genscripts
+stampdir_targets+=genscripts
+genscripts: $(STAMP_DIR)/genscripts
+$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir
+ for FILE in debian/*.config.in \
+ debian/*.postinst.in \
+ debian/*.postrm.in \
+ debian/*.preinst.in \
+ debian/*.prerm.in; do \
+ if [ -e "$$FILE" ]; then \
+ MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \
+ sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \
+ | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \
+ cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \
+ sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \
+ | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \
+ sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \
+ -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \
+ <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \
+ rm $$MAINTSCRIPT.tmp; \
+ fi; \
+ done
+ # Validate syntax of generated shell scripts.
+ #sh debian/scripts/validate-posix-sh debian/*.config \
+ # debian/*.postinst \
+ # debian/*.postrm \
+ # debian/*.preinst \
+ # debian/*.prerm
+ >$@
+
+SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
+VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
+INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
+SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
+VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
+INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
+ifeq ($(PACKAGE),)
+PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
+endif
+
+.PHONY: serverabi
+serverabi: install
+ifeq ($(SERVERMINVERS),)
+ @echo error: xserver-xorg-dev needs to be installed
+ @exit 1
+else
+ echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars
+ echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
+ echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
+endif
+
+# vim:set noet ai sts=8 sw=8 tw=0:
--- /dev/null
+# This is the X Strike Force shell library for X Window System package
+# maintainer scripts. It serves to define shell functions commonly used by
+# such packages, and performs some error checking necessary for proper operation
+# of those functions. By itself, it does not "do" much; the maintainer scripts
+# invoke the functions defined here to accomplish package installation and
+# removal tasks.
+
+# If you are reading this within a Debian package maintainer script (e.g.,
+# /var/lib/dpkg/info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can
+# skip past this library by scanning forward in this file to the string
+# "GOBSTOPPER".
+
+SOURCE_VERSION=@SOURCE_VERSION@
+OFFICIAL_BUILD=@OFFICIAL_BUILD@
+
+# Use special abnormal exit codes so that problems with this library are more
+# easily tracked down.
+SHELL_LIB_INTERNAL_ERROR=86
+SHELL_LIB_THROWN_ERROR=74
+SHELL_LIB_USAGE_ERROR=99
+
+# old -> new variable names
+if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then
+ DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE"
+fi
+if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then
+ DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF"
+fi
+
+# initial sanity checks
+if [ -z "$THIS_PACKAGE" ]; then
+ cat >&2 <<EOF
+Error: package maintainer script attempted to use shell library without
+definining \$THIS_PACKAGE shell variable. Please report the package name,
+version, and the text of this error message to the Debian Bug Tracking System.
+Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
+instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
+"doc-debian" package, or install the "reportbug" package and use the command of
+the same name to file a report against version $SOURCE_VERSION of this package.
+EOF
+ exit $SHELL_LIB_USAGE_ERROR
+fi
+
+if [ -z "$THIS_SCRIPT" ]; then
+ cat >&2 <<EOF
+Error: package maintainer script attempted to use shell library without
+definining \$THIS_SCRIPT shell variable. Please report the package name,
+version, and the text of this error message to the Debian Bug Tracking System.
+Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
+instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
+"doc-debian" package, or install the "reportbug" package and use the command of
+the same name to file a report against version $SOURCE_VERSION of the
+"$THIS_PACKAGE" package.
+EOF
+ exit $SHELL_LIB_USAGE_ERROR
+fi
+
+if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ RECONFIGURE="true"
+else
+ RECONFIGURE=
+fi
+
+if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then
+ FIRSTINST="yes"
+fi
+
+if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then
+ UPGRADE="yes"
+fi
+
+trap "message;\
+ message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\
+ message;\
+ exit 1" HUP INT QUIT TERM
+
+reject_nondigits () {
+ # syntax: reject_nondigits [ operand ... ]
+ #
+ # scan operands (typically shell variables whose values cannot be trusted) for
+ # characters other than decimal digits and barf if any are found
+ while [ -n "$1" ]; do
+ # does the operand contain anything but digits?
+ if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then
+ # can't use die(), because it wraps message() which wraps this function
+ echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \
+ "possibly malicious garbage \"$1\"" >&2
+ exit $SHELL_LIB_THROWN_ERROR
+ fi
+ shift
+ done
+}
+
+reject_unlikely_path_chars () {
+ # syntax: reject_unlikely_path_chars [ operand ... ]
+ #
+ # scan operands (typically shell variables whose values cannot be trusted) for
+ # characters unlikely to be seen in a path and which the shell might
+ # interpret and barf if any are found
+ while [ -n "$1" ]; do
+ # does the operand contain any funny characters?
+ if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then
+ # can't use die(), because I want to avoid forward references
+ echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \
+ "encountered possibly malicious garbage \"$1\"" >&2
+ exit $SHELL_LIB_THROWN_ERROR
+ fi
+ shift
+ done
+}
+
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user. This is used only as a fallback in the
+# event the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while
+# the script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
+ DEFCOLUMNS=80
+fi
+
+message () {
+ # pretty-print messages of arbitrary length
+ reject_nondigits "$COLUMNS"
+ echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
+}
+
+observe () {
+ # syntax: observe message ...
+ #
+ # issue observational message suitable for logging someday when support for
+ # it exists in dpkg
+ if [ -n "$DEBUG_XORG_PACKAGE" ]; then
+ message "$THIS_PACKAGE $THIS_SCRIPT note: $*"
+ fi
+}
+
+warn () {
+ # syntax: warn message ...
+ #
+ # issue warning message suitable for logging someday when support for
+ # it exists in dpkg; also send to standard error
+ message "$THIS_PACKAGE $THIS_SCRIPT warning: $*"
+}
+
+die () {
+ # syntax: die message ...
+ #
+ # exit script with error message
+ message "$THIS_PACKAGE $THIS_SCRIPT error: $*"
+ exit $SHELL_LIB_THROWN_ERROR
+}
+
+internal_error () {
+ # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
+ message "internal error: $*"
+ if [ -n "$OFFICIAL_BUILD" ]; then
+ message "Please report a bug in the $THIS_SCRIPT script of the" \
+ "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
+ "Tracking System. Include all messages above that mention the" \
+ "$THIS_PACKAGE package. Visit " \
+ "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
+ "instructions, read the file" \
+ "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
+ "package, or install the reportbug package and use the command of" \
+ "the same name to file a report."
+ fi
+ exit $SHELL_LIB_INTERNAL_ERROR
+}
+
+usage_error () {
+ message "usage error: $*"
+ message "Please report a bug in the $THIS_SCRIPT script of the" \
+ "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
+ "Tracking System. Include all messages above that mention the" \
+ "$THIS_PACKAGE package. Visit " \
+ "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
+ "instructions, read the file" \
+ "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
+ "package, or install the reportbug package and use the command of" \
+ "the same name to file a report."
+ exit $SHELL_LIB_USAGE_ERROR
+}
+
+font_update () {
+ # run $UPDATECMDS in $FONTDIRS
+
+ local dir cmd shortcmd x_font_dir_prefix
+
+ x_font_dir_prefix="/usr/share/fonts/X11"
+
+ if [ -z "$UPDATECMDS" ]; then
+ usage_error "font_update() called but \$UPDATECMDS not set"
+ fi
+ if [ -z "$FONTDIRS" ]; then
+ usage_error "font_update() called but \$FONTDIRS not set"
+ fi
+
+ reject_unlikely_path_chars "$UPDATECMDS"
+ reject_unlikely_path_chars "$FONTDIRS"
+
+ for dir in $FONTDIRS; do
+ if [ -d "$x_font_dir_prefix/$dir" ]; then
+ for cmd in $UPDATECMDS; do
+ if which "$cmd" > /dev/null 2>&1; then
+ shortcmd=${cmd##*/}
+ observe "running $shortcmd in $dir font directory"
+ cmd_opts=
+ if [ "$shortcmd" = "update-fonts-alias" ]; then
+ cmd_opts=--x11r7-layout
+ fi
+ if [ "$shortcmd" = "update-fonts-dir" ]; then
+ cmd_opts=--x11r7-layout
+ fi
+ if [ "$shortcmd" = "update-fonts-scale" ]; then
+ cmd_opts=--x11r7-layout
+ fi
+ $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \
+ "failed; font directory data may not" \
+ "be up to date"
+ else
+ warn "$cmd not found; not updating corresponding $dir font" \
+ "directory data"
+ fi
+ done
+ else
+ warn "$dir is not a directory; not updating font directory data"
+ fi
+ done
+}
+
+remove_conffile_prepare () {
+ # syntax: remove_conffile_prepare filename official_md5sum ...
+ #
+ # Check a conffile "filename" against a list of canonical MD5 checksums.
+ # If the file's current MD5 checksum matches one of the "official_md5sum"
+ # operands provided, then prepare the conffile for removal from the system.
+ # We defer actual deletion until the package is configured so that we can
+ # roll this operation back if package installation fails.
+ #
+ # Call this function from a preinst script in the event $1 is "upgrade" or
+ # "install" and verify $2 to ensure the package is being upgraded from a
+ # version (or installed over a version removed-but-not-purged) prior to the
+ # one in which the conffile was obsoleted.
+
+ local conffile current_checksum
+
+ # validate arguments
+ if [ $# -lt 2 ]; then
+ usage_error "remove_conffile_prepare() called with wrong number of" \
+ "arguments; expected at least 2, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ conffile="$1"
+ shift
+
+ # does the conffile even exist?
+ if [ -e "$conffile" ]; then
+ # calculate its checksum
+ current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//')
+ # compare it to each supplied checksum
+ while [ -n "$1" ]; do
+ if [ "$current_checksum" = "$1" ]; then
+ # we found a match; move the confffile and stop looking
+ observe "preparing obsolete conffile $conffile for removal"
+ mv "$conffile" "$conffile.$THIS_PACKAGE-tmp"
+ break
+ fi
+ shift
+ done
+ fi
+}
+
+remove_conffile_lookup () {
+ # syntax: remove_conffile_lookup package filename
+ #
+ # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal
+ # if it matches the actual file's md5sum.
+ #
+ # Call this function when you would call remove_conffile_prepare but only
+ # want to check against dpkg's status database instead of known checksums.
+
+ local package conffile old_md5sum
+
+ # validate arguments
+ if [ $# -ne 2 ]; then
+ usage_error "remove_conffile_lookup() called with wrong number of" \
+ "arguments; expected 1, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ package="$1"
+ conffile="$2"
+
+ if ! [ -e "$conffile" ]; then
+ return
+ fi
+ old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \
+ awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')"
+ if [ -n "$old_md5sum" ]; then
+ remove_conffile_prepare "$conffile" "$old_md5sum"
+ fi
+}
+
+remove_conffile_commit () {
+ # syntax: remove_conffile_commit filename
+ #
+ # Complete the removal of a conffile "filename" that has become obsolete.
+ #
+ # Call this function from a postinst script after having used
+ # remove_conffile_prepare() in the preinst.
+
+ local conffile
+
+ # validate arguments
+ if [ $# -ne 1 ]; then
+ usage_error "remove_conffile_commit() called with wrong number of" \
+ "arguments; expected 1, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ conffile="$1"
+
+ # if the temporary file created by remove_conffile_prepare() exists, remove it
+ if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
+ observe "committing removal of obsolete conffile $conffile"
+ rm "$conffile.$THIS_PACKAGE-tmp"
+ fi
+}
+
+remove_conffile_rollback () {
+ # syntax: remove_conffile_rollback filename
+ #
+ # Roll back the removal of a conffile "filename".
+ #
+ # Call this function from a postrm script in the event $1 is "abort-upgrade"
+ # or "abort-install" is after having used remove_conffile_prepare() in the
+ # preinst.
+
+ local conffile
+
+ # validate arguments
+ if [ $# -ne 1 ]; then
+ usage_error "remove_conffile_rollback() called with wrong number of" \
+ "arguments; expected 1, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ conffile="$1"
+
+ # if the temporary file created by remove_conffile_prepare() exists, move it
+ # back
+ if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
+ observe "rolling back removal of obsolete conffile $conffile"
+ mv "$conffile.$THIS_PACKAGE-tmp" "$conffile"
+ fi
+}
+
+replace_conffile_with_symlink_prepare () {
+ # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \
+ # official_md5sum ...
+ #
+ # Check a conffile "oldfilename" against a list of canonical MD5 checksums.
+ # If the file's current MD5 checksum matches one of the "official_md5sum"
+ # operands provided, then prepare the conffile for removal from the system.
+ # We defer actual deletion until the package is configured so that we can
+ # roll this operation back if package installation fails. Otherwise copy it
+ # to newfilename and let dpkg handle it through conffiles mechanism.
+ #
+ # Call this function from a preinst script in the event $1 is "upgrade" or
+ # "install" and verify $2 to ensure the package is being upgraded from a
+ # version (or installed over a version removed-but-not-purged) prior to the
+ # one in which the conffile was obsoleted.
+
+ local conffile current_checksum
+
+ # validate arguments
+ if [ $# -lt 3 ]; then
+ usage_error "replace_conffile_with_symlink_prepare() called with wrong" \
+ " number of arguments; expected at least 3, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ oldconffile="$1"
+ shift
+ newconffile="$1"
+ shift
+
+ remove_conffile_prepare "$_oldconffile" "$@"
+ # If $oldconffile still exists, then md5sums didn't match.
+ # Copy it to new one.
+ if [ -f "$oldconffile" ]; then
+ cp "$oldconffile" "$newconffile"
+ fi
+
+}
+
+replace_conffile_with_symlink_commit () {
+ # syntax: replace_conffile_with_symlink_commit oldfilename
+ #
+ # Complete the removal of a conffile "oldfilename" that has been
+ # replaced by a symlink.
+ #
+ # Call this function from a postinst script after having used
+ # replace_conffile_with_symlink_prepare() in the preinst.
+
+ local conffile
+
+ # validate arguments
+ if [ $# -ne 1 ]; then
+ usage_error "replace_conffile_with_symlink_commit() called with wrong" \
+ "number of arguments; expected 1, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ conffile="$1"
+
+ remove_conffile_commit "$conffile"
+}
+
+replace_conffile_with_symlink_rollback () {
+ # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename
+ #
+ # Roll back the replacing of a conffile "oldfilename" with symlink to
+ # "newfilename".
+ #
+ # Call this function from a postrm script in the event $1 is "abort-upgrade"
+ # or "abort-install" and verify $2 to ensure the package failed to upgrade
+ # from a version (or install over a version removed-but-not-purged) prior
+ # to the one in which the conffile was obsoleted.
+ # You should have used replace_conffile_with_symlink_prepare() in the
+ # preinst.
+
+ local conffile
+
+ # validate arguments
+ if [ $# -ne 2 ]; then
+ usage_error "replace_conffile_with_symlink_rollback() called with wrong" \
+ "number of arguments; expected 2, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ oldconffile="$1"
+ newconffile="$2"
+
+ remove_conffile_rollback "$_oldconffile"
+ if [ -f "$newconffile" ]; then
+ rm "$newconffile"
+ fi
+}
+
+run () {
+ # syntax: run command [ argument ... ]
+ #
+ # Run specified command with optional arguments and report its exit status.
+ # Useful for commands whose exit status may be nonzero, but still acceptable,
+ # or commands whose failure is not fatal to us.
+ #
+ # NOTE: Do *not* use this function with db_get or db_metaget commands; in
+ # those cases the return value of the debconf command *must* be checked
+ # before the string returned by debconf is used for anything.
+
+ local retval
+
+ # validate arguments
+ if [ $# -lt 1 ]; then
+ usage_error "run() called with wrong number of arguments; expected at" \
+ "least 1, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ "$@" || retval=$?
+
+ if [ ${retval:-0} -ne 0 ]; then
+ observe "command \"$*\" exited with status $retval"
+ fi
+}
+
+make_symlink_sane () {
+ # syntax: make_symlink_sane symlink target
+ #
+ # Ensure that the symbolic link symlink exists, and points to target.
+ #
+ # If symlink does not exist, create it and point it at target.
+ #
+ # If symlink exists but is not a symbolic link, back it up.
+ #
+ # If symlink exists, is a symbolic link, but points to the wrong location, fix
+ # it.
+ #
+ # If symlink exists, is a symbolic link, and already points to target, do
+ # nothing.
+ #
+ # This function wouldn't be needed if ln had an -I, --idempotent option.
+
+ # Validate arguments.
+ if [ $# -ne 2 ]; then
+ usage_error "make_symlink_sane() called with wrong number of arguments;" \
+ "expected 2, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ # We could just use the positional parameters as-is, but that makes things
+ # harder to follow.
+ local symlink target
+
+ symlink="$1"
+ target="$2"
+
+ if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then
+ observe "link from $symlink to $target already exists"
+ else
+ observe "creating symbolic link from $symlink to $target"
+ mkdir -p "${target%/*}" "${symlink%/*}"
+ ln -s -b -S ".dpkg-old" "$target" "$symlink"
+ fi
+}
+
+migrate_dir_to_symlink () {
+ # syntax: migrate_dir_to_symlink old_location new_location
+ #
+ # Per Debian Policy section 6.5.4, "A directory will never be replaced by a
+ # symbolic link to a directory or vice versa; instead, the existing state
+ # (symlink or not) will be left alone and dpkg will follow the symlink if
+ # there is one."
+ #
+ # We have to do it ourselves.
+ #
+ # This function moves the contents of old_location, a directory, into
+ # new_location, a directory, then makes old_location a symbolic link to
+ # new_location.
+ #
+ # old_location need not exist, but if it does, it must be a directory (or a
+ # symlink to a directory). If it is not, it is backed up. If new_location
+ # exists already and is not a directory, it is backed up.
+ #
+ # This function should be called from a package's preinst so that other
+ # packages unpacked after this one --- but before this package's postinst runs
+ # --- are unpacked into new_location even if their payloads contain
+ # old_location filespecs.
+
+ # Validate arguments.
+ if [ $# -ne 2 ]; then
+ usage_error "migrate_dir_to_symlink() called with wrong number of"
+ "arguments; expected 2, got $#"
+ exit $SHELL_LIB_USAGE_ERROR
+ fi
+
+ # We could just use the positional parameters as-is, but that makes things
+ # harder to follow.
+ local new old
+
+ old="$1"
+ new="$2"
+
+ # Is old location a symlink?
+ if [ -L "$old" ]; then
+ # Does it already point to new location?
+ if [ "$(readlink "$old")" = "$new" ]; then
+ # Nothing to do; migration has already been done.
+ observe "migration of $old to $new already done"
+ return 0
+ else
+ # Back it up.
+ warn "backing up symbolic link $old as $old.dpkg-old"
+ mv -b "$old" "$old.dpkg-old"
+ fi
+ fi
+
+ # Does old location exist, but is not a directory?
+ if [ -e "$old" ] && ! [ -d "$old" ]; then
+ # Back it up.
+ warn "backing up non-directory $old as $old.dpkg-old"
+ mv -b "$old" "$old.dpkg-old"
+ fi
+
+ observe "migrating $old to $new"
+
+ # Is new location a symlink?
+ if [ -L "$new" ]; then
+ # Does it point the wrong way, i.e., back to where we're migrating from?
+ if [ "$(readlink "$new")" = "$old" ]; then
+ # Get rid of it.
+ observe "removing symbolic link $new which points to $old"
+ rm "$new"
+ else
+ # Back it up.
+ warn "backing up symbolic link $new as $new.dpkg-old"
+ mv -b "$new" "$new.dpkg-old"
+ fi
+ fi
+
+ # Does new location exist, but is not a directory?
+ if [ -e "$new" ] && ! [ -d "$new" ]; then
+ warn "backing up non-directory $new as $new.dpkg-old"
+ mv -b "$new" "$new.dpkg-old"
+ fi
+
+ # Create new directory if it does not yet exist.
+ if ! [ -e "$new" ]; then
+ observe "creating $new"
+ mkdir -p "$new"
+ fi
+
+ # Copy files in old location to new location. Back up any filenames that
+ # already exist in the new location with the extension ".dpkg-old".
+ observe "copying files from $old to $new"
+ if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then
+ die "error(s) encountered while copying files from $old to $new"
+ fi
+
+ # Remove files at old location.
+ observe "removing $old"
+ rm -r "$old"
+
+ # Create symlink from old location to new location.
+ make_symlink_sane "$old" "$new"
+}
+
+# vim:set ai et sw=2 ts=2 tw=80:
+
+# GOBSTOPPER: The X Strike Force shell library ends here.
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: fontenc
+Description: The fontenc Library
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lfontenc
--- /dev/null
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+/* Header for backend-independent encoding code */
+
+/* An encoding is identified with a name. An encoding contains some
+ global encoding data, such as its size, and a set of mappings.
+ Mappings are identified by their type and two integers, known as
+ pid and eid, the interpretation of which is type dependent. */
+
+#ifndef _FONTENC_H
+#define _FONTENC_H
+
+/* Encoding types. For future extensions, clients should be prepared
+ to ignore unknown encoding types. */
+
+/* 0 is treated specially. */
+
+#define FONT_ENCODING_UNICODE 1
+#define FONT_ENCODING_TRUETYPE 2
+#define FONT_ENCODING_POSTSCRIPT 3
+
+/* This structure represents a mapping, either from numeric codes from
+ numeric codes, or from numeric codes to strings. */
+
+/* It is expected that only one of `recode' and `name' will actually
+ be present. However, having both fields simplifies the interface
+ somewhat. */
+
+typedef struct _FontMap {
+ int type; /* the type of the mapping */
+ int pid, eid; /* the identification of the mapping */
+ unsigned (*recode)(unsigned, void*); /* mapping function */
+ char *(*name)(unsigned, void*); /* function returning glyph names */
+ void *client_data; /* second parameter of the two above */
+ struct _FontMap *next; /* link to next element in list */
+ /* The following was added for version 0.3 of the font interface. */
+ /* It should be kept at the end to preserve binary compatibility. */
+ struct _FontEnc *encoding;
+} FontMapRec, *FontMapPtr;
+
+/* This is the structure that holds all the info for one encoding. It
+ consists of a charset name, its size, and a linked list of mappings
+ like above. */
+
+typedef struct _FontEnc {
+ char *name; /* the name of the encoding */
+ char **aliases; /* its aliases, null terminated */
+ int size; /* its size, either in bytes or rows */
+ int row_size; /* the size of a row, or 0 if bytes */
+ FontMapPtr mappings; /* linked list of mappings */
+ struct _FontEnc *next; /* link to next element */
+ /* the following two were added in version 0.2 of the font interface */
+ /* they should be kept at the end to preserve binary compatibility */
+ int first; /* first byte or row */
+ int first_col; /* first column in each row */
+} FontEncRec, *FontEncPtr;
+
+typedef struct _FontMapReverse {
+ unsigned int (*reverse)(unsigned, void*);
+ void *data;
+} FontMapReverseRec, *FontMapReversePtr;
+
+
+/* Function prototypes */
+
+/* extract an encoding name from an XLFD name. Returns a pointer to a
+ *static* buffer, or NULL */
+char *FontEncFromXLFD(const char*, int);
+
+/* find the encoding data for a given encoding name; second parameter
+ is the filename of the font for which the encoding is needed.
+ Returns NULL on failure. */
+FontEncPtr FontEncFind(const char*, const char*);
+
+/* Find a given mapping for an encoding. This is only a convenience
+ function, as clients are allowed to scavenge the data structures
+ themselves (as the TrueType backend does). */
+
+FontMapPtr FontMapFind(FontEncPtr, int, int, int);
+
+/* Do both in a single step */
+FontMapPtr FontEncMapFind(const char *, int, int, int, const char *);
+
+/* Recode a code. Always succeeds. */
+unsigned FontEncRecode(unsigned, FontMapPtr);
+
+/* Return a name for a code. Returns a string or NULL. */
+char *FontEncName(unsigned, FontMapPtr);
+
+/* Return a pointer to the name of the system encodings directory. */
+/* This string is static and should not be modified. */
+char* FontEncDirectory(void);
+
+/* Identify an encoding file. If fileName doesn't exist, or is not an
+ encoding file, return NULL, otherwise returns a NULL-terminated
+ array of strings. */
+char **FontEncIdentify(const char *fileName);
+
+FontMapReversePtr FontMapReverse(FontMapPtr);
+
+void FontMapReverseFree(FontMapReversePtr);
+#endif
--- /dev/null
+dnl fontutil.m4. Generated from fontutil.m4.in by configure.
+dnl
+dnl This file comes from X.Org's font-util 1.2.0
+dnl
+dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+dnl
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+dnl
+dnl --------------------------------------------------------------------
+dnl
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+
+# XORG_FONT_MACROS_VERSION(required-version)
+# ------------------------------------------
+# Minimum version: 1.1.0
+#
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_FONT_MACROS_VERSION(1.1)
+#
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_FONT_MACROS_VERSION],
+# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what
+# version you require.
+m4_defun([XORG_FONT_MACROS_VERSION],[
+m4_define([vers_have], [1.2.0])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+ [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+ [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_FONT_MACROS_VERSION
+
+# XORG_FONT_CHECK_{maps}()
+# ------------------------
+# Minimum version: 1.0.0
+# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
+# JISX0201 or KOI8_R. By default, they are all enabled.
+
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
+AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
+AC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)])
+AC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)])
+
+# XORG_FONT_CHECK_ENCODING(encoding)
+# ----------------------------------
+# Minimum version: 1.1.0
+# This macro adds --enable/disable-<encoding>, enabled by default.
+# It replaced individual copies of this code in the above macros in 1.1.
+# Currently assumes encoding names will be all upper-case - add m4_toupper
+# calls if this is not true in the future.
+
+AC_DEFUN([XORG_FONT_CHECK_ENCODING],[
+ AC_ARG_ENABLE(m4_tolower($1),
+ AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
+ [Build $1 fonts (default: yes)]),
+ [AS_TR_SH($1)=$enableval])
+ AC_MSG_CHECKING([whether to build $1 fonts])
+ AC_MSG_RESULT($[AS_TR_SH($1)])
+ AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
+]) # XORG_FONT_CHECK_ENCODING
+
+# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
+# -----------------------------------------------------
+# Minimum version: 1.1.0
+# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
+# Add a shorthand --enable/disable-all-encodings option.
+
+AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
+ AC_ARG_ENABLE([all-encodings],
+ AS_HELP_STRING([--disable-all-encodings],
+ [Disable building of all font encodings]),
+ [m4_foreach_w([enc], [$1], [
+ AS_TR_SH(enc)=$enableval
+ ])],
+ [m4_foreach_w([enc], [$1], [
+ AS_TR_SH(enc)=yes
+ ])])
+ m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
+]) # XORG_FONT_CHECK_ENCODING_LIST
+
+# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
+# ------------------------------------------
+# Minimum version: 1.1.0
+#
+# Simple wrapper around AC_PATH_PROG that errors if not found
+#
+
+AC_DEFUN([XORG_FONT_REQUIRED_PROG],[
+ AC_PATH_PROG($1, $2)
+ if test x"$$1" = x; then
+ AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
+ fi
+])
+
+
+# XORG_FONT_FCCACHE()
+# -------------------
+# Minimum version: 1.1.0
+#
+# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
+# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
+# to run fc-cache if found and not installing to $DESTDIR
+#
+# fc-cache is optional, not required, and should be skipped when making
+# packages (installing to $DESTDIR).
+#
+AC_DEFUN([XORG_FONT_FCCACHE],[
+ AC_PATH_PROG(FCCACHE, fc-cache)
+ FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
+ if test x"$FCCACHE" = x ; then
+ RUN_FCCACHE="${FCCACHE_WARN}"
+ else
+ RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
+ RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
+ fi
+ AC_SUBST([RUN_FCCACHE])
+])
+
+
+# XORG_FONT_COMMON_UTILS()
+# ------------------------
+# Minimum version: 1.1.0
+#
+# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
+
+AC_DEFUN([XORG_FONT_COMMON_UTILS],[
+ XORG_FONT_FCCACHE
+ XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
+])
+
+# XORG_FONT_SCALED_UTILS()
+# ------------------------
+# Minimum version: 1.1.0
+#
+# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
+# (TrueType, OpenType, Type1)
+
+AC_DEFUN([XORG_FONT_SCALED_UTILS],[
+ XORG_FONT_COMMON_UTILS
+ XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
+])
+
+# XORG_FONT_BDF_UTILS()
+# ---------------------
+# Minimum version: 1.1.0
+#
+# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
+# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
+# PCF output files created by bdftopcf
+
+AC_DEFUN([XORG_FONT_BDF_UTILS],[
+ XORG_FONT_COMMON_UTILS
+ XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
+ XORG_FONT_CHECK_COMPRESSION
+])
+
+# XORG_FONT_CHECK_COMPRESSION()
+# -----------------------------
+# Minimum version: 1.1.0
+#
+# Offer a --with-compression flag to control what compression method is
+# used for pcf font files. Offers all the methods currently supported
+# by libXfont, including no compression.
+
+AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
+ AC_MSG_CHECKING([font compression method])
+ AC_ARG_WITH(compression,
+ [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
+ [compression method to use on pcf fonts])],
+ [compression="$withval"], [compression="yes"])
+ if test x"$compression" = "xyes" ; then
+ compression="gzip"
+ fi
+ AC_MSG_RESULT([${compression}])
+ case ${compression} in
+ *compress) COMPRESS_SUFFIX=".Z" ;;
+ *gzip) COMPRESS_SUFFIX=".gz" ;;
+ *bzip2) COMPRESS_SUFFIX=".bz2" ;;
+ no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
+ *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
+ esac
+ if test x"$COMPRESS_SUFFIX" != "x" ; then
+ XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
+ fi
+ AC_SUBST([COMPRESS_SUFFIX])
+])
+
+# XORG_FONT_UCS2ANY()
+# -------------------
+# Minimum version: 1.1.0
+#
+# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
+# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
+# Also call pkg-config to find the directory with the encoding files needed
+# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
+
+AC_DEFUN([XORG_FONT_UCS2ANY],[
+ XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
+ PKG_CHECK_MODULES(MAPS, [fontutil])
+ AC_MSG_CHECKING([for ucs2any encoding data files])
+ MAPFILES_PATH=`pkg-config --variable=mapdir fontutil`
+ AC_SUBST(MAPFILES_PATH)
+ AC_MSG_RESULT([${MAPFILES_PATH}])
+])
+
+
+
+# XORG_FONT_FC_CONFDIR()
+# --------------------
+# Minimum version: 1.2.0
+#
+# Sets FC_CONFDIR to the fontconfig config directory
+# (which should be --with-confdir=... when building fontconfig)
+# found from:
+# --with-fc-confdir=...
+# pkg-config --variable=confdir fontconfig
+# ${sysconfdir}/fonts
+
+AC_DEFUN([XORG_FONT_FC_CONFDIR],[
+ dnl Ensure $PKG_CONFIG is set first
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+ AC_MSG_CHECKING([for fontconfig's configuration directory])
+ AC_ARG_WITH(fc-confdir,
+ AS_HELP_STRING([--with-fc-confdir=DIR],
+ [Path to fontconfig's configuration directory]),
+ [FC_CONFDIR="$withval"])
+ # if --with-fc-confdir was not specified
+ if test "x${FC_CONFDIR}" = "x"; then
+ FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
+ fi
+ # ...and if pkg-config didn't find confdir in fontconfig.pc...
+ if test "x${FC_CONFDIR}" = "x"; then
+ FC_CONFDIR="${sysconfdir}/fonts"
+ fi
+ AC_SUBST(FC_CONFDIR)
+ AC_MSG_RESULT([${FC_CONFDIR}])
+])
+
+
+
+# XORG_FONTROOTDIR()
+# --------------------
+# Minimum version: 1.1.0
+#
+# Sets FONTROOTDIR to the root directory for font files. Uses the first
+# found from:
+# --with-fontrootdir
+# pkg-config --variable=fontrootdir fontutil
+# ${datadir}/fonts/X11
+
+AC_DEFUN([XORG_FONTROOTDIR],[
+ dnl Ensure $PKG_CONFIG is set first
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+ AC_MSG_CHECKING([for root directory for font files])
+ AC_ARG_WITH(fontrootdir,
+ AS_HELP_STRING([--with-fontrootdir=DIR],
+ [Path to root directory for font files]),
+ [FONTROOTDIR="$withval"])
+ # if --with-fontrootdir not specified...
+ if test "x${FONTROOTDIR}" = "x"; then
+ FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
+ fi
+ # ...and if pkg-config didn't find fontdir in fontutil.pc...
+ if test "x${FONTROOTDIR}" = "x"; then
+ FONTROOTDIR="${datadir}/fonts/X11"
+ fi
+ AC_SUBST(FONTROOTDIR)
+ AC_MSG_RESULT([${FONTROOTDIR}])
+])
+
+# XORG_FONTSUBDIR(variable, flag, subdir)
+# ---------------------------------------
+# Minimum version: 1.1.0
+#
+# Offer a --with-<flag> flag to control directory for font installation
+# Default is the specified <subdir> of the font root directory.
+# Sets <variable> to the selected directory
+
+AC_DEFUN([XORG_FONTSUBDIR],[
+ AC_REQUIRE([XORG_FONTROOTDIR])
+
+ AC_MSG_CHECKING([for directory for $3 files])
+ AC_ARG_WITH($2,
+ [AS_HELP_STRING([--with-$2=DIR],
+ [Path to $3 files [FONTROOTDIR/$3]])],
+ [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
+ AC_SUBST($1)
+ AC_MSG_RESULT([${$1}])
+]) # XORG_FONTSUBDIR
+
+# XORG_FONTDIR(subdir)
+# --------------------
+# Minimum version: 1.1.0
+#
+# Offer a --with-fontdir flag to control directory for font installation
+# Default is the specified subdir of the font root directory.
+# Sets FONTDIR to the selected directory
+
+AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
--- /dev/null
+#
+# Do NOT Edit the Auto-generated Part!
+# Generated by: spectacle version 0.22
+#
+# >> macros
+# << macros
+
+Name: libfontenc
+Summary: X.Org X11 libfontenc runtime library
+Version: 1.1.0
+Release: 1
+Group: System/Libraries
+License: MIT
+URL: http://www.x.org
+Source0: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2
+Source100: libfontenc.yaml
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: pkgconfig(xorg-macros)
+BuildRequires: pkgconfig(xproto)
+BuildRequires: zlib-devel
+BuildRequires: autoconf
+
+
+%description
+font encoding library
+
+
+%package devel
+Summary: X.Org X11 libfontenc development package
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+font encoding library development package
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+# >> setup
+# << setup
+
+%build
+# >> build pre
+# << build pre
+
+%configure --disable-static \
+ --with-encodingsdir=%{_datadir}/fonts/X11/encodings
+
+make %{?jobs:-j%jobs}
+
+# >> build post
+# << build post
+%install
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
+%make_install
+
+# >> install post
+# << install post
+
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+# >> files
+%doc COPYING README ChangeLog
+%{_libdir}/libfontenc.so.1
+%{_libdir}/libfontenc.so.1.0.0
+# << files
+
+
+%files devel
+%defattr(-,root,root,-)
+# >> files devel
+%dir %{_includedir}/X11
+%dir %{_includedir}/X11/fonts
+%{_includedir}/X11/fonts/fontenc.h
+%{_libdir}/libfontenc.so
+%{_libdir}/pkgconfig/fontenc.pc
+# << files devel
+
--- /dev/null
+lib_LTLIBRARIES = libfontenc.la
+
+libfontenc_la_SOURCES = \
+ encparse.c \
+ fontenc.c \
+ fontencI.h
+
+AM_CFLAGS = \
+ $(FONTENC_CFLAGS) \
+ $(CWARNFLAGS)
+
+FONTENCDIR=@ENCODINGSDIR@
+FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(FONTENCDIR)/encodings.dir\"
+
+INCLUDES = -I$(top_srcdir)/include $(FONTENCDEFS)
+
+
+libfontenc_la_LIBADD = @FONTENC_LIBS@
+
+libfontenc_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+
+libfontencincludedir = $(includedir)/X11/fonts
+libfontencinclude_HEADERS = \
+ $(top_srcdir)/include/X11/fonts/fontenc.h
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+ $(LINT) $(ALL_LINT_FLAGS) $(libfontenc_la_SOURCES) $(libfontenc_la_LIBADD) $(LIBS)
+endif LINT
--- /dev/null
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+/* Parser for encoding files */
+
+/* This code assumes that we are using ASCII. We don't use the ctype
+ functions, as they depend on the current locale. On the other
+ hand, we do use strcasecmp, but only on strings that we've checked
+ to be pure ASCII. Bloody ``Code Set Independence''. */
+
+#include <string.h>
+#include <stdio.h>
+
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <strings.h>
+#endif
+
+#include <stdlib.h>
+
+#include "zlib.h"
+typedef gzFile FontFilePtr;
+#define FontFileGetc(f) gzgetc(f)
+#define FontFileOpen(filename) gzopen(filename, "rb")
+#define FontFileClose(f) gzclose(f)
+
+#define MAXFONTFILENAMELEN 1024
+#define MAXFONTNAMELEN 1024
+
+#include <X11/fonts/fontenc.h>
+#include "fontencI.h"
+
+#define MAXALIASES 20
+
+#define EOF_TOKEN -1
+#define ERROR_TOKEN -2
+#define EOL_TOKEN 0
+#define NUMBER_TOKEN 1
+#define KEYWORD_TOKEN 2
+
+#define EOF_LINE -1
+#define ERROR_LINE -2
+#define STARTENCODING_LINE 1
+#define STARTMAPPING_LINE 2
+#define ENDMAPPING_LINE 3
+#define CODE_LINE 4
+#define CODE_RANGE_LINE 5
+#define CODE_UNDEFINE_LINE 6
+#define NAME_LINE 7
+#define SIZE_LINE 8
+#define ALIAS_LINE 9
+#define FIRSTINDEX_LINE 10
+
+/* Return from lexer */
+#define MAXKEYWORDLEN 100
+
+static long number_value;
+static char keyword_value[MAXKEYWORDLEN+1];
+
+static long value1, value2, value3;
+
+/* Lexer code */
+
+/* Skip to the beginning of new line */
+static void
+skipEndOfLine(FontFilePtr f, int c)
+{
+ if(c == 0)
+ c = FontFileGetc(f);
+
+ for(;;)
+ if(c <= 0 || c == '\n')
+ return;
+ else
+ c = FontFileGetc(f);
+}
+
+/* Get a number; we're at the first digit. */
+static unsigned
+getnum(FontFilePtr f, int c, int *cp)
+{
+ unsigned n = 0;
+ int base = 10;
+
+ /* look for `0' or `0x' prefix */
+ if(c == '0') {
+ c = FontFileGetc(f);
+ base = 8;
+ if(c == 'x' || c == 'X') {
+ base = 16;
+ c = FontFileGetc(f);
+ }
+ }
+
+ /* accumulate digits */
+ for(;;) {
+ if ('0' <= c && c <= '9') {
+ n *= base; n += c - '0';
+ } else if('a' <= c && c <= 'f') {
+ n *= base; n += c - 'a' + 10;
+ } else if('A' <=c && c <= 'F') {
+ n *= base; n += c - 'A' + 10;
+ } else
+ break;
+ c = FontFileGetc(f);
+ }
+
+ *cp = c; return n;
+}
+
+/* Skip to beginning of new line; return 1 if only whitespace was found. */
+static int
+endOfLine(FontFilePtr f, int c)
+{
+ if(c == 0)
+ c = FontFileGetc(f);
+
+ for(;;) {
+ if(c <= 0 || c == '\n')
+ return 1;
+ else if(c == '#') {
+ skipEndOfLine(f,c);
+ return 1;
+ }
+ else if(c == ' ' || c == '\t') {
+ skipEndOfLine(f,c);
+ return 0;
+ }
+ c = FontFileGetc(f);
+ }
+}
+
+/* Get a token; we're at first char */
+static int
+gettoken(FontFilePtr f, int c, int *cp)
+{
+ char *p;
+
+ if(c <= 0)
+ c = FontFileGetc(f);
+
+ if(c <= 0) {
+ return EOF_TOKEN;
+ }
+
+ while(c == ' ' || c == '\t')
+ c = FontFileGetc(f);
+
+ if(c=='\n') {
+ return EOL_TOKEN;
+ } else if(c == '#') {
+ skipEndOfLine(f,c);
+ return EOL_TOKEN;
+ } else if(c >= '0' && c <= '9') {
+ number_value = getnum(f,c,cp);
+ return NUMBER_TOKEN;
+ } else if((c >= 'A' && c <= 'Z') ||
+ (c >= 'a' && c <= 'z') ||
+ c == '/' || c == '_' || c == '-' || c == '.') {
+ p = keyword_value;
+ *p++ = c;
+ while(p-keyword_value < MAXKEYWORDLEN) {
+ c = FontFileGetc(f);
+ if(c <= ' ' || c > '~' || c == '#')
+ break;
+ *p++ = c;
+ }
+ *cp = c;
+ *p = '\0';
+ return KEYWORD_TOKEN;
+ } else {
+ *cp = c;
+ return ERROR_TOKEN;
+ }
+}
+
+/* Parse a line.
+ * Always skips to the beginning of a new line, even if an error occurs */
+static int
+getnextline(FontFilePtr f)
+{
+ int c, token;
+ c = FontFileGetc(f);
+ if(c <= 0)
+ return EOF_LINE;
+
+ again:
+ token=gettoken(f,c,&c);
+
+ switch(token) {
+ case EOF_TOKEN:
+ return EOF_LINE;
+ case EOL_TOKEN:
+ /* empty line */
+ c = FontFileGetc(f);
+ goto again;
+ case NUMBER_TOKEN:
+ value1 = number_value;
+ token = gettoken(f,c,&c);
+ switch(token) {
+ case NUMBER_TOKEN:
+ value2 = number_value;
+ token = gettoken(f,c,&c);
+ switch(token) {
+ case NUMBER_TOKEN:
+ value3 = number_value;
+ return CODE_RANGE_LINE;
+ case EOL_TOKEN:
+ return CODE_LINE;
+ default:
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ case KEYWORD_TOKEN:
+ if(!endOfLine(f,c))
+ return ERROR_LINE;
+ else
+ return NAME_LINE;
+ default:
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ case KEYWORD_TOKEN:
+ if(!strcasecmp(keyword_value, "STARTENCODING")) {
+ token = gettoken(f,c,&c);
+ if(token == KEYWORD_TOKEN) {
+ if(endOfLine(f,c))
+ return STARTENCODING_LINE;
+ else
+ return ERROR_LINE;
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "ALIAS")) {
+ token = gettoken(f,c,&c);
+ if(token == KEYWORD_TOKEN) {
+ if(endOfLine(f,c))
+ return ALIAS_LINE;
+ else
+ return ERROR_LINE;
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "SIZE")) {
+ token = gettoken(f,c,&c);
+ if(token == NUMBER_TOKEN) {
+ value1 = number_value;
+ token = gettoken(f,c,&c);
+ switch(token) {
+ case NUMBER_TOKEN:
+ value2 = number_value;
+ return SIZE_LINE;
+ case EOL_TOKEN:
+ value2=0;
+ return SIZE_LINE;
+ default:
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "FIRSTINDEX")) {
+ token = gettoken(f,c,&c);
+ if(token == NUMBER_TOKEN) {
+ value1 = number_value;
+ token = gettoken(f,c,&c);
+ switch(token) {
+ case NUMBER_TOKEN:
+ value2 = number_value;
+ return FIRSTINDEX_LINE;
+ case EOL_TOKEN:
+ value2 = 0;
+ return FIRSTINDEX_LINE;
+ default:
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "STARTMAPPING")) {
+ keyword_value[0] = 0;
+ value1 = 0; value1 = 0;
+ /* first a keyword */
+ token = gettoken(f,c,&c);
+ if(token != KEYWORD_TOKEN) {
+ skipEndOfLine(f, c);
+ return ERROR_LINE;
+ }
+
+ /* optional first integer */
+ token = gettoken(f,c,&c);
+ if(token == NUMBER_TOKEN) {
+ value1 = number_value;
+ } else if(token == EOL_TOKEN) {
+ return STARTMAPPING_LINE;
+ } else {
+ skipEndOfLine(f, c);
+ return ERROR_LINE;
+ }
+
+ /* optional second integer */
+ token = gettoken(f,c,&c);
+ if(token == NUMBER_TOKEN) {
+ value2 = number_value;
+ } else if(token == EOL_TOKEN) {
+ return STARTMAPPING_LINE;
+ } else {
+ skipEndOfLine(f, c);
+ return ERROR_LINE;
+ }
+
+ if(!endOfLine(f,c))
+ return ERROR_LINE;
+ else {
+ return STARTMAPPING_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "UNDEFINE")) {
+ /* first integer */
+ token = gettoken(f,c,&c);
+ if(token != NUMBER_TOKEN) {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ value1 = number_value;
+ /* optional second integer */
+ token = gettoken(f,c,&c);
+ if(token == EOL_TOKEN) {
+ value2 = value1;
+ return CODE_UNDEFINE_LINE;
+ } else if(token == NUMBER_TOKEN) {
+ value2 = number_value;
+ if(endOfLine(f,c)) {
+ return CODE_UNDEFINE_LINE;
+ } else
+ return ERROR_LINE;
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ } else if(!strcasecmp(keyword_value, "ENDENCODING")) {
+ if(endOfLine(f,c))
+ return EOF_LINE;
+ else
+ return ERROR_LINE;
+ } else if(!strcasecmp(keyword_value, "ENDMAPPING")) {
+ if(endOfLine(f,c))
+ return ENDMAPPING_LINE;
+ else
+ return ERROR_LINE;
+ } else {
+ skipEndOfLine(f,c);
+ return ERROR_LINE;
+ }
+ default:
+ return ERROR_LINE;
+ }
+}
+
+static void
+install_mapping(FontEncPtr encoding, FontMapPtr mapping)
+{
+ FontMapPtr m;
+
+ if(encoding->mappings == NULL)
+ encoding->mappings = mapping;
+ else {
+ m = encoding->mappings;
+ while(m->next != NULL)
+ m = m->next;
+ m->next = mapping;
+ }
+ mapping->next = NULL;
+ mapping->encoding = encoding;
+}
+
+static int
+setCode(unsigned from, unsigned to, unsigned row_size,
+ unsigned *first, unsigned *last,
+ unsigned *encsize, unsigned short **enc)
+{
+ unsigned index, i;
+ unsigned short *newenc;
+
+ if(from>0xFFFF)
+ return 0; /* success */
+
+ if(row_size==0)
+ index=from;
+ else {
+ if((value1 & 0xFF) >= row_size)
+ return 0; /* ignore out of range mappings */
+ index = (from>>8) * row_size + (from&0xFF);
+ }
+
+ /* Optimize away useless identity mappings. This is only expected
+ to be useful with linear encodings. */
+ if(index == to && (index < *first || index > *last))
+ return 0;
+ if(*encsize == 0) {
+ *encsize = (index < 256) ? 256 : 0x10000;
+ *enc = malloc((*encsize) * sizeof(unsigned short));
+ if(*enc == NULL) {
+ *encsize = 0;
+ return 1;
+ }
+ } else if(*encsize <= index) {
+ *encsize = 0x10000;
+ if((newenc = realloc(enc, *encsize))==NULL)
+ return 1;
+ *enc = newenc;
+ }
+ if(*first > *last) {
+ *first = *last = index;
+ }
+ if(index < *first) {
+ for(i = index; i < *first; i++)
+ (*enc)[i] = i;
+ *first = index;
+ }
+ if(index > *last) {
+ for(i = *last + 1; i <= index; i++)
+ (*enc)[i] = i;
+ *last = index;
+ }
+ (*enc)[index] = to;
+ return 0;
+}
+
+/* Parser. If headerOnly is true, we're only interested in the
+ data contained in the encoding file's header. */
+
+/* As font encodings are currently never freed, the allocations done
+ by this function are mostly its private business. Note, however,
+ that FontEncIdentify needs to free the header fields -- so if you
+ change this function, you may need to change FontEncIdentify. */
+
+/* I want a garbage collector. */
+
+static FontEncPtr
+parseEncodingFile(FontFilePtr f, int headerOnly)
+{
+ int line;
+
+ unsigned short *enc=NULL;
+ char **nam = NULL, **newnam;
+ unsigned i, first = 0xFFFF, last=0, encsize=0, namsize=0;
+ FontEncPtr encoding = NULL;
+ FontMapPtr mapping = NULL;
+ FontEncSimpleMapPtr sm;
+ FontEncSimpleNamePtr sn;
+ char *aliases[MAXALIASES];
+ int numaliases=0;
+
+#if 0
+ /* GCC complains about unused labels. Please fix GCC rather than
+ obfuscating my code. */
+ no_encoding:
+#endif
+ line = getnextline(f);
+ switch(line) {
+ case EOF_LINE:
+ goto error;
+ case STARTENCODING_LINE:
+ encoding = malloc(sizeof(FontEncRec));
+ if(encoding == NULL)
+ goto error;
+ encoding->name = strdup(keyword_value);
+ if(encoding->name == NULL)
+ goto error;
+ encoding->size = 256;
+ encoding->row_size = 0;
+ encoding->mappings = NULL;
+ encoding->next = NULL;
+ encoding->first = encoding->first_col=0;
+ goto no_mapping;
+ default:
+ goto error;
+ }
+
+ no_mapping:
+ line = getnextline(f);
+ switch(line) {
+ case EOF_LINE: goto done;
+ case ALIAS_LINE:
+ if(numaliases < MAXALIASES) {
+ aliases[numaliases] = strdup(keyword_value);
+ if(aliases[numaliases] == NULL)
+ goto error;
+ numaliases++;
+ }
+ goto no_mapping;
+ case SIZE_LINE:
+ encoding->size = value1;
+ encoding->row_size = value2;
+ goto no_mapping;
+ case FIRSTINDEX_LINE:
+ encoding->first = value1;
+ encoding->first_col = value2;
+ goto no_mapping;
+ case STARTMAPPING_LINE:
+ if(headerOnly)
+ goto done;
+ if(!strcasecmp(keyword_value, "unicode")) {
+ mapping = malloc(sizeof(FontMapRec));
+ if(mapping == NULL)
+ goto error;
+ mapping->type = FONT_ENCODING_UNICODE;
+ mapping->pid = 0;
+ mapping->eid = 0;
+ mapping->recode = NULL;
+ mapping->name = NULL;
+ mapping->client_data = NULL;
+ mapping->next = NULL;
+ goto mapping;
+ } else if(!strcasecmp(keyword_value, "cmap")) {
+ mapping = malloc(sizeof(FontMapRec));
+ if(mapping == NULL)
+ goto error;
+ mapping->type = FONT_ENCODING_TRUETYPE;
+ mapping->pid = value1;
+ mapping->eid = value2;
+ mapping->recode = NULL;
+ mapping->name = NULL;
+ mapping->client_data = NULL;
+ mapping->next = NULL;
+ goto mapping;
+ } else if(!strcasecmp(keyword_value, "postscript")) {
+ mapping = malloc(sizeof(FontMapRec));
+ if(mapping == NULL)
+ goto error;
+ mapping->type = FONT_ENCODING_POSTSCRIPT;
+ mapping->pid = 0;
+ mapping->eid = 0;
+ mapping->recode = NULL;
+ mapping->name = NULL;
+ mapping->client_data = NULL;
+ mapping->next = NULL;
+ goto string_mapping;
+ } else { /* unknown mapping type -- ignore */
+ goto skipmapping;
+ }
+ /* NOTREACHED */
+ goto error;
+ default: goto no_mapping; /* ignore unknown lines */
+ }
+
+ skipmapping:
+ line = getnextline(f);
+ switch(line) {
+ case ENDMAPPING_LINE:
+ goto no_mapping;
+ case EOF_LINE:
+ goto error;
+ default:
+ goto skipmapping;
+ }
+
+ mapping:
+ line = getnextline(f);
+ switch(line) {
+ case EOF_LINE: goto error;
+ case ENDMAPPING_LINE:
+ mapping->recode = FontEncSimpleRecode;
+ mapping->name = FontEncUndefinedName;
+ mapping->client_data = sm = malloc(sizeof(FontEncSimpleMapRec));
+ if(sm == NULL)
+ goto error;
+ sm->row_size = encoding->row_size;
+ if(first <= last) {
+ unsigned short *newmap;
+
+ sm->first = first;
+ sm->len=last-first+1;
+ newmap = malloc(sm->len * sizeof(unsigned short));
+ if(newmap == NULL) {
+ free(sm);
+ mapping->client_data = sm = NULL;
+ goto error;
+ }
+ for(i=0; i < sm->len; i++)
+ newmap[i] = enc[first+i];
+ sm->map = newmap;
+ } else {
+ sm->first = 0;
+ sm->len = 0;
+ sm->map = NULL;
+ }
+ install_mapping(encoding, mapping);
+ mapping = NULL;
+ first = 0xFFFF; last=0;
+ goto no_mapping;
+
+ case CODE_LINE:
+ if(setCode(value1, value2, encoding->row_size,
+ &first, &last, &encsize, &enc))
+ goto error;
+ goto mapping;
+
+ case CODE_RANGE_LINE:
+ if(value1 > 0x10000)
+ value1 = 0x10000;
+ if(value2 > 0x10000)
+ value2 = 0x10000;
+ if(value2 < value1)
+ goto mapping;
+ /* Do the last value first to avoid having to realloc() */
+ if(setCode(value2, value3+(value2-value1), encoding->row_size,
+ &first, &last, &encsize, &enc))
+ goto error;
+ for(i=value1; i<value2; i++) {
+ if(setCode(i, value3+(i-value1), encoding->row_size,
+ &first, &last, &encsize, &enc))
+ goto error;
+ }
+ goto mapping;
+
+ case CODE_UNDEFINE_LINE:
+ if(value1 > 0x10000)
+ value1 = 0x10000;
+ if(value2 > 0x10000)
+ value2 = 0x10000;
+ if(value2 < value1)
+ goto mapping;
+ /* Do the last value first to avoid having to realloc() */
+ if(setCode(value2, 0, encoding->row_size,
+ &first, &last, &encsize, &enc))
+ goto error;
+ for(i = value1; i < value2; i++) {
+ if(setCode(i, 0, encoding->row_size,
+ &first, &last, &encsize, &enc))
+ goto error;
+ }
+ goto mapping;
+
+ default: goto mapping; /* ignore unknown lines */
+ }
+
+ string_mapping:
+ line = getnextline(f);
+ switch(line) {
+ case EOF_LINE: goto error;
+ case ENDMAPPING_LINE:
+ mapping->recode = FontEncUndefinedRecode;
+ mapping->name = FontEncSimpleName;
+ mapping->client_data = sn = malloc(sizeof(FontEncSimpleNameRec));
+ if(sn == NULL)
+ goto error;
+ if(first > last) {
+ free(sn);
+ mapping->client_data = sn = NULL;
+ goto error;
+ }
+ sn->first = first;
+ sn->len = last - first + 1;
+ sn->map = malloc(sn->len*sizeof(char*));
+ if(sn->map == NULL) {
+ free(sn);
+ mapping->client_data = sn = NULL;
+ goto error;
+ }
+ for(i = 0; i < sn->len; i++)
+ sn->map[i] = nam[first+i];
+ install_mapping(encoding,mapping);
+ mapping = NULL;
+ first = 0xFFFF; last=0;
+ goto no_mapping;
+ case NAME_LINE:
+ if(value1 >= 0x10000) goto string_mapping;
+ if(namsize == 0) {
+ namsize = (value1) < 256 ? 256 : 0x10000;
+ nam = malloc(namsize * sizeof(char*));
+ if(nam == NULL) {
+ namsize=0;
+ goto error;
+ }
+ } else if(namsize <= value1) {
+ namsize = 0x10000;
+ if((newnam = (char**)realloc(nam, namsize)) == NULL)
+ goto error;
+ nam = newnam;
+ }
+ if(first > last) {
+ first = last = value1;
+ }
+ if(value1 < first) {
+ for(i = value1; i < first; i++)
+ nam[i] = NULL;
+ first = value1;
+ }
+ if(value1 > last) {
+ for(i=last+1; i <= value1; i++)
+ nam[i]=NULL;
+ last = value1;
+ }
+ nam[value1] = strdup(keyword_value);
+ if(nam[value1] == NULL) {
+ goto error;
+ }
+ goto string_mapping;
+
+ default: goto string_mapping; /* ignore unknown lines */
+ }
+
+ done:
+ if(encsize) free(enc); encsize=0; enc = NULL;
+ if(namsize) free(nam); namsize=0; nam = NULL; /* don't free entries! */
+
+ encoding->aliases=NULL;
+ if(numaliases) {
+ encoding->aliases = malloc((numaliases+1)*sizeof(char*));
+ if(encoding->aliases == NULL)
+ goto error;
+ for(i=0; i<numaliases; i++)
+ encoding->aliases[i] = aliases[i];
+ encoding->aliases[numaliases]=NULL;
+ }
+
+ return encoding;
+
+error:
+ if(encsize) free(enc); encsize=0;
+ if(namsize) {
+ for(i = first; i <= last; i++)
+ free(nam[i]);
+ free(nam);
+ namsize = 0;
+ }
+ if(mapping) {
+ free(mapping->client_data);
+ free(mapping);
+ }
+ if(encoding) {
+ FontMapPtr nextmap;
+ free(encoding->name);
+ for (mapping = encoding->mappings; mapping; mapping = nextmap) {
+ free(mapping->client_data);
+ nextmap = mapping->next;
+ free(mapping);
+ }
+ free(encoding);
+ }
+ for(i = 0; i < numaliases; i++)
+ free(aliases[i]);
+ /* We don't need to free sn and sm as they handled locally in the body.*/
+ return NULL;
+}
+
+char*
+FontEncDirectory(void)
+{
+ static char* dir = NULL;
+
+ if(dir == NULL) {
+ char *c = getenv("FONT_ENCODINGS_DIRECTORY");
+ if(c) {
+ dir = strdup(c);
+ if(!dir)
+ return NULL;
+ } else {
+ dir = FONT_ENCODINGS_DIRECTORY;
+ }
+ }
+ return dir;
+}
+
+static void
+parseFontFileName(const char *fontFileName, char *buf, char *dir)
+{
+ const char *p;
+ char *q, *lastslash;
+
+ for(p = fontFileName, q = dir, lastslash = NULL; *p; p++, q++) {
+ *q = *p;
+ if(*p == '/')
+ lastslash = q+1;
+ }
+
+ if(!lastslash)
+ lastslash = dir;
+
+ *lastslash = '\0';
+
+ if(buf && strlen(dir) + 14 < MAXFONTFILENAMELEN) {
+ strcpy(buf, dir);
+ strcat(buf, "encodings.dir");
+ }
+}
+
+static FontEncPtr
+FontEncReallyReallyLoad(const char *charset,
+ const char *dirname, const char *dir)
+{
+ FontFilePtr f;
+ FILE *file;
+ FontEncPtr encoding;
+ char file_name[MAXFONTFILENAMELEN], encoding_name[MAXFONTNAMELEN],
+ buf[MAXFONTFILENAMELEN];
+ int count, n;
+ static char format[24] = "";
+
+ /* As we don't really expect to open encodings that often, we don't
+ take the trouble of caching encodings directories. */
+
+ if((file = fopen(dirname, "r")) == NULL) {
+ return NULL;
+ }
+
+ count = fscanf(file, "%d\n", &n);
+ if(count == EOF || count != 1) {
+ fclose(file);
+ return NULL;
+ }
+
+ encoding = NULL;
+ if (!format[0]) {
+ sprintf(format, "%%%ds %%%d[^\n]\n", (int)sizeof(encoding_name) - 1,
+ (int)sizeof(file_name) - 1);
+ }
+ for(;;) {
+ count = fscanf(file, format, encoding_name, file_name);
+ if(count == EOF)
+ break;
+ if(count != 2)
+ break;
+
+ if(!strcasecmp(encoding_name, charset)) {
+ /* Found it */
+ if(file_name[0] != '/') {
+ if(strlen(dir) + strlen(file_name) >= MAXFONTFILENAMELEN) {
+ fclose(file);
+ return NULL;
+ }
+ strcpy(buf, dir);
+ strcat(buf, file_name);
+ } else {
+ strcpy(buf , file_name);
+ }
+
+ f = FontFileOpen(buf);
+ if(f == NULL) {
+ fclose(file);
+ return NULL;
+ }
+ encoding = parseEncodingFile(f, 0);
+ FontFileClose(f);
+ break;
+ }
+ }
+
+ fclose(file);
+
+ return encoding;
+}
+
+/* Parser ntrypoint -- used by FontEncLoad */
+FontEncPtr
+FontEncReallyLoad(const char *charset, const char *fontFileName)
+{
+ FontEncPtr encoding;
+ char dir[MAXFONTFILENAMELEN], dirname[MAXFONTFILENAMELEN];
+ char *d;
+
+ if(fontFileName) {
+ parseFontFileName(fontFileName, dirname, dir);
+ encoding = FontEncReallyReallyLoad(charset, dirname, dir);
+ if(encoding)
+ return(encoding);
+ }
+
+ d = FontEncDirectory();
+ if(d) {
+ parseFontFileName(d, NULL, dir);
+ encoding = FontEncReallyReallyLoad(charset, d, dir);
+ return encoding;
+ }
+
+ return NULL;
+}
+
+/* Return a NULL-terminated array of encoding names. Note that this
+ * function has incestuous knowledge of the allocations done by
+ * parseEncodingFile. */
+
+char **
+FontEncIdentify(const char *fileName)
+{
+ FontFilePtr f;
+ FontEncPtr encoding;
+ char **names, **name, **alias;
+ int numaliases;
+
+ if((f = FontFileOpen(fileName))==NULL) {
+ return NULL;
+ }
+ encoding = parseEncodingFile(f, 1);
+ FontFileClose(f);
+
+ if(!encoding)
+ return NULL;
+
+ numaliases = 0;
+ if(encoding->aliases)
+ for(alias = encoding->aliases; *alias; alias++)
+ numaliases++;
+
+ names = malloc((numaliases+2)*sizeof(char*));
+ if(names == NULL) {
+ free(encoding->aliases);
+ free(encoding);
+ return NULL;
+ }
+
+ name = names;
+ *(name++) = encoding->name;
+ if(numaliases > 0)
+ for(alias = encoding->aliases; *alias; alias++, name++)
+ *name = *alias;
+
+ *name = NULL;
+ free(encoding->aliases);
+ free(encoding);
+
+ return names;
+}
--- /dev/null
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+/* Backend-independent encoding code */
+
+#include <string.h>
+
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <strings.h>
+#endif
+
+#include <stdlib.h>
+
+#define FALSE 0
+#define TRUE 1
+#define MAXFONTNAMELEN 1024
+#define MAXFONTFILENAMELEN 1024
+
+#include <X11/fonts/fontenc.h>
+#include "fontencI.h"
+
+/* Functions local to this file */
+
+static FontEncPtr FontEncLoad(const char*, const char*);
+
+/* Early versions of this code only knew about hardwired encodings,
+ hence the following data. Now that the code knows how to load an
+ encoding from a file, most of these tables could go away. */
+
+/* At any rate, no new hardcoded encodings will be added. */
+
+static FontMapRec iso10646[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,NULL,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* Notice that the Apple encodings do not have all the characters in
+ the corresponding ISO 8859, and therefore the table has some holes.
+ There's not much more we can do with fonts without a Unicode cmap
+ unless we are willing to combine cmaps (which we are not). */
+
+static const unsigned short
+iso8859_1_apple_roman[]=
+{ 0xCA, 0xC1, 0xA2, 0xA3, 0xDB, 0xB4, 0x00, 0xA4,
+ 0xAC, 0xA9, 0xBB, 0xC7, 0xC2, 0x00, 0xA8, 0xF8,
+ 0xA1, 0xB1, 0x00, 0x00, 0xAB, 0xB5, 0xA6, 0xE1,
+ 0xFC, 0x00, 0xBC, 0xC8, 0x00, 0x00, 0x00, 0xC0,
+ 0xCB, 0xE7, 0xE5, 0xCC, 0x80, 0x81, 0xAE, 0x82,
+ 0xE9, 0x83, 0xE6, 0xE8, 0xED, 0xEA, 0xEB, 0xEC,
+ 0x00, 0x84, 0xF1, 0xEE, 0xEF, 0xCD, 0x85, 0x00,
+ 0xAF, 0xF4, 0xF2, 0xF3, 0x86, 0x00, 0x00, 0xA7,
+ 0x88, 0x87, 0x89, 0x8B, 0x8A, 0x8C, 0xBE, 0x8D,
+ 0x8F, 0x8E, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95,
+ 0x00, 0x96, 0x98, 0x97, 0x99, 0x9B, 0x9A, 0xD6,
+ 0xBF, 0x9D, 0x9C, 0x9E, 0x9F, 0x00, 0x00, 0xD8 };
+
+/* Cannot use simple_recode because need to eliminate 0x80<=code<0xA0 */
+static unsigned
+iso8859_1_to_apple_roman(unsigned isocode, void *client_data)
+{
+ if(isocode<=0x80)
+ return isocode;
+ else if(isocode>=0xA0)
+ return iso8859_1_apple_roman[isocode-0xA0];
+ else
+ return 0;
+}
+
+static FontMapRec iso8859_1[]=
+{
+ {FONT_ENCODING_TRUETYPE,2,2,NULL,NULL,NULL,NULL,NULL}, /* ISO 8859-1 */
+ {FONT_ENCODING_UNICODE,0,0,NULL,NULL,NULL,NULL,NULL}, /* ISO 8859-1 coincides with Unicode*/
+ {FONT_ENCODING_TRUETYPE,1,0,iso8859_1_to_apple_roman,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static const unsigned short iso8859_2_tophalf[]=
+{ 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
+ 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
+ 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
+ 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
+ 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+ 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+ 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
+ 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+ 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
+ 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
+ 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 };
+
+static FontEncSimpleMapRec iso8859_2_to_unicode_map=
+{0x60, 0, 0xA0, iso8859_2_tophalf };
+
+static const unsigned short iso8859_2_apple_centeuro[]=
+{ 0xCA, 0x84, 0x00, 0xFC, 0x00, 0xBB, 0xE5, 0xA4,
+ 0xAC, 0xE1, 0x00, 0xE8, 0x8F, 0x00, 0xEB, 0xFB,
+ 0xA1, 0x88, 0x00, 0xB8, 0x00, 0xBC, 0xE6, 0xFF,
+ 0x00, 0xE4, 0x00, 0xE9, 0x90, 0x00, 0xEC, 0xFD,
+ 0xD9, 0xE7, 0x00, 0x00, 0x80, 0xBD, 0x8C, 0x00,
+ 0x89, 0x83, 0xA2, 0x00, 0x9D, 0xEA, 0x00, 0x91,
+ 0x00, 0xC1, 0xC5, 0xEE, 0xEF, 0xCC, 0x85, 0x00,
+ 0xDB, 0xF1, 0xF2, 0xF4, 0x86, 0xF8, 0x00, 0xA7,
+ 0xDA, 0x87, 0x00, 0x00, 0x8A, 0xBE, 0x8D, 0x00,
+ 0x8B, 0x8E, 0xAB, 0x00, 0x9E, 0x92, 0x00, 0x93,
+ 0x00, 0xC4, 0xCB, 0x97, 0x99, 0xCE, 0x9A, 0xD6,
+ 0xDE, 0xF3, 0x9C, 0xF5, 0x9F, 0xF9, 0x00, 0x00 };
+
+static unsigned
+iso8859_2_to_apple_centeuro(unsigned isocode, void *client_data)
+{
+ if(isocode<=0x80)
+ return isocode;
+ else if(isocode>=0xA0)
+ return iso8859_2_apple_centeuro[isocode-0xA0];
+ else
+ return 0;
+}
+
+
+static FontMapRec iso8859_2[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,
+ FontEncSimpleRecode,NULL,&iso8859_2_to_unicode_map,NULL,NULL},
+ {FONT_ENCODING_TRUETYPE,1,29,iso8859_2_to_apple_centeuro,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static const unsigned short iso8859_3_tophalf[]=
+{ 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7,
+ 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B,
+ 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
+ 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C,
+ 0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7,
+ 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+ 0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
+ 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
+ 0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7,
+ 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+ 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
+ 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9};
+
+static FontEncSimpleMapRec iso8859_3_to_unicode_map=
+{ 0x60, 0, 0xA0, iso8859_3_tophalf };
+
+static FontMapRec iso8859_3[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,
+ FontEncSimpleRecode,NULL,&iso8859_3_to_unicode_map,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+
+static const unsigned short iso8859_4_tophalf[]=
+{ 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7,
+ 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
+ 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7,
+ 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
+ 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
+ 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
+ 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+ 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
+ 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
+ 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
+ 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+ 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9,
+};
+
+static FontEncSimpleMapRec iso8859_4_to_unicode_map=
+{ 0x60, 0, 0xA0, iso8859_4_tophalf };
+
+static FontMapRec iso8859_4[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,NULL,
+ &iso8859_4_to_unicode_map,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static const unsigned short iso8859_5_tophalf[]=
+{ 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
+ 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F};
+
+static FontEncSimpleMapRec iso8859_5_to_unicode_map=
+{ 0x60, 0, 0xA0, iso8859_5_tophalf };
+
+static const unsigned short
+iso8859_5_apple_cyrillic[]=
+{ 0xCA, 0xDD, 0xAB, 0xAE, 0xB8, 0xC1, 0xA7, 0xBA,
+ 0xB7, 0xBC, 0xBE, 0xCB, 0xCD, 0x00, 0xD8, 0xDA,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF,
+ 0xDC, 0xDE, 0xAC, 0xAF, 0xB9, 0xCF, 0xB4, 0xBB,
+ 0xC0, 0xBD, 0xBF, 0xCC, 0xCE, 0xA4, 0xD9, 0xDB };
+
+static unsigned
+iso8859_5_to_apple_cyrillic(unsigned isocode, void *client_data)
+{
+ if(isocode<=0x80)
+ return isocode;
+ else if(isocode>=0xA0)
+ return iso8859_5_apple_cyrillic[isocode-0x80];
+ else return 0;
+}
+
+static FontMapRec iso8859_5[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,NULL,
+ &iso8859_5_to_unicode_map,NULL,NULL},
+ {FONT_ENCODING_TRUETYPE,1,7,iso8859_5_to_apple_cyrillic,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* ISO 8859-6 seems useless for serving fonts (not enough presentation
+ * forms). What do Arabic-speakers use? */
+
+static unsigned
+iso8859_6_to_unicode(unsigned isocode, void *client_data)
+{
+ if(isocode<=0xA0 || isocode==0xA4 || isocode==0xAD)
+ return isocode;
+ else if(isocode==0xAC || isocode==0xBB ||
+ (isocode>=0xBF && isocode<=0xDA) ||
+ (isocode>=0xE0 && isocode<=0xEF) ||
+ (isocode>=0xF0 && isocode<=0xF2))
+ return isocode-0xA0+0x0600;
+ else
+ return 0;
+}
+
+static FontMapRec iso8859_6[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,iso8859_6_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static unsigned
+iso8859_7_to_unicode(unsigned isocode, void *client_data)
+{
+ if(isocode<=0xA0 ||
+ (isocode>=0xA3 && isocode<=0xAD) ||
+ (isocode>=0xB0 && isocode<=0xB3) ||
+ isocode==0xB7 || isocode==0xBB || isocode==0xBD)
+ return isocode;
+ else if(isocode==0xA1)
+ return 0x02BD;
+ else if(isocode==0xA2)
+ return 0x02BC;
+ else if(isocode==0xAF)
+ return 0x2015;
+ else if(isocode>=0xB4)
+ return isocode-0xA0+0x0370;
+ else
+ return 0;
+}
+
+static FontMapRec iso8859_7[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,iso8859_7_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static unsigned
+iso8859_8_to_unicode(unsigned isocode, void *client_data)
+{
+ if(isocode==0xA1)
+ return 0;
+ else if(isocode<0xBF)
+ return isocode;
+ else if(isocode==0xDF)
+ return 0x2017;
+ else if(isocode>=0xE0 && isocode<=0xFA)
+ return isocode+0x04F0;
+ else
+ return 0;
+}
+
+static FontMapRec iso8859_8[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,iso8859_8_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static unsigned
+iso8859_9_to_unicode(unsigned isocode, void *client_data)
+{
+ switch(isocode) {
+ case 0xD0: return 0x011E;
+ case 0xDD: return 0x0130;
+ case 0xDE: return 0x015E;
+ case 0xF0: return 0x011F;
+ case 0xFD: return 0x0131;
+ case 0xFE: return 0x015F;
+ default: return isocode;
+ }
+}
+
+static FontMapRec iso8859_9[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,iso8859_9_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static const unsigned short iso8859_10_tophalf[]=
+{ 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7,
+ 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
+ 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7,
+ 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2014, 0x016B, 0x014B,
+ 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
+ 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
+ 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168,
+ 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+ 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
+ 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
+ 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169,
+ 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138};
+
+static FontEncSimpleMapRec iso8859_10_to_unicode_map=
+{ 0x60, 0, 0xA0, iso8859_10_tophalf };
+
+static FontMapRec iso8859_10[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,NULL,
+ &iso8859_10_to_unicode_map,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static unsigned
+iso8859_15_to_unicode(unsigned isocode, void *client_data)
+{
+ switch(isocode) {
+ case 0xA4: return 0x20AC;
+ case 0xA6: return 0x0160;
+ case 0xA8: return 0x0161;
+ case 0xB4: return 0x017D;
+ case 0xB8: return 0x017E;
+ case 0xBC: return 0x0152;
+ case 0xBD: return 0x0153;
+ case 0xBE: return 0x0178;
+ default: return isocode;
+ }
+}
+
+static FontMapRec iso8859_15[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,iso8859_15_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static const unsigned short koi8_r_tophalf[]=
+{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
+ 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
+ 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2022, 0x221A, 0x2248,
+ 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
+ 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
+ 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
+ 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
+ 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
+ 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+ 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
+ 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+ 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
+ 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+ 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
+ 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+ 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A};
+
+static FontEncSimpleMapRec koi8_r_to_unicode_map=
+{ 0x80, 0, 0x80, koi8_r_tophalf };
+
+
+static FontMapRec koi8_r[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,NULL,
+ &koi8_r_to_unicode_map,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+static unsigned
+koi8_ru_to_unicode(unsigned koicode, void *client_data)
+{
+ switch(koicode) {
+ case 0x93: return 0x201C;
+ case 0x96: return 0x201D;
+ case 0x97: return 0x2014;
+ case 0x98: return 0x2116;
+ case 0x99: return 0x2122;
+ case 0x9B: return 0x00BB;
+ case 0x9C: return 0x00AE;
+ case 0x9D: return 0x00AB;
+ case 0x9F: return 0x00A4;
+ case 0xA4: return 0x0454;
+ case 0xA6: return 0x0456;
+ case 0xA7: return 0x0457;
+ case 0xAD: return 0x0491;
+ case 0xAE: return 0x045E;
+ case 0xB4: return 0x0404;
+ case 0xB6: return 0x0406;
+ case 0xB7: return 0x0407;
+ case 0xBD: return 0x0490;
+ case 0xBE: return 0x040E;
+ default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map);
+ }
+}
+
+static FontMapRec koi8_ru[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,koi8_ru_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* koi8-e, ISO-IR-111 or ECMA-Cyrillic */
+
+static const unsigned short koi8_e_A0_BF[]=
+{ 0x00A0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00AD, 0x045E, 0x045F,
+ 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407,
+ 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00A4, 0x040E, 0x040F };
+
+static unsigned
+koi8_e_to_unicode(unsigned koicode, void *client_data)
+{
+ if(koicode<0xA0)
+ return koicode;
+ else if(koicode<0xC0)
+ return koi8_e_A0_BF[koicode-0xA0];
+ else
+ return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map);
+}
+
+static FontMapRec koi8_e[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,koi8_e_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* Koi8 unified */
+
+static const unsigned short koi8_uni_80_BF[]=
+{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
+ 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
+ 0x2591, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0x00A9, 0x2122, 0x00A0, 0x00BB, 0x00AE, 0x00AB, 0x00B7, 0x00A4,
+ 0x00A0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x0491, 0x045E, 0x045F,
+ 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407,
+ 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x0490, 0x040E, 0x040F };
+
+static unsigned
+koi8_uni_to_unicode(unsigned koicode, void *client_data)
+{
+ if(koicode<0x80)
+ return koicode;
+ else if(koicode<0xC0)
+ return koi8_uni_80_BF[koicode-0x80];
+ else
+ return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map);
+}
+
+static FontMapRec koi8_uni[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,koi8_uni_to_unicode,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* Ukrainian variant of Koi8-R; see RFC 2319 */
+
+static unsigned
+koi8_u_to_unicode(unsigned koicode, void *client_data)
+{
+ switch(koicode) {
+ case 0xA4: return 0x0454;
+ case 0xA6: return 0x0456;
+ case 0xA7: return 0x0457;
+ case 0xAD: return 0x0491;
+ case 0xB4: return 0x0404;
+ case 0xB6: return 0x0406;
+ case 0xB7: return 0x0407;
+ case 0xBD: return 0x0490;
+ default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map);
+ }
+}
+
+static FontMapRec koi8_u[]=
+{
+ {FONT_ENCODING_UNICODE,0,0,koi8_u_to_unicode,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}
+};
+
+/* Microsoft Symbol, which is only meaningful for TrueType fonts, is
+ treated specially in ftenc.c, where we add usFirstCharIndex-0x20 to
+ the glyph index before applying the cmap. Lovely design. */
+
+static FontMapRec microsoft_symbol[]=
+{{FONT_ENCODING_TRUETYPE,3,0,NULL,NULL,NULL,NULL,NULL},
+ /* You never know */
+ {FONT_ENCODING_TRUETYPE,3,1,NULL,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}};
+
+static FontMapRec apple_roman[]=
+{{FONT_ENCODING_TRUETYPE,1,0,NULL,NULL,NULL,NULL,NULL},
+ {0,0,0,NULL,NULL,NULL,NULL,NULL}};
+
+/* The data for recodings */
+
+/* For compatibility with X11R6.4. Losers. */
+static char *iso8859_15_aliases[2]={"fcd8859-15",NULL};
+
+static FontEncRec initial_encodings[]=
+{
+ {"iso10646-1",NULL,256*256,0,iso10646,NULL,0,0}, /* Unicode */
+ {"iso8859-1",NULL,256,0,iso8859_1,NULL,0,0}, /* Latin 1 (West European) */
+ {"iso8859-2",NULL,256,0,iso8859_2,NULL,0,0}, /* Latin 2 (East European) */
+ {"iso8859-3",NULL,256,0,iso8859_3,NULL,0,0}, /* Latin 3 (South European) */
+ {"iso8859-4",NULL,256,0,iso8859_4,NULL,0,0}, /* Latin 4 (North European) */
+ {"iso8859-5",NULL,256,0,iso8859_5,NULL,0,0}, /* Cyrillic */
+ {"iso8859-6",NULL,256,0,iso8859_6,NULL,0,0}, /* Arabic */
+ {"iso8859-7",NULL,256,0,iso8859_7,NULL,0,0}, /* Greek */
+ {"iso8859-8",NULL,256,0,iso8859_8,NULL,0,0}, /* Hebrew */
+ {"iso8859-9",NULL,256,0,iso8859_9,NULL,0,0}, /* Latin 5 (Turkish) */
+ {"iso8859-10",NULL,256,0,iso8859_10,NULL,0,0}, /* Latin 6 (Nordic) */
+ {"iso8859-15",iso8859_15_aliases,256,0,iso8859_15,NULL,0,0}, /* Latin 9 */
+ {"koi8-r",NULL,256,0,koi8_r,NULL,0,0}, /* Russian */
+ {"koi8-ru",NULL,256,0,koi8_ru,NULL,0,0}, /* Ukrainian */
+ {"koi8-uni",NULL,256,0,koi8_uni,NULL,0,0}, /* Russian/Ukrainian/Bielorussian */
+ {"koi8-e",NULL,256,0,koi8_e,NULL,0,0}, /* ``European'' */
+ {"koi8-u",NULL,256,0,koi8_u,NULL,0,0}, /* Ukrainian too */
+ {"microsoft-symbol",NULL,256,0,microsoft_symbol,NULL,0,0},
+ {"apple-roman",NULL,256,0,apple_roman,NULL,0,0},
+ {NULL,NULL,0,0,NULL,NULL,0,0}
+};
+
+static FontEncPtr font_encodings=NULL;
+
+static void
+define_initial_encoding_info(void)
+{
+ FontEncPtr encoding;
+ FontMapPtr mapping;
+
+ font_encodings = initial_encodings;
+ for(encoding = font_encodings; ; encoding++) {
+ encoding->next = encoding + 1;
+ for(mapping = encoding->mappings; ; mapping++) {
+ mapping->next = mapping+1;
+ mapping->encoding = encoding;
+ if(mapping->next->type == 0) {
+ mapping->next = NULL;
+ break;
+ }
+ }
+ if(!encoding->next->name) {
+ encoding->next = NULL;
+ break;
+ }
+ }
+}
+
+
+char*
+FontEncFromXLFD(const char *name, int length)
+{
+ const char *p;
+ char *q;
+ static char charset[MAXFONTNAMELEN];
+ int len;
+
+ if(length > MAXFONTNAMELEN - 1)
+ return NULL;
+
+ if(name == NULL)
+ p = NULL;
+ else {
+ p = name + length - 1;
+ while(p > name && *p != '-')
+ p--;
+ p--;
+ while(p >= name && *p != '-')
+ p--;
+ if(p <= name)
+ p = NULL;
+ }
+
+ /* now p either is null or points at the '-' before the charset registry */
+
+ if(p == NULL)
+ return NULL;
+
+ len = length - (p - name) - 1;
+ memcpy(charset, p+1, len);
+ charset[len] = 0;
+
+ /* check for a subset specification */
+ if((q = strchr(charset, (int)'[')))
+ *q = 0;
+
+ return charset;
+}
+
+unsigned
+FontEncRecode(unsigned code, FontMapPtr mapping)
+{
+ FontEncPtr encoding = mapping->encoding;
+ if(encoding && mapping->recode) {
+ if(encoding->row_size == 0) {
+ /* linear encoding */
+ if(code < encoding->first || code>=encoding->size)
+ return 0;
+ } else {
+ /* matrix encoding */
+ int row = code/0x100, col = code&0xFF;
+ if(row < encoding->first || row >= encoding->size ||
+ col < encoding->first_col || col >= encoding->row_size)
+ return 0;
+ }
+ return (*mapping->recode)(code, mapping->client_data);
+ } else
+ return code;
+}
+
+char*
+FontEncName(unsigned code, FontMapPtr mapping)
+{
+ FontEncPtr encoding = mapping->encoding;
+ if(encoding && mapping->name) {
+ if((encoding->row_size == 0 && code >= encoding->size) ||
+ (encoding->row_size != 0 &&
+ (code/0x100 >= encoding->size ||
+ (code&0xFF) >= encoding->row_size)))
+ return NULL;
+ return (*mapping->name)(code, mapping->client_data);
+ } else
+ return NULL;
+}
+
+FontEncPtr
+FontEncFind(const char *encoding_name, const char *filename)
+{
+ FontEncPtr encoding;
+ char **alias;
+
+ if(font_encodings == NULL) define_initial_encoding_info();
+
+ for(encoding = font_encodings; encoding; encoding = encoding->next) {
+ if(!strcasecmp(encoding->name, encoding_name))
+ return encoding;
+ if(encoding->aliases)
+ for(alias=encoding->aliases; *alias; alias++)
+ if(!strcasecmp(*alias, encoding_name))
+ return encoding;
+ }
+
+ /* Unknown charset, try to load a definition file */
+ return FontEncLoad(encoding_name, filename);
+}
+
+FontMapPtr
+FontMapFind(FontEncPtr encoding, int type, int pid, int eid)
+{
+ FontMapPtr mapping;
+ if(encoding == NULL)
+ return NULL;
+
+ for(mapping = encoding->mappings; mapping; mapping = mapping->next) {
+ if(mapping->type != type)
+ continue;
+ if(pid > 0 && mapping->pid != pid)
+ continue;
+ if(eid > 0 && mapping->eid != eid)
+ continue;
+ return mapping;
+ }
+ return NULL;
+}
+
+FontMapPtr
+FontEncMapFind(const char *encoding_name, int type, int pid, int eid,
+ const char *filename)
+{
+ FontEncPtr encoding;
+ FontMapPtr mapping;
+
+ encoding = FontEncFind(encoding_name, filename);
+ if(encoding == NULL)
+ return NULL;
+ mapping = FontMapFind(encoding, type, pid, eid);
+ return mapping;
+}
+
+static FontEncPtr
+FontEncLoad(const char *encoding_name, const char *filename)
+{
+ FontEncPtr encoding;
+
+ encoding = FontEncReallyLoad(encoding_name, filename);
+ if (encoding == NULL) {
+ return NULL;
+ } else {
+ char **alias;
+ int found = 0;
+
+ /* Check whether the name is already known for this encoding */
+ if(strcasecmp(encoding->name, encoding_name) == 0) {
+ found = 1;
+ } else {
+ if(encoding->aliases) {
+ for(alias=encoding->aliases; *alias; alias++)
+ if(!strcasecmp(*alias, encoding_name)) {
+ found = 1;
+ break;
+ }
+ }
+ }
+
+ if(!found) {
+ /* Add a new alias. This works because we know that this
+ particular encoding has been allocated dynamically */
+ char **new_aliases;
+ char *new_name;
+ int numaliases = 0;
+
+ new_name = strdup(encoding_name);
+ if(new_name == NULL)
+ return NULL;
+ if(encoding->aliases) {
+ for(alias = encoding->aliases; *alias; alias++)
+ numaliases++;
+ }
+ new_aliases = malloc((numaliases+2)*sizeof(char*));
+ if(new_aliases == NULL) {
+ free(new_name);
+ return NULL;
+ }
+ if(encoding->aliases) {
+ memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*));
+ free(encoding->aliases);
+ }
+ new_aliases[numaliases] = new_name;
+ new_aliases[numaliases+1] = NULL;
+ encoding->aliases = new_aliases;
+ }
+
+ /* register the new encoding */
+ encoding->next=font_encodings;
+ font_encodings=encoding;
+
+ return encoding;
+ }
+}
+
+unsigned
+FontEncSimpleRecode(unsigned code, void *client_data)
+{
+ FontEncSimpleMapPtr map;
+ unsigned index;
+
+ map = client_data;
+
+ if(code > 0xFFFF || (map->row_size && (code&0xFF) >= map->row_size))
+ return 0;
+
+ if(map->row_size)
+ index = (code&0xFF)+(code>>8)*map->row_size;
+ else
+ index = code;
+
+ if(map->map && index>=map->first && index<map->first+map->len)
+ return map->map[index-map->first];
+ else
+ return code;
+}
+
+char *
+FontEncSimpleName(unsigned code, void *client_data)
+{
+ FontEncSimpleNamePtr map;
+
+ map = client_data;
+ if(map && code >= map->first && code<map->first+map->len)
+ return map->map[code-map->first];
+ else
+ return NULL;
+}
+
+unsigned
+FontEncUndefinedRecode(unsigned code, void *client_data)
+{
+ return code;
+}
+
+char *
+FontEncUndefinedName(unsigned code, void *client_data)
+{
+ return NULL;
+}
+
+#define FONTENC_SEGMENT_SIZE 256
+#define FONTENC_SEGMENTS 256
+#define FONTENC_INVERSE_CODES (FONTENC_SEGMENT_SIZE * FONTENC_SEGMENTS)
+
+static unsigned int
+reverse_reverse(unsigned i, void* data)
+{
+ int s, j;
+ unsigned **map = (unsigned**)data;
+
+ if(i >= FONTENC_INVERSE_CODES)
+ return 0;
+
+ if(map == NULL)
+ return 0;
+
+ s = i / FONTENC_SEGMENT_SIZE;
+ j = i % FONTENC_SEGMENT_SIZE;
+
+ if(map[s] == NULL)
+ return 0;
+ else
+ return map[s][j];
+}
+
+static int
+tree_set(unsigned int **map, unsigned int i, unsigned int j)
+{
+ int s, c;
+
+ if(i >= FONTENC_INVERSE_CODES)
+ return FALSE;
+
+ s = i / FONTENC_SEGMENT_SIZE;
+ c = i % FONTENC_SEGMENT_SIZE;
+
+ if(map[s] == NULL) {
+ map[s] = calloc(FONTENC_SEGMENT_SIZE, sizeof(int));
+ if(map[s] == NULL)
+ return FALSE;
+ }
+
+ map[s][c] = j;
+ return TRUE;
+}
+
+FontMapReversePtr
+FontMapReverse(FontMapPtr mapping)
+{
+ FontEncPtr encoding = mapping->encoding;
+ FontMapReversePtr reverse = NULL;
+ unsigned int **map = NULL;
+ int i, j, k;
+
+ if(encoding == NULL) goto bail;
+
+ map = calloc(FONTENC_SEGMENTS, sizeof(int*));
+ if(map == NULL) goto bail;
+
+ if(encoding->row_size == 0) {
+ for(i = encoding->first; i < encoding->size; i++) {
+ k = FontEncRecode(i, mapping);
+ if(k != 0)
+ if(!tree_set(map, k, i))
+ goto bail;
+ }
+ } else {
+ for(i = encoding->first; i < encoding->size; i++) {
+ for(j = encoding->first_col; j < encoding->row_size; j++) {
+ k = FontEncRecode(i*256 + j, mapping);
+ if(k != 0)
+ if(!tree_set(map, k, i*256+j))
+ goto bail;
+ }
+ }
+ }
+
+ reverse = malloc(sizeof(FontMapReverseRec));
+ if(!reverse) goto bail;
+
+ reverse->reverse = reverse_reverse;
+ reverse->data = map;
+ return reverse;
+
+ bail:
+ free(map);
+ free(reverse);
+ return NULL;
+}
+
+void
+FontMapReverseFree(FontMapReversePtr delendum)
+{
+ unsigned int **map = (unsigned int**)delendum;
+ int i;
+
+ if(map == NULL)
+ return;
+
+ for(i = 0; i < FONTENC_SEGMENTS; i++)
+ free(map[i]);
+
+ free(map);
+ return;
+}
--- /dev/null
+/*
+Copyright (c) 1998-2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+/* Private types and functions for the encoding code. */
+/* Used by the files `fontenc.h' and `encparse.h' */
+
+typedef struct _FontEncSimpleMap {
+ unsigned len; /* might be 0x10000 */
+ unsigned short row_size;
+ unsigned short first;
+ const unsigned short *map;
+} FontEncSimpleMapRec, *FontEncSimpleMapPtr;
+
+typedef struct _FontEncSimpleName {
+ unsigned len;
+ unsigned short first;
+ char **map;
+} FontEncSimpleNameRec, *FontEncSimpleNamePtr;
+
+unsigned FontEncSimpleRecode(unsigned, void*);
+unsigned FontEncUndefinedRecode(unsigned, void*);
+char *FontEncSimpleName(unsigned, void*);
+char *FontEncUndefinedName(unsigned, void*);
+
+FontEncPtr FontEncReallyLoad(const char*, const char*);