X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=0bf733c30c16f0fb2efbb66f576398f027be8a07;hp=6146d4e8359704733c8c359420f1063e7c578fe5;hb=df7c0ef298343ef5523ad0be5af9fd629f901738;hpb=238b70e39b78f585c586bd51aef41988b3cc73d1 diff --git a/muttlib.c b/muttlib.c index 6146d4e..0bf733c 100644 --- a/muttlib.c +++ b/muttlib.c @@ -19,15 +19,15 @@ #include #include +#include + #include "mutt.h" #include "enter.h" #include "mutt_curses.h" -#include "mime.h" #include "mx.h" #include "url.h" #include "attach.h" -#include "reldate.h" #include "version.h" #ifdef USE_IMAP @@ -357,7 +357,7 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) case '@': { HEADER *h; - ADDRESS *alias; + address_t *alias; if ((alias = mutt_lookup_alias (s + 1))) { h = mutt_new_header (); @@ -503,7 +503,7 @@ void mutt_set_parameter (const char *attribute, const char *value, for (q = *p; q; q = q->next) { if (ascii_strcasecmp (attribute, q->attribute) == 0) { - str_replace (&q->value, value); + m_strreplace(&q->value, value); return; } } @@ -542,9 +542,9 @@ int mutt_needs_mailcap (BODY * m) break; case TYPEAPPLICATION: - if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (m)) + if (mutt_is_application_pgp (m)) return 0; - if ((WithCrypto & APPLICATION_SMIME) && mutt_is_application_smime (m)) + if (mutt_is_application_smime (m)) return 0; break; @@ -561,7 +561,7 @@ int mutt_is_text_part (BODY * b) int t = b->type; char *s = b->subtype; - if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)) + if (mutt_is_application_pgp (b)) return 0; if (t == TYPETEXT) @@ -572,7 +572,7 @@ int mutt_is_text_part (BODY * b) return 1; } - if ((WithCrypto & APPLICATION_PGP) && t == TYPEAPPLICATION) { + if (t == TYPEAPPLICATION) { if (!ascii_strcasecmp ("pgp-keys", s)) return 1; } @@ -584,14 +584,14 @@ void mutt_free_envelope (ENVELOPE ** p) { if (!*p) return; - rfc822_free_address (&(*p)->return_path); - rfc822_free_address (&(*p)->from); - rfc822_free_address (&(*p)->to); - rfc822_free_address (&(*p)->cc); - rfc822_free_address (&(*p)->bcc); - rfc822_free_address (&(*p)->sender); - rfc822_free_address (&(*p)->reply_to); - rfc822_free_address (&(*p)->mail_followup_to); + address_delete (&(*p)->return_path); + address_delete (&(*p)->from); + address_delete (&(*p)->to); + address_delete (&(*p)->cc); + address_delete (&(*p)->bcc); + address_delete (&(*p)->sender); + address_delete (&(*p)->reply_to); + address_delete (&(*p)->mail_followup_to); p_delete(&(*p)->list_post); p_delete(&(*p)->subject); @@ -677,7 +677,7 @@ void mutt_free_alias (ALIAS ** p) t = *p; *p = (*p)->next; p_delete(&t->name); - rfc822_free_address (&t->addr); + address_delete (&t->addr); p_delete(&t); } } @@ -829,7 +829,7 @@ int mutt_check_overwrite (const char *attname, const char *path, (_("File is a directory, save under it? [(y)es, (n)o, (a)ll]"), _("yna"))) { case 3: /* all */ - str_replace (directory, fname); + m_strreplace(directory, fname); break; case 1: /* yes */ p_delete(directory); @@ -879,7 +879,7 @@ int mutt_check_overwrite (const char *attname, const char *path, return 0; } -void mutt_save_path (char *d, size_t dsize, ADDRESS * a) +void mutt_save_path (char *d, size_t dsize, address_t * a) { if (a && a->mailbox) { m_strcpy(d, dsize, a->mailbox); @@ -889,13 +889,13 @@ void mutt_save_path (char *d, size_t dsize, ADDRESS * a) if ((p = strpbrk (d, "%@"))) *p = 0; } - str_tolower (d); + m_strtolower(d); } else *d = 0; } -void mutt_safe_path (char *s, size_t l, ADDRESS * a) +void mutt_safe_path (char *s, size_t l, address_t * a) { char *p; @@ -1070,7 +1070,7 @@ void mutt_FormatString (char *dest, /* output buffer */ data, flags); if (lower) - str_tolower (buf); + m_strtolower(buf); if (nodots) { char *p = buf; @@ -1296,9 +1296,9 @@ const char *mutt_make_version (int full) static char vstring[STRING]; if (full) - snprintf (vstring, sizeof (vstring), "Mutt-ng %s-r%s (based " - "on Mutt 1.5.11/%s)", MUTT_VERSION, MUTT_REVISION, - ReleaseDate); + snprintf (vstring, sizeof (vstring), + "Mutt-ng %s-r%s (based on Mutt 1.5.11)", + MUTT_VERSION, MUTT_REVISION); else snprintf (vstring, sizeof (vstring), "mutt-ng/%s-r%s", MUTT_VERSION, MUTT_REVISION); @@ -1392,7 +1392,7 @@ int mutt_cmp_header (const HEADER * h1, const HEADER * h2) { } /* return 1 if address lists are strictly identical */ -int mutt_cmp_addr (const ADDRESS * a, const ADDRESS * b) +int mutt_cmp_addr (const address_t * a, const address_t * b) { while (a && b) { if (m_strcmp(a->mailbox, b->mailbox) ||