Projects
openEuler:Mainline
libXcursor
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:libXcursor.spec
Changed
@@ -2,11 +2,11 @@ Name: libXcursor Summary: Cursor management library -Version: 1.2.0 +Version: 1.2.1 Release: 1 License: MIT URL: https://xorg.freedesktop.org/ -Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 +Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.gz Source1: index.theme Requires: libX11 @@ -68,6 +68,9 @@ %{_mandir}/man3/Xcursor*.3* %changelog +* Mon Aug 1 2022 tianlijing <tianlijing@kylinos.cn> - 1.2.1-1 +- update to 1.2.1 + * Tue Jul 28 2020 songnannan <songnannan2@huawei.com> - 1.2.0-1 - update to 1.2.0
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/libXcursor.git</param> - <param name="revision">f0f9fdd599a304796503b547783b5b2899f3b499</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/COPYING -> _service:tar_scm:libXcursor-1.2.1.tar.gz/COPYING
Changed
@@ -1,4 +1,4 @@ -Copyright © 2002 Keith Packard +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
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/ChangeLog -> _service:tar_scm:libXcursor-1.2.1.tar.gz/ChangeLog
Changed
@@ -1,3 +1,372 @@ +commit 27adb16027fa99d83818a0ed9f6623cb03f0c574 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 3 09:55:44 2022 -0700 + + libXcursor 1.2.1 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e864ad83068016c121962a0bbe8dde26755bf26f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 3 09:43:29 2022 -0700 + + gitlab CI: add a basic build test + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f0d8a59186d415101040e7761b6cc6adfce36c5d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 3 09:22:14 2022 -0700 + + Build xz tarballs instead of bzip2 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit d223fce4c7b2792ccc32e4b68090ac2d92d49f09 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 3 09:21:29 2022 -0700 + + Fix spelling/wording issues + + Found by using: + codespell --builtin clear,rare,usage,informal,code,names + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 66accad188420c40f0d62b409bfd2af605bb6f05 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 3 09:19:14 2022 -0700 + + Convert COPYING from ISO-8859-1 to UTF-8 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 801925839d26e7c8d942c5e02c4897652ead26c8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 6 20:10:41 2021 -0400 + + more cppcheck-style fixes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit f807ac9c786714ef4e86ad7edfa60f92baf0b4a6 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 3 20:25:43 2021 -0400 + + cppcheck style-fixes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 13ca987eafed426d5347bafdf274ad59e2641650 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 4 04:20:14 2021 -0400 + + mention "Inherits=" lists + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6edf1caf6fe6826b3727ab19ba9e4d7ad163a48e +Author: Tobias Stoeckmann <tobias@stoeckmann.org> +Date: Tue May 4 18:30:53 2021 +0200 + + fix XcursorTheme loop regression + + Handle themes with multiple inherit entries. Although the previous + commit keeped track of inherited themes, it only handled multiple theme + entries on the highest level. + + This fix unconditionally checks if the next upper level contains a line. + If it does, it processes contained themes (i.e. the current theme had an + inherited entry in its index file). + + If the upper level has no more themes, it goes down a level and + processes the next theme there. If no next theme exists, it moves down + another level and so on until it reaches level 0, i.e. the initially + supplied theme. + + The lowest level (d = 0) is treated specially because we must not modify + the supplied theme, which could happen when calling _XcursorNextPath. + + Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> + +commit b47ca9858ee11bdbd08f1e31102116ff51cb6be5 +Author: Tobias Stoeckmann <tobias@stoeckmann.org> +Date: Sun May 2 16:00:25 2021 +0200 + + Handle more theme loop situations + + This is a follow up for commit f64a8cc1a65dcad4294e2988b402a34175019663 + resulting from https://bugs.freedesktop.org/show_bug.cgi?id=3603 + + The current loop detection only works for direct self references but not + for transitive ones. Limiting the inheritance depth fixes this issue as + suggested by Keith Packard. + + I avoided the introduction of a recursion function. Instead I modified + XcursorScanTheme to work iterative. + + The current recursion code adds the "Inherits=..." line to heap and has + an iteration variable to go through all themes listed in that line per + recursion. This is covered with the newly introduced XcursorInherit + struct with its fields "line" and "theme". Since "theme" points into + "line", only "line" has to be freed eventually. + + If a fixed inheritage limit of 32 is reached, the code stops processing + and returns NULL. It also returns NULL if it detects the initial theme + in one of the inheritages to break the loop early on. + + Last but not least I removed the printf statement. The only situation in + which libXcursor writes to stdout is when it is explicitly requested. + + Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> + +commit 403bb32d5fb0dbb9e83ec7a5743b2fee75445ea7 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Mar 19 17:08:42 2021 -0400 + + eliminate special escaping for "/*" which produces look-alike Unicode for + newer groff (making select/paste useless), but is not necessary with + groff, mandoc or Solaris 10 nroff. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1ab5ffa9e394bf51f90893210fc6f1e3849891ab +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Mar 18 10:29:49 2021 -0400 + + fix a typo and a style issue + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9898afadfbe000159cbaaa0c4dc11c1fb09bde5b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 17 19:07:19 2021 -0400 + + update copyright notice + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d64dda62def8318ddf613918f6b7a652aafb1471 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 17 18:52:16 2021 -0400 + + fix raggedy prototypes and structure declarations using tabstops in appropriate macros + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 8560016436dc521b373c5bb25860e009fa4e291d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 20:36:15 2021 -0400 + + document the API called from libX11 + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit bacd41c0c068c5f55b635a4887b4185ad2e3ea10 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 19:34:51 2021 -0400 + + document the cursor-comments functions + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 821254578e15440d2177fff0b61f73590ae29869 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 18:21:47 2021 -0400 + + document the animation support functions + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2695829868243d41db5b47c9269423caca8dd1b4 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 18:00:22 2021 -0400 + + improve explanation of Xcursor's search algorithm + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 80cd802e0c2bf3af730dc7f852cb80c713e9db6c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 16:40:03 2021 -0400 + + start on the animated cursors; fixup whitespace + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 36650c9455428f007f4feb682ecbc9385e31ce71 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 16 15:52:39 2021 -0400
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/Makefile.in -> _service:tar_scm:libXcursor-1.2.1.tar.gz/Makefile.in
Changed
@@ -248,9 +248,9 @@ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip +DIST_TARGETS = dist-xz dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -673,6 +673,7 @@ 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) @@ -680,7 +681,6 @@ 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)
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/README.md -> _service:tar_scm:libXcursor-1.2.1.tar.gz/README.md
Changed
@@ -6,7 +6,7 @@ https://lists.x.org/mailman/listinfo/xorg -The master development code repository can be found at: +The primary development code repository can be found at: https://gitlab.freedesktop.org/xorg/lib/libXcursor
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/configure -> _service:tar_scm:libXcursor-1.2.1.tar.gz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXcursor 1.2.0. +# Generated by GNU Autoconf 2.69 for libXcursor 1.2.1. # # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXcursor/issues>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='libXcursor' PACKAGE_TARNAME='libXcursor' -PACKAGE_VERSION='1.2.0' -PACKAGE_STRING='libXcursor 1.2.0' +PACKAGE_VERSION='1.2.1' +PACKAGE_STRING='libXcursor 1.2.1' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libXcursor/issues' PACKAGE_URL='' @@ -1356,7 +1356,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libXcursor 1.2.0 to adapt to many kinds of systems. +\`configure' configures libXcursor 1.2.1 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1426,7 +1426,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXcursor 1.2.0:";; + short | recursive ) echo "Configuration of libXcursor 1.2.1:";; esac cat <<\_ACEOF @@ -1559,7 +1559,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXcursor configure 1.2.0 +libXcursor configure 1.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1974,7 +1974,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libXcursor $as_me 1.2.0, which was +It was created by libXcursor $as_me 1.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4215,7 +4215,7 @@ # Define the identity of the package. PACKAGE='libXcursor' - VERSION='1.2.0' + VERSION='1.2.1' cat >>confdefs.h <<_ACEOF @@ -18472,7 +18472,7 @@ -# Obtain compiler/linker options for depedencies +# Obtain compiler/linker options for dependencies pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCURSOR" >&5 @@ -19207,7 +19207,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libXcursor $as_me 1.2.0, which was +This file was extended by libXcursor $as_me 1.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19273,7 +19273,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/\\""\`\$/\\\\&/g'`" ac_cs_version="\\ -libXcursor config.status 1.2.0 +libXcursor config.status 1.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\"
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/configure.ac -> _service:tar_scm:libXcursor-1.2.1.tar.gz/configure.ac
Changed
@@ -26,7 +26,7 @@ # This is the package version number, not the shared library # version. This version number will be substituted into Xcursor.h # -AC_INIT(libXcursor, 1.2.0, +AC_INIT(libXcursor, 1.2.1, https://gitlab.freedesktop.org/xorg/lib/libXcursor/issues,libXcursor) AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_HEADERS(config.h include/X11/Xcursor/Xcursor.h) @@ -36,7 +36,7 @@ AC_USE_SYSTEM_EXTENSIONS # Initialize Automake -AM_INIT_AUTOMAKE(foreign dist-bzip2) +AM_INIT_AUTOMAKE(foreign dist-xz) # Initialize libtool AC_PROG_LIBTOOL @@ -78,7 +78,7 @@ XCURSORPATH=$DEF_CURSORPATH) AC_SUBST(XCURSORPATH) -# Obtain compiler/linker options for depedencies +# Obtain compiler/linker options for dependencies PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto) AC_DEFINE(HAVE_XFIXES, 1, Define to 1 if you have Xfixes)
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/include/X11/Xcursor/Xcursor.h -> _service:tar_scm:libXcursor-1.2.1.tar.gz/include/X11/Xcursor/Xcursor.h
Changed
@@ -24,11 +24,12 @@ #ifndef _XCURSOR_H_ #define _XCURSOR_H_ #include <stdio.h> +#include <stdint.h> #include <X11/Xfuncproto.h> #include <X11/Xlib.h> typedef int XcursorBool; -typedef unsigned int XcursorUInt; +typedef uint32_t XcursorUInt; typedef XcursorUInt XcursorDim; typedef XcursorUInt XcursorPixel; @@ -76,7 +77,7 @@ #define XCURSOR_LIB_MAJOR 1 #define XCURSOR_LIB_MINOR 2 -#define XCURSOR_LIB_REVISION 0 +#define XCURSOR_LIB_REVISION 1 #define XCURSOR_LIB_VERSION ((XCURSOR_LIB_MAJOR * 10000) + \ (XCURSOR_LIB_MINOR * 100) + \ (XCURSOR_LIB_REVISION))
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/include/X11/Xcursor/Xcursor.h.in -> _service:tar_scm:libXcursor-1.2.1.tar.gz/include/X11/Xcursor/Xcursor.h.in
Changed
@@ -23,11 +23,12 @@ #ifndef _XCURSOR_H_ #define _XCURSOR_H_ #include <stdio.h> +#include <stdint.h> #include <X11/Xfuncproto.h> #include <X11/Xlib.h> typedef int XcursorBool; -typedef unsigned int XcursorUInt; +typedef uint32_t XcursorUInt; typedef XcursorUInt XcursorDim; typedef XcursorUInt XcursorPixel;
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/man/Makefile.am -> _service:tar_scm:libXcursor-1.2.1.tar.gz/man/Makefile.am
Changed
@@ -5,37 +5,65 @@ $(Xcursor_shadows:=.man) Xcursor_shadows = \ - XcursorImageCreate \ - XcursorImageDestroy \ - XcursorImagesCreate \ - XcursorImagesDestroy \ + XcursorAnimateCreate \ + XcursorAnimateDestroy \ + XcursorAnimateNext \ + XcursorCommentCreate \ + XcursorCommentDestroy \ + XcursorCommentsCreate \ + XcursorCommentsDestroy \ XcursorCursorsCreate \ XcursorCursorsDestroy \ - XcursorXcFileLoadImage \ - XcursorXcFileLoadImages \ - XcursorXcFileLoadAllImages \ - XcursorXcFileLoad \ - XcursorXcFileSave \ + XcursorFileLoad \ + XcursorFileLoadAllImages \ + XcursorFileLoadImage \ + XcursorFileLoadImages \ + XcursorFileSave \ + XcursorFileSaveImages \ + XcursorFilenameLoad \ + XcursorFilenameLoadAllImages \ + XcursorFilenameLoadCursor \ + XcursorFilenameLoadCursors \ XcursorFilenameLoadImage \ XcursorFilenameLoadImages \ - XcursorFilenameLoadAllImages \ - XcursorFilenameLoad \ - XcursorFilenameSaveImages \ XcursorFilenameSave \ - XcursorLibraryLoadImage \ - XcursorLibraryLoadImages \ - XcursorFilenameLoadCursor \ + XcursorFilenameSaveImages \ + XcursorGetDefaultSize \ + XcursorGetTheme \ + XcursorGetThemeCore \ + XcursorImageCreate \ + XcursorImageDestroy \ + XcursorImageHash \ + XcursorImageLoadCursor \ + XcursorImagesCreate \ + XcursorImagesDestroy \ + XcursorImagesLoadCursor \ + XcursorImagesLoadCursors \ + XcursorImagesSetName \ XcursorLibraryLoadCursor \ XcursorLibraryLoadCursors \ - XcursorShapeLoadImage \ - XcursorShapeLoadImages \ + XcursorLibraryLoadImage \ + XcursorLibraryLoadImages \ + XcursorLibraryPath \ + XcursorLibraryShape \ + XcursorNoticeCreateBitmap \ + XcursorNoticePutBitmap \ + XcursorSetDefaultSize \ + XcursorSetTheme \ + XcursorSetThemeCore \ XcursorShapeLoadCursor \ XcursorShapeLoadCursors \ + XcursorShapeLoadImage \ + XcursorShapeLoadImages \ XcursorSupportsARGB \ - XcursorSetDefaultSize \ - XcursorGetDefaultSize \ - XcursorSetTheme \ - XcursorGetTheme + XcursorSupportsAnim \ + XcursorTryShapeBitmapCursor \ + XcursorTryShapeCursor \ + XcursorXcFileLoad \ + XcursorXcFileLoadAllImages \ + XcursorXcFileLoadImage \ + XcursorXcFileLoadImages \ + XcursorXcFileSave libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@)
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/man/Makefile.in -> _service:tar_scm:libXcursor-1.2.1.tar.gz/man/Makefile.in
Changed
@@ -303,37 +303,65 @@ $(Xcursor_shadows:=.man) Xcursor_shadows = \ - XcursorImageCreate \ - XcursorImageDestroy \ - XcursorImagesCreate \ - XcursorImagesDestroy \ + XcursorAnimateCreate \ + XcursorAnimateDestroy \ + XcursorAnimateNext \ + XcursorCommentCreate \ + XcursorCommentDestroy \ + XcursorCommentsCreate \ + XcursorCommentsDestroy \ XcursorCursorsCreate \ XcursorCursorsDestroy \ - XcursorXcFileLoadImage \ - XcursorXcFileLoadImages \ - XcursorXcFileLoadAllImages \ - XcursorXcFileLoad \ - XcursorXcFileSave \ + XcursorFileLoad \ + XcursorFileLoadAllImages \ + XcursorFileLoadImage \ + XcursorFileLoadImages \ + XcursorFileSave \ + XcursorFileSaveImages \ + XcursorFilenameLoad \ + XcursorFilenameLoadAllImages \ + XcursorFilenameLoadCursor \ + XcursorFilenameLoadCursors \ XcursorFilenameLoadImage \ XcursorFilenameLoadImages \ - XcursorFilenameLoadAllImages \ - XcursorFilenameLoad \ - XcursorFilenameSaveImages \ XcursorFilenameSave \ - XcursorLibraryLoadImage \ - XcursorLibraryLoadImages \ - XcursorFilenameLoadCursor \ + XcursorFilenameSaveImages \ + XcursorGetDefaultSize \ + XcursorGetTheme \ + XcursorGetThemeCore \ + XcursorImageCreate \ + XcursorImageDestroy \ + XcursorImageHash \ + XcursorImageLoadCursor \ + XcursorImagesCreate \ + XcursorImagesDestroy \ + XcursorImagesLoadCursor \ + XcursorImagesLoadCursors \ + XcursorImagesSetName \ XcursorLibraryLoadCursor \ XcursorLibraryLoadCursors \ - XcursorShapeLoadImage \ - XcursorShapeLoadImages \ + XcursorLibraryLoadImage \ + XcursorLibraryLoadImages \ + XcursorLibraryPath \ + XcursorLibraryShape \ + XcursorNoticeCreateBitmap \ + XcursorNoticePutBitmap \ + XcursorSetDefaultSize \ + XcursorSetTheme \ + XcursorSetThemeCore \ XcursorShapeLoadCursor \ XcursorShapeLoadCursors \ + XcursorShapeLoadImage \ + XcursorShapeLoadImages \ XcursorSupportsARGB \ - XcursorSetDefaultSize \ - XcursorGetDefaultSize \ - XcursorSetTheme \ - XcursorGetTheme + XcursorSupportsAnim \ + XcursorTryShapeBitmapCursor \ + XcursorTryShapeCursor \ + XcursorXcFileLoad \ + XcursorXcFileLoadAllImages \ + XcursorXcFileLoadImage \ + XcursorXcFileLoadImages \ + XcursorXcFileSave libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) EXTRA_DIST = $(libman_PRE)
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/man/Xcursor.man -> _service:tar_scm:libXcursor-1.2.1.tar.gz/man/Xcursor.man
Changed
@@ -1,384 +1,903 @@ .\" +.\" Copyright © 2021 Thomas E. Dickey .\" 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 +.\" 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. +.\" documentation, and that the name of the above copyright holders not be +.\" used in advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. The above copyright +.\" holders make 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 +.\" THE ABOVE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +.\" SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS 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. .\" -.de TQ -.br +.de TA +.ie n .ta 0.8i 1.6i 2.4i 3.2i +.el .ta 0.5i 1.0i 1.5i 2.0i +.. +.de PS +.sp .ns .TP \\$1 +.na +.nf +.ie n .ta 0.8i 3.0i +.el .ta 0.5i 2.0i +.. +.de PE +.br +.ad +.fi +.sp +.TA +.. +.de QS +.in +.2i +.nf +.na +.ie n .ta 1.0i 3.0i +.el .ta 0.6i 2.0i +.. +.de QC +.QS +.ie n .ta 2.0i 3.0i +.el .ta 1.6i 2.6i +.ft CR +.. +.de QE +.in -.2i +.ft +.fi +.ad +.TA +.. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 .. -.TH XCURSOR __libmansuffix__ __xorgversion__ "Keith Packard" - +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.TH XCURSOR __libmansuffix__ __xorgversion__ "X Version 11" +.hy 0 .SH NAME -XCURSOR \- Cursor management library - +Xcursor \- Cursor management library +. .SH SYNOPSIS .nf .B #include <X11/Xcursor/Xcursor.h> .fi .SH DESCRIPTION .B Xcursor -is a simple library designed to help locate and load cursors. Cursors can -be loaded from files or memory. A library of common cursors exists which -map to the standard X cursor names. Cursors can exist in several sizes and +is a simple library designed to help locate and load cursors. +Cursors can be loaded from files or memory. +A library of common cursors exists which +map to the standard X cursor names. +Cursors can exist in several sizes and the library automatically picks the best size. - +. .SH FUNCTIONAL OVERVIEW Xcursor is built in a couple of layers; at the bottom layer is code which -can load cursor images from files. Above that is a layer which locates -cursor files based on the library path and theme. At the top is a layer +can load cursor images from files. +Above that is a layer which locates +cursor files based on the library path and theme. +At the top is a layer which builds cursors either out of an image loaded from a file or one of the -standard X cursors. When using images loaded from files, Xcursor prefers -to use the Render extension CreateCursor request if supported by the X -server. Where not supported, Xcursor maps the cursor image to a standard X +standard X cursors. +When using images loaded from files, Xcursor prefers +to use the Render extension CreateCursor request if supported by the X server. +Where not supported, Xcursor maps the cursor image to a standard X cursor and uses the core CreateCursor request. - +. .SS CURSOR FILES -Xcursor defines a new format for cursors on disk. Each file holds -one or more cursor images. Each cursor image is tagged with a nominal size -so that the best size can be selected automatically. Multiple cursors of +Xcursor defines a new format for cursors on disk. +Each file holds +one or more cursor images. +Each cursor image is tagged with a nominal size +so that the best size can be selected automatically. +Multiple cursors of the same nominal size can be loaded together; applications are expected to use them as an animated sequence. .P Cursor files are stored as a header containing a table of contents followed -by a sequence of chunks. The table of contents indicates the type, subtype -and position in the file of each chunk. The file header looks like: +by a sequence of chunks. +The table of contents indicates the type, subtype +and position in the file of each chunk. +The file header looks like: .LP -.in +.2i -\fImagic\fP\^: CARD32 'Xcur' (0x58, 0x63, 0x75, 0x72) -.br -\fIheader\fP\^: CARD32 bytes in this header -.br -\fIversion\fP\^: CARD32 file version number -.br -\fIntoc\fP\^: CARD32 number of toc entries -.br -\fItoc\fP\^: LISTofTOC table of contents +.QS +\fImagic\fP\^: CARD32 "Xcur" (0x58, 0x63, 0x75, 0x72) +\fIheader\fP\^: CARD32 bytes in this header +\fIversion\fP\^: CARD32 file version number +\fIntoc\fP\^: CARD32 number of toc entries +\fItoc\fP\^: LISTofTOC table of contents .in -.2i .P Each table of contents entry looks like: .LP -.in +.2i -\fItype\fP\^: CARD32 entry type -.br -\fIsubtype\fP\^: CARD32 type-specific label - size for images -.br -\fIposition\fP\^: CARD32 absolute byte position of table in file -.in -.2i +.QS +\fItype\fP\^: CARD32 entry type +\fIsubtype\fP\^: CARD32 type-specific label - size for images +\fIposition\fP\^: CARD32 absolute byte position of table in file +.QE .P .P Each chunk in the file has set of common header fields followed by additional type-specific fields: .LP -.in +.2i -\fIheader\fP\^: CARD32 bytes in chunk header (including type-specific fields) -.br -\fItype\fP\^: CARD32 must match type in TOC for this chunk -.br -\fIsubtype\fP\^: CARD32 must match subtype in TOC for this chunk -.br -\fIversion\fP\^: CARD32 version number for this chunk type -.in -.2i +.QS
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorAnimateCreate.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorAnimateDestroy.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorAnimateNext.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorCommentCreate.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorCommentDestroy.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorCommentsCreate.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorCommentsDestroy.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileLoad.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileLoadAllImages.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileLoadImage.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileLoadImages.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileSave.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFileSaveImages.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorFilenameLoadCursors.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorGetThemeCore.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorImageHash.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorImageLoadCursor.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorImagesLoadCursor.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorImagesLoadCursors.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorImagesSetName.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorLibraryPath.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorLibraryShape.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorNoticeCreateBitmap.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorNoticePutBitmap.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorSetThemeCore.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorSupportsAnim.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorTryShapeBitmapCursor.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.1.tar.gz/man/XcursorTryShapeCursor.man
Added
@@ -0,0 +1,1 @@ +.so man__libmansuffix__/Xcursor.__libmansuffix__
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/src/cursor.c -> _service:tar_scm:libXcursor-1.2.1.tar.gz/src/cursor.c
Changed
@@ -30,7 +30,7 @@ XcursorCursors *cursors; cursors = malloc (sizeof (XcursorCursors) + - size * sizeof (Cursor)); + (size_t) size * sizeof (Cursor)); if (!cursors) return NULL; cursors->ref = 1; @@ -91,6 +91,7 @@ return cursor; } +#if RENDER_MAJOR > 0 || RENDER_MINOR >= 5 static int nativeByteOrder (void) { @@ -98,6 +99,7 @@ return (*((char *) &x) == 1) ? LSBFirst : MSBFirst; } +#endif static XcursorUInt _XcursorPixelBrightness (XcursorPixel p) @@ -124,7 +126,7 @@ value = value * 255 / alpha; if (value > 255) value = 255; - return value | (value << 8); + return (unsigned short) (value | (value << 8)); } static void @@ -194,6 +196,8 @@ return (int) (((*ap >> 0) & 0xff) - ((*bp >> 0) & 0xff)); } +#define ScaledPixels(c,n) ((c)/(XcursorPixel)(n)) + static XcursorPixel _XcursorAverageColor (XcursorPixel *pixels, int npixels) { @@ -212,7 +216,10 @@ green += (p >> 8) & 0xff; blue += (p >> 0) & 0xff; } - return (0xffU << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels); + return (0xffU << 24) + | (ScaledPixels(red, npixels) << 16) + | (ScaledPixels(green, npixels) << 8) + | ScaledPixels(blue, npixels); } typedef struct XcursorCoreCursor { @@ -258,7 +265,7 @@ pc = colors; max_blue = max_green = max_red = 0; min_blue = min_green = min_red = 255; - n = npixels; + n = (int) npixels; while (n--) { p = *po++; @@ -285,7 +292,7 @@ p = 0; *pn++ = p; } - ncolors = pc - colors; + ncolors = (int) (pc - colors); /* * Compute longest dimension and sort @@ -297,7 +304,7 @@ compare = _XcursorCompareRed; else compare = _XcursorCompareBlue; - qsort (colors, ncolors, sizeof (XcursorPixel), compare); + qsort (colors, (size_t) ncolors, sizeof (XcursorPixel), compare); /* * Compute average colors on both sides of the cut */ @@ -309,8 +316,8 @@ * Select best color for each pixel */ pn = pixels; - for (y = 0; y < image->height; y++) - for (x = 0; x < image->width; x++) + for (y = 0; (unsigned) y < image->height; y++) + for (x = 0; (unsigned) x < image->width; x++) { p = *pn++; if (p & 0xff000000) @@ -359,12 +366,12 @@ XcursorPixel a, i, d; pixel = image->pixels; - for (y = 0; y < image->height; y++) - for (x = 0; x < image->width; x++) + for (y = 0; (unsigned) y < image->height; y++) + for (x = 0; (unsigned) x < image->width; x++) { p = *pixel++; - a = ((p >> 24) * DITHER_SIZE + 127) / 255; - i = (_XcursorPixelBrightness (p) * DITHER_SIZE + 127) / 255; + a = (XcursorPixel) (((p >> 24) * DITHER_SIZE + 127) / 255); + i = (XcursorPixel) ((_XcursorPixelBrightness (p) * DITHER_SIZE + 127) / 255); d = orderedDithery&(DITHER_DIM-1)x&(DITHER_DIM-1); if (a > d) { @@ -398,9 +405,9 @@ unsigned int npixels = image->width * image->height; int n; int right = 1; - int belowLeft = image->width - 1; - int below = image->width; - int belowRight = image->width + 1; + int belowLeft = (int) (image->width - 1); + int below = (int) image->width; + int belowRight = (int) (image->width + 1); int iError, aError; int iErrorRight, aErrorRight; int iErrorBelowLeft, aErrorBelowLeft; @@ -420,10 +427,10 @@ pixel = image->pixels; iP = iPicture; aP = aPicture; - n = npixels; + n = (int) npixels; max_inten = 0; min_inten = 0xff; - while (n--) + while (n-- > 0) { p = *pixel++; *aP++ = (int) (p >> 24); @@ -438,8 +445,8 @@ iP = iPicture; aP = aPicture; mean_inten = (max_inten + min_inten + 1) >> 1; - for (y = 0; y < image->height; y++) - for (x = 0; x < image->width; x++) + for (y = 0; (unsigned) y < image->height; y++) + for (x = 0; (unsigned) x < image->width; x++) { aR = *aP; iR = *iP; @@ -475,12 +482,12 @@ aErrorBelow = (aError * 5) >> 4; aErrorBelowRight = (aError - aErrorRight - aErrorBelowLeft - aErrorBelow); - if (x < image->width - 1) + if (x < ((int)image->width - 1)) { iPright += iErrorRight; aPright += aErrorRight; } - if (y < image->height - 1) + if (y < ((int)image->height - 1)) { if (x) { @@ -489,7 +496,7 @@ } iPbelow += iErrorBelow; aPbelow += aErrorBelow; - if (x < image->width - 1) + if (x < ((int)image->width - 1)) { iPbelowRight += iErrorBelowRight; aPbelowRight += aErrorBelowRight; @@ -501,10 +508,10 @@ free (iPicture); core->on_color.red = core->on_color.green = - core->on_color.blue = (min_inten | min_inten << 8); + core->on_color.blue = (unsigned short) (min_inten | min_inten << 8); core->off_color.red = core->off_color.green = - core->off_color.blue = (max_inten | max_inten << 8); + core->off_color.blue = (unsigned short) (max_inten | max_inten << 8); return True; } @@ -518,8 +525,8 @@ * Draw the image, picking black for dark pixels and white for light */ pixel = image->pixels; - for (y = 0; y < image->height; y++) - for (x = 0; x < image->width; x++) + for (y = 0; (unsigned) y < image->height; y++) + for (x = 0; (unsigned) x < image->width; x++) { p = *pixel++; if ((p >> 24) >= 0x80) @@ -560,8 +567,8 @@ GC gc; XRenderPictFormat *format; - ximage.width = image->width;
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/src/display.c -> _service:tar_scm:libXcursor-1.2.1.tar.gz/src/display.c
Changed
@@ -50,6 +50,8 @@ { XcursorDisplayInfo *info, **prev; + (void) codes; /* UNUSED */ + /* * Unhook from the global list */ @@ -70,20 +72,20 @@ static int _XcursorDefaultParseBool (char *v) { - char c0, c1; + char c0; c0 = *v; if (isupper ((int)c0)) - c0 = tolower (c0); + c0 = (char) tolower (c0); if (c0 == 't' || c0 == 'y' || c0 == '1') return 1; if (c0 == 'f' || c0 == 'n' || c0 == '0') return 0; if (c0 == 'o') { - c1 = v1; + char c1 = v1; if (isupper ((int)c1)) - c1 = tolower (c1); + c1 = (char) tolower (c1); if (c1 == 'n') return 1; if (c1 == 'f')
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/src/file.c -> _service:tar_scm:libXcursor-1.2.1.tar.gz/src/file.c
Changed
@@ -35,14 +35,14 @@ return NULL; image = malloc (sizeof (XcursorImage) + - width * height * sizeof (XcursorPixel)); + (size_t) (width * height) * sizeof (XcursorPixel)); if (!image) return NULL; image->version = XCURSOR_IMAGE_VERSION; image->pixels = (XcursorPixel *) (image + 1); - image->size = width > height ? width : height; - image->width = width; - image->height = height; + image->size = (XcursorDim) (width > height ? width : height); + image->width = (XcursorDim) width; + image->height = (XcursorDim) height; image->delay = 0; return image; } @@ -59,7 +59,7 @@ XcursorImages *images; images = malloc (sizeof (XcursorImages) + - size * sizeof (XcursorImage *)); + (size_t) size * sizeof (XcursorImage *)); if (!images) return NULL; images->nimage = 0; @@ -109,7 +109,7 @@ if (length < 0 || length > XCURSOR_COMMENT_MAX_LEN) return NULL; - comment = malloc (sizeof (XcursorComment) + length + 1); + comment = malloc (sizeof (XcursorComment) + (size_t) length + 1); if (!comment) return NULL; comment->version = XCURSOR_COMMENT_VERSION; @@ -131,7 +131,7 @@ XcursorComments *comments; comments = malloc (sizeof (XcursorComments) + - size * sizeof (XcursorComment *)); + (size_t) size * sizeof (XcursorComment *)); if (!comments) return NULL; comments->ncomment = 0; @@ -161,11 +161,12 @@ return XcursorFalse; if ((*file->read) (file, bytes, 4) != 4) - return XcursorFalse; - *u = ((bytes0 << 0) | - (bytes1 << 8) | - (bytes2 << 16) | - (bytes3 << 24)); + return XcursorFalse; + + *u = ((XcursorUInt)(bytes0) << 0) | + ((XcursorUInt)(bytes1) << 8) | + ((XcursorUInt)(bytes2) << 16) | + ((XcursorUInt)(bytes3) << 24); return XcursorTrue; } @@ -185,10 +186,10 @@ if (!file) return XcursorFalse; - bytes0 = u; - bytes1 = u >> 8; - bytes2 = u >> 16; - bytes3 = u >> 24; + bytes0 = (unsigned char)(u); + bytes1 = (unsigned char)(u >> 8); + bytes2 = (unsigned char)(u >> 16); + bytes3 = (unsigned char)(u >> 24); if ((*file->write) (file, bytes, 4) != 4) return XcursorFalse; return XcursorTrue; @@ -232,7 +233,7 @@ { XcursorFileHeader head, *fileHeader; XcursorUInt skip; - int n; + XcursorUInt n; if (!file) return NULL; @@ -285,7 +286,7 @@ static XcursorBool _XcursorWriteFileHeader (XcursorFile *file, XcursorFileHeader *fileHeader) { - int toc; + XcursorUInt toc; if (!file || !fileHeader) return XcursorFalse; @@ -374,7 +375,7 @@ XcursorDim size, int *nsizesp) { - int n; + XcursorUInt n; int nsizes = 0; XcursorDim bestSize = 0; XcursorDim thisSize; @@ -404,7 +405,7 @@ XcursorDim size, int count) { - int toc; + XcursorUInt toc; XcursorDim thisSize; if (!fileHeader) @@ -423,7 +424,7 @@ } if (toc == fileHeader->ntoc) return -1; - return toc; + return (int) toc; } static XcursorImage * @@ -462,7 +463,7 @@ return NULL; /* Create the image and initialize it */ - image = XcursorImageCreate (head.width, head.height); + image = XcursorImageCreate ((int) head.width, (int) head.height); if (image == NULL) return NULL; if (chunkHeader.version < image->version) @@ -471,7 +472,7 @@ image->xhot = head.xhot; image->yhot = head.yhot; image->delay = head.delay; - n = image->width * image->height; + n = (int) (image->width * image->height); p = image->pixels; while (n--) { @@ -538,7 +539,7 @@ return XcursorFalse; /* write the image */ - n = image->width * image->height; + n = (int) (image->width * image->height); p = image->pixels; while (n--) { @@ -567,10 +568,10 @@ /* read extra comment header fields */ if (!_XcursorReadUInt (file, &length)) return NULL; - comment = XcursorCommentCreate (chunkHeader.subtype, length); + comment = XcursorCommentCreate (chunkHeader.subtype, (int) length); if (!comment) return NULL; - if (!_XcursorReadBytes (file, comment->comment, length)) + if (!_XcursorReadBytes (file, comment->comment, (int) length)) { XcursorCommentDestroy (comment); return NULL; @@ -582,7 +583,7 @@ static XcursorUInt _XcursorCommentLength (XcursorComment *comment) { - return XCURSOR_COMMENT_HEADER_LEN + strlen (comment->comment); + return XCURSOR_COMMENT_HEADER_LEN + (XcursorUInt) strlen (comment->comment); } static XcursorBool @@ -597,7 +598,7 @@ if (!file || !fileHeader || !comment || !comment->comment) return XcursorFalse; - length = strlen (comment->comment); + length = (XcursorUInt) strlen (comment->comment); /* sanity check data */ if (length > XCURSOR_COMMENT_MAX_LEN) @@ -616,7 +617,7 @@ if (!_XcursorWriteUInt (file, length)) return XcursorFalse; - if (!_XcursorWriteBytes (file, comment->comment, length)) + if (!_XcursorWriteBytes (file, comment->comment, (int) length)) return XcursorFalse; return XcursorTrue; } @@ -654,7 +655,6 @@ int nsize; XcursorImages *images; int n; - int toc; if (!file || size < 0) return NULL; @@ -675,7 +675,7 @@
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/src/library.c -> _service:tar_scm:libXcursor-1.2.1.tar.gz/src/library.c
Changed
@@ -32,6 +32,11 @@ #define XCURSORPATH "~/.local/share/icons:~/.icons:/usr/share/icons:/usr/share/pixmaps:"ICONDIR #endif +typedef struct XcursorInherit { + char *line; + const char *theme; +} XcursorInherit; + const char * XcursorLibraryPath (void) { @@ -58,15 +63,15 @@ pathlen++; } if (len == -1) - len = strlen (elt); + len = (int) strlen (elt); /* strip leading slashes */ while (len && elt0 == '/') { elt++; len--; } - strncpy (path + pathlen, elt, len); - pathpathlen + len = '\0'; + strncpy (path + pathlen, elt, (size_t) len); + pathpathlen + (size_t) len = '\0'; } static char * @@ -82,19 +87,19 @@ int len; if (!dir || !theme) - return NULL; + return NULL; colon = strchr (dir, ':'); if (!colon) colon = dir + strlen (dir); - dirlen = colon - dir; + dirlen = (int) (colon - dir); tcolon = strchr (theme, ':'); if (!tcolon) tcolon = theme + strlen (theme); - themelen = tcolon - theme; + themelen = (int) (tcolon - theme); home = NULL; homelen = 0; @@ -103,7 +108,7 @@ home = getenv ("HOME"); if (!home) return NULL; - homelen = strlen (home); + homelen = (int) strlen (home); dir++; dirlen--; } @@ -114,7 +119,7 @@ */ len = 1 + homelen + 1 + dirlen + 1 + themelen + 1; - full = malloc (len); + full = malloc ((size_t)len); if (!full) return NULL; full0 = '\0'; @@ -132,7 +137,7 @@ char *full; if (!dir || !subdir || !file) - return NULL; + return NULL; full = malloc (strlen (dir) + 1 + strlen (subdir) + 1 + strlen (file) + 1); if (!full) @@ -165,7 +170,7 @@ FILE *f; if (!full) - return NULL; + return NULL; f = fopen (full, "r"); if (f) @@ -175,7 +180,6 @@ if (!strncmp (line, "Inherits", 8)) { char *l = line + 8; - char *r; while (*l == ' ') l++; if (*l != '=') continue; l++; @@ -183,7 +187,7 @@ result = malloc (strlen (l) + 1); if (result) { - r = result; + char *r = result; while (*l) { while (XcursorSep(*l) || XcursorWhite (*l)) l++; @@ -206,19 +210,20 @@ } #define XCURSOR_SCAN_CORE ((FILE *) 1) +#define MAX_INHERITS_DEPTH 32 static FILE * XcursorScanTheme (const char *theme, const char *name) { - FILE *f = NULL; - char *full; - char *dir; - const char *path; - char *inherits = NULL; - const char *i; + FILE *f = NULL; + char *full; + char *dir; + const char *path; + XcursorInherit inheritsMAX_INHERITS_DEPTH + 1; + int d; if (!theme || !name) - return NULL; + return NULL; /* * XCURSOR_CORE_THEME is a magic name; cursors from the core set @@ -228,46 +233,72 @@ */ if (!strcmp (theme, XCURSOR_CORE_THEME) && XcursorLibraryShape (name) >= 0) return XCURSOR_SCAN_CORE; - /* - * Scan this theme - */ - for (path = XcursorLibraryPath (); - path && f == NULL; - path = _XcursorNextPath (path)) + + memset (inherits, 0, sizeof (inherits)); + + d = 0; + inheritsd.theme = theme; + + while (f == NULL && d >= 0 && inheritsd.theme != NULL) { - dir = _XcursorBuildThemeDir (path, theme); - if (dir) + /* + * Scan this theme + */ + for (path = XcursorLibraryPath (); + path && f == NULL; + path = _XcursorNextPath (path)) { - full = _XcursorBuildFullname (dir, "cursors", name); - if (full) + dir = _XcursorBuildThemeDir (path, inheritsd.theme); + if (dir) { - f = fopen (full, "r"); - free (full); - } - if (!f && !inherits) - { - full = _XcursorBuildFullname (dir, "", "index.theme"); + full = _XcursorBuildFullname (dir, "cursors", name); if (full) { - inherits = _XcursorThemeInherits (full); + f = fopen (full, "r"); free (full); } + if (!f && inheritsd + 1.line == NULL) + { + if (d + 1 >= MAX_INHERITS_DEPTH) + { + free (dir); + goto finish; + } + full = _XcursorBuildFullname (dir, "", "index.theme"); + if (full) + { + inheritsd + 1.line = _XcursorThemeInherits (full); + inheritsd + 1.theme = inheritsd + 1.line; + free (full); + } + } + free (dir); } - free (dir); } +
View file
_service:tar_scm:libXcursor-1.2.0.tar.bz2/src/xlib.c -> _service:tar_scm:libXcursor-1.2.1.tar.gz/src/xlib.c
Changed
@@ -32,7 +32,6 @@ XcursorDisplayInfo *info; XcursorBool ret; XFontStruct *fs; - int n; Atom cursor; if (!dpy || !font) @@ -57,6 +56,7 @@ fs = XQueryFont (dpy, font); if (fs) { + int n; cursor = XInternAtom (dpy, "cursor", False); for (n = 0; n < fs->n_properties; n++) if (fs->propertiesn.name == XA_FONT) @@ -291,7 +291,7 @@ if (bit_swap) t = _reverse_bytet; if (t) - hash(i++) & (XCURSOR_BITMAP_HASH_SIZE - 1) ^= RotByte (t, y & 7); + hash(i++) & (XCURSOR_BITMAP_HASH_SIZE - 1) ^= (unsigned char) RotByte (t, y & 7); } line += image->bytes_per_line; } @@ -336,7 +336,7 @@ /* * Make sure the image fills the bitmap */ - if (image->width != bmi->width || image->height != bmi->height) + if (image->width != (int)bmi->width || image->height != (int)bmi->height) { bmi->bitmap = 0; return; @@ -403,6 +403,10 @@ int i; Cursor cursor; + (void) mask; /* UNUSED */ + (void) x; /* UNUSED */ + (void) y; /* UNUSED */ + if (!dpy || !foreground || !background) return 0;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2