[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxcursor: Changes to 'upstream-unstable'



 .gitignore                    |    1 
 configure.ac                  |   11 ++-
 include/X11/Xcursor/Xcursor.h |    4 -
 man/Makefile.am               |   57 +++++++++++++++++
 man/Xcursor.man               |   15 ++--
 src/library.c                 |  135 +++++++++++++++++++++++++++++-------------
 6 files changed, 172 insertions(+), 51 deletions(-)

New commits:
commit a4f29e6deef2bf46cae811aaac1f535945cd9fee
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Aug 24 14:01:07 2007 -0700

    Version bump: 1.1.9

diff --git a/configure.ac b/configure.ac
index 18ca5db..25e63f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ 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.8,[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
+AC_INIT([libXcursor],1.1.9,[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
 AM_INIT_AUTOMAKE([dist-bzip2])
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_MAINTAINER_MODE
diff --git a/include/X11/Xcursor/Xcursor.h b/include/X11/Xcursor/Xcursor.h
index 22b057a..90bfdd6 100644
--- a/include/X11/Xcursor/Xcursor.h
+++ b/include/X11/Xcursor/Xcursor.h
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * Copyright © 2002 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -78,7 +76,7 @@ typedef XcursorUInt	XcursorPixel;
 
 #define XCURSOR_LIB_MAJOR	1
 #define XCURSOR_LIB_MINOR	1
-#define XCURSOR_LIB_REVISION	7
+#define XCURSOR_LIB_REVISION	9
 #define XCURSOR_LIB_VERSION	((XCURSOR_LIB_MAJOR * 10000) + \
 				 (XCURSOR_LIB_MINOR * 100) + \
 				 (XCURSOR_LIB_REVISION))

commit 5a2601740d04d4180e77695c4b60f2cf5c84be6c
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Wed Aug 22 19:40:55 2007 -0700

    Make shadow man pages for each function

diff --git a/man/Makefile.am b/man/Makefile.am
index e8ddd70..abb555d 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -25,3 +25,49 @@ MAN_SUBSTS = \
 .man.$(LIB_MAN_SUFFIX):
 	-rm -f $@
 	sed $(MAN_SUBSTS) < $< > $@
+
+# Generate man page shadow files
+
+LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
+libman_DATA += $(Xcursor_shadows:=.@LIB_MAN_SUFFIX@)
+BUILT_SOURCES = shadows.DONE
+CLEANFILES += shadows.DONE
+
+Xcursor_shadows = \
+	XcursorImageCreate \
+	XcursorImageDestroy \
+	XcursorImagesCreate \
+	XcursorImagesDestroy \
+	XcursorCursorsCreate \
+	XcursorCursorsDestroy \
+	XcursorXcFileLoadImage \
+	XcursorXcFileLoadImages \
+	XcursorXcFileLoadAllImages \
+	XcursorXcFileLoad \
+	XcursorXcFileSave \
+	XcursorFilenameLoadImage \
+	XcursorFilenameLoadImages \
+	XcursorFilenameLoadAllImages \
+	XcursorFilenameLoad \
+	XcursorFilenameSaveImages \
+	XcursorFilenameSave \
+	XcursorLibraryLoadImage \
+	XcursorLibraryLoadImages \
+	XcursorFilenameLoadCursor \
+	XcursorLibraryLoadCursor \
+	XcursorLibraryLoadCursors \
+	XcursorShapeLoadImage \
+	XcursorShapeLoadImages \
+	XcursorShapeLoadCursor \
+	XcursorShapeLoadCursors \
+	XcursorSupportsARGB \
+	XcursorSetDefaultSize \
+	XcursorGetDefaultSize \
+	XcursorSetTheme \
+	XcursorGetTheme
+
+shadows.DONE:
+	-rm -f $(Xcursor_shadows:=.@LIB_MAN_SUFFIX@)
+	(for i in $(Xcursor_shadows:=.@LIB_MAN_SUFFIX@) ; do \
+	 echo .so man$(LIB_MAN_DIR_SUFFIX)/Xcursor.$(LIB_MAN_SUFFIX) > $$i; \
+	 done)

commit fef474da694ea3c1fd184d93cc07bf8d95f89327
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Tue Aug 21 19:45:35 2007 -0700

    Add XCURSOR_PATH to man page

diff --git a/man/Xcursor.man b/man/Xcursor.man
index 610452d..a16a7c1 100644
--- a/man/Xcursor.man
+++ b/man/Xcursor.man
@@ -355,7 +355,7 @@ mapped to a core X cursor.
 .TP
 XcursorBool XcursorSetDefaultSize (Display *dpy, int size)
 Sets the default size for cursors on the specified display. When loading
-cursors, those who's nominal size is closest to this size will be preferred.
+cursors, those whose nominal size is closest to this size will be preferred.
 
 .TP
 int XcursorGetDefaultSize (Display *dpy)
@@ -369,6 +369,12 @@ Sets the current theme name.
 char *XcursorGetTheme (Display *dpy)
 Gets the current theme name.
 
+.SH "ENVIRONMENT VARIABLES"
+.TP 15
+.B XCURSOR_PATH
+This variable sets the list of paths to look for cursors in.   
+Directories in this path are separated by colons (:).
+
 .SH RESTRICTIONS
 .B Xcursor
 will probably change radically in the future; weak attempts will be made to

commit a9ccf1bd91ad6e06f7b7116efe836c365b68645b
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Tue Aug 21 19:33:00 2007 -0700

    Use cursorpath found by configure in man page

diff --git a/configure.ac b/configure.ac
index 6376ef5..18ca5db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,10 @@ AC_ARG_WITH(icondir,
         [ICONDIR=${datadir}/icons])
 AC_SUBST([ICONDIR])
 
-DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps:$ICONDIR"
+DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
+if test "x${ICONDIR}" != "x${datadir}/icons"; then
+	DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
+fi
 AC_ARG_WITH(cursorpath,
         AC_HELP_STRING([--with-cursorpath=<paths>],
                        [Set default search path for cursors]),
@@ -59,6 +62,10 @@ 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])
+
 # Check for X
 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 725a676..e8ddd70 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -13,6 +13,15 @@ SUFFIXES = .$(LIB_MAN_SUFFIX) .man
 # Strings to replace in man pages
 XORGRELSTRING = @PACKAGE_STRING@
 
+MAN_SUBSTS = \
+	-e 's|__xorgversion__|"$(XORGRELSTRING)"|' \
+	-e 's|__XCURSORPATH__|$(XCURSORPATH_LIST)|g' \
+	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+	-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
+	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+
 .man.$(LIB_MAN_SUFFIX):
 	-rm -f $@
-	sed 's/__xorgversion__/"$(XORGRELSTRING)"/;  s/__LIB_MAN_SUFFIX__/$(LIB_MAN_SUFFIX)/; s%__prefix__%$(prefix)%g; s%__ICONDIR__%$(ICONDIR)%g' < $< > $@
+	sed $(MAN_SUBSTS) < $< > $@
diff --git a/man/Xcursor.man b/man/Xcursor.man
index fd39be8..610452d 100644
--- a/man/Xcursor.man
+++ b/man/Xcursor.man
@@ -1,6 +1,4 @@
 .\"
-.\" $Id$
-.\"
 .\" Copyright © 2002 Keith Packard
 .\"
 .\" Permission to use, copy, modify, distribute, and sell this software and its
@@ -26,7 +24,7 @@
 .ns
 .TP \\$1
 ..
-.TH XCURSOR __LIB_MAN_SUFFIX__ __xorgversion__ "Keith Packard"
+.TH XCURSOR __libmansuffix__ __xorgversion__ "Keith Packard"
 
 .SH NAME
 XCURSOR \- Cursor management library
@@ -142,8 +140,7 @@ Images look like:
 
 .SS THEMES
 Xcursor (mostly) follows the freedesktop.org spec for theming icons.  The
-default search path it uses is $HOME/.icons, __prefix__/share/icons,
-__prefix__/share/pixmaps, __ICONDIR__.  Within each of these
+default search path it uses is __XCURSORPATH__.  Within each of these
 directories, it searches for a directory using the theme name.  Within the
 theme directory, it looks for cursor files in the 'cursors' subdirectory.
 It uses the first cursor file found along  the path.

commit 110131bd40d0fc042f4a81922372307a1582b591
Author: Tilman Sauerbeck <tilman@code-monkey.de>
Date:   Sat May 12 22:42:08 2007 +0200

    Added object files to .gitignore.

diff --git a/.gitignore b/.gitignore
index 45e0e66..81a8fd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ mkinstalldirs
 stamp-h1
 xcursor.pc
 *~
+*.o

commit 3c5d4f591ce0b473af9f693cfe25a1506cc573d6
Author: Tilman Sauerbeck <tilman@code-monkey.de>
Date:   Sat May 12 22:41:27 2007 +0200

    Store the cursor names in one large string.
    
    This means the compiler doesn't need to place the array in the
    read-write sections of the DSO, which means less relocations
    when the library is loaded and a smaller memory footprint.

diff --git a/src/library.c b/src/library.c
index 2610ed9..7c02faf 100644
--- a/src/library.c
+++ b/src/library.c
@@ -385,39 +385,98 @@ XcursorLibraryLoadCursors (Display *dpy, const char *file)
     return cursors;
 }
 
-const static char   *_XcursorStandardNames[] = {
-    /* 0 */
-    "X_cursor",		"arrow",	    "based_arrow_down",     "based_arrow_up", 
-    "boat",		"bogosity",	    "bottom_left_corner",   "bottom_right_corner", 
-    "bottom_side",	"bottom_tee",	    "box_spiral",	    "center_ptr", 
-    "circle",		"clock",	    "coffee_mug",	    "cross", 
-    
-    /* 32 */
-    "cross_reverse",	"crosshair",	    "diamond_cross",	    "dot",
-    "dotbox",		"double_arrow",	    "draft_large",	    "draft_small",
-    "draped_box",	"exchange",	    "fleur",		    "gobbler",
-    "gumby",		"hand1",	    "hand2",		    "heart",
-    
-    /* 64 */
-    "icon",		"iron_cross",	    "left_ptr",		    "left_side", 
-    "left_tee",		"leftbutton",	    "ll_angle",		    "lr_angle", 
-    "man",		"middlebutton",     "mouse",		    "pencil", 
-    "pirate",		"plus",		    "question_arrow",	    "right_ptr", 
-    
-    /* 96 */
-    "right_side",	"right_tee",	    "rightbutton",	    "rtl_logo", 
-    "sailboat",		"sb_down_arrow",    "sb_h_double_arrow",    "sb_left_arrow", 
-    "sb_right_arrow",	"sb_up_arrow",	    "sb_v_double_arrow",    "shuttle", 
-    "sizing",		"spider",	    "spraycan",		    "star", 
-    
-    /* 128 */
-    "target",		"tcross",	    "top_left_arrow",	    "top_left_corner", 
-    "top_right_corner",	"top_side",	    "top_tee",		    "trek", 
-    "ul_angle",		"umbrella",	    "ur_angle",		    "watch", 
-    "xterm", 
+static const char _XcursorStandardNames[] =
+	"X_cursor\0"
+	"arrow\0"
+	"based_arrow_down\0"
+	"based_arrow_up\0"
+	"boat\0"
+	"bogosity\0"
+	"bottom_left_corner\0"
+	"bottom_right_corner\0"
+	"bottom_side\0"
+	"bottom_tee\0"
+	"box_spiral\0"
+	"center_ptr\0"
+	"circle\0"
+	"clock\0"
+	"coffee_mug\0"
+	"cross\0"
+	"cross_reverse\0"
+	"crosshair\0"
+	"diamond_cross\0"
+	"dot\0"
+	"dotbox\0"
+	"double_arrow\0"
+	"draft_large\0"
+	"draft_small\0"
+	"draped_box\0"
+	"exchange\0"
+	"fleur\0"
+	"gobbler\0"
+	"gumby\0"
+	"hand1\0"
+	"hand2\0"
+	"heart\0"
+	"icon\0"
+	"iron_cross\0"
+	"left_ptr\0"
+	"left_side\0"
+	"left_tee\0"
+	"leftbutton\0"
+	"ll_angle\0"
+	"lr_angle\0"
+	"man\0"
+	"middlebutton\0"
+	"mouse\0"
+	"pencil\0"
+	"pirate\0"
+	"plus\0"
+	"question_arrow\0"
+	"right_ptr\0"
+	"right_side\0"
+	"right_tee\0"
+	"rightbutton\0"
+	"rtl_logo\0"
+	"sailboat\0"
+	"sb_down_arrow\0"
+	"sb_h_double_arrow\0"
+	"sb_left_arrow\0"
+	"sb_right_arrow\0"
+	"sb_up_arrow\0"
+	"sb_v_double_arrow\0"
+	"shuttle\0"
+	"sizing\0"
+	"spider\0"
+	"spraycan\0"
+	"star\0"
+	"target\0"
+	"tcross\0"
+	"top_left_arrow\0"
+	"top_left_corner\0"
+	"top_right_corner\0"
+	"top_side\0"
+	"top_tee\0"
+	"trek\0"
+	"ul_angle\0"
+	"umbrella\0"
+	"ur_angle\0"
+	"watch\0"
+	"xterm";
+
+static const unsigned short _XcursorStandardNameOffsets[] = {
+	0, 9, 15, 32, 47, 52, 61, 80, 100, 112, 123, 134, 145, 152, 158,
+	169, 175, 189, 199, 213, 217, 224, 237, 249, 261, 272, 281, 287,
+	295, 301, 307, 313, 319, 324, 335, 344, 354, 363, 374, 383, 392,
+	396, 409, 415, 422, 429, 434, 449, 459, 470, 480, 492, 501, 510,
+	524, 542, 556, 571, 583, 601, 609, 616, 623, 632, 637, 644, 651,
+	666, 682, 699, 708, 716, 721, 730, 739, 748, 754
 };
 
-#define NUM_STANDARD_NAMES  (sizeof _XcursorStandardNames / sizeof _XcursorStandardNames[0])
+#define NUM_STANDARD_NAMES  (sizeof _XcursorStandardNameOffsets / sizeof _XcursorStandardNameOffsets[0])
+
+#define STANDARD_NAME(id) \
+    _XcursorStandardNames + _XcursorStandardNameOffsets[id]
 
 XcursorImage *
 XcursorShapeLoadImage (unsigned int shape, const char *theme, int size)
@@ -425,8 +484,7 @@ XcursorShapeLoadImage (unsigned int shape, const char *theme, int size)
     unsigned int    id = shape >> 1;
 
     if (id < NUM_STANDARD_NAMES)
-	return XcursorLibraryLoadImage (_XcursorStandardNames[id],
-					theme, size);
+	return XcursorLibraryLoadImage (STANDARD_NAME (id), theme, size);
     else
 	return NULL;
 }
@@ -437,8 +495,7 @@ XcursorShapeLoadImages (unsigned int shape, const char *theme, int size)
     unsigned int    id = shape >> 1;
 
     if (id < NUM_STANDARD_NAMES)
-	return XcursorLibraryLoadImages (_XcursorStandardNames[id],
-					 theme, size);
+	return XcursorLibraryLoadImages (STANDARD_NAME (id), theme, size);
     else
 	return NULL;
 }
@@ -449,7 +506,7 @@ XcursorShapeLoadCursor (Display *dpy, unsigned int shape)
     unsigned int    id = shape >> 1;
 
     if (id < NUM_STANDARD_NAMES)
-	return XcursorLibraryLoadCursor (dpy, _XcursorStandardNames[id]);
+	return XcursorLibraryLoadCursor (dpy, STANDARD_NAME (id));
     else
 	return 0;
 }
@@ -460,7 +517,7 @@ XcursorShapeLoadCursors (Display *dpy, unsigned int shape)
     unsigned int    id = shape >> 1;
 
     if (id < NUM_STANDARD_NAMES)
-	return XcursorLibraryLoadCursors (dpy, _XcursorStandardNames[id]);
+	return XcursorLibraryLoadCursors (dpy, STANDARD_NAME (id));
     else
 	return NULL;
 }
@@ -477,7 +534,7 @@ XcursorLibraryShape (const char *library)
     while (low < high - 1)
     {
 	mid = (low + high) >> 1;
-	c = strcmp (library, _XcursorStandardNames[mid]);
+	c = strcmp (library, STANDARD_NAME (mid));
 	if (c == 0)
 	    return (mid << 1);
 	if (c > 0)
@@ -487,7 +544,7 @@ XcursorLibraryShape (const char *library)
     }
     while (low <= high)
     {
-	if (!strcmp (library, _XcursorStandardNames[low]))
+	if (!strcmp (library, STANDARD_NAME (low)))
 	    return (low << 1);
 	low++;
     }



Reply to: