diff options
author | Vlad Zahorodnii <vlad.zahorodnii@kde.org> | 2022-01-27 21:11:20 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-02-05 14:33:32 +0000 |
commit | 4ebd997de2b52c0998a91436ed05ffbe6d56a306 (patch) | |
tree | b40eb117a2790668508760c36daf44dee4064630 /cursor | |
parent | e949b3bfbb92363724ef1bd5b2f5736de8a9f98a (diff) | |
download | wayland-4ebd997de2b52c0998a91436ed05ffbe6d56a306.tar.gz |
cursor: Remove unused XcursorLibraryLoadImages() function
XcursorLibraryLoadImages() function is unused and not exported according to
objdump, so its removal should be an ABI compatible change.
Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Diffstat (limited to 'cursor')
-rw-r--r-- | cursor/xcursor.c | 77 | ||||
-rw-r--r-- | cursor/xcursor.h | 3 |
2 files changed, 0 insertions, 80 deletions
diff --git a/cursor/xcursor.c b/cursor/xcursor.c index 188be7c..744bbcd 100644 --- a/cursor/xcursor.c +++ b/cursor/xcursor.c @@ -822,83 +822,6 @@ _XcursorThemeInherits (const char *full) return result; } -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; - char *xcursor_path; - - if (!theme || !name) - return NULL; - - /* - * Scan this theme - */ - xcursor_path = XcursorLibraryPath (); - for (path = xcursor_path; - path && f == NULL; - path = _XcursorNextPath (path)) - { - dir = _XcursorBuildThemeDir (path, theme); - if (dir) - { - full = _XcursorBuildFullname (dir, "cursors", name); - if (full) - { - f = fopen (full, "r"); - free (full); - } - if (!f && !inherits) - { - full = _XcursorBuildFullname (dir, "", "index.theme"); - if (full) - { - inherits = _XcursorThemeInherits (full); - free (full); - } - } - free (dir); - } - } - /* - * Recurse to scan inherited themes - */ - for (i = inherits; i && f == NULL; i = _XcursorNextPath (i)) - f = XcursorScanTheme (i, name); - if (inherits != NULL) - free (inherits); - free (xcursor_path); - return f; -} - -XcursorImages * -XcursorLibraryLoadImages (const char *file, const char *theme, int size) -{ - FILE *f = NULL; - XcursorImages *images = NULL; - - if (!file) - return NULL; - - if (theme) - f = XcursorScanTheme (theme, file); - if (!f) - f = XcursorScanTheme ("default", file); - if (f) - { - images = XcursorFileLoadImages (f, size); - if (images) - XcursorImagesSetName (images, file); - fclose (f); - } - return images; -} - static void load_all_cursors_from_dir(const char *path, int size, void (*load_callback)(XcursorImages *, void *), diff --git a/cursor/xcursor.h b/cursor/xcursor.h index c1ca12c..fe2339a 100644 --- a/cursor/xcursor.h +++ b/cursor/xcursor.h @@ -54,9 +54,6 @@ typedef struct _XcursorImages { char *name; /* name used to load images */ } XcursorImages; -XcursorImages * -XcursorLibraryLoadImages (const char *file, const char *theme, int size); - void XcursorImagesDestroy (XcursorImages *images); |