configure.ac | 92 +++++++++++++++++++++++++++----------------------------- man/Makefile.am | 4 +- src/cursor.c | 9 +++-- src/display.c | 7 ++++ src/file.c | 3 + src/xlib.c | 1 6 files changed, 64 insertions(+), 52 deletions(-)
New commits: commit d79ddc01e4b247ae95af3581b93aef2b93e76888 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Wed Jun 29 21:41:09 2011 -0700 libXcursor 1.1.12 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/configure.ac b/configure.ac index a3add56..80d4a80 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ AC_PREREQ([2.60]) # 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.11], +AC_INIT([libXcursor], [1.1.12], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit 4ce23fcd978ed389ea30315c0e02629a31bda265 Author: Alan Coopersmith <alan.coopersm...@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.coopersm...@oracle.com> diff --git a/src/cursor.c b/src/cursor.c index 3de3c8e..7da62ef 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -212,7 +212,7 @@ _XcursorAverageColor (XcursorPixel *pixels, int npixels) green += (p >> 8) & 0xff; blue += (p >> 0) & 0xff; } - 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 { @@ -277,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; } commit 047993c76a677ca12a2b575990b99e3ddbc0dd58 Author: Jeremy Huddleston <jerem...@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 <jerem...@apple.com> diff --git a/src/cursor.c b/src/cursor.c index ac1b2c4..3de3c8e 100644 --- a/src/cursor.c +++ b/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,8 +212,6 @@ _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); } commit bee68e54e5c3a4b9f46c81366a720531e3e07a82 Author: Chris Wilson <ch...@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 <ch...@chris-wilson.co.uk> diff --git a/src/xlib.c b/src/xlib.c index 0475d11..dedc43a 100644 --- a/src/xlib.c +++ b/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) commit f49e7e1608f2dac140f60bcae21d5c37f79fc41b Author: Chris Wilson <ch...@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 <ch...@chris-wilson.co.uk> diff --git a/src/file.c b/src/file.c index 6c4f1bb..e3d7e61 100644 --- a/src/file.c +++ b/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) { commit 073eb2c56f4794275eee40a825dbfe1232bb2690 Author: Chris Wilson <ch...@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 <ch...@chris-wilson.co.uk> diff --git a/src/display.c b/src/display.c index c296807..bcf9964 100644 --- a/src/display.c +++ b/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); } commit de50317ec4e0e8da7de84e85d1f7a6d2e184d58b Author: Gaetan Nadon <mems...@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 <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index c990200..a3add56 100644 --- a/configure.ac +++ b/configure.ac @@ -64,10 +64,6 @@ AC_ARG_WITH(cursorpath, [XCURSORPATH=$DEF_CURSORPATH]) AC_SUBST([XCURSORPATH]) -# Reformat cursor path for man page -XCURSORPATH_LIST=`echo $XCURSORPATH | sed 's/:/, /g'` -AC_SUBST([XCURSORPATH_LIST]) - # 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]) diff --git a/man/Makefile.am b/man/Makefile.am index 0be4444..f3f4599 100644 --- a/man/Makefile.am +++ b/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) < $< > $@ commit a929c3621b9da8e56ce1223afd3e487fc488fa47 Author: Gaetan Nadon <mems...@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 <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index 0a864f0..c990200 100644 --- a/configure.ac +++ b/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 +# +# 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.11], [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 -AC_CONFIG_HEADERS(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,9 +46,6 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -# Check for progs -AC_PROG_LIBTOOL - AC_ARG_WITH(icondir, AS_HELP_STRING([--with-icondir=<path>], [Set default icon directory (default: ${datadir}/icons)]), @@ -66,14 +68,15 @@ AC_SUBST([XCURSORPATH]) 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 commit 96c5877fd7ebc59569f140d9e2cb30fdb8371ef1 Author: Gaetan Nadon <mems...@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 <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index 2642fd7..0a864f0 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ AC_INIT([libXcursor], [1.1.11], AM_INIT_AUTOMAKE([foreign dist-bzip2]) AC_CONFIG_SRCDIR([Makefile.am]) AM_MAINTAINER_MODE -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS(config.h) # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], commit 4f7a749fcb7a8e93d40a7621fa1c159e003b2f5c Author: Gaetan Nadon <mems...@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 <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index d5b16f8..2642fd7 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS 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]) @@ -56,7 +56,7 @@ 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]) commit c38adc6bf116146fa1e291b9f4deed45497e5c2e Author: Gaetan Nadon <mems...@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 <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index 185303f..d5b16f8 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,6 @@ XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Check for progs -AC_PROG_CC AC_PROG_LIBTOOL AC_ARG_WITH(icondir, -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1qceoj-0005yk...@vasks.debian.org