-static int mutt_extract_path (char *filename, char *path, ssize_t pathlen)
-{
- char *tmp = p_new(char, _POSIX_PATH_MAX);
- char *help_ptr;
-
- help_ptr = tmp;
-
- while (*filename != '\0') {
- if (*filename == '/') {
- *help_ptr++ = *filename++;
- *help_ptr++ = '\0';
- m_strcat(path, pathlen, tmp);
- help_ptr = tmp;
- }
- *help_ptr++ = *filename++;
- }
- p_delete(&tmp);
- return 0;
-}
-