have_any_sigs = have_any_sigs || (clearsign && (s->flags & M_VERIFY));
/* Copy PGP material to temporary file */
- tmpfp = m_tempfile(tmpfname, sizeof(tmpfname), NONULL(Tempdir), NULL);
+ tmpfp = m_tempfile(tmpfname, sizeof(tmpfname), NONULL(MCore.tmpdir), NULL);
if (tmpfp == NULL) {
mutt_perror (tmpfname);
return (-1);
/* Invoke PGP if needed */
if (!clearsign || (s->flags & M_VERIFY)) {
- pgpout = m_tempfile(outfile, sizeof(outfile), NONULL(Tempdir), NULL);
+ pgpout = m_tempfile(outfile, sizeof(outfile), NONULL(MCore.tmpdir), NULL);
if (pgpout == NULL) {
mutt_perror (outfile);
return (-1);
char tempfile[_POSIX_PATH_MAX];
char buf[HUGE_STRING];
FILE *tfp;
+ int tempfd;
short sgn = 0;
short enc = 0;
if (tagged_only && !b->tagged)
return 0;
- mutt_mktemp (tempfile);
- if (mutt_decode_save_attachment (fp, b, tempfile, 0, 0) != 0) {
+ tempfd = m_tempfd(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
+ if (mutt_decode_save_attachment (fp, b, tempfd, 0) != 0) {
unlink (tempfile);
return 0;
}
- if ((tfp = fopen (tempfile, "r")) == NULL) {
- unlink (tempfile);
+ if (!(tfp = fopen(tempfile, "r"))) {
+ unlink(tempfile);
return 0;
}
mutt_copy_bytes (s->fpin, fp, sigbdy->length);
m_fclose(&fp);
- pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(Tempdir), NULL);
+ pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(MCore.tmpdir), NULL);
if (pgperr == NULL) {
mutt_perror (pgperrfile);
unlink (sigfile);
FILE *tempfp;
char tempfname[_POSIX_PATH_MAX];
- tempfp = m_tempfile(tempfname, sizeof(tempfname), NONULL(Tempdir), NULL);
+ tempfp = m_tempfile(tempfname, sizeof(tempfname), NONULL(MCore.tmpdir), NULL);
if (tempfp == NULL) {
mutt_perror (_("Can't create temporary file"));
return;
pid_t thepid;
int rv;
- pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(Tempdir), NULL);
+ pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(MCore.tmpdir), NULL);
if (!pgperr) {
mutt_perror (pgperrfile);
return NULL;
}
unlink (pgperrfile);
- pgptmp = m_tempfile(pgptmpfile, sizeof(pgptmpfile), NONULL(Tempdir), NULL);
+ pgptmp = m_tempfile(pgptmpfile, sizeof(pgptmpfile), NONULL(MCore.tmpdir), NULL);
if (!pgptmp) {
mutt_perror (pgptmpfile);
m_fclose(&pgperr);
p_clear(&s, 1);
s.fpin = fpin;
- *fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ *fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (*fpout == NULL) {
mutt_perror (_("Can't create temporary file"));
return (-1);
*/
a = a->next;
- fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (fpout == NULL) {
if (s->flags & M_DISPLAY)
state_attach_puts (_
convert_to_7bit (a); /* Signed data _must_ be in 7-bit format. */
- fp = m_tempfile(sigfile, sizeof(sigfile), NONULL(Tempdir), NULL);
+ fp = m_tempfile(sigfile, sizeof(sigfile), NONULL(MCore.tmpdir), NULL);
if (fp == NULL) {
return (NULL);
}
- sfp = m_tempfile(signedfile, sizeof(signedfile), NONULL(Tempdir), NULL);
+ sfp = m_tempfile(signedfile, sizeof(signedfile), NONULL(MCore.tmpdir), NULL);
if (sfp == NULL) {
mutt_perror (signedfile);
m_fclose(&fp);
last = &((*last)->next);
}
- if (fqdn)
- rfc822_qualify (tmp, fqdn);
+ rfc822_qualify (tmp, fqdn);
address_list_uniq(tmp);
/* check for e-mail address */
if ((t = strchr (keyID, '@')) &&
(addr = rfc822_parse_adrlist (NULL, keyID))) {
- if (fqdn)
- rfc822_qualify (addr, fqdn);
+ rfc822_qualify (addr, fqdn);
q = addr;
}
else
int empty = 0;
pid_t thepid;
- fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (fpout == NULL) {
mutt_perror (_("Can't create temporary file"));
return (NULL);
}
- pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(Tempdir), NULL);
+ pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(MCore.tmpdir), NULL);
if (pgperr == NULL) {
mutt_perror (pgperrfile);
m_fclose(&fpout);
}
unlink (pgperrfile);
- fptmp = m_tempfile(pgpinfile, sizeof(pgpinfile), NONULL(Tempdir), NULL);
+ fptmp = m_tempfile(pgpinfile, sizeof(pgpinfile), NONULL(MCore.tmpdir), NULL);
if (fptmp == NULL) {
mutt_perror (pgpinfile);
m_fclose(&fpout);
return NULL;
}
- pgpin = m_tempfile(pgpinfile, sizeof(pgpinfile), NONULL(Tempdir), NULL);
+ pgpin = m_tempfile(pgpinfile, sizeof(pgpinfile), NONULL(MCore.tmpdir), NULL);
if (pgpin == NULL) {
mutt_perror (pgpinfile);
m_fclose(&fp);
m_fclose(&fp);
m_fclose(&pgpin);
- pgpout = m_tempfile(pgpoutfile, sizeof(pgpoutfile), NONULL(Tempdir), NULL);
- pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(Tempdir), NULL);
+ pgpout = m_tempfile(pgpoutfile, sizeof(pgpoutfile), NONULL(MCore.tmpdir), NULL);
+ pgperr = m_tempfile(pgperrfile, sizeof(pgperrfile), NONULL(MCore.tmpdir), NULL);
if (pgpout == NULL || pgperr == NULL) {
mutt_perror (pgpout ? pgperrfile : pgpoutfile);
m_fclose(&pgpin);
int pgp_send_menu (HEADER * msg, int *redraw)
{
pgp_key_t p;
- char input_signas[SHORT_STRING];
+ char input_signas[STRING];
char prompt[LONG_STRING];