summaryrefslogtreecommitdiff
path: root/lib/libXcursor
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-07-02 20:41:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-07-02 20:41:34 +0000
commitad92c17bcda50ef9545a5060170fd44fe8946672 (patch)
tree9c1e5f52895578c317c9378a2a3836b7e7ff1f1f /lib/libXcursor
parent0d5eae50712d1449cfeb5586002df91944fc10dc (diff)
Update to libXcursor 1.1.12.
This is a bug fix release.
Diffstat (limited to 'lib/libXcursor')
-rw-r--r--lib/libXcursor/ChangeLog120
-rw-r--r--lib/libXcursor/configure.ac92
-rw-r--r--lib/libXcursor/man/Makefile.am4
-rw-r--r--lib/libXcursor/src/cursor.c9
-rw-r--r--lib/libXcursor/src/display.c7
-rw-r--r--lib/libXcursor/src/file.c3
-rw-r--r--lib/libXcursor/src/xlib.c1
7 files changed, 184 insertions, 52 deletions
diff --git a/lib/libXcursor/ChangeLog b/lib/libXcursor/ChangeLog
index 0dd5ca2d1..95300c236 100644
--- a/lib/libXcursor/ChangeLog
+++ b/lib/libXcursor/ChangeLog
@@ -1,3 +1,123 @@
+commit d79ddc01e4b247ae95af3581b93aef2b93e76888
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Jun 29 21:41:09 2011 -0700
+
+ libXcursor 1.1.12
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4ce23fcd978ed389ea30315c0e02629a31bda265
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun May 22 12:55:31 2011 -0700
+
+ Mark bitmasks as unsigned ints
+
+ Clears Sun compiler warnings from shifting 8 bits by 24 bits:
+ "cursor.c", line 215: warning: integer overflow detected: op "<<"
+ "cursor.c", line 280: warning: integer overflow detected: op "<<"
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 047993c76a677ca12a2b575990b99e3ddbc0dd58
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Sat May 7 10:16:18 2011 -0700
+
+ Correct error handling in _XcursorAverageColor
+
+ Previously it would either div-zero or get stuck in a loop until int overflow
+ if called with a bad value.
+
+ cursor.c:214:32: warning: Division by zero
+ return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);
+
+ Found-by: clang static analyzer
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit bee68e54e5c3a4b9f46c81366a720531e3e07a82
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri Apr 1 12:16:23 2011 +0100
+
+ Free the FontInfo structure after loading the cursor from it.
+
+ References: https://bugs.freedesktop.org/show_bug.cgi?id=2731
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f49e7e1608f2dac140f60bcae21d5c37f79fc41b
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri Apr 1 12:15:46 2011 +0100
+
+ Free the partial header after failing to open the cursor.
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 073eb2c56f4794275eee40a825dbfe1232bb2690
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri Apr 1 12:14:51 2011 +0100
+
+ Free list on shutdown.
+
+ We freed the parent structure without freeing the list contained within,
+ making valgrind unhappy.
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit de50317ec4e0e8da7de84e85d1f7a6d2e184d58b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Feb 2 17:08:19 2011 -0500
+
+ config: perform XCURSORPATH formatting in man/Makefile.am
+
+ We can skip the extra step of using XCURSORPATH_LIST in configure.ac.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit a929c3621b9da8e56ce1223afd3e487fc488fa47
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Feb 2 11:43:41 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.
+
+ This helps automated maintenance and release activities.
+ Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 96c5877fd7ebc59569f140d9e2cb30fdb8371ef1
+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 4f7a749fcb7a8e93d40a7621fa1c159e003b2f5c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Jan 28 16:07:07 2011 -0500
+
+ config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
+
+ This silences an Automake warning.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit c38adc6bf116146fa1e291b9f4deed45497e5c2e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Jan 27 18:50:14 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 731e84d79e83b59d022d0f453b245696b4d2750f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Oct 27 22:48:19 2010 -0700
diff --git a/lib/libXcursor/configure.ac b/lib/libXcursor/configure.ac
index 185303fbf..80d4a80c8 100644
--- a/lib/libXcursor/configure.ac
+++ b/lib/libXcursor/configure.ac
@@ -1,39 +1,44 @@
-dnl
-dnl Copyright © 2003 Keith Packard
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation, and that the name of Keith Packard not be used in
-dnl advertising or publicity pertaining to distribution of the software without
-dnl specific, written prior permission. Keith Packard makes no
-dnl representations about the suitability of this software for any purpose. It
-dnl is provided "as is" without express or implied warranty.
-dnl
-dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
+#
+# Copyright © 2003 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+#
+# Initialize Autoconf
AC_PREREQ([2.60])
-dnl
-dnl This is the package version number, not the shared library
-dnl version. This same version number must appear in Xcursor.h
-dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
-dnl not possible to extract the version number here from Xcursor.h
-dnl
-AC_INIT([libXcursor], [1.1.11],
+#
+# This is the package version number, not the shared library
+# version. This same version number must appear in Xcursor.h
+# Yes, it is a pain to synchronize version numbers. Unfortunately, it's
+# not possible to extract the version number here from Xcursor.h
+#
+AC_INIT([libXcursor], [1.1.12],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-AM_CONFIG_HEADER(config.h)
+
+# Initialize libtool
+AC_PROG_LIBTOOL
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
@@ -41,12 +46,8 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
-# Check for progs
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
AC_ARG_WITH(icondir,
- AC_HELP_STRING([--with-icondir=<path>],
+ AS_HELP_STRING([--with-icondir=<path>],
[Set default icon directory (default: ${datadir}/icons)]),
[ICONDIR="$withval"],
[ICONDIR=${datadir}/icons])
@@ -57,24 +58,21 @@ if test "x${ICONDIR}" != "x${datadir}/icons"; then
DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
fi
AC_ARG_WITH(cursorpath,
- AC_HELP_STRING([--with-cursorpath=<paths>],
+ AS_HELP_STRING([--with-cursorpath=<paths>],
[Set default search path for cursors]),
[XCURSORPATH="$withval"],
[XCURSORPATH=$DEF_CURSORPATH])
AC_SUBST([XCURSORPATH])
-# Reformat cursor path for man page
-XCURSORPATH_LIST=`echo $XCURSORPATH | sed 's/:/, /g'`
-AC_SUBST([XCURSORPATH_LIST])
-
-# Check for X
+# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
-dnl Allow checking code with lint, sparse, etc.
+# Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
-AC_OUTPUT([Makefile
- src/Makefile
- man/Makefile
- xcursor.pc])
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ man/Makefile
+ xcursor.pc])
+AC_OUTPUT
diff --git a/lib/libXcursor/man/Makefile.am b/lib/libXcursor/man/Makefile.am
index 0be44447e..f3f459949 100644
--- a/lib/libXcursor/man/Makefile.am
+++ b/lib/libXcursor/man/Makefile.am
@@ -45,7 +45,9 @@ CLEANFILES = $(libman_DATA)
SUFFIXES = .$(LIB_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
-MAN_SUBSTS += -e 's|__XCURSORPATH__|$(XCURSORPATH_LIST)|g'
+# 's/:/, /g' will add comma and a space to help path formatting
+MAN_SUBSTS += -e 's|__XCURSORPATH__|$(XCURSORPATH)|g' \
+ -e '\|$(XCURSORPATH)| s/:/, /g'
.man.$(LIB_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/lib/libXcursor/src/cursor.c b/lib/libXcursor/src/cursor.c
index ac1b2c498..7da62ef05 100644
--- a/lib/libXcursor/src/cursor.c
+++ b/lib/libXcursor/src/cursor.c
@@ -201,6 +201,9 @@ _XcursorAverageColor (XcursorPixel *pixels, int npixels)
XcursorPixel red, green, blue;
int n = npixels;
+ if (n < 1)
+ return 0;
+
blue = green = red = 0;
while (n--)
{
@@ -209,9 +212,7 @@ _XcursorAverageColor (XcursorPixel *pixels, int npixels)
green += (p >> 8) & 0xff;
blue += (p >> 0) & 0xff;
}
- if (!n)
- return 0;
- return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);
+ return (0xffU << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);
}
typedef struct XcursorCoreCursor {
@@ -276,7 +277,7 @@ _XcursorHeckbertMedianCut (const XcursorImage *image, XcursorCoreCursor *core)
if (green > max_green) max_green = green;
if (blue < min_blue) min_blue = blue;
if (blue > max_blue) max_blue = blue;
- p = ((0xff << 24) | (red << 16) |
+ p = ((0xffU << 24) | (red << 16) |
(green << 8) | (blue << 0));
*pc++ = p;
}
diff --git a/lib/libXcursor/src/display.c b/lib/libXcursor/src/display.c
index c29680716..bcf99644d 100644
--- a/lib/libXcursor/src/display.c
+++ b/lib/libXcursor/src/display.c
@@ -35,6 +35,13 @@ _XcursorFreeDisplayInfo (XcursorDisplayInfo *info)
if (info->theme_from_config)
free (info->theme_from_config);
+ while (info->fonts)
+ {
+ XcursorFontInfo *fi = info->fonts;
+ info->fonts = fi->next;
+ free (fi);
+ }
+
free (info);
}
diff --git a/lib/libXcursor/src/file.c b/lib/libXcursor/src/file.c
index 6c4f1bbbf..e3d7e61ef 100644
--- a/lib/libXcursor/src/file.c
+++ b/lib/libXcursor/src/file.c
@@ -713,7 +713,10 @@ XcursorXcFileLoadAllImages (XcursorFile *file)
}
images = XcursorImagesCreate (nimage);
if (!images)
+ {
+ _XcursorFileHeaderDestroy (fileHeader);
return NULL;
+ }
for (toc = 0; toc < fileHeader->ntoc; toc++)
{
switch (fileHeader->tocs[toc].type) {
diff --git a/lib/libXcursor/src/xlib.c b/lib/libXcursor/src/xlib.c
index 0475d11f7..dedc43a33 100644
--- a/lib/libXcursor/src/xlib.c
+++ b/lib/libXcursor/src/xlib.c
@@ -64,6 +64,7 @@ _XcursorFontIsCursor (Display *dpy, Font font)
ret = (fs->properties[n].card32 == cursor);
break;
}
+ XFreeFontInfo (NULL, fs, 1);
}
fi = malloc (sizeof (XcursorFontInfo));
if (fi)