--- rxvt-unicode/src/misc.C 2006/02/20 22:42:00 1.40 +++ rxvt-unicode/src/misc.C 2007/08/27 20:00:26 1.42 @@ -250,16 +250,6 @@ return ((strncmp (s1, s2, n) == 0) ? n : 0); } -const char * -rxvt_Str_skip_space (const char *str) NOTHROW -{ - if (str) - while (*str && isspace (*str)) - str++; - - return str; -} - /* * remove leading/trailing space and strip-off leading/trailing quotes. * in place. @@ -427,95 +417,5 @@ free (cs); } -/*----------------------------------------------------------------------* - * file searching - */ - -#ifdef XPM_BACKGROUND -/* - * search for FILE in the current working directory, and within the - * colon-delimited PATHLIST, adding the file extension EXT if required. - * - * FILE is either semi-colon or zero terminated - */ -char * -rxvt_File_search_path (const char *pathlist, const char *file, const char *ext) NOTHROW -{ - int maxpath, len; - const char *p, *path; - char name[256]; - - if (!access (file, R_OK)) /* found (plain name) in current directory */ - return strdup (file); - - /* semi-colon delimited */ - if ((p = strchr (file, ';'))) - len = (p - file); - else - len = strlen (file); - - /* leave room for an extra '/' and trailing '\0' */ - maxpath = sizeof (name) - (len + (ext ? strlen (ext) : 0) + 2); - if (maxpath <= 0) - return NULL; - - /* check if we can find it now */ - strncpy (name, file, len); - name[len] = '\0'; - - if (!access (name, R_OK)) - return strdup (name); - if (ext) - { - strcat (name, ext); - if (!access (name, R_OK)) - return strdup (name); - } - for (path = pathlist; path != NULL && *path != '\0'; path = p) - { - int n; - - /* colon delimited */ - if ((p = strchr (path, ':')) == NULL) - p = strchr (path, '\0'); - - n = (p - path); - if (*p != '\0') - p++; - - if (n > 0 && n <= maxpath) - { - strncpy (name, path, n); - if (name[n - 1] != '/') - name[n++] = '/'; - name[n] = '\0'; - strncat (name, file, len); - - if (!access (name, R_OK)) - return strdup (name); - if (ext) - { - strcat (name, ext); - if (!access (name, R_OK)) - return strdup (name); - } - } - } - return NULL; -} - -char * -rxvt_File_find (const char *file, const char *ext, const char *path) NOTHROW -{ - char *f; - - if (file == NULL || *file == '\0') - return NULL; - - f = rxvt_File_search_path (path, file, ext); - - return f; -} -#endif