-#include <lib-lib/mem.h>
-#include <lib-lib/file.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/ascii.h>
+#include <lib-ui/curses.h>
+#include <lib-ui/enter.h>
+#include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
/* The folder the user last saved to. Used by ci_save_message() */
static char LastSaveFolder[_POSIX_PATH_MAX] = "";
/* The folder the user last saved to. Used by ci_save_message() */
static char LastSaveFolder[_POSIX_PATH_MAX] = "";
mutt_parse_mime_message (Context, cur);
mutt_message_hook (Context, cur, M_MESSAGEHOOK);
mutt_parse_mime_message (Context, cur);
mutt_message_hook (Context, cur, M_MESSAGEHOOK);
- mutt_mktemp (tempfile);
- if ((fpout = safe_fopen (tempfile, "w")) == NULL) {
+ fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ if (!fpout) {
-1, fileno (fpfilterout), -1);
if (filterpid < 0) {
mutt_error (_("Cannot create display filter"));
-1, fileno (fpfilterout), -1);
if (filterpid < 0) {
mutt_error (_("Cannot create display filter"));
if (cur->security & ENCRYPT) {
if (cur->security & APPLICATION_SMIME)
crypt_smime_getkeys (cur->env);
if (cur->security & ENCRYPT) {
if (cur->security & APPLICATION_SMIME)
crypt_smime_getkeys (cur->env);
mutt_error (_("Could not copy message"));
if (fpfilterout != NULL) {
mutt_wait_filter (filterpid);
mutt_error (_("Could not copy message"));
if (fpfilterout != NULL) {
mutt_wait_filter (filterpid);
- if (WithCrypto) {
- /* update crypto information for this message */
- cur->security &= ~(GOODSIGN|BADSIGN);
- cur->security |= crypt_query (cur->content);
+ /* update crypto information for this message */
+ cur->security &= ~(GOODSIGN|BADSIGN);
+ cur->security |= crypt_query (cur->content);
- /* Remove color cache for this message, in case there
- are color patterns for both ~g and ~V */
- cur->pair = 0;
- }
+ /* Remove color cache for this message, in case there
+ are color patterns for both ~g and ~V */
+ cur->pair = 0;
if (cur->security & GOODSIGN) {
if (!crypt_smime_verify_sender (cur))
mutt_message (_("S/MIME signature successfully verified."));
if (cur->security & GOODSIGN) {
if (!crypt_smime_verify_sender (cur))
mutt_message (_("S/MIME signature successfully verified."));
if (cur->security & GOODSIGN)
mutt_message (_("PGP signature successfully verified."));
else if (cur->security & PARTSIGN)
if (cur->security & GOODSIGN)
mutt_message (_("PGP signature successfully verified."));
else if (cur->security & PARTSIGN)
rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS);
rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS);
if (mutt_addrlist_to_idna (adr, &err) < 0) {
mutt_error (_("Bad IDN: '%s'"), err);
p_delete(&err);
if (mutt_addrlist_to_idna (adr, &err) < 0) {
mutt_error (_("Bad IDN: '%s'"), err);
p_delete(&err);
/* If no error, or background, display message. */
if ((rc == 0) || (rc == S_BKG))
mutt_message (h ? _("Message bounced.") : _("Messages bounced."));
/* If no error, or background, display message. */
if ((rc == 0) || (rc == S_BKG))
mutt_message (h ? _("Message bounced.") : _("Messages bounced."));
pipe_set_flags (decode, print, &cmflags, &chflags);
pipe_set_flags (decode, print, &cmflags, &chflags);
mutt_parse_mime_message (Context, h);
if (h->security & ENCRYPT && !crypt_valid_passphrase (h->security))
return 1;
mutt_parse_mime_message (Context, h);
if (h->security & ENCRYPT && !crypt_valid_passphrase (h->security))
return 1;
}
pipe_msg (h, fpout, decode, print);
}
pipe_msg (h, fpout, decode, print);
for (i = 0; i < Context->vcount; i++)
if (Context->hdrs[Context->v2r[i]]->tagged) {
mutt_message_hook (Context, Context->hdrs[Context->v2r[i]],
for (i = 0; i < Context->vcount; i++)
if (Context->hdrs[Context->v2r[i]]->tagged) {
mutt_message_hook (Context, Context->hdrs[Context->v2r[i]],
buf[0] = 0;
if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) {
if (!buf[0] && Shell)
buf[0] = 0;
if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) {
if (!buf[0] && Shell)
- if (WithCrypto && !decode && decrypt && (hdr->security & ENCRYPT)) {
- if ((WithCrypto & APPLICATION_PGP)
- && mutt_is_multipart_encrypted (hdr->content)) {
+ if (!decode && decrypt && (hdr->security & ENCRYPT)) {
+ if (mutt_is_multipart_encrypted (hdr->content)) {
mutt_message_hook (Context, h, M_MESSAGEHOOK);
mutt_default_save (buf, sizeof (buf), h);
}
mutt_message_hook (Context, h, M_MESSAGEHOOK);
mutt_default_save (buf, sizeof (buf), h);
}
if (h) {
mutt_message_hook (Context, h, M_MESSAGEHOOK);
mutt_default_save (buf, sizeof (buf), h);
if (h) {
mutt_message_hook (Context, h, M_MESSAGEHOOK);
mutt_default_save (buf, sizeof (buf), h);
* Leitner <leitner@prz.fu-berlin.de>
*/
if (m_strcmp(buf, ".") == 0)
* Leitner <leitner@prz.fu-berlin.de>
*/
if (m_strcmp(buf, ".") == 0)
&& !crypt_valid_passphrase (app))
return -1;
mutt_message (_("Copying to %s..."), buf);
&& !crypt_valid_passphrase (app))
return -1;
mutt_message (_("Copying to %s..."), buf);
if (Context->magic == M_IMAP && !(decode || decrypt) && mx_get_magic (buf) == M_IMAP) {
switch (imap_copy_messages (Context, h, buf, delete)) {
/* success */
if (Context->magic == M_IMAP && !(decode || decrypt) && mx_get_magic (buf) == M_IMAP) {
switch (imap_copy_messages (Context, h, buf, delete)) {
/* success */
mx_close_mailbox (&ctx, NULL);
if (need_buffy_cleanup) {
mx_close_mailbox (&ctx, NULL);
if (need_buffy_cleanup) {
/* fix up the times so buffy won't get confused */
if (st.st_mtime > st.st_atime) {
ut.actime = st.st_atime;
ut.modtime = time (NULL);
utime (buf, &ut);
/* fix up the times so buffy won't get confused */
if (st.st_mtime > st.st_atime) {
ut.actime = st.st_atime;
ut.modtime = time (NULL);
utime (buf, &ut);
- cp = mutt_get_parameter ("charset", b->parameter);
- strfcpy (charset, NONULL (cp), sizeof (charset));
+ cp = parameter_getval(b->parameter, "charset");
+ m_strcpy(charset, sizeof(charset), NONULL(cp));
snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
snprintf (buf, sizeof (buf), "%s/%s", TYPE (b), b->subtype);
- rfc822_cat (tmp, sizeof (tmp), p->value, MimeSpecials);
+ rfc822_strcpy(tmp, sizeof(tmp), p->value, MimeSpecials);
snprintf (buf + l, sizeof (buf) - l, "; %s=%s", p->attribute, tmp);
}
}
snprintf (buf + l, sizeof (buf) - l, "; %s=%s", p->attribute, tmp);
}
}
snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
type_changed = ascii_strcasecmp (tmp, obuf);
charset_changed =
snprintf (tmp, sizeof (tmp), "%s/%s", TYPE (b), NONULL (b->subtype));
type_changed = ascii_strcasecmp (tmp, obuf);
charset_changed =
int r;
snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"),
int r;
snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"),