X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=muttlib.c;h=1aadda34230f8de7140e24ed28b6ea609bcc3f5f;hb=6141042cd0f8e305182da8dd77d21b40d5aa8b4f;hp=5608e34b3f0192e49cde8ec5323ca116009013f9;hpb=15d63145b9f11a1fa58c74abbeab7533ea2e5d21;p=apps%2Fmadmutt.git diff --git a/muttlib.c b/muttlib.c index 5608e34..1aadda3 100644 --- a/muttlib.c +++ b/muttlib.c @@ -13,22 +13,15 @@ #include #include -#include #include #include #include -#include +#include #include "alias.h" #include "mutt.h" #include "attach.h" -#include "version.h" - -#include - -#include - /* Modified by blong to accept a "suggestion" for file name. If * that file exists, then construct one with unique name but * keep any extension. This might fail, I guess. @@ -48,15 +41,15 @@ void mutt_adv_mktemp (const char* dir, char *s, ssize_t l) } } -/* returns true if the header contained in "s" is in list "t" */ -int mutt_matches_ignore (const char *s, string_list_t * t) +void mutt_mktemp(char *s) { - for (; t; t = t->next) { - if (!ascii_strncasecmp (s, t->data, m_strlen(t->data)) - || *t->data == '*') - return 1; - } - return 0; + int fd = m_tempfd(s, _POSIX_PATH_MAX, NONULL(Tempdir), NULL); + if (fd < 0) { + *s = '\0'; + } else { + close(fd); + unlink(s); + } } ssize_t _mutt_expand_path(char *s, ssize_t slen, int rx) @@ -168,17 +161,6 @@ ssize_t _mutt_expand_path(char *s, ssize_t slen, int rx) return m_strcpy(s, slen, tmp); } -void mutt_mktemp(char *s) -{ - int fd = m_tempfd(s, _POSIX_PATH_MAX, NONULL(Tempdir), NULL); - if (fd < 0) { - *s = '\0'; - } else { - close(fd); - unlink(s); - } -} - /* collapse the pathname using ~ or = when possible */ void mutt_pretty_mailbox (char *s) { @@ -397,17 +379,10 @@ void mutt_sleep (short s) sleep(MAX(s, SleepTime)); } -const char *mutt_make_version (int full) +const char *mutt_make_version(void) { static char vstring[STRING]; - - if (full) - snprintf (vstring, sizeof (vstring), - "Madmutt/%s-r%s (based on Mutt 1.5.11)", - MUTT_VERSION, MUTT_REVISION); - else - snprintf (vstring, sizeof (vstring), "Madmutt/%s-%s", - MUTT_VERSION, MUTT_REVISION); + snprintf(vstring, sizeof (vstring), "Madmutt/%s", MUTT_VERSION); return vstring; } @@ -518,7 +493,6 @@ int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags) if ((ISSPACE(ch) && !(flags & M_TOKEN_SPACE)) || (ch == '#' && !(flags & M_TOKEN_COMMENT)) || (ch == '=' && (flags & M_TOKEN_EQUAL)) - || (ch == ';' && !(flags & M_TOKEN_SEMICOLON)) || ((flags & M_TOKEN_PATTERN) && strchr("~=!|", ch))) { break;