From: Kevin McCarthy Date: Tue, 15 Oct 2019 06:38:07 +0000 (+0800) Subject: Removed unused mutt_expand_link() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48847904aa82004e5d4ee02c3eba4d854437ed81;p=mutt Removed unused mutt_expand_link() --- diff --git a/muttlib.c b/muttlib.c index eed74ce9..ecb73d97 100644 --- a/muttlib.c +++ b/muttlib.c @@ -402,31 +402,6 @@ int mutt_matches_ignore (const char *s, LIST *t) return 0; } -/* prepend the path part of *path to *link */ -void mutt_expand_link (char *newpath, const char *path, const char *link) -{ - const char *lb = NULL; - size_t len; - - /* link is full path */ - if (*link == '/') - { - strfcpy (newpath, link, _POSIX_PATH_MAX); - return; - } - - if ((lb = strrchr (path, '/')) == NULL) - { - /* no path in link */ - strfcpy (newpath, link, _POSIX_PATH_MAX); - return; - } - - len = lb - path + 1; - memcpy (newpath, path, len); - strfcpy (newpath + len, link, _POSIX_PATH_MAX - len); -} - char *mutt_expand_path (char *s, size_t slen) { return _mutt_expand_path (s, slen, 0); diff --git a/protos.h b/protos.h index bbf88eac..8ee932c8 100644 --- a/protos.h +++ b/protos.h @@ -213,7 +213,6 @@ void mutt_error_history_init (void); void mutt_expand_aliases_env (ENVELOPE *); void mutt_expand_file_fmt (BUFFER *, const char *, const char *); void mutt_expand_fmt (BUFFER *, const char *, const char *); -void mutt_expand_link (char *, const char *, const char *); void mutt_fix_reply_recipients (ENVELOPE *env); void mutt_folder_hook (const char *); void mutt_format_string (char *, size_t, int, int, int, char, const char *, size_t, int);