summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/Xcursor.man7
-rw-r--r--src/library.c9
2 files changed, 11 insertions, 5 deletions
diff --git a/man/Xcursor.man b/man/Xcursor.man
index 90fa534..3596c6a 100644
--- a/man/Xcursor.man
+++ b/man/Xcursor.man
@@ -1,8 +1,7 @@
.\"
-.\" $XFree86: xc/lib/Xcursor/Xcursor.man,v 1.2 2003/02/13 03:09:04 dawes Exp $
-.\"
-.\" Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+.\" $XFree86: xc/lib/Xcursor/Xcursor.man,v 1.4 2003/06/12 14:12:27 eich Exp $
.\"
+.\" Copyright 2002 Keith Packard, member of The XFree86 Project, Inc..\"
.\" 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
@@ -141,7 +140,7 @@ Images look like:
Xcursor (mostly) follows the freedesktop.org spec for theming icons. The
default search path it uses is $HOME/.icons, /usr/share/icons,
/usr/share/pimaps, /usr/X11R6/lib/X11/icons. Within each of these
-directorys, it searches for a directory using the theme name. Within the
+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.
.PP
diff --git a/src/library.c b/src/library.c
index 3512649..b359c45 100644
--- a/src/library.c
+++ b/src/library.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xcursor/library.c,v 1.2 2003/01/26 03:22:42 eich Exp $
+ * $XFree86: xc/lib/Xcursor/library.c,v 1.4 2003/11/11 01:17:54 dawes Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -101,12 +101,19 @@ _XcursorBuildThemeDir (const char *dir, const char *theme)
if (!home)
return 0;
homelen = strlen (home);
+ /* A '/' gets prepended if $HOME doesn't start with one. */
+ if (home[0] != '/')
+ homelen++;
dir++;
dirlen--;
}
len = homelen + dirlen + 1 + themelen + 1;
+ /* A '/' gets inserted if dir doesn't start with one. */
+ if (dir[0] != '/')
+ len++;
+
full = malloc (len);
if (!full)
return 0;