upload tizen2.0 source 2.0alpha master 2.0_alpha submit/master/20120920.151135
authorBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:05 +0000 (18:04 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:05 +0000 (18:04 +0900)
104 files changed:
COPYING
ChangeLog [changed mode: 0755->0644]
INSTALL [new file with mode: 0644]
Makefile.am [changed mode: 0755->0644]
autogen.sh [deleted file]
configure.ac [changed mode: 0755->0644]
debian/README.source [deleted file]
debian/changelog [deleted file]
debian/compat [deleted file]
debian/control [deleted file]
debian/copyright [deleted file]
debian/libxfont-dev.install [deleted file]
debian/libxfont1-udeb.install [deleted file]
debian/libxfont1.install [deleted file]
debian/rules [deleted file]
debian/watch [deleted file]
debian/xsfbs/repack.sh [deleted file]
debian/xsfbs/xsfbs.mk [deleted file]
debian/xsfbs/xsfbs.sh [deleted file]
devbook.am [new file with mode: 0644]
doc/Makefile.am [changed mode: 0755->0644]
doc/fontlib.css [deleted file]
doc/fontlib.xml [changed mode: 0755->0644]
doc/fontlib.xsl [deleted file]
include/X11/fonts/bdfint.h [changed mode: 0755->0644]
include/X11/fonts/bitmap.h [changed mode: 0755->0644]
include/X11/fonts/bufio.h [changed mode: 0755->0644]
include/X11/fonts/fntfil.h [changed mode: 0755->0644]
include/X11/fonts/fntfilio.h [changed mode: 0755->0644]
include/X11/fonts/fntfilst.h [changed mode: 0755->0644]
include/X11/fonts/fontconf.h.in [changed mode: 0755->0644]
include/X11/fonts/fontencc.h [changed mode: 0755->0644]
include/X11/fonts/fontmisc.h [changed mode: 0755->0644]
include/X11/fonts/fontshow.h [changed mode: 0755->0644]
include/X11/fonts/fontutil.h [changed mode: 0755->0644]
include/X11/fonts/fontxlfd.h [changed mode: 0755->0644]
include/X11/fonts/pcf.h [changed mode: 0755->0644]
packaging/libXfont.spec [new file with mode: 0644]
packaging/libxfont.spec [deleted file]
src/FreeType/ft.h [changed mode: 0755->0644]
src/FreeType/ftenc.c [changed mode: 0755->0644]
src/FreeType/ftfuncs.c [changed mode: 0755->0644]
src/FreeType/ftfuncs.h [changed mode: 0755->0644]
src/FreeType/fttools.c [changed mode: 0755->0644]
src/FreeType/xttcap.c [changed mode: 0755->0644]
src/FreeType/xttcap.h [changed mode: 0755->0644]
src/Makefile.am [changed mode: 0755->0644]
src/bitmap/Makefile.am [changed mode: 0755->0644]
src/bitmap/bdfread.c [changed mode: 0755->0644]
src/bitmap/bdfutils.c [changed mode: 0755->0644]
src/bitmap/bitmap.c [changed mode: 0755->0644]
src/bitmap/bitmapfunc.c [changed mode: 0755->0644]
src/bitmap/bitmaputil.c [changed mode: 0755->0644]
src/bitmap/bitscale.c [changed mode: 0755->0644]
src/bitmap/fontink.c [changed mode: 0755->0644]
src/bitmap/pcfread.c [changed mode: 0755->0644]
src/bitmap/pcfwrite.c [changed mode: 0755->0644]
src/bitmap/snfread.c [changed mode: 0755->0644]
src/bitmap/snfstr.h [changed mode: 0755->0644]
src/builtins/buildfont
src/builtins/builtin.h [changed mode: 0755->0644]
src/builtins/dir.c
src/builtins/file.c [changed mode: 0755->0644]
src/builtins/fonts.c [changed mode: 0755->0644]
src/builtins/fpe.c [changed mode: 0755->0644]
src/builtins/render.c [changed mode: 0755->0644]
src/fc/fsconvert.c [changed mode: 0755->0644]
src/fc/fserve.c [changed mode: 0755->0644]
src/fc/fserve.h [changed mode: 0755->0644]
src/fc/fservestr.h [changed mode: 0755->0644]
src/fc/fsio.c [changed mode: 0755->0644]
src/fc/fsio.h [changed mode: 0755->0644]
src/fc/fslibos.h [changed mode: 0755->0644]
src/fc/fstrans.c
src/fontfile/bitsource.c [changed mode: 0755->0644]
src/fontfile/bufio.c [changed mode: 0755->0644]
src/fontfile/bunzip2.c [changed mode: 0755->0644]
src/fontfile/catalogue.c [changed mode: 0755->0644]
src/fontfile/decompress.c [changed mode: 0755->0644]
src/fontfile/defaults.c [changed mode: 0755->0644]
src/fontfile/dirfile.c [changed mode: 0755->0644]
src/fontfile/fileio.c [changed mode: 0755->0644]
src/fontfile/filewr.c [changed mode: 0755->0644]
src/fontfile/fontdir.c [changed mode: 0755->0644]
src/fontfile/fontencc.c [changed mode: 0755->0644]
src/fontfile/fontfile.c [changed mode: 0755->0644]
src/fontfile/fontscale.c [changed mode: 0755->0644]
src/fontfile/gunzip.c [changed mode: 0755->0644]
src/fontfile/register.c
src/fontfile/renderers.c [changed mode: 0755->0644]
src/stubs/Makefile.am
src/stubs/regfpefunc.c
src/stubs/rmfshdl.c
src/stubs/stubs.h [changed mode: 0755->0644]
src/util/atom.c [changed mode: 0755->0644]
src/util/fontaccel.c [changed mode: 0755->0644]
src/util/fontnames.c [changed mode: 0755->0644]
src/util/fontutil.c [changed mode: 0755->0644]
src/util/fontxlfd.c [changed mode: 0755->0644]
src/util/format.c [changed mode: 0755->0644]
src/util/miscutil.c [changed mode: 0755->0644]
src/util/patcache.c [changed mode: 0755->0644]
src/util/private.c [changed mode: 0755->0644]
src/util/utilbitmap.c [changed mode: 0755->0644]

diff --git a/COPYING b/COPYING
index b271bf3..d43a6f8 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,5 +1,5 @@
 Copyright Â© 2007 Red Hat, Inc
-Copyright Â© 2008,2009 Sun Microsystems, Inc.  All rights reserved.
+Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
old mode 100755 (executable)
new mode 100644 (file)
index b734a4a..98dcfbe
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,308 @@
+commit 4b67ad5486c322c01a2ca86b0b4af0a74228f813
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Mar 2 10:05:21 2012 -0800
+
+    libXfont 1.4.5
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3f87a8b0b86de83ea8944a53de82caf254a9988a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Oct 21 20:49:50 2011 -0700
+
+    Use * precision notation instead of computing sprintf format strings
+
+    Allows gcc to check format strings instead of just warning about them
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 613faa245437bb948b4c86ea6c7fbb716e38f0bf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Oct 2 09:30:09 2011 -0700
+
+    Fix printf warnings about incorrect argument types
+
+    Mostly due to difference between sizeof & int on 64-bit platforms
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit f24c559bcb42e3ea9321c3e6a9ecf0720a581e33
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Oct 2 09:19:47 2011 -0700
+
+    Add _X_ATTRIBUTE_PRINTF to *Error/*Warning functions taking printf formats
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 3715cd752bac912a56aa1cbb9dd874624a709aab
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Oct 2 09:16:05 2011 -0700
+
+    Add const attributes to fix gcc -Wwrite-strings warnings
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 8d130ac0fcf19e0e0dd0a404d9317fd8860baad4
+Author: Tomas Hoger <thoger@redhat.com>
+Date:   Mon Oct 10 14:38:06 2011 -0700
+
+    Support compress files with maxbits < 12
+
+    The compress decompression code used by libXfont rejects valid archives
+    with maxbits less than 12 (compress allows values 9 - 16, 16 is the
+    default).  This is because maxbits-12 is used as index to hsize_table[].
+
+    That looks like an incorrect port of the original compress code, where:
+    - hsize depended on BITS, the maximum maxbits value supported by particular
+      build, rather than on maxbits value from the particular input file
+    - the same hsize was used for all BITS <= 12
+
+    The quick way to verify the problem is:
+      compress -b 11 fontfile.bdf
+      bdftopcf -o /dev/null fontfile.bdf.Z
+    which fails, while 12-16 works correctly.
+
+    This fix removes hsize_table and uses 1 << maxbits (aka maxmaxcode) as
+    tab_prefix size.  As decompression code does not use hashing as compression
+    code, there does not seem to be a reason to allocate any extra space.
+
+    Note: In this fix, maxbits == 9 is still rejected early.  AFAICS compress
+    is able to generate such files (unknown how correct such output is), but is
+    unable to uncompress them correctly.
+
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit bb97dbf56dff50bef936c0631587ed08dd6c8fa9
+Author: Matt Dew <marcoz@osource.org>
+Date:   Mon Oct 3 20:23:47 2011 -0600
+
+        1 - fix the capitalization of the ID attriutes to match either the
+            <title> or <funcdef> string it goes with.
+        2 - fix any <linkend>'s that were affected by 1.
+        3 - any <function> in the docs that has an actual funcdef,
+            will become an olink.
+
+        Signed-off-by: Matt Dew <marcoz@osource.org>
+
+commit c73a0e09a2713d0dc16ca5cd9d288b8868846a19
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Sep 22 14:00:36 2011 -0400
+
+    doc: fix typo in copyright statement
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d86d8f34f5c2ac5c80230aea2de49bb97eaf5f92
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Sep 22 09:20:38 2011 -0400
+
+    doc: refactor legal text for multi licensing copyrights
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 43d587d89bee679850bb18ff25aa77c961712728
+Author: Olli Vertanen <olli.vertanen@symbio.com>
+Date:   Tue Sep 6 19:00:55 2011 +0000
+
+    libxfont: An uninitialized pointer causes a crash if pcf header is corrupted.
+
+    If pcfReadTOC() or pcfGetProperties() fail in the beginning
+    of execution of pcfReadFont(), function tries to free an
+    uninitialized pointer (isStringProp) when bailing out.
+
+    The pointer gets now initialized correctly.
+
+    Signed-off-by: Olli Vertanen <olli.vertanen@symbio.com>
+    Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
+
+commit 73e6c94a351c891ed85446df84c9a30a4224f478
+Author: Joerg Sonnenberger <joerg@britannica.bec.de>
+Date:   Sun Aug 21 19:07:51 2011 +0200
+
+    Fix empty statement in if conditional.
+
+    Assume for a moment that the intention here is to do
+    something useful.
+
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+
+commit bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa
+Author: Joerg Sonnenberger <joerg@britannica.bec.de>
+Date:   Sun Aug 21 18:51:53 2011 +0200
+
+    Do proper input validation to fix for CVE-2011-2895.
+
+    It ensures that all valid input can be decompressed, checks that the
+    overflow conditions doesn't happen and generally tightens the
+    validation of the LZW stream and doesn't pessimize the inner loop for
+    no good reason. It's derived from a change in libarchive from 2004.
+
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Reviewed-by: Tomas Hoger <thoger@redhat.com>
+
+commit 098ab294deed98371ee362fadafcf2e510e0cc50
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:21:21 2011 -0700
+
+    Strip trailing whitespace
+
+    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+    git diff -w & git diff -b show no diffs from this change
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 211368b8d04ed13ba520de2dd49a875cb1d663a7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Sep 12 11:09:50 2011 -0400
+
+    docs: use the &fullrelvers; entity to set X11 release information
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 425ee265c61b3815a0ef1e4e0445dc91921d71ee
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Sep 9 13:08:04 2011 -0400
+
+    devbook.am: maintenance update from docbook.am
+
+    The developer docs are generated from a subset of docbook.am
+    which is sometimes updated.
+
+    The one difference is the embedded css style in the HEAD element.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1c7cfd7a2b89329f27951c0437f925dd3301e3de
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Aug 10 22:19:44 2011 -0700
+
+    Remove configure comment about synchronizing version numbers
+
+    This appears to have been a mistaken copy-and-paste from something like
+    libXcursor - I can't find any Xfont.h header, nor any libXfont header
+    containing a version number.
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+
+commit a7970f5c817b5c75d945389cfaf1384ff23437f3
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Mon Aug 8 18:08:05 2011 +0200
+
+    libXfont 1.4.4
+
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d11ee5886e9d9ec610051a206b135a4cdc1e09a0
+Author: Thomas Hoger <thoger@redhat.com>
+Date:   Mon Aug 8 18:03:09 2011 +0200
+
+    LZW decompress: fix for CVE-2011-2895
+
+    Specially crafted LZW stream can crash an application using libXfont
+    that is used to open untrusted font files.  With X server, this may
+    allow privilege escalation when exploited
+
+    Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 214ca6a7a2247544627e6dc7c8705811305ad007
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon May 16 18:28:13 2011 -0700
+
+    Fix memory leak in allocation failure path of BitmapOpenScalable()
+
+    Go ahead and fill in the font->info pointers so that bitmapUnloadScalable()
+    will free the bits that were allocated, even if some were not.
+
+    Error: Memory leak (CWE 401)
+       Memory leak of pointer <unknown> allocated with ComputeScaledProperties(...)
+            at line 1629 of /export/alanc/X.Org/git/lib/libXfont/src/bitmap/bitscale.c in function 'BitmapOpenScalable'.
+              pointer allocated at line 1616 with ComputeScaledProperties(...).
+              <unknown> leaks when props != 0 at line 1623.
+
+    [ This bug was found by the Parfait 0.3.7 bug checking tool.
+      For more information see http://labs.oracle.com/projects/parfait/ ]
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 7f8345aa6fb60a7fd7adf0095a2354fad1d8d5ef
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Mar 2 14:33:07 2011 -0500
+
+    doc: use common makefile for developers documentation
+
+    The user/specs docs now have external references support.
+    Developers doc are not installed so they do not participate.
+    However, using a similar makefile shared amongst developers
+    document reduces maintenance and is forward looking.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 77027deabca37183cfbbed107cf14ca80f29f26d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:42 2011 -0500
+
+    config: comment, minor upgrade, quote and layout configure.ac
+
+    Group statements per section as per Autoconf standard layout
+    Quote statements where appropriate.
+    Autoconf recommends not using dnl instead of # for comments
+
+    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
+    Add AC_CONFIG_SRCDIR([Makefile.am])
+
+    This helps automated maintenance and release activities.
+    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+commit 9ea1790d61bd135714c40e5089ecb1effa1dbcc0
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 18:50:15 2011 -0500
+
+    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+
+    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+    AC_PROG_C_C99. This sets gcc with -std=gnu99.
+    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4e0c6c45d819befdd9315d6282b957f7cfec3ae2
+Author: Paulo Zanoni <pzanoni@mandriva.com>
+Date:   Thu Dec 16 14:09:12 2010 -0200
+
+    Use docbookx.dtd version 4.3 for all docs
+
+    Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 01c30845853f5a8114467185d76274ae9bbff091
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 21 11:35:20 2010 -0800
+
+    Sun's copyrights belong to Oracle now
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 72ade58381a49514f2b29065ba33a464b7efc3d0
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Nov 9 13:04:51 2010 -0500
+
+    config: HTML file generation: use the installed copy of xorg.css
+
+    Currenlty the xorg.css file is copied in each location
+    where a DocBook/XML file resides. This produces about
+    70 copies in the $(docdir) install tree.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
 commit 12157fbebc35c2d039df2df4fc5ac2b299eeec03
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Thu Oct 28 20:43:27 2010 -0700
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..c9fd2c0
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,290 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
old mode 100755 (executable)
new mode 100644 (file)
index 9153e98..7ec3188
@@ -1,6 +1,6 @@
-# 
+#
 #  Copyright Â© 2003 Keith Packard, Noah Levitt
-# 
+#
 #  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
@@ -10,7 +10,7 @@
 #  specific, written prior permission.  Keith Packard makes no
 #  representations about the suitability of this software for any purpose.  It
 #  is provided "as is" without express or implied warranty.
-# 
+#
 #  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 #  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100644 (file)
index 904cd67..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
old mode 100755 (executable)
new mode 100644 (file)
index 8389dfc..b274a8f
@@ -1,63 +1,58 @@
-dnl  Copyright Â© 2003 Keith Packard
-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 Keith Packard not be used in
-dnl  advertising or publicity pertaining to distribution of the software without
-dnl  specific, written prior permission.  Keith Packard 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  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl  EVENT SHALL KEITH PACKARD 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.
+#  Copyright Â© 2003 Keith Packard
+#
+#  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 Keith Packard not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Keith Packard makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+#
+#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL KEITH PACKARD 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.
+#
 
+# Initialize Autoconf
 AC_PREREQ([2.60])
-
-AC_INIT([libXfont],
-       [1.4.3],
-       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
-       libXfont)
-# Autoheader generates config.h.in. No new lines allowed in the list.
+AC_INIT([libXfont], [1.4.5],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont])
+AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])
-dnl
-dnl This is the package version number, not the shared library
-dnl version.  This same version number must appear in Xfont.h
-dnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
-dnl not possible to extract the version number here from Xfont.h
-dnl
+
+# Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Initialize libtool
+AC_PROG_LIBTOOL
+
 # Require xorg-macros minimum of 1.10 for DocBook XML documentation
 m4_ifndef([XORG_MACROS_VERSION],
           [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.10)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DEVEL_DOCS
-XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_XMLTO(0.0.22)
 XORG_WITH_FOP
-XORG_CHECK_SGML_DOCTOOLS(1.5)
+XORG_CHECK_SGML_DOCTOOLS(1.7)
 
-# Check for progs
-AC_PROG_CC
-AC_PROG_LIBTOOL
-dnl If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
-dnl must first be located explicitly.
-PKG_PROG_PKG_CONFIG
-
-# Look for headers
+# Checks for header files.
 AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
+
+# Checks for library functions.
 AC_CHECK_FUNCS([poll])
 
+# If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
+# must first be located explicitly.
+PKG_PROG_PKG_CONFIG
+
 #
 # select libraries to include
 #
@@ -74,13 +69,13 @@ AM_CONDITIONAL(XFONT_FREETYPE, [test x$XFONT_FREETYPE = xyes])
 if test x$XFONT_FREETYPE = xyes; then
        AC_DEFINE(XFONT_FREETYPE,1,[Support FreeType rasterizer for nearly all font file formats])
        AC_ARG_WITH(freetype-config, [  --with-freetype-config=PROG   Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=auto)
-       
+
        if test "$freetype_config" = "auto" ; then
-               PKG_CHECK_MODULES(FREETYPE, freetype2, 
+               PKG_CHECK_MODULES(FREETYPE, freetype2,
                        freetype_config=no, freetype_config=yes)
        fi
 
-       if test "$freetype_config" = "yes"; then 
+       if test "$freetype_config" = "yes"; then
                AC_PATH_PROG(ft_config,freetype-config,no)
                if test "$ft_config" = "no"; then
                        AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
@@ -89,7 +84,7 @@ if test x$XFONT_FREETYPE = xyes; then
                ft_config="$freetype_config"
        fi
 
-       if test "$freetype_config" != "no"; then        
+       if test "$freetype_config" != "no"; then
                FREETYPE_CFLAGS="`$ft_config --cflags`"
                FREETYPE_LIBS="`$ft_config --libs`"
        fi
@@ -117,8 +112,8 @@ X_GZIP_FONT_COMPRESSION=1
 AC_SUBST(X_GZIP_FONT_COMPRESSION)
 AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz], AC_MSG_ERROR([*** zlib is required]))
 
-AC_ARG_WITH(bzip2, 
-       AS_HELP_STRING([--with-bzip2], 
+AC_ARG_WITH(bzip2,
+       AS_HELP_STRING([--with-bzip2],
                        [Support bzip2 compressed bitmap fonts]),
        [], [with_bzip2=no])
 if test "x$with_bzip2" = xyes; then
@@ -200,14 +195,15 @@ case $host_os in
 esac
 AC_SUBST([OS_CFLAGS])
 
-AC_OUTPUT([Makefile
-          doc/Makefile
-          src/Makefile
-          src/fontfile/Makefile
-          src/FreeType/Makefile
-          src/builtins/Makefile
-          src/bitmap/Makefile
-          src/fc/Makefile
-          src/util/Makefile
-          src/stubs/Makefile
-           xfont.pc])
+AC_CONFIG_FILES([Makefile
+               doc/Makefile
+               src/Makefile
+               src/fontfile/Makefile
+               src/FreeType/Makefile
+               src/builtins/Makefile
+               src/bitmap/Makefile
+               src/fc/Makefile
+               src/util/Makefile
+               src/stubs/Makefile
+               xfont.pc])
+AC_OUTPUT
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644 (file)
index 34ab4bf..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-------------------------------------------------------
-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.
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100755 (executable)
index d9c56c7..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-libxfont (1:1.4.3-2slp2) unstable; urgency=low
-
-  * upgrade version due to the change of fontconfig
-  * Git: 165.213.180.234:slp/pkgs/xorg/lib/libxfont
-  * Tag: libxfont_1.4.3-2slp2
-
- -- SooChan Lim <sc1.lim@samsung.com>  Mon, 11 Apr 2011 11:02:33 +0900
-
-libxfont (1:1.4.3-1slp2) unstable; urgency=low
-
-  * [X11R7.6] upgrade pacakge 
-  * Git: 165.213.180.234:slp/pkgs/xorg/lib/libxfont
-  * Tag: libxfont_1.4.3-1slp2
-
- -- SooChan Lim <sc1.lim@samsung.com>  Thu, 06 Jan 2011 11:39:02 +0900
-
-libxfont (1:1.4.2-1) experimental; urgency=low
-
-  * New upstream release.
-  * Bump xutils-dev build-dep for new xorg-macros.
-  * Bump shlibs for register_fpe_functions().
-  * Update debian/copyright.
-  * Bump Standards-Version to 3.9.0, no changes.
-
- -- Julien Cristau <jcristau@debian.org>  Wed, 07 Jul 2010 18:25:15 +0100
-
-libxfont (1:1.4.1-2) unstable; urgency=low
-
-  [ 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 ]
-  * Use dh_makeshlibs?\99s -V argument instead of debian/libxfont1.shlibs
-  * Add udeb needed for the graphical installer: libxfont1-udeb.
-  * Version the B-D on libfontenc-dev to ensure libxfont1-udeb gets a
-    dependency on libfontenc1-udeb.
-  * Use a bzip2-less flavour for the udeb.
-  * Bump Standards-Version from 3.8.3 to 3.8.4 (no changes needed).
-  * Fix obsolete-relation-form-in-source by using ??<??instead of ????for
-    xprint in Conflicts, thanks to lintian.
-  * Add myself to Uploaders.
-
- -- Cyril Brulebois <kibi@debian.org>  Wed, 10 Mar 2010 20:05:31 +0100
-
-libxfont (1:1.4.1-1) unstable; urgency=low
-
-  * New upstream release.
-  * Bump xutils-dev build-dep for new util-macros.
-  * Build documentation, install it in libxfont-dev.
-  * Enable support for bzip2 compressed bitmap fonts.
-  * Don't use LDFLAGS from the environment.  Ubuntu sets that to
-    -Bsymbolic-functions, which breaks libXfont's weak symbols usage.
-
- -- Julien Cristau <jcristau@debian.org>  Wed, 02 Dec 2009 11:12:13 +0100
-
-libxfont (1:1.4.0-8slp2) unstable; urgency=low
-
-  * To sync git and dpkg
-  * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libxfont
-  * Tag: libxfont_1.4.0-8slp2
-
- -- YoungHoon Jung <yhoon.jung@samsung.com>  Thu, 02 Dec 2010 15:45:37 +0900
-
-libxfont (1:1.4.0-7slp2) unstable; urgency=low
-
-  * Update maintainer
-  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
-  * Tag: libxfont_1.4.0-7slp2
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Wed, 21 Apr 2010 13:46:42 +0900
-
-libxfont (1:1.4.0-6slp2) unstable; urgency=low
-
-  * modify the package name
-
- -- SooChan Lim <sc1.lim@samsung.com>  Thu, 25 Mar 2010 17:51:04 +0900
-
-libxfont (1:1.4.0-5) unstable; urgency=low
-
-  * Fix debian/rules to install .la files properly
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Mon, 07 Dec 2009 14:51:41 +0900
-
-libxfont (1:1.4.0-4) unstable; urgency=low
-
-  * Import debian package
-  * Install .la files
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Mon, 07 Dec 2009 10:30:58 +0900
-
-libxfont (1:1.4.0-3) unstable; urgency=low
-
-  * libxfont1 Conflicts: xprint (< 2:1.6.0-1). 
-    The requiem release of xprint (1.6) will not conflict with
-    libxfont1. I am assured the garlic wreaths should prove most
-    efficacious at protecting the general public from the undead. 
-  * Standards version 3.8.3.
-
- -- Drew Parsons <dparsons@debian.org>  Sat, 31 Oct 2009 11:29:34 +1100
-
-libxfont (1:1.4.0-2) unstable; urgency=high
-
-  * libxfont1 Conflicts with xprint, printer font support was removed upstream
-    in 1.4.0 (closes: #535952).
-  * Add README.source from xsfbs.  Bump Standards-Version to 3.8.2.
-
- -- Julien Cristau <jcristau@debian.org>  Sun, 02 Aug 2009 13:36:46 +0200
-
-libxfont (1:1.4.0-1) unstable; urgency=low
-
-  * New upstream release.
-  * Move libxfont1-dbg to new section 'debug'.
-
- -- Julien Cristau <jcristau@debian.org>  Mon, 13 Apr 2009 12:11:23 +0100
-
-libxfont (1:1.3.4-2) unstable; urgency=low
-
-  * Update debian/copyright from upstream COPYING.
-  * Upload to unstable.
-
- -- Julien Cristau <jcristau@debian.org>  Mon, 16 Feb 2009 19:31:59 +0100
-
-libxfont (1:1.3.4-1) experimental; urgency=low
-
-  * Wrap build-deps in debian/control.
-  * Run autoreconf on build; build-dep on xutils-dev, autoconf, automake and
-    libtool.
-  * Handle parallel builds.
-  * New upstream release.
-  * Drop obsolete x11proto-fontcache-dev build-dependency.
-
- -- Julien Cristau <jcristau@debian.org>  Tue, 23 Dec 2008 15:06:37 +0100
-
-libxfont (1:1.3.3-1) unstable; urgency=high
-
-  [ Julien Cristau ]
-  * Drop dependency on x11-common from libxfont1{,-dbg}.
-  * New upstream bugfix release.
-  * Disable the type1 rasterizer and support for speedo font files.  The
-    former is a security hazard, and Speedo fonts are disabled in the X server
-    since before etch anyway.
-  * Urgency high so the above gets in lenny.
-
-  [ 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.
-
- -- Julien Cristau <jcristau@debian.org>  Thu, 17 Jul 2008 22:50:03 +0200
-
-libxfont (1:1.3.2-1) unstable; urgency=low
-
-  * New upstream release
-  * Drop CVE-2008-0006.diff, included upstream.
-
- -- Julien Cristau <jcristau@debian.org>  Fri, 07 Mar 2008 13:32:43 +0100
-
-libxfont (1:1.3.1-2) unstable; urgency=high
-
-  * High urgency upload for security fix.
-  * Fix a buffer overflow in the PCF font parser (CVE-2008-0006).
-  * debian/control updates
-    + add myself to Uploaders, and remove Branden and Fabio with their
-      permission
-    + s/^XS-Vcs/Vcs/
-    + bump Standards-Version to 3.7.3 (no changes)
-    + libxfont1 is Section: libs
-    + libxfont-dev and libxfont1-dbg are Section: libdevel
-
- -- Julien Cristau <jcristau@debian.org>  Thu, 17 Jan 2008 00:09:38 +0100
-
-libxfont (1:1.3.1-1) unstable; urgency=low
-
-  * New upstream release.
-  * Add libxfont1.shlibs, bump shlibs to >= 1:1.2.9.
-
- -- Julien Cristau <jcristau@debian.org>  Wed, 05 Sep 2007 22:45:57 +0200
-
-libxfont (1:1.2.9-1) unstable; urgency=low
-
-  * New upstream version.
-    - Add a new 'catalogue' FPE (font path element), which takes font
-      paths from symlinks in a dir.
-  * Use libxfont1 (= ${binary:Version}) instead of ${Source-Version}
-    in debian/control.
-
- -- Drew Parsons <dparsons@debian.org>  Sat, 23 Jun 2007 09:40:45 +1000
-
-libxfont (1:1.2.8-1) unstable; urgency=low
-
-  * Add XS-Vcs-Browser to debian/control.
-  * New upstream release.
-    + drop patch from 1:1.2.2-2, applied upstream.
-  * Upload to unstable.
-
- -- Julien Cristau <jcristau@debian.org>  Wed, 11 Apr 2007 15:52:11 +0200
-
-libxfont (1:1.2.7-1) experimental; urgency=low
-
-  * New upstream release.
-  * Add XS-Vcs-Git header to debian/control, and drop obsolete CVS information.
-  * Install the upstream ChangeLog.
-
- -- Julien Cristau <jcristau@debian.org>  Fri, 16 Feb 2007 14:32:57 +0100
-
-libxfont (1:1.2.2-2) unstable; urgency=high
-
-  * Grab patch from upstream git to fix security issues:
-    + CVE-2007-1351: BDFFont Parsing Integer Overflow
-    + CVE-2007-1352: fonts.dir File Parsing Integer Overflow
-
- -- Julien Cristau <jcristau@debian.org>  Tue, 03 Apr 2007 19:31:24 +0200
-
-libxfont (1:1.2.2-1) unstable; urgency=high
-
-  * New upstream version.
-    - closes security bug in CID encoded fonts (iDefense CVE-ID
-      2006-3739, 2006-3740)
-    - applies patches 10_freetype_buffer_overflow.patch, 10_pcf_font.patch
-  * dbg package has priority extra.
-
- -- Drew Parsons <dparsons@debian.org>  Wed, 13 Sep 2006 17:50:06 +1000
-
-libxfont (1:1.2.0-2) unstable; urgency=high
-
-  * Apply upstream patch 10_pcf_font.patch (security vulnerability
-    CVE-2006-3467).  Closes: #383353.
-  * Upload to unstable to ensure patch is propagated quickly.
-  * Apply patch 10_freetype_buffer_overflow.patch while we're at it
-    (no known exploits).
-
- -- Drew Parsons <dparsons@debian.org>  Thu, 17 Aug 2006 07:45:40 +1000
-
-libxfont (1:1.2.0-1) experimental; urgency=low
-
-  * New upstream version. Closes: #364854.
-    - builds and works with Freetype 2.2. Closes: #362920, #370149.
-  * Standards version 3.7.2.
-  * libxfont-dev doesn't need both Depends: and Pre-Depends: x11-common.
-  * Use debhelper 5, tidy up debian/rules to match.
-  * libxfont does not provide libfontcache.so!
-
- -- Drew Parsons <dparsons@debian.org>  Thu, 27 Jul 2006 15:08:14 +1000
-
-libxfont (1:1.1.0-1) UNRELEASED; urgency=low
-
-  [ David Nusinow ]
-  * New upstream release
-  * Remove obsolete patch 01_fontserver_fix_SEGV.diff
-
-  [ Andres Salomon ]
-  * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build;
-    idempotency fix.
-  * Run dh_install w/ --list-missing.
-
- -- Andres Salomon <dilinger@debian.org>  Mon, 17 Jul 2006 01:20:57 -0400
-
-libxfont (1:1.0.0-4) unstable; urgency=low
-
-  * Reorder makeshlib command in rules file so that ldconfig is run
-    properly. Thanks Drew Parsons and Steve Langasek.
-  * Add quilt to build-depends
-
- -- David Nusinow <dnusinow@debian.org>  Wed, 19 Apr 2006 00:10:33 -0400
-
-libxfont (1:1.0.0-3) unstable; urgency=low
-
-  * Upload to unstable
-
- -- David Nusinow <dnusinow@debian.org>  Thu, 23 Mar 2006 22:44:39 -0500
-
-libxfont (1:1.0.0-2) experimental; urgency=low
-
-  * Have libxfont-dev depend on libfreetype6-dev and libfontenc-dev. Thanks
-    Eugene Konev.
-  * Port patches from trunk
-    + general/099v_fontserver_fix_SEGV.diff
-
- -- David Nusinow <dnusinow@debian.org>  Sun, 26 Feb 2006 18:35:44 -0500
-
-libxfont (1:1.0.0-1) experimental; urgency=low
-
-  * First upload to Debian
-
- -- David Nusinow <dnusinow@debian.org>  Thu, 29 Dec 2005 20:51:40 -0500
-
-libxfont (1:0.99.0+cvs.20050909-1) breezy; urgency=low
-
-  * Fix the XFONT_FONTCACHE/FONTCACHE define in configure.ac (close:
-    Ubuntu#14319).
-
- -- Daniel Stone <daniel.stone@ubuntu.com>  Fri,  9 Sep 2005 15:39:57 +1000
-
-libxfont (1:0.99.0-1) breezy; urgency=low
-
-  * First libxfont release.
-
- -- Daniel Stone <daniel.stone@ubuntu.com>  Mon, 16 May 2005 22:10:17 +1000
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index 7ed6ff8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100755 (executable)
index 69d42b6..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-Source: libxfont
-Section: x11
-Priority: optional
-Maintainer: YoungHoon Jung <yhoon.jung@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>, Drew Parsons <dparsons@debian.org>, Cyril Brulebois <kibi@debian.org>
-Build-Depends: debhelper (>= 5), pkg-config, libfontenc-dev (>= 1:1.0.5-2), x11proto-core-dev, xtrans-dev, x11proto-fonts-dev, libfreetype6-dev, zlib1g-dev, libbz2-dev, quilt, xutils-dev (>= 1:7.5-1slp2), autoconf, automake, libtool, xmlto, 
-Standards-Version: 3.9.0
-Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxfont
-Vcs-Browser:  http://git.debian.org/?p=pkg-xorg/lib/libxfont.git
-
-Package: libxfont1
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Conflicts: xprint (<< 2:1.6.0-1)
-Description: X11 font rasterisation library
- libXfont provides various services for X servers, most notably font
- selection and rasterisation (through external libraries).
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libXfont
-
-#Package: libxfont1-udeb
-#XC-Package-Type: udeb
-#Section: debian-installer
-#Architecture: any
-#Depends: ${shlibs:Depends}, ${misc:Depends}
-#Description: X11 font rasterisation library
-# This is a udeb, or a microdeb, for the debian-installer.
-
-Package: libxfont1-dbg
-Section: debug
-Architecture: any
-Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, libxfont1 (= ${binary:Version})
-Description: X11 font rasterisation library (debug package)
- libXfont provides various services for X servers, most notably font
- selection and rasterisation (through external libraries).
- .
- This package contains the debug versions of the library found in libxfont1.
- Non-developers likely have little use for this package.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libXfont
-
-Package: libxfont-dev
-Section: libdevel
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libxfont1 (= ${binary:Version}), libx11-dev, x11proto-core-dev, x11proto-fonts-dev, libfreetype6-dev, libfontenc-dev (>= 1:1.0.1-1)
-Pre-Depends: x11-common (>= 1:7.0.0)
-Replaces: xlibs-static-dev (<< 6.8.2-51)
-Description: X11 font rasterisation library (development headers)
- libXfont provides various services for X servers, most notably font
- selection and rasterisation (through external libraries).
- .
- This package contains the development headers for the library found in
- libxfont1.  Non-developers likely have little use for this package.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libXfont
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644 (file)
index ec711a1..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-This package was downloaded from
-http://xorg.freedesktop.org/releases/individual/lib/
-
-Copyright Â© 2007 Red Hat, Inc
-Copyright Â© 2008,2009 Sun Microsystems, Inc.  All rights reserved.
-
-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 (including the next
-paragraph) 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.
-
-Copyright (c) 1997 by Mark Leisher
-Copyright (c) 1998-2003 by Juliusz Chroboczek
-Copyright (c) 1998 Go Watanabe, All rights reserved.
-Copyright (c) 1998 Kazushi (Jam) Marukawa, All rights reserved.
-Copyright (c) 1998 Takuya SHIOZAKI, All rights reserved.
-Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
-Copyright (c) 2003-2004 After X-TT Project, All rights reserved.
-
-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.
-
-
-Copyright 1990, 1998  The Open Group
-
-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.
-
-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 OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-
-Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-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 Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL 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.
-
-
-Copyright 1999 SuSE, 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 SuSE not be used in advertising or
-publicity pertaining to distribution of the software without specific,
-written prior permission.  SuSE makes no representations about the
-suitability of this software for any purpose.  It is provided "as is"
-without express or implied warranty.
-
-SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
-BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-Copyright 1990 Network Computing Devices
-
-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 Network Computing Devices not be used
-in advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.  Network Computing Devices
-makes no representations about the suitability of this software for any
-purpose.  It is provided "as is" without express or implied warranty.
-
-NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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.
-
-
-Copyright 1990 Network Computing Devices
-
-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 names of Network Computing Devices, or Digital
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-NETWORK COMPUTING DEVICES, AND DIGITAL AND DISCLAIM ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
-OR DIGITAL 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.
-
-
-[Note: clause 3 in the following license, the "advertising clause", was
-rescinded by Berkeley in 1999.  See
-<ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>]
-
-Copyright (c) 1991, 1993
-     The Regents of the University of California.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-     This product includes software developed by the University of
-     California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-
-Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
-All rights reserved.
-Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-
-Copyright Â© 2004 Keith Packard
-
-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 Keith Packard not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Keith Packard makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL KEITH PACKARD 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.
-
-
-/* lib/font/fontfile/gunzip.c
-   written by Mark Eichin <eichin@kitten.gen.ma.us> September 1996.
-   intended for inclusion in X11 public releases. */
-
-
-Copyright (c) 1999  The XFree86 Project Inc.
-
-All Rights Reserved.
-
-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
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The XFree86 Project
-Inc. shall not be used in advertising or otherwise to promote the
-sale, use or other dealings in this Software without prior written
-authorization from The XFree86 Project Inc..
diff --git a/debian/libxfont-dev.install b/debian/libxfont-dev.install
deleted file mode 100755 (executable)
index b0cfdd5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-usr/include/X11/*
-usr/lib/libXfont.a
-usr/lib/libXfont.so
-usr/lib/libXfont.la
-usr/lib/pkgconfig/xfont.pc
diff --git a/debian/libxfont1-udeb.install b/debian/libxfont1-udeb.install
deleted file mode 100644 (file)
index e73e376..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/libXfont.so.1*
-
diff --git a/debian/libxfont1.install b/debian/libxfont1.install
deleted file mode 100644 (file)
index e73e376..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/libXfont.so.1*
-
diff --git a/debian/rules b/debian/rules
deleted file mode 100755 (executable)
index 58a8919..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/make -f
-# debian/rules for the Debian libxfont 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
-
-PACKAGE = libxfont1
-
-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
-
-confflags += --enable-fc --enable-builtins --enable-pcfformat --enable-bdfformat
-
-configure: $(STAMP_DIR)/patch
-       autoreconf -vfi
-
-obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
-       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) \
-                    --without-bzip2 \
-                    CFLAGS="$(CFLAGS)" 
-
-build: build-stamp
-build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
-       dh_testdir
-
-       cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
-       >$@
-
-clean: xsfclean
-       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 $$(find -name Makefile.in)
-       rm -f aclocal.m4 config.guess config.h.in config.sub configure
-       rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
-
-       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_install --sourcedir=debian/tmp --list-missing -XlibXfont.la
-       dh_installchangelogs ChangeLog
-       dh_link
-       dh_strip --dbg-package=$(PACKAGE)-dbg
-       dh_compress
-       dh_fixperms
-       dh_makeshlibs -V'libxfont1 (>= 1:1.4.2)'
-       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
diff --git a/debian/watch b/debian/watch
deleted file mode 100644 (file)
index a241b87..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://xorg.freedesktop.org/releases/individual/lib/ libXfont-(.*)\.tar\.gz
diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh
deleted file mode 100644 (file)
index 5935cc9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/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
diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
deleted file mode 100644 (file)
index 5e16b10..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/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:
diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh
deleted file mode 100644 (file)
index 813fd8d..0000000
+++ /dev/null
@@ -1,622 +0,0 @@
-# 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.
diff --git a/devbook.am b/devbook.am
new file mode 100644 (file)
index 0000000..400b2ca
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# noinst_DATA: developers docs are not installed
+# docbook:  the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Developers Documentation and is not installed.
+# Do not use for Users docs or Specs which need to be installed and require olink support
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# Developers documnetation is not installed
+noinst_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_noinst_DATA = $(docbook) $(chapters)
+
+if HAVE_STYLESHEETS
+
+XMLTO_HTML_FLAGS =                                     \
+       --searchpath "$(XORG_SGML_PATH)/X11"            \
+       --searchpath "$(abs_top_builddir)"              \
+       -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+
+noinst_DATA += $(docbook:.xml=.html)
+%.html: %.xml  $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+noinst_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_FLAGS =                                       \
+       --searchpath "$(XORG_SGML_PATH)/X11"            \
+       --searchpath "$(abs_top_builddir)"              \
+       --stringparam img.src.path=$(abs_builddir)/     \
+       -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps)
+%.pdf: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+%.ps: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+endif HAVE_STYLESHEETS
+
+CLEANFILES = $(noinst_DATA)
old mode 100755 (executable)
new mode 100644 (file)
index dc3f0a6..4a093c0
@@ -1,66 +1,12 @@
-#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# 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 (including the next
-# paragraph) 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.
-#
-
-# Developer documentation - not installed on system
-EXTRA_DIST = fontlib.xml
 
 if ENABLE_DEVEL_DOCS
-doc_sources = fontlib.xml
-
 if HAVE_XMLTO
-noinst_DATA = $(doc_sources:.xml=.html)
-
-if HAVE_FOP
-noinst_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
-endif
-
-if HAVE_XMLTO_TEXT
-noinst_DATA += $(doc_sources:.xml=.txt)
-endif
-
-if HAVE_STYLESHEETS
-XMLTO_FLAGS = -m $(XSL_STYLESHEET)
-
-noinst_DATA += xorg.css
-xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
-       $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
-endif
-
-CLEANFILES = $(noinst_DATA)
-
-SUFFIXES = .xml .ps .pdf .txt .html
-
-.xml.txt:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-
-.xml.html:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
 
-.xml.pdf:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+# Main DocBook/XML files (DOCTYPE book)
+docbook = fontlib.xml
 
-.xml.ps:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/devbook.am
 
 endif HAVE_XMLTO
 endif ENABLE_DEVEL_DOCS
diff --git a/doc/fontlib.css b/doc/fontlib.css
deleted file mode 100644 (file)
index 0bc70e6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- *
- * 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 (including the next
- * paragraph) 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.
- */
-
-.structname, .property, .errorname, .function, .parameter, .filename {
-  font-family: monospace;
-}
-
-h1, .author, .pubdate {
-  text-align: center;
-}
-
-.legalnotice {
-  text-align: justify;
-  font-size: small;
-  font-style: italic;
-}
-
-.warning {
-  border: 1px solid red;
-  background: yellow;
-}
old mode 100755 (executable)
new mode 100644 (file)
index f2e4811..c5079c8
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-            "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+            "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
 <!-- lifted from troff+ms by doclifter -->
 <!-- previous version was in xorg-docs/specs/Xserver/fontlib.ms -->
 
-  <article id='fontlibms'>
+  <article id='fontlib'>
 <!-- .ps 12 -->
 <!-- .EF 'Font Library Interface'\- % \-'July 27, 1991' -->
 <!-- .OF 'Font Library Interface'\- % \-'July 27, 1991' -->
@@ -15,7 +18,6 @@
       <title>
        The X Font Library
       </title>
-      <pubdate>July 27, 1991</pubdate>
       <authorgroup>
        <author>
          <firstname>Keith</firstname>
          </affiliation>
        </author>
       </authorgroup>
+      <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+      <copyright><year>1993</year><holder>Network Computing Devices</holder></copyright>
+
       <legalnotice>
        <para>
-         Copyright 1993 <orgname>Network Computing Devices</orgname>
-       </para>
-       <para>
          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
@@ -50,8 +52,8 @@
          any purpose.  It is provided &ldquo;as is&rdquo; without
          express or implied warranty.
        </para>
-       <para>
-         Copyright 1993, 1994 <orgname>X Consortium</orgname>
+       <para role="multiLicensing">
+         Copyright &copy; 1993, 1994 X Consortium
        </para>
        <para>
          Permission is hereby granted, free of charge, to any person
@@ -80,7 +82,9 @@
          promote the sale, use or other dealings in this Software
          without prior written authorization from the X Consortium.
        </para>
+        <para>X Window System is a trademark of The Open Group.</para>
       </legalnotice>
+      <pubdate>July 27, 1991</pubdate>
     </articleinfo>
 
     <warning>
       source code, so have a listing handy.
     </para>
 
-    <sect1 id='requirements_for_the_font_library'>
-      <title>
-       Requirements for the Font library
-      </title>
+    <sect1 id='Requirements_for_the_Font_library'>
+<title>Requirements for the Font library</title>
 
       <para>
        To avoid miles of duplicate code in the X server, the font server
 
     </sect1>
 
-    <sect1 id='general_font_library_interface_details'>
-      <title>
-       General Font Library Interface details.
-      </title>
+    <sect1 id='General_Font_Library_Interface_details'>
+<title>General Font Library Interface details.</title>
 
       <para>
        To avoid collision between the #define name space for errors, the Font
 
     </sect1>
 
-    <sect1 id='font_path_elements'>
-      <title>
-       Font Path Elements
-      </title>
+    <sect1 id='Font_Path_Elements'>
+<title>Font Path Elements</title>
 
       <para>
        At the center of the general font access methods used by X and
@@ -269,9 +267,7 @@ typedef struct _FPEFunctions {
       </para>
 
       <sect2 id='name_check'>
-       <title>
-         (*name_check)
-       </title>
+       <title>(*name_check)</title>
 
        <para>
          Each new font path member is passed to this function; if
@@ -286,9 +282,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='init_fpe'>
-       <title>
-         (*init_fpe)
-       </title>
+       <title>(*init_fpe)</title>
 
        <para>
          Initialize a new font path element.  This function prepares
@@ -305,9 +299,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='reset_fpe'>
-       <title>
-         (*reset_fpe)
-       </title>
+       <title>(*reset_fpe)</title>
 
        <para>
          When the X font path is reset, and some of the new members
@@ -324,9 +316,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='free_fpe'>
-       <title>
-         (*free_fpe)
-       </title>
+       <title>(*free_fpe)</title>
 
        <para>
          When the server is finished with an FPE, this function is
@@ -337,9 +327,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='open_font'>
-       <title>
-         (*open_font)
-       </title>
+       <title>(*open_font)</title>
 
        <para>
          This routine requests that a font be opened.  The <parameter
@@ -375,9 +363,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='close_font'>
-       <title>
-         (*close_font)
-       </title>
+       <title>(*close_font)</title>
 
        <para>
          When the server is finished with a font, this routine
@@ -387,9 +373,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='list_fonts'>
-       <title>
-         (*list_fonts)
-       </title>
+       <title>(*list_fonts)</title>
 
        <para>
          The <parameter class='function'>paths</parameter> argument is
@@ -402,9 +386,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='start_list_fonts_with_info'>
-       <title>
-         (*start_list_fonts_with_info)
-       </title>
+       <title>(*start_list_fonts_with_info)</title>
 
        <para>
          This routine sets any internal state for a verbose listing of
@@ -414,9 +396,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='list_next_font_with_info'>
-       <title>
-         (*list_next_font_with_info)
-       </title>
+       <title>(*list_next_font_with_info)</title>
 
        <para>
          To avoid storing huge amounts of data, the interface for
@@ -442,9 +422,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='wakeup_fpe'>
-       <title>
-         (*wakeup_fpe)
-       </title>
+       <title>(*wakeup_fpe)</title>
 
        <para>
          Whenever an FPE function has returned
@@ -458,9 +436,7 @@ typedef struct _FPEFunctions {
       </sect2>
 
       <sect2 id='client_died'>
-       <title>
-         (*client_died)
-       </title>
+       <title>(*client_died)</title>
 
        <para>
          When an FPE function has returned <errorname>Suspended</errorname>
@@ -471,10 +447,8 @@ typedef struct _FPEFunctions {
       </sect2>
     </sect1>
 
-    <sect1 id='fonts'>
-      <title>
-       Fonts
-      </title>
+    <sect1 id='Fonts'>
+<title>Fonts</title>
 
       <para>
        The data structure which actually contains the font information has
@@ -576,9 +550,7 @@ typedef struct _Font {
       </para>
 
       <sect2 id='get_glyphs'>
-       <title>
-         (*get_glyphs)
-       </title>
+       <title>(*get_glyphs)</title>
 
        <para>
          This routine returns <structname>CharInfoPtrs</structname>
@@ -592,9 +564,7 @@ typedef struct _Font {
       </sect2>
 
       <sect2 id='get_metrics'>
-       <title>
-         (*get_metrics)
-       </title>
+       <title>(*get_metrics)</title>
 
        <para>
          This is similar to <structfield>(*get_glyphs)</structfield>
@@ -604,10 +574,8 @@ typedef struct _Font {
        </para>
       </sect2>
 
-      <sect2 id='getbitmaps'>
-       <title>
-         (*get_bitmaps)
-       </title>
+      <sect2 id='get_bitmaps'>
+<title>(*get_bitmaps)</title>
 
        <para>
          This packs the glyph image data in the requested
@@ -618,9 +586,7 @@ typedef struct _Font {
       </sect2>
 
       <sect2 id='get_extents'>
-       <title>
-         (*get_extents)
-       </title>
+       <title>(*get_extents)</title>
 
        <para>
          This returns the metrics for the specified font from the
@@ -630,9 +596,7 @@ typedef struct _Font {
       </sect2>
 
       <sect2 id='unload_font'>
-       <title>
-         (*unload_font)
-       </title>
+       <title>(*unload_font)</title>
 
        <para>
          This is called from the FPE routine
@@ -641,10 +605,8 @@ typedef struct _Font {
        </para>
       </sect2>
 
-      <sect2 id='maxprivate'>
-       <title>
-         maxPrivate
-       </title>
+      <sect2 id='maxPrivate'>
+<title>maxPrivate</title>
 
        <para>
          When initializing a new font structure,
diff --git a/doc/fontlib.xsl b/doc/fontlib.xsl
deleted file mode 100644 (file)
index 5de4a28..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-  <!--
-Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-
-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 (including the next
-paragraph) 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.
-   -->
-
-  <xsl:param name="html.stylesheet" select="'fontlib.css'"/>
-  <xsl:param name="chunker.output.indent">yes</xsl:param>
-  <xsl:param name="html.extra.head.links" select="1"></xsl:param>
-  <xsl:param name="saxon.character.representation" select="'entity;decimal'"></xsl:param>
-  <xsl:param name="function.parens" select="0"></xsl:param>
-</xsl:stylesheet>
old mode 100755 (executable)
new mode 100644 (file)
index 913f660..cc464cb
@@ -65,23 +65,23 @@ typedef struct BDFSTAT {
     BOOL        haveDefaultCh;
 }           bdfFileState;
 
-extern void bdfError ( char * message, ... );
-extern void bdfWarning ( char *message, ... );
-extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf, 
+extern void bdfError ( const char * message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void bdfWarning ( const char *message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
+extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf,
                                    int len );
-extern Atom bdfForceMakeAtom ( char *str, int *size );
+extern Atom bdfForceMakeAtom ( const char *str, int *size );
 extern Atom bdfGetPropertyValue ( char *s );
 extern int bdfIsInteger ( char *str );
 extern unsigned char bdfHexByte ( unsigned char *s );
-extern Bool bdfSpecialProperty ( FontPtr pFont, FontPropPtr prop, 
+extern Bool bdfSpecialProperty ( FontPtr pFont, FontPropPtr prop,
                                 char isString, bdfFileState *bdfState );
-extern int bdfReadFont( FontPtr pFont, FontFilePtr file, 
+extern int bdfReadFont( FontPtr pFont, FontFilePtr file,
                        int bit, int byte, int glyph, int scan );
 extern int bdfReadFontInfo( FontInfoPtr pFontInfo, FontFilePtr file );
 
-extern void FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI, 
+extern void FontCharInkMetrics ( FontPtr pFont, CharInfoPtr pCI,
                                 xCharInfo *pInk );
-extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc, 
+extern void FontCharReshape ( FontPtr pFont, CharInfoPtr pSrc,
                              CharInfoPtr pDst );
 
 #endif                         /* BDFINT_H */
old mode 100755 (executable)
new mode 100644 (file)
index c023427..7309ac6
@@ -74,10 +74,10 @@ typedef struct _BitmapFont {
 #define NUM_SEGMENTS(n) \
   (((n)+BITMAP_FONT_SEGMENT_SIZE-1)/BITMAP_FONT_SEGMENT_SIZE)
 
-extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count, 
-                            unsigned char *chars, FontEncoding charEncoding, 
+extern int bitmapGetGlyphs ( FontPtr pFont, unsigned long count,
+                            unsigned char *chars, FontEncoding charEncoding,
                             unsigned long *glyphCount, CharInfoPtr *glyphs );
-extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count, 
+extern int bitmapGetMetrics ( FontPtr pFont, unsigned long count,
                              unsigned char *chars, FontEncoding charEncoding,
                              unsigned long *glyphCount, xCharInfo **glyphs );
 
@@ -88,14 +88,14 @@ extern int bitmapComputeWeight ( FontPtr pFont );
 
 extern void BitmapRegisterFontFileFunctions ( void );
 
-extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont, 
+extern int BitmapOpenScalable ( FontPathElementPtr fpe, FontPtr *pFont,
                                int flags, FontEntryPtr entry, char *fileName,
-                               FontScalablePtr vals, fsBitmapFormat format, 
-                               fsBitmapFormatMask fmask, 
+                               FontScalablePtr vals, fsBitmapFormat format,
+                               fsBitmapFormatMask fmask,
                                FontPtr non_cachable_font );
-extern int BitmapGetInfoScalable ( FontPathElementPtr fpe, 
-                                  FontInfoPtr pFontInfo, FontEntryPtr entry, 
-                                  FontNamePtr fontName, char *fileName, 
+extern int BitmapGetInfoScalable ( FontPathElementPtr fpe,
+                                  FontInfoPtr pFontInfo, FontEntryPtr entry,
+                                  FontNamePtr fontName, char *fileName,
                                   FontScalablePtr vals );
 
 #endif                         /* _BITMAP_H_ */
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 25d1f30..a32df63
@@ -76,69 +76,69 @@ extern int FontFileNameCheck ( char *name );
 extern int FontFileInitFPE ( FontPathElementPtr fpe );
 extern int FontFileResetFPE ( FontPathElementPtr fpe );
 extern int FontFileFreeFPE ( FontPathElementPtr fpe );
-extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe, 
-                             Mask flags, char *name, int namelen, 
-                             fsBitmapFormat format, fsBitmapFormatMask fmask, 
-                             XID id, FontPtr *pFont, char **aliasName, 
+extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe,
+                             Mask flags, char *name, int namelen,
+                             fsBitmapFormat format, fsBitmapFormatMask fmask,
+                             XID id, FontPtr *pFont, char **aliasName,
                              FontPtr non_cachable_font );
 extern void FontFileCloseFont ( FontPathElementPtr fpe, FontPtr pFont );
-extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont, 
-                               int flags, FontEntryPtr entry, 
-                               fsBitmapFormat format, 
+extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont,
+                               int flags, FontEntryPtr entry,
+                               fsBitmapFormat format,
                                fsBitmapFormatMask fmask );
-extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe, 
-                              char *pat, int len, int max, 
+extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe,
+                              char *pat, int len, int max,
                               FontNamesPtr names );
-extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe, 
-                                   char *pat, int len, int max, 
+extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe,
+                                   char *pat, int len, int max,
                                    pointer *privatep, int mark_aliases );
-extern int FontFileStartListFontsWithInfo ( pointer client, 
-                                           FontPathElementPtr fpe, 
-                                           char *pat, int len, int max, 
+extern int FontFileStartListFontsWithInfo ( pointer client,
+                                           FontPathElementPtr fpe,
+                                           char *pat, int len, int max,
                                            pointer *privatep );
-extern int FontFileListNextFontWithInfo ( pointer client, 
-                                         FontPathElementPtr fpe, 
-                                         char **namep, int *namelenp, 
-                                         FontInfoPtr *pFontInfo, 
+extern int FontFileListNextFontWithInfo ( pointer client,
+                                         FontPathElementPtr fpe,
+                                         char **namep, int *namelenp,
+                                         FontInfoPtr *pFontInfo,
                                          int *numFonts, pointer private );
-extern int FontFileStartListFontsAndAliases ( pointer client, 
-                                             FontPathElementPtr fpe, 
-                                             char *pat, int len, int max, 
+extern int FontFileStartListFontsAndAliases ( pointer client,
+                                             FontPathElementPtr fpe,
+                                             char *pat, int len, int max,
                                              pointer *privatep );
-extern int FontFileListNextFontOrAlias ( pointer client, 
-                                        FontPathElementPtr fpe, 
-                                        char **namep, int *namelenp, 
-                                        char **resolvedp, int *resolvedlenp, 
+extern int FontFileListNextFontOrAlias ( pointer client,
+                                        FontPathElementPtr fpe,
+                                        char **namep, int *namelenp,
+                                        char **resolvedp, int *resolvedlenp,
                                         pointer private );
 extern void FontFileRegisterLocalFpeFunctions ( void );
 extern void CatalogueRegisterLocalFpeFunctions ( void );
 
 
-extern FontEntryPtr FontFileAddEntry ( FontTablePtr table, 
+extern FontEntryPtr FontFileAddEntry ( FontTablePtr table,
                                       FontEntryPtr prototype );
-extern Bool FontFileAddFontAlias ( FontDirectoryPtr dir, char *aliasName, 
+extern Bool FontFileAddFontAlias ( FontDirectoryPtr dir, char *aliasName,
                                   char *fontName );
-extern Bool FontFileAddFontFile ( FontDirectoryPtr dir, char *fontName, 
+extern Bool FontFileAddFontFile ( FontDirectoryPtr dir, char *fontName,
                                  char *fileName );
 extern int FontFileCountDashes ( char *name, int namelen );
-extern FontEntryPtr FontFileFindNameInDir ( FontTablePtr table, 
+extern FontEntryPtr FontFileFindNameInDir ( FontTablePtr table,
                                            FontNamePtr pat );
 extern FontEntryPtr FontFileFindNameInScalableDir ( FontTablePtr table,
-                                                   FontNamePtr pat, 
+                                                   FontNamePtr pat,
                                                    FontScalablePtr vals );
-extern int FontFileFindNamesInDir ( FontTablePtr table, FontNamePtr pat, 
+extern int FontFileFindNamesInDir ( FontTablePtr table, FontNamePtr pat,
                                    int max, FontNamesPtr names );
-extern int FontFileFindNamesInScalableDir ( FontTablePtr table, 
-                                           FontNamePtr pat, int max, 
-                                           FontNamesPtr names, 
-                                           FontScalablePtr vals, 
+extern int FontFileFindNamesInScalableDir ( FontTablePtr table,
+                                           FontNamePtr pat, int max,
+                                           FontNamesPtr names,
+                                           FontScalablePtr vals,
                                            int alias_behavior, int *newmax );
 
 extern void FontFileFreeDir ( FontDirectoryPtr dir );
 extern void FontFileFreeEntry ( FontEntryPtr entry );
 extern void FontFileFreeTable ( FontTablePtr table );
 extern Bool FontFileInitTable ( FontTablePtr table, int size );
-extern FontDirectoryPtr FontFileMakeDir ( char *dirName, int size );
+extern FontDirectoryPtr FontFileMakeDir ( const char *dirName, int size );
 extern Bool FontFileMatchName ( char *name, int length, FontNamePtr pat );
 extern char * FontFileSaveString ( char *s );
 extern void FontFileSortDir ( FontDirectoryPtr dir );
@@ -151,26 +151,26 @@ extern Bool FontFilePriorityRegisterRenderer ( FontRendererPtr renderer,
                                                int priority );
 extern FontRendererPtr FontFileMatchRenderer ( char *fileName );
 
-extern Bool FontFileAddScaledInstance ( FontEntryPtr entry, 
-                                       FontScalablePtr vals, FontPtr pFont, 
+extern Bool FontFileAddScaledInstance ( FontEntryPtr entry,
+                                       FontScalablePtr vals, FontPtr pFont,
                                        char *bitmapName );
 extern void FontFileSwitchStringsToBitmapPointers ( FontDirectoryPtr dir );
 extern void FontFileRemoveScaledInstance ( FontEntryPtr entry, FontPtr pFont );
 extern Bool FontFileCompleteXLFD ( FontScalablePtr vals, FontScalablePtr def );
-extern FontScaledPtr FontFileFindScaledInstance ( FontEntryPtr entry, 
-                                                 FontScalablePtr vals, 
+extern FontScaledPtr FontFileFindScaledInstance ( FontEntryPtr entry,
+                                                 FontScalablePtr vals,
                                                  int noSpecificSize );
 
 extern Bool FontFileRegisterBitmapSource ( FontPathElementPtr fpe );
 extern void FontFileUnregisterBitmapSource ( FontPathElementPtr fpe );
 extern void FontFileEmptyBitmapSource ( void );
-extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe, 
-                                      FontPtr *pFont, int flags, 
-                                      FontEntryPtr entry, 
-                                      FontNamePtr zeroPat, 
-                                      FontScalablePtr vals, 
-                                      fsBitmapFormat format, 
-                                      fsBitmapFormatMask fmask, 
+extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe,
+                                      FontPtr *pFont, int flags,
+                                      FontEntryPtr entry,
+                                      FontNamePtr zeroPat,
+                                      FontScalablePtr vals,
+                                      fsBitmapFormat format,
+                                      fsBitmapFormatMask fmask,
                                       Bool noSpecificSize );
 
 extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir );
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 29e0a56..6e8645e
@@ -124,34 +124,34 @@ typedef struct _FontDirectory {
 #define CAP_CHARSUBSETTING     0x2
 
 typedef struct _FontRenderer {
-    char    *fileSuffix;
+    const char    *fileSuffix;
     int            fileSuffixLen;
-    int            (*OpenBitmap)(FontPathElementPtr /* fpe */, 
+    int            (*OpenBitmap)(FontPathElementPtr /* fpe */,
                          FontPtr * /* pFont */,
-                         int /* flags */, 
-                         FontEntryPtr /* entry */, 
-                         char * /* fileName */, 
-                         fsBitmapFormat /* format */, 
+                         int /* flags */,
+                         FontEntryPtr /* entry */,
+                         char * /* fileName */,
+                         fsBitmapFormat /* format */,
                          fsBitmapFormatMask /* mask */,
                          FontPtr /* non_cachable_font */);
-    int            (*OpenScalable)(FontPathElementPtr /* fpe */, 
-                           FontPtr * /* pFont */, 
-                           int /* flags */, 
-                           FontEntryPtr /* entry */, 
-                           char * /* fileName */, 
-                           FontScalablePtr /* vals */, 
-                           fsBitmapFormat /* format */, 
+    int            (*OpenScalable)(FontPathElementPtr /* fpe */,
+                           FontPtr * /* pFont */,
+                           int /* flags */,
+                           FontEntryPtr /* entry */,
+                           char * /* fileName */,
+                           FontScalablePtr /* vals */,
+                           fsBitmapFormat /* format */,
                            fsBitmapFormatMask /* fmask */,
                            FontPtr /* non_cachable_font */);
-    int            (*GetInfoBitmap)(FontPathElementPtr /* fpe */, 
-                            FontInfoPtr /* pFontInfo */, 
-                            FontEntryPtr /* entry */, 
+    int            (*GetInfoBitmap)(FontPathElementPtr /* fpe */,
+                            FontInfoPtr /* pFontInfo */,
+                            FontEntryPtr /* entry */,
                             char * /*fileName */);
-    int            (*GetInfoScalable)(FontPathElementPtr /* fpe */, 
-                              FontInfoPtr /* pFontInfo */, 
-                              FontEntryPtr /* entry */, 
+    int            (*GetInfoScalable)(FontPathElementPtr /* fpe */,
+                              FontInfoPtr /* pFontInfo */,
+                              FontEntryPtr /* entry */,
                               FontNamePtr /* fontName */,
-                              char * /* fileName */, 
+                              char * /* fileName */,
                               FontScalablePtr /* vals */);
     int            number;
     int     capabilities;      /* Bitmap components defined above */
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cd9d52a..73a8247
@@ -52,7 +52,7 @@ in this Software without prior written authorization from The Open Group.
 #define FALSE 0
 #endif
 
-extern Atom MakeAtom ( char *string, unsigned len, int makeit );
+extern Atom MakeAtom ( const char *string, unsigned len, int makeit );
 extern int ValidAtom ( Atom atom );
 extern char *NameForAtom (Atom atom);
 
@@ -81,11 +81,11 @@ FourByteSwap(
 
 extern int
 RepadBitmap (
-    char*, 
     char*,
-    unsigned, 
+    char*,
+    unsigned,
     unsigned,
-    int, 
+    int,
     int
 );
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 71d507b..ed55b89
@@ -8,17 +8,17 @@ extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *,
                         int *, int *, int *);
 extern void FontComputeInfoAccelerators(FontInfoPtr);
 
-extern void GetGlyphs ( FontPtr font, unsigned long count, 
-                       unsigned char *chars, FontEncoding fontEncoding, 
+extern void GetGlyphs ( FontPtr font, unsigned long count,
+                       unsigned char *chars, FontEncoding fontEncoding,
                        unsigned long *glyphcount, CharInfoPtr *glyphs );
-extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo, 
+extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
                                unsigned long count, ExtentInfoRec *info );
-extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count, 
+extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
                               unsigned char *chars, ExtentInfoRec *info );
 extern Bool ParseGlyphCachingMode ( char *str );
 extern void InitGlyphCaching ( void );
 extern void SetGlyphCachingMode ( int newmode );
-extern int add_range ( fsRange *newrange, int *nranges, fsRange **range, 
+extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
                       Bool charset_subset );
 
 #endif /* _FONTUTIL_H_ */
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index a5fdbcd..ddce0a9
@@ -88,10 +88,10 @@ typedef struct _PCFTable {
 #define PCF_GLYPH_NAMES                    (1<<7)
 #define PCF_BDF_ACCELERATORS       (1<<8)
 
-extern int pcfReadFont ( FontPtr pFont, FontFilePtr file, 
+extern int pcfReadFont ( FontPtr pFont, FontFilePtr file,
                         int bit, int byte, int glyph, int scan );
 extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
 extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file );
-extern void pcfError ( const char *, ... );
+extern void pcfError ( const char *, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
 
 #endif                         /* _PCF_H_ */
diff --git a/packaging/libXfont.spec b/packaging/libXfont.spec
new file mode 100644 (file)
index 0000000..82559f7
--- /dev/null
@@ -0,0 +1,84 @@
+Summary: X.Org X11 libXfont runtime library
+Name: libXfont
+Version: 1.4.5
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
+
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig(fontsproto)
+BuildRequires:  pkgconfig(xorg-macros)
+BuildRequires:  pkgconfig(xproto)
+BuildRequires: xorg-x11-xutils-dev
+BuildRequires: xorg-x11-xtrans-devel >= 1.0.3-3
+BuildRequires: libfontenc-devel
+BuildRequires: freetype-devel
+
+%description
+X.Org X11 libXfont runtime library
+
+%package devel
+Summary: X.Org X11 libXfont development package
+Group: Development/Libraries
+Provides: libxfont-devel 
+Requires: %{name} = %{version}-%{release}
+Requires: libfontenc-devel
+
+%description devel
+X.Org X11 libXfont development package
+
+%prep
+%setup -q
+
+%build
+export CFLAGS="${CFLAGS} $RPM_OPT_FLAGS -Os"
+%reconfigure --disable-static \
+           --enable-fc --enable-builtins --enable-pcfformat --enable-bdfformat --without-bzip2 \
+           LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%remove_docs
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+# FIXME:  Missing README/INSTALL - should file bug upstream.
+#%doc AUTHORS COPYING README INSTALL ChangeLog NEWS
+%doc AUTHORS COPYING ChangeLog
+%{_libdir}/libXfont.so.1
+%{_libdir}/libXfont.so.1.4.1
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/X11/fonts/bdfint.h
+%{_includedir}/X11/fonts/bitmap.h
+%{_includedir}/X11/fonts/bufio.h
+%{_includedir}/X11/fonts/fntfil.h
+%{_includedir}/X11/fonts/fntfilio.h
+%{_includedir}/X11/fonts/fntfilst.h
+%{_includedir}/X11/fonts/fontconf.h
+%{_includedir}/X11/fonts/fontencc.h
+%{_includedir}/X11/fonts/fontmisc.h
+%{_includedir}/X11/fonts/fontshow.h
+%{_includedir}/X11/fonts/fontutil.h
+%{_includedir}/X11/fonts/fontxlfd.h
+%{_includedir}/X11/fonts/pcf.h
+%{_includedir}/X11/fonts/ft.h
+%{_includedir}/X11/fonts/ftfuncs.h
+%{_libdir}/libXfont.so
+%{_libdir}/pkgconfig/xfont.pc
\ No newline at end of file
diff --git a/packaging/libxfont.spec b/packaging/libxfont.spec
deleted file mode 100644 (file)
index a48d9e9..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-
-Name:       libxfont
-Summary:    X.Org X11 libXfont runtime library
-Version:    1.4.3
-Release:    2.17
-Group:      System/Libraries
-License:    MIT
-URL:        http://www.x.org
-Source0:    http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.gz
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-BuildRequires:  pkgconfig(xorg-macros)
-BuildRequires:  pkgconfig(xproto)
-BuildRequires:  pkgconfig(xtrans)
-BuildRequires:  pkgconfig(fontsproto)
-BuildRequires:  pkgconfig(fontenc)
-BuildRequires:  pkgconfig(freetype2)
-BuildRequires:  pkgconfig(fontcacheproto)
-
-
-%description
-libXfont provides the core of the legacy X11 font system, handling the
-index files (fonts.dir, fonts.alias, fonts.scale), the various font file
-formats, and rasterizing them
-
-
-
-%package devel
-Summary:    X.Org X11 libXfont development package
-Group:      Development/Libraries
-Requires:   %{name} = %{version}-%{release}
-Requires:   xorg-x11-filesystem
-
-%description devel
-the legacy X11 font system development files
-
-
-%prep
-%setup -q -n %{name}-%{version}
-
-
-%build
-
-%reconfigure --disable-static \
-    --enable-fc --enable-builtins --enable-pcfformat --enable-bdfformat --without-bzip2
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-
-
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-
-
-
-
-%files
-%defattr(-,root,root,-)
-# FIXME:  Missing README/INSTALL - should file bug upstream.
-#%doc AUTHORS COPYING README INSTALL ChangeLog NEWS
-%doc AUTHORS COPYING ChangeLog
-%{_libdir}/libXfont.so.1
-%{_libdir}/libXfont.so.1.4.1
-
-
-%files devel
-%defattr(-,root,root,-)
-%dir %{_includedir}/X11/fonts
-%{_includedir}/X11/fonts/bdfint.h
-%{_includedir}/X11/fonts/bitmap.h
-%{_includedir}/X11/fonts/bufio.h
-%{_includedir}/X11/fonts/fntfil.h
-%{_includedir}/X11/fonts/fntfilio.h
-%{_includedir}/X11/fonts/fntfilst.h
-%{_includedir}/X11/fonts/fontconf.h
-%{_includedir}/X11/fonts/fontencc.h
-%{_includedir}/X11/fonts/fontmisc.h
-%{_includedir}/X11/fonts/fontshow.h
-%{_includedir}/X11/fonts/fontutil.h
-%{_includedir}/X11/fonts/fontxlfd.h
-%{_includedir}/X11/fonts/pcf.h
-%{_includedir}/X11/fonts/ft.h
-%{_includedir}/X11/fonts/ftfuncs.h
-%{_libdir}/libXfont.so
-%{_libdir}/pkgconfig/xfont.pc
-
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 99defbe..9e31d75
@@ -1,15 +1,15 @@
-/* 
+/*
 Copyright (c) 1998-2003 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: 
+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. 
+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,
@@ -43,13 +43,13 @@ THE SOFTWARE.
 static int find_cmap(int, int, int, FT_Face, FT_CharMap *);
 
 static int
-FTEncFontSpecific(char *encoding)
+FTEncFontSpecific(const char *encoding)
 {
-    char *p = encoding;
+    const char *p = encoding;
 
     if(strcasecmp(encoding, "microsoft-symbol") == 0)
         return 1;
-       
+
     while(*p != '-') {
         if(*p == '\0')
             return 0;
@@ -69,7 +69,7 @@ FTPickMapping(char *xlfd, int length, char *filename, FT_Face face,
     int ftrc;
     int symbol = 0;
     const char *enc, *reg;
-    char *encoding_name = 0;
+    const char *encoding_name = 0;
     char buf[20];
 
     if(xlfd)
@@ -123,9 +123,9 @@ FTPickMapping(char *xlfd, int length, char *filename, FT_Face face,
             }
         }
     }
-    
+
     for(mapping = encoding->mappings; mapping; mapping = mapping->next) {
-        if(find_cmap(mapping->type, mapping->pid, mapping->eid, face, 
+        if(find_cmap(mapping->type, mapping->pid, mapping->eid, face,
                      &cmap)) {
             tm->named = 0;
             tm->cmap = cmap;
@@ -144,7 +144,7 @@ FTPickMapping(char *xlfd, int length, char *filename, FT_Face face,
             return Successful;
         }
     }
-    
+
     return BadFontFormat;
 
   native:
@@ -155,7 +155,7 @@ FTPickMapping(char *xlfd, int length, char *filename, FT_Face face,
     return Successful;
 }
 
-static int 
+static int
 find_cmap(int type, int pid, int eid, FT_Face face, FT_CharMap *cmap_return)
 {
     int i, n;
@@ -177,7 +177,7 @@ find_cmap(int type, int pid, int eid, FT_Face face, FT_CharMap *cmap_return)
         /* prefer Microsoft Unicode */
         for(i=0; i<n; i++) {
             cmap = face->charmaps[i];
-            if(cmap->platform_id == TT_PLATFORM_MICROSOFT && 
+            if(cmap->platform_id == TT_PLATFORM_MICROSOFT &&
                cmap->encoding_id == TT_MS_ID_UNICODE_CS) {
                 *cmap_return = cmap;
                 return 1;
@@ -207,7 +207,7 @@ find_cmap(int type, int pid, int eid, FT_Face face, FT_CharMap *cmap_return)
     return 0;
 }
 
-unsigned 
+unsigned
 FTRemap(FT_Face face, FTMappingPtr tm, unsigned code)
 {
     unsigned index;
old mode 100755 (executable)
new mode 100644 (file)
index fd8e53e..918e3f3
@@ -48,7 +48,7 @@ THE SOFTWARE.
 #include FT_BBOX_H
 #include FT_TRUETYPE_TAGS_H
 /*
- *  If you want to use FT_Outline_Get_CBox instead of 
+ *  If you want to use FT_Outline_Get_CBox instead of
  *  FT_Outline_Get_BBox, define here.
  */
 /* #define USE_GET_CBOX */
@@ -94,7 +94,7 @@ static CharInfoRec noSuchChar = { /* metrics */{0,0,0,0,0,0},
 
 /* The propery names for all the XLFD properties. */
 
-static char *xlfd_props[] = {
+static const char *xlfd_props[] = {
     "FOUNDRY",
     "FAMILY_NAME",
     "WEIGHT_NAME",
@@ -122,7 +122,7 @@ sfnt_get_ushort( FT_Face     face,
   FT_ULong   len = sizeof(buff);
   FT_UShort  result = 0;
 
-  if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ) );
+  if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ) )
     result = (FT_UShort)( (buff[0] << 8) | buff[1] );
 
   return result;
@@ -160,7 +160,7 @@ iceil(int x, int y)
 {
     return ifloor(x + y - 1, y);
 }
-  
+
 static int
 FreeTypeOpenFace(FTFacePtr *facep, char *FTFileName, char *realFileName, int faceNumber)
 {
@@ -267,7 +267,7 @@ TransEqual(FTNormalisedTransformationPtr t1, FTNormalisedTransformationPtr t2)
     else if(t1->nonIdentity != t2->nonIdentity)
         return 0;
     else if(t1->nonIdentity && t2->nonIdentity) {
-        return 
+        return
             t1->matrix.xx == t2->matrix.xx &&
             t1->matrix.yx == t2->matrix.yx &&
             t1->matrix.yy == t2->matrix.yy &&
@@ -300,7 +300,7 @@ TTCapEqual(struct TTCapInfo *t1, struct TTCapInfo *t2)
        t1->flags == t2->flags &&
        t1->scaleBitmap == t2->scaleBitmap &&
        /*
-         If we use forceConstantSpacing, 
+         If we use forceConstantSpacing,
          we *MUST* allocate new instance.
        */
        t1->forceConstantSpacingEnd < 0 &&
@@ -311,7 +311,7 @@ static int
 FTInstanceMatch(FTInstancePtr instance,
                char *FTFileName, FTNormalisedTransformationPtr trans,
                int spacing, FontBitmapFormatPtr bmfmt,
-               struct TTCapInfo *tmp_ttcap, FT_Int32 load_flags) 
+               struct TTCapInfo *tmp_ttcap, FT_Int32 load_flags)
 {
     if(strcmp(instance->face->filename, FTFileName) != 0) {
         return 0;
@@ -347,7 +347,7 @@ FreeTypeActivateInstance(FTInstancePtr instance)
                      instance->transformation.nonIdentity ?
                      &instance->transformation.matrix : 0,
                      0);
-                            
+
     instance->face->active_instance = instance;
     return Successful;
 }
@@ -377,7 +377,7 @@ FTFindSize(FT_Face face, FTNormalisedTransformationPtr trans,
                 j = i;
                 d = dd;
             }
-        }            
+        }
     }
     if(j < 0)
         return BadFontName;
@@ -530,7 +530,7 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, FTFacePtr face,
     /* maintain a linked list of instances */
     instance->next = instance->face->instances;
     instance->face->instances = instance;
-    
+
     *instance_return = instance;
     return Successful;
 }
@@ -547,7 +547,7 @@ FreeTypeFreeInstance(FTInstancePtr instance)
     instance->refcount--;
     if(instance->refcount <= 0) {
         int i,j;
-        
+
         if(instance->face->instances == instance)
             instance->face->instances = instance->next;
         else {
@@ -573,7 +573,7 @@ FreeTypeFreeInstance(FTInstancePtr instance)
             for(i = 0; i < iceil(instance->nglyphs, FONTSEGMENTSIZE); i++) {
                 if(instance->glyphs[i]) {
                     for(j = 0; j < FONTSEGMENTSIZE; j++) {
-                        if(instance->available[i][j] == 
+                        if(instance->available[i][j] ==
                            FT_AVAILABLE_RASTERISED)
                             free(instance->glyphs[i][j].bits);
                     }
@@ -610,7 +610,7 @@ FreeTypeInstanceFindGlyph(unsigned idx_in, int flags, FTInstancePtr instance,
         *found = 0;
         return Successful;
     }
-  
+
     if(*available == NULL) {
         *available = calloc(iceil(instance->nglyphs, FONTSEGMENTSIZE),
                            sizeof(int *));
@@ -653,7 +653,7 @@ FreeTypeInstanceGetGlyph(unsigned idx, int flags, CharInfoPtr *g, FTInstancePtr
     int xrc;
     int ***available;
     CharInfoPtr **glyphs;
-    
+
     available = &instance->available;
     glyphs = &instance->glyphs;
 
@@ -665,17 +665,17 @@ FreeTypeInstanceGetGlyph(unsigned idx, int flags, CharInfoPtr *g, FTInstancePtr
     if(!found || (*available)[segment][offset] == FT_AVAILABLE_NO) {
         *g = NULL;
         return Successful;
-    } 
+    }
 
     if((*available)[segment][offset] == FT_AVAILABLE_RASTERISED) {
        *g = &(*glyphs)[segment][offset];
        return Successful;
     }
-    
+
     flags |= FT_GET_GLYPH_BOTH;
 
-    xrc = FreeTypeRasteriseGlyph(idx, flags, 
-                                &(*glyphs)[segment][offset], instance, 
+    xrc = FreeTypeRasteriseGlyph(idx, flags,
+                                &(*glyphs)[segment][offset], instance,
                                 (*available)[segment][offset] >= FT_AVAILABLE_METRICS);
     if(xrc != Successful && (*available)[segment][offset] >= FT_AVAILABLE_METRICS) {
        ErrorF("Warning: FreeTypeRasteriseGlyph() returns an error,\n");
@@ -698,7 +698,7 @@ FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
 {
     int xrc;
     int found, segment, offset;
-    
+
     /* Char cell */
     if(instance->spacing == FT_CHARCELL) {
        *metrics = instance->charcellMetrics;
@@ -712,8 +712,8 @@ FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
 
     /* Not char cell */
 
-    xrc = FreeTypeInstanceFindGlyph(idx, flags, instance, 
-                                    &instance->glyphs, &instance->available, 
+    xrc = FreeTypeInstanceFindGlyph(idx, flags, instance,
+                                    &instance->glyphs, &instance->available,
                                     &found, &segment, &offset);
     if(xrc != Successful)
         return xrc;
@@ -724,16 +724,16 @@ FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
     if( instance->available[segment][offset] == FT_AVAILABLE_NO ) {
         *metrics = NULL;
         return Successful;
-    } 
+    }
 
     if( instance->available[segment][offset] >= FT_AVAILABLE_METRICS ) {
        *metrics = &instance->glyphs[segment][offset].metrics;
        return Successful;
     }
-    
+
     flags |= FT_GET_GLYPH_METRICS_ONLY;
 
-    xrc = FreeTypeRasteriseGlyph(idx, flags, 
+    xrc = FreeTypeRasteriseGlyph(idx, flags,
                                 &instance->glyphs[segment][offset],
                                 instance, 0);
     if(xrc == Successful) {
@@ -742,7 +742,7 @@ FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
     }
     return xrc;
 }
-    
+
 /*
  * Pseudo enbolding similar as Microsoft Windows.
  * It is useful but poor.
@@ -796,7 +796,7 @@ ft_make_up_italic_bitmap( char *raster, int bpr, int ht, int shift,
            tmp_shift %= 8;
            if ( tmp_shift ) {
                for (x=bpr-1;0<=x;x--) {
-                   if ( x != bpr-1 ) 
+                   if ( x != bpr-1 )
                        tmp_p[x+1] |= tmp_p[x]<<(8-tmp_shift);
                    tmp_p[x]>>=tmp_shift;
                }
@@ -814,7 +814,7 @@ ft_make_up_italic_bitmap( char *raster, int bpr, int ht, int shift,
            tmp_shift %= 8;
            if ( tmp_shift ) {
                for (x=0;x<bpr;x++) {
-                   if ( x != 0 ) 
+                   if ( x != 0 )
                        tmp_p[x-1] |= tmp_p[x]>>(8-tmp_shift);
                    tmp_p[x]<<=tmp_shift;
                }
@@ -892,7 +892,7 @@ tt_get_metrics( FT_Face         face,
     }
 }
 
-static int                   
+static int
 ft_get_very_lazy_bbox( FT_UInt index,
                       FT_Face face,
                       FT_Size size,
@@ -1049,7 +1049,7 @@ FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index,
     metrics_return->horiBearingX = (FT_Pos)elem_metrics.horiBearingX << 6;
     metrics_return->horiBearingY = (FT_Pos)elem_metrics.horiBearingY << 6;
     metrics_return->horiAdvance  = (FT_Pos)elem_metrics.horiAdvance  << 6;
-    
+
     metrics_return->vertBearingX = (FT_Pos)elem_metrics.vertBearingX << 6;
     metrics_return->vertBearingY = (FT_Pos)elem_metrics.vertBearingY << 6;
     metrics_return->vertAdvance  = (FT_Pos)elem_metrics.vertAdvance  << 6;
@@ -1100,12 +1100,12 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
 
     if(!hasMetrics) {
        if( instance->spacing == FT_CHARCELL || flags & FT_GET_DUMMY ){
-           memcpy((char*)&tgp->metrics, 
+           memcpy((char*)&tgp->metrics,
                   (char*)instance->charcellMetrics,
                   sizeof(xCharInfo));
        }
        else if( flags & FT_FORCE_CONSTANT_SPACING ) {
-           memcpy((char*)&tgp->metrics, 
+           memcpy((char*)&tgp->metrics,
                   (char*)instance->forceConstantMetrics,
                   sizeof(xCharInfo));
        }
@@ -1123,16 +1123,16 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
            }
            if( bitmap_metrics == NULL ) {
                if ( sbitchk_incomplete_but_exist==0 && (instance->ttcap.flags & TTCAP_IS_VERY_LAZY) ) {
-                   if( ft_get_very_lazy_bbox( idx, face->face, instance->size, 
+                   if( ft_get_very_lazy_bbox( idx, face->face, instance->size,
                                               face->num_hmetrics,
                                               instance->ttcap.vl_slant,
                                               &instance->transformation.matrix,
-                                              &bbox, &outline_hori_advance, 
+                                              &bbox, &outline_hori_advance,
                                               &outline_vert_advance ) == 0 ) {
                        goto bbox_ok;   /* skip exact calculation */
                    }
                }
-               ftrc = FT_Load_Glyph(instance->face->face, idx, 
+               ftrc = FT_Load_Glyph(instance->face->face, idx,
                                     instance->load_flags);
                if(ftrc != 0) return FTtoXReturnCode(ftrc);
                metrics = &face->face->glyph->metrics;
@@ -1143,11 +1143,11 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
 
            if( bitmap_metrics ) {
                FT_Pos factor;
-               
+
                leftSideBearing = bitmap_metrics->horiBearingX / 64;
                rightSideBearing = (bitmap_metrics->width + bitmap_metrics->horiBearingX) / 64;
                bbox_center_raw = (2.0 * bitmap_metrics->horiBearingX + bitmap_metrics->width)/2.0/64.0;
-               characterWidth = (int)floor(bitmap_metrics->horiAdvance 
+               characterWidth = (int)floor(bitmap_metrics->horiAdvance
                                            * instance->ttcap.scaleBBoxWidth / 64.0 + .5);
                ascent = bitmap_metrics->horiBearingY / 64;
                descent = (bitmap_metrics->height - bitmap_metrics->horiBearingY) / 64 ;
@@ -1192,11 +1192,11 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
                bbox_center_raw = (double)(bbox.xMax + bbox.xMin)/2.0/64.;
                if ( instance->pixel_width_unit_x != 0 )
                    characterWidth =
-                       (int)floor( outline_hori_advance 
+                       (int)floor( outline_hori_advance
                                    * instance->ttcap.scaleBBoxWidth
                                    * instance->pixel_width_unit_x / 64. + .5);
                else {
-                   characterWidth = 
+                   characterWidth =
                        (int)floor( outline_vert_advance
                                    * instance->ttcap.scaleBBoxHeight
                                    * instance->pixel_width_unit_y / 64. + .5);
@@ -1212,12 +1212,12 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
                characterWidth = new_width;
                if ( instance->pixel_width_unit_x != 0 )
                    rawCharacterWidth =
-                       (unsigned short)(short)(floor(1000 * outline_hori_advance 
+                       (unsigned short)(short)(floor(1000 * outline_hori_advance
                                                      * instance->ttcap.scaleBBoxWidth * ratio
                                                      * instance->pixel_width_unit_x / 64.));
                else {
                    rawCharacterWidth =
-                       (unsigned short)(short)(floor(1000 * outline_vert_advance 
+                       (unsigned short)(short)(floor(1000 * outline_vert_advance
                                                      * instance->ttcap.scaleBBoxHeight * ratio
                                                      * instance->pixel_width_unit_y / 64.));
                    if(rawCharacterWidth <= 0)
@@ -1281,7 +1281,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
     if( flags & FT_GET_DUMMY ) is_outline = -1;
     else {
        if( !metrics ) {
-           ftrc = FT_Load_Glyph(instance->face->face, idx, 
+           ftrc = FT_Load_Glyph(instance->face->face, idx,
                                 instance->load_flags);
            metrics = &face->face->glyph->metrics;
 
@@ -1299,7 +1299,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
            bbox.yMin = FLOOR64( bbox.yMin );
            bbox.yMax = CEIL64 ( bbox.yMax );
            ht_actual = ( bbox.yMax - bbox.yMin ) >> 6;
-           /* FreeType think a glyph with 0 height control box is invalid. 
+           /* FreeType think a glyph with 0 height control box is invalid.
             * So just let X to create a empty bitmap instead. */
            if ( ht_actual == 0 )
                is_outline = -1;
@@ -1319,11 +1319,11 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
     if( (instance->ttcap.flags & TTCAP_MONO_CENTER) && hasMetrics ) {
        if( is_outline == 1 ){
            if( correct ){
-               if( ft_get_very_lazy_bbox( idx, face->face, instance->size, 
+               if( ft_get_very_lazy_bbox( idx, face->face, instance->size,
                                           face->num_hmetrics,
                                           instance->ttcap.vl_slant,
                                           &instance->transformation.matrix,
-                                          &bbox, &outline_hori_advance, 
+                                          &bbox, &outline_hori_advance,
                                           &outline_vert_advance ) != 0 ){
                    is_outline = -1;    /* <- error */
                }
@@ -1357,10 +1357,10 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
     if(ht_actual <= 0) ht = 1;
     else ht=ht_actual;
 
-    bpr = (((wd + (instance->bmfmt.glyph<<3) - 1) >> 3) & 
+    bpr = (((wd + (instance->bmfmt.glyph<<3) - 1) >> 3) &
            -instance->bmfmt.glyph);
     raster = calloc(1, ht * bpr);
-    if(raster == NULL) 
+    if(raster == NULL)
        return AllocError;
 
     tgp->bits = raster;
@@ -1483,7 +1483,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
     if ( is_outline == 0 &&
         ( instance->ttcap.lsbShiftOfBitmapAutoItalic != 0 ||
           instance->ttcap.rsbShiftOfBitmapAutoItalic != 0 ) ) {
-       ft_make_up_italic_bitmap( raster, bpr, ht, 
+       ft_make_up_italic_bitmap( raster, bpr, ht,
                                  - instance->ttcap.lsbShiftOfBitmapAutoItalic
                                  + instance->ttcap.rsbShiftOfBitmapAutoItalic,
                                  instance->charcellMetrics->ascent
@@ -1492,11 +1492,11 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
                                  - tgp->metrics.ascent,
                                  instance->ttcap.autoItalic);
     }
-    
+
     if(instance->bmfmt.bit == LSBFirst) {
         BitOrderInvert((unsigned char*)(tgp->bits), ht*bpr);
     }
-    
+
     if(instance->bmfmt.byte != instance->bmfmt.bit) {
         switch(instance->bmfmt.scan) {
         case 1:
@@ -1532,7 +1532,7 @@ static void
 FreeTypeFreeXFont(FontPtr pFont, int freeProps)
 {
     FTFontPtr tf;
-    
+
     if(pFont) {
         if((tf = (FTFontPtr)pFont->fontPrivate)) {
             FreeTypeFreeFont(tf);
@@ -1562,7 +1562,7 @@ FreeTypeUnloadXFont(FontPtr pFont)
    used by Xaw. */
 
 static int
-FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info, 
+FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
                       char *fontname, int rawAverageWidth, Bool font_properties)
 {
     int i, j, maxprops;
@@ -1600,7 +1600,7 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
     }
 
     info->nprops = 0;           /* in case we abort */
-  
+
     strcpy(val, fontname);
     if(FontParseXLFDName(val, vals, FONT_XLFD_REPLACE_VALUE)) {
         xlfdProps = 1;
@@ -1618,11 +1618,11 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
         ( (font_properties && os2) ? 6 : 0 ) +
         ( (font_properties && (post || t1info)) ? 3 : 0 ) +
         2;                      /* type */
-    
+
     info->props = malloc(maxprops * sizeof(FontPropRec));
     if(info->props == NULL)
         return AllocError;
-    
+
     info->isStringProp = malloc(maxprops);
     if(info->isStringProp == NULL) {
         free(info->props);
@@ -1646,18 +1646,18 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
                 for (ep = sp; *ep && *ep != '['; ep++);
             else
                 for (ep = sp; *ep && *ep != '-'; ep++);
-            
+
             info->props[i].name =
                 MakeAtom(xlfd_props[j], strlen(xlfd_props[j]), TRUE);
-            
+
             switch(j) {
             case 6:                   /* pixel size */
-                info->props[i].value = 
+                info->props[i].value =
                     (int)(fabs(vals->pixel_matrix[3]) + 0.5);
                 i++;
                 break;
             case 7:                   /* point size */
-                info->props[i].value = 
+                info->props[i].value =
                     (int)(fabs(vals->point_matrix[3])*10.0 + 0.5);
                 i++;
                 break;
@@ -1704,7 +1704,7 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
 
     if(!face->bitmap) {
         info->props[i].name = MakeAtom("RAW_ASCENT", 10, TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             ((double)face->face->ascender/(double)upm*1000.0);
         i++;
     }
@@ -1717,7 +1717,7 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
 
     if(!face->bitmap) {
         info->props[i].name = MakeAtom("RAW_DESCENT", 11, TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             -((double)face->face->descender/(double)upm*1000.0);
         i++;
     }
@@ -1737,7 +1737,7 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
         info->isStringProp[i] = 1;
         i++;
     }
-    
+
     j = FTGetEnglishName(face->face, TT_NAME_ID_FULL_NAME,
                          val, MAXFONTNAMELEN);
     vp = val;
@@ -1790,30 +1790,30 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
 
   /* In what follows, we assume the matrix is diagonal.  In the rare
      case when it is not, the values will be somewhat wrong. */
-  
+
     if( font_properties && os2 ) {
         info->props[i].name = MakeAtom("SUBSCRIPT_SIZE",14,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             TRANSFORM_FUNITS_Y(os2->ySubscriptYSize);
         i++;
         info->props[i].name = MakeAtom("SUBSCRIPT_X",11,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             TRANSFORM_FUNITS_X(os2->ySubscriptXOffset);
         i++;
         info->props[i].name = MakeAtom("SUBSCRIPT_Y",11,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             TRANSFORM_FUNITS_Y(os2->ySubscriptYOffset);
         i++;
         info->props[i].name = MakeAtom("SUPERSCRIPT_SIZE",16,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             TRANSFORM_FUNITS_Y(os2->ySuperscriptYSize);
         i++;
         info->props[i].name = MakeAtom("SUPERSCRIPT_X",13,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
             TRANSFORM_FUNITS_X(os2->ySuperscriptXOffset);
         i++;
         info->props[i].name = MakeAtom("SUPERSCRIPT_Y",13,TRUE);
-        info->props[i].value = 
+        info->props[i].value =
         TRANSFORM_FUNITS_Y(os2->ySuperscriptYOffset);
         i++;
     }
@@ -1821,15 +1821,15 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
     if( font_properties && (post || t1info) ) {
         int underlinePosition, underlineThickness;
 
-       /* Raw underlineposition counts upwards, 
+       /* Raw underlineposition counts upwards,
           but UNDERLINE_POSITION counts downwards. */
         if(post) {
             underlinePosition = TRANSFORM_FUNITS_Y(-post->underlinePosition);
             underlineThickness = TRANSFORM_FUNITS_Y(post->underlineThickness);
         } else {
-            underlinePosition = 
+            underlinePosition =
                 TRANSFORM_FUNITS_Y(-t1info->underline_position);
-            underlineThickness = 
+            underlineThickness =
                 TRANSFORM_FUNITS_Y(t1info->underline_thickness);
         }
         if(underlineThickness <= 0)
@@ -1848,8 +1848,8 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
         /* The italic angle is often unreliable for Type 1 fonts */
         if(post && trans->matrix.xx == trans->matrix.yy) {
             info->props[i].name = MakeAtom("ITALIC_ANGLE",12,TRUE);
-            info->props[i].value = 
-                /* Convert from TT_Fixed to 
+            info->props[i].value =
+                /* Convert from TT_Fixed to
                    64th of a degree counterclockwise from 3 o'clock */
                 90*64+(post->italicAngle >> 10);
             i++;
@@ -1863,12 +1863,12 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
     info->props[i].value = MakeAtom(vp, strlen(vp), TRUE);
     info->isStringProp[i] = 1;
     i++;
-    
+
     info->props[i].name  = MakeAtom("RASTERIZER_NAME", 15, TRUE);
     info->props[i].value = MakeAtom("FreeType", 10, TRUE);
     info->isStringProp[i] = 1;
     i++;
-    
+
     info->nprops = i;
     return Successful;
 }
@@ -1876,20 +1876,20 @@ FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
 static int
 ft_get_index(unsigned code, FTFontPtr font, unsigned *idx)
 {
-    
+
     /* As a special case, we pass 0 even when it is not in the ranges;
        this will allow for the default glyph, which should exist in any
        TrueType font. */
-    
+
     /* This is not required...
     if(code > 0 && font->nranges) {
         int i;
         for(i = 0; i < font->nranges; i++)
-            if((code >= 
+            if((code >=
                 font->ranges[i].min_char_low+
                 (font->ranges[i].min_char_high<<8)) &&
                (code <=
-                font->ranges[i].max_char_low + 
+                font->ranges[i].max_char_low +
                 (font->ranges[i].max_char_high<<8)))
                 break;
         if(i == font->nranges) {
@@ -1911,7 +1911,7 @@ ft_get_index(unsigned code, FTFontPtr font, unsigned *idx)
     }
 
     *idx = FTRemap(font->instance->face->face, &font->mapping, code);
-    
+
     return 0;
 }
 
@@ -1920,7 +1920,7 @@ FreeTypeFontGetGlyph(unsigned code, int flags, CharInfoPtr *g, FTFontPtr font)
 {
     unsigned idx = 0;
     int xrc;
-    
+
 #ifdef X_ACCEPTS_NO_SUCH_CHAR
     if( ft_get_index(code,font,&idx) || idx == 0 || idx == font->zero_idx ) {
        *g = NULL;
@@ -1972,7 +1972,7 @@ FreeTypeFontGetGlyphMetrics(unsigned code, int flags, xCharInfo **metrics, FTFon
     if( xrc == Successful && *metrics != NULL )
        return Successful;
     if( font->zero_idx != idx ) {
-       xrc = FreeTypeInstanceGetGlyphMetrics(font->zero_idx, flags, 
+       xrc = FreeTypeInstanceGetGlyphMetrics(font->zero_idx, flags,
                                              metrics, font->instance);
        if( xrc == Successful && *metrics != NULL )
            return Successful;
@@ -2156,7 +2156,7 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol,
 }
 
 /* *face_number and *spacing are initialized but *load_flags is NOT. */
-static int 
+static int
 FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
                    char **dynStrRealFileName, char **dynStrFTFileName,
                    struct TTCapInfo *ret, int *face_number, FT_Int32 *load_flags,
@@ -2185,7 +2185,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
         {
             /* font cap */
             char *p1=NULL, *p2=NULL;
-           
+
            p1=strrchr(fileName, '/');
            if ( p1 == NULL ) p1 = fileName;
            else p1++;
@@ -2193,7 +2193,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
                /* colon exist in the right side of slash. */
                int dirLen = p1-fileName;
                int baseLen = fileName+len - p2 -1;
-               
+
                *dynStrRealFileName = malloc(dirLen+baseLen+1);
                if( *dynStrRealFileName == NULL ) {
                    result = AllocError;
@@ -2302,7 +2302,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
     fprintf(stderr,"[Filename:%s]\n",fileName);
     fprintf(stderr,"[RealFilename:%s]\n",*dynStrRealFileName);
     fprintf(stderr,"[FTFilename:%s]\n",*dynStrFTFileName);
-    */    
+    */
     /* slant control */
     if (SPropRecValList_search_record(&listPropRecVal,
                                       &contRecValue,
@@ -2587,15 +2587,15 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
                 semic_ptr=strchr(strMetrics,';');
                 comma_ptr=strchr(strMetrics,',');
                 period_ptr=strchr(strMetrics,'.');
-                if ( semic_ptr && comma_ptr ) 
+                if ( semic_ptr && comma_ptr )
                     if ( semic_ptr < comma_ptr ) comma_ptr=NULL;
-                if ( semic_ptr && period_ptr ) 
+                if ( semic_ptr && period_ptr )
                     if ( semic_ptr < period_ptr ) period_ptr=NULL;
                 if ( !comma_ptr && !period_ptr && strMetrics != semic_ptr ) {
                     if ( restrict_code_range_by_str(1,&first_col, &first_row,
                                                     &last_col, &last_row,
                                                     SPropContainer_value_str(contRecValue)) == 1 ) {
-                      ret->force_c_representative_metrics_char_code = 
+                      ret->force_c_representative_metrics_char_code =
                           (int)( first_row<<8 | first_col );
                     }
                 }
@@ -2688,14 +2688,14 @@ ft_get_trans_from_vals( FontScalablePtr vals, FTNormalisedTransformationPtr tran
 {
     /* Compute the transformation matrix.  We use floating-point
        arithmetic for simplicity */
-    
+
     trans->xres = vals->x;
     trans->yres = vals->y;
-    
+
     /* This value cannot be 0. */
     trans->scale = hypot(vals->point_matrix[2], vals->point_matrix[3]);
     trans->nonIdentity = 0;
-    
+
     /* Try to round stuff.  We want approximate zeros to be exact zeros,
        and if the elements on the diagonal are approximately equal, we
        want them equal.  We do this to avoid breaking hinting. */
@@ -2710,14 +2710,14 @@ ft_get_trans_from_vals( FontScalablePtr vals, FTNormalisedTransformationPtr tran
             ((vals->point_matrix[0] + vals->point_matrix[3])/2*
              (double)TWO_SIXTEENTH)/trans->scale;
     }
-    
+
     if(DIFFER0(vals->point_matrix[1], trans->scale)) {
         trans->matrix.yx =
             (int)((vals->point_matrix[1]*(double)TWO_SIXTEENTH)/trans->scale);
         trans->nonIdentity = 1;
     } else
         trans->matrix.yx = 0;
-    
+
     if(DIFFER0(vals->point_matrix[2], trans->scale)) {
         trans->matrix.xy =
             (int)((vals->point_matrix[2]*(double)TWO_SIXTEENTH)/trans->scale);
@@ -2749,7 +2749,7 @@ is_fixed_width(FT_Face face)
 static int
 FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
                 char *FTFileName, FontScalablePtr vals, FontEntryPtr entry,
-                 FontBitmapFormatPtr bmfmt, FT_Int32 load_flags, 
+                 FontBitmapFormatPtr bmfmt, FT_Int32 load_flags,
                 struct TTCapInfo *tmp_ttcap, char *dynStrTTCapCodeRange,
                 int ttcap_spacing )
 {
@@ -2766,7 +2766,7 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
     if(entry->name.ndashes == 14) {
         char *p;
         int dashes = 0;
-        for(p = entry->name.name; 
+        for(p = entry->name.name;
             p <= entry->name.name + entry->name.length - 2;
             p++) {
             if(*p == '-') {
@@ -2800,17 +2800,17 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
        if (xrc != Successful)
            return xrc;
     } else {
-        xrc = FTPickMapping(0, 0, FTFileName, 
+        xrc = FTPickMapping(0, 0, FTFileName,
                            face->face, &font->mapping);
        if (xrc != Successful)
            return xrc;
     }
-    
+
     font->nranges = vals->nranges;
     font->ranges = 0;
     if(font->nranges) {
         font->ranges = malloc(vals->nranges*sizeof(fsRange));
-        if(font->ranges == NULL) 
+        if(font->ranges == NULL)
             return AllocError;
         memcpy((char*)font->ranges, (char*)vals->ranges,
                vals->nranges*sizeof(fsRange));
@@ -2820,7 +2820,7 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
     if(info) {
         firstCode = 0;
         lastCode = 0xFFFFL;
-        if(!font->mapping.mapping || 
+        if(!font->mapping.mapping ||
            font->mapping.mapping->encoding->row_size == 0) {
             /* linear indexing */
             lastCode=MIN(lastCode,
@@ -2841,7 +2841,7 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
             info->lastRow = MIN(font->mapping.mapping->encoding->size-1,
                                 lastCode/0x100);
             info->firstCol = font->mapping.mapping->encoding->first_col;
-            info->lastCol = MIN(font->mapping.mapping->encoding->row_size-1, 
+            info->lastCol = MIN(font->mapping.mapping->encoding->row_size-1,
                                 lastCode<0x100?lastCode:0xFF);
            if( info->firstRow == 0 && info->firstCol == 0 ) zero_code=0;
         }
@@ -2868,7 +2868,7 @@ FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
        font->zero_idx = 0;
     }
     else
-       font->zero_idx = FTRemap(face->face, 
+       font->zero_idx = FTRemap(face->face,
                                 &font->mapping, zero_code);
 
     post = FT_Get_Sfnt_Table(face->face, ft_sfnt_post);
@@ -2954,7 +2954,7 @@ ft_compute_bounds(FTFontPtr font, FontInfoPtr pinfo, FontScalablePtr vals )
     for (row = pinfo->firstRow; row <= pinfo->lastRow; row++) {
       if ( skip_ok && tmpchar ) {
         if ( !force_c_outside ) {
-          if ( instance->ttcap.forceConstantSpacingBegin < row<<8 
+          if ( instance->ttcap.forceConstantSpacingBegin < row<<8
               && row<<8 < (instance->ttcap.forceConstantSpacingEnd & 0x0ff00) ) {
             if (tmpchar->characterWidth) {
               num_chars += num_cols;
@@ -2966,7 +2966,7 @@ ft_compute_bounds(FTFontPtr font, FontInfoPtr pinfo, FontScalablePtr vals )
           else skip_ok=0;
         }
         else {          /* for GB18030 proportional */
-          if ( instance->ttcap.forceConstantSpacingBegin < row<<8 
+          if ( instance->ttcap.forceConstantSpacingBegin < row<<8
               || row<<8 < (instance->ttcap.forceConstantSpacingEnd & 0x0ff00) ) {
             if (tmpchar->characterWidth) {
               num_chars += num_cols;
@@ -2982,12 +2982,12 @@ ft_compute_bounds(FTFontPtr font, FontInfoPtr pinfo, FontScalablePtr vals )
           c = row<<8|col;
           flags=0;
           if ( !force_c_outside ) {
-              if ( c <= instance->ttcap.forceConstantSpacingEnd 
+              if ( c <= instance->ttcap.forceConstantSpacingEnd
                   && instance->ttcap.forceConstantSpacingBegin <= c )
                   flags|=FT_FORCE_CONSTANT_SPACING;
           }
           else {        /* for GB18030 proportional */
-              if ( c <= instance->ttcap.forceConstantSpacingEnd 
+              if ( c <= instance->ttcap.forceConstantSpacingEnd
                   || instance->ttcap.forceConstantSpacingBegin <= c )
                   flags|=FT_FORCE_CONSTANT_SPACING;
           }
@@ -3007,13 +3007,13 @@ ft_compute_bounds(FTFontPtr font, FontInfoPtr pinfo, FontScalablePtr vals )
           overlap = tmpchar->rightSideBearing - tmpchar->characterWidth;
           if (maxOverlap < overlap)
               maxOverlap = overlap;
-          
+
           if (!tmpchar->characterWidth)
               continue;
           num_chars++;
           swidth += ABS(tmpchar->characterWidth);
           total_width += tmpchar->characterWidth;
-          
+
           if ( flags & FT_FORCE_CONSTANT_SPACING ) skip_ok=1;
       }
     }
@@ -3107,7 +3107,7 @@ is_matrix_unit(FontScalablePtr vals)
     m.yx = vals->point_matrix[1] / base_size * 65536;
     m.yy = vals->point_matrix[3] / base_size * 65536;
 
-    return (m.xx == 65536) && (m.yx == 0) && 
+    return (m.xx == 65536) && (m.yx == 0) &&
           (m.xy == 0) && (m.yy == 65536);
 }
 
@@ -3115,7 +3115,7 @@ is_matrix_unit(FontScalablePtr vals)
 /* xf->info is only accessed through info, and xf might be null */
 
 static int
-FreeTypeLoadXFont(char *fileName, 
+FreeTypeLoadXFont(char *fileName,
                   FontScalablePtr vals, FontPtr xf, FontInfoPtr info,
                   FontBitmapFormatPtr bmfmt, FontEntryPtr entry)
 {
@@ -3143,9 +3143,9 @@ FreeTypeLoadXFont(char *fileName,
         goto quit;
     }
 
-    xrc = FreeTypeSetUpTTCap(fileName, vals, 
+    xrc = FreeTypeSetUpTTCap(fileName, vals,
                             &dynStrRealFileName, &dynStrFTFileName,
-                            &tmp_ttcap, &face_number, 
+                            &tmp_ttcap, &face_number,
                             &load_flags, &ttcap_spacing,
                             &font_properties, &dynStrTTCapCodeRange);
     if ( xrc != Successful ) {
@@ -3187,7 +3187,7 @@ FreeTypeLoadXFont(char *fileName,
     }
 
     xrc = FreeTypeLoadFont(font, info, face, dynStrFTFileName, vals, entry, bmfmt,
-                          load_flags, &tmp_ttcap, dynStrTTCapCodeRange, 
+                          load_flags, &tmp_ttcap, dynStrTTCapCodeRange,
                           ttcap_spacing );
     if(xrc != Successful) {
         goto quit;
@@ -3258,9 +3258,9 @@ FreeTypeLoadXFont(char *fileName,
                width_x = max_advance_height * ins_ttcap->scaleBBoxHeight * unit_y;
            }
            else{
-               unit_x = fabs(vals->pixel_matrix[0] - 
+               unit_x = fabs(vals->pixel_matrix[0] -
                              vals->pixel_matrix[1]*vals->pixel_matrix[2]/vals->pixel_matrix[3]);
-               unit_y = fabs(vals->pixel_matrix[2] - 
+               unit_y = fabs(vals->pixel_matrix[2] -
                              vals->pixel_matrix[3]*vals->pixel_matrix[0]/vals->pixel_matrix[1]);
                width_x = face->face->max_advance_width * ins_ttcap->scaleBBoxWidth * unit_x;
                width_y = max_advance_height * ins_ttcap->scaleBBoxHeight * unit_y;
@@ -3346,7 +3346,7 @@ FreeTypeLoadXFont(char *fileName,
            force_c_rsb += ins_ttcap->force_c_adjust_rsb_by_pixel;
            force_c_lsb += ins_ttcap->force_c_adjust_lsb_by_pixel;
            /* apply to rawWidth */
-           averageWidth = (int)floor(10 * width_x * scale 
+           averageWidth = (int)floor(10 * width_x * scale
                                      * ratio + 0.5);
            rawWidth = floor(width_x * scale
                             * ratio * 1000. / base_height + 0.5);
@@ -3505,7 +3505,7 @@ FreeTypeLoadXFont(char *fileName,
                 instance->forceConstantMetrics->attributes       = force_c_rawWidth;
             }
            /* Check code 0 */
-           if( FreeTypeInstanceGetGlyph(font->zero_idx, FT_FORCE_CONSTANT_SPACING, 
+           if( FreeTypeInstanceGetGlyph(font->zero_idx, FT_FORCE_CONSTANT_SPACING,
                                         &tmpglyph, font->instance) != Successful
                || tmpglyph == NULL)
                if( FreeTypeInstanceGetGlyph(font->zero_idx, FT_FORCE_CONSTANT_SPACING | FT_GET_DUMMY,
@@ -3541,10 +3541,10 @@ FreeTypeLoadXFont(char *fileName,
 
     if( !charcell ) {          /* NOT CHARCELL */
        if( info ){
-           /* 
+           /*
               Calculate all glyphs' metrics.
               maxbounds.ascent and maxbounds.descent are quite important values
-              for XAA.  If ascent/descent of each glyph exceeds 
+              for XAA.  If ascent/descent of each glyph exceeds
               maxbounds.ascent/maxbounds.descent, XAA causes SERVER CRASH.
               Therefore, THIS MUST BE DONE.
            */
@@ -3558,7 +3558,7 @@ FreeTypeLoadXFont(char *fileName,
      */
 
        vals->width = averageWidth;
-       
+
        if( info ){
 
            info->maxbounds.leftSideBearing = minLsb;
@@ -3568,7 +3568,7 @@ FreeTypeLoadXFont(char *fileName,
            info->maxbounds.descent = descent;
            info->maxbounds.attributes =
                (unsigned short)(short)rawWidth;
-           
+
            info->minbounds = info->maxbounds;
        }
     }
@@ -3584,12 +3584,12 @@ FreeTypeLoadXFont(char *fileName,
        info->fontDescent = info->maxbounds.descent;
        /* Glyph metrics are accurate */
        info->inkMetrics=1;
-           
+
        memcpy((char *)&info->ink_maxbounds,
               (char *)&info->maxbounds, sizeof(xCharInfo));
        memcpy((char *)&info->ink_minbounds,
               (char *)&info->minbounds, sizeof(xCharInfo));
-       
+
        /* XXX - hack */
        info->defaultCh=0;
 
@@ -3607,9 +3607,9 @@ FreeTypeLoadXFont(char *fileName,
 
     if(xf)
         xf->fontPrivate = (void*)font;
-  
+
     if(info) {
-        xrc = FreeTypeAddProperties(font, vals, info, entry->name.name, 
+        xrc = FreeTypeAddProperties(font, vals, info, entry->name.name,
                                     rawAverageWidth, font_properties);
         if (xrc != Successful) {
             goto quit;
@@ -3650,23 +3650,23 @@ FreeTypeGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
 
     while (count-- > 0) {
         switch (charEncoding) {
-        case Linear8Bit: 
+        case Linear8Bit:
         case TwoD8Bit:
             code = *chars++;
             break;
-        case Linear16Bit: 
+        case Linear16Bit:
         case TwoD16Bit:
             code = (*chars++ << 8);
             code |= *chars++;
            /* */
             if ( !(ttcap->flags & TTCAP_FORCE_C_OUTSIDE) ) {
-                if ( (int)code <= ttcap->forceConstantSpacingEnd 
+                if ( (int)code <= ttcap->forceConstantSpacingEnd
                     && ttcap->forceConstantSpacingBegin <= (int)code )
                     flags|=FT_FORCE_CONSTANT_SPACING;
                else flags=0;
             }
             else {      /* for GB18030 proportional */
-                if ( (int)code <= ttcap->forceConstantSpacingEnd 
+                if ( (int)code <= ttcap->forceConstantSpacingEnd
                     || ttcap->forceConstantSpacingBegin <= (int)code )
                     flags|=FT_FORCE_CONSTANT_SPACING;
                else flags=0;
@@ -3681,7 +3681,7 @@ FreeTypeGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
        else *mp++ = &noSuchChar.metrics;
 #endif
     }
-    
+
     *metricCount = mp - metrics;
     return Successful;
 }
@@ -3708,24 +3708,24 @@ FreeTypeGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
             code = *chars++;
             break;
         case Linear16Bit: case TwoD16Bit:
-            code = *chars++ << 8; 
+            code = *chars++ << 8;
             code |= *chars++;
            /* */
             if ( !(ttcap->flags & TTCAP_FORCE_C_OUTSIDE) ) {
-                if ( (int)code <= ttcap->forceConstantSpacingEnd 
+                if ( (int)code <= ttcap->forceConstantSpacingEnd
                     && ttcap->forceConstantSpacingBegin <= (int)code )
                     flags|=FT_FORCE_CONSTANT_SPACING;
                else flags=0;
             }
             else {      /* for GB18030 proportional */
-                if ( (int)code <= ttcap->forceConstantSpacingEnd 
+                if ( (int)code <= ttcap->forceConstantSpacingEnd
                     || ttcap->forceConstantSpacingBegin <= (int)code )
                     flags|=FT_FORCE_CONSTANT_SPACING;
                else flags=0;
             }
             break;
         }
-      
+
         if(FreeTypeFontGetGlyph(code, flags, &g, tf) == Successful && g!=NULL) {
             *gp++ = g;
         }
@@ -3746,7 +3746,7 @@ FreeTypeGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
                else wd=wd_actual;
                if(ht_actual <= 0) ht = 1;
                else ht=ht_actual;
-               bpr = (((wd + (tf->instance->bmfmt.glyph<<3) - 1) >> 3) & 
+               bpr = (((wd + (tf->instance->bmfmt.glyph<<3) - 1) >> 3) &
                       -tf->instance->bmfmt.glyph);
                raster = calloc(1, ht * bpr);
                if(raster) {
@@ -3758,13 +3758,13 @@ FreeTypeGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
        }
 #endif
     }
-    
+
     *glyphCount = gp - glyphs;
     return Successful;
 }
 
 static int
-FreeTypeSetUpFont(FontPathElementPtr fpe, FontPtr xf, FontInfoPtr info, 
+FreeTypeSetUpFont(FontPathElementPtr fpe, FontPtr xf, FontInfoPtr info,
                   fsBitmapFormat format, fsBitmapFormatMask fmask,
                   FontBitmapFormatPtr bmfmt)
 {
@@ -3907,9 +3907,9 @@ static FontRendererRec alt_renderers[] = {
      FreeTypeGetInfoScalable, 0, CAPABILITIES},
 };
 
-static int num_alt_renderers =  
+static int num_alt_renderers =
 sizeof(alt_renderers) / sizeof(alt_renderers[0]);
-    
+
 
 void
 FreeTypeRegisterFontFileFunctions(void)
old mode 100755 (executable)
new mode 100644 (file)
index 068a595..6545dfa
@@ -158,7 +158,7 @@ typedef struct _FTFont{
 
 static int FreeTypeOpenFace(FTFacePtr *facep, char *FTFileName, char *realFileName, int faceNumber);
 static void FreeTypeFreeFace(FTFacePtr face);
-static int 
+static int
 FreeTypeOpenInstance(FTInstancePtr *instancep, FTFacePtr face,
                      char *FTFileName, FTNormalisedTransformationPtr trans,
                      int spacing, FontBitmapFormatPtr bmfmt,
@@ -169,20 +169,20 @@ FreeTypeInstanceGetGlyph(unsigned idx, int flags, CharInfoPtr *g, FTInstancePtr
 static int
 FreeTypeInstanceGetGlyphMetrics(unsigned idx, int flags,
                                xCharInfo **metrics, FTInstancePtr instance );
-static int 
-FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp, 
+static int
+FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
                       FTInstancePtr instance, int hasMetrics );
 static void FreeTypeFreeFont(FTFontPtr font);
 static void FreeTypeFreeXFont(FontPtr pFont, int freeProps);
 static void FreeTypeUnloadXFont(FontPtr pFont);
 static int
-FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info, 
+FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info,
                       char *fontname, int rawAverageWidth, Bool font_properties);
 static int FreeTypeFontGetGlyph(unsigned code, int flags, CharInfoPtr *g, FTFontPtr font);
 static int
 FreeTypeLoadFont(FTFontPtr font, FontInfoPtr info, FTFacePtr face,
                 char *FTFileName, FontScalablePtr vals, FontEntryPtr entry,
-                 FontBitmapFormatPtr bmfmt, FT_Int32 load_flags, 
+                 FontBitmapFormatPtr bmfmt, FT_Int32 load_flags,
                 struct TTCapInfo *tmp_ttcap, char *dynStrTTCapCodeRange,
                 int ttcap_spacing );
 
old mode 100755 (executable)
new mode 100644 (file)
index bc75b7e..8c5d08e
@@ -112,17 +112,17 @@ FTGetName(FT_Face face, int nid, int pid, int eid, FT_SfntName *name_return)
     return 0;
 }
 
-int 
+int
 FTGetEnglishName(FT_Face face, int nid, char *name_return, int name_len)
 {
     FT_SfntName name;
     int len;
 
-    if(FTGetName(face, nid, 
+    if(FTGetName(face, nid,
                  TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, &name) ||
-       FTGetName(face, nid, 
+       FTGetName(face, nid,
                  TT_PLATFORM_APPLE_UNICODE, -1, &name))
-        return FTu2a(name.string_len, name.string, name_return, 
+        return FTu2a(name.string_len, name.string, name_return,
                      MSBFirst, name_len);
 
     /* Pretend that Apple Roman is ISO 8859-1. */
old mode 100755 (executable)
new mode 100644 (file)
index c2a4120..bf25cc5
@@ -1,7 +1,7 @@
 /* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
 /* ===FileName: ===
    Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
-   Copyright (c) 1998 X-TrueType Server Project, All rights reserved. 
+   Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
    Copyright (c) 2003 After X-TT Project, All rights reserved.
 
 ===Notice
@@ -133,7 +133,7 @@ get_record_type_by_name(SPropertyRecord const ** const refRefRecord, /*result*/
 {
     Bool result = False;
     int i;
-    
+
     *refRefRecord = NULL;
     for (i=0; i<numOfValidRecords; i++) {
         if (!strcasecmp(validRecords[i].strRecordName, strName)) {
@@ -142,7 +142,7 @@ get_record_type_by_name(SPropertyRecord const ** const refRefRecord, /*result*/
             break;
         }
     }
-    
+
     return result;
 }
 
@@ -161,7 +161,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
             {
                 int val;
                 char *endPtr;
-                    
+
                 val = strtol(strValue, &endPtr, 0);
                 if ('\0' != *endPtr) {
                     fprintf(stderr,
@@ -178,7 +178,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
             {
                 double val;
                 char *endPtr;
-                    
+
                 val = strtod(strValue, &endPtr);
                 if ('\0' != *endPtr) {
                     fprintf(stderr,
@@ -194,7 +194,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
         case eRecTypeBool:
             {
                 Bool val;
-                
+
                 if (!strcasecmp(strValue, "yes"))
                     val = True;
                 else if (!strcasecmp(strValue, "y"))
@@ -233,7 +233,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
         case eRecTypeString:
             {
                 char *p;
-                    
+
                 if (NULL == (p = malloc(strlen(strValue)+1))) {
                     fprintf(stderr,
                             "truetype font property : "
@@ -257,7 +257,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
         {
             /* add to list */
             SPropRecValListNodeP *newNode;
-            
+
             if (NULL == (newNode = malloc(sizeof(*newNode)))) {
                 fprintf(stderr,
                         "truetype font property : "
@@ -301,11 +301,11 @@ get_one_line(FILE *is, char *buf)
     Bool flInDoubleQuote = False;
     Bool flBackSlash = False;
     Bool flFirstElement = True;
-    
+
     *buf = '\0';
     for (;;) {
         int c = fgetc(is);
-        
+
         if (ferror(is)) {
             fprintf(stderr, "truetype font property file : read error.\n");
             result = True;
@@ -446,7 +446,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is)
     Bool result = False;
     char *buf = NULL;
     char *recordHead, *valueHead = NULL;
-    
+
     if (NULL == (buf = malloc(LEN_LINEBUF))) {
         fprintf(stderr,
                 "truetype font property file : cannot allocate memory.\n");
@@ -483,7 +483,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is)
     }
   quit:
     free(buf);
-  abort:    
+  abort:
     return result;
 }
 
@@ -494,7 +494,7 @@ SPropRecValList_read_prop_file(SDynPropRecValList *pThisList,
 {
     Bool result = False;
     FILE *is;
-    
+
 #if 1
     if (!strcmp(strFileName, "-"))
         is = stdin;
@@ -530,7 +530,7 @@ Bool /* True == Error, False == Success */
 SPropRecValList_new(SDynPropRecValList *pThisList)
 {
     Bool result = False;
-    
+
     pThisList->headNode = NULL;
 
     return result;
@@ -582,7 +582,7 @@ SPropRecValList_search_record(SRefPropRecValList *pThisList,
 {
     Bool result = False;
     SPropRecValListNodeP *p;
-    
+
     *refRecValue = NULL;
     for (p=pThisList->headNode; NULL!=p; p=p->nextNode) {
         if (!strcasecmp(p->containerE.refRecordType->strRecordName,
@@ -605,7 +605,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
     Bool result = False;
     /*    SPropertyRecord const *refRecordType; */
     char const *term;
-    
+
     if (NULL == (term = strrchr(strCapHead, ':')))
         goto abort;
 
@@ -646,7 +646,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
             char *duplicated = malloc((nextColon-strCapHead)+1);
             {
                 char *value;
-            
+
                 memcpy(duplicated, strCapHead, nextColon-strCapHead);
                 duplicated[nextColon-strCapHead] = '\0';
                 if (NULL != (value=strchr(duplicated, '='))) {
@@ -654,7 +654,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
                     value++;
                 } else
                     value = &duplicated[nextColon-strCapHead];
-            
+
                 for (i=0; i<numOfCorrespondRelations; i++) {
                     if (!strcasecmp(correspondRelations[i].capVariable,
                                       duplicated)) {
@@ -676,7 +676,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
         }
         strCapHead = nextColon+1;
     }
-    
+
     /*  quit: */
   abort:
     return result;
@@ -692,7 +692,7 @@ char *
 XttXstrdup(char const *str)
 {
     char *result;
-    
+
     result = malloc(strlen(str)+1);
 
     if (result)
old mode 100755 (executable)
new mode 100644 (file)
index 6a09cf6..2931098
@@ -1,8 +1,8 @@
 /* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
 /* ===FileName: ===
    Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
-   Copyright (c) 1998 X-TrueType Server Project, All rights reserved. 
-   Copyright (c) 2003 After X-TT Project, All rights reserved. 
+   Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
+   Copyright (c) 2003 After X-TT Project, All rights reserved.
 
 ===Notice
    Redistribution and use in source and binary forms, with or without
old mode 100755 (executable)
new mode 100644 (file)
index 26551bc..cd09ab9
@@ -1,6 +1,6 @@
-# 
+#
 #  Copyright Â© 2003 Keith Packard, Noah Levitt
-# 
+#
 #  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
@@ -10,7 +10,7 @@
 #  specific, written prior permission.  Keith Packard makes no
 #  representations about the suitability of this software for any purpose.  It
 #  is provided "as is" without express or implied warranty.
-# 
+#
 #  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 #  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 2464c03..e2770dc
@@ -76,7 +76,7 @@ extern int  bdfFileLineNum;
 /***====================================================================***/
 
 static Bool
-bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, 
+bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
              int glyph, int scan, CARD32 *sizes)
 {
     int         widthBits,
@@ -99,7 +99,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
     if (widthBytes * height > 0) {
        picture = malloc(widthBytes * height);
        if (!picture) {
-          bdfError("Couldn't allocate picture (%d*%d)\n", widthBytes, height);        
+          bdfError("Couldn't allocate picture (%d*%d)\n", widthBytes, height);
            goto BAILOUT;
       }
     } else
@@ -247,7 +247,7 @@ bdfFreeFontBits(FontPtr pFont)
 
 
 static Bool
-bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, 
+bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
                  int bit, int byte, int glyph, int scan)
 {
     unsigned char *line;
@@ -291,13 +291,13 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
     }
     if (nchars > INT32_MAX / sizeof(CharInfoRec)) {
        bdfError("Couldn't allocate pCI (%d*%d)\n", nchars,
-                sizeof(CharInfoRec));
+                (int) sizeof(CharInfoRec));
        goto BAILOUT;
     }
     ci = calloc(nchars, sizeof(CharInfoRec));
     if (!ci) {
        bdfError("Couldn't allocate pCI (%d*%d)\n", nchars,
-                sizeof(CharInfoRec));
+                (int) sizeof(CharInfoRec));
        goto BAILOUT;
     }
     bitmapFont->metrics = ci;
@@ -306,7 +306,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
        bitmapExtra->glyphNames = malloc(nchars * sizeof(Atom));
        if (!bitmapExtra->glyphNames) {
            bdfError("Couldn't allocate glyphNames (%d*%d)\n",
-                    nchars, sizeof(Atom));
+                    nchars, (int) sizeof(Atom));
            goto BAILOUT;
        }
     }
@@ -314,7 +314,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
        bitmapExtra->sWidths = malloc(nchars * sizeof(int));
        if (!bitmapExtra->sWidths) {
            bdfError("Couldn't allocate sWidth (%d *%d)\n",
-                    nchars, sizeof(int));
+                    nchars, (int) sizeof(int));
            return FALSE;
        }
     }
@@ -380,7 +380,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
                bdfEncoding[char_row] = malloc(256 * sizeof(CharInfoPtr));
                if (!bdfEncoding[char_row]) {
                    bdfError("Couldn't allocate row %d of encoding (%d*%d)\n",
-                            char_row, INDICES, sizeof(CharInfoPtr));
+                            char_row, INDICES, (int) sizeof(CharInfoPtr));
                    goto BAILOUT;
                }
                for (i = 0; i < 256; i++)
@@ -490,7 +490,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
     if (!bitmapFont->encoding) {
        bdfError("Couldn't allocate ppCI (%d,%d)\n",
                  NUM_SEGMENTS(nencoding),
-                 sizeof(CharInfoPtr*));
+                 (int) sizeof(CharInfoPtr*));
        goto BAILOUT;
     }
     pFont->info.allExist = TRUE;
@@ -515,7 +515,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
                         if (!bitmapFont->encoding[SEGMENT_MAJOR(i)])
                             goto BAILOUT;
                     }
-                    ACCESSENCODINGL(bitmapFont->encoding,i) = 
+                    ACCESSENCODINGL(bitmapFont->encoding,i) =
                         bdfEncoding[char_row][char_col];
                 }
                 i++;
@@ -610,14 +610,14 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState)
     pFont->info.isStringProp = stringProps;
     if (stringProps == NULL) {
        bdfError("Couldn't allocate stringProps (%d*%d)\n",
-                (nProps + BDF_GENPROPS), sizeof(Bool));
+                (nProps + BDF_GENPROPS), (int) sizeof(Bool));
        goto BAILOUT;
     }
     pFont->info.props = props = calloc(nProps + BDF_GENPROPS,
                                       sizeof(FontPropRec));
     if (props == NULL) {
        bdfError("Couldn't allocate props (%d*%d)\n", nProps + BDF_GENPROPS,
-                                                     sizeof(FontPropRec));
+                                                  (int) sizeof(FontPropRec));
        goto BAILOUT;
     }
 
@@ -782,7 +782,7 @@ bdfUnloadFont(FontPtr pFont)
 }
 
 int
-bdfReadFont(FontPtr pFont, FontFilePtr file, 
+bdfReadFont(FontPtr pFont, FontFilePtr file,
            int bit, int byte, int glyph, int scan)
 {
     bdfFileState state;
@@ -800,7 +800,8 @@ bdfReadFont(FontPtr pFont, FontFilePtr file,
 
     bitmapFont = calloc(1, sizeof(BitmapFontRec));
     if (!bitmapFont) {
-      bdfError("Couldn't allocate bitmapFontRec (%d)\n", sizeof(BitmapFontRec));
+       bdfError("Couldn't allocate bitmapFontRec (%d)\n",
+                (int) sizeof(BitmapFontRec));
        goto BAILOUT;
     }
 
@@ -813,10 +814,11 @@ bdfReadFont(FontPtr pFont, FontFilePtr file,
 
     bitmapFont->bitmapExtra = calloc(1, sizeof(BitmapExtraRec));
     if (!bitmapFont->bitmapExtra) {
-      bdfError("Couldn't allocate bitmapExtra (%d)\n", sizeof(BitmapExtraRec));
+       bdfError("Couldn't allocate bitmapExtra (%d)\n",
+                (int) sizeof(BitmapExtraRec));
         goto BAILOUT;
     }
-    
+
     bitmapFont->bitmapExtra->glyphNames = 0;
     bitmapFont->bitmapExtra->sWidths = 0;
 
@@ -836,7 +838,7 @@ bdfReadFont(FontPtr pFont, FontFilePtr file,
            cols = pFont->info.lastCol - pFont->info.firstCol + 1;
            r = r - pFont->info.firstRow;
            c = c - pFont->info.firstCol;
-           bitmapFont->pDefault = ACCESSENCODING(bitmapFont->encoding, 
+           bitmapFont->pDefault = ACCESSENCODING(bitmapFont->encoding,
                                                  r * cols + c);
        }
     }
@@ -859,7 +861,7 @@ bdfReadFont(FontPtr pFont, FontFilePtr file,
         bdfError("Failed to add bitmap ink metrics\n");
         goto BAILOUT;
       }
-    }    
+    }
     if (bitmapFont->bitmapExtra)
        bitmapFont->bitmapExtra->info.inkMetrics = pFont->info.inkMetrics;
 
@@ -924,7 +926,7 @@ bdfPadToTerminal(FontPtr pFont)
 
     bitmapFont = (BitmapFontPtr) pFont->fontPrivate;
 
-    bzero(&new, sizeof(CharInfoRec)); 
+    bzero(&new, sizeof(CharInfoRec));
     new.metrics.ascent = pFont->info.fontAscent;
     new.metrics.descent = pFont->info.fontDescent;
     new.metrics.leftSideBearing = 0;
old mode 100755 (executable)
new mode 100644 (file)
index 1d6cc72..288148b
@@ -68,7 +68,7 @@ int bdfFileLineNum;
 /***====================================================================***/
 
 void
-bdfError(char* message, ...)
+bdfError(const char* message, ...)
 {
     va_list args;
 
@@ -81,7 +81,7 @@ bdfError(char* message, ...)
 /***====================================================================***/
 
 void
-bdfWarning(char *message, ...)
+bdfWarning(const char *message, ...)
 {
     va_list args;
 
@@ -127,7 +127,7 @@ bdfGetLine(FontFilePtr file, unsigned char *buf, int len)
 /***====================================================================***/
 
 Atom
-bdfForceMakeAtom(char *str, int *size)
+bdfForceMakeAtom(const char *str, int *size)
 {
     register int len = strlen(str);
     Atom the_atom;
@@ -174,8 +174,9 @@ bdfGetPropertyValue(char *s)
     s++;
     pp = p = malloc((unsigned) strlen(s) + 1);
     if (pp == NULL) {
-  bdfError("Couldn't allocate property value string (%d)\n", strlen(s) + 1);
-  return None;
+       bdfError("Couldn't allocate property value string (%d)\n",
+                (int) strlen(s) + 1);
+       return None;
     }
     while (*s) {
        if (*s == '"') {
@@ -191,7 +192,7 @@ bdfGetPropertyValue(char *s)
        *p++ = *s++;
     }
     free (pp);
-    bdfError("unterminated quoted string property: %s\n", (pointer) orig_s);
+    bdfError("unterminated quoted string property: %s\n", orig_s);
     return None;
 }
 
@@ -249,7 +250,7 @@ bdfHexByte(unsigned char *s)
  * check for known special property values
  */
 
-static char *SpecialAtoms[] = {
+static const char *SpecialAtoms[] = {
     "FONT_ASCENT",
 #define BDF_FONT_ASCENT        0
     "FONT_DESCENT",
@@ -276,11 +277,11 @@ static char *SpecialAtoms[] = {
 };
 
 Bool
-bdfSpecialProperty(FontPtr pFont, FontPropPtr prop, 
+bdfSpecialProperty(FontPtr pFont, FontPropPtr prop,
                   char isString, bdfFileState *bdfState)
 {
-    char      **special;
-    char       *name;
+    const char      **special;
+    const char       *name;
 
     name = NameForAtom(prop->name);
     for (special = SpecialAtoms; *special; special++)
old mode 100755 (executable)
new mode 100644 (file)
index 1ceb4bb..9b20faf
@@ -36,8 +36,8 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/fonts/bitmap.h>
 
 int
-bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars, 
-               FontEncoding charEncoding, 
+bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
+               FontEncoding charEncoding,
                unsigned long *glyphCount,      /* RETURN */
                CharInfoPtr *glyphs)            /* RETURN */
 {
@@ -126,8 +126,8 @@ bitmapGetGlyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
 static CharInfoRec nonExistantChar;
 
 int
-bitmapGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars, 
-                FontEncoding charEncoding, 
+bitmapGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
+                FontEncoding charEncoding,
                 unsigned long *glyphCount,     /* RETURN */
                 xCharInfo **glyphs)            /* RETURN */
 {
old mode 100755 (executable)
new mode 100644 (file)
index 47ce488..603d5d9
@@ -56,10 +56,10 @@ in this Software without prior written authorization from The Open Group.
 #include "snfstr.h"
 
 typedef struct _BitmapFileFunctions {
-    int         (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,  
-                            int /* bit */, int /* byte */, 
+    int         (*ReadFont) (FontPtr /* pFont */, FontFilePtr /* file */,
+                            int /* bit */, int /* byte */,
                             int /* glyph */, int /* scan */);
-    int         (*ReadInfo) (  FontInfoPtr /* pFontInfo */, 
+    int         (*ReadInfo) (  FontInfoPtr /* pFontInfo */,
                               FontFilePtr /* file */ );
 }           BitmapFileFunctionsRec, *BitmapFileFunctionsPtr;
 
@@ -107,8 +107,8 @@ static BitmapFileFunctionsRec readers[] = {
 #define CAPABILITIES (CAP_MATRIX | CAP_CHARSUBSETTING)
 
 static int
-BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags, 
-                 FontEntryPtr entry, char *fileName, 
+BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
+                 FontEntryPtr entry, char *fileName,
                  fsBitmapFormat format, fsBitmapFormatMask fmask,
                  FontPtr non_cachable_font) /* We don't do licensing */
 {
@@ -152,7 +152,7 @@ BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
 }
 
 static int
-BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, 
+BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
                     FontEntryPtr entry, char *fileName)
 {
     FontFilePtr file;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index cf16bff..f274d2d
@@ -63,11 +63,11 @@ from The Open Group.
 extern unsigned long serverGeneration;
 
 static void bitmapUnloadScalable (FontPtr pFont);
-static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci, 
-                         CharInfoPtr pci, double *inv_xform, 
+static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci,
+                         CharInfoPtr pci, double *inv_xform,
                          double widthMult, double heightMult );
-static FontPtr BitmapScaleBitmaps(FontPtr pf, FontPtr opf, 
-                                 double widthMult, double heightMult,   
+static FontPtr BitmapScaleBitmaps(FontPtr pf, FontPtr opf,
+                                 double widthMult, double heightMult,
                                  FontScalablePtr vals);
 
 enum scaleType {
@@ -78,17 +78,17 @@ enum scaleType {
 };
 
 typedef struct _fontProp {
-    char       *name;
+    const char *name;
     Atom        atom;
     enum scaleType type;
 } fontProp;
 
-static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe, 
-                                     FontEntryPtr entry, 
-                                     FontScalablePtr vals, 
-                                     FontScalablePtr best, 
-                                     double *dxp, double *dyp, 
-                                     double *sdxp, double *sdyp, 
+static FontEntryPtr FindBestToScale ( FontPathElementPtr fpe,
+                                     FontEntryPtr entry,
+                                     FontScalablePtr vals,
+                                     FontScalablePtr best,
+                                     double *dxp, double *dyp,
+                                     double *sdxp, double *sdyp,
                                      FontPathElementPtr *fpep );
 
 static unsigned long bitscaleGeneration = 0;   /* initialization flag */
@@ -231,8 +231,8 @@ get_matrix_vertical_component(double *matrix)
 
 
 static Bool
-ComputeScaleFactors(FontScalablePtr from, FontScalablePtr to, 
-                   double *dx, double *dy, double *sdx, double *sdy, 
+ComputeScaleFactors(FontScalablePtr from, FontScalablePtr to,
+                   double *dx, double *dy, double *sdx, double *sdy,
                    double *rescale_x)
 {
     double srcpixelset, destpixelset, srcpixel, destpixel;
@@ -318,10 +318,10 @@ else \
     score += (int)(((double)(8 * s)) * m);
 
 static FontEntryPtr
-FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry, 
-               FontScalablePtr vals, FontScalablePtr best, 
-               double *dxp, double *dyp, 
-               double *sdxp, double *sdyp, 
+FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry,
+               FontScalablePtr vals, FontScalablePtr best,
+               double *dxp, double *dyp,
+               double *sdxp, double *sdyp,
                FontPathElementPtr *fpep)
 {
     FontScalableRec temp;
@@ -425,7 +425,7 @@ FindBestToScale(FontPathElementPtr fpe, FontEntryPtr entry,
                    ((score == best_score) &&
                     ((dy_amount < best_dy_amount) ||
                      ((dy_amount == best_dy_amount) &&
-                      (dx_amount < best_dx_amount))))) 
+                      (dx_amount < best_dx_amount)))))
            {
                best_fpe = FontFileBitmapSources.fpe[source];
                best_scaled = scaled;
@@ -525,8 +525,8 @@ doround(double x)
 }
 
 static int
-computeProps(FontPropPtr pf, char *wasStringProp, 
-            FontPropPtr npf, char *isStringProp, 
+computeProps(FontPropPtr pf, char *wasStringProp,
+            FontPropPtr npf, char *isStringProp,
             unsigned int nprops, double xfactor, double yfactor,
             double sXfactor, double sYfactor)
 {
@@ -580,13 +580,13 @@ computeProps(FontPropPtr pf, char *wasStringProp,
 static int
 ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */
                        char *name,             /* name of resulting font */
-                       FontScalablePtr vals, 
+                       FontScalablePtr vals,
                        double dx, double dy,   /* scale factors in x and y */
                        double sdx, double sdy, /* directions */
                        long sWidth,            /* 1000-pixel average width */
-                       FontPropPtr *pProps,    /* returns properties; 
+                       FontPropPtr *pProps,    /* returns properties;
                                                   preallocated */
-                       char **pIsStringProp)   /* return booleans; 
+                       char **pIsStringProp)   /* return booleans;
                                                   preallocated */
 {
     int         n;
@@ -692,8 +692,8 @@ ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */
 
 
 static int
-compute_xform_matrix(FontScalablePtr vals, double dx, double dy, 
-                    double *xform, double *inv_xform, 
+compute_xform_matrix(FontScalablePtr vals, double dx, double dy,
+                    double *xform, double *inv_xform,
                     double *xmult, double *ymult)
 {
     double det;
@@ -752,17 +752,17 @@ compute_xform_matrix(FontScalablePtr vals, double dx, double dy,
  *  returns a pointer to the new scaled font, or NULL (due to AllocError).
  */
 static FontPtr
-ScaleFont(FontPtr opf,            /* originating font */                    
-         double widthMult,       /* glyphs width scale factor */           
-         double heightMult,      /* glyphs height scale factor */          
-         double sWidthMult,      /* scalable glyphs width scale factor */  
-         double sHeightMult,     /* scalable glyphs height scale factor */ 
-         FontScalablePtr vals,                                             
-         double *newWidthMult,   /* return: X component of glyphs width    
-                                    scale factor */                        
-         double *newHeightMult,  /* return: Y component of glyphs height   
-                                    scale factor */                        
-         long *sWidth)           /* return: average 1000-pixel width */    
+ScaleFont(FontPtr opf,            /* originating font */
+         double widthMult,       /* glyphs width scale factor */
+         double heightMult,      /* glyphs height scale factor */
+         double sWidthMult,      /* scalable glyphs width scale factor */
+         double sHeightMult,     /* scalable glyphs height scale factor */
+         FontScalablePtr vals,
+         double *newWidthMult,   /* return: X component of glyphs width
+                                    scale factor */
+         double *newHeightMult,  /* return: Y component of glyphs height
+                                    scale factor */
+         long *sWidth)           /* return: average 1000-pixel width */
 {
     FontPtr     pf;
     FontInfoPtr pfi,
@@ -1015,7 +1015,7 @@ ScaleFont(FontPtr opf,            /* originating font */
                if (pci->metrics.ascent == -pci->metrics.descent)
                    pci->metrics.ascent++;
            }
-    
+
            pci++;
        }
     }
@@ -1039,7 +1039,7 @@ ScaleFont(FontPtr opf,            /* originating font */
                pfi->minbounds.field = pci->metrics.field; \
            if (pfi->maxbounds.field < pci->metrics.field) \
                pfi->maxbounds.field = pci->metrics.field
-    
+
            MINMAX(leftSideBearing);
            MINMAX(rightSideBearing);
            MINMAX(ascent);
@@ -1093,7 +1093,7 @@ ScaleFont(FontPtr opf,            /* originating font */
            cols = pfi->lastCol - pfi->firstCol + 1;
            r = r - pfi->firstRow;
            c = c - pfi->firstCol;
-           bitmapFont->pDefault = 
+           bitmapFont->pDefault =
                 ACCESSENCODING(bitmapFont->encoding, r * cols + c);
        }
     }
@@ -1117,7 +1117,7 @@ bail:
 }
 
 static void
-ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci, 
+ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci,
            double *inv_xform, double widthMult, double heightMult)
 {
     register char  *bitmap,            /* The bits */
@@ -1394,7 +1394,7 @@ ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci,
            {
                register int x = xValue >> 16, y = yValue >> 16;
                int pixvalue, error;
-    
+
                pixvalue = ((x >= 0 && x < width && y >= 0 && y < height) ?
                            char_grayscale[x + y * (width + 1)] : 0) +
                           thisrow[col] / 16;
@@ -1436,7 +1436,7 @@ ScaleBitmap(FontPtr pFont, CharInfoPtr opci, CharInfoPtr pci,
            for (col = 0; col < newWidth; col++)
            {
                register int x = xValue >> 16, y = yValue >> 16;
-    
+
                if (x >= 0 && x < width && y >= 0 && y < height)
                {
                    /* Use point-sampling for rescaling. */
@@ -1543,13 +1543,13 @@ bail:
 
 /* ARGSUSED */
 int
-BitmapOpenScalable (FontPathElementPtr fpe, 
-                   FontPtr *pFont, 
-                   int flags, 
-                   FontEntryPtr entry, 
+BitmapOpenScalable (FontPathElementPtr fpe,
+                   FontPtr *pFont,
+                   int flags,
+                   FontEntryPtr entry,
                    char *fileName, /* unused */
-                   FontScalablePtr vals, 
-                   fsBitmapFormat format, 
+                   FontScalablePtr vals,
+                   fsBitmapFormat format,
                    fsBitmapFormatMask fmask,
                    FontPtr non_cachable_font)  /* We don't do licensing */
 {
@@ -1620,29 +1620,26 @@ BitmapOpenScalable (FontPathElementPtr fpe,
     if (!sourceFont->refcnt)
        FontFileCloseFont((FontPathElementPtr) 0, sourceFont);
 
+    font->info.props = props;
+    font->info.nprops = propCount;
+    font->info.isStringProp = isStringProp;
+
     if (propCount && (!props || !isStringProp))
     {
-       font->info.nprops = 0;
-       font->info.props = (FontPropPtr)0;
-       font->info.isStringProp = (char *)0;
        bitmapUnloadScalable(font);
        return AllocError;
     }
 
-    font->info.props = props;
-    font->info.nprops = propCount;
-    font->info.isStringProp = isStringProp;
-
     *pFont = font;
     return Successful;
 }
 
 int
-BitmapGetInfoScalable (FontPathElementPtr fpe, 
-                      FontInfoPtr pFontInfo, 
-                      FontEntryPtr entry, 
-                      FontNamePtr fontName, 
-                      char *fileName, 
+BitmapGetInfoScalable (FontPathElementPtr fpe,
+                      FontInfoPtr pFontInfo,
+                      FontEntryPtr entry,
+                      FontNamePtr fontName,
+                      char *fileName,
                       FontScalablePtr vals)
 {
     FontPtr pfont;
old mode 100755 (executable)
new mode 100644 (file)
index ad7091f..f4898da
@@ -98,7 +98,7 @@ FontCharInkMetrics(FontPtr pFont, CharInfoPtr pCI, xCharInfo *pInk)
 found_ascent:
     pInk->ascent = vpos - descent + 1;
 
-    p = ((unsigned char *) pCI->bits) + bitmapByteWidthPadded * 
+    p = ((unsigned char *) pCI->bits) + bitmapByteWidthPadded *
        (descent + ascent - 1) + bitmapByteWidth;
 
     for (vpos = descent + ascent; --vpos >= 0;) {
old mode 100755 (executable)
new mode 100644 (file)
index 32f9856..34eeeb7
@@ -56,7 +56,7 @@ pcfError(const char* message, ...)
     vfprintf(stderr, message, args);
     va_end(args);
 }
-                              
+
 /* Read PCF font files */
 
 static void pcfUnloadFont ( FontPtr pFont );
@@ -138,7 +138,8 @@ pcfReadTOC(FontFilePtr file, int *countp)
     }
     tables = malloc(count * sizeof(PCFTableRec));
     if (!tables) {
-      pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec));
+       pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n",
+                count, (int) sizeof(PCFTableRec));
        return (PCFTablePtr) NULL;
     }
     for (i = 0; i < count; i++) {
@@ -197,7 +198,7 @@ pcfGetCompressedMetric(FontFilePtr file, CARD32 format, xCharInfo *metric)
  * in the font file
  */
 static Bool
-pcfSeekToType(FontFilePtr file, PCFTablePtr tables, int ntables, 
+pcfSeekToType(FontFilePtr file, PCFTablePtr tables, int ntables,
              CARD32 type, CARD32 *formatp, CARD32 *sizep)
 {
     int         i;
@@ -228,14 +229,14 @@ pcfHasType (PCFTablePtr tables, int ntables, CARD32 type)
 }
 
 /*
- * pcfGetProperties 
+ * pcfGetProperties
  *
  * Reads the font properties from the font file, filling in the FontInfo rec
  * supplied.  Used by by both ReadFont and ReadFontInfo routines.
  */
 
 static Bool
-pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, 
+pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file,
                 PCFTablePtr tables, int ntables)
 {
     FontPropPtr props = 0;
@@ -262,22 +263,24 @@ pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file,
     if (IS_EOF(file)) goto Bail;
     props = malloc(nprops * sizeof(FontPropRec));
     if (!props) {
-      pcfError("pcfGetProperties(): Couldn't allocate props (%d*%d)\n", nprops, sizeof(FontPropRec));
+       pcfError("pcfGetProperties(): Couldn't allocate props (%d*%d)\n",
+              nprops, (int) sizeof(FontPropRec));
        goto Bail;
     }
     isStringProp = malloc(nprops * sizeof(char));
     if (!isStringProp) {
-      pcfError("pcfGetProperties(): Couldn't allocate isStringProp (%d*%d)\n", nprops, sizeof(char));
+       pcfError("pcfGetProperties(): Couldn't allocate isStringProp (%d*%d)\n",
+              nprops, (int) sizeof(char));
        goto Bail;
     }
     for (i = 0; i < nprops; i++) {
        props[i].name = pcfGetINT32(file, format);
        isStringProp[i] = pcfGetINT8(file, format);
        props[i].value = pcfGetINT32(file, format);
-       if (props[i].name < 0 
+       if (props[i].name < 0
            || (isStringProp[i] != 0 && isStringProp[i] != 1)
            || (isStringProp[i] && props[i].value < 0)) {
-           pcfError("pcfGetProperties(): invalid file format %d %d %d\n",
+           pcfError("pcfGetProperties(): invalid file format %ld %d %ld\n",
                     props[i].name, isStringProp[i], props[i].value);
            goto Bail;
        }
@@ -334,7 +337,7 @@ Bail:
  */
 
 static Bool
-pcfGetAccel(FontInfoPtr pFontInfo, FontFilePtr file, 
+pcfGetAccel(FontInfoPtr pFontInfo, FontFilePtr file,
            PCFTablePtr tables, int ntables, CARD32 type)
 {
     CARD32      format;
@@ -345,7 +348,7 @@ pcfGetAccel(FontInfoPtr pFontInfo, FontFilePtr file,
        goto Bail;
     format = pcfGetLSB32(file);
     if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) &&
-       !PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) 
+       !PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS))
     {
        goto Bail;
     }
@@ -382,7 +385,7 @@ Bail:
 }
 
 int
-pcfReadFont(FontPtr pFont, FontFilePtr file, 
+pcfReadFont(FontPtr pFont, FontFilePtr file,
            int bit, int byte, int glyph, int scan)
 {
     CARD32      format;
@@ -407,6 +410,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
 
     pFont->info.nprops = 0;
     pFont->info.props = 0;
+    pFont->info.isStringProp=0;
+
     if (!(tables = pcfReadTOC(file, &ntables)))
        goto Bail;
 
@@ -443,7 +448,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
     }
     metrics = malloc(nmetrics * sizeof(CharInfoRec));
     if (!metrics) {
-      pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec));
+       pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n",
+                nmetrics, (int) sizeof(CharInfoRec));
        goto Bail;
     }
     for (i = 0; i < nmetrics; i++)
@@ -454,7 +460,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
            if (!pcfGetCompressedMetric(file, format, &(metrics + i)->metrics))
                goto Bail;
        }
-    
+
     /* bitmaps */
 
     if (!pcfSeekToType(file, tables, ntables, PCF_BITMAPS, &format, &size))
@@ -469,7 +475,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
     /* nmetrics is already ok, so nbitmap also is */
     offsets = malloc(nbitmaps * sizeof(CARD32));
     if (!offsets) {
-      pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32));
+       pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n",
+                nbitmaps, (int) sizeof(CARD32));
        goto Bail;
     }
     for (i = 0; i < nbitmaps; i++) {
@@ -482,7 +489,7 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
        if (IS_EOF(file)) goto Bail;
        if (bitmapSizes[i] < 0) goto Bail;
     }
-    
+
     sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)];
     /* guard against completely empty font */
     bitmaps = malloc(sizebitmaps ? sizebitmaps : 1);
@@ -558,10 +565,11 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
            goto Bail;
        /* nmetrics already checked */
        ink_metrics = malloc(nink_metrics * sizeof(xCharInfo));
-      if (!ink_metrics) {
-          pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo));       
+       if (!ink_metrics) {
+            pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n",
+                    nink_metrics, (int) sizeof(xCharInfo));
            goto Bail;
-      }
+       }
        for (i = 0; i < nink_metrics; i++)
            if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) {
                if (!pcfGetMetric(file, format, ink_metrics + i))
@@ -595,10 +603,11 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
 
     encoding = calloc(NUM_SEGMENTS(nencoding), sizeof(CharInfoPtr*));
     if (!encoding) {
-      pcfError("pcfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr));    
+       pcfError("pcfReadFont(): Couldn't allocate encoding (%d*%d)\n",
+                nencoding, (int) sizeof(CharInfoPtr));
        goto Bail;
     }
-    
+
     pFont->info.allExist = TRUE;
     for (i = 0; i < nencoding; i++) {
        encodingOffset = pcfGetINT16(file, format);
@@ -624,7 +633,8 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
 
     bitmapFont = malloc(sizeof *bitmapFont);
     if (!bitmapFont) {
-      pcfError("pcfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont);
+       pcfError("pcfReadFont(): Couldn't allocate bitmapFont (%d)\n",
+                (int) sizeof *bitmapFont);
        goto Bail;
     }
 
old mode 100755 (executable)
new mode 100644 (file)
index 3ac07b3..0874c4b
@@ -236,7 +236,8 @@ pcfWriteFont(FontPtr pFont, FontFilePtr file)
     }
     offsetProps = malloc(pFont->info.nprops * sizeof(FontPropRec));
     if (!offsetProps) {
-      pcfError("pcfWriteFont(): Couldn't allocate offsetProps (%d*%d)", pFont->info.nprops, sizeof(FontPropRec));
+       pcfError("pcfWriteFont(): Couldn't allocate offsetProps (%d*%d)",
+                pFont->info.nprops, (int) sizeof(FontPropRec));
        return AllocError;
     }
     prop_string_size = 0;
@@ -430,8 +431,8 @@ pcfWriteFont(FontPtr pFont, FontFilePtr file)
            pcfPutINT16(file, format, pFont->info.defaultCh);
            for (i = 0; i < nencodings; i++) {
                if (ACCESSENCODING(bitmapFont->encoding,i))
-                   pcfPutINT16(file, format, 
-                                ACCESSENCODING(bitmapFont->encoding, i) - 
+                   pcfPutINT16(file, format,
+                                ACCESSENCODING(bitmapFont->encoding, i) -
                                   bitmapFont->metrics);
                else
                    pcfPutINT16(file, format, 0xFFFF);
old mode 100755 (executable)
new mode 100644 (file)
index d003cc5..da362c8
@@ -60,7 +60,7 @@ from The Open Group.
 
 #include <stdarg.h>
 
-static void
+static void _X_ATTRIBUTE_PRINTF(1, 2)
 snfError(const char* message, ...)
 {
     va_list args;
@@ -71,7 +71,7 @@ snfError(const char* message, ...)
     vfprintf(stderr, message, args);
     va_end(args);
 }
-              
+
 static void snfUnloadFont(FontPtr pFont);
 
 static int
@@ -211,7 +211,7 @@ SnfGetFormat (int *bit, int *byte, int *glyph, int *scan)
 }
 
 int
-snfReadFont(FontPtr pFont, FontFilePtr file, 
+snfReadFont(FontPtr pFont, FontFilePtr file,
            int bit, int byte, int glyph, int scan)
 {
     snfFontInfoRec fi;
@@ -239,7 +239,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
     /*
      * we'll allocate one chunk of memory and split it among the various parts
      * of the font:
-     * 
+     *
      * BitmapFontRec CharInfoRec's Glyphs Encoding DIX Properties Ink CharInfoRec's
      *
      * If the glyphpad is not the same as the font file, then the glyphs
@@ -253,7 +253,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
     metrics_off = bytestoalloc;
     bytestoalloc += num_chars * sizeof(CharInfoRec);   /* metrics */
     encoding_off = bytestoalloc;
-    bytestoalloc += NUM_SEGMENTS(num_chars) * sizeof(CharInfoPtr**);   
+    bytestoalloc += NUM_SEGMENTS(num_chars) * sizeof(CharInfoPtr**);
                                                 /* encoding */
     props_off = bytestoalloc;
     bytestoalloc += fi.nProps * sizeof(FontPropRec);   /* props */
@@ -299,7 +299,7 @@ snfReadFont(FontPtr pFont, FontFilePtr file,
      */
 
     ret = Successful;
-    memset(bitmapFont->encoding, 0, 
+    memset(bitmapFont->encoding, 0,
            NUM_SEGMENTS(num_chars)*sizeof(CharInfoPtr*));
     for (i = 0; ret == Successful && i < num_chars; i++) {
        ret = snfReadCharInfo(file, &bitmapFont->metrics[i], bitmaps);
@@ -454,12 +454,14 @@ snfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file)
 
     pFontInfo->props = malloc(fi.nProps * sizeof(FontPropRec));
     if (!pFontInfo->props) {
-      snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n", fi.nProps, sizeof(FontPropRec));
+       snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n",
+                fi.nProps, (int) sizeof(FontPropRec));
        return AllocError;
     }
     pFontInfo->isStringProp = malloc(fi.nProps * sizeof(char));
     if (!pFontInfo->isStringProp) {
-      snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n", fi.nProps, sizeof(char));
+       snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n",
+                fi.nProps, (int) sizeof(char));
        free(pFontInfo->props);
        return AllocError;
     }
old mode 100755 (executable)
new mode 100644 (file)
index 148bb1f..8f39ded
@@ -175,7 +175,7 @@ typedef struct _snfFontInfo {
 }           snfFontInfoRec;
 
 extern void SnfSetFormat ( int bit, int byte, int glyph, int scan );
-extern int snfReadFont ( FontPtr pFont, FontFilePtr file, 
+extern int snfReadFont ( FontPtr pFont, FontFilePtr file,
                         int bit, int byte, int glyph, int scan );
 extern int snfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
 
index aa4602f..84c68c4 100644 (file)
@@ -8,7 +8,7 @@ NAME=$2
 echo 'static const char file_'$NAME'[] = {'
 bdftopcf -p1 -u1 $1 |
       compress -b 12 |
-      od -b -v -w8 | 
+      od -b -v -w8 |
       sed 's/^[0-9]*\( *\)/\1\1\1\1/' |
       sed 's/\([0-9][0-9]*\)/'"'"'\\\1'"'"',/g'
 echo '};'
old mode 100755 (executable)
new mode 100644 (file)
index 418bfe9..75dff8d
@@ -16,7 +16,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
@@ -36,7 +36,7 @@ typedef struct _BuiltinFile {
 } BuiltinFileRec, *BuiltinFilePtr;
 
 typedef struct _BuiltinDir {
-    char       *file_name;
+    const char *file_name;
     char       *font_name;
 } BuiltinDirRec, *BuiltinDirPtr;
 
index bf351b1..490e7e3 100644 (file)
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
@@ -194,7 +194,7 @@ BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
     }
     for (i = 0; i < builtin_alias_count; i++)
     {
-       if (!FontFileAddFontAlias (dir, 
+       if (!FontFileAddFontAlias (dir,
                                   (char *) builtin_alias[i].alias_name,
                                   (char *) builtin_alias[i].font_name))
        {
old mode 100755 (executable)
new mode 100644 (file)
index 5492539..3f657d9
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
@@ -83,7 +83,7 @@ static int
 BuiltinClose (BufFilePtr f, int unused)
 {
     BuiltinIOPtr    io = ((BuiltinIOPtr) f->private);
-    
+
     free (io);
     return 1;
 }
old mode 100755 (executable)
new mode 100644 (file)
index 9a9d7d2..3892178
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
old mode 100755 (executable)
new mode 100644 (file)
index 403dbb7..83905da
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
old mode 100755 (executable)
new mode 100644 (file)
index 4d10483..2be0053
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
old mode 100755 (executable)
new mode 100644 (file)
index 15c5e42..faf2e5d
@@ -86,7 +86,7 @@ _fs_init_fontinfo(FSFpePtr conn, FontInfoPtr pfi)
 }
 
 int
-_fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd, 
+_fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd,
                  FontInfoPtr pfi)
 {
     FontPropPtr dprop;
@@ -102,20 +102,20 @@ _fs_convert_props(fsPropInfo *pi, fsPropOffset *po, pointer pd,
 
     nprops = pfi->nprops = pi->num_offsets;
 
-    if (nprops < 0 
-       || nprops > SIZE_MAX/(sizeof(FontPropRec) + sizeof(char))) 
+    if (nprops < 0
+       || nprops > SIZE_MAX/(sizeof(FontPropRec) + sizeof(char)))
        return -1;
-          
+
     dprop = malloc(sizeof(FontPropRec) * nprops + sizeof (char) * nprops);
     if (!dprop)
        return -1;
-    
+
     is_str = (char *) (dprop + nprops);
     pfi->props = dprop;
     pfi->isStringProp = is_str;
 
     off_adr = (char *)po;
-    for (i = 0; i < nprops; i++, dprop++, is_str++) 
+    for (i = 0; i < nprops; i++, dprop++, is_str++)
     {
        memcpy(&local_off, off_adr, SIZEOF(fsPropOffset));
        dprop->name = MakeAtom(&pdc[local_off.name.position],
@@ -154,8 +154,8 @@ _fs_free_props (FontInfoPtr pfi)
 }
 
 int
-_fs_convert_lfwi_reply(FSFpePtr conn, FontInfoPtr pfi, 
-                      fsListFontsWithXInfoReply *fsrep, 
+_fs_convert_lfwi_reply(FSFpePtr conn, FontInfoPtr pfi,
+                      fsListFontsWithXInfoReply *fsrep,
                       fsPropInfo *pi, fsPropOffset *po, pointer pd)
 {
     fsUnpack_XFontInfoHeader(fsrep, pfi);
@@ -188,8 +188,8 @@ _fs_convert_lfwi_reply(FSFpePtr conn, FontInfoPtr pfi,
  */
 /* ARGSUSED */
 int
-fs_build_range(FontPtr pfont, Bool range_flag, unsigned int count, 
-              int item_size, unsigned char *data, int *nranges, 
+fs_build_range(FontPtr pfont, Bool range_flag, unsigned int count,
+              int item_size, unsigned char *data, int *nranges,
               fsRange **ranges)
 {
     FSFontDataPtr fsd = (FSFontDataPtr) (pfont->fpePrivate);
@@ -350,7 +350,7 @@ fs_build_range(FontPtr pfont, Bool range_flag, unsigned int count,
    requests needs to be cancelled. */
 
 void
-_fs_clean_aborted_loadglyphs(FontPtr pfont, int num_expected_ranges, 
+_fs_clean_aborted_loadglyphs(FontPtr pfont, int num_expected_ranges,
                             fsRange *expected_ranges)
 {
     register FSFontPtr fsfont;
@@ -396,8 +396,8 @@ _fs_clean_aborted_loadglyphs(FontPtr pfont, int num_expected_ranges,
 }
 
 static int
-_fs_get_glyphs(FontPtr pFont, unsigned long count, unsigned char *chars, 
-              FontEncoding charEncoding, 
+_fs_get_glyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
+              FontEncoding charEncoding,
               unsigned long *glyphCount, /* RETURN */
               CharInfoPtr *glyphs)       /* RETURN  */
 {
@@ -508,8 +508,8 @@ _fs_get_glyphs(FontPtr pFont, unsigned long count, unsigned char *chars,
 
 
 static int
-_fs_get_metrics(FontPtr pFont, unsigned long count, unsigned char *chars, 
-               FontEncoding charEncoding, 
+_fs_get_metrics(FontPtr pFont, unsigned long count, unsigned char *chars,
+               FontEncoding charEncoding,
                unsigned long *glyphCount, /* RETURN */
                xCharInfo **glyphs)        /* RETURN */
 {
@@ -620,15 +620,15 @@ _fs_unload_font(FontPtr pfont)
        fsdata->glyphs = glyphs->next;
        free (glyphs);
     }
-    
+
     /* XXX we may get called after the resource DB has been cleaned out */
     if (find_old_font(fsd->fontid))
        DeleteFontClientID (fsd->fontid);
-    
+
     _fs_free_props (&pfont->info);
-    
+
     free(fsdata);
-           
+
     DestroyFontRec(pfont);
 }
 
@@ -656,11 +656,11 @@ fs_create_font (FontPathElementPtr  fpe,
     fsd = (FSFontDataPtr) (fsfont + 1);
     bzero((char *) fsfont, sizeof(FSFontRec));
     bzero((char *) fsd, sizeof(FSFontDataRec));
-    
+
     pfont->fpe = fpe;
     pfont->fontPrivate = (pointer) fsfont;
     pfont->fpePrivate = (pointer) fsd;
-    
+
     /* These font components will be needed in packGlyphs */
     CheckFSFormat(format, BitmapFormatMaskBit |
                  BitmapFormatMaskByte |
@@ -676,17 +676,17 @@ fs_create_font (FontPathElementPtr  fpe,
     pfont->byte = byte;
     pfont->scan = scan;
     pfont->glyph = glyph;
-    
+
     pfont->info.nprops = 0;
     pfont->info.props = 0;
     pfont->info.isStringProp = 0;
-    
+
     /* set font function pointers */
     pfont->get_glyphs = _fs_get_glyphs;
     pfont->get_metrics = _fs_get_metrics;
     pfont->unload_font = _fs_unload_font;
     pfont->unload_glyphs = NULL;
-    
+
     /* set the FPE private information */
     fsd->format = format;
     fsd->fmask = fmask;
@@ -694,9 +694,9 @@ fs_create_font (FontPathElementPtr  fpe,
     memcpy (fsd->name, name, namelen);
     fsd->name[namelen] = '\0';
     fsd->fontid = GetNewFontClientID ();
-    
+
     /* save the ID */
-    if (!StoreFontClientFont(pfont, fsd->fontid)) 
+    if (!StoreFontClientFont(pfont, fsd->fontid))
     {
        free (fsfont);
        DestroyFontRec (pfont);
old mode 100755 (executable)
new mode 100644 (file)
index b02b0b7..a445144
@@ -84,7 +84,7 @@ in this Software without prior written authorization from The Open Group.
 #define MIN(a,b)    ((a)<(b)?(a):(b))
 #endif
 #define TimeCmp(a,c,b) ((int) ((a) - (b)) c 0)
-    
+
 #define NONZEROMETRICS(pci) ((pci)->leftSideBearing || \
                             (pci)->rightSideBearing || \
                             (pci)->ascent || \
@@ -95,17 +95,17 @@ extern void ErrorF(const char *f, ...);
 
 static int fs_read_glyphs ( FontPathElementPtr fpe, FSBlockDataPtr blockrec );
 static int fs_read_list ( FontPathElementPtr fpe, FSBlockDataPtr blockrec );
-static int fs_read_list_info ( FontPathElementPtr fpe, 
+static int fs_read_list_info ( FontPathElementPtr fpe,
                               FSBlockDataPtr blockrec );
 
 extern fd_set _fs_fd_mask;
 
-static void fs_block_handler ( pointer data, OSTimePtr wt, 
+static void fs_block_handler ( pointer data, OSTimePtr wt,
                               pointer LastSelectMask );
 static int fs_wakeup ( FontPathElementPtr fpe, unsigned long *mask );
 
 /*
- * List of all FPEs 
+ * List of all FPEs
  */
 static FSFpePtr fs_fpes;
 /*
@@ -114,7 +114,7 @@ static FSFpePtr fs_fpes;
 static CARD32  fs_blockState;
 
 static int _fs_restart_connection ( FSFpePtr conn );
-static void fs_send_query_bitmaps ( FontPathElementPtr fpe, 
+static void fs_send_query_bitmaps ( FontPathElementPtr fpe,
                                   FSBlockDataPtr blockrec );
 static int fs_send_close_font ( FontPathElementPtr fpe, Font id );
 static void fs_client_died ( pointer client, FontPathElementPtr fpe );
@@ -240,7 +240,7 @@ _fs_client_resolution(FSFpePtr conn)
     }
 }
 
-/* 
+/*
  * close font server and remove any state associated with
  * this connection - this includes any client records.
  */
@@ -251,8 +251,8 @@ fs_close_conn(FSFpePtr conn)
     FSClientPtr        client, nclient;
 
     _fs_close_server (conn);
-    
-    for (client = conn->clients; client; client = nclient) 
+
+    for (client = conn->clients; client; client = nclient)
     {
        nclient = client->next;
        free (client);
@@ -308,7 +308,7 @@ fs_init_fpe(FontPathElementPtr fpe)
                err = Successful;
        }
     }
-    
+
     if (err == Successful)
     {
 #ifdef NCD
@@ -348,7 +348,7 @@ static int
 fs_free_fpe(FontPathElementPtr fpe)
 {
     FSFpePtr    conn = (FSFpePtr) fpe->private, *prev;
-    
+
     /* unhook from chain of all font servers */
     for (prev = &fs_fpes; *prev; prev = &(*prev)->next)
     {
@@ -410,7 +410,7 @@ fs_new_block_rec(FontPathElementPtr fpe, pointer client, int type)
     blockrec->type = type;
     blockrec->depending = 0;
     blockrec->next = (FSBlockDataPtr) 0;
-    
+
     /* stick it on the end of the list (since its expected last) */
     for (prev = &conn->blockedRequests; *prev; prev = &(*prev)->next)
        ;
@@ -423,7 +423,7 @@ static void
 _fs_set_pending_reply (FSFpePtr conn)
 {
     FSBlockDataPtr  blockrec;
-    
+
     for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next)
        if (blockrec->errcode == StillWorking)
            break;
@@ -442,7 +442,7 @@ _fs_remove_block_rec(FSFpePtr conn, FSBlockDataPtr blockrec)
     FSBlockDataPtr *prev;
 
     for (prev = &conn->blockedRequests; *prev; prev = &(*prev)->next)
-       if (*prev == blockrec) 
+       if (*prev == blockrec)
        {
            *prev = blockrec->next;
            break;
@@ -461,7 +461,7 @@ static void
 _fs_signal_clients_depending(FSClientsDependingPtr *clients_depending)
 {
     FSClientsDependingPtr p;
-    
+
     while ((p = *clients_depending))
     {
        *clients_depending = p->next;
@@ -474,14 +474,14 @@ static int
 _fs_add_clients_depending(FSClientsDependingPtr *clients_depending, pointer client)
 {
     FSClientsDependingPtr   new, cd;
-    
-    for (; (cd = *clients_depending); 
+
+    for (; (cd = *clients_depending);
         clients_depending = &(*clients_depending)->next)
     {
-       if (cd->client == client) 
+       if (cd->client == client)
            return Suspended;
     }
-    
+
     new = malloc (sizeof (FSClientsDependingRec));
     if (!new)
        return BadAlloc;
@@ -503,17 +503,17 @@ _fs_clean_aborted_blockrec(FSFpePtr conn, FSBlockDataPtr blockrec)
     switch(blockrec->type) {
     case FS_OPEN_FONT: {
        FSBlockedFontPtr bfont = (FSBlockedFontPtr)blockrec->data;
-       
+
        fs_cleanup_bfont (bfont);
        _fs_signal_clients_depending(&bfont->clients_depending);
        break;
     }
     case FS_LOAD_GLYPHS: {
        FSBlockedGlyphPtr bglyph = (FSBlockedGlyphPtr)blockrec->data;
-       
+
        _fs_clean_aborted_loadglyphs(bglyph->pfont,
                                     bglyph->num_expected_ranges,
-                                    bglyph->expected_ranges); 
+                                    bglyph->expected_ranges);
        _fs_signal_clients_depending(&bglyph->clients_depending);
        break;
     }
@@ -550,12 +550,12 @@ fs_cleanup_bfont (FSBlockedFontPtr bfont)
     if (bfont->pfont)
     {
        fsd = (FSFontDataRec *) bfont->pfont->fpePrivate;
-    
+
        /* make sure the FS knows we choked on it */
        fs_send_close_font(bfont->pfont->fpe, bfont->fontid);
-       
+
        /*
-        * Either unload the font if it's being opened for 
+        * Either unload the font if it's being opened for
         * the first time, or smash the generation field to
         * mark this font as an orphan
         */
@@ -590,14 +590,14 @@ fs_get_reply (FSFpePtr conn, int *error)
        *error = FSIO_BLOCK;
        return 0;
     }
-    
+
     ret = _fs_start_read (conn, sizeof (fsGenericReply), &buf);
     if (ret != FSIO_READY)
     {
        *error = FSIO_BLOCK;
        return 0;
     }
-    
+
     rep = (fsGenericReply *) buf;
 
     ret = _fs_start_read (conn, rep->length << 2, &buf);
@@ -608,7 +608,7 @@ fs_get_reply (FSFpePtr conn, int *error)
     }
 
     *error = FSIO_READY;
-    
+
     return (fsGenericReply *) buf;
 }
 
@@ -616,7 +616,7 @@ static Bool
 fs_reply_ready (FSFpePtr conn)
 {
     fsGenericReply  *rep;
-    
+
     if (conn->fs_fd == -1 || !FD_ISSET (conn->fs_fd, &_fs_fd_mask))
        return FALSE;
     if (fs_data_read (conn) < sizeof (fsGenericReply))
@@ -651,10 +651,10 @@ static int
 fs_await_reply (FSFpePtr conn)
 {
     int                    ret;
-    
+
     if (conn->blockState & FS_COMPLETE_REPLY)
        return FSIO_READY;
-    
+
     while (!fs_get_reply (conn, &ret))
     {
        if (ret != FSIO_BLOCK)
@@ -691,7 +691,7 @@ fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
        fs_cleanup_bfont (bfont);
        return BadFontName;
     }
-          
+
     /* If we're not reopening a font and FS detected a duplicate font
        open request, replace our reference to the new font with a
        reference to an existing font (possibly one not finished
@@ -701,10 +701,10 @@ fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
        if we we decide (in fs_read_query_info()) that we don't like what
        we got. */
 
-    if (rep->otherid && !(bfont->flags & FontReopen)) 
+    if (rep->otherid && !(bfont->flags & FontReopen))
     {
        fs_cleanup_bfont (bfont);
-       
+
        /* Find old font if we're completely done getting it from server. */
        bfont->pfont = find_old_font(rep->otherid);
        bfont->freeFont = FALSE;
@@ -715,12 +715,12 @@ fs_read_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
         */
        for (blockOrig = conn->blockedRequests;
                blockOrig;
-               blockOrig = blockOrig->next) 
+               blockOrig = blockOrig->next)
        {
-           if (blockOrig != blockrec && blockOrig->type == FS_OPEN_FONT) 
+           if (blockOrig != blockrec && blockOrig->type == FS_OPEN_FONT)
            {
                origBfont = (FSBlockedFontPtr) blockOrig->data;
-               if (origBfont->fontid == rep->otherid) 
+               if (origBfont->fontid == rep->otherid)
                {
                    blockrec->depending = blockOrig->depending;
                    blockOrig->depending = blockrec;
@@ -757,7 +757,7 @@ static Bool
 fs_fonts_match (FontInfoPtr pInfo1, FontInfoPtr pInfo2)
 {
     int            i;
-    
+
     if (pInfo1->firstCol != pInfo2->firstCol ||
        pInfo1->lastCol != pInfo2->lastCol ||
        pInfo1->firstRow != pInfo2->firstRow ||
@@ -833,7 +833,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
        fs_cleanup_bfont (bfont);
        return BadFontName;
     }
-       
+
     /* If this is a reopen, accumulate the query info into a dummy
        font and compare to our original data. */
     if (bfont->flags & FontReopen)
@@ -843,27 +843,27 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 
     buf = (char *) rep;
     buf += SIZEOF(fsQueryXInfoReply);
-    
+
     /* move the data over */
     fsUnpack_XFontInfoHeader(rep, pInfo);
-    
+
     /* compute accelerators */
     _fs_init_fontinfo(conn, pInfo);
 
     /* Compute offsets into the reply */
     pi = (fsPropInfo *) buf;
     buf += SIZEOF (fsPropInfo);
-    
+
     po = (fsPropOffset *) buf;
     buf += pi->num_offsets * SIZEOF(fsPropOffset);
 
     pd = (pointer) buf;
     buf += pi->data_len;
-    
+
     /* convert the properties and step over the reply */
     ret = _fs_convert_props(pi, po, pd, pInfo);
     _fs_done_read (conn, rep->length << 2);
-    
+
     if (ret == -1)
     {
        fs_cleanup_bfont (bfont);
@@ -889,7 +889,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
            err = BadFontName;
        }
        _fs_free_props (pInfo);
-       
+
        return err;
     }
 
@@ -904,14 +904,14 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
      * Figure out if the whole font should get loaded right now.
      */
     if (glyphCachingMode == CACHING_OFF ||
-       (glyphCachingMode == CACHE_16_BIT_GLYPHS 
+       (glyphCachingMode == CACHE_16_BIT_GLYPHS
         && !bfont->pfont->info.lastRow))
     {
        bfont->flags |= FontLoadAll;
     }
-    
+
     /*
-     * Ready to send the query bitmaps; the terminal font bit has 
+     * Ready to send the query bitmaps; the terminal font bit has
      * been computed and glyphCaching has been considered
      */
     if (bfont->flags & FontLoadBitmaps)
@@ -927,7 +927,7 @@ fs_read_query_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
      */
     blockrec->sequenceNumber = bfont->queryExtentsSequence;
     conn->blockedReplyTime = GetTimeInMillis () + FontServerRequestTimeout;
-    
+
     return StillWorking;
 }
 
@@ -960,7 +960,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
        fs_cleanup_bfont (bfont);
        return BadFontName;
     }
-       
+
     /* move the data over */
     /* need separate inkMetrics for fixed font server protocol version */
     numExtents = rep->num_extents;
@@ -972,7 +972,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     }
     ci = pCI = malloc(sizeof(CharInfoRec) * numInfos);
 
-    if (!pCI) 
+    if (!pCI)
     {
        _fs_done_read (conn, rep->length << 2);
        fs_cleanup_bfont(bfont);
@@ -987,10 +987,10 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     buf = (char *) rep;
     buf += SIZEOF (fsQueryXExtents16Reply);
     fsci = buf;
-    
+
     fsd->glyphs_to_get = 0;
     ci = fsfont->inkMetrics;
-    for (i = 0; i < numExtents; i++) 
+    for (i = 0; i < numExtents; i++)
     {
        memcpy(&fscilocal, fsci, SIZEOF(fsXCharInfo)); /* align it */
        _fs_convert_char_info(&fscilocal, &ci->metrics);
@@ -1030,7 +1030,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 
     /* Done with reply */
     _fs_done_read (conn, rep->length << 2);
-    
+
     /* build bitmap metrics, ImageRectMax style */
     if (haveInk)
     {
@@ -1098,7 +1098,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     }
     bfont->state = FS_GLYPHS_REPLY;
 
-    if (bfont->flags & FontLoadBitmaps) 
+    if (bfont->flags & FontLoadBitmaps)
     {
        /*
         * Reset the blockrec for the next reply
@@ -1129,7 +1129,7 @@ fs_do_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 
 #ifdef DEBUG
     fprintf (stderr, "fs_do_open_font state %s %s\n",
-            fs_open_states[bfont->state], 
+            fs_open_states[bfont->state],
             ((FSFontDataPtr) (bfont->pfont->fpePrivate))->name);
 #endif
     err = BadFontName;
@@ -1165,10 +1165,10 @@ fs_do_open_font(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 #ifdef DEBUG
     fprintf (stderr, "fs_do_open_font err %d\n", err);
 #endif
-    if (err != StillWorking) 
+    if (err != StillWorking)
     {
        bfont->state = FS_DONE_REPLY;   /* for _fs_load_glyphs() */
-       while ((blockrec = blockrec->depending)) 
+       while ((blockrec = blockrec->depending))
        {
            bfont = (FSBlockedFontPtr) blockrec->data;
            bfont->state = FS_DONE_REPLY;       /* for _fs_load_glyphs() */
@@ -1188,7 +1188,7 @@ void
 _fs_unmark_block (FSFpePtr conn, CARD32 mask)
 {
     FSFpePtr   c;
-    
+
     if (conn->blockState & mask)
     {
        conn->blockState &= ~mask;
@@ -1207,7 +1207,7 @@ fs_block_handler(pointer data, OSTimePtr wt, pointer LastSelectMask)
     int                soonest;
     FSFpePtr    conn;
 
-    XFD_ORSET((fd_set *)LastSelectMask, (fd_set *)LastSelectMask, 
+    XFD_ORSET((fd_set *)LastSelectMask, (fd_set *)LastSelectMask,
              &_fs_fd_mask);
     /*
      * Flush all pending output
@@ -1280,7 +1280,7 @@ fs_block_handler(pointer data, OSTimePtr wt, pointer LastSelectMask)
 static void
 fs_handle_unexpected(FSFpePtr conn, fsGenericReply *rep)
 {
-    if (rep->type == FS_Event && rep->data1 == KeepAlive) 
+    if (rep->type == FS_Event && rep->data1 == KeepAlive)
     {
        fsNoopReq   req;
 
@@ -1302,27 +1302,27 @@ fs_read_reply (FontPathElementPtr fpe, pointer client)
     int                    ret;
     int                    err;
     fsGenericReply  *rep;
-    
+
     if ((rep = fs_get_reply (conn, &ret)))
     {
        _fs_add_rep_log (conn, rep);
-       for (blockrec = conn->blockedRequests; 
-            blockrec; 
-            blockrec = blockrec->next) 
+       for (blockrec = conn->blockedRequests;
+            blockrec;
+            blockrec = blockrec->next)
        {
            if (blockrec->sequenceNumber == rep->sequenceNumber)
                break;
        }
        err = Successful;
-       if (!blockrec) 
+       if (!blockrec)
        {
            fs_handle_unexpected(conn, rep);
        }
        else
        {
-           /* 
-            * go read it, and if we're done, 
-            * wake up the appropriate client 
+           /*
+            * go read it, and if we're done,
+            * wake up the appropriate client
             */
            switch (blockrec->type) {
            case FS_OPEN_FONT:
@@ -1343,7 +1343,7 @@ fs_read_reply (FontPathElementPtr fpe, pointer client)
            err = blockrec->errcode;
            if (err != StillWorking)
            {
-               while (blockrec) 
+               while (blockrec)
                {
                    blockrec->errcode = err;
                    if (client != blockrec->client)
@@ -1366,7 +1366,7 @@ fs_wakeup(FontPathElementPtr fpe, unsigned long *mask)
     fd_set         *LastSelectMask = (fd_set *) mask;
     FSFpePtr       conn = (FSFpePtr) fpe->private;
 
-    /* 
+    /*
      * Don't continue if the fd is -1 (which will be true when the
      * font server terminates
      */
@@ -1400,7 +1400,7 @@ fs_wakeup(FontPathElementPtr fpe, unsigned long *mask)
                         blockrec->errcode,
                         blockrec->sequenceNumber,
                         fs_open_states[bfont->state],
-                        bfont->pfont ? 
+                        bfont->pfont ?
                         ((FSFontDataPtr) (bfont->pfont->fpePrivate))->name :
                         "<freed>");
                break;
@@ -1418,7 +1418,7 @@ fs_wakeup(FontPathElementPtr fpe, unsigned long *mask)
            }
        }
     }
-#endif                  
+#endif
     return FALSE;
 }
 
@@ -1446,7 +1446,7 @@ _fs_restart_connection(FSFpePtr conn)
     FSBlockDataPtr block;
 
     _fs_unmark_block (conn, FS_GIVE_UP);
-    while ((block = (FSBlockDataPtr) conn->blockedRequests)) 
+    while ((block = (FSBlockDataPtr) conn->blockedRequests))
     {
        if (block->errcode == StillWorking)
        {
@@ -1471,7 +1471,7 @@ _fs_giveup (FSFpePtr conn)
     fprintf (stderr, "give up on FS \"%s\"\n", conn->servername);
 #endif
     _fs_mark_block (conn, FS_GIVE_UP);
-    while ((block = (FSBlockDataPtr) conn->blockedRequests)) 
+    while ((block = (FSBlockDataPtr) conn->blockedRequests))
     {
        if (block->errcode == StillWorking)
        {
@@ -1494,7 +1494,7 @@ _fs_do_blocked (FSFpePtr conn)
     {
        _fs_giveup (conn);
     }
-    else 
+    else
     {
        if (conn->blockState & FS_BROKEN_CONNECTION)
        {
@@ -1516,9 +1516,9 @@ _fs_do_blocked (FSFpePtr conn)
  */
 /* ARGSUSED */
 static int
-fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags, 
-                 char *name, int namelen, 
-                 fsBitmapFormat format, fsBitmapFormatMask fmask, 
+fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
+                 char *name, int namelen,
+                 fsBitmapFormat format, fsBitmapFormatMask fmask,
                  XID id, FontPtr *ppfont)
 {
     FSFpePtr               conn = (FSFpePtr) fpe->private;
@@ -1534,10 +1534,10 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
 
     if (conn->blockState & FS_GIVE_UP)
        return BadFontName;
+
     if (namelen <= 0 || namelen > sizeof (buf) - 1)
        return BadFontName;
-    
+
     /*
      * Get the font structure put together, either by reusing
      * the existing one or creating a new one
@@ -1574,10 +1574,10 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
        font = fs_create_font (fpe, name, namelen, format, fmask);
        if (!font)
            return AllocError;
-       
+
        fsd = (FSFontDataPtr)font->fpePrivate;
     }
-    
+
     /* make a new block record, and add it to the end of the list */
     blockrec = fs_new_block_rec(font->fpe, client, FS_OPEN_FONT);
     if (!blockrec)
@@ -1586,7 +1586,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
            (*font->unload_font) (font);
        return AllocError;
     }
-    
+
     /*
      * Must check this before generating any protocol, otherwise we'll
      * mess up a reconnect in progress
@@ -1596,7 +1596,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
        _fs_pending_reply (conn);
        return Suspended;
     }
-       
+
     fsd->generation = conn->generation;
 
     bfont = (FSBlockedFontPtr) blockrec->data;
@@ -1626,17 +1626,17 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
     _fs_write_pad(conn, (char *) buf, namelen + 1);
 
     blockrec->sequenceNumber = conn->current_seq;
-    
+
     inforeq.reqType = FS_QueryXInfo;
     inforeq.pad = 0;
     inforeq.id = fsd->fontid;
     inforeq.length = SIZEOF(fsQueryXInfoReq) >> 2;
 
     bfont->queryInfoSequence = conn->current_seq + 1;
-    
+
     _fs_add_req_log(conn, FS_QueryXInfo);
     _fs_write(conn, (char *) &inforeq, SIZEOF(fsQueryXInfoReq));
-    
+
     if (!(bfont->flags & FontReopen))
     {
        extreq.reqType = FS_QueryXExtents16;
@@ -1644,15 +1644,15 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
        extreq.fid = fsd->fontid;
        extreq.num_ranges = 0;
        extreq.length = SIZEOF(fsQueryXExtents16Req) >> 2;
-       
+
        bfont->queryExtentsSequence = conn->current_seq + 1;
-       
+
        _fs_add_req_log(conn, FS_QueryXExtents16);
        _fs_write(conn, (char *) &extreq, SIZEOF(fsQueryXExtents16Req));
     }
-    
+
 #ifdef NCD
-    if (configData.ExtendedFontDiags) 
+    if (configData.ExtendedFontDiags)
     {
        memcpy(buf, name, MIN(256, namelen));
        buf[MIN(256, namelen)] = '\0';
@@ -1661,7 +1661,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
     }
 #endif
     _fs_prepare_for_reply (conn);
-    
+
     err = blockrec->errcode;
     if (bfont->flags & FontOpenSync)
     {
@@ -1701,16 +1701,16 @@ fs_send_query_bitmaps(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     bitreq.num_ranges = 0;
 
     bfont->queryBitmapsSequence = conn->current_seq + 1;
-    
+
     _fs_add_req_log(conn, FS_QueryXBitmaps16);
     _fs_write(conn, (char *) &bitreq, SIZEOF(fsQueryXBitmaps16Req));
 }
 
 /* ARGSUSED */
 static int
-fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags, 
-            char *name, int namelen, 
-            fsBitmapFormat format, fsBitmapFormatMask fmask, 
+fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
+            char *name, int namelen,
+            fsBitmapFormat format, fsBitmapFormatMask fmask,
             XID id, FontPtr *ppfont,
             char **alias, FontPtr non_cachable_font)
 {
@@ -1725,12 +1725,12 @@ fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
     *alias = (char *) 0;
     for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next)
     {
-       if (blockrec->type == FS_OPEN_FONT && blockrec->client == client) 
+       if (blockrec->type == FS_OPEN_FONT && blockrec->client == client)
        {
            err = blockrec->errcode;
            if (err == StillWorking)
                return Suspended;
-           
+
            bfont = (FSBlockedFontPtr) blockrec->data;
            if (err == Successful)
                *ppfont = bfont->pfont;
@@ -1871,21 +1871,21 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     }
 
     off_adr = (char *)ppbits;
-    
+
     allbits = fs_alloc_glyphs (pfont, rep->nbytes);
-    
+
     if (!allbits)
     {
        err = AllocError;
        goto bail;
     }
-    
+
 #ifdef DEBUG
     origallbits = allbits;
     fprintf (stderr, "Reading %d glyphs in %d bytes for %s\n",
             (int) rep->num_chars, (int) rep->nbytes, fsd->name);
 #endif
-    
+
     for (i = 0; i < rep->num_chars; i++)
     {
        memcpy(&local_off, off_adr, SIZEOF(fsOffset32));        /* align it */
@@ -1945,7 +1945,7 @@ bail:
 }
 
 static int
-fs_send_load_glyphs(pointer client, FontPtr pfont, 
+fs_send_load_glyphs(pointer client, FontPtr pfont,
                    int nranges, fsRange *ranges)
 {
     FontPathElementPtr     fpe = pfont->fpe;
@@ -1956,7 +1956,7 @@ fs_send_load_glyphs(pointer client, FontPtr pfont,
 
     if (conn->blockState & FS_GIVE_UP)
        return BadCharRange;
-    
+
     /* make a new block record, and add it to the end of the list */
     blockrec = fs_new_block_rec(fpe, client, FS_LOAD_GLYPHS);
     if (!blockrec)
@@ -1973,7 +1973,7 @@ fs_send_load_glyphs(pointer client, FontPtr pfont,
        _fs_pending_reply (conn);
        return Suspended;
     }
-    
+
     /* send the request */
     req.reqType = FS_QueryXBitmaps16;
     req.fid = ((FSFontDataPtr) pfont->fpePrivate)->fontid;
@@ -1989,7 +1989,7 @@ fs_send_load_glyphs(pointer client, FontPtr pfont,
     _fs_write(conn, (char *) &req, SIZEOF(fsQueryXBitmaps16Req));
 
     blockrec->sequenceNumber = conn->current_seq;
-    
+
     /* Send ranges to the server... pack into a char array by hand
        to avoid structure-packing portability problems and to
        handle swapping for version1 protocol */
@@ -2039,7 +2039,7 @@ extern pointer serverClient;      /* This could be any number that
                                   client values. */
 
 static int
-_fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag, 
+_fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag,
                unsigned int nchars, int item_size, unsigned char *data)
 {
     FSFpePtr               conn = (FSFpePtr) pfont->fpe->private;
@@ -2095,7 +2095,7 @@ _fs_load_glyphs(pointer client, FontPtr pfont, Bool range_flag,
                    err = blockrec->errcode;
                    if (err == StillWorking)
                        return Suspended;
-                   
+
                    _fs_signal_clients_depending(&bfont->clients_depending);
                    _fs_remove_block_rec(conn, blockrec);
                    if (err != Successful)
@@ -2246,7 +2246,7 @@ fs_read_list(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 
     err = Successful;
     /* copy data into FontPathRecord */
-    for (i = 0; i < rep->nFonts; i++) 
+    for (i = 0; i < rep->nFonts; i++)
     {
        length = *(unsigned char *)data++;
        err = AddFontNamesName(blist->names, data, length);
@@ -2259,7 +2259,7 @@ fs_read_list(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
 }
 
 static int
-fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern, 
+fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
                   int patlen, int maxnames, FontNamesPtr newnames)
 {
     FSFpePtr           conn = (FSFpePtr) fpe->private;
@@ -2269,7 +2269,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
 
     if (conn->blockState & FS_GIVE_UP)
        return BadFontName;
-    
+
     /* make a new block record, and add it to the end of the list */
     blockrec = fs_new_block_rec(fpe, client, FS_LIST_FONTS);
     if (!blockrec)
@@ -2282,7 +2282,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
        _fs_pending_reply (conn);
        return Suspended;
     }
-       
+
     _fs_client_access (conn, client, FALSE);
     _fs_client_resolution(conn);
 
@@ -2297,7 +2297,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
     _fs_write_pad(conn, (char *) pattern, patlen);
 
     blockrec->sequenceNumber = conn->current_seq;
-    
+
 #ifdef NCD
     if (configData.ExtendedFontDiags) {
        char        buf[256];
@@ -2314,7 +2314,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
 }
 
 static int
-fs_list_fonts(pointer client, FontPathElementPtr fpe, 
+fs_list_fonts(pointer client, FontPathElementPtr fpe,
              char *pattern, int patlen, int maxnames, FontNamesPtr newnames)
 {
     FSFpePtr           conn = (FSFpePtr) fpe->private;
@@ -2324,7 +2324,7 @@ fs_list_fonts(pointer client, FontPathElementPtr fpe,
     /* see if the result is already there */
     for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next)
     {
-       if (blockrec->type == FS_LIST_FONTS && blockrec->client == client) 
+       if (blockrec->type == FS_LIST_FONTS && blockrec->client == client)
        {
            err = blockrec->errcode;
            if (err == StillWorking)
@@ -2380,7 +2380,7 @@ fs_read_list_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     }
 
     buf = (char *) rep + SIZEOF (fsListFontsWithXInfoReply);
-    
+
     /*
      * The original FS implementation didn't match
      * the spec, version 1 was respecified to match the FS.
@@ -2417,18 +2417,18 @@ fs_read_list_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
     binfo->remaining = rep->nReplies;
 
     binfo->status = FS_LFWI_REPLY;
-    
+
     /* disable this font server until we've processed this response */
     _fs_unmark_block (conn, FS_COMPLETE_REPLY);
     FD_CLR(conn->fs_fd, &_fs_fd_mask);
-done:    
+done:
     _fs_done_read (conn, rep->length << 2);
     return err;
 }
 
 /* ARGSUSED */
 static int
-fs_start_list_with_info(pointer client, FontPathElementPtr fpe, 
+fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
                        char *pattern, int len, int maxnames, pointer *pdata)
 {
     FSFpePtr               conn = (FSFpePtr) fpe->private;
@@ -2443,7 +2443,7 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
     blockrec = fs_new_block_rec(fpe, client, FS_LIST_WITH_INFO);
     if (!blockrec)
        return AllocError;
-    
+
     binfo = (FSBlockedListInfoPtr) blockrec->data;
     bzero((char *) binfo, sizeof(FSBlockedListInfoRec));
     binfo->status = FS_LFWI_WAITING;
@@ -2453,7 +2453,7 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
        _fs_pending_reply (conn);
        return Suspended;
     }
-    
+
     _fs_client_access (conn, client, FALSE);
     _fs_client_resolution(conn);
 
@@ -2468,7 +2468,7 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
     (void) _fs_write_pad(conn, pattern, len);
 
     blockrec->sequenceNumber = conn->current_seq;
-    
+
 #ifdef NCD
     if (configData.ExtendedFontDiags) {
        char        buf[256];
@@ -2486,8 +2486,8 @@ fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
 
 /* ARGSUSED */
 static int
-fs_next_list_with_info(pointer client, FontPathElementPtr fpe, 
-                      char **namep, int *namelenp, 
+fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
+                      char **namep, int *namelenp,
                       FontInfoPtr *pFontInfo, int *numFonts,
                       pointer private)
 {
@@ -2498,7 +2498,7 @@ fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
 
     /* see if the result is already there */
     for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next)
-       if (blockrec->type == FS_LIST_WITH_INFO && blockrec->client == client) 
+       if (blockrec->type == FS_LIST_WITH_INFO && blockrec->client == client)
            break;
 
     if (!blockrec)
@@ -2513,7 +2513,7 @@ fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
     }
 
     binfo = (FSBlockedListInfoPtr) blockrec->data;
-    
+
     if (binfo->status == FS_LFWI_WAITING)
        return Suspended;
 
@@ -2521,12 +2521,12 @@ fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
     *namelenp = binfo->namelen;
     *pFontInfo = &binfo->info;
     *numFonts = binfo->remaining;
-    
+
     /* Restart reply processing from this font server */
     FD_SET(conn->fs_fd, &_fs_fd_mask);
     if (fs_reply_ready (conn))
        _fs_mark_block (conn, FS_COMPLETE_REPLY);
-    
+
     err = blockrec->errcode;
     switch (binfo->status) {
     case FS_LFWI_FINISHED:
@@ -2539,7 +2539,7 @@ fs_next_list_with_info(pointer client, FontPathElementPtr fpe,
        _fs_mark_block (conn, FS_PENDING_REPLY);
        break;
     }
-    
+
     return err;
 }
 
@@ -2574,12 +2574,12 @@ fs_client_died(pointer client, FontPathElementPtr fpe)
     for (blockrec = conn->blockedRequests; blockrec; blockrec = blockrec->next)
        if (blockrec->client == client)
            break;
-    
+
     if (!blockrec)
        return;
-    
+
     /* replace the client pointers in this block rec with the chained one */
-    if ((depending = blockrec->depending)) 
+    if ((depending = blockrec->depending))
     {
        blockrec->client = depending->client;
        blockrec->depending = depending->depending;
@@ -2681,7 +2681,7 @@ static int
 _fs_check_connect (FSFpePtr conn)
 {
     int            ret;
-    
+
     ret = _fs_poll_connect (conn->trans_conn, 0);
     switch (ret) {
     case FSIO_READY:
@@ -2715,7 +2715,7 @@ _fs_get_conn_setup (FSFpePtr conn, int *error, int *setup_len)
        *error = ret;
        return 0;
     }
-    
+
     setup = (fsConnSetup *) data;
     if (setup->major_version > FS_PROTOCOL)
     {
@@ -2789,7 +2789,7 @@ _fs_recv_conn_setup (FSFpePtr conn)
     int                        i, alt_len;
     int                        setup_len;
     char               *alt_save, *alt_names;
-    
+
     setup = _fs_get_conn_setup (conn, &ret, &setup_len);
     if (!setup)
        return ret;
@@ -2845,7 +2845,7 @@ _fs_open_server (FSFpePtr conn)
 {
     int            ret;
     char    *servername;
-    
+
     if (conn->alternate == 0)
        servername = conn->servername;
     else
@@ -2877,13 +2877,13 @@ _fs_send_init_packets (FSFpePtr conn)
     char                   *cat;
     char                   len;
     char                   *end;
-    int                            num_res;    
+    int                            num_res;
     FontResolutionPtr      res;
 
 #define        CATALOGUE_SEP   '+'
 
     res = GetClientResolutions(&num_res);
-    if (num_res) 
+    if (num_res)
     {
        srreq.reqType = FS_SetResolution;
        srreq.num_resolutions = num_res;
@@ -2902,14 +2902,14 @@ _fs_send_init_packets (FSFpePtr conn)
        catalogues = _fs_catalog_name (conn->alts[conn->alternate-1].name);
     if (!catalogues)
        catalogues = _fs_catalog_name (conn->servername);
-    
+
     if (!catalogues)
     {
        conn->has_catalogues = FALSE;
        return FSIO_READY;
     }
     conn->has_catalogues = TRUE;
-    
+
     /* turn cats into counted list */
     catalogues++;
 
@@ -2929,11 +2929,11 @@ _fs_send_init_packets (FSFpePtr conn)
     screq.reqType = FS_SetCatalogues;
     screq.num_catalogues = num_cats;
     screq.length = (SIZEOF(fsSetCataloguesReq) + clen + 3) >> 2;
-    
+
     _fs_add_req_log(conn, FS_SetCatalogues);
     if (_fs_write(conn, (char *) &screq, SIZEOF(fsSetCataloguesReq)) != FSIO_READY)
        return FSIO_ERROR;
-    
+
     while (*cat)
     {
        num_cats++;
@@ -2947,10 +2947,10 @@ _fs_send_init_packets (FSFpePtr conn)
            return FSIO_ERROR;
        cat = end;
     }
-    
+
     if (_fs_write (conn, "....", _fs_pad_length (clen) - clen) != FSIO_READY)
        return FSIO_ERROR;
-    
+
     return FSIO_READY;
 }
 
@@ -2958,7 +2958,7 @@ static int
 _fs_send_cat_sync (FSFpePtr conn)
 {
     fsListCataloguesReq            lcreq;
-    
+
     /*
      * now sync up with the font server, to see if an error was generated
      * by a bogus catalogue
@@ -2986,7 +2986,7 @@ _fs_recv_cat_sync (FSFpePtr conn)
     reply = fs_get_reply (conn, &err);
     if (!reply)
        return err;
-    
+
     ret = FSIO_READY;
     if (reply->type == FS_Error)
     {
@@ -3020,7 +3020,7 @@ static int
 _fs_do_setup_connection (FSFpePtr conn)
 {
     int            ret;
-    
+
     do
     {
 #ifdef DEBUG
@@ -3113,7 +3113,7 @@ static void
 _fs_check_reconnect (FSFpePtr conn)
 {
     int            ret;
-    
+
     ret = _fs_do_setup_connection (conn);
     switch (ret) {
     case FSIO_READY:
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index a6d0d1d..6435cf4
@@ -182,18 +182,18 @@ typedef struct _fs_reconnect {
     fsUnpack_XCharInfo((packet)->font_header_max_bounds, &(structure)->ink_maxbounds)
 
 extern void _fs_init_fontinfo ( FSFpePtr conn, FontInfoPtr pfi );
-extern int _fs_convert_props ( fsPropInfo *pi, fsPropOffset *po, pointer pd, 
+extern int _fs_convert_props ( fsPropInfo *pi, fsPropOffset *po, pointer pd,
                               FontInfoPtr pfi );
-extern int _fs_convert_lfwi_reply ( FSFpePtr conn, FontInfoPtr pfi, 
-                                   fsListFontsWithXInfoReply *fsrep, 
-                                   fsPropInfo *pi, fsPropOffset *po, 
+extern int _fs_convert_lfwi_reply ( FSFpePtr conn, FontInfoPtr pfi,
+                                   fsListFontsWithXInfoReply *fsrep,
+                                   fsPropInfo *pi, fsPropOffset *po,
                                    pointer pd );
-extern int fs_build_range ( FontPtr pfont, Bool range_flag, 
-                           unsigned int count, int item_size, 
-                           unsigned char *data, int *nranges, 
+extern int fs_build_range ( FontPtr pfont, Bool range_flag,
+                           unsigned int count, int item_size,
+                           unsigned char *data, int *nranges,
                            fsRange **ranges );
-extern void _fs_clean_aborted_loadglyphs ( FontPtr pfont, 
-                                          int num_expected_ranges, 
+extern void _fs_clean_aborted_loadglyphs ( FontPtr pfont,
+                                          int num_expected_ranges,
                                           fsRange *expected_ranges );
 extern void _fs_init_font ( FontPtr pfont );
 extern pointer fs_alloc_glyphs (FontPtr pFont, int size);
old mode 100755 (executable)
new mode 100644 (file)
index 63d3b4f..03a689f
@@ -72,7 +72,7 @@ _fs_resize (FSBufPtr buf, long size);
 
 static void
 _fs_downsize (FSBufPtr buf, long size);
-    
+
 int
 _fs_poll_connect (XtransConnInfo trans_conn, int timeout)
 {
@@ -149,7 +149,7 @@ _fs_fill (FSFpePtr conn)
     long    avail;
     long    bytes_read;
     Bool    waited = FALSE;
-    
+
     if (_fs_flush (conn) < 0)
        return FSIO_ERROR;
     /*
@@ -199,7 +199,7 @@ int
 _fs_start_read (FSFpePtr conn, long size, char **buf)
 {
     int            ret;
-    
+
     conn->inNeed = size;
     if (fs_inqueued(conn) < size)
     {
@@ -245,7 +245,7 @@ _fs_flush (FSFpePtr conn)
 {
     long    bytes_written;
     long    remain;
-    
+
     /* XXX - hack.  The right fix is to remember that the font server
        has gone away when we first discovered it. */
     if (conn->fs_fd < 0)
@@ -295,7 +295,7 @@ _fs_resize (FSBufPtr buf, long size)
     {
        if (buf->remove != buf->insert)
        {
-           memmove (buf->buf, 
+           memmove (buf->buf,
                     buf->buf + buf->remove,
                     buf->insert - buf->remove);
        }
@@ -345,7 +345,7 @@ _fs_io_init (FSFpePtr conn)
     if (!conn->outBuf.buf)
        return FALSE;
     conn->outBuf.size = FS_BUF_INC;
-    
+
     conn->inBuf.insert = conn->inBuf.remove = 0;
     conn->inBuf.buf = malloc (FS_BUF_INC);
     if (!conn->inBuf.buf)
@@ -355,7 +355,7 @@ _fs_io_init (FSFpePtr conn)
        return FALSE;
     }
     conn->inBuf.size = FS_BUF_INC;
-    
+
     return TRUE;
 }
 
@@ -369,7 +369,7 @@ _fs_io_fini (FSFpePtr conn)
 }
 
 static int
-_fs_do_write(FSFpePtr conn, char *data, long len, long size)
+_fs_do_write(FSFpePtr conn, const char *data, long len, long size)
 {
     if (size == 0) {
 #ifdef DEBUG
@@ -380,8 +380,8 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size)
 
     if (conn->fs_fd == -1)
        return FSIO_ERROR;
-    
-    while (conn->outBuf.insert + size > conn->outBuf.size) 
+
+    while (conn->outBuf.insert + size > conn->outBuf.size)
     {
        if (_fs_flush (conn) < 0)
            return FSIO_ERROR;
@@ -403,16 +403,16 @@ _fs_do_write(FSFpePtr conn, char *data, long len, long size)
  * Write the indicated bytes
  */
 int
-_fs_write (FSFpePtr conn, char *data, long len)
+_fs_write (FSFpePtr conn, const char *data, long len)
 {
     return _fs_do_write (conn, data, len, len);
 }
-    
+
 /*
  * Write the indicated bytes adding any appropriate pad
  */
 int
-_fs_write_pad(FSFpePtr conn, char *data, long len)
+_fs_write_pad(FSFpePtr conn, const char *data, long len)
 {
     return _fs_do_write (conn, data, len, len + padlength[len & 3]);
 }
old mode 100755 (executable)
new mode 100644 (file)
index bd0c621..2bb8e0b
@@ -110,9 +110,9 @@ typedef struct _fs_fpe_data {
     CARD32     brokenWriteTime;        /* time to retry broken write */
     CARD32     blockedConnectTime;     /* time to abort blocked connect */
     CARD32     brokenConnectionTime;   /* time to retry broken connection */
-    
+
     FSBlockDataPtr  blockedRequests;
-    
+
     struct _XtransConnInfo *trans_conn; /* transport connection object */
 }           FSFpeRec;
 
@@ -129,8 +129,8 @@ typedef struct _fs_fpe_data {
 #define FSIO_ERROR  -1
 
 extern Bool _fs_reopen_server ( FSFpePtr conn );
-extern int _fs_write ( FSFpePtr conn, char *data, long size );
-extern int _fs_write_pad ( FSFpePtr conn, char *data, long len );
+extern int _fs_write ( FSFpePtr conn, const char *data, long size );
+extern int _fs_write_pad ( FSFpePtr conn, const char *data, long len );
 extern int _fs_wait_for_readable ( FSFpePtr conn, int ms );
 extern long _fs_pad_length (long len);
 
old mode 100755 (executable)
new mode 100644 (file)
index c49f52e..c1f0ede
@@ -62,7 +62,7 @@ from The Open Group.
 # endif
 #endif
 #ifndef OPEN_MAX
-#if defined(SVR4) 
+#if defined(SVR4)
 #define OPEN_MAX 256
 #else
 #include <sys/param.h>
index c334c25..24fceee 100644 (file)
@@ -19,7 +19,7 @@
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 1b79c2b..c73f41f
@@ -101,14 +101,14 @@ FontFileEmptyBitmapSource(void)
 }
 
 int
-FontFileMatchBitmapSource (FontPathElementPtr fpe, 
-                          FontPtr *pFont, 
-                          int flags, 
-                          FontEntryPtr entry, 
-                          FontNamePtr zeroPat, 
-                          FontScalablePtr vals, 
-                          fsBitmapFormat format, 
-                          fsBitmapFormatMask fmask, 
+FontFileMatchBitmapSource (FontPathElementPtr fpe,
+                          FontPtr *pFont,
+                          int flags,
+                          FontEntryPtr entry,
+                          FontNamePtr zeroPat,
+                          FontScalablePtr vals,
+                          fsBitmapFormat format,
+                          fsBitmapFormatMask fmask,
                           Bool noSpecificSize)
 {
     int                        source;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index d927bd5..44d19f0
@@ -3,7 +3,7 @@
    intended for inclusion in X11 public releases. */
 
 /*
- * Copyright Â© 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -76,7 +76,7 @@ BufFilePushBZIP2 (BufFilePtr f)
                         BufBzip2FileClose);
 }
 
-static int 
+static int
 BufBzip2FileClose(BufFilePtr f, int flag)
 {
     xzip_buf *x = (xzip_buf *)f->private;
@@ -86,15 +86,15 @@ BufBzip2FileClose(BufFilePtr f, int flag)
     return 1;
 }
 
-/* here's the real work. 
+/* here's the real work.
    -- we need to put stuff in f.buffer, update f.left and f.bufp,
    then return the first byte (or BUFFILEEOF).
-   -- to do this, we need to get stuff into avail_in, and next_in, 
+   -- to do this, we need to get stuff into avail_in, and next_in,
    and call BZ2_bzDecompress appropriately.
    -- we may also need to add CRC maintenance - if BZ2_bzDecompress tells us
    BZ_STREAM_END, we then have 4bytes CRC and 4bytes length...
 */
-static int 
+static int
 BufBzip2FileFill (BufFilePtr f)
 {
     xzip_buf *x = (xzip_buf *)f->private;
@@ -148,7 +148,7 @@ BufBzip2FileFill (BufFilePtr f)
        }
     }
     f->bufp = x->b;
-    f->left = BUFFILESIZE - x->z.avail_out;  
+    f->left = BUFFILESIZE - x->z.avail_out;
 
     if (f->left >= 0) {
        f->left--;
@@ -159,7 +159,7 @@ BufBzip2FileFill (BufFilePtr f)
 }
 
 /* there should be a BufCommonSkip... */
-static int 
+static int
 BufBzip2FileSkip (BufFilePtr f, int c)
 {
     /* BufFileRawSkip returns the count unchanged.
old mode 100755 (executable)
new mode 100644 (file)
index 3a04a75..8029b28
@@ -60,7 +60,7 @@ CatalogueAddFPE (CataloguePtr cat, FontPathElementPtr fpe)
            cat->fpeAlloc = 16;
        else
            cat->fpeAlloc *= 2;
-       
+
        new = realloc(cat->fpeList, cat->fpeAlloc * sizeof(FontPathElementPtr));
        if (new == NULL)
            return AllocError;
@@ -251,7 +251,7 @@ static int
 CatalogueResetFPE (FontPathElementPtr fpe)
 {
     /* Always just tell the caller to close and re-open */
-    return FPEResetFailed;     
+    return FPEResetFailed;
 }
 
 static int
@@ -277,10 +277,10 @@ CatalogueFreeFPE (FontPathElementPtr fpe)
 }
 
 static int
-CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, 
-                  char *name, int namelen, 
+CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
+                  char *name, int namelen,
                   fsBitmapFormat format, fsBitmapFormatMask fmask,
-                  XID id, FontPtr *pFont, char **aliasName, 
+                  XID id, FontPtr *pFont, char **aliasName,
                   FontPtr non_cachable_font)
 {
     CataloguePtr cat = fpe->private;
@@ -300,7 +300,7 @@ CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
        if (status == Successful || status == FontNameAlias)
            return status;
     }
-           
+
     return BadFontName;
 }
 
@@ -314,7 +314,7 @@ CatalogueCloseFont (FontPathElementPtr fpe, FontPtr pFont)
 }
 
 static int
-CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat, 
+CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat,
                    int len, int max, FontNamesPtr names)
 {
     CataloguePtr cat = fpe->private;
@@ -335,8 +335,8 @@ CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat,
 }
 
 int
-FontFileStartListFonts(pointer client, FontPathElementPtr fpe, 
-                      char *pat, int len, int max, 
+FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
+                      char *pat, int len, int max,
                       pointer *privatep, int mark_aliases);
 
 typedef struct _LFWIData {
@@ -345,7 +345,7 @@ typedef struct _LFWIData {
 } LFWIDataRec, *LFWIDataPtr;
 
 static int
-CatalogueStartListFonts(pointer client, FontPathElementPtr fpe, 
+CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
                        char *pat, int len, int max, pointer *privatep,
                        int mark_aliases)
 {
@@ -381,16 +381,16 @@ CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
 }
 
 static int
-CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, 
-                               char *pat, int len, int max, 
+CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
+                               char *pat, int len, int max,
                                pointer *privatep)
 {
     return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 0);
 }
 
 static int
-CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe, 
-                             char **namep, int *namelenp, 
+CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
+                             char **namep, int *namelenp,
                              FontInfoPtr *pFontInfo,
                              int *numFonts, pointer private)
 {
@@ -419,15 +419,15 @@ CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
 }
 
 static int
-CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, 
-                                 char *pat, int len, int max, 
+CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
+                                 char *pat, int len, int max,
                                  pointer *privatep)
 {
     return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 1);
 }
 
 static int
-CatalogueListNextFontOrAlias(pointer client, FontPathElementPtr fpe, 
+CatalogueListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
                             char **namep, int *namelenp, char **resolvedp,
                             int *resolvedlenp, pointer private)
 {
old mode 100755 (executable)
new mode 100644 (file)
index b1fc37b..c050a44
@@ -44,7 +44,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization from The Open Group.
 
 */
-/* 
+/*
  * decompress - cat a compressed file
  */
 
@@ -93,11 +93,11 @@ static char_type magic_header[] = { "\037\235" };   /* 1F 9D */
 /*
  * the next two codes should not be changed lightly, as they must not
  * lie within the contiguous general code space.
- */ 
+ */
 #define FIRST  257     /* first free entry */
 #define        CLEAR   256     /* table clear output code */
 
-#define STACK_SIZE  8192
+#define STACK_SIZE  65300
 
 typedef struct _compressedFILE {
     BufFilePtr     file;
@@ -124,14 +124,6 @@ typedef struct _compressedFILE {
 } CompressedFile;
 
 
-static int hsize_table[] = {
-    5003,      /* 12 bits - 80% occupancy */
-    9001,      /* 13 bits - 91% occupancy */
-    18013,     /* 14 bits - 91% occupancy */
-    35023,     /* 15 bits - 94% occupancy */
-    69001      /* 16 bits - 95% occupancy */
-};
-
 static int BufCompressedClose ( BufFilePtr f, int doClose );
 static int BufCompressedFill ( BufFilePtr f );
 static code_int getcode ( CompressedFile *file );
@@ -142,7 +134,6 @@ BufFilePushCompressed (BufFilePtr f)
 {
     int                    code;
     int                    maxbits;
-    int                    hsize;
     CompressedFile  *file;
     int                    extra;
 
@@ -153,13 +144,12 @@ BufFilePushCompressed (BufFilePtr f)
     }
     code = BufFileGet (f);
     if (code == BUFFILEEOF) return 0;
-    
+
     maxbits = code & BIT_MASK;
-    if (maxbits > BITS || maxbits < 12)
+    if (maxbits > BITS || maxbits <= INIT_BITS)
        return 0;
-    hsize = hsize_table[maxbits - 12];
     extra = (1 << maxbits) * sizeof (char_type) +
-           hsize * sizeof (unsigned short);
+           (1 << maxbits) * sizeof (unsigned short);
     file = malloc (sizeof (CompressedFile) + extra);
     if (!file)
        return 0;
@@ -178,14 +168,12 @@ BufFilePushCompressed (BufFilePtr f)
        file->tab_suffix[code] = (char_type) code;
     }
     file->free_ent = ((file->block_compress) ? FIRST : 256 );
+    file->oldcode = -1;
     file->clear_flg = 0;
     file->offset = 0;
     file->size = 0;
     file->stackp = file->de_stack;
     bzero(file->buf, BITS);
-    file->finchar = file->oldcode = getcode (file);
-    if (file->oldcode != -1)
-       *file->stackp++ = file->finchar;
     return BufFileCreate ((char *) file,
                          BufCompressedFill,
                          0,
@@ -230,30 +218,37 @@ BufCompressedFill (BufFilePtr f)
        if (buf == bufend)
            break;
 
-       if (oldcode == -1)
-           break;
-
        code = getcode (file);
        if (code == -1)
            break;
-    
+
        if ( (code == CLEAR) && file->block_compress ) {
            for ( code = 255; code >= 0; code-- )
                file->tab_prefix[code] = 0;
            file->clear_flg = 1;
-           file->free_ent = FIRST - 1;
-           if ( (code = getcode (file)) == -1 )        /* O, untimely death! */
-               break;
+           file->free_ent = FIRST;
+           oldcode = -1;
+           continue;
        }
        incode = code;
        /*
         * Special case for KwKwK string.
         */
        if ( code >= file->free_ent ) {
+           if ( code > file->free_ent || oldcode == -1 ) {
+               /* Bad stream. */
+               return BUFFILEEOF;
+           }
            *stackp++ = finchar;
            code = oldcode;
        }
-    
+       /*
+        * The above condition ensures that code < free_ent.
+        * The construction of tab_prefixof in turn guarantees that
+        * each iteration decreases code and therefore stack usage is
+        * bound by 1 << BITS - 256.
+        */
+
        /*
         * Generate output characters in reverse order
         */
@@ -264,15 +259,15 @@ BufCompressedFill (BufFilePtr f)
        }
        finchar = file->tab_suffix[code];
        *stackp++ = finchar;
-    
+
        /*
         * Generate the new entry.
         */
-       if ( (code=file->free_ent) < file->maxmaxcode ) {
+       if ( (code=file->free_ent) < file->maxmaxcode && oldcode != -1) {
            file->tab_prefix[code] = (unsigned short)oldcode;
            file->tab_suffix[code] = finchar;
            file->free_ent = code+1;
-       } 
+       }
        /*
         * Remember previous code.
         */
@@ -380,7 +375,7 @@ static int
 BufCompressedSkip (BufFilePtr f, int bytes)
 {
     int                    c;
-    while (bytes--) 
+    while (bytes--)
     {
        c = BufFileGet(f);
        if (c == BUFFILEEOF)
@@ -395,7 +390,7 @@ main (int argc, char *argv[])
 {
     BufFilePtr     inputraw, input, output;
     int                    c;
-    
+
     inputraw = BufFileOpenRead (0);
     input = BufFilePushCompressed (inputraw);
     output = BufFileOpenWrite (1);
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index c8aff6f..0d34db9
@@ -90,7 +90,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
     strcat(dir_file, FontDirFile);
     file = fopen(dir_file, "rt");
     if (file) {
-#ifndef WIN32        
+#ifndef WIN32
        if (fstat (fileno(file), &statb) == -1)
 #else
        if (stat (dir_file, &statb) == -1)
@@ -135,7 +135,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
            FontFileAddFontFile (dir, font_name, file_name);
        }
        fclose(file);
-       
+
     } else if (errno != ENOENT) {
        return BadFontPath;
     }
@@ -188,7 +188,7 @@ FontFileDirectoryChanged(FontDirectoryPtr dir)
        return TRUE;
     return FALSE;
 }
-    
+
 /*
  * Make each of the file names an automatic alias for each of the files.
  */
@@ -212,7 +212,7 @@ AddFileNameAliases(FontDirectoryPtr dir)
        renderer = FontFileMatchRenderer (fileName);
        if (!renderer)
            continue;
-       
+
        len = strlen (fileName) - renderer->fileSuffixLen;
        if (len >= sizeof(copy))
            continue;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index e052bb3..97b2ba3
@@ -43,7 +43,7 @@ in this Software without prior written authorization from The Open Group.
 Bool
 FontFileInitTable (FontTablePtr table, int size)
 {
-    if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec))) 
+    if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec)))
        return FALSE;
     if (size)
     {
@@ -102,12 +102,12 @@ FontFileFreeTable (FontTablePtr table)
 }
 
 FontDirectoryPtr
-FontFileMakeDir(char *dirName, int size)
+FontFileMakeDir(const char *dirName, int size)
 {
     FontDirectoryPtr   dir;
     int                        dirlen;
     int                        needslash = 0;
-    char               *attrib;
+    const char         *attrib;
     int                        attriblen;
 
 #if !defined(WIN32)
@@ -279,7 +279,7 @@ FontFileSortDir(FontDirectoryPtr dir)
 #define isDigit(c)  (XK_0 <= (c) && (c) <= XK_9)
 
 static int
-SetupWildMatch(FontTablePtr table, FontNamePtr pat, 
+SetupWildMatch(FontTablePtr table, FontNamePtr pat,
               int *leftp, int *rightp, int *privatep)
 {
     int         nDashes;
@@ -438,7 +438,7 @@ FontFileSaveString (char *s)
 }
 
 FontEntryPtr
-FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat, 
+FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat,
                              FontScalablePtr vals)
 {
     int         i,
@@ -491,7 +491,7 @@ FontFileFindNameInDir(FontTablePtr table, FontNamePtr pat)
 }
 
 int
-FontFileFindNamesInScalableDir(FontTablePtr table, FontNamePtr pat, int max, 
+FontFileFindNamesInScalableDir(FontTablePtr table, FontNamePtr pat, int max,
                               FontNamesPtr names, FontScalablePtr vals,
                               int alias_behavior, int *newmax)
 {
@@ -578,7 +578,7 @@ FontFileFindNamesInScalableDir(FontTablePtr table, FontNamePtr pat, int max,
 }
 
 int
-FontFileFindNamesInDir(FontTablePtr table, FontNamePtr pat, 
+FontFileFindNamesInDir(FontTablePtr table, FontNamePtr pat,
                       int max, FontNamesPtr names)
 {
     return FontFileFindNamesInScalableDir(table, pat, max, names,
@@ -767,7 +767,7 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
                    extra->defaults.y = 75;
                }
             }
-            else 
+            else
             {
                extra->defaults.x = vals.x;
                extra->defaults.y = vals.y;
old mode 100755 (executable)
new mode 100644 (file)
index 7997785..4bdb495
@@ -48,7 +48,7 @@ font_encoding_find(const char *encoding_name, const char *filename)
 }
 
 unsigned
-font_encoding_recode(unsigned code, 
+font_encoding_recode(unsigned code,
                      FontEncPtr encoding, FontMapPtr mapping)
 {
     if(encoding != mapping->encoding) {
old mode 100755 (executable)
new mode 100644 (file)
index eb37a87..c55282b
@@ -62,9 +62,9 @@ CopyISOLatin1Lowered(char *dest, char *source, int length)
  * Map FPE functions to renderer functions
  */
 
-static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont, 
-                                 int flags, FontEntryPtr entry, 
-                                 fsBitmapFormat format, 
+static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+                                 int flags, FontEntryPtr entry,
+                                 fsBitmapFormat format,
                                  fsBitmapFormatMask fmask,
                                  FontPtr non_cachable_font);
 
@@ -119,14 +119,14 @@ FontFileResetFPE (FontPathElementPtr fpe)
     if (FontFileDirectoryChanged (dir))
     {
        /* can't do it, so tell the caller to close and re-open */
-       return FPEResetFailed;  
+       return FPEResetFailed;
     }
-    else 
+    else
     {
        if (dir->nonScalable.used > 0)
            if (!FontFileRegisterBitmapSource (fpe))
            {
-               return FPEResetFailed;  
+               return FPEResetFailed;
            }
         return Successful;
     }
@@ -141,7 +141,7 @@ FontFileFreeFPE (FontPathElementPtr fpe)
 }
 
 static int
-transfer_values_to_alias(char *entryname, int entrynamelength, 
+transfer_values_to_alias(char *entryname, int entrynamelength,
                         char *resolvedname,
                         char **aliasName, FontScalablePtr vals)
 {
@@ -253,10 +253,10 @@ transfer_values_to_alias(char *entryname, int entrynamelength,
 
 /* ARGSUSED */
 int
-FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, 
-                 char *name, int namelen, 
+FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
+                 char *name, int namelen,
                  fsBitmapFormat format, fsBitmapFormatMask fmask,
-                 XID id, FontPtr *pFont, char **aliasName, 
+                 XID id, FontPtr *pFont, char **aliasName,
                  FontPtr non_cachable_font)
 {
     FontDirectoryPtr   dir;
@@ -272,7 +272,7 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
     Bool               noSpecificSize;
     int                        nranges;
     fsRange            *ranges;
-    
+
     if (namelen >= MAXFONTNAMELEN)
        return AllocError;
     dir = (FontDirectoryPtr) fpe->private;
@@ -510,8 +510,8 @@ FontFileCloseFont (FontPathElementPtr fpe, FontPtr pFont)
 }
 
 static int
-FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont, 
-                      int flags, FontEntryPtr entry, 
+FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+                      int flags, FontEntryPtr entry,
                       fsBitmapFormat format, fsBitmapFormatMask fmask,
                       FontPtr non_cachable_font)
 {
@@ -528,7 +528,7 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
        return BadFontName;
     strcpy (fileName, dir->directory);
     strcat (fileName, bitmap->fileName);
-    ret = (*bitmap->renderer->OpenBitmap) 
+    ret = (*bitmap->renderer->OpenBitmap)
                        (fpe, pFont, flags, entry, fileName, format, fmask,
                         non_cachable_font);
     if (ret == Successful)
@@ -540,8 +540,8 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
 }
 
 int
-FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont, 
-                   int flags, FontEntryPtr entry, 
+FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
+                   int flags, FontEntryPtr entry,
                    fsBitmapFormat format, fsBitmapFormatMask fmask)
 {
     return FontFileOpenBitmapNCF (fpe, pFont, flags, entry, format, fmask,
@@ -549,7 +549,7 @@ FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
 }
 
 static int
-FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, 
+FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
                       FontEntryPtr entry)
 {
     FontBitmapEntryPtr bitmap;
@@ -570,8 +570,8 @@ FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
 }
 
 static void
-_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames, 
-                         FontNamePtr nameptr, char *zeroChars, 
+_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
+                         FontNamePtr nameptr, char *zeroChars,
                          FontScalablePtr vals, fsRange *ranges,
                          int nranges, int *max)
 {
@@ -687,8 +687,8 @@ _FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
 
 /* ARGSUSED */
 static int
-_FontFileListFonts (pointer client, FontPathElementPtr fpe, 
-                   char *pat, int len, int max, FontNamesPtr names, 
+_FontFileListFonts (pointer client, FontPathElementPtr fpe,
+                   char *pat, int len, int max, FontNamesPtr names,
                    int mark_aliases)
 {
     FontDirectoryPtr   dir;
@@ -794,15 +794,15 @@ typedef struct _LFWIData {
 } LFWIDataRec, *LFWIDataPtr;
 
 int
-FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat, 
+FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
                   int len, int max, FontNamesPtr names)
 {
     return _FontFileListFonts (client, fpe, pat, len, max, names, 0);
 }
 
 int
-FontFileStartListFonts(pointer client, FontPathElementPtr fpe, 
-                      char *pat, int len, int max, 
+FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
+                      char *pat, int len, int max,
                       pointer *privatep, int mark_aliases)
 {
     LFWIDataPtr        data;
@@ -832,8 +832,8 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
 
 
 int
-FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, 
-                              char *pat, int len, int max, 
+FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
+                              char *pat, int len, int max,
                               pointer *privatep)
 {
     return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 0);
@@ -841,8 +841,8 @@ FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
 
 /* ARGSUSED */
 static int
-FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe, 
-                            char **namep, int *namelenp, 
+FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
+                            char **namep, int *namelenp,
                             FontInfoPtr *pFontInfo)
 {
     FontDirectoryPtr   dir;
@@ -858,14 +858,14 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
     Bool               noSpecificSize;
     int                        nranges;
     fsRange            *ranges;
-    
+
     char               *name = *namep;
     int                        namelen = *namelenp;
-    
+
     if (namelen >= MAXFONTNAMELEN)
        return AllocError;
     dir = (FontDirectoryPtr) fpe->private;
-    
+
     /* Match non-scalable pattern */
     CopyISOLatin1Lowered (lowerName, name, namelen);
     lowerName[namelen] = '\0';
@@ -882,7 +882,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
         tmpName.length = strlen(lowerName);
        entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName);
     }
-    
+
     if (entry)
     {
        switch (entry->type) {
@@ -914,7 +914,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
     {
       ret = BadFontName;
     }
-    
+
     if (ret != BadFontName)
     {
        if (ranges) free(ranges);
@@ -945,7 +945,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
            tmpName.ndashes = entry->name.ndashes;
        }
     }
-    
+
     if (entry)
     {
        noSpecificSize = FALSE; /* TRUE breaks XLFD enhancements */
@@ -1001,7 +1001,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
                    vals.xlfdName = origName;
                    vals.ranges = ranges;
                    vals.nranges = nranges;
-                   
+
                    /* Make a new scaled instance */
                    if (strlen(dir->directory) + strlen(scalable->fileName) >=
                        sizeof(fileName)) {
@@ -1037,8 +1037,8 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
 }
 
 int
-FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe, 
-                            char **namep, int *namelenp, 
+FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
+                            char **namep, int *namelenp,
                             FontInfoPtr *pFontInfo,
                             int *numFonts, pointer private)
 {
@@ -1066,15 +1066,15 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
 }
 
 int
-FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, 
-                                char *pat, int len, int max, 
+FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
+                                char *pat, int len, int max,
                                 pointer *privatep)
 {
     return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 1);
 }
 
 int
-FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe, 
+FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
                            char **namep, int *namelenp, char **resolvedp,
                            int *resolvedlenp, pointer private)
 {
old mode 100755 (executable)
new mode 100644 (file)
index 55aca29..a21802f
@@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group.
 #include <math.h>
 
 Bool
-FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals, 
+FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
                           FontPtr pFont, char *bitmapName)
 {
     FontScalableEntryPtr    scalable;
@@ -75,7 +75,7 @@ FontFileSwitchStringsToBitmapPointers (FontDirectoryPtr dir)
     FontEntryPtr           nonScalable;
     FontScaledPtr          scaled;
     FontScalableExtraPtr    extra;
-    
+
     scalable = dir->scalable.entries;
     nonScalable = dir->nonScalable.entries;
     for (s = 0; s < dir->scalable.used; s++)
@@ -373,12 +373,12 @@ MatchScalable (FontScalablePtr a, FontScalablePtr b)
            a->ranges[i].max_char_low != b->ranges[i].max_char_low ||
            a->ranges[i].max_char_high != b->ranges[i].max_char_high)
                return FALSE;
+
     return TRUE;
 }
 
 FontScaledPtr
-FontFileFindScaledInstance (FontEntryPtr entry, FontScalablePtr vals, 
+FontFileFindScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
                            int noSpecificSize)
 {
     FontScalableEntryPtr    scalable;
old mode 100755 (executable)
new mode 100644 (file)
index 9fa3eed..84a4eaf
@@ -66,7 +66,7 @@ BufFilePushZIP (BufFilePtr f)
                       BufZipFileClose);
 }
 
-static int 
+static int
 BufZipFileClose(BufFilePtr f, int flag)
 {
   xzip_buf *x = (xzip_buf *)f->private;
@@ -76,16 +76,16 @@ BufZipFileClose(BufFilePtr f, int flag)
   return 1;
 }
 
-/* here's the real work. 
+/* here's the real work.
    -- we need to put stuff in f.buffer, update f.left and f.bufp,
       then return the first byte (or BUFFILEEOF).
-   -- to do this, we need to get stuff into avail_in, and next_in, 
+   -- to do this, we need to get stuff into avail_in, and next_in,
       and call inflate appropriately.
    -- we may also need to add CRC maintenance - if inflate tells us
       Z_STREAM_END, we then have 4bytes CRC and 4bytes length...
    gzio.c:gzread shows most of the mechanism.
    */
-static int 
+static int
 BufZipFileFill (BufFilePtr f)
 {
   xzip_buf *x = (xzip_buf *)f->private;
@@ -139,7 +139,7 @@ BufZipFileFill (BufFilePtr f)
     }
   }
   f->bufp = x->b;
-  f->left = BUFFILESIZE - x->z.avail_out;  
+  f->left = BUFFILESIZE - x->z.avail_out;
 
   if (f->left >= 0) {
     f->left--;
@@ -150,7 +150,7 @@ BufZipFileFill (BufFilePtr f)
 }
 
 /* there should be a BufCommonSkip... */
-static int 
+static int
 BufZipFileSkip (BufFilePtr f, int c)
 {
   /* BufFileRawSkip returns the count unchanged.
@@ -192,7 +192,7 @@ BufZipFileSkip (BufFilePtr f, int c)
 #define RESERVED     0xE0 /* bits 5..7: reserved */
 
 #define GET(f) do {c = BufFileGet(f); if (c == BUFFILEEOF) return c;} while(0)
-static int 
+static int
 BufCheckZipHeader(BufFilePtr f)
 {
   int c, flags;
index 1a63cb3..8d7229e 100644 (file)
@@ -55,7 +55,7 @@ FontFileRegisterFpeFunctions(void)
 #ifdef XFONT_FREETYPE
     FreeTypeRegisterFontFileFunctions();
 #endif
-    
+
     FontFileRegisterLocalFpeFunctions ();
     CatalogueRegisterLocalFpeFunctions ();
 }
old mode 100755 (executable)
new mode 100644 (file)
index a9e4bef..5091922
@@ -64,7 +64,7 @@ FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority)
     }
 
     for (i = 0; i < renderers.number; i++) {
-       if (!strcasecmp (renderers.renderers[i].renderer->fileSuffix, 
+       if (!strcasecmp (renderers.renderers[i].renderer->fileSuffix,
                          renderer->fileSuffix)) {
             if(renderers.renderers[i].priority >= priority) {
                 if(renderers.renderers[i].priority == priority) {
@@ -99,7 +99,7 @@ FontFileMatchRenderer (char *fileName)
     int                        i;
     int                        fileLen;
     FontRendererPtr    r;
-    
+
     fileLen = strlen (fileName);
     for (i = 0; i < renderers.number; i++)
     {
index 4d60c2a..86dd8fc 100644 (file)
@@ -22,4 +22,4 @@ libstubs_la_SOURCES =                 \
        servclient.c            \
        setfntauth.c            \
        stfntcfnt.c             \
-       stubs.h 
+       stubs.h
index a79b4bf..fdf22cd 100644 (file)
@@ -7,21 +7,21 @@
 #pragma weak RegisterFPEFunctions
 #endif
 
-weak int 
-RegisterFPEFunctions(NameCheckFunc name_func, 
-                    InitFpeFunc init_func, 
-                    FreeFpeFunc free_func, 
-                    ResetFpeFunc reset_func, 
-                    OpenFontFunc open_func, 
-                    CloseFontFunc close_func, 
-                    ListFontsFunc list_func, 
-                    StartLfwiFunc start_lfwi_func, 
-                    NextLfwiFunc next_lfwi_func, 
-                    WakeupFpeFunc wakeup_func, 
-                    ClientDiedFunc client_died, 
-                    LoadGlyphsFunc load_glyphs, 
-                    StartLaFunc start_list_alias_func, 
-                    NextLaFunc next_list_alias_func, 
+weak int
+RegisterFPEFunctions(NameCheckFunc name_func,
+                    InitFpeFunc init_func,
+                    FreeFpeFunc free_func,
+                    ResetFpeFunc reset_func,
+                    OpenFontFunc open_func,
+                    CloseFontFunc close_func,
+                    ListFontsFunc list_func,
+                    StartLfwiFunc start_lfwi_func,
+                    NextLfwiFunc next_lfwi_func,
+                    WakeupFpeFunc wakeup_func,
+                    ClientDiedFunc client_died,
+                    LoadGlyphsFunc load_glyphs,
+                    StartLaFunc start_list_alias_func,
+                    NextLaFunc next_list_alias_func,
                     SetPathFunc set_path_func)
 {
     return 0;
index d0bdd3d..b495661 100644 (file)
@@ -7,7 +7,7 @@
 #pragma weak remove_fs_handlers
 #endif
 
-weak void 
+weak void
 remove_fs_handlers(FontPathElementPtr fpe,
                    BlockHandlerProcPtr blockHandler,
                    Bool all)
old mode 100755 (executable)
new mode 100644 (file)
index 7f0eef2..fa634e9
@@ -29,8 +29,8 @@
 #endif
 
 extern FontPtr find_old_font ( FSID id );
-extern int set_font_authorizations ( char **authorizations, 
-                                    int *authlen, 
+extern int set_font_authorizations ( char **authorizations,
+                                    int *authlen,
                                     ClientPtr client );
 
 extern unsigned long GetTimeInMillis (void);
old mode 100755 (executable)
new mode 100644 (file)
index f15e3d8..c47cb5c
@@ -54,7 +54,7 @@ static int        reverseMapSize;
 static Atom        lastAtom;
 
 static int
-Hash(char *string, int len)
+Hash(const char *string, int len)
 {
     int        h;
 
@@ -146,8 +146,8 @@ NameEqual (const char *a, const char *b, int l)
 #pragma weak MakeAtom
 #endif
 
-weak Atom 
-MakeAtom(char *string, unsigned len, int makeit)
+weak Atom
+MakeAtom(const char *string, unsigned len, int makeit)
 {
     AtomListPtr        a;
     int                hash;
@@ -223,7 +223,7 @@ MakeAtom(char *string, unsigned len, int makeit)
 #pragma weak ValidAtom
 #endif
 
-weak int 
+weak int
 ValidAtom(Atom atom)
 {
     return (atom != None) && (atom <= lastAtom);
old mode 100755 (executable)
new mode 100644 (file)
index c5915db..db03e73
@@ -82,7 +82,7 @@ FontComputeInfoAccelerators(FontInfoPtr pFontInfo)
        pFontInfo->inkInside = FALSE;
 }
 
-int 
+int
 FontCouldBeTerminal(FontInfoPtr pFontInfo)
 {
     if ((pFontInfo->minbounds.leftSideBearing >= 0) &&
@@ -95,7 +95,7 @@ FontCouldBeTerminal(FontInfoPtr pFontInfo)
             pFontInfo->minbounds.ascent != pFontInfo->fontAscent ||
             pFontInfo->minbounds.descent != pFontInfo->fontDescent)) {
        /* blow off font with nothing but a SPACE */
-       if (pFontInfo->maxbounds.ascent == 0 && 
+       if (pFontInfo->maxbounds.ascent == 0 &&
            pFontInfo->maxbounds.descent == 0)
                return FALSE;
        return TRUE;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 22f6119..2c5ea6f
@@ -45,10 +45,10 @@ static int defaultGlyphCachingMode = DEFAULT_GLYPH_CACHING_MODE;
 int glyphCachingMode = DEFAULT_GLYPH_CACHING_MODE;
 
 void
-GetGlyphs(FontPtr font, 
-         unsigned long count, 
-         unsigned char *chars, 
-         FontEncoding fontEncoding, 
+GetGlyphs(FontPtr font,
+         unsigned long count,
+         unsigned char *chars,
+         FontEncoding fontEncoding,
          unsigned long *glyphcount,    /* RETURN */
          CharInfoPtr *glyphs)          /* RETURN */
 {
@@ -59,9 +59,9 @@ GetGlyphs(FontPtr font,
 #define MAX(a,b)    ((a)>(b)?(a):(b))
 
 void
-QueryGlyphExtents(FontPtr pFont, 
-                 CharInfoPtr *charinfo, 
-                 unsigned long count, 
+QueryGlyphExtents(FontPtr pFont,
+                 CharInfoPtr *charinfo,
+                 unsigned long count,
                  ExtentInfoRec *info)
 {
     register unsigned long i;
@@ -131,9 +131,9 @@ QueryGlyphExtents(FontPtr pFont,
 }
 
 Bool
-QueryTextExtents(FontPtr pFont, 
-                unsigned long count, 
-                unsigned char *chars, 
+QueryTextExtents(FontPtr pFont,
+                unsigned long count,
+                unsigned char *chars,
                 ExtentInfoRec *info)
 {
     xCharInfo     **charinfo;
@@ -182,7 +182,7 @@ QueryTextExtents(FontPtr pFont,
     }
     cm = pFont->info.constantMetrics;
     pFont->info.constantMetrics = FALSE;
-    QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal, 
+    QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal,
                      n - firstReal, info);
     pFont->info.constantMetrics = cm;
     free(charinfo);
@@ -227,9 +227,9 @@ SetGlyphCachingMode(int newmode)
 
 /* add_range(): Add range to a list of ranges, with coalescence */
 int
-add_range(fsRange *newrange, 
-         int *nranges, 
-         fsRange **range, 
+add_range(fsRange *newrange,
+         int *nranges,
+         fsRange **range,
          Bool charset_subset)
 {
     int first, last, middle;
old mode 100755 (executable)
new mode 100644 (file)
index 8124037..974128e
@@ -70,7 +70,7 @@ GetInt(char *ptr, int *val)
 #ifndef NO_LOCALE
 static struct lconv *locale = 0;
 #endif
-static char *radix = ".", *plus = "+", *minus = "-";
+static const char *radix = ".", *plus = "+", *minus = "-";
 
 static char *
 readreal(char *ptr, double *result)
@@ -116,7 +116,6 @@ readreal(char *ptr, double *result)
 static char *
 xlfd_double_to_text(double value, char *buffer, int space_required)
 {
-    char formatbuf[40];
     register char *p1;
     int ndigits, exponent;
 
@@ -132,14 +131,12 @@ xlfd_double_to_text(double value, char *buffer, int space_required)
            minus = locale->negative_sign;
     }
 #endif
-    /* Compute a format to use to render the number */
-    sprintf(formatbuf, "%%.%dle", XLFD_NDIGITS);
 
     if (space_required)
        *buffer++ = ' ';
 
     /* Render the number using printf's idea of formatting */
-    sprintf(buffer, formatbuf, value);
+    sprintf(buffer, "%.*le", XLFD_NDIGITS, value);
 
     /* Find and read the exponent value */
     for (p1 = buffer + strlen(buffer);
@@ -156,16 +153,14 @@ xlfd_double_to_text(double value, char *buffer, int space_required)
     if (exponent >= XLFD_NDIGITS || ndigits - exponent > XLFD_NDIGITS + 1)
     {
        /* Scientific */
-       sprintf(formatbuf, "%%.%dle", ndigits - 1);
-       sprintf(buffer, formatbuf, value);
+       sprintf(buffer, "%.*le", ndigits - 1, value);
     }
     else
     {
        /* Fixed */
        ndigits -= exponent + 1;
        if (ndigits < 0) ndigits = 0;
-       sprintf(formatbuf, "%%.%dlf", ndigits);
-       sprintf(buffer, formatbuf, value);
+       sprintf(buffer, "%.*lf", ndigits, value);
        if (exponent < 0)
        {
            p1 = buffer;
@@ -265,10 +260,9 @@ xlfd_round_double(double x)
         * If not IEEE 754:  Let printf() do it for you.
         */
 
-       char formatbuf[40], buffer[40];
+       char buffer[40];
 
-       sprintf(formatbuf, "%%.%dlg", XLFD_NDIGITS);
-       sprintf(buffer, formatbuf, x);
+       sprintf(buffer, "%.*lg", XLFD_NDIGITS, x);
        return atof(buffer);
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index f5424fe..c1f9762
@@ -6,11 +6,11 @@
  * documentation for any purpose is hereby granted without fee, provided that
  * the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Network Computing Devices or Digital 
- * not be used in advertising or publicity pertaining to distribution of the 
- * software without specific, written prior permission. Network Computing 
- * Devices and Digital make no representations about the suitability of 
- * this software for any purpose.  It is provided "as is" without express 
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. Network Computing
+ * Devices and Digital make no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
  * or implied warranty.
  *
  * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
@@ -59,12 +59,12 @@ from The Open Group.
 #include       <X11/fonts/fontutil.h>
 
 int
-CheckFSFormat(fsBitmapFormat format, 
-             fsBitmapFormatMask fmask, 
-             int *bit_order, 
-             int *byte_order, 
-             int *scan, 
-             int *glyph, 
+CheckFSFormat(fsBitmapFormat format,
+             fsBitmapFormatMask fmask,
+             int *bit_order,
+             int *byte_order,
+             int *scan,
+             int *glyph,
              int *image)
 {
     /* convert format to what the low levels want */
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 548105a..9c05fa1
@@ -66,7 +66,7 @@ void
 EmptyFontPatternCache (FontPatternCachePtr cache)
 {
     int            i;
-    
+
     for (i = 0; i < NBUCKETS; i++)
        cache->buckets[i] = 0;
     for (i = 0; i < NENTRIES; i++)
@@ -127,9 +127,9 @@ Hash (const char *string, int len)
 
 /* add entry */
 void
-CacheFontPattern (FontPatternCachePtr cache, 
-                 char *pattern, 
-                 int patlen, 
+CacheFontPattern (FontPatternCachePtr cache,
+                 char *pattern,
+                 int patlen,
                  FontPtr pFont)
 {
     FontPatternCacheEntryPtr   e;
@@ -173,8 +173,8 @@ CacheFontPattern (FontPatternCachePtr cache,
 
 /* find matching entry */
 FontPtr
-FindCachedFontPattern (FontPatternCachePtr cache, 
-                      char *pattern, 
+FindCachedFontPattern (FontPatternCachePtr cache,
+                      char *pattern,
                       int patlen)
 {
     int                                hash;
@@ -195,7 +195,7 @@ FindCachedFontPattern (FontPatternCachePtr cache,
 }
 
 void
-RemoveCachedFontPattern (FontPatternCachePtr cache, 
+RemoveCachedFontPattern (FontPatternCachePtr cache,
                         FontPtr pFont)
 {
     FontPatternCacheEntryPtr   e;
old mode 100755 (executable)
new mode 100644 (file)
index 36715b1..e55e193
@@ -42,7 +42,7 @@ AllocateFontPrivateIndex (void)
     return _FontPrivateAllocateIndex++;
 }
 
-FontPtr 
+FontPtr
 CreateFontRec (void)
 {
     FontPtr pFont;
@@ -51,7 +51,7 @@ CreateFontRec (void)
     size = sizeof(FontRec) + (sizeof(pointer) * _FontPrivateAllocateIndex);
 
     pFont = malloc(size);
-    
+
     if(pFont) {
        bzero((char*)pFont, size);
        pFont->maxPrivate = _FontPrivateAllocateIndex - 1;
old mode 100755 (executable)
new mode 100644 (file)
index 5feb2d1..ec726b8
@@ -106,7 +106,7 @@ FourByteSwap(unsigned char *buf, int nbytes)
 {
     unsigned char c;
 
-    for (; nbytes > 0; nbytes -= 4, buf += 4) 
+    for (; nbytes > 0; nbytes -= 4, buf += 4)
     {
        c = buf[0];
        buf[0] = buf[3];
@@ -122,8 +122,8 @@ FourByteSwap(unsigned char *buf, int nbytes)
  */
 
 int
-RepadBitmap (char *pSrc, char *pDst, 
-            unsigned int srcPad, unsigned int dstPad, 
+RepadBitmap (char *pSrc, char *pDst,
+            unsigned int srcPad, unsigned int dstPad,
             int width, int height)
 {
     int            srcWidthBytes,dstWidthBytes;
@@ -131,33 +131,33 @@ RepadBitmap (char *pSrc, char *pDst,
     char    *pTmpSrc,*pTmpDst;
 
     switch (srcPad) {
-    case 1:    
+    case 1:
        srcWidthBytes = (width+7)>>3;
        break;
     case 2:
        srcWidthBytes = ((width+15)>>4)<<1;
        break;
-    case 4:    
+    case 4:
        srcWidthBytes = ((width+31)>>5)<<2;
        break;
-    case 8:    
-       srcWidthBytes = ((width+63)>>6)<<3; 
+    case 8:
+       srcWidthBytes = ((width+63)>>6)<<3;
        break;
     default:
        return 0;
     }
     switch (dstPad) {
-    case 1:    
+    case 1:
        dstWidthBytes = (width+7)>>3;
        break;
     case 2:
        dstWidthBytes = ((width+15)>>4)<<1;
        break;
-    case 4:    
+    case 4:
        dstWidthBytes = ((width+31)>>5)<<2;
        break;
-    case 8:    
-       dstWidthBytes = ((width+63)>>6)<<3; 
+    case 8:
+       dstWidthBytes = ((width+63)>>6)<<3;
        break;
     default:
        return 0;