#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
-#include <lib-lib/debug.h>
#include "mutt.h"
#include "handler.h"
while ((line = mutt_read_line (line, &linelen, fpin, &lineno)) != NULL) {
if (regexec (PgpGoodSign.rx, line, 0, NULL, 0) == 0) {
- debug_print (2, ("\"%s\" matches regexp.\n", line));
rv = 0;
}
- else
- debug_print (2, ("\"%s\" doesn't match regexp.\n", line));
if (strncmp (line, "[GNUPG:] ", 9) == 0)
continue;
p_delete(&line);
}
else {
- debug_print (2, ("No pattern.\n"));
mutt_copy_stream (fpin, fpout);
rv = 1;
}
char buf[HUGE_STRING];
short complete, armor_header;
- FGETCONV *fc;
+ fgetconv_t *fc;
rewind (fpin);
pgp_copy_clearsigned (tmpfp, s, body_charset);
}
else if (pgpout) {
- FGETCONV *fc;
+ fgetconv_t *fc;
rewind (pgpout);
state_set_prefix (s);
/* fix the content type */
- mutt_set_parameter ("format", "fixed", &b->parameter);
+ parameter_setval(&b->parameter, "format", "fixed");
if (enc)
- mutt_set_parameter ("x-action", "pgp-encrypted", &b->parameter);
+ parameter_setval(&b->parameter, "x-action", "pgp-encrypted");
else if (sgn)
- mutt_set_parameter ("x-action", "pgp-signed", &b->parameter);
+ parameter_setval(&b->parameter, "x-action", "pgp-signed");
else if (key)
- mutt_set_parameter ("x-action", "pgp-keys", &b->parameter);
+ parameter_setval(&b->parameter, "x-action", "pgp-keys");
return 1;
}
if ((rv = mutt_wait_filter (thepid)))
badsig = -1;
-
- debug_print (1, ("mutt_wait_filter returned %d.\n", rv));
}
safe_fclose (&pgperr);
mutt_unlink (sigfile);
mutt_unlink (pgperrfile);
- debug_print (1, ("returning %d.\n", badsig));
-
return badsig;
}
t->use_disp = 0;
t->disposition = DISPINLINE;
- mutt_generate_boundary (&t->parameter);
- mutt_set_parameter ("protocol", "application/pgp-signature", &t->parameter);
- mutt_set_parameter ("micalg", pgp_micalg (sigfile), &t->parameter);
+ parameter_set_boundary(&t->parameter);
+ parameter_setval(&t->parameter, "protocol", "application/pgp-signature");
+ parameter_setval(&t->parameter, "micalg", pgp_micalg (sigfile));
t->parts = a;
a = t;
t->use_disp = 0;
t->disposition = DISPINLINE;
- mutt_generate_boundary (&t->parameter);
- mutt_set_parameter ("protocol", "application/pgp-encrypted", &t->parameter);
+ parameter_set_boundary(&t->parameter);
+ parameter_setval(&t->parameter, "protocol", "application/pgp-encrypted");
t->parts = mutt_new_body ();
t->parts->type = TYPEAPPLICATION;
else
from_charset = Charset;
- if (!mutt_is_us_ascii (body_charset)) {
+ if (!charset_is_us_ascii (body_charset)) {
int c;
- FGETCONV *fc;
+ fgetconv_t *fc;
if (flags & ENCRYPT)
send_charset = "us-ascii";
b->type = TYPETEXT;
b->subtype = m_strdup("plain");
- mutt_set_parameter ("x-action",
- flags & ENCRYPT ? "pgp-encrypted" : "pgp-signed",
- &b->parameter);
- mutt_set_parameter ("charset", send_charset, &b->parameter);
+ parameter_setval(&b->parameter, "x-action",
+ flags & ENCRYPT ? "pgp-encrypted" : "pgp-signed");
+ parameter_setval(&b->parameter, "charset", send_charset);
b->filename = m_strdup(pgpoutfile);
-#if 0
- /* The following is intended to give a clue to some completely brain-dead
- * "mail environments" which are typically used by large corporations.
- */
-
- b->d_filename = m_strdup("msg.pgp");
- b->use_disp = 1;
-
-#endif
-
b->disposition = DISPINLINE;
b->unlink = 1;