Import Upstream version 0.9.10

This commit is contained in:
openKylinBot 2022-05-14 01:31:05 +08:00
commit 1af1860a40
38 changed files with 54435 additions and 0 deletions

3
AUTHORS Normal file
View File

@ -0,0 +1,3 @@
Keith Packard, of SuSE, XFree86 and Hewlett-Packard
Noah Levitt, autotooling.

39
COPYING Normal file
View File

@ -0,0 +1,39 @@
Copyright © 2001,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.
Copyright © 2000 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.

700
ChangeLog Normal file
View File

@ -0,0 +1,700 @@
commit 845716f8f14963d338e5a8d5d2424baafc90fb30
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Tue Oct 4 21:24:55 2016 +0200
libXrender 0.9.10
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
commit 9362c7ddd1af3b168953d0737877bc52d79c94f4
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Sun Sep 25 21:43:09 2016 +0200
Validate lengths while parsing server data.
Individual lengths inside received server data can overflow
the previously reserved memory.
It is therefore important to validate every single length
field to not overflow the previously agreed sum of all invidual
length fields.
v2: consume remaining bytes in the reply buffer on error.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Matthieu Herrb@laas.fr
commit 8fad00b0b647ee662ce4737ca15be033b7a21714
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Sun Sep 25 21:42:09 2016 +0200
Avoid OOB write in XRenderQueryFilters
The memory for filter names is reserved right after receiving the reply.
After that, filters are iterated and each individual filter name is
stored in that reserved memory.
The individual name lengths are not checked for validity, which means
that a malicious server can reserve less memory than it will write to
during each iteration.
v2: consume remaining bytes in reply buffer on error.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
commit b2df5bc42f64b45e44dbad61f3386bcb5ec1383d
Author: Lauri Kasanen <cand@gmx.com>
Date: Mon May 18 19:41:03 2015 +0300
Fix documentation to explicitly mention premultiplied alpha
Before this patch, it wasn't mentioned in this file at all, which
is a monumental oversight.
Signed-off-by: Lauri Kasanen <cand@gmx.com>
commit bb890936bcc6053cb7a46cd9225c257ff1be389f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 30 22:29:55 2015 -0700
libXrender 0.9.9
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7887382e59b7a06d6b02501205d543fdf76c8249
Author: Clemens Eisserer <linuxhippy@gmail.com>
Date: Sat Nov 23 22:15:52 2013 -0800
Fix request length calculation for XRenderCompositeText32
Request length calculation inside XRenderCompositeText32 is broken for
the case where the number of glyphs fits exactky inside the last
xGlyphElt.
In XRenderCompositeText8 and XRenderCompositeText16 this case is
handled properly, somehow the "-1" got missing in
XRenderCompositeText32.
Reviewed-by: Keith Packard <keithp@keithp.com>
commit 2222b0fbff96b9f0324bb1e2f56416c84be23c3b
Author: Michael Joost <mehl@michael-joost.de>
Date: Mon Nov 18 16:11:26 2013 +0100
Remove fallback for _XEatDataWords, require libX11 1.6 for it
_XEatDataWords was orignally introduced with the May 2013 security
patches, and in order to ease the process of delivering those,
fallback versions of _XEatDataWords were included in the X extension
library patches so they could be applied to older versions that didn't
have libX11 1.6 yet. Now that we're past that hurdle, we can drop
the fallbacks and just require libX11 1.6 for building new versions
of the extension libraries.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 61236e831f8cc0761b26b49e37a4df9c187aa0ba
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jun 13 22:41:00 2013 -0700
libXrender 0.9.8
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 786f78fd8df6d165ccbc81f306fd9f22b5c1551c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 12 23:02:11 2013 -0700
integer overflow in XRenderQueryPictIndexValues() [CVE-2013-1987 3/3]
The length and numIndexValues members of the reply are both CARD32 and
need to be bounds checked before multiplying by sizeof (XIndexValue) to
avoid integer overflow leading to underallocation and writing data from
the network past the end of the allocated buffer.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 9e577d40322b9e3d8bdefec0eefa44d8ead451a4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 12 23:02:11 2013 -0700
integer overflow in XRenderQueryFormats() [CVE-2013-1987 2/3]
The length, numFormats, numScreens, numDepths, and numVisuals members of
the reply are all CARD32 and need to be bounds checked before multiplying
and adding them together to come up with the total size to allocate, to
avoid integer overflow leading to underallocation and writing data from
the network past the end of the allocated buffer.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit e52853974664289fe42a92909667ed77cfa1cec5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Apr 12 22:45:20 2013 -0700
integer overflow in XRenderQueryFilters() [CVE-2013-1987 1/3]
The length, numFilters & numAliases members of the reply are all CARD32
and need to be bounds checked before multiplying & adding them together
to come up with the total size to allocate, to avoid integer overflow
leading to underallocation and writing data from the network past the
end of the allocated buffer.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 73e77eb21d649edc1ce1746739f9358e337b2935
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri May 3 22:48:11 2013 -0700
Use _XEatDataWords to avoid overflow of rep.length bit shifting
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1af52cb334377611233d7dc156bc1e6f7923756d
Author: Colin Walters <walters@verbum.org>
Date: Wed Jan 4 17:37:06 2012 -0500
autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit a4265cd7a69349f1697f81e18303a77358e27f33
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Jan 15 14:28:48 2013 -0500
configure: Remove AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit bf1aa4e05997ab97be4413ccdb6d0d1eb45aeefe
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Mar 7 20:46:50 2012 -0800
libXrender 0.9.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit bb6568cbec24ae2c84bb5d9fe418f0021291a0af
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date: Mon Jan 2 19:58:15 2012 +0000
Fix alpha premultiplication in XRenderParseColor.
Due to C arithmetic conversion rules we must use an unsigned constant (or a
cast) to perform the multiplication using unsigned arithmetic.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
commit b3cfeecf2bddbbb120a9c796a4c9fb8fd08e15fc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Sep 16 22:51:39 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 eaae07c9c9690228e16ab8dc537a8a0c2ae175bf
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun May 22 12:47:10 2011 -0700
Make DEPTH_MASK generate unsigned ints
Clears Sun compiler warning:
"Xrender.c", line 127: warning: integer overflow detected: op "<<"
since 1 << 31 overflows a signed 32-bit int.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1025ca2d9a00bc60639689fba177d186dace5483
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Feb 2 11:43:44 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])
Remove redundant AC_SUBST(*_CFLAGS) and/or *_LIBS
Update minimum version of util-macros to at least 1.8.
No functional configuration changes
This helps automated maintenance and release activities.
Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
commit d3258bb910de98836f01be320ff59bb841eef825
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Fri Jan 28 19:41:37 2011 -0500
config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit ba0036d984787dc2da74ef3d8ffb9b81ca13c19c
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 5fb74888fd77843c81de038365791f29c799bbec
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Thu Nov 4 09:13:49 2010 -0700
Fix some minor typos
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
commit b1c60edb6b6a965e58fed3b613c266364a5ec0ce
Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu Jul 1 07:02:41 2010 -0300
Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit d3d20437ceee1c225cd189fdeb6378552e206337
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Jun 8 19:23:04 2010 -0700
libXrender 0.9.6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 0dcf5c152a6463342897375c71e4f76476d285d2
Author: Jamey Sharp <jamey@minilop.net>
Date: Fri Apr 9 17:26:52 2010 -0700
Always call SyncHandle after issuing an X request.
commit b138debfd03e096a0af998495441ac262733dfc9
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Mar 29 14:53:49 2010 -0400
config: remove the pkgconfig pc.in file from EXTRA_DIST
Automake always includes it in the tarball.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 1380d975d1b85decd2b0a6e8a7e629b1bdd1d1ad
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Jan 14 09:43:56 2010 -0500
COPYING: add missing copyright notices
Refer to: Composite.c
Copyright © 2000 SuSE, Inc.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit fc8b02894452ad93101b35fec41cb1baf72e746a
Author: Rémi Cardona <remi@gentoo.org>
Date: Thu Dec 17 08:30:04 2009 +0100
require autoconf 2.60 because of $(docdir) use
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
commit f662ae0e47a6f8fe47457a0b38f72f9598f37c96
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Fri Nov 27 20:56:04 2009 -0500
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Now that the INSTALL file is generated.
Allows running make maintainer-clean.
commit 83a3fd787f3058284d8b903ac190de54ba1f0e6d
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Oct 28 14:09:10 2009 -0400
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.
commit cf8a7c4463eba5ef3c63186ad539c201df3770f9
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 27 15:07:26 2009 -0400
Deploy the new XORG_DEFAULT_OPTIONS #24242
This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.
commit f58f2bf44c35ca82ecd9f022a494af0fbcd0a537
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Oct 26 22:08:43 2009 -0400
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
ChangeLog filename is known to Automake and requires no further
coding in the makefile.
commit 47051786b209039488dfca6b644db3f67ca96426
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Oct 22 12:34:19 2009 -0400
.gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
commit 1da8c1bfbb17750e5ba51321961aaf39b8cf98f7
Author: Tomáš Chvátal <scarabeus@gentoo.org>
Date: Sun Nov 29 13:38:42 2009 +0100
Make libXrender use docdir for documentation placement.
Signed-off-by: Tomáš Chvátal <scarabeus@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
commit a5ab173b0b19e6acefc897492b21fc6e6c296282
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
Date: Wed Oct 21 12:47:26 2009 -0700
This is not a GNU project, so declare it foreign.
On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
> On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
> > I noticed an INSTALL file in xlsclients and libXvMC today, and it
> > was quite annoying to work around since 'autoreconf -fvi' replaces
> > it and git wants to commit it. Should these files even be in git?
> > Can I nuke them for the betterment of humanity and since they get
> > created by autoreconf anyways?
>
> See https://bugs.freedesktop.org/show_bug.cgi?id=24206
As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
of the INSTALL file. It is also part of the 24206 solution.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
commit 5865c457191da7f7357b7c7cdfb1a6e695e630df
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Oct 1 22:34:19 2009 -0700
libXrender 0.9.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit cb8df63ef0a8a70dfff21eef02f9d50095854ec0
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Oct 1 22:28:05 2009 -0700
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit 394342d73472c3921eb941bf5f07c24237d89b1a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Oct 1 22:15:30 2009 -0700
Move libXrender documentation from xorg-docs
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit cc94fadacb4be63f8577c3c4de65dacaee531776
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Feb 2 20:34:36 2009 -0800
Add README with pointers to mailing list, bugzilla & git repos
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit 3747f97f133b5fe8dea0d1991d68c4693d488aae
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Fri Jan 30 16:49:59 2009 -0200
Janitor: make distcheck, compiler warnings, .gitignore.
commit f6f784c0f98c28915bd26d04e4d8839806e29877
Author: Pierre-Loup Griffais <pgriffais@nvidia.com>
Date: Fri Apr 18 17:32:32 2008 -0700
Use Data instead of Data32 to avoid truncating the filter parameters on 64-bit systems.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
commit 5653231fcde636e4215c70b1e436554e1ffe07a7
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Sun Mar 9 08:39:12 2008 +0100
nuke RCS Ids
commit e1333b82c0f6e7b9acdbae19d18377a0ed65bddb
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Dec 6 16:38:43 2007 -0500
Replace static ChangeLog with dist-hook to generate from git log
commit e10d5cbe4c5ed98ae1856e20a0e9d31321330d53
Merge: 497dda5 9d3f9fd
Author: Eric Anholt <eric@anholt.net>
Date: Wed Sep 5 08:25:12 2007 -0700
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/lib/libXrender
commit 497dda5615d0484d34f3a0a580353ac10ceaced5
Author: Eric Anholt <eric@anholt.net>
Date: Wed Sep 5 08:20:33 2007 -0700
Bump version to 0.9.4.
commit 89bc96e2c10c3902b82d74da95608bb48319ad29
Author: Paul Bender <pebender@san.rr.com>
Date: Wed Sep 5 08:19:55 2007 -0700
Reorder render.h include so that XID has been picked up by then.
While libXrender built fine. some software requiring libXrender didn't include
Xlib.h beforehand.
commit 9d3f9fd3f6f37112fecb2e96e9b25eb860a4b67d
Author: James Cloos <cloos@jhcloos.com>
Date: Mon Sep 3 05:53:49 2007 -0400
Add *~ to .gitignore to skip patch/emacs droppings
commit 3fcca95b2628167be4c908a9a315f070eb195660
Author: David Reveman <davidr@novell.com>
Date: Mon Aug 20 14:40:44 2007 -0400
Bump to 0.9.3
commit 5b38b2d9b981d425587a4eb440acb2f0d6b0db13
Author: David Reveman <davidr@novell.com>
Date: Mon Aug 20 14:38:33 2007 -0400
Properly set length field in gradient requests (bug 9526).
commit 9fc870a4b68c2e7f5a7bcaca72d96fe105737bb5
Author: Adam Jackson <ajax@benzedrine.nwnk.net>
Date: Fri Oct 13 16:26:35 2006 -0400
Bump to 0.9.2
commit f7f2d491eff707d6087dcdec1d8a1bbd733b5f14
Author: Tilman Sauerbeck <tilman@code-monkey.de>
Date: Sat Sep 16 20:26:02 2006 +0200
Const-ified the filter argument to XRenderSetPictureFilter().
commit 28600498df66dd0d7cc25cb1dd48648ae8ba0d30
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Jul 13 14:59:06 2006 -0700
renamed: .cvsignore -> .gitignore
commit c4bfb815c36911e7b7b752fd3273b09ab246068d
Author: Adam Jackson <ajax@nwnk.net>
Date: Thu Apr 27 00:21:27 2006 +0000
Bump to 0.9.1
commit 9779025f33c917b74349200e6018d0c94d6ff0ab
Author: Adam Jackson <ajax@nwnk.net>
Date: Mon Apr 3 01:10:02 2006 +0000
Coverity #428: Fix a potential NULL chase. Coverity #930: Verify that a
malloc succeeds.
commit ab1b6bdbce1c83c53ef9ea610466a7c813ab643d
Author: Kevin E Martin <kem@kem.org>
Date: Thu Dec 15 00:24:34 2005 +0000
Update package version number for final X11R7 release candidate.
commit 94a90971fed66cf636f466b6fdd08a485042c38f
Author: Kevin E Martin <kem@kem.org>
Date: Sat Dec 3 05:49:45 2005 +0000
Update package version number for X11R7 RC3 release.
commit 874af611e76e4edadfb53479b80ddbd021052aae
Author: Kevin E Martin <kem@kem.org>
Date: Sat Dec 3 04:41:50 2005 +0000
Add check and cflags for malloc(0) returning NULL.
commit c2874804715f99c6c735079cc018db77494ba0cd
Author: Kevin E Martin <kem@kem.org>
Date: Sat Nov 19 07:15:43 2005 +0000
Update pkgconfig files to separate library build-time dependencies from
application build-time dependencies, and update package deps to work
with separate build roots.
commit 438e7bc5783ae00c200ef239cb0ebbe828cdb900
Author: Kevin E Martin <kem@kem.org>
Date: Fri Jul 29 21:22:52 2005 +0000
Various changes preparing packages for RC0:
- Verify and update package version numbers as needed
- Implement versioning scheme
- Change bug address to point to bugzilla bug entry form
- Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
reenable it)
- Fix makedepend to use pkgconfig and pass distcheck
- Update build script to build macros first
- Update modular Xorg version
commit bd4ccfc68aba1bfd75350311b70c0c84c20f3137
Author: Kevin E Martin <kem@kem.org>
Date: Sat Jul 23 18:09:40 2005 +0000
Modify modular libs to use Xregion.h instead of region.h
commit 9fc7ab9a00f99088432529af9129c5e4702e7c6f
Author: Kevin E Martin <kem@kem.org>
Date: Sat Jul 23 18:06:16 2005 +0000
lib/Xrender/Picture.c Change region.h to Xregion.h and modify internal
references to include <X11/Xregion.h>.
commit 27962f426c54ee19d648601825485c2ca2b50832
Author: Daniel Stone <daniel@fooishbar.org>
Date: Tue Jul 19 04:53:20 2005 +0000
Use correct path to region.h.
commit 62c6d0bf4b5d5e27f586bb8a1beccc27bab4ef4c
Author: Keith Packard <keithp@keithp.com>
Date: Sat Jul 9 06:48:50 2005 +0000
Add .cvsignore files
commit b1051c48a51a9731bce10dd4951485f5554ca605
Author: Daniel Stone <daniel@fooishbar.org>
Date: Sun Jul 3 07:00:57 2005 +0000
Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
source files in the xserver/xorg tree, predicated on defines of
HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
<X11/fonts/foo.h>.
commit 9359b40d8c41901844924060a864a854dac4adbf
Author: Lars Knoll <lars@trolltech.com>
Date: Fri Jul 1 10:04:51 2005 +0000
Add support for gradients and solid fills to Render.
commit 60cc17fd8fac9b28363e0979d6b0443be6838613
Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
Date: Thu Jun 9 13:49:06 2005 +0000
Use $(top_srcdir)/... instead of $(top_builddir)/... in INCLUDES Added
$(top_srcdir) to INCLUDES
commit 8f765c413911d355dd95a312e31deaf1166206f9
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Thu May 19 20:33:55 2005 +0000
Add forgotten region.h
commit 65cb00ad3da0cdaad1429ac5cb01e12d7f4a6d0d
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Thu May 19 19:58:24 2005 +0000
- Add Xrender build system
commit 99a8286d49152c45ebead33df9f32bf6b7799bee
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Thu May 19 19:26:35 2005 +0000
- Conditionally include config.h in xc/lib/Xrender/*.c
- Add Xrender to symlink.sh
commit f11802cdcd65d4e50c7ed8eadf5c907af40b544c
Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Date: Sat Dec 4 00:42:48 2004 +0000
Encoding of numerous files changed to UTF-8
commit 87e1ae59ec19eeeee70978c922c43e1b219699d5
Author: Keith Packard <keithp@keithp.com>
Date: Sat Aug 7 00:40:40 2004 +0000
Update to version 0.9 of Xrender (includes XRenderAddTraps)
commit a8302c03f1810fe30aea90f3d42a77663e5cd8a0
Author: Egbert Eich <eich@suse.de>
Date: Mon May 24 19:05:01 2004 +0000
Muffle compiler warnings.
fix option name in log message.
improve debugging messages.
commit 7faeec0e653838dc78d8df0c1eb10b833ff0c816
Author: Egbert Eich <eich@suse.de>
Date: Fri Apr 23 18:43:50 2004 +0000
Merging XORG-CURRENT into trunk
commit 3cdb1c4406d51f671f60f530c557ebfca81bfd3c
Author: Egbert Eich <eich@suse.de>
Date: Sun Mar 14 08:32:25 2004 +0000
Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
commit cb66a1ca643b1756d61bc8bfe6cfef2885791d66
Author: Egbert Eich <eich@suse.de>
Date: Wed Mar 3 12:11:30 2004 +0000
Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
commit 88d1d0b4e14be414a5afb16bcf83ac2e6b5ea7a6
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 13:35:33 2004 +0000
readding XFree86's cvs IDs
commit 48b8124dfef71e9302e9b1404870c23a07d799ae
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 09:22:44 2004 +0000
Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
commit 4d0650c66361abac955cf0583291fa12f61137ac
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 16:48:49 2003 +0000
XFree86 4.3.0.1
commit 35a608915a0512ca419fb0d4f3116fd68d2d8bc5
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 16:48:49 2003 +0000
Initial revision

291
INSTALL Normal file
View File

@ -0,0 +1,291 @@
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.

39
Makefile.am Normal file
View File

@ -0,0 +1,39 @@
#
# 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
# 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.
SUBDIRS = src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xrender.pc
dist_doc_DATA = doc/libXrender.txt
MAINTAINERCLEANFILES = ChangeLog INSTALL
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL

938
Makefile.in Normal file
View File

@ -0,0 +1,938 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# 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
# 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.
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/xrender.pc.in $(dist_doc_DATA) \
AUTHORS COPYING ChangeLog INSTALL README compile config.guess \
config.sub depcomp install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = xrender.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"
DATA = $(dist_doc_DATA) $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RENDER_CFLAGS = @RENDER_CFLAGS@
RENDER_LIBS = @RENDER_LIBS@
RENDER_VERSION = @RENDER_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xrender.pc
dist_doc_DATA = doc/libXrender.txt
MAINTAINERCLEANFILES = ChangeLog INSTALL
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
xrender.pc: $(top_builddir)/config.status $(srcdir)/xrender.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
done
uninstall-dist_docDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-dist_docDATA install-pkgconfigDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dist_docDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-dist_docDATA uninstall-pkgconfigDATA
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

25
README Normal file
View File

@ -0,0 +1,25 @@
libXrender - library for the Render Extension to the X11 protocol
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/lib/libXrender
http://cgit.freedesktop.org/xorg/lib/libXrender
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

11821
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

14
autogen.sh Normal file
View File

@ -0,0 +1,14 @@
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
$srcdir/configure "$@"
fi

347
compile Executable file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

1558
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

71
config.h.in Normal file
View File

@ -0,0 +1,71 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Major version of this package */
#undef PACKAGE_VERSION_MAJOR
/* Minor version of this package */
#undef PACKAGE_VERSION_MINOR
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

1791
config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

20320
configure vendored Executable file

File diff suppressed because it is too large Load Diff

64
configure.ac Normal file
View File

@ -0,0 +1,64 @@
#
# 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
# 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])
#
# Version should match the current Render version. XRenderQueryVersion
# returns the version from render.h, NOT the version we set here. But we
# try to keep these the same. Note that the library has an extra
# digit in the version number to track changes which don't affect the
# protocol, so Xrender version l.n.m corresponds to protocol version l.n
#
AC_INIT(libXrender, [0.9.10],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXrender])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
# Initialize libtool
AC_PROG_LIBTOOL
# Require X.Org macros 1.8 or later for AC_PROG_INSTALL
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
XORG_CHECK_MALLOC_ZERO
# Check render configuration, strip extra digits from package version to
# find the required protocol version
if test "$VERSION" = "" ; then
VERSION=$PACKAGE_VERSION;
fi
RENDER_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
AC_SUBST(RENDER_VERSION)
# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(RENDER, [x11 >= 1.6] renderproto >= $RENDER_VERSION)
AC_CONFIG_FILES([Makefile
src/Makefile
xrender.pc])
AC_OUTPUT

791
depcomp Executable file
View File

@ -0,0 +1,791 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

603
doc/libXrender.txt Normal file
View File

@ -0,0 +1,603 @@
The Xrender Library
Version 0.7
2002-11-6
Keith Packard
keithp@xfree86.org
1. Introduction
The Xrender library is designed as a lightweight library interface to the
Render extension. This document describes how the library maps to the
protocol without duplicating the semantics described by that document.
2. Data Types
2.1 Primitive Types
For resources represented as CARD32 or XID on the wire, Xrender exposes them
using an 'unsigned long' type as is the norm for 32-bit data objects in an
Xlib compatible API.
typedef unsigned long Glyph;
typedef unsigned long GlyphSet;
typedef unsigned long Picture;
typedef unsigned long PictFormat;
Glyphs are just CARD32 objects, while GlyphSet, Picture and PictFormat
values are XIDs.
typedef int XFixed;
Fixed point numbers buck the Xlib convention by being represented as ints.
Machines for which 'int' is smaller than 32 bits cannot support the Xrender
library.
2.2 PictFormat descriptions.
The definition of a PictFormat is exposed by two data structures:
typedef struct {
short red;
short redMask;
short green;
short greenMask;
short blue;
short blueMask;
short alpha;
short alphaMask;
} XRenderDirectFormat;
typedef struct {
PictFormat id;
int type;
int depth;
XRenderDirectFormat direct;
Colormap colormap;
} XRenderPictFormat;
These serve both as a description of the available formats and as patterns
against which available formats are matched.
2.3 Picture Attributes
When creating or changing Picture objects, attributes are passed much as
they are for XCreateWindow/XChangeWindowAttributes. A structure capable of
holding all of the attributes has the relevant ones set and a bitmask passed
as a separate argument which marks the valid entries.
typedef struct _XRenderPictureAttributes {
Bool repeat;
Picture alpha_map;
int alpha_x_origin;
int alpha_y_origin;
int clip_x_origin;
int clip_y_origin;
Pixmap clip_mask;
Bool graphics_exposures;
int subwindow_mode;
int poly_edge;
int poly_mode;
Atom dither;
Bool component_alpha;
} XRenderPictureAttributes;
2.4 Colors
The core protocol XColor type doesn't include an alpha component, so Xrender
has a separate type. Note that XRender expects premultiplied alpha in all
cases except with the gradient operations.
typedef struct {
unsigned short red;
unsigned short green;
unsigned short blue;
unsigned short alpha;
} XRenderColor;
2.5 Glyph Types
Glyphs are stored in the server, so these definitions are passed from the
client to the library and on to the server as glyphs are rasterized and
transmitted over the wire.
typedef struct _XGlyphInfo {
unsigned short width;
unsigned short height;
short x;
short y;
short xOff;
short yOff;
} XGlyphInfo;
2.6 Glyph Rendering types
Glyph rendering can either take a single string of glyph indices or an array
of one of the following structures.
typedef struct _XGlyphElt8 {
GlyphSet glyphset;
_Xconst char *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt8;
typedef struct _XGlyphElt16 {
GlyphSet glyphset;
_Xconst unsigned short *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt16;
typedef struct _XGlyphElt32 {
GlyphSet glyphset;
_Xconst unsigned int *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt32;
2.7 Geometric Types
Geometric operations directly expose the available protocol datatypes
typedef struct _XPointFixed {
XFixed x, y;
} XPointFixed;
typedef struct _XLineFixed {
XPointFixed p1, p2;
} XLineFixed;
typedef struct _XTriangle {
XPointFixed p1, p2, p3;
} XTriangle;
typedef struct _XTrapezoid {
XFixed top, bottom;
XLineFixed left, right;
} XTrapezoid;
typedef struct _XTransform {
XFixed matrix[3][3];
} XTransform;
2.8 Transformation Filters
All of the filters are named simultaneously; Xrender provides no convenience
functions for dealing with them.
typedef struct _XFilters {
int nfilter;
char **filter;
int nalias;
short *alias;
} XFilters;
2.9 Index type PictFormat colors
PictFormats of Index type advertise which colors will be used for drawing
through this type.
typedef struct _XIndexValue {
unsigned long pixel;
unsigned short red, green, blue, alpha;
} XIndexValue;
3 Application Startup Functions
3.1 Initialization functions
Bool XRenderQueryExtension (Display *dpy,
int *event_basep,
int *error_basep)
This function returns True if the Render extension is available on dpy.
event_basep and error_basep will be filled in with the first event and error
numbers used by the extension (note that Render currently uses no events).
Status XRenderQueryVersion (Display *dpy,
int *major_versionp,
int *minor_versionp)
XRenderQueryVersion returns zero if the Render extension is not present or
some error occurred while attempting to discover the current Render version
number. Otherwise, XRenderQueryVersion returns 1 and stores the version
number returned by the server in *major_versionp and *minor_versionp, which
will be less than or equal to the library version numbers RENDER_MAJOR and
RENDER_MINOR.
Status XRenderQueryFormats (Display *dpy)
XRenderQueryFormats returns 1 if it successfully fetches the available
PictFormat information from the X server, 0 otherwise. Applications needn't
invoke this function directly (hmm, perhaps it should be removed from the
external interfaces then).
3.2 Subpixel Order
int XRenderQuerySubpixelOrder (Display *dpy, int screen)
Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel)
Applications interested in the geometry of the elements making up a single
pixel on the screen should use XRenderQuerySubpixelOrder and not cache the
return value. XRenderSetSubpixelOrder is used by the XRandR library to
update the value stored by Xrender when the subpixel order changes as a
result of screen reconfiguration.
3.3 PictFormat matching
Xrender provides these APIs to help locate appropriate PictFormats; they are
intended to work much like the Visual matching APIs in Xlib. The
application provides a specification including the necessary PictFormat
characteristics and Xrender returns a matching XRenderPictFormat structure
which describes the PictFormat.
XRenderPictFormat *
XRenderFindFormat (Display *dpy,
unsigned long mask,
_Xconst XRenderPictFormat *templ,
int count)
#define PictFormatID (1 << 0)
#define PictFormatType (1 << 1)
#define PictFormatDepth (1 << 2)
#define PictFormatRed (1 << 3)
#define PictFormatRedMask (1 << 4)
#define PictFormatGreen (1 << 5)
#define PictFormatGreenMask (1 << 6)
#define PictFormatBlue (1 << 7)
#define PictFormatBlueMask (1 << 8)
#define PictFormatAlpha (1 << 9)
#define PictFormatAlphaMask (1 << 10)
#define PictFormatColormap (1 << 11)
XRenderFindFormat locates a PictFormat matching the characteristics provided
in the templ. Only elements whose associated bit in mask are compared.
XRenderPictFormat *
XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual)
Finds the PictFormat suitable for use with the specified visual.
XRenderPictFormat *
XRenderFindStandardFormat (Display *dpy,
int format)
#define PictStandardARGB32 0
#define PictStandardRGB24 1
#define PictStandardA8 2
#define PictStandardA4 3
#define PictStandardA1 4
#define PictStandardNUM 5
As a convenience, this function locates PictFormats that correspond to
commonly used formats.
ARGB32 depth 32, bits 31-24 A, 23-16 R, 15-8 G, 7-0 B
RGB24 depth 24, bits 23-16 R, 15-8 G, 7-0 B
A8 depth 8, bits 7-0 A
A4 depth 4, bits 3-0 A
A1 depth 1, bits 0 A
Any server supporting Render must have a PictFormat corresponding to each of
these standard formats.
3.4 Index type PictFormat color values
XIndexValue *
XRenderQueryPictIndexValues(Display *dpy,
_Xconst XRenderPictFormat *format,
int *num)
If format refers to an Index type PictFormat, XRenderQueryPictIndexValues
returns the set of pixel values and their associated colors used when
drawing to Pictures created with that format. Otherwise,
XRenderQueryPictIndexValues generates a BadMatch error.
3.5 Querying available filters
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable);
Filters are used with non-identity transformation matrices, this function
returns a datastructure identifying the available filters on display that
can be associated with pictures for the screen associated with drawable.
Free this structure with XFree.
4 Picture Functions
Picture
XRenderCreatePicture (Display *dpy,
Drawable drawable,
_Xconst XRenderPictFormat *format,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes)
#define CPRepeat (1 << 0)
#define CPAlphaMap (1 << 1)
#define CPAlphaXOrigin (1 << 2)
#define CPAlphaYOrigin (1 << 3)
#define CPClipXOrigin (1 << 4)
#define CPClipYOrigin (1 << 5)
#define CPClipMask (1 << 6)
#define CPGraphicsExposure (1 << 7)
#define CPSubwindowMode (1 << 8)
#define CPPolyEdge (1 << 9)
#define CPPolyMode (1 << 10)
#define CPDither (1 << 11)
#define CPComponentAlpha (1 << 12)
#define CPLastBit 12
Creates a picture for drawable in the specified format. Any values
specified in 'attributes' and 'valuemask' are used in place of the default
values.
void
XRenderChangePicture (Display *dpy,
Picture picture,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes)
Change values in picture to those specified by valuemask and attributes.
void
XRenderSetPictureClipRectangles (Display *dpy,
Picture picture,
int xOrigin,
int yOrigin,
_Xconst XRectangle *rects,
int n)
Sets the clip mask in picture to the union of rects offset by
xOrigin/yOrigin.
void
XRenderSetPictureClipRegion (Display *dpy,
Picture picture,
Region r)
Sets the clip mask in picture to r.
void
XRenderSetPictureTransform (Display *dpy,
Picture picture,
XTransform *transform)
Sets the projective transformation matrix of picture to transform.
void
XRenderFreePicture (Display *dpy,
Picture picture)
Instructs the server to free picture.
5 GlyphSet functions
GlyphSet
XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format)
Creates a glyphset, every glyph in the set will use PictFormat format.
GlyphSet
XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing)
Creates a new GlyphSet ID which references an existing GlyphSet. The
two IDs refer to the same object so that changes using one ID will be
visible through the other ID. This is designed to allow multiple clients to
share the same GlyphSet so that it doesn't get destroyed when the first
client exits.
void
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset)
Frees the glyphset ID. If no other GlyphSet IDs refer to the underlying
GlyphSet, it will be destroyed.
void
XRenderAddGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
_Xconst XGlyphInfo *glyphs,
int nglyphs,
_Xconst char *images,
int nbyte_images)
Add glyphs to glyphset. The images are packed together in Z-pixmap format
according to the depth of the PictFormat used in creating glyphset.
void
XRenderFreeGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
int nglyphs)
Free some glyphs from glyphset.
6 Glyph Drawing Routines
Xrender provides two parallel APIs for glyph rendering, a simple API which
accepts a single string similar to XDrawString and a more complex API which
accepts an array of XGlyphElt{8,16,32} structures, each of which includes a
glyphset, string and x/y offsets which parallel the XDrawText API. Xrender
also provides glyphs in three sizes, 8 16 and 32 bits. The simple API is
just a convenience for the user as both forms generate the same underlying
Render protocol.
6.1 Simple single-string glyph drawing functions
These are identical except for the format of the glyph ids.
void
XRenderCompositeString8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst char *string,
int nchar)
void
XRenderCompositeString16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned short *string,
int nchar)
void
XRenderCompositeString32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned int *string,
int nchar)
6.2 Complete glyph drawing functions
As with the simple functions above, these differ only in the type of the
underlying glyph id storage type.
void
XRenderCompositeText8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt8 *elts,
int nelt)
void
XRenderCompositeText16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt16 *elts,
int nelt)
void
XRenderCompositeText32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt32 *elts,
int nelt)
7 Basic Graphics Functions
These are the simplest graphics functions upon which the other functions are
conceptually built.
7.1 Composite
XRenderComposite exposes the RenderComposite protocol request directly.
If a format with alpha is used, make sure it is premultiplied into the
color channels.
void
XRenderComposite (Display *dpy,
int op,
Picture src,
Picture mask,
Picture dst,
int src_x,
int src_y,
int mask_x,
int mask_y,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height)
7.2 Rectangles
These functions composite rectangles of the specified color, they differ
only in that XRenderFillRectangles draws more than one at a time.
void
XRenderFillRectangle (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
int x,
int y,
unsigned int width,
unsigned int height)
void
XRenderFillRectangles (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
_Xconst XRectangle *rectangles,
int n_rects)
8 Geometric Objects
All geometric drawing with Render is performed with sequences of trapezoids
or triangles; the client is responsible for breaking more complex figures
into these simple shapes.
8.1 Trapezoids
void
XRenderCompositeTrapezoids (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTrapezoid *traps,
int ntrap)
XRenderCompositeTrapezoids builds RenderTrapezoids requests to composite the
specified list of trapezoids to dst. XRenderCompositeTrapezoids will split
the list of trapezoids to build requests no larger than the maximum request
size supported by the server. This can create rendering artifacts as the
precompositing done by RenderTrapezoids when a maskFormat is specified
cannot span multiple requests.
8.2 Triangles
Render provides three different ways of encoding triangles on the wire,
Xrender exposes those with three separate triangle drawing routines. As
with trapezoids above, Xrender will split the arguments to fit requests into
the servers limits, but this may cause rendering artifacts.

View File

@ -0,0 +1,528 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _XRENDER_H_
#define _XRENDER_H_
#include <X11/Xlib.h>
#include <X11/Xfuncproto.h>
#include <X11/Xosdefs.h>
#include <X11/Xutil.h>
#include <X11/extensions/render.h>
typedef struct {
short red;
short redMask;
short green;
short greenMask;
short blue;
short blueMask;
short alpha;
short alphaMask;
} XRenderDirectFormat;
typedef struct {
PictFormat id;
int type;
int depth;
XRenderDirectFormat direct;
Colormap colormap;
} XRenderPictFormat;
#define PictFormatID (1 << 0)
#define PictFormatType (1 << 1)
#define PictFormatDepth (1 << 2)
#define PictFormatRed (1 << 3)
#define PictFormatRedMask (1 << 4)
#define PictFormatGreen (1 << 5)
#define PictFormatGreenMask (1 << 6)
#define PictFormatBlue (1 << 7)
#define PictFormatBlueMask (1 << 8)
#define PictFormatAlpha (1 << 9)
#define PictFormatAlphaMask (1 << 10)
#define PictFormatColormap (1 << 11)
typedef struct _XRenderPictureAttributes {
int repeat;
Picture alpha_map;
int alpha_x_origin;
int alpha_y_origin;
int clip_x_origin;
int clip_y_origin;
Pixmap clip_mask;
Bool graphics_exposures;
int subwindow_mode;
int poly_edge;
int poly_mode;
Atom dither;
Bool component_alpha;
} XRenderPictureAttributes;
typedef struct {
unsigned short red;
unsigned short green;
unsigned short blue;
unsigned short alpha;
} XRenderColor;
typedef struct _XGlyphInfo {
unsigned short width;
unsigned short height;
short x;
short y;
short xOff;
short yOff;
} XGlyphInfo;
typedef struct _XGlyphElt8 {
GlyphSet glyphset;
_Xconst char *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt8;
typedef struct _XGlyphElt16 {
GlyphSet glyphset;
_Xconst unsigned short *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt16;
typedef struct _XGlyphElt32 {
GlyphSet glyphset;
_Xconst unsigned int *chars;
int nchars;
int xOff;
int yOff;
} XGlyphElt32;
typedef double XDouble;
typedef struct _XPointDouble {
XDouble x, y;
} XPointDouble;
#define XDoubleToFixed(f) ((XFixed) ((f) * 65536))
#define XFixedToDouble(f) (((XDouble) (f)) / 65536)
typedef int XFixed;
typedef struct _XPointFixed {
XFixed x, y;
} XPointFixed;
typedef struct _XLineFixed {
XPointFixed p1, p2;
} XLineFixed;
typedef struct _XTriangle {
XPointFixed p1, p2, p3;
} XTriangle;
typedef struct _XCircle {
XFixed x;
XFixed y;
XFixed radius;
} XCircle;
typedef struct _XTrapezoid {
XFixed top, bottom;
XLineFixed left, right;
} XTrapezoid;
typedef struct _XTransform {
XFixed matrix[3][3];
} XTransform;
typedef struct _XFilters {
int nfilter;
char **filter;
int nalias;
short *alias;
} XFilters;
typedef struct _XIndexValue {
unsigned long pixel;
unsigned short red, green, blue, alpha;
} XIndexValue;
typedef struct _XAnimCursor {
Cursor cursor;
unsigned long delay;
} XAnimCursor;
typedef struct _XSpanFix {
XFixed left, right, y;
} XSpanFix;
typedef struct _XTrap {
XSpanFix top, bottom;
} XTrap;
typedef struct _XLinearGradient {
XPointFixed p1;
XPointFixed p2;
} XLinearGradient;
typedef struct _XRadialGradient {
XCircle inner;
XCircle outer;
} XRadialGradient;
typedef struct _XConicalGradient {
XPointFixed center;
XFixed angle; /* in degrees */
} XConicalGradient;
_XFUNCPROTOBEGIN
Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep);
Status XRenderQueryVersion (Display *dpy,
int *major_versionp,
int *minor_versionp);
Status XRenderQueryFormats (Display *dpy);
int XRenderQuerySubpixelOrder (Display *dpy, int screen);
Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel);
XRenderPictFormat *
XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual);
XRenderPictFormat *
XRenderFindFormat (Display *dpy,
unsigned long mask,
_Xconst XRenderPictFormat *templ,
int count);
#define PictStandardARGB32 0
#define PictStandardRGB24 1
#define PictStandardA8 2
#define PictStandardA4 3
#define PictStandardA1 4
#define PictStandardNUM 5
XRenderPictFormat *
XRenderFindStandardFormat (Display *dpy,
int format);
XIndexValue *
XRenderQueryPictIndexValues(Display *dpy,
_Xconst XRenderPictFormat *format,
int *num);
Picture
XRenderCreatePicture (Display *dpy,
Drawable drawable,
_Xconst XRenderPictFormat *format,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes);
void
XRenderChangePicture (Display *dpy,
Picture picture,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes);
void
XRenderSetPictureClipRectangles (Display *dpy,
Picture picture,
int xOrigin,
int yOrigin,
_Xconst XRectangle *rects,
int n);
void
XRenderSetPictureClipRegion (Display *dpy,
Picture picture,
Region r);
void
XRenderSetPictureTransform (Display *dpy,
Picture picture,
XTransform *transform);
void
XRenderFreePicture (Display *dpy,
Picture picture);
void
XRenderComposite (Display *dpy,
int op,
Picture src,
Picture mask,
Picture dst,
int src_x,
int src_y,
int mask_x,
int mask_y,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height);
GlyphSet
XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format);
GlyphSet
XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing);
void
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset);
void
XRenderAddGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
_Xconst XGlyphInfo *glyphs,
int nglyphs,
_Xconst char *images,
int nbyte_images);
void
XRenderFreeGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
int nglyphs);
void
XRenderCompositeString8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst char *string,
int nchar);
void
XRenderCompositeString16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned short *string,
int nchar);
void
XRenderCompositeString32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned int *string,
int nchar);
void
XRenderCompositeText8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt8 *elts,
int nelt);
void
XRenderCompositeText16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt16 *elts,
int nelt);
void
XRenderCompositeText32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt32 *elts,
int nelt);
void
XRenderFillRectangle (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
int x,
int y,
unsigned int width,
unsigned int height);
void
XRenderFillRectangles (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
_Xconst XRectangle *rectangles,
int n_rects);
void
XRenderCompositeTrapezoids (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTrapezoid *traps,
int ntrap);
void
XRenderCompositeTriangles (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTriangle *triangles,
int ntriangle);
void
XRenderCompositeTriStrip (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint);
void
XRenderCompositeTriFan (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint);
void
XRenderCompositeDoublePoly (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XPointDouble *fpoints,
int npoints,
int winding);
Status
XRenderParseColor(Display *dpy,
char *spec,
XRenderColor *def);
Cursor
XRenderCreateCursor (Display *dpy,
Picture source,
unsigned int x,
unsigned int y);
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable);
void
XRenderSetPictureFilter (Display *dpy,
Picture picture,
const char *filter,
XFixed *params,
int nparams);
Cursor
XRenderCreateAnimCursor (Display *dpy,
int ncursor,
XAnimCursor *cursors);
void
XRenderAddTraps (Display *dpy,
Picture picture,
int xOff,
int yOff,
_Xconst XTrap *traps,
int ntrap);
Picture XRenderCreateSolidFill (Display *dpy,
const XRenderColor *color);
Picture XRenderCreateLinearGradient (Display *dpy,
const XLinearGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
Picture XRenderCreateRadialGradient (Display *dpy,
const XRadialGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
Picture XRenderCreateConicalGradient (Display *dpy,
const XConicalGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nstops);
_XFUNCPROTOEND
#endif /* _XRENDER_H_ */

527
install-sh Executable file
View File

@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# 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
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

9661
ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

215
missing Executable file
View File

@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

68
src/AddTrap.c Normal file
View File

@ -0,0 +1,68 @@
/*
* 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
#define NLOCAL 256
void
XRenderAddTraps (Display *dpy,
Picture picture,
int xOff,
int yOff,
_Xconst XTrap *traps,
int ntrap)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderAddTrapsReq *req;
int n;
long len;
unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (ntrap)
{
GetReq(RenderAddTraps, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderAddTraps;
req->picture = picture;
req->xOff = xOff;
req->yOff = yOff;
n = ntrap;
len = ((long) n) * (SIZEOF (xTrap) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrap) >> 2);
len = ((long)n) * (SIZEOF (xTrap) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) traps, len);
ntrap -= n;
traps += n;
}
UnlockDisplay(dpy);
SyncHandle();
}

92
src/Color.c Normal file
View File

@ -0,0 +1,92 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
Status
XRenderParseColor(Display *dpy, char *spec, XRenderColor *def)
{
if (!strncmp (spec, "rgba:", 5))
{
unsigned short elements[4];
unsigned short *pShort;
int i, n;
char c;
spec += 5;
/*
* Attempt to parse the value portion.
*/
pShort = elements;
for (i = 0; i < 4; i++, pShort++, spec++) {
n = 0;
*pShort = 0;
while (*spec != '/' && *spec != '\0') {
if (++n > 4) {
return 0;
}
c = *spec++;
*pShort <<= 4;
if (c >= '0' && c <= '9')
*pShort |= c - '0';
/* assume string in lowercase
else if (c >= 'A' && c <= 'F')
*pShort |= c - ('A' - 10);
*/
else if (c >= 'a' && c <= 'f')
*pShort |= c - ('a' - 10);
else return 0;
}
if (n == 0)
return 0;
if (n < 4) {
*pShort = ((unsigned long)*pShort * 0xFFFF) / ((1 << n*4) - 1);
}
}
def->red = elements[0];
def->green = elements[1];
def->blue = elements[2];
def->alpha = elements[3];
}
else
{
XColor coreColor;
Colormap colormap;
colormap = DefaultColormap (dpy, DefaultScreen (dpy));
if (!XParseColor (dpy, colormap, spec, &coreColor))
return 0;
def->red = coreColor.red;
def->green = coreColor.green;
def->blue = coreColor.blue;
def->alpha = 0xffff;
}
def->red = (def->red * def->alpha) / 0xffffU;
def->green = (def->green * def->alpha) / 0xffffU;
def->blue = (def->blue * def->alpha) / 0xffffU;
return 1;
}

67
src/Composite.c Normal file
View File

@ -0,0 +1,67 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderComposite (Display *dpy,
int op,
Picture src,
Picture mask,
Picture dst,
int src_x,
int src_y,
int mask_x,
int mask_y,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderComposite, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderComposite;
req->op = (CARD8) op;
req->src = src;
req->mask = mask;
req->dst = dst;
req->xSrc = src_x;
req->ySrc = src_y;
req->xMask = mask_x;
req->yMask = mask_y;
req->xDst = dst_x;
req->yDst = dst_y;
req->width = width;
req->height = height;
UnlockDisplay(dpy);
SyncHandle();
}

79
src/Cursor.c Normal file
View File

@ -0,0 +1,79 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
Cursor
XRenderCreateCursor (Display *dpy,
Picture source,
unsigned int x,
unsigned int y)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Cursor cid;
xRenderCreateCursorReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateCursor, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateCursor;
req->cid = cid = XAllocID (dpy);
req->src = source;
req->x = x;
req->y = y;
UnlockDisplay(dpy);
SyncHandle();
return cid;
}
Cursor
XRenderCreateAnimCursor (Display *dpy,
int ncursor,
XAnimCursor *cursors)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Cursor cid;
xRenderCreateAnimCursorReq *req;
long len;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateAnimCursor, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateAnimCursor;
req->cid = cid = XAllocID (dpy);
len = (long) ncursor * SIZEOF (xAnimCursorElt) >> 2;
SetReqLen (req, len, len);
len <<= 2;
Data32 (dpy, (long *) cursors, len);
UnlockDisplay(dpy);
SyncHandle();
return cid;
}

106
src/FillRect.c Normal file
View File

@ -0,0 +1,106 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
/* precompute the maximum size of batching request allowed */
#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
void
XRenderFillRectangle (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
int x,
int y,
unsigned int width,
unsigned int height)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRectangle *rect;
xRenderFillRectanglesReq *req;
#ifdef MUSTCOPY
xRectangle rectdata;
long len = SIZEOF(xRectangle);
rect = &rectdata;
#endif /* MUSTCOPY */
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
req = (xRenderFillRectanglesReq *) dpy->last_req;
/* if same as previous request, with same drawable, batch requests */
if (req->reqType == info->codes->major_opcode &&
req->renderReqType == X_RenderFillRectangles &&
req->op == op &&
req->dst == dst &&
req->color.red == color->red &&
req->color.green == color->green &&
req->color.blue == color->blue &&
req->color.alpha == color->alpha &&
dpy->bufptr + SIZEOF(xRectangle) <= dpy->bufmax &&
(char *)dpy->bufptr - (char *)req < size)
{
req->length += SIZEOF(xRectangle) >> 2;
#ifndef MUSTCOPY
rect = (xRectangle *) dpy->bufptr;
dpy->bufptr += SIZEOF(xRectangle);
#endif /* not MUSTCOPY */
}
else
{
GetReqExtra(RenderFillRectangles, SIZEOF(xRectangle), req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFillRectangles;
req->op = op;
req->dst = dst;
req->color.red = color->red;
req->color.green = color->green;
req->color.blue = color->blue;
req->color.alpha = color->alpha;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xRectangle);
#else
rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq);
#endif /* MUSTCOPY */
}
rect->x = x;
rect->y = y;
rect->width = width;
rect->height = height;
#ifdef MUSTCOPY
Data (dpy, (char *) rect, len);
#endif /* MUSTCOPY */
UnlockDisplay(dpy);
SyncHandle();
}

79
src/FillRects.c Normal file
View File

@ -0,0 +1,79 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
/* precompute the maximum size of batching request allowed */
#define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
void
XRenderFillRectangles (Display *dpy,
int op,
Picture dst,
_Xconst XRenderColor *color,
_Xconst XRectangle *rectangles,
int n_rects)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderFillRectanglesReq *req;
long len;
int n;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (n_rects)
{
GetReq(RenderFillRectangles, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFillRectangles;
req->op = op;
req->dst = dst;
req->color.red = color->red;
req->color.green = color->green;
req->color.blue = color->blue;
req->color.alpha = color->alpha;
n = n_rects;
len = ((long)n) << 1;
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length))
{
n = (dpy->max_request_size - req->length) >> 1;
len = ((long)n) << 1;
}
SetReqLen(req, len, len);
len <<= 2; /* watch out for macros... */
Data16 (dpy, (short *) rectangles, len);
n_rects -= n;
rectangles += n;
}
UnlockDisplay(dpy);
SyncHandle();
}

175
src/Filter.c Normal file
View File

@ -0,0 +1,175 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
#include <limits.h>
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
xRenderQueryFiltersReq *req;
xRenderQueryFiltersReply rep;
XFilters *filters;
char *name;
char len;
int i;
unsigned long nbytes, nbytesAlias, nbytesName, reply_left;
if (!RenderHasExtension (info))
return NULL;
if (!XRenderQueryFormats (dpy))
return NULL;
xri = info->info;
if (xri->minor_version < 6)
return NULL;
LockDisplay (dpy);
GetReq (RenderQueryFilters, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryFilters;
req->drawable = drawable;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
/*
* Limit each component of combined size to 1/4 the max, which is far
* more than they should ever possibly need.
*/
if ((rep.length < (INT_MAX >> 2)) &&
(rep.numFilters < ((INT_MAX / 4) / sizeof (char *))) &&
(rep.numAliases < ((INT_MAX / 4) / sizeof (short)))) {
/*
* Compute total number of bytes for filter names
*/
nbytes = (unsigned long)rep.length << 2;
nbytesAlias = rep.numAliases * 2;
if (rep.numAliases & 1)
nbytesAlias += 2;
nbytesName = nbytes - nbytesAlias;
/*
* Allocate one giant block for the whole data structure
*/
filters = Xmalloc (sizeof (XFilters) +
(rep.numFilters * sizeof (char *)) +
(rep.numAliases * sizeof (short)) +
nbytesName);
} else
filters = NULL;
if (!filters)
{
_XEatDataWords(dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
/*
* Layout:
* XFilters
* numFilters char * pointers to filter names
* numAliases short alias values
* nbytesName char strings
*/
filters->nfilter = rep.numFilters;
filters->nalias = rep.numAliases;
filters->filter = (char **) (filters + 1);
filters->alias = (short *) (filters->filter + rep.numFilters);
name = (char *) (filters->alias + rep.numAliases);
/*
* Read the filter aliases
*/
_XRead16Pad (dpy, filters->alias, 2 * rep.numAliases);
reply_left = 8 + rep.length - 2 * rep.numAliases;;
/*
* Read the filter names
*/
for (i = 0; i < rep.numFilters; i++)
{
int l;
_XRead (dpy, &len, 1);
reply_left--;
l = len & 0xff;
if ((unsigned long)l + 1 > nbytesName) {
_XEatDataWords(dpy, reply_left);
Xfree(filters);
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
nbytesName -= l + 1;
filters->filter[i] = name;
_XRead (dpy, name, l);
reply_left -= l;
name[l] = '\0';
name += l + 1;
}
i = name - (char *) (filters->alias + rep.numAliases);
if (i & 3)
_XEatData (dpy, 4 - (i & 3));
UnlockDisplay (dpy);
SyncHandle ();
return filters;
}
void
XRenderSetPictureFilter (Display *dpy,
Picture picture,
const char *filter,
XFixed *params,
int nparams)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderSetPictureFilterReq *req;
int nbytes = strlen (filter);
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderSetPictureFilter, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderSetPictureFilter;
req->picture = picture;
req->nbytes = nbytes;
req->length += ((nbytes + 3) >> 2) + nparams;
Data (dpy, filter, nbytes);
Data (dpy, (_Xconst char *)params, nparams << 2);
UnlockDisplay(dpy);
SyncHandle();
}

712
src/Glyph.c Normal file
View File

@ -0,0 +1,712 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
GlyphSet
XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
GlyphSet gsid;
xRenderCreateGlyphSetReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateGlyphSet, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateGlyphSet;
req->gsid = gsid = XAllocID(dpy);
req->format = format->id;
UnlockDisplay(dpy);
SyncHandle();
return gsid;
}
GlyphSet
XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
GlyphSet gsid;
xRenderReferenceGlyphSetReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderReferenceGlyphSet, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderReferenceGlyphSet;
req->gsid = gsid = XAllocID(dpy);
req->existing = existing;
UnlockDisplay(dpy);
SyncHandle();
return gsid;
}
void
XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderFreeGlyphSetReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderFreeGlyphSet, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFreeGlyphSet;
req->glyphset = glyphset;
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderAddGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
_Xconst XGlyphInfo *glyphs,
int nglyphs,
_Xconst char *images,
int nbyte_images)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderAddGlyphsReq *req;
long len;
if (nbyte_images & 3)
nbyte_images += 4 - (nbyte_images & 3);
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderAddGlyphs, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderAddGlyphs;
req->glyphset = glyphset;
req->nglyphs = nglyphs;
len = (nglyphs * (SIZEOF (xGlyphInfo) + 4) + nbyte_images) >> 2;
SetReqLen(req, len, len);
Data32 (dpy, (long *) gids, nglyphs * 4);
Data16 (dpy, (short *) glyphs, nglyphs * SIZEOF (xGlyphInfo));
Data (dpy, images, nbyte_images);
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderFreeGlyphs (Display *dpy,
GlyphSet glyphset,
_Xconst Glyph *gids,
int nglyphs)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderFreeGlyphsReq *req;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderFreeGlyphs, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFreeGlyphs;
req->glyphset = glyphset;
len = nglyphs;
SetReqLen(req, len, len);
len <<= 2;
Data32 (dpy, (long *) gids, len);
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeString8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst char *string,
int nchar)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs8Req *req;
long len;
xGlyphElt *elt;
int nbytes;
if (!nchar)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs8, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs8;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
/*
* xGlyphElt must be aligned on a 32-bit boundary; this is
* easily done by filling no more than 252 glyphs in each
* bucket
*/
#define MAX_8 252
len = SIZEOF(xGlyphElt) * ((nchar + MAX_8-1) / MAX_8) + nchar;
req->length += (len + 3)>>2; /* convert to number of 32-bit words */
/*
* If the entire request does not fit into the remaining space in the
* buffer, flush the buffer first.
*/
if (dpy->bufptr + len > dpy->bufmax)
_XFlush (dpy);
while(nchar > MAX_8)
{
nbytes = MAX_8 + SIZEOF(xGlyphElt);
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = MAX_8;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
memcpy ((char *) (elt + 1), string, MAX_8);
nchar = nchar - MAX_8;
string += MAX_8;
}
if (nchar)
{
nbytes = (nchar + SIZEOF(xGlyphElt) + 3) & ~3;
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = nchar;
elt->deltax = xDst;
elt->deltay = yDst;
memcpy ((char *) (elt + 1), string, nchar);
}
#undef MAX_8
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeString16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned short *string,
int nchar)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs8Req *req;
long len;
xGlyphElt *elt;
int nbytes;
if (!nchar)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs16, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs16;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
#define MAX_16 254
len = SIZEOF(xGlyphElt) * ((nchar + MAX_16-1) / MAX_16) + nchar * 2;
req->length += (len + 3)>>2; /* convert to number of 32-bit words */
/*
* If the entire request does not fit into the remaining space in the
* buffer, flush the buffer first.
*/
if (dpy->bufptr + len > dpy->bufmax)
_XFlush (dpy);
while(nchar > MAX_16)
{
nbytes = MAX_16 * 2 + SIZEOF(xGlyphElt);
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = MAX_16;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
memcpy ((char *) (elt + 1), (char *) string, MAX_16 * 2);
nchar = nchar - MAX_16;
string += MAX_16;
}
if (nchar)
{
nbytes = (nchar * 2 + SIZEOF(xGlyphElt) + 3) & ~3;
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = nchar;
elt->deltax = xDst;
elt->deltay = yDst;
memcpy ((char *) (elt + 1), (char *) string, nchar * 2);
}
#undef MAX_16
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeString32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
GlyphSet glyphset,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst unsigned int *string,
int nchar)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs8Req *req;
long len;
xGlyphElt *elt;
int nbytes;
if (!nchar)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs32, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs32;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
#define MAX_32 254
len = SIZEOF(xGlyphElt) * ((nchar + MAX_32-1) / MAX_32) + nchar * 4;
req->length += (len + 3)>>2; /* convert to number of 32-bit words */
/*
* If the entire request does not fit into the remaining space in the
* buffer, flush the buffer first.
*/
if (dpy->bufptr + len > dpy->bufmax)
_XFlush (dpy);
while(nchar > MAX_32)
{
nbytes = MAX_32 * 4 + SIZEOF(xGlyphElt);
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = MAX_32;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
memcpy ((char *) (elt + 1), (char *) string, MAX_32 * 4);
nchar = nchar - MAX_32;
string += MAX_32;
}
if (nchar)
{
nbytes = nchar * 4 + SIZEOF(xGlyphElt);
BufAlloc (xGlyphElt *, elt, nbytes);
elt->len = nchar;
elt->deltax = xDst;
elt->deltay = yDst;
memcpy ((char *) (elt + 1), (char *) string, nchar * 4);
}
#undef MAX_32
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeText8 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt8 *elts,
int nelt)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs8Req *req;
GlyphSet glyphset;
long len;
long elen;
xGlyphElt *elt;
int i;
_Xconst char *chars;
int nchars;
if (!nelt)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs8, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs8;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = elts[0].glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
/*
* Compute the space necessary
*/
len = 0;
#define MAX_8 252
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Check for glyphset change
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
len += (SIZEOF (xGlyphElt) + 4) >> 2;
}
nchars = elts[i].nchars;
/*
* xGlyphElt must be aligned on a 32-bit boundary; this is
* easily done by filling no more than 252 glyphs in each
* bucket
*/
elen = SIZEOF(xGlyphElt) * ((nchars + MAX_8-1) / MAX_8) + nchars;
len += (elen + 3) >> 2;
}
req->length += len;
/*
* Send the glyphs
*/
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Switch glyphsets
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt));
elt->len = 0xff;
elt->deltax = 0;
elt->deltay = 0;
Data32(dpy, &glyphset, 4);
}
nchars = elts[i].nchars;
xDst = elts[i].xOff;
yDst = elts[i].yOff;
chars = elts[i].chars;
while (nchars)
{
int this_chars = nchars > MAX_8 ? MAX_8 : nchars;
BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt))
elt->len = this_chars;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
Data (dpy, chars, this_chars);
nchars -= this_chars;
chars += this_chars;
}
}
#undef MAX_8
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeText16 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt16 *elts,
int nelt)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs16Req *req;
GlyphSet glyphset;
long len;
long elen;
xGlyphElt *elt;
int i;
_Xconst unsigned short *chars;
int nchars;
if (!nelt)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs16, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs16;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = elts[0].glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
/*
* Compute the space necessary
*/
len = 0;
#define MAX_16 254
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Check for glyphset change
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
len += (SIZEOF (xGlyphElt) + 4) >> 2;
}
nchars = elts[i].nchars;
/*
* xGlyphElt must be aligned on a 32-bit boundary; this is
* easily done by filling no more than 254 glyphs in each
* bucket
*/
elen = SIZEOF(xGlyphElt) * ((nchars + MAX_16-1) / MAX_16) + nchars * 2;
len += (elen + 3) >> 2;
}
req->length += len;
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Switch glyphsets
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt));
elt->len = 0xff;
elt->deltax = 0;
elt->deltay = 0;
Data32(dpy, &glyphset, 4);
}
nchars = elts[i].nchars;
xDst = elts[i].xOff;
yDst = elts[i].yOff;
chars = elts[i].chars;
while (nchars)
{
int this_chars = nchars > MAX_16 ? MAX_16 : nchars;
int this_bytes = this_chars * 2;
BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt))
elt->len = this_chars;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
Data16 (dpy, chars, this_bytes);
nchars -= this_chars;
chars += this_chars;
}
}
#undef MAX_16
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeText32 (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XGlyphElt32 *elts,
int nelt)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderCompositeGlyphs32Req *req;
GlyphSet glyphset;
long len;
long elen;
xGlyphElt *elt;
int i;
_Xconst unsigned int *chars;
int nchars;
if (!nelt)
return;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderCompositeGlyphs32, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCompositeGlyphs32;
req->op = op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : None;
req->glyphset = elts[0].glyphset;
req->xSrc = xSrc;
req->ySrc = ySrc;
/*
* Compute the space necessary
*/
len = 0;
#define MAX_32 254
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Check for glyphset change
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
len += (SIZEOF (xGlyphElt) + 4) >> 2;
}
nchars = elts[i].nchars;
elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32-1) / MAX_32) + nchars *4;
len += (elen + 3) >> 2;
}
req->length += len;
glyphset = elts[0].glyphset;
for (i = 0; i < nelt; i++)
{
/*
* Switch glyphsets
*/
if (elts[i].glyphset != glyphset)
{
glyphset = elts[i].glyphset;
BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt));
elt->len = 0xff;
elt->deltax = 0;
elt->deltay = 0;
Data32(dpy, &glyphset, 4);
}
nchars = elts[i].nchars;
xDst = elts[i].xOff;
yDst = elts[i].yOff;
chars = elts[i].chars;
while (nchars)
{
int this_chars = nchars > MAX_32 ? MAX_32 : nchars;
int this_bytes = this_chars * 4;
BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt))
elt->len = this_chars;
elt->deltax = xDst;
elt->deltay = yDst;
xDst = 0;
yDst = 0;
DataInt32 (dpy, chars, this_bytes);
nchars -= this_chars;
chars += this_chars;
}
}
#undef MAX_32
UnlockDisplay(dpy);
SyncHandle();
}

27
src/Makefile.am Normal file
View File

@ -0,0 +1,27 @@
AM_CFLAGS = $(CWARNFLAGS) $(RENDER_CFLAGS) $(MALLOC_ZERO_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/X11/extensions
lib_LTLIBRARIES = libXrender.la
libXrender_la_SOURCES = AddTrap.c \
Color.c \
Composite.c \
Cursor.c \
FillRect.c \
FillRects.c \
Filter.c \
Glyph.c \
Picture.c \
Poly.c \
Trap.c \
Tri.c \
Xrender.c \
Xrenderint.h
libXrender_la_LIBADD = $(RENDER_LIBS)
# -version-number requires libtool >= 1.5
libXrender_la_LDFLAGS = -version-number 1:3:0 -no-undefined
libXrenderincludedir = $(includedir)/X11/extensions
libXrenderinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xrender.h

717
src/Makefile.in Normal file
View File

@ -0,0 +1,717 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp $(libXrenderinclude_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(libXrenderincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libXrender_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_libXrender_la_OBJECTS = AddTrap.lo Color.lo Composite.lo Cursor.lo \
FillRect.lo FillRects.lo Filter.lo Glyph.lo Picture.lo Poly.lo \
Trap.lo Tri.lo Xrender.lo
libXrender_la_OBJECTS = $(am_libXrender_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libXrender_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libXrender_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libXrender_la_SOURCES)
DIST_SOURCES = $(libXrender_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(libXrenderinclude_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RENDER_CFLAGS = @RENDER_CFLAGS@
RENDER_LIBS = @RENDER_LIBS@
RENDER_VERSION = @RENDER_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = $(CWARNFLAGS) $(RENDER_CFLAGS) $(MALLOC_ZERO_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/X11/extensions
lib_LTLIBRARIES = libXrender.la
libXrender_la_SOURCES = AddTrap.c \
Color.c \
Composite.c \
Cursor.c \
FillRect.c \
FillRects.c \
Filter.c \
Glyph.c \
Picture.c \
Poly.c \
Trap.c \
Tri.c \
Xrender.c \
Xrenderint.h
libXrender_la_LIBADD = $(RENDER_LIBS)
# -version-number requires libtool >= 1.5
libXrender_la_LDFLAGS = -version-number 1:3:0 -no-undefined
libXrenderincludedir = $(includedir)/X11/extensions
libXrenderinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xrender.h
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libXrender.la: $(libXrender_la_OBJECTS) $(libXrender_la_DEPENDENCIES) $(EXTRA_libXrender_la_DEPENDENCIES)
$(AM_V_CCLD)$(libXrender_la_LINK) -rpath $(libdir) $(libXrender_la_OBJECTS) $(libXrender_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AddTrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Color.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Composite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cursor.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FillRect.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FillRects.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Filter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Glyph.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Picture.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Poly.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Trap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Tri.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xrender.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-libXrenderincludeHEADERS: $(libXrenderinclude_HEADERS)
@$(NORMAL_INSTALL)
@list='$(libXrenderinclude_HEADERS)'; test -n "$(libXrenderincludedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(libXrenderincludedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libXrenderincludedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libXrenderincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(libXrenderincludedir)" || exit $$?; \
done
uninstall-libXrenderincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libXrenderinclude_HEADERS)'; test -n "$(libXrenderincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(libXrenderincludedir)'; $(am__uninstall_files_from_dir)
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libXrenderincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-libXrenderincludeHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES \
uninstall-libXrenderincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libLTLIBRARIES \
install-libXrenderincludeHEADERS install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-libXrenderincludeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

372
src/Picture.c Normal file
View File

@ -0,0 +1,372 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
#include <X11/Xregion.h>
static void
_XRenderProcessPictureAttributes (Display *dpy,
xRenderChangePictureReq *req,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes)
{
unsigned long values[32];
register unsigned long *value = values;
unsigned int nvalues;
if (valuemask & CPRepeat)
*value++ = attributes->repeat;
if (valuemask & CPAlphaMap)
*value++ = attributes->alpha_map;
if (valuemask & CPAlphaXOrigin)
*value++ = attributes->alpha_x_origin;
if (valuemask & CPAlphaYOrigin)
*value++ = attributes->alpha_y_origin;
if (valuemask & CPClipXOrigin)
*value++ = attributes->clip_x_origin;
if (valuemask & CPClipYOrigin)
*value++ = attributes->clip_y_origin;
if (valuemask & CPClipMask)
*value++ = attributes->clip_mask;
if (valuemask & CPGraphicsExposure)
*value++ = attributes->graphics_exposures;
if (valuemask & CPSubwindowMode)
*value++ = attributes->subwindow_mode;
if (valuemask & CPPolyEdge)
*value++ = attributes->poly_edge;
if (valuemask & CPPolyMode)
*value++ = attributes->poly_mode;
if (valuemask & CPDither)
*value++ = attributes->dither;
if (valuemask & CPComponentAlpha)
*value++ = attributes->component_alpha;
req->length += (nvalues = value - values);
nvalues <<= 2; /* watch out for macros... */
Data32 (dpy, (long *) values, (long)nvalues);
}
Picture
XRenderCreatePicture (Display *dpy,
Drawable drawable,
_Xconst XRenderPictFormat *format,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Picture pid;
xRenderCreatePictureReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreatePicture, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreatePicture;
req->pid = pid = XAllocID(dpy);
req->drawable = drawable;
req->format = format->id;
if ((req->mask = valuemask))
_XRenderProcessPictureAttributes (dpy,
(xRenderChangePictureReq *) req,
valuemask,
attributes);
UnlockDisplay(dpy);
SyncHandle();
return pid;
}
void
XRenderChangePicture (Display *dpy,
Picture picture,
unsigned long valuemask,
_Xconst XRenderPictureAttributes *attributes)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderChangePictureReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderChangePicture, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderChangePicture;
req->picture = picture;
req->mask = valuemask;
_XRenderProcessPictureAttributes (dpy,
req,
valuemask,
attributes);
UnlockDisplay(dpy);
SyncHandle();
}
static void
_XRenderSetPictureClipRectangles (Display *dpy,
XRenderExtDisplayInfo *info,
Picture picture,
int xOrigin,
int yOrigin,
_Xconst XRectangle *rects,
int n)
{
xRenderSetPictureClipRectanglesReq *req;
long len;
GetReq (RenderSetPictureClipRectangles, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderSetPictureClipRectangles;
req->picture = picture;
req->xOrigin = xOrigin;
req->yOrigin = yOrigin;
len = ((long) n) << 1;
SetReqLen (req, len, 1);
len <<= 2;
Data16 (dpy, (short *) rects, len);
}
void
XRenderSetPictureClipRectangles (Display *dpy,
Picture picture,
int xOrigin,
int yOrigin,
_Xconst XRectangle *rects,
int n)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
_XRenderSetPictureClipRectangles (dpy, info, picture,
xOrigin, yOrigin, rects, n);
UnlockDisplay (dpy);
SyncHandle ();
}
void
XRenderSetPictureClipRegion (Display *dpy,
Picture picture,
Region r)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
int i;
XRectangle *xr, *pr;
BOX *pb;
unsigned long total;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
total = r->numRects * sizeof (XRectangle);
if ((xr = (XRectangle *) _XAllocTemp(dpy, total))) {
for (pr = xr, pb = r->rects, i = r->numRects; --i >= 0; pr++, pb++) {
pr->x = pb->x1;
pr->y = pb->y1;
pr->width = pb->x2 - pb->x1;
pr->height = pb->y2 - pb->y1;
}
}
if (xr || !r->numRects)
_XRenderSetPictureClipRectangles (dpy, info, picture, 0, 0,
xr, r->numRects);
if (xr)
_XFreeTemp(dpy, (char *)xr, total);
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderSetPictureTransform (Display *dpy,
Picture picture,
XTransform *transform)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderSetPictureTransformReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq(RenderSetPictureTransform, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderSetPictureTransform;
req->picture = picture;
req->transform.matrix11 = transform->matrix[0][0];
req->transform.matrix12 = transform->matrix[0][1];
req->transform.matrix13 = transform->matrix[0][2];
req->transform.matrix21 = transform->matrix[1][0];
req->transform.matrix22 = transform->matrix[1][1];
req->transform.matrix23 = transform->matrix[1][2];
req->transform.matrix31 = transform->matrix[2][0];
req->transform.matrix32 = transform->matrix[2][1];
req->transform.matrix33 = transform->matrix[2][2];
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderFreePicture (Display *dpy,
Picture picture)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderFreePictureReq *req;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderFreePicture, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderFreePicture;
req->picture = picture;
UnlockDisplay(dpy);
SyncHandle();
}
Picture XRenderCreateSolidFill(Display *dpy,
const XRenderColor *color)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Picture pid;
xRenderCreateSolidFillReq *req;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateSolidFill, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateSolidFill;
req->pid = pid = XAllocID(dpy);
req->color.red = color->red;
req->color.green = color->green;
req->color.blue = color->blue;
req->color.alpha = color->alpha;
UnlockDisplay(dpy);
SyncHandle();
return pid;
}
Picture XRenderCreateLinearGradient(Display *dpy,
const XLinearGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nStops)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Picture pid;
xRenderCreateLinearGradientReq *req;
long len;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateLinearGradient, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateLinearGradient;
req->pid = pid = XAllocID(dpy);
req->p1.x = gradient->p1.x;
req->p1.y = gradient->p1.y;
req->p2.x = gradient->p2.x;
req->p2.y = gradient->p2.y;
req->nStops = nStops;
len = (long) nStops * 3;
SetReqLen (req, len, 6);
DataInt32(dpy, stops, nStops * 4);
Data16(dpy, colors, nStops * 8);
UnlockDisplay(dpy);
SyncHandle();
return pid;
}
Picture XRenderCreateRadialGradient(Display *dpy,
const XRadialGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nStops)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Picture pid;
xRenderCreateRadialGradientReq *req;
long len;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateRadialGradient, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateRadialGradient;
req->pid = pid = XAllocID(dpy);
req->inner.x = gradient->inner.x;
req->inner.y = gradient->inner.y;
req->outer.x = gradient->outer.x;
req->outer.y = gradient->outer.y;
req->inner_radius = gradient->inner.radius;
req->outer_radius = gradient->outer.radius;
req->nStops = nStops;
len = (long) nStops * 3;
SetReqLen (req, len, 6);
DataInt32(dpy, stops, nStops * 4);
Data16(dpy, colors, nStops * 8);
UnlockDisplay(dpy);
SyncHandle();
return pid;
}
Picture XRenderCreateConicalGradient(Display *dpy,
const XConicalGradient *gradient,
const XFixed *stops,
const XRenderColor *colors,
int nStops)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
Picture pid;
xRenderCreateConicalGradientReq *req;
long len;
RenderCheckExtension (dpy, info, 0);
LockDisplay(dpy);
GetReq(RenderCreateConicalGradient, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderCreateConicalGradient;
req->pid = pid = XAllocID(dpy);
req->center.x = gradient->center.x;
req->center.y = gradient->center.y;
req->angle = gradient->angle;
req->nStops = nStops;
len = (long) nStops * 3;
SetReqLen (req, len, 6);
DataInt32(dpy, stops, nStops * 4);
Data16(dpy, colors, nStops * 8);
UnlockDisplay(dpy);
SyncHandle();
return pid;
}

302
src/Poly.c Normal file
View File

@ -0,0 +1,302 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
typedef struct _Edge Edge;
struct _Edge {
XLineFixed edge;
XFixed current_x;
Bool clockWise;
Edge *next, *prev;
};
static int
CompareEdge (const void *o1, const void *o2)
{
const Edge *e1 = o1, *e2 = o2;
return e1->edge.p1.y - e2->edge.p1.y;
}
static XFixed
XRenderComputeX (XLineFixed *line, XFixed y)
{
XFixed dx = line->p2.x - line->p1.x;
double ex = (double) (y - line->p1.y) * (double) dx;
XFixed dy = line->p2.y - line->p1.y;
return (XFixed) line->p1.x + (XFixed) (ex / dy);
}
static double
XRenderComputeInverseSlope (XLineFixed *l)
{
return (XFixedToDouble (l->p2.x - l->p1.x) /
XFixedToDouble (l->p2.y - l->p1.y));
}
static double
XRenderComputeXIntercept (XLineFixed *l, double inverse_slope)
{
return XFixedToDouble (l->p1.x) - inverse_slope * XFixedToDouble (l->p1.y);
}
static XFixed
XRenderComputeIntersect (XLineFixed *l1, XLineFixed *l2)
{
/*
* x = m1y + b1
* x = m2y + b2
* m1y + b1 = m2y + b2
* y * (m1 - m2) = b2 - b1
* y = (b2 - b1) / (m1 - m2)
*/
double m1 = XRenderComputeInverseSlope (l1);
double b1 = XRenderComputeXIntercept (l1, m1);
double m2 = XRenderComputeInverseSlope (l2);
double b2 = XRenderComputeXIntercept (l2, m2);
return XDoubleToFixed ((b2 - b1) / (m1 - m2));
}
static int
XRenderComputeTrapezoids (Edge *edges,
int nedges,
int winding,
XTrapezoid *traps)
{
int ntraps = 0;
int inactive;
Edge *active;
Edge *e, *en, *next;
XFixed y, next_y, intersect;
qsort (edges, nedges, sizeof (Edge), CompareEdge);
y = edges[0].edge.p1.y;
active = NULL;
inactive = 0;
while (active || inactive < nedges)
{
/* insert new active edges into list */
while (inactive < nedges)
{
e = &edges[inactive];
if (e->edge.p1.y > y)
break;
/* move this edge into the active list */
inactive++;
e->next = active;
e->prev = NULL;
if (active)
active->prev = e;
active = e;
}
/* compute x coordinates along this group */
for (e = active; e; e = e->next)
e->current_x = XRenderComputeX (&e->edge, y);
/* sort active list */
for (e = active; e; e = next)
{
next = e->next;
/*
* Find one later in the list that belongs before the
* current one
*/
for (en = next; en; en = en->next)
{
if (en->current_x < e->current_x ||
(en->current_x == e->current_x &&
en->edge.p2.x < e->edge.p2.x))
{
/*
* insert en before e
*
* extract en
*/
en->prev->next = en->next;
if (en->next)
en->next->prev = en->prev;
/*
* insert en
*/
if (e->prev)
e->prev->next = en;
else
active = en;
en->prev = e->prev;
e->prev = en;
en->next = e;
/*
* start over at en
*/
next = en;
break;
}
}
}
#if 0
printf ("y: %6.3g:", y / 65536.0);
for (e = active; e; e = e->next)
{
printf (" %6.3g", e->current_x / 65536.0);
}
printf ("\n");
#endif
/* find next inflection point */
next_y = active->edge.p2.y;
for (e = active; e; e = en)
{
if (e->edge.p2.y < next_y)
next_y = e->edge.p2.y;
en = e->next;
/* check intersect */
if (en && e->edge.p2.x > en->edge.p2.x)
{
intersect = XRenderComputeIntersect (&e->edge, &e->next->edge);
/* make sure this point is below the actual intersection */
intersect = intersect + 1;
if (intersect < next_y)
next_y = intersect;
}
}
/* check next inactive point */
if (inactive < nedges && edges[inactive].edge.p1.y < next_y)
next_y = edges[inactive].edge.p1.y;
/* walk the list generating trapezoids */
for (e = active; e && (en = e->next); e = en->next)
{
traps->top = y;
traps->bottom = next_y;
traps->left = e->edge;
traps->right = en->edge;
traps++;
ntraps++;
}
y = next_y;
/* delete inactive edges from list */
for (e = active; e; e = next)
{
next = e->next;
if (e->edge.p2.y <= y)
{
if (e->prev)
e->prev->next = e->next;
else
active = e->next;
if (e->next)
e->next->prev = e->prev;
}
}
}
return ntraps;
}
void
XRenderCompositeDoublePoly (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
int xDst,
int yDst,
_Xconst XPointDouble *fpoints,
int npoints,
int winding)
{
Edge *edges;
XTrapezoid *traps;
int i, nedges, ntraps;
XFixed x, y, prevx = 0, prevy = 0, firstx = 0, firsty = 0;
XFixed top = 0, bottom = 0; /* GCCism */
edges = (Edge *) Xmalloc (npoints * sizeof (Edge) +
(npoints * npoints * sizeof (XTrapezoid)));
if (!edges)
return;
traps = (XTrapezoid *) (edges + npoints);
nedges = 0;
for (i = 0; i <= npoints; i++)
{
if (i == npoints)
{
x = firstx;
y = firsty;
}
else
{
x = XDoubleToFixed (fpoints[i].x);
y = XDoubleToFixed (fpoints[i].y);
}
if (i)
{
if (y < top)
top = y;
else if (y > bottom)
bottom = y;
if (prevy < y)
{
edges[nedges].edge.p1.x = prevx;
edges[nedges].edge.p1.y = prevy;
edges[nedges].edge.p2.x = x;
edges[nedges].edge.p2.y = y;
edges[nedges].clockWise = True;
nedges++;
}
else if (prevy > y)
{
edges[nedges].edge.p1.x = x;
edges[nedges].edge.p1.y = y;
edges[nedges].edge.p2.x = prevx;
edges[nedges].edge.p2.y = prevy;
edges[nedges].clockWise = False;
nedges++;
}
/* drop horizontal edges */
}
else
{
top = y;
bottom = y;
firstx = x;
firsty = y;
}
prevx = x;
prevy = y;
}
ntraps = XRenderComputeTrapezoids (edges, nedges, winding, traps);
/* XXX adjust xSrc/xDst */
XRenderCompositeTrapezoids (dpy, op, src, dst, maskFormat, xSrc, ySrc, traps, ntraps);
Xfree (edges);
}

74
src/Trap.c Normal file
View File

@ -0,0 +1,74 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderCompositeTrapezoids (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTrapezoid *traps,
int ntrap)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTrapezoidsReq *req;
int n;
long len;
unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (ntrap)
{
GetReq(RenderTrapezoids, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTrapezoids;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = ntrap;
len = ((long) n) * (SIZEOF (xTrapezoid) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrapezoid) >> 2);
len = ((long)n) * (SIZEOF (xTrapezoid) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) traps, len);
ntrap -= n;
traps += n;
}
UnlockDisplay(dpy);
SyncHandle();
}

169
src/Tri.c Normal file
View File

@ -0,0 +1,169 @@
/*
*
* Copyright © 2002 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.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
void
XRenderCompositeTriangles (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XTriangle *triangles,
int ntriangle)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTrianglesReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (ntriangle)
{
GetReq(RenderTriangles, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriangles;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = ntriangle;
len = ((long) n) * (SIZEOF (xTriangle) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xTriangle) >> 2);
len = ((long)n) * (SIZEOF (xTriangle) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) triangles, len);
ntriangle -= n;
triangles += n;
}
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeTriStrip (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderTriStripReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
while (npoint > 2)
{
GetReq(RenderTriStrip, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriStrip;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
n = npoint;
len = ((long) n) * (SIZEOF (xPointFixed) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2);
len = ((long)n) * (SIZEOF (xPointFixed) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) points, len);
npoint -= (n - 2);
points += (n - 2);
}
UnlockDisplay(dpy);
SyncHandle();
}
void
XRenderCompositeTriFan (Display *dpy,
int op,
Picture src,
Picture dst,
_Xconst XRenderPictFormat *maskFormat,
int xSrc,
int ySrc,
_Xconst XPointFixed *points,
int npoint)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
_Xconst XPointFixed *first = points;
xPointFixed *p;
xRenderTriFanReq *req;
int n;
long len;
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
points++;
npoint--;
while (npoint > 1)
{
GetReqExtra(RenderTriFan, SIZEOF (xPointFixed), req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderTriFan;
req->op = (CARD8) op;
req->src = src;
req->dst = dst;
req->maskFormat = maskFormat ? maskFormat->id : 0;
req->xSrc = xSrc;
req->ySrc = ySrc;
p = (xPointFixed *) (req + 1);
p->x = first->x;
p->y = first->y;
n = npoint;
len = ((long) n) * (SIZEOF (xPointFixed) >> 2);
if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) {
n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2);
len = ((long)n) * (SIZEOF (xPointFixed) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
DataInt32 (dpy, (int *) points, len);
npoint -= (n - 1);
points += (n - 1);
}
UnlockDisplay(dpy);
SyncHandle();
}

926
src/Xrender.c Normal file
View File

@ -0,0 +1,926 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xrenderint.h"
#include <limits.h>
XRenderExtInfo XRenderExtensionInfo;
char XRenderExtensionName[] = RENDER_NAME;
static int XRenderCloseDisplay (Display *dpy, XExtCodes *codes);
/*
* XRenderExtFindDisplay - look for a display in this extension; keeps a
* cache of the most-recently used for efficiency. (Replaces
* XextFindDisplay.)
*/
static XRenderExtDisplayInfo *
XRenderExtFindDisplay (XRenderExtInfo *extinfo,
Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo;
/*
* see if this was the most recently accessed display
*/
if ((dpyinfo = extinfo->cur) && dpyinfo->display == dpy)
return dpyinfo;
/*
* look for display in list
*/
_XLockMutex(_Xglobal_lock);
for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) {
if (dpyinfo->display == dpy) {
extinfo->cur = dpyinfo; /* cache most recently used */
_XUnlockMutex(_Xglobal_lock);
return dpyinfo;
}
}
_XUnlockMutex(_Xglobal_lock);
return NULL;
}
/*
* If the server is missing support for any of the required depths on
* any screen, tell the application that Render is not present.
*/
#define DEPTH_MASK(d) (1U << ((d) - 1))
/*
* Render requires support for depth 1, 4, 8, 24 and 32 pixmaps
*/
#define REQUIRED_DEPTHS (DEPTH_MASK(1) | \
DEPTH_MASK(4) | \
DEPTH_MASK(8) | \
DEPTH_MASK(24) | \
DEPTH_MASK(32))
typedef struct _DepthCheckRec {
struct _DepthCheckRec *next;
Display *dpy;
CARD32 missing;
unsigned long serial;
} DepthCheckRec, *DepthCheckPtr;
static DepthCheckPtr depthChecks;
static int
XRenderDepthCheckErrorHandler (Display *dpy, XErrorEvent *evt)
{
if (evt->request_code == X_CreatePixmap && evt->error_code == BadValue)
{
DepthCheckPtr d;
_XLockMutex(_Xglobal_lock);
for (d = depthChecks; d; d = d->next)
if (d->dpy == dpy)
{
if ((long) (evt->serial - d->serial) >= 0)
d->missing |= DEPTH_MASK(evt->resourceid);
break;
}
_XUnlockMutex (_Xglobal_lock);
}
return 0;
}
static Bool
XRenderHasDepths (Display *dpy)
{
int s;
for (s = 0; s < ScreenCount (dpy); s++)
{
CARD32 depths = 0;
CARD32 missing;
Screen *scr = ScreenOfDisplay (dpy, s);
int d;
for (d = 0; d < scr->ndepths; d++)
depths |= DEPTH_MASK(scr->depths[d].depth);
missing = ~depths & REQUIRED_DEPTHS;
if (missing)
{
DepthCheckRec dc, **dp;
XErrorHandler previousHandler;
/*
* Ok, this is ugly. It should be sufficient at this
* point to just return False, but Xinerama is broken at
* this point and only advertises depths which have an
* associated visual. Of course, the other depths still
* work, but the only way to find out is to try them.
*/
dc.dpy = dpy;
dc.missing = 0;
dc.serial = XNextRequest (dpy);
_XLockMutex(_Xglobal_lock);
dc.next = depthChecks;
depthChecks = &dc;
_XUnlockMutex (_Xglobal_lock);
/*
* I suspect this is not really thread safe, but Xlib doesn't
* provide a lot of options here
*/
previousHandler = XSetErrorHandler (XRenderDepthCheckErrorHandler);
/*
* Try each missing depth and see if pixmap creation succeeds
*/
for (d = 1; d <= 32; d++)
/* don't check depth 1 == Xcursor recurses... */
if ((missing & DEPTH_MASK(d)) && d != 1)
{
Pixmap p;
p = XCreatePixmap (dpy, RootWindow (dpy, s), 1, 1, d);
XFreePixmap (dpy, p);
}
XSync (dpy, False);
XSetErrorHandler (previousHandler);
/*
* Unhook from the list of depth check records
*/
_XLockMutex(_Xglobal_lock);
for (dp = &depthChecks; *dp; dp = &(*dp)->next)
{
if (*dp == &dc)
{
*dp = dc.next;
break;
}
}
_XUnlockMutex (_Xglobal_lock);
if (dc.missing)
return False;
}
}
return True;
}
/*
* XRenderExtAddDisplay - add a display to this extension. (Replaces
* XextAddDisplay)
*/
static XRenderExtDisplayInfo *
XRenderExtAddDisplay (XRenderExtInfo *extinfo,
Display *dpy,
char *ext_name)
{
XRenderExtDisplayInfo *dpyinfo;
dpyinfo = (XRenderExtDisplayInfo *) Xmalloc (sizeof (XRenderExtDisplayInfo));
if (!dpyinfo) return NULL;
dpyinfo->display = dpy;
dpyinfo->info = NULL;
if (XRenderHasDepths (dpy))
dpyinfo->codes = XInitExtension (dpy, ext_name);
else
dpyinfo->codes = NULL;
/*
* if the server has the extension, then we can initialize the
* appropriate function vectors
*/
if (dpyinfo->codes) {
XESetCloseDisplay (dpy, dpyinfo->codes->extension,
XRenderCloseDisplay);
} else {
/* The server doesn't have this extension.
* Use a private Xlib-internal extension to hang the close_display
* hook on so that the "cache" (extinfo->cur) is properly cleaned.
* (XBUG 7955)
*/
XExtCodes *codes = XAddExtension(dpy);
if (!codes) {
XFree(dpyinfo);
return NULL;
}
XESetCloseDisplay (dpy, codes->extension, XRenderCloseDisplay);
}
/*
* now, chain it onto the list
*/
_XLockMutex(_Xglobal_lock);
dpyinfo->next = extinfo->head;
extinfo->head = dpyinfo;
extinfo->cur = dpyinfo;
extinfo->ndisplays++;
_XUnlockMutex(_Xglobal_lock);
return dpyinfo;
}
/*
* XRenderExtRemoveDisplay - remove the indicated display from the
* extension object. (Replaces XextRemoveDisplay.)
*/
static int
XRenderExtRemoveDisplay (XRenderExtInfo *extinfo, Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo, *prev;
/*
* locate this display and its back link so that it can be removed
*/
_XLockMutex(_Xglobal_lock);
prev = NULL;
for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) {
if (dpyinfo->display == dpy) break;
prev = dpyinfo;
}
if (!dpyinfo) {
_XUnlockMutex(_Xglobal_lock);
return 0; /* hmm, actually an error */
}
/*
* remove the display from the list; handles going to zero
*/
if (prev)
prev->next = dpyinfo->next;
else
extinfo->head = dpyinfo->next;
extinfo->ndisplays--;
if (dpyinfo == extinfo->cur) extinfo->cur = NULL; /* flush cache */
_XUnlockMutex(_Xglobal_lock);
Xfree ((char *) dpyinfo);
return 1;
}
XRenderExtDisplayInfo *
XRenderFindDisplay (Display *dpy)
{
XRenderExtDisplayInfo *dpyinfo;
dpyinfo = XRenderExtFindDisplay (&XRenderExtensionInfo, dpy);
if (!dpyinfo)
dpyinfo = XRenderExtAddDisplay (&XRenderExtensionInfo, dpy,
XRenderExtensionName);
return dpyinfo;
}
static int
XRenderCloseDisplay (Display *dpy, XExtCodes *codes)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
if (info && info->info) XFree (info->info);
return XRenderExtRemoveDisplay (&XRenderExtensionInfo, dpy);
}
/****************************************************************************
* *
* Render public interfaces *
* *
****************************************************************************/
Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
if (RenderHasExtension(info)) {
*event_basep = info->codes->first_event;
*error_basep = info->codes->first_error;
return True;
} else {
return False;
}
}
Status XRenderQueryVersion (Display *dpy,
int *major_versionp,
int *minor_versionp)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
if (!RenderHasExtension (info))
return 0;
if (!XRenderQueryFormats (dpy))
return 0;
xri = info->info;
*major_versionp = xri->major_version;
*minor_versionp = xri->minor_version;
return 1;
}
static XRenderPictFormat *
_XRenderFindFormat (XRenderInfo *xri, PictFormat format)
{
int nf;
for (nf = 0; nf < xri->nformat; nf++)
if (xri->format[nf].id == format)
return &xri->format[nf];
return NULL;
}
static Visual *
_XRenderFindVisual (Display *dpy, VisualID vid)
{
return _XVIDtoVisual (dpy, vid);
}
typedef struct _renderVersionState {
unsigned long version_seq;
Bool error;
int major_version;
int minor_version;
} _XrenderVersionState;
static Bool
_XRenderVersionHandler (Display *dpy,
xReply *rep,
char *buf,
int len,
XPointer data)
{
xRenderQueryVersionReply replbuf;
xRenderQueryVersionReply *repl;
_XrenderVersionState *state = (_XrenderVersionState *) data;
if (dpy->last_request_read != state->version_seq)
return False;
if (rep->generic.type == X_Error)
{
state->error = True;
return False;
}
repl = (xRenderQueryVersionReply *)
_XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len,
(SIZEOF(xRenderQueryVersionReply) - SIZEOF(xReply)) >> 2,
True);
state->major_version = repl->majorVersion;
state->minor_version = repl->minorVersion;
return True;
}
Status
XRenderQueryFormats (Display *dpy)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
_XAsyncHandler async;
_XrenderVersionState async_state;
xRenderQueryVersionReq *vreq;
xRenderQueryPictFormatsReply rep;
xRenderQueryPictFormatsReq *req;
XRenderInfo *xri;
XRenderPictFormat *format;
XRenderScreen *screen;
XRenderDepth *depth;
XRenderVisual *visual;
xPictFormInfo *xFormat;
xPictScreen *xScreen;
xPictDepth *xDepth;
xPictVisual *xVisual;
CARD32 *xSubpixel;
void *xData;
int nf, ns, nd, nv;
unsigned long rlength;
unsigned long nbytes;
RenderCheckExtension (dpy, info, 0);
LockDisplay (dpy);
if (info->info)
{
UnlockDisplay (dpy);
return 1;
}
GetReq (RenderQueryVersion, vreq);
vreq->reqType = info->codes->major_opcode;
vreq->renderReqType = X_RenderQueryVersion;
vreq->majorVersion = RENDER_MAJOR;
vreq->minorVersion = RENDER_MINOR;
async_state.version_seq = dpy->request;
async_state.error = False;
async.next = dpy->async_handlers;
async.handler = _XRenderVersionHandler;
async.data = (XPointer) &async_state;
dpy->async_handlers = &async;
GetReq (RenderQueryPictFormats, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryPictFormats;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
DeqAsyncHandler (dpy, &async);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
DeqAsyncHandler (dpy, &async);
if (async_state.error)
{
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
/*
* Check for the lack of sub-pixel data
*/
if (async_state.major_version == 0 && async_state.minor_version < 6)
rep.numSubpixel = 0;
if ((rep.numFormats < ((INT_MAX / 4) / sizeof (XRenderPictFormat))) &&
(rep.numScreens < ((INT_MAX / 4) / sizeof (XRenderScreen))) &&
(rep.numDepths < ((INT_MAX / 4) / sizeof (XRenderDepth))) &&
(rep.numVisuals < ((INT_MAX / 4) / sizeof (XRenderVisual))) &&
(rep.numSubpixel < ((INT_MAX / 4) / 4)) &&
(rep.length < (INT_MAX >> 2)) ) {
xri = Xmalloc (sizeof (XRenderInfo) +
(rep.numFormats * sizeof (XRenderPictFormat)) +
(rep.numScreens * sizeof (XRenderScreen)) +
(rep.numDepths * sizeof (XRenderDepth)) +
(rep.numVisuals * sizeof (XRenderVisual)));
rlength = ((rep.numFormats * sizeof (xPictFormInfo)) +
(rep.numScreens * sizeof (xPictScreen)) +
(rep.numDepths * sizeof (xPictDepth)) +
(rep.numVisuals * sizeof (xPictVisual)) +
(rep.numSubpixel * 4));
xData = Xmalloc (rlength);
nbytes = (unsigned long) rep.length << 2;
} else {
xri = NULL;
xData = NULL;
rlength = nbytes = 0;
}
if (!xri || !xData || nbytes < rlength)
{
if (xri) Xfree (xri);
if (xData) Xfree (xData);
_XEatDataWords (dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
xri->major_version = async_state.major_version;
xri->minor_version = async_state.minor_version;
xri->format = (XRenderPictFormat *) (xri + 1);
xri->nformat = rep.numFormats;
xri->screen = (XRenderScreen *) (xri->format + rep.numFormats);
xri->nscreen = rep.numScreens;
xri->depth = (XRenderDepth *) (xri->screen + rep.numScreens);
xri->ndepth = rep.numDepths;
xri->visual = (XRenderVisual *) (xri->depth + rep.numDepths);
xri->nvisual = rep.numVisuals;
_XRead (dpy, (char *) xData, rlength);
format = xri->format;
xFormat = (xPictFormInfo *) xData;
for (nf = 0; nf < rep.numFormats; nf++)
{
format->id = xFormat->id;
format->type = xFormat->type;
format->depth = xFormat->depth;
format->direct.red = xFormat->direct.red;
format->direct.redMask = xFormat->direct.redMask;
format->direct.green = xFormat->direct.green;
format->direct.greenMask = xFormat->direct.greenMask;
format->direct.blue = xFormat->direct.blue;
format->direct.blueMask = xFormat->direct.blueMask;
format->direct.alpha = xFormat->direct.alpha;
format->direct.alphaMask = xFormat->direct.alphaMask;
format->colormap = xFormat->colormap;
format++;
xFormat++;
}
xScreen = (xPictScreen *) xFormat;
screen = xri->screen;
depth = xri->depth;
visual = xri->visual;
for (ns = 0; ns < xri->nscreen; ns++)
{
screen->depths = depth;
screen->ndepths = xScreen->nDepth;
screen->fallback = _XRenderFindFormat (xri, xScreen->fallback);
screen->subpixel = SubPixelUnknown;
xDepth = (xPictDepth *) (xScreen + 1);
if (screen->ndepths > rep.numDepths) {
Xfree (xri);
Xfree (xData);
_XEatDataWords (dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
rep.numDepths -= screen->ndepths;
for (nd = 0; nd < screen->ndepths; nd++)
{
depth->depth = xDepth->depth;
depth->nvisuals = xDepth->nPictVisuals;
depth->visuals = visual;
xVisual = (xPictVisual *) (xDepth + 1);
if (depth->nvisuals > rep.numVisuals) {
Xfree (xri);
Xfree (xData);
_XEatDataWords (dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return 0;
}
rep.numVisuals -= depth->nvisuals;
for (nv = 0; nv < depth->nvisuals; nv++)
{
visual->visual = _XRenderFindVisual (dpy, xVisual->visual);
visual->format = _XRenderFindFormat (xri, xVisual->format);
visual++;
xVisual++;
}
depth++;
xDepth = (xPictDepth *) xVisual;
}
screen++;
xScreen = (xPictScreen *) xDepth;
}
xSubpixel = (CARD32 *) xScreen;
screen = xri->screen;
for (ns = 0; ns < rep.numSubpixel; ns++)
{
screen->subpixel = *xSubpixel;
xSubpixel++;
screen++;
}
info->info = xri;
/*
* Skip any extra data
*/
if (nbytes > rlength)
_XEatData (dpy, (unsigned long) (nbytes - rlength));
UnlockDisplay (dpy);
SyncHandle ();
Xfree (xData);
return 1;
}
int
XRenderQuerySubpixelOrder (Display *dpy, int screen)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
if (!RenderHasExtension (info))
return SubPixelUnknown;
if (!XRenderQueryFormats (dpy))
return SubPixelUnknown;
xri = info->info;
return xri->screen[screen].subpixel;
}
Bool
XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
if (!RenderHasExtension (info))
return False;
if (!XRenderQueryFormats (dpy))
return False;
xri = info->info;
xri->screen[screen].subpixel = subpixel;
return True;
}
XRenderPictFormat *
XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
int nv;
XRenderInfo *xri;
XRenderVisual *xrv;
RenderCheckExtension (dpy, info, NULL);
if (!XRenderQueryFormats (dpy))
return NULL;
xri = info->info;
for (nv = 0, xrv = xri->visual; nv < xri->nvisual; nv++, xrv++)
if (xrv->visual == visual)
return xrv->format;
return NULL;
}
XRenderPictFormat *
XRenderFindFormat (Display *dpy,
unsigned long mask,
_Xconst XRenderPictFormat *template,
int count)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
int nf;
XRenderInfo *xri;
RenderCheckExtension (dpy, info, NULL);
if (!XRenderQueryFormats (dpy))
return NULL;
xri = info->info;
for (nf = 0; nf < xri->nformat; nf++)
{
if (mask & PictFormatID)
if (template->id != xri->format[nf].id)
continue;
if (mask & PictFormatType)
if (template->type != xri->format[nf].type)
continue;
if (mask & PictFormatDepth)
if (template->depth != xri->format[nf].depth)
continue;
if (mask & PictFormatRed)
if (template->direct.red != xri->format[nf].direct.red)
continue;
if (mask & PictFormatRedMask)
if (template->direct.redMask != xri->format[nf].direct.redMask)
continue;
if (mask & PictFormatGreen)
if (template->direct.green != xri->format[nf].direct.green)
continue;
if (mask & PictFormatGreenMask)
if (template->direct.greenMask != xri->format[nf].direct.greenMask)
continue;
if (mask & PictFormatBlue)
if (template->direct.blue != xri->format[nf].direct.blue)
continue;
if (mask & PictFormatBlueMask)
if (template->direct.blueMask != xri->format[nf].direct.blueMask)
continue;
if (mask & PictFormatAlpha)
if (template->direct.alpha != xri->format[nf].direct.alpha)
continue;
if (mask & PictFormatAlphaMask)
if (template->direct.alphaMask != xri->format[nf].direct.alphaMask)
continue;
if (mask & PictFormatColormap)
if (template->colormap != xri->format[nf].colormap)
continue;
if (count-- == 0)
return &xri->format[nf];
}
return NULL;
}
XRenderPictFormat *
XRenderFindStandardFormat (Display *dpy,
int format)
{
static struct {
XRenderPictFormat templ;
unsigned long mask;
} standardFormats[PictStandardNUM] = {
/* PictStandardARGB32 */
{
{
0, /* id */
PictTypeDirect, /* type */
32, /* depth */
{ /* direct */
16, /* direct.red */
0xff, /* direct.redMask */
8, /* direct.green */
0xff, /* direct.greenMask */
0, /* direct.blue */
0xff, /* direct.blueMask */
24, /* direct.alpha */
0xff, /* direct.alphaMask */
},
0, /* colormap */
},
PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
PictFormatGreen |
PictFormatGreenMask |
PictFormatBlue |
PictFormatBlueMask |
PictFormatAlpha |
PictFormatAlphaMask,
},
/* PictStandardRGB24 */
{
{
0, /* id */
PictTypeDirect, /* type */
24, /* depth */
{ /* direct */
16, /* direct.red */
0xff, /* direct.redMask */
8, /* direct.green */
0xff, /* direct.greenMask */
0, /* direct.blue */
0xff, /* direct.blueMask */
0, /* direct.alpha */
0x00, /* direct.alphaMask */
},
0, /* colormap */
},
PictFormatType |
PictFormatDepth |
PictFormatRed |
PictFormatRedMask |
PictFormatGreen |
PictFormatGreenMask |
PictFormatBlue |
PictFormatBlueMask |
PictFormatAlphaMask,
},
/* PictStandardA8 */
{
{
0, /* id */
PictTypeDirect, /* type */
8, /* depth */
{ /* direct */
0, /* direct.red */
0x00, /* direct.redMask */
0, /* direct.green */
0x00, /* direct.greenMask */
0, /* direct.blue */
0x00, /* direct.blueMask */
0, /* direct.alpha */
0xff, /* direct.alphaMask */
},
0, /* colormap */
},
PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
PictFormatBlueMask |
PictFormatAlpha |
PictFormatAlphaMask,
},
/* PictStandardA4 */
{
{
0, /* id */
PictTypeDirect, /* type */
4, /* depth */
{ /* direct */
0, /* direct.red */
0x00, /* direct.redMask */
0, /* direct.green */
0x00, /* direct.greenMask */
0, /* direct.blue */
0x00, /* direct.blueMask */
0, /* direct.alpha */
0x0f, /* direct.alphaMask */
},
0, /* colormap */
},
PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
PictFormatBlueMask |
PictFormatAlpha |
PictFormatAlphaMask,
},
/* PictStandardA1 */
{
{
0, /* id */
PictTypeDirect, /* type */
1, /* depth */
{ /* direct */
0, /* direct.red */
0x00, /* direct.redMask */
0, /* direct.green */
0x00, /* direct.greenMask */
0, /* direct.blue */
0x00, /* direct.blueMask */
0, /* direct.alpha */
0x01, /* direct.alphaMask */
},
0, /* colormap */
},
PictFormatType |
PictFormatDepth |
PictFormatRedMask |
PictFormatGreenMask |
PictFormatBlueMask |
PictFormatAlpha |
PictFormatAlphaMask,
},
};
if (0 <= format && format < PictStandardNUM)
return XRenderFindFormat (dpy,
standardFormats[format].mask,
&standardFormats[format].templ,
0);
return NULL;
}
XIndexValue *
XRenderQueryPictIndexValues(Display *dpy,
_Xconst XRenderPictFormat *format,
int *num)
{
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderQueryPictIndexValuesReq *req;
xRenderQueryPictIndexValuesReply rep;
XIndexValue *values;
unsigned int nbytes, nread, rlength, i;
RenderCheckExtension (dpy, info, NULL);
LockDisplay (dpy);
GetReq (RenderQueryPictIndexValues, req);
req->reqType = info->codes->major_opcode;
req->renderReqType = X_RenderQueryPictIndexValues;
req->format = format->id;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
if ((rep.length < (INT_MAX >> 2)) &&
(rep.numIndexValues < (INT_MAX / sizeof (XIndexValue)))) {
/* request data length */
nbytes = rep.length << 2;
/* bytes of actual data in the request */
nread = rep.numIndexValues * SIZEOF (xIndexValue);
/* size of array returned to application */
rlength = rep.numIndexValues * sizeof (XIndexValue);
/* allocate returned data */
values = Xmalloc (rlength);
} else {
nbytes = nread = rlength = 0;
values = NULL;
}
if (!values)
{
_XEatDataWords (dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
/* read the values one at a time and convert */
*num = rep.numIndexValues;
for(i = 0; i < rep.numIndexValues; i++)
{
xIndexValue value;
_XRead (dpy, (char *) &value, SIZEOF (xIndexValue));
values[i].pixel = value.pixel;
values[i].red = value.red;
values[i].green = value.green;
values[i].blue = value.blue;
values[i].alpha = value.alpha;
}
/* skip any padding */
if(nbytes > nread)
{
_XEatData (dpy, (unsigned long) (nbytes - nread));
}
UnlockDisplay (dpy);
SyncHandle ();
return values;
}

112
src/Xrenderint.h Normal file
View File

@ -0,0 +1,112 @@
/*
*
* Copyright © 2000 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.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _XRENDERINT_H_
#define _XRENDERINT_H_
#include "config.h"
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
#include <X11/extensions/renderproto.h>
#include "Xrender.h"
typedef struct {
Visual *visual;
XRenderPictFormat *format;
} XRenderVisual;
typedef struct {
int depth;
int nvisuals;
XRenderVisual *visuals;
} XRenderDepth;
typedef struct {
XRenderDepth *depths;
int ndepths;
XRenderPictFormat *fallback;
int subpixel;
} XRenderScreen;
typedef struct _XRenderInfo {
int major_version;
int minor_version;
XRenderPictFormat *format;
int nformat;
XRenderScreen *screen;
int nscreen;
XRenderDepth *depth;
int ndepth;
XRenderVisual *visual;
int nvisual;
int *subpixel;
int nsubpixel;
char **filter;
int nfilter;
short *filter_alias;
int nfilter_alias;
} XRenderInfo;
/* replaces XRenderExtDisplayInfo */
typedef struct _XRenderExtDisplayInfo {
struct _XRenderExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
XExtCodes *codes; /* the extension protocol codes */
XRenderInfo *info; /* extra data for the extension to use */
} XRenderExtDisplayInfo;
/* replaces XExtensionInfo */
typedef struct _XRenderExtInfo {
XRenderExtDisplayInfo *head; /* start of the list */
XRenderExtDisplayInfo *cur; /* most recently used */
int ndisplays; /* number of displays */
} XRenderExtInfo;
extern XRenderExtInfo XRenderExtensionInfo;
extern char XRenderExtensionName[];
XRenderExtDisplayInfo *
XRenderFindDisplay (Display *dpy);
#define RenderHasExtension(i) ((i) && ((i)->codes))
#define RenderCheckExtension(dpy,i,val) \
if (!RenderHasExtension(i)) { return val; }
#define RenderSimpleCheckExtension(dpy,i) \
if (!RenderHasExtension(i)) { return; }
/*
* Xlib uses long for 32-bit values. Xrender uses int. This
* matters on alpha. Note that this macro assumes that int is 32 bits
* except on WORD64 machines where it is 64 bits.
*/
#ifdef WORD64
#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len)
#else
#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
#endif
#endif /* _XRENDERINT_H_ */

12
xrender.pc.in Normal file
View File

@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Xrender
Description: X Render Library
Version: @VERSION@
Requires: xproto renderproto >= @RENDER_VERSION@ x11
Requires.private: x11
Cflags: -I${includedir}
Libs: -L${libdir} -lXrender