50 if (!filename || !strlen(filename))
54 char *localFilename = strdup(filename);
58 char *sddsTags = NULL;
60 if ((sddsTags = strchr(localFilename,
'='))) {
62 if (!strchr(sddsTags + 1,
'+'))
72 if (search_path && strlen(search_path)) {
74 cp_str(&pathList, search_path);
77 size_t needed = strlen(localFilename) + strlen(path) + 2 +
78 (sddsTags ? strlen(sddsTags) + 2 : 0);
79 char *tmpName = malloc(needed);
80 sprintf(tmpName,
"%s/%s", path, localFilename);
85 strcat(tmpName, sddsTags);
98 cp_str(&result, localFilename);