#include "pager.h"
#include "rfc1524.h"
-int mutt_get_tmp_attachment(BODY *a)
+int mutt_get_tmp_attachment(struct Body *a)
{
char type[STRING];
char tempfile[_POSIX_PATH_MAX];
/* return 1 if require full screen redraw, 0 otherwise */
-int mutt_compose_attachment(BODY *a)
+int mutt_compose_attachment(struct Body *a)
{
char type[STRING];
char command[STRING];
if (r != -1 && entry->composetypecommand)
{
- BODY *b = NULL;
+ struct Body *b = NULL;
FILE *fp = NULL, *tfp = NULL;
char tempfile[_POSIX_PATH_MAX];
/*
* Currently, this only works for send mode, as it assumes that the
- * BODY->filename actually contains the information. I'm not sure
+ * Body->filename actually contains the information. I'm not sure
* we want to deal with editing attachments we've already received,
* so this should be ok.
*
* Returns 1 if editor found, 0 if not (useful to tell calling menu to
* redraw)
*/
-int mutt_edit_attachment(BODY *a)
+int mutt_edit_attachment(struct Body *a)
{
char type[STRING];
char command[STRING];
}
-void mutt_check_lookup_list(BODY *b, char *type, int len)
+void mutt_check_lookup_list(struct Body *b, char *type, int len)
{
LIST *t = MimeLookupList;
int i;
(ascii_strncasecmp(type, t->data, i) == 0)) ||
(ascii_strcasecmp(type, t->data) == 0))
{
- BODY tmp = { 0 };
+ struct Body tmp = { 0 };
int n;
if ((n = mutt_lookup_mime_type(&tmp, b->filename)) != TYPEOTHER)
{
}
/* returns -1 on error, 0 or the return code from mutt_do_pager() on success */
-int mutt_view_attachment(FILE *fp, BODY *a, int flag, HEADER *hdr, struct AttachPtr **idx, short idxlen)
+int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr, struct AttachPtr **idx, short idxlen)
{
char tempfile[_POSIX_PATH_MAX] = "";
char pagerfile[_POSIX_PATH_MAX] = "";
}
/* returns 1 on success, 0 on error */
-int mutt_pipe_attachment(FILE *fp, BODY *b, const char *path, char *outfile)
+int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile)
{
pid_t thepid;
int out = -1;
}
/* returns 0 on success, -1 on error */
-int mutt_save_attachment(FILE *fp, BODY *m, char *path, int flags, HEADER *hdr)
+int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER *hdr)
{
if (!m)
return -1;
}
/* returns 0 on success, -1 on error */
-int mutt_decode_save_attachment(FILE *fp, BODY *m, char *path, int displaying, int flags)
+int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displaying, int flags)
{
STATE s;
unsigned int saved_encoding = 0;
- BODY *saved_parts = NULL;
+ struct Body *saved_parts = NULL;
HEADER *saved_hdr = NULL;
int ret = 0;
}
/* Ok, the difference between send and receive:
- * recv: BODY->filename is a suggested name, and Context|HEADER points
+ * recv: Body->filename is a suggested name, and Context|HEADER points
* to the attachment in mailbox which is encoded
- * send: BODY->filename points to the un-encoded file which contains the
+ * send: Body->filename points to the un-encoded file which contains the
* attachment
*/
-int mutt_print_attachment(FILE *fp, BODY *a)
+int mutt_print_attachment(FILE *fp, struct Body *a)
{
char newfile[_POSIX_PATH_MAX] = "";
char type[STRING];
struct AttachPtr
{
- BODY *content;
+ struct Body *content;
int parent_type;
char *tree;
int level;
bool unowned : 1; /* don't unlink on detach */
};
-struct AttachPtr **mutt_gen_attach_list(BODY *m, int parent_type, struct AttachPtr **idx,
+struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type, struct AttachPtr **idx,
short *idxlen, short *idxmax, int level, int compose);
void mutt_update_tree(struct AttachPtr **idx, short idxlen);
-int mutt_view_attachment(FILE *fp, BODY *a, int flag, HEADER *hdr,
+int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr,
struct AttachPtr **idx, short idxlen);
int mutt_tag_attach(MUTTMENU *menu, int n, int m);
-int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY *cur,
+int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, struct Body *cur,
struct AttachPtr ***idxp, short *idxlen, short *idxmax, int recv);
-void mutt_save_attachment_list(FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTMENU *menu);
-void mutt_pipe_attachment_list(FILE *fp, int tag, BODY *top, int filter);
-void mutt_print_attachment_list(FILE *fp, int tag, BODY *top);
+void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, HEADER *hdr, MUTTMENU *menu);
+void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter);
+void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top);
-void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur);
-void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur);
+void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
+void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
void mutt_attach_forward(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
- BODY *cur, int flags);
+ struct Body *cur, int flags);
void mutt_attach_reply(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
- BODY *cur, int flags);
+ struct Body *cur, int flags);
#endif /* _MUTT_ATTACH_H */
}
else
{
- BODY *b = NULL;
+ struct Body *b = NULL;
char buf2[_POSIX_PATH_MAX];
mutt_concat_path(buf2, LastDir, state.entry[menu->current].name, sizeof(buf2));
mutt_message("NeoMutt %s%s (%s)", PACKAGE_VERSION, GitVer, MUTT_VERSION);
}
-void mutt_edit_content_type(HEADER *h, BODY *b, FILE *fp)
+void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp)
{
char buf[LONG_STRING];
char obuf[LONG_STRING];
unsigned short i;
struct AttachPtr **idx = menu->data;
CONTENT *info = NULL;
- BODY *b = NULL;
+ struct Body *b = NULL;
for (i = 0, s = 0; i < menu->max; i++)
{
CHECK_COUNT;
if (menu->tagprefix)
{
- BODY *top = NULL;
+ struct Body *top = NULL;
for (top = msg->content; top; top = top->next)
{
if (top->tagged)
CHECK_COUNT;
if (menu->tagprefix)
{
- BODY *top = NULL;
+ struct Body *top = NULL;
for (top = msg->content; top; top = top->next)
{
if (top->tagged)
#endif
static int address_header_decode(char **str);
-static int copy_delete_attach(BODY *b, FILE *fpin, FILE *fpout, char *date);
+static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *date);
/* Ok, the only reason for not merging this with mutt_copy_header()
* below is to avoid creating a HEADER structure in message_handler().
}
/* Count the number of lines and bytes to be deleted in this body */
-static int count_delete_lines(FILE *fp, BODY *b, LOFF_T *length, size_t datelen)
+static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t datelen)
{
int dellines = 0;
long l;
* MUTT_CM_CHARCONV perform character set conversion
* chflags flags to mutt_copy_header()
*/
-int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body, int flags, int chflags)
+int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body, int flags, int chflags)
{
char prefix[SHORT_STRING];
STATE s;
}
else if (WithCrypto && (flags & MUTT_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT))
{
- BODY *cur = NULL;
+ struct Body *cur = NULL;
FILE *fp = NULL;
if ((WithCrypto & APPLICATION_PGP) && (flags & MUTT_CM_DECODE_PGP) &&
* chflags mutt_copy_header() flags
*/
static int _mutt_append_message(CONTEXT *dest, FILE *fpin, CONTEXT *src,
- HEADER *hdr, BODY *body, int flags, int chflags)
+ HEADER *hdr, struct Body *body, int flags, int chflags)
{
char buf[STRING];
MESSAGE *msg = NULL;
*
* The function will return 0 on success and -1 on failure.
*/
-static int copy_delete_attach(BODY *b, FILE *fpin, FILE *fpout, char *date)
+static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *date)
{
- BODY *part = NULL;
+ struct Body *part = NULL;
for (part = b->parts; part; part = part->next)
{
int mutt_copy_header(FILE *in, HEADER *h, FILE *out, int flags, const char *prefix);
-int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body,
+int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body,
int flags, int chflags);
int mutt_copy_message(FILE *fpout, CONTEXT *src, HEADER *hdr, int flags, int chflags);
int mutt_protect(HEADER *msg, char *keylist)
{
- BODY *pbody = NULL, *tmp_pbody = NULL;
- BODY *tmp_smime_pbody = NULL;
- BODY *tmp_pgp_pbody = NULL;
+ struct Body *pbody = NULL, *tmp_pbody = NULL;
+ struct Body *tmp_smime_pbody = NULL;
+ struct Body *tmp_pgp_pbody = NULL;
int flags = (WithCrypto & APPLICATION_PGP) ? msg->security : 0;
if (!WithCrypto)
}
-int mutt_is_multipart_signed(BODY *b)
+int mutt_is_multipart_signed(struct Body *b)
{
char *p = NULL;
}
-int mutt_is_multipart_encrypted(BODY *b)
+int mutt_is_multipart_encrypted(struct Body *b)
{
if ((WithCrypto & APPLICATION_PGP))
{
}
-int mutt_is_valid_multipart_pgp_encrypted(BODY *b)
+int mutt_is_valid_multipart_pgp_encrypted(struct Body *b)
{
if (!mutt_is_multipart_encrypted(b))
return 0;
* <application/octet-stream> [BASE64-encoded]
* See ticket #3742
*/
-int mutt_is_malformed_multipart_pgp_encrypted(BODY *b)
+int mutt_is_malformed_multipart_pgp_encrypted(struct Body *b)
{
if (!(WithCrypto & APPLICATION_PGP))
return 0;
}
-int mutt_is_application_pgp(BODY *m)
+int mutt_is_application_pgp(struct Body *m)
{
int t = 0;
char *p = NULL;
return t;
}
-int mutt_is_application_smime(BODY *m)
+int mutt_is_application_smime(struct Body *m)
{
char *t = NULL;
int len, complain = 0;
}
-int crypt_query(BODY *m)
+int crypt_query(struct Body *m)
{
int t = 0;
if (m->type == TYPEMULTIPART || m->type == TYPEMESSAGE)
{
- BODY *p = NULL;
+ struct Body *p = NULL;
int u, v, w;
u = m->parts ? 0xffffffff : 0; /* Bits set in all parts */
}
-int crypt_write_signed(BODY *a, STATE *s, const char *tempfile)
+int crypt_write_signed(struct Body *a, STATE *s, const char *tempfile)
{
FILE *fp = NULL;
int c;
}
-void convert_to_7bit(BODY *a)
+void convert_to_7bit(struct Body *a)
{
if (!WithCrypto)
return;
}
-static void crypt_fetch_signatures(BODY ***signatures, BODY *a, int *n)
+static void crypt_fetch_signatures(struct Body ***signatures, struct Body *a, int *n)
{
if (!WithCrypto)
return;
else
{
if ((*n % 5) == 0)
- safe_realloc(signatures, (*n + 6) * sizeof(BODY **));
+ safe_realloc(signatures, (*n + 6) * sizeof(struct Body **));
(*signatures)[(*n)++] = a;
}
/*
* This routine verifies a "multipart/signed" body.
*/
-int mutt_signed_handler(BODY *a, STATE *s)
+int mutt_signed_handler(struct Body *a, STATE *s)
{
char tempfile[_POSIX_PATH_MAX];
int signed_type;
int inconsistent = 0;
- BODY *b = a;
- BODY **signatures = NULL;
+ struct Body *b = a;
+ struct Body **signatures = NULL;
int sigcnt = 0;
int i;
bool goodsig = true;
/* Create a new GPGME Data object from the mail body A. With CONVERT
passed as true, the lines are converted to CR,LF if required.
Return NULL on error or the gpgme_data_t object on success. */
-static gpgme_data_t body_to_data_object(BODY *a, int convert)
+static gpgme_data_t body_to_data_object(struct Body *a, int convert)
{
char tempfile[_POSIX_PATH_MAX];
FILE *fptmp = NULL;
/* Sign the MESSAGE in body A either using OpenPGP or S/MIME when
USE_SMIME is passed as true. Returns the new body or NULL on
error. */
-static BODY *sign_message(BODY *a, int use_smime)
+static struct Body *sign_message(struct Body *a, int use_smime)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
char *sigfile = NULL;
int err = 0;
char buf[100];
}
-BODY *pgp_gpgme_sign_message(BODY *a)
+struct Body *pgp_gpgme_sign_message(struct Body *a)
{
return sign_message(a, 0);
}
-BODY *smime_gpgme_sign_message(BODY *a)
+struct Body *smime_gpgme_sign_message(struct Body *a)
{
return sign_message(a, 1);
}
/* Encrypt the mail body A to all keys given as space separated keyids
or fingerprints in KEYLIST and return the encrypted body. */
-BODY *pgp_gpgme_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *pgp_gpgme_encrypt_message(struct Body *a, char *keylist, int sign)
{
char *outfile = NULL;
- BODY *t = NULL;
+ struct Body *t = NULL;
gpgme_key_t *rset = NULL;
gpgme_data_t plaintext;
/* Encrypt the mail body A to all keys given as space separated
fingerprints in KEYLIST and return the S/MIME encrypted body. */
-BODY *smime_gpgme_build_smime_entity(BODY *a, char *keylist)
+struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist)
{
char *outfile = NULL;
- BODY *t = NULL;
+ struct Body *t = NULL;
gpgme_key_t *rset = NULL;
gpgme_data_t plaintext;
/* Do the actual verification step. With IS_SMIME set to true we
assume S/MIME (surprise!) */
-static int verify_one(BODY *sigbdy, STATE *s, const char *tempfile, int is_smime)
+static int verify_one(struct Body *sigbdy, STATE *s, const char *tempfile, int is_smime)
{
int badsig = -1;
int anywarn = 0;
return badsig ? 1 : anywarn ? 2 : 0;
}
-int pgp_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int pgp_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
{
return verify_one(sigbdy, s, tempfile, 0);
}
-int smime_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int smime_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
{
return verify_one(sigbdy, s, tempfile, 1);
}
a flag in R_IS_SIGNED to indicate whether this is a combined
encrypted and signed message, for S/MIME it returns true when it is
not a encrypted but a signed message. */
-static BODY *decrypt_part(BODY *a, STATE *s, FILE *fpout, int is_smime, int *r_is_signed)
+static struct Body *decrypt_part(struct Body *a, STATE *s, FILE *fpout, int is_smime, int *r_is_signed)
{
if (!a || !s || !fpout)
return NULL;
struct stat info;
- BODY *tattach = NULL;
+ struct Body *tattach = NULL;
int err = 0;
gpgme_ctx_t ctx;
gpgme_data_t ciphertext, plaintext;
/* Decrypt a PGP/MIME message in FPIN and B and return a new body and
the stream in CUR and FPOUT. Returns 0 on success. */
-int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
char tempfile[_POSIX_PATH_MAX];
STATE s;
- BODY *first_part = b;
+ struct Body *first_part = b;
int is_signed = 0;
int need_decode = 0;
int saved_type;
/* Decrypt a S/MIME message in FPIN and B and return a new body and
the stream in CUR and FPOUT. Returns 0 on success. */
-int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
char tempfile[_POSIX_PATH_MAX];
STATE s;
encrypted part can then point into this file and there won't
ever be a need to decrypt again. This needs a partial
rewrite of the MIME engine. */
- BODY *bb = *cur;
- BODY *tmp_b = NULL;
+ struct Body *bb = *cur;
+ struct Body *tmp_b = NULL;
saved_b_type = bb->type;
saved_b_offset = bb->offset;
/*
* Implementation of `pgp_check_traditional'.
*/
-static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
+static int pgp_check_traditional_one_body(FILE *fp, struct Body *b, int tagged_only)
{
char tempfile[_POSIX_PATH_MAX];
char buf[HUGE_STRING];
return 1;
}
-int pgp_gpgme_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int pgp_gpgme_check_traditional(FILE *fp, struct Body *b, int tagged_only)
{
int rv = 0;
int r;
}
/* Support for classic_application/pgp */
-int pgp_gpgme_application_handler(BODY *m, STATE *s)
+int pgp_gpgme_application_handler(struct Body *m, STATE *s)
{
int needpass = -1, pgp_keyblock = 0;
int clearsign = 0;
* This handler is passed the application/octet-stream directly.
* The caller must propagate a->goodsig to its parent.
*/
-int pgp_gpgme_encrypted_handler(BODY *a, STATE *s)
+int pgp_gpgme_encrypted_handler(struct Body *a, STATE *s)
{
char tempfile[_POSIX_PATH_MAX];
FILE *fpout = NULL;
- BODY *tattach = NULL;
+ struct Body *tattach = NULL;
int is_signed;
int rc = 0;
}
/* Support for application/smime */
-int smime_gpgme_application_handler(BODY *a, STATE *s)
+int smime_gpgme_application_handler(struct Body *a, STATE *s)
{
char tempfile[_POSIX_PATH_MAX];
FILE *fpout = NULL;
- BODY *tattach = NULL;
+ struct Body *tattach = NULL;
int is_signed;
int rc = 0;
}
#ifdef HAVE_GPGME_OP_EXPORT_KEYS
-BODY *pgp_gpgme_make_key_attachment(char *tempf)
+struct Body *pgp_gpgme_make_key_attachment(char *tempf)
{
crypt_key_t *key = NULL;
gpgme_ctx_t context = NULL;
gpgme_key_t export_keys[2];
gpgme_data_t keydata = NULL;
gpgme_error_t err;
- BODY *att = NULL;
+ struct Body *att = NULL;
char buff[LONG_STRING];
struct stat sb;
char *pgp_gpgme_findkeys(struct Address *adrlist, int oppenc_mode);
char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode);
-BODY *pgp_gpgme_encrypt_message(BODY *a, char *keylist, int sign);
-BODY *smime_gpgme_build_smime_entity(BODY *a, char *keylist);
+struct Body *pgp_gpgme_encrypt_message(struct Body *a, char *keylist, int sign);
+struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist);
-int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
-int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
+int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
+int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
-int pgp_gpgme_check_traditional(FILE *fp, BODY *b, int tagged_only);
+int pgp_gpgme_check_traditional(FILE *fp, struct Body *b, int tagged_only);
void pgp_gpgme_invoke_import(const char *fname);
-int pgp_gpgme_application_handler(BODY *m, STATE *s);
-int smime_gpgme_application_handler(BODY *a, STATE *s);
-int pgp_gpgme_encrypted_handler(BODY *a, STATE *s);
+int pgp_gpgme_application_handler(struct Body *m, STATE *s);
+int smime_gpgme_application_handler(struct Body *a, STATE *s);
+int pgp_gpgme_encrypted_handler(struct Body *a, STATE *s);
-BODY *pgp_gpgme_make_key_attachment(char *tempf);
+struct Body *pgp_gpgme_make_key_attachment(char *tempf);
-BODY *pgp_gpgme_sign_message(BODY *a);
-BODY *smime_gpgme_sign_message(BODY *a);
+struct Body *pgp_gpgme_sign_message(struct Body *a);
+struct Body *smime_gpgme_sign_message(struct Body *a);
-int pgp_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
-int smime_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
+int pgp_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+int smime_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
int pgp_gpgme_send_menu(HEADER *msg);
int smime_gpgme_send_menu(HEADER *msg);
typedef void (*crypt_func_void_passphrase_t)(void);
typedef int (*crypt_func_valid_passphrase_t)(void);
-typedef int (*crypt_func_decrypt_mime_t)(FILE *a, FILE **b, BODY *c, BODY **d);
+typedef int (*crypt_func_decrypt_mime_t)(FILE *a, FILE **b, struct Body *c, struct Body **d);
-typedef int (*crypt_func_application_handler_t)(BODY *m, STATE *s);
-typedef int (*crypt_func_encrypted_handler_t)(BODY *m, STATE *s);
+typedef int (*crypt_func_application_handler_t)(struct Body *m, STATE *s);
+typedef int (*crypt_func_encrypted_handler_t)(struct Body *m, STATE *s);
typedef void (*crypt_func_pgp_invoke_getkeys_t)(struct Address *addr);
-typedef int (*crypt_func_pgp_check_traditional_t)(FILE *fp, BODY *b, int tagged_only);
-typedef BODY *(*crypt_func_pgp_traditional_encryptsign_t)(BODY *a, int flags, char *keylist);
-typedef BODY *(*crypt_func_pgp_make_key_attachment_t)(char *tempf);
+typedef int (*crypt_func_pgp_check_traditional_t)(FILE *fp, struct Body *b, int tagged_only);
+typedef struct Body *(*crypt_func_pgp_traditional_encryptsign_t)(struct Body *a, int flags, char *keylist);
+typedef struct Body *(*crypt_func_pgp_make_key_attachment_t)(char *tempf);
typedef char *(*crypt_func_findkeys_t)(struct Address *adrlist, int oppenc_mode);
-typedef BODY *(*crypt_func_sign_message_t)(BODY *a);
-typedef BODY *(*crypt_func_pgp_encrypt_message_t)(BODY *a, char *keylist, int sign);
+typedef struct Body *(*crypt_func_sign_message_t)(struct Body *a);
+typedef struct Body *(*crypt_func_pgp_encrypt_message_t)(struct Body *a, char *keylist, int sign);
typedef void (*crypt_func_pgp_invoke_import_t)(const char *fname);
-typedef int (*crypt_func_verify_one_t)(BODY *sigbdy, STATE *s, const char *tempf);
+typedef int (*crypt_func_verify_one_t)(struct Body *sigbdy, STATE *s, const char *tempf);
typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)(FILE *fp, int tag,
- BODY *top);
+ struct Body *top);
typedef int (*crypt_func_send_menu_t)(HEADER *msg);
typedef void (*crypt_func_smime_getkeys_t)(ENVELOPE *env);
typedef int (*crypt_func_smime_verify_sender_t)(HEADER *h);
-typedef BODY *(*crypt_func_smime_build_smime_entity_t)(BODY *a, char *certlist);
+typedef struct Body *(*crypt_func_smime_build_smime_entity_t)(struct Body *a, char *certlist);
typedef void (*crypt_func_smime_invoke_import_t)(char *infile, char *mailbox);
return pgp_valid_passphrase();
}
-static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
return pgp_decrypt_mime(a, b, c, d);
}
-static int crypt_mod_pgp_application_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
{
return pgp_application_pgp_handler(m, s);
}
return pgp_find_keys(adrlist, oppenc_mode);
}
-static BODY *crypt_mod_pgp_sign_message(BODY *a)
+static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
{
return pgp_sign_message(a);
}
-static int crypt_mod_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
return pgp_verify_one(sigbdy, s, tempf);
}
return pgp_send_menu(msg);
}
-static BODY *crypt_mod_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+static struct Body *crypt_mod_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
{
return pgp_encrypt_message(a, keylist, sign);
}
-static BODY *crypt_mod_pgp_make_key_attachment(char *tempf)
+static struct Body *crypt_mod_pgp_make_key_attachment(char *tempf)
{
return pgp_make_key_attachment(tempf);
}
-static int crypt_mod_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+static int crypt_mod_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
{
return pgp_check_traditional(fp, b, tagged_only);
}
-static BODY *crypt_mod_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+static struct Body *crypt_mod_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
{
return pgp_traditional_encryptsign(a, flags, keylist);
}
-static int crypt_mod_pgp_encrypted_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
{
return pgp_encrypted_handler(m, s);
}
pgp_invoke_import(fname);
}
-static void crypt_mod_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+static void crypt_mod_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
{
pgp_extract_keys_from_attachment_list(fp, tag, top);
}
return 1;
}
-static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
return pgp_gpgme_decrypt_mime(a, b, c, d);
}
-static int crypt_mod_pgp_application_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
{
return pgp_gpgme_application_handler(m, s);
}
-static int crypt_mod_pgp_encrypted_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
{
return pgp_gpgme_encrypted_handler(m, s);
}
-static int crypt_mod_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+static int crypt_mod_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
{
return pgp_gpgme_check_traditional(fp, b, tagged_only);
}
return pgp_gpgme_findkeys(adrlist, oppenc_mode);
}
-static BODY *crypt_mod_pgp_sign_message(BODY *a)
+static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
{
return pgp_gpgme_sign_message(a);
}
-static int crypt_mod_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
return pgp_gpgme_verify_one(sigbdy, s, tempf);
}
return pgp_gpgme_send_menu(msg);
}
-static BODY *crypt_mod_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+static struct Body *crypt_mod_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
{
return pgp_gpgme_encrypt_message(a, keylist, sign);
}
#ifdef HAVE_GPGME_OP_EXPORT_KEYS
-static BODY *crypt_mod_pgp_make_key_attachment(char *tempf)
+static struct Body *crypt_mod_pgp_make_key_attachment(char *tempf)
{
return pgp_gpgme_make_key_attachment(tempf);
}
return smime_valid_passphrase();
}
-static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
return smime_decrypt_mime(a, b, c, d);
}
-static int crypt_mod_smime_application_handler(BODY *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
{
return smime_application_smime_handler(m, s);
}
return smime_find_keys(adrlist, oppenc_mode);
}
-static BODY *crypt_mod_smime_sign_message(BODY *a)
+static struct Body *crypt_mod_smime_sign_message(struct Body *a)
{
return smime_sign_message(a);
}
-static int crypt_mod_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
return smime_verify_one(sigbdy, s, tempf);
}
return smime_verify_sender(h);
}
-static BODY *crypt_mod_smime_build_smime_entity(BODY *a, char *certlist)
+static struct Body *crypt_mod_smime_build_smime_entity(struct Body *a, char *certlist)
{
return smime_build_smime_entity(a, certlist);
}
return 1;
}
-static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
return smime_gpgme_decrypt_mime(a, b, c, d);
}
-static int crypt_mod_smime_application_handler(BODY *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
{
return smime_gpgme_application_handler(m, s);
}
return smime_gpgme_findkeys(adrlist, oppenc_mode);
}
-static BODY *crypt_mod_smime_sign_message(BODY *a)
+static struct Body *crypt_mod_smime_sign_message(struct Body *a)
{
return smime_gpgme_sign_message(a);
}
-static int crypt_mod_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
return smime_gpgme_verify_one(sigbdy, s, tempf);
}
return smime_gpgme_send_menu(msg);
}
-static BODY *crypt_mod_smime_build_smime_entity(BODY *a, char *certlist)
+static struct Body *crypt_mod_smime_build_smime_entity(struct Body *a, char *certlist)
{
return smime_gpgme_build_smime_entity(a, certlist);
}
/* Decrypt a PGP/MIME message. */
-int crypt_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+int crypt_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
if (CRYPT_MOD_CALL_CHECK(PGP, decrypt_mime))
return (CRYPT_MOD_CALL(PGP, decrypt_mime))(a, b, c, d);
}
/* MIME handler for the application/pgp content-type. */
-int crypt_pgp_application_pgp_handler(BODY *m, STATE *s)
+int crypt_pgp_application_pgp_handler(struct Body *m, STATE *s)
{
if (CRYPT_MOD_CALL_CHECK(PGP, application_handler))
return (CRYPT_MOD_CALL(PGP, application_handler))(m, s);
}
/* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(BODY *a, STATE *s)
+int crypt_pgp_encrypted_handler(struct Body *a, STATE *s)
{
if (CRYPT_MOD_CALL_CHECK(PGP, encrypted_handler))
return (CRYPT_MOD_CALL(PGP, encrypted_handler))(a, s);
}
/* Check for a traditional PGP message in body B. */
-int crypt_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int crypt_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
{
if (CRYPT_MOD_CALL_CHECK(PGP, pgp_check_traditional))
return (CRYPT_MOD_CALL(PGP, pgp_check_traditional))(fp, b, tagged_only);
}
/* fixme: needs documentation. */
-BODY *crypt_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
{
if (CRYPT_MOD_CALL_CHECK(PGP, pgp_traditional_encryptsign))
return (CRYPT_MOD_CALL(PGP, pgp_traditional_encryptsign))(a, flags, keylist);
}
/* Generate a PGP public key attachment. */
-BODY *crypt_pgp_make_key_attachment(char *tempf)
+struct Body *crypt_pgp_make_key_attachment(char *tempf)
{
if (CRYPT_MOD_CALL_CHECK(PGP, pgp_make_key_attachment))
return (CRYPT_MOD_CALL(PGP, pgp_make_key_attachment))(tempf);
}
/* Create a new body with a PGP signed message from A. */
-BODY *crypt_pgp_sign_message(BODY *a)
+struct Body *crypt_pgp_sign_message(struct Body *a)
{
if (CRYPT_MOD_CALL_CHECK(PGP, sign_message))
return (CRYPT_MOD_CALL(PGP, sign_message))(a);
/* Warning: A is no longer freed in this routine, you need to free it
later. This is necessary for $fcc_attach. */
-BODY *crypt_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *crypt_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
{
if (CRYPT_MOD_CALL_CHECK(PGP, pgp_encrypt_message))
return (CRYPT_MOD_CALL(PGP, pgp_encrypt_message))(a, keylist, sign);
}
/* fixme: needs documentation */
-int crypt_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
if (CRYPT_MOD_CALL_CHECK(PGP, verify_one))
return (CRYPT_MOD_CALL(PGP, verify_one))(sigbdy, s, tempf);
/* fixme: needs documentation */
-void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
{
if (CRYPT_MOD_CALL_CHECK(PGP, pgp_extract_keys_from_attachment_list))
(CRYPT_MOD_CALL(PGP, pgp_extract_keys_from_attachment_list))(fp, tag, top);
}
/* Decrypt am S/MIME message. */
-int crypt_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+int crypt_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, decrypt_mime))
return (CRYPT_MOD_CALL(SMIME, decrypt_mime))(a, b, c, d);
}
/* MIME handler for the application/smime content-type. */
-int crypt_smime_application_smime_handler(BODY *m, STATE *s)
+int crypt_smime_application_smime_handler(struct Body *m, STATE *s)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, application_handler))
return (CRYPT_MOD_CALL(SMIME, application_handler))(m, s);
}
/* MIME handler for an PGP/MIME encrypted message. */
-void crypt_smime_encrypted_handler(BODY *a, STATE *s)
+void crypt_smime_encrypted_handler(struct Body *a, STATE *s)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, encrypted_handler))
(CRYPT_MOD_CALL(SMIME, encrypted_handler))(a, s);
}
/* fixme: Needs documentation. */
-BODY *crypt_smime_sign_message(BODY *a)
+struct Body *crypt_smime_sign_message(struct Body *a)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, sign_message))
return (CRYPT_MOD_CALL(SMIME, sign_message))(a);
}
/* fixme: needs documentation. */
-BODY *crypt_smime_build_smime_entity(BODY *a, char *certlist)
+struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, smime_build_smime_entity))
return (CRYPT_MOD_CALL(SMIME, smime_build_smime_entity))(a, certlist);
}
/* fixme: needs documentation */
-int crypt_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
{
if (CRYPT_MOD_CALL_CHECK(SMIME, verify_one))
return (CRYPT_MOD_CALL(SMIME, verify_one))(sigbdy, s, tempf);
#define BUFO_SIZE 2000
-typedef int (*handler_t)(BODY *, STATE *);
+typedef int (*handler_t)(struct Body *, STATE *);
// clang-format off
const int Index_hex[128] = {
};
// clang-format on
-static void print_part_line(STATE *s, BODY *b, int n)
+static void print_part_line(STATE *s, struct Body *b, int n)
{
char length[5];
mutt_pretty_size(length, sizeof(length), b->length);
}
}
-static int text_enriched_handler(BODY *a, STATE *s)
+static int text_enriched_handler(struct Body *a, STATE *s)
{
enum
{
*
* 0 otherwise
*/
-static int is_autoview(BODY *b)
+static int is_autoview(struct Body *b)
{
char type[SHORT_STRING];
int is_av = 0;
#define TXTPLAIN 2
#define TXTENRICHED 3
-static int alternative_handler(BODY *a, STATE *s)
+static int alternative_handler(struct Body *a, STATE *s)
{
- BODY *choice = NULL;
- BODY *b = NULL;
+ struct Body *choice = NULL;
+ struct Body *b = NULL;
LIST *t = NULL;
int type = 0;
int mustfree = 0;
}
/* handles message/rfc822 body parts */
-static int message_handler(BODY *a, STATE *s)
+static int message_handler(struct Body *a, STATE *s)
{
struct stat st;
- BODY *b = NULL;
+ struct Body *b = NULL;
LOFF_T off_start;
int rc = 0;
}
/* returns 1 if decoding the attachment will produce output */
-int mutt_can_decode(BODY *a)
+int mutt_can_decode(struct Body *a)
{
if (is_autoview(a))
return 1;
return 1;
else if (a->type == TYPEMULTIPART)
{
- BODY *p = NULL;
+ struct Body *p = NULL;
if (WithCrypto)
{
return 0;
}
-static int multipart_handler(BODY *a, STATE *s)
+static int multipart_handler(struct Body *a, STATE *s)
{
- BODY *b = NULL, *p = NULL;
+ struct Body *b = NULL, *p = NULL;
struct stat st;
int count;
int rc = 0;
return rc;
}
-static int autoview_handler(BODY *a, STATE *s)
+static int autoview_handler(struct Body *a, STATE *s)
{
rfc1524_entry *entry = rfc1524_new_entry();
char buffer[LONG_STRING];
return rc;
}
-static int external_body_handler(BODY *b, STATE *s)
+static int external_body_handler(struct Body *b, STATE *s)
{
const char *access_type = NULL;
const char *expiration = NULL;
return 0;
}
-void mutt_decode_attachment(BODY *b, STATE *s)
+void mutt_decode_attachment(struct Body *b, STATE *s)
{
int istext = mutt_is_text_part(b);
iconv_t cd = (iconv_t)(-1);
* strip all trailing spaces to improve interoperability;
* if $text_flowed is unset, simply verbatim copy input
*/
-static int text_plain_handler(BODY *b, STATE *s)
+static int text_plain_handler(struct Body *b, STATE *s)
{
char *buf = NULL;
size_t l = 0, sz = 0;
return 0;
}
-static int run_decode_and_handler(BODY *b, STATE *s, handler_t handler, int plaintext)
+static int run_decode_and_handler(struct Body *b, STATE *s, handler_t handler, int plaintext)
{
int origType;
char *savePrefix = NULL;
return rc;
}
-static int valid_pgp_encrypted_handler(BODY *b, STATE *s)
+static int valid_pgp_encrypted_handler(struct Body *b, STATE *s)
{
int rc;
- BODY *octetstream = NULL;
+ struct Body *octetstream = NULL;
octetstream = b->parts->next;
rc = crypt_pgp_encrypted_handler(octetstream, s);
return rc;
}
-static int malformed_pgp_encrypted_handler(BODY *b, STATE *s)
+static int malformed_pgp_encrypted_handler(struct Body *b, STATE *s)
{
int rc;
- BODY *octetstream = NULL;
+ struct Body *octetstream = NULL;
octetstream = b->parts->next->next;
/* exchange encodes the octet-stream, so re-run it through the decoder */
return rc;
}
-int mutt_body_handler(BODY *b, STATE *s)
+int mutt_body_handler(struct Body *b, STATE *s)
{
if (!b || !s)
return -1;
*p = NULL;
}
-static unsigned char *dump_body(BODY *c, unsigned char *d, int *off, int convert)
+static unsigned char *dump_body(struct Body *c, unsigned char *d, int *off, int convert)
{
- BODY nb;
+ struct Body nb;
- memcpy(&nb, c, sizeof(BODY));
+ memcpy(&nb, c, sizeof(struct Body));
/* some fields are not safe to cache */
nb.content = NULL;
nb.hdr = NULL;
nb.aptr = NULL;
- lazy_realloc(&d, *off + sizeof(BODY));
- memcpy(d + *off, &nb, sizeof(BODY));
- *off += sizeof(BODY);
+ lazy_realloc(&d, *off + sizeof(struct Body));
+ memcpy(d + *off, &nb, sizeof(struct Body));
+ *off += sizeof(struct Body);
d = dump_char(nb.xtype, d, off, 0);
d = dump_char(nb.subtype, d, off, 0);
return d;
}
-static void restore_body(BODY *c, const unsigned char *d, int *off, int convert)
+static void restore_body(struct Body *c, const unsigned char *d, int *off, int convert)
{
- memcpy(c, d + *off, sizeof(BODY));
- *off += sizeof(BODY);
+ memcpy(c, d + *off, sizeof(struct Body));
+ *off += sizeof(struct Body);
restore_char(&c->xtype, d, off, 0);
restore_char(&c->subtype, d, off, 0);
}
else if (ascii_strncasecmp("attach:", cur->data, 7) == 0)
{
- BODY *body2 = NULL;
- BODY *parts = NULL;
+ struct Body *body2 = NULL;
+ struct Body *parts = NULL;
size_t l = 0;
p = skip_email_wsp(cur->data + 7);
else
sendflags |= SENDNOFREEHEADER;
- /* Parse the draftFile into the full HEADER/BODY structure.
+ /* Parse the draftFile into the full HEADER/Body structure.
* Set SENDDRAFTFILE so ci_send_message doesn't overwrite
* our msg->content.
*/
if (attach)
{
LIST *t = attach;
- BODY *a = msg->content;
+ struct Body *a = msg->content;
while (a && a->next)
a = a->next;
return 1;
}
-static int strict_cmp_bodies(const BODY *b1, const BODY *b2)
+static int strict_cmp_bodies(const struct Body *b1, const struct Body *b2)
{
if (b1->type != b2->type || b1->encoding != b2->encoding ||
(mutt_strcmp(b1->subtype, b2->subtype) != 0) ||
bool cr : 1; /* has CR, even when in a CRLF pair */
} CONTENT;
-typedef struct body
+struct Body
{
char *xtype; /* content-type if x-unknown */
char *subtype; /* content-type subtype */
* to determine what content-transfer-encoding
* is required when sending mail.
*/
- struct body *next; /* next attachment in the list */
- struct body *parts; /* parts of a multipart or message/rfc822 */
+ struct Body *next; /* next attachment in the list */
+ struct Body *parts; /* parts of a multipart or message/rfc822 */
struct header *hdr; /* header information for message/rfc822 */
struct AttachPtr *aptr; /* Menu information, used in recvattach.c */
bool collapsed : 1; /* used by recvattach */
bool attach_qualifies : 1;
-} BODY;
+};
/* #3279: AIX defines conflicting struct thread */
typedef struct mutt_thread THREAD;
int virtual; /* virtual message number */
int score;
ENVELOPE *env; /* envelope information */
- BODY *content; /* list of MIME parts */
+ struct Body *content; /* list of MIME parts */
char *path;
char *tree; /* character string to print thread tree */
int mutt_protect(HEADER *msg, char *keylist);
-int mutt_is_multipart_encrypted(BODY *b);
+int mutt_is_multipart_encrypted(struct Body *b);
-int mutt_is_valid_multipart_pgp_encrypted(BODY *b);
+int mutt_is_valid_multipart_pgp_encrypted(struct Body *b);
-int mutt_is_malformed_multipart_pgp_encrypted(BODY *b);
+int mutt_is_malformed_multipart_pgp_encrypted(struct Body *b);
-int mutt_is_multipart_signed(BODY *b);
+int mutt_is_multipart_signed(struct Body *b);
-int mutt_is_application_pgp(BODY *m);
+int mutt_is_application_pgp(struct Body *m);
-int mutt_is_application_smime(BODY *m);
+int mutt_is_application_smime(struct Body *m);
-int mutt_signed_handler(BODY *a, STATE *s);
+int mutt_signed_handler(struct Body *a, STATE *s);
int mutt_parse_crypt_hdr(const char *p, int set_empty_signas, int crypt_app);
-void convert_to_7bit(BODY *a);
+void convert_to_7bit(struct Body *a);
/* -- crypt.c -- */
/* Check out the type of encryption used and set the cached status
values if there are any. */
-int crypt_query(BODY *m);
+int crypt_query(struct Body *m);
/* Fixme: To be documented. */
void crypt_extract_keys_from_messages(HEADER *h);
/* Write the message body/part A described by state S to the given
TEMPFILE. */
-int crypt_write_signed(BODY *a, STATE *s, const char *tempfile);
+int crypt_write_signed(struct Body *a, STATE *s, const char *tempfile);
/* Obtain pointers to fingerprint or short or long key ID, if any.
/* Decrypt a PGP/MIME message. */
-int crypt_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d);
+int crypt_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d);
/* MIME handler for the application/pgp content-type. */
-int crypt_pgp_application_pgp_handler(BODY *m, STATE *s);
+int crypt_pgp_application_pgp_handler(struct Body *m, STATE *s);
/* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(BODY *a, STATE *s);
+int crypt_pgp_encrypted_handler(struct Body *a, STATE *s);
/* fixme: needs documentation. */
void crypt_pgp_invoke_getkeys(struct Address *addr);
/* Check for a traditional PGP message in body B. */
-int crypt_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only);
+int crypt_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only);
/* fixme: needs documentation. */
-BODY *crypt_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist);
+struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist);
/* Generate a PGP public key attachment. */
-BODY *crypt_pgp_make_key_attachment(char *tempf);
+struct Body *crypt_pgp_make_key_attachment(char *tempf);
/* This routine attempts to find the keyids of the recipients of a
message. It returns NULL if any of the keys can not be found.
char *crypt_pgp_findkeys(struct Address *adrlist, int oppenc_mode);
/* Create a new body with a PGP signed message from A. */
-BODY *crypt_pgp_sign_message(BODY *a);
+struct Body *crypt_pgp_sign_message(struct Body *a);
/* Warning: A is no longer freed in this routine, you need to free it
later. This is necessary for $fcc_attach. */
-BODY *crypt_pgp_encrypt_message(BODY *a, char *keylist, int sign);
+struct Body *crypt_pgp_encrypt_message(struct Body *a, char *keylist, int sign);
/* Invoke the PGP command to import a key. */
void crypt_pgp_invoke_import(const char *fname);
int crypt_pgp_send_menu(HEADER *msg);
/* fixme: needs documentation */
-int crypt_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf);
+int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
/* fixme: needs documentation */
-void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top);
+void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top);
void crypt_pgp_set_sender(const char *sender);
int crypt_smime_valid_passphrase(void);
/* Decrypt an S/MIME message. */
-int crypt_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d);
+int crypt_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d);
/* MIME handler for the application/smime content-type. */
-int crypt_smime_application_smime_handler(BODY *m, STATE *s);
+int crypt_smime_application_smime_handler(struct Body *m, STATE *s);
/* fixme: Needs documentation. */
void crypt_smime_getkeys(ENVELOPE *env);
char *crypt_smime_findkeys(struct Address *adrlist, int oppenc_mode);
/* fixme: Needs documentation. */
-BODY *crypt_smime_sign_message(BODY *a);
+struct Body *crypt_smime_sign_message(struct Body *a);
/* fixme: needs documentation. */
-BODY *crypt_smime_build_smime_entity(BODY *a, char *certlist);
+struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist);
/* Add a certificate and update index file (externally). */
void crypt_smime_invoke_import(char *infile, char *mailbox);
void crypt_smime_set_sender(const char *sender);
/* fixme: needs documentation */
-int crypt_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf);
+int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
void crypt_init(void);
[kXDGConfigHome] = "~/.config", [kXDGConfigDirs] = "/etc/xdg",
};
-BODY *mutt_new_body(void)
+struct Body *mutt_new_body(void)
{
- BODY *p = safe_calloc(1, sizeof(BODY));
+ struct Body *p = safe_calloc(1, sizeof(struct Body));
p->disposition = DISPATTACH;
p->use_disp = true;
}
/* create a send-mode duplicate from a receive-mode body */
-int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src)
+int mutt_copy_body(FILE *fp, struct Body **tgt, struct Body *src)
{
if (!tgt || !src)
return -1;
char tmp[_POSIX_PATH_MAX];
- BODY *b = NULL;
+ struct Body *b = NULL;
PARAMETER *par = NULL, **ppar = NULL;
*tgt = mutt_new_body();
b = *tgt;
- memcpy(b, src, sizeof(BODY));
+ memcpy(b, src, sizeof(struct Body));
b->parts = NULL;
b->next = NULL;
}
-void mutt_free_body(BODY **p)
+void mutt_free_body(struct Body **p)
{
- BODY *a = *p, *b = NULL;
+ struct Body *a = *p, *b = NULL;
while (a)
{
}
/* returns 1 if Mutt can't display this type of data, 0 otherwise */
-bool mutt_needs_mailcap(BODY *m)
+bool mutt_needs_mailcap(struct Body *m)
{
switch (m->type)
{
return true;
}
-bool mutt_is_text_part(BODY *b)
+bool mutt_is_text_part(struct Body *b)
{
int t = b->type;
char *s = b->subtype;
{
CONTEXT *ctx; /* current mailbox */
HEADER *hdr; /* current message */
- BODY *bdy; /* current attachment */
+ struct Body *bdy; /* current attachment */
FILE *fp; /* source stream */
struct AttachPtr **idx; /* attachment information */
short idxlen;
return TYPEOTHER;
}
-void mutt_parse_content_type(char *s, BODY *ct)
+void mutt_parse_content_type(char *s, struct Body *ct)
{
char *pc = NULL;
char *subtype = NULL;
if (ct->subtype == NULL)
{
/* Some older non-MIME mailers (i.e., mailtool, elm) have a content-type
- * field, so we can attempt to convert the type to BODY here.
+ * field, so we can attempt to convert the type to Body here.
*/
if (ct->type == TYPETEXT)
ct->subtype = safe_strdup("plain");
}
}
-static void parse_content_disposition(const char *s, BODY *ct)
+static void parse_content_disposition(const char *s, struct Body *ct)
{
PARAMETER *parms = NULL;
* digest 1 if reading subparts of a multipart/digest, 0
* otherwise
*/
-BODY *mutt_read_mime_header(FILE *fp, int digest)
+struct Body *mutt_read_mime_header(FILE *fp, int digest)
{
- BODY *p = mutt_new_body();
+ struct Body *p = mutt_new_body();
char *c = NULL;
char *line = safe_malloc(LONG_STRING);
size_t linelen = LONG_STRING;
return p;
}
-void mutt_parse_part(FILE *fp, BODY *b)
+void mutt_parse_part(FILE *fp, struct Body *b)
{
char *bound = NULL;
*
* NOTE: this assumes that `parent->length' has been set!
*/
-BODY *mutt_parse_message_rfc822(FILE *fp, BODY *parent)
+struct Body *mutt_parse_message_rfc822(FILE *fp, struct Body *parent)
{
- BODY *msg = NULL;
+ struct Body *msg = NULL;
parent->hdr = mutt_new_header();
parent->hdr->offset = ftello(fp);
*
* digest 1 if reading a multipart/digest, 0 otherwise
*/
-BODY *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest)
+struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest)
{
#ifdef SUN_ATTACHMENT
int lines;
#endif
int blen, len, crlf = 0;
char buffer[LONG_STRING];
- BODY *head = NULL, *last = NULL, *new = NULL;
+ struct Body *head = NULL, *last = NULL, *new = NULL;
int i;
int final = 0; /* did we see the ending boundary? */
}
/* Compares mime types to the ok and except lists */
-static bool count_body_parts_check(LIST **checklist, BODY *b, bool dflt)
+static bool count_body_parts_check(LIST **checklist, struct Body *b, bool dflt)
{
LIST *type = NULL;
ATTACH_MATCH *a = NULL;
shallcount = false; \
}
-static int count_body_parts(BODY *body, int flags)
+static int count_body_parts(struct Body *body, int flags)
{
int count = 0;
bool shallcount, shallrecurse;
- BODY *bp = NULL;
+ struct Body *bp = NULL;
if (body == NULL)
return 0;
if (top_of_thread(Context->hdrs[i]) == me)
{
- BODY *body = Context->hdrs[i]->content;
+ struct Body *body = Context->hdrs[i]->content;
Context->hdrs[i]->virtual = Context->vcount;
Context->hdrs[i]->limited = true;
/* Support for the Application/PGP Content Type. */
-int pgp_application_pgp_handler(BODY *m, STATE *s)
+int pgp_application_pgp_handler(struct Body *m, STATE *s)
{
int could_not_decrypt = 0;
int needpass = -1, pgp_keyblock = 0;
return rc;
}
-static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
+static int pgp_check_traditional_one_body(FILE *fp, struct Body *b, int tagged_only)
{
char tempfile[_POSIX_PATH_MAX];
char buf[HUGE_STRING];
return 1;
}
-int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
{
int rv = 0;
int r;
}
-int pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
{
char sigfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
FILE *fp = NULL, *pgpout = NULL, *pgperr = NULL;
/* Extract pgp public keys from messages or attachments */
-static void pgp_extract_keys_from_attachment(FILE *fp, BODY *top)
+static void pgp_extract_keys_from_attachment(FILE *fp, struct Body *top)
{
STATE s;
FILE *tempfp = NULL;
mutt_unlink(tempfname);
}
-void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
{
if (!fp)
{
unset_option(OPTDONTHANDLEPGPKEYS);
}
-static BODY *pgp_decrypt_part(BODY *a, STATE *s, FILE *fpout, BODY *p)
+static struct Body *pgp_decrypt_part(struct Body *a, STATE *s, FILE *fpout, struct Body *p)
{
if (!a || !s || !fpout || !p)
return NULL;
char buf[LONG_STRING];
FILE *pgpin = NULL, *pgpout = NULL, *pgperr = NULL, *pgptmp = NULL;
struct stat info;
- BODY *tattach = NULL;
+ struct Body *tattach = NULL;
int len;
char pgperrfile[_POSIX_PATH_MAX];
char pgptmpfile[_POSIX_PATH_MAX];
return tattach;
}
-int pgp_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
char tempfile[_POSIX_PATH_MAX];
STATE s;
- BODY *p = b;
+ struct Body *p = b;
int need_decode = 0;
int saved_type;
LOFF_T saved_offset;
* This handler is passed the application/octet-stream directly.
* The caller must propagate a->goodsig to its parent.
*/
-int pgp_encrypted_handler(BODY *a, STATE *s)
+int pgp_encrypted_handler(struct Body *a, STATE *s)
{
char tempfile[_POSIX_PATH_MAX];
FILE *fpout = NULL, *fpin = NULL;
- BODY *tattach = NULL;
+ struct Body *tattach = NULL;
int rc = 0;
mutt_mktemp(tempfile, sizeof(tempfile));
*/
-BODY *pgp_sign_message(BODY *a)
+struct Body *pgp_sign_message(struct Body *a)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
char buffer[LONG_STRING];
char sigfile[_POSIX_PATH_MAX], signedfile[_POSIX_PATH_MAX];
FILE *pgpin = NULL, *pgpout = NULL, *pgperr = NULL, *fp = NULL, *sfp = NULL;
/* Warning: "a" is no longer freed in this routine, you need
* to free it later. This is necessary for $fcc_attach. */
-BODY *pgp_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign)
{
char buf[LONG_STRING];
char tempfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
char pgpinfile[_POSIX_PATH_MAX];
FILE *pgpin = NULL, *pgperr = NULL, *fpout = NULL, *fptmp = NULL;
- BODY *t = NULL;
+ struct Body *t = NULL;
int err = 0;
int empty = 0;
pid_t thepid;
return t;
}
-BODY *pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
{
- BODY *b = NULL;
+ struct Body *b = NULL;
char pgpoutfile[_POSIX_PATH_MAX];
char pgperrfile[_POSIX_PATH_MAX];
bool pgp_use_gpg_agent(void);
-int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only);
-BODY *pgp_make_key_attachment(char *tempf);
+int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only);
+struct Body *pgp_make_key_attachment(char *tempf);
const char *pgp_micalg(const char *fname);
char *_pgp_keyid(pgp_key_t);
char *pgp_long_keyid(pgp_key_t k);
char *pgp_fpr_or_lkeyid(pgp_key_t k);
-int pgp_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
+int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
pgp_key_t pgp_ask_for_key(char *tag, char *whatfor, short abilities, pgp_ring_t keyring);
pgp_key_t pgp_get_candidates(pgp_ring_t keyring, LIST *hints);
char *pgp_find_keys(struct Address *adrlist, int oppenc_mode);
-int pgp_application_pgp_handler(BODY *m, STATE *s);
-int pgp_encrypted_handler(BODY *a, STATE *s);
-void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top);
+int pgp_application_pgp_handler(struct Body *m, STATE *s);
+int pgp_encrypted_handler(struct Body *a, STATE *s);
+void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top);
void pgp_void_passphrase(void);
int pgp_valid_passphrase(void);
/* private ? */
-int pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
-BODY *pgp_traditional_encryptsign(BODY *a, int flags, char *keylist);
-BODY *pgp_encrypt_message(BODY *a, char *keylist, int sign);
-BODY *pgp_sign_message(BODY *a);
+int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist);
+struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign);
+struct Body *pgp_sign_message(struct Body *a);
int pgp_send_menu(HEADER *msg);
}
/* generate a public key attachment */
-BODY *pgp_make_key_attachment(char *tempf)
+struct Body *pgp_make_key_attachment(char *tempf)
{
- BODY *att = NULL;
+ struct Body *att = NULL;
char buff[LONG_STRING];
char tempfb[_POSIX_PATH_MAX], tmp[STRING];
FILE *tempfp = NULL;
{
MESSAGE *msg = NULL;
char file[_POSIX_PATH_MAX];
- BODY *b = NULL;
+ struct Body *b = NULL;
FILE *bfp = NULL;
int rv = -1;
STATE s;
unsigned long data, /* callback data */
format_flag flags); /* callback flags */
-void mutt_parse_content_type(char *s, BODY *ct);
+void mutt_parse_content_type(char *s, struct Body *ct);
void mutt_generate_boundary(PARAMETER **parm);
void mutt_delete_parameter(const char *attribute, PARAMETER **p);
void mutt_set_parameter(const char *attribute, const char *value, PARAMETER **p);
struct Address *mutt_expand_aliases(struct Address *a);
struct Address *mutt_parse_adrlist(struct Address *p, const char *s);
-BODY *mutt_make_file_attach(const char *path);
-BODY *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg);
-BODY *mutt_remove_multipart(BODY *b);
-BODY *mutt_make_multipart(BODY *b);
-BODY *mutt_new_body(void);
-BODY *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest);
-BODY *mutt_parse_message_rfc822(FILE *fp, BODY *parent);
-BODY *mutt_read_mime_header(FILE *fp, int digest);
+struct Body *mutt_make_file_attach(const char *path);
+struct Body *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg);
+struct Body *mutt_remove_multipart(struct Body *b);
+struct Body *mutt_make_multipart(struct Body *b);
+struct Body *mutt_new_body(void);
+struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest);
+struct Body *mutt_parse_message_rfc822(FILE *fp, struct Body *parent);
+struct Body *mutt_read_mime_header(FILE *fp, int digest);
-CONTENT *mutt_get_content_info(const char *fname, BODY *b);
+CONTENT *mutt_get_content_info(const char *fname, struct Body *b);
HASH *mutt_make_id_hash(CONTEXT *ctx);
char *_mutt_expand_path(char *s, size_t slen, int rx);
char *mutt_find_hook(int type, const char *pat);
char *mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw);
-char *mutt_get_body_charset(char *d, size_t dlen, BODY *b);
+char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b);
const char *mutt_get_name(struct Address *a);
char *mutt_get_parameter(const char *s, PARAMETER *p);
LIST *mutt_crypt_hook(struct Address *adr);
void mutt_adv_mktemp(char *s, size_t l);
void mutt_alias_menu(char *buf, size_t buflen, struct Alias *aliases);
void mutt_allow_interrupt(int disposition);
-void mutt_attach_init(BODY *b);
+void mutt_attach_init(struct Body *b);
void mutt_block_signals(void);
void mutt_block_signals_system(void);
-int mutt_body_handler(BODY *b, STATE *s);
+int mutt_body_handler(struct Body *b, STATE *s);
int mutt_bounce_message(FILE *fp, HEADER *h, struct Address *to);
void mutt_break_thread(HEADER *hdr);
void mutt_buffy(char *s, size_t slen);
void mutt_clear_error(void);
void mutt_clear_pager_position(void);
void mutt_create_alias(ENVELOPE *cur, struct Address *iadr);
-void mutt_decode_attachment(BODY *b, STATE *s);
+void mutt_decode_attachment(struct Body *b, STATE *s);
void mutt_decode_base64(STATE *s, long len, int istext, iconv_t cd);
void mutt_default_save(char *path, size_t pathlen, HEADER *hdr);
void mutt_display_address(ENVELOPE *env);
void mutt_draw_statusline(int cols, const char *buf, int buflen);
-void mutt_edit_content_type(HEADER *h, BODY *b, FILE *fp);
+void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp);
void mutt_edit_file(const char *editor, const char *data);
void mutt_edit_headers(const char *editor, const char *body, HEADER *msg,
char *fcc, size_t fcclen);
int mutt_label_complete(char *buffer, size_t len, int numtabs);
void mutt_curses_error(const char *fmt, ...);
void mutt_curses_message(const char *fmt, ...);
-void mutt_encode_descriptions(BODY *b, short recurse);
+void mutt_encode_descriptions(struct Body *b, short recurse);
void mutt_encode_path(char *dest, size_t dlen, const char *src);
void mutt_enter_command(void);
void mutt_expand_aliases_env(ENVELOPE *env);
void mutt_forward_intro(FILE *fp, HEADER *cur);
void mutt_forward_trailer(FILE *fp);
void mutt_free_alias(struct Alias **p);
-void mutt_free_body(BODY **p);
+void mutt_free_body(struct Body **p);
void mutt_free_color(int fg, int bg);
void mutt_free_enter_state(ENTER_STATE **esp);
void mutt_free_envelope(ENVELOPE **p);
void mutt_free_regexp(REGEXP **pp);
void mutt_help(int menu);
void mutt_draw_tree(CONTEXT *ctx);
-void mutt_check_lookup_list(BODY *b, char *type, int len);
+void mutt_check_lookup_list(struct Body *b, char *type, int len);
void mutt_make_attribution(CONTEXT *ctx, HEADER *cur, FILE *out);
void mutt_make_forward_subject(ENVELOPE *env, CONTEXT *ctx, HEADER *cur);
void mutt_make_help(char *d, size_t dlen, const char *txt, int menu, int op);
void mutt_make_misc_reply_headers(ENVELOPE *env, CONTEXT *ctx, HEADER *cur, ENVELOPE *curenv);
void mutt_make_post_indent(CONTEXT *ctx, HEADER *cur, FILE *out);
void mutt_merge_envelopes(ENVELOPE *base, ENVELOPE **extra);
-void mutt_message_to_7bit(BODY *a, FILE *fp);
+void mutt_message_to_7bit(struct Body *a, FILE *fp);
#define mutt_mktemp(a, b) mutt_mktemp_pfx_sfx(a, b, "mutt", NULL)
#define mutt_mktemp_pfx_sfx(a, b, c, d) _mutt_mktemp(a, b, c, d, __FILE__, __LINE__)
void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
void mutt_normalize_time(struct tm *tm);
void mutt_paddstr(int n, const char *s);
void mutt_parse_mime_message(CONTEXT *ctx, HEADER *cur);
-void mutt_parse_part(FILE *fp, BODY *b);
+void mutt_parse_part(FILE *fp, struct Body *b);
void mutt_perror(const char *s);
void mutt_prepare_envelope(ENVELOPE *env, int final);
void mutt_unprepare_envelope(ENVELOPE *env);
void mutt_shell_escape(void);
void mutt_show_error(void);
void mutt_signal_init(void);
-void mutt_stamp_attachment(BODY *a);
+void mutt_stamp_attachment(struct Body *a);
void mutt_tag_set_flag(int flag, int bf);
bool mutt_ts_capability(void);
void mutt_unblock_signals(void);
void mutt_unblock_signals_system(int catch);
-void mutt_update_encoding(BODY *a);
+void mutt_update_encoding(struct Body *a);
void mutt_version(void);
void mutt_view_attachments(HEADER *hdr);
void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, int display);
int mutt_buffy_check(int force);
int mutt_buffy_notify(void);
int mutt_builtin_editor(const char *path, HEADER *msg, HEADER *cur);
-int mutt_can_decode(BODY *a);
+int mutt_can_decode(struct Body *a);
int mutt_change_flag(HEADER *h, int bf);
int mutt_check_encoding(const char *c);
bool mutt_nm_tag_complete(char *buffer, size_t len, int pos, int numtabs);
#endif
int mutt_complete(char *s, size_t slen);
-int mutt_compose_attachment(BODY *a);
-int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src);
-int mutt_decode_save_attachment(FILE *fp, BODY *m, char *path, int displaying, int flags);
+int mutt_compose_attachment(struct Body *a);
+int mutt_copy_body(FILE *fp, struct Body **tgt, struct Body *src);
+int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displaying, int flags);
int mutt_display_message(HEADER *cur);
int mutt_dump_variables(int hide_sensitive);
-int mutt_edit_attachment(BODY *a);
+int mutt_edit_attachment(struct Body *a);
int mutt_edit_message(CONTEXT *ctx, HEADER *hdr);
int mutt_fetch_recips(ENVELOPE *out, ENVELOPE *in, int flags);
int mutt_chscmp(const char *s, const char *chs);
#define mutt_get_password(A, B, C) mutt_get_field_unbuffered(A, B, C, MUTT_PASS)
int mutt_get_postponed(CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size_t fcclen);
-int mutt_get_tmp_attachment(BODY *a);
+int mutt_get_tmp_attachment(struct Body *a);
int mutt_index_menu(void);
int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Address *cc, struct Address *bcc,
const char *msg, int eightbit);
int mutt_is_list_cc(int alladdr, struct Address *a1, struct Address *a2);
int mutt_is_list_recipient(int alladdr, struct Address *a1, struct Address *a2);
bool mutt_is_subscribed_list(struct Address *addr);
-bool mutt_is_text_part(BODY *b);
+bool mutt_is_text_part(struct Body *b);
int mutt_link_threads(HEADER *cur, HEADER *last, CONTEXT *ctx);
-int mutt_lookup_mime_type(BODY *att, const char *path);
+int mutt_lookup_mime_type(struct Body *att, const char *path);
bool mutt_match_rx_list(const char *s, RX_LIST *l);
bool mutt_match_spam_list(const char *s, REPLACE_LIST *l, char *text, int textsize);
int mutt_messages_in_thread(CONTEXT *ctx, HEADER *hdr, int flag);
int mutt_multi_choice(char *prompt, char *letters);
-bool mutt_needs_mailcap(BODY *m);
+bool mutt_needs_mailcap(struct Body *m);
int mutt_num_postponed(int force);
int mutt_parse_bind(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
int mutt_parse_exec(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
int mutt_parse_unscore(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
int mutt_parse_unhook(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
int mutt_pattern_func(int op, char *prompt);
-int mutt_pipe_attachment(FILE *fp, BODY *b, const char *path, char *outfile);
-int mutt_print_attachment(FILE *fp, BODY *a);
+int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile);
+int mutt_print_attachment(FILE *fp, struct Body *a);
int mutt_query_complete(char *buf, size_t buflen);
int mutt_query_variables(LIST *queries);
-int mutt_save_attachment(FILE *fp, BODY *m, char *path, int flags, HEADER *hdr);
+int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER *hdr);
int _mutt_save_message(HEADER *h, CONTEXT *ctx, int delete, int decode, int decrypt);
int mutt_save_message(HEADER *h, int delete, int decode, int decrypt);
int mutt_search_command(int cur, int op);
char *fcc, char **finalpath);
int mutt_write_multiple_fcc(const char *path, HEADER *hdr, const char *msgid,
int post, char *fcc, char **finalpath);
-int mutt_write_mime_body(BODY *a, FILE *f);
-int mutt_write_mime_header(BODY *a, FILE *f);
+int mutt_write_mime_body(struct Body *a, FILE *f);
+int mutt_write_mime_header(struct Body *a, FILE *f);
int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
const char *pfx, int wraplen, int flags);
-int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, BODY *attach, int mode, int privacy);
+int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, struct Body *attach, int mode, int privacy);
void mutt_write_references(LIST *r, FILE *f, int trim);
int mutt_yesorno(const char *msg, int def);
void mutt_set_header_color(CONTEXT *ctx, HEADER *curhdr);
}
}
-struct AttachPtr **mutt_gen_attach_list(BODY *m, int parent_type, struct AttachPtr **idx,
+struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type, struct AttachPtr **idx,
short *idxlen, short *idxmax, int level, int compose)
{
struct AttachPtr *new = NULL;
int mutt_tag_attach(MUTTMENU *menu, int n, int m)
{
- BODY *cur = ((struct AttachPtr **) menu->data)[n]->content;
+ struct Body *cur = ((struct AttachPtr **) menu->data)[n]->content;
bool ot = cur->tagged;
cur->tagged = (m >= 0 ? m : !cur->tagged);
dst[l + 2] = 0;
}
-static int query_save_attachment(FILE *fp, BODY *body, HEADER *hdr, char **directory)
+static int query_save_attachment(FILE *fp, struct Body *body, HEADER *hdr, char **directory)
{
char *prompt = NULL;
char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
return 0;
}
-void mutt_save_attachment_list(FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTMENU *menu)
+void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, HEADER *hdr, MUTTMENU *menu)
{
char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
char *directory = NULL;
mutt_message(_("Attachment saved."));
}
-static void query_pipe_attachment(char *command, FILE *fp, BODY *body, int filter)
+static void query_pipe_attachment(char *command, FILE *fp, struct Body *body, int filter)
{
char tfile[_POSIX_PATH_MAX];
char warning[STRING + _POSIX_PATH_MAX];
}
}
-static void pipe_attachment(FILE *fp, BODY *b, STATE *state)
+static void pipe_attachment(FILE *fp, struct Body *b, STATE *state)
{
FILE *ifp = NULL;
}
}
-static void pipe_attachment_list(char *command, FILE *fp, int tag, BODY *top,
+static void pipe_attachment_list(char *command, FILE *fp, int tag, struct Body *top,
int filter, STATE *state)
{
for (; top; top = top->next)
}
}
-void mutt_pipe_attachment_list(FILE *fp, int tag, BODY *top, int filter)
+void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter)
{
STATE state;
char buf[SHORT_STRING];
pipe_attachment_list(buf, fp, tag, top, filter, &state);
}
-static int can_print(BODY *top, int tag)
+static int can_print(struct Body *top, int tag)
{
char type[STRING];
return 1;
}
-static void print_attachment_list(FILE *fp, int tag, BODY *top, STATE *state)
+static void print_attachment_list(FILE *fp, int tag, struct Body *top, STATE *state)
{
char type[STRING];
}
}
-void mutt_print_attachment_list(FILE *fp, int tag, BODY *top)
+void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
{
STATE state;
print_attachment_list(fp, tag, top, &state);
}
-static void update_attach_index(BODY *cur, struct AttachPtr ***idxp, short *idxlen,
+static void update_attach_index(struct Body *cur, struct AttachPtr ***idxp, short *idxlen,
short *idxmax, MUTTMENU *menu)
{
struct AttachPtr **idx = *idxp;
}
-int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY *cur,
+int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, struct Body *cur,
struct AttachPtr ***idxp, short *idxlen, short *idxmax, int recv)
{
struct AttachPtr **idx = *idxp;
return op;
}
-static void attach_collapse(BODY *b, short collapse, short init, short just_one)
+static void attach_collapse(struct Body *b, short collapse, short init, short just_one)
{
short i;
for (; b; b = b->next)
}
}
-void mutt_attach_init(BODY *b)
+void mutt_attach_init(struct Body *b)
{
for (; b; b = b->next)
{
char helpstr[LONG_STRING];
MUTTMENU *menu = NULL;
- BODY *cur = NULL;
+ struct Body *cur = NULL;
MESSAGE *msg = NULL;
FILE *fp = NULL;
struct AttachPtr **idx = NULL;
/* S/MIME nesting */
if ((mutt_is_application_smime(cur) & SMIMEOPAQUE))
{
- BODY *_cur = cur;
+ struct Body *_cur = cur;
FILE *_fp = fp;
fp = NULL;
/* some helper functions to verify that we are exclusively operating
* on message/rfc822 attachments
*/
-static bool check_msg(BODY *b, bool err)
+static bool check_msg(struct Body *b, bool err)
{
if (!mutt_is_message_type(b->type, b->subtype))
{
return true;
}
-static bool check_all_msg(struct AttachPtr **idx, short idxlen, BODY *cur, bool err)
+static bool check_all_msg(struct AttachPtr **idx, short idxlen, struct Body *cur, bool err)
{
short i;
/* can we decode all tagged attachments? */
-static short check_can_decode(struct AttachPtr **idx, short idxlen, BODY *cur)
+static short check_can_decode(struct AttachPtr **idx, short idxlen, struct Body *cur)
{
short i;
** The bounce function, from the attachment menu
**
**/
-void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur)
+void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur)
{
short i;
char prompt[STRING];
**
**
**/
-void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur)
+void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur)
{
short i;
* Note: This and the calling procedure could be optimized quite a
* bit. For now, it's not worth the effort.
*/
-static bool is_parent(short i, struct AttachPtr **idx, short idxlen, BODY *cur)
+static bool is_parent(short i, struct AttachPtr **idx, short idxlen, struct Body *cur)
{
short level = idx[i]->level;
return 0;
}
-static HEADER *find_parent(struct AttachPtr **idx, short idxlen, BODY *cur, short nattach)
+static HEADER *find_parent(struct AttachPtr **idx, short idxlen, struct Body *cur, short nattach)
{
short i;
HEADER *parent = NULL;
/* Attach all the body parts which can't be decoded.
* This code is shared by forwarding and replying. */
-static BODY **copy_problematic_attachments(FILE *fp, BODY **last, struct AttachPtr **idx,
+static struct Body **copy_problematic_attachments(FILE *fp, struct Body **last, struct AttachPtr **idx,
short idxlen, short force)
{
short i;
* (non-message types)
*/
static void attach_forward_bodies(FILE *fp, HEADER *hdr, struct AttachPtr **idx,
- short idxlen, BODY *cur, short nattach, int flags)
+ short idxlen, struct Body *cur, short nattach, int flags)
{
short i;
short mime_fwd_all = 0;
short mime_fwd_any = 1;
HEADER *parent = NULL;
HEADER *tmphdr = NULL;
- BODY **last;
+ struct Body **last;
char tmpbody[_POSIX_PATH_MAX];
FILE *tmpfp = NULL;
* the attachment index.
*/
static void attach_forward_msgs(FILE *fp, HEADER *hdr, struct AttachPtr **idx,
- short idxlen, BODY *cur, int flags)
+ short idxlen, struct Body *cur, int flags)
{
HEADER *curhdr = NULL;
HEADER *tmphdr = NULL;
short i;
int rc;
- BODY **last;
+ struct Body **last;
char tmpbody[_POSIX_PATH_MAX];
FILE *tmpfp = NULL;
}
void mutt_attach_forward(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
- BODY *cur, int flags)
+ struct Body *cur, int flags)
{
short nattach;
}
void mutt_attach_reply(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
- BODY *cur, int flags)
+ struct Body *cur, int flags)
{
short mime_reply_any = 0;
* In addition, this function returns a 0 if the command works on a file,
* and 1 if the command works on a pipe.
*/
-int rfc1524_expand_command(BODY *a, char *filename, char *_type, char *command, int clen)
+int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *command, int clen)
{
int x = 0, y = 0;
int needspipe = true;
}
}
-static int rfc1524_mailcap_parse(BODY *a, char *filename, char *type,
+static int rfc1524_mailcap_parse(struct Body *a, char *filename, char *type,
rfc1524_entry *entry, int opt)
{
FILE *fp = NULL;
* in *entry, and returns 1. On failure (not found), returns 0.
* If entry == NULL just return 1 if the given type is found.
*/
-int rfc1524_mailcap_lookup(BODY *a, char *type, rfc1524_entry *entry, int opt)
+int rfc1524_mailcap_lookup(struct Body *a, char *type, rfc1524_entry *entry, int opt)
{
char path[_POSIX_PATH_MAX];
int x;
rfc1524_entry *rfc1524_new_entry(void);
void rfc1524_free_entry(rfc1524_entry **entry);
-int rfc1524_expand_command(BODY *a, char *filename, char *_type, char *command, int clen);
+int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *command, int clen);
int rfc1524_expand_filename(char *nametemplate, char *oldfile, char *newfile, size_t nflen);
-int rfc1524_mailcap_lookup(BODY *a, char *type, rfc1524_entry *entry, int opt);
+int rfc1524_mailcap_lookup(struct Body *a, char *type, rfc1524_entry *entry, int opt);
int mutt_rename_file(char *oldfile, char *newfile);
#endif /* _MUTT_RFC1524_H */
fst->spaces = 0;
}
-int rfc3676_handler(BODY *a, STATE *s)
+int rfc3676_handler(struct Body *a, STATE *s)
{
char *buf = NULL, *t = NULL;
unsigned int quotelevel = 0, newql = 0, sigsep = 0;
#include "mutt.h"
/* body handler implementing RfC 3676 for format=flowed */
-int rfc3676_handler(BODY *a, STATE *s);
+int rfc3676_handler(struct Body *a, STATE *s);
/* this does the space-stuffing for RfC3676 style messages */
void rfc3676_space_stuff(HEADER *hdr);
{
int i;
HEADER *h = NULL;
- BODY *tmp = NULL;
+ struct Body *tmp = NULL;
if (flags & SENDREPLY)
{
{
if ((i = query_quadoption(OPT_MIMEFWD, _("Forward as attachment?"))) == MUTT_YES)
{
- BODY *last = msg->content;
+ struct Body *last = msg->content;
mutt_message(_("Preparing forwarded message..."));
/* if (WithCrypto && (flags & SENDKEY)) */
else if ((WithCrypto & APPLICATION_PGP) && (flags & SENDKEY))
{
- BODY *b = NULL;
+ struct Body *b = NULL;
if ((WithCrypto & APPLICATION_PGP) && (b = crypt_pgp_make_key_attachment(NULL)) == NULL)
return -1;
}
/* rfc2047 encode the content-descriptions */
-void mutt_encode_descriptions(BODY *b, short recurse)
+void mutt_encode_descriptions(struct Body *b, short recurse)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
for (t = b; t; t = t->next)
{
}
/* rfc2047 decode them in case of an error */
-static void decode_descriptions(BODY *b)
+static void decode_descriptions(struct Body *b)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
for (t = b; t; t = t->next)
{
char buffer[LONG_STRING];
char fcc[_POSIX_PATH_MAX] = ""; /* where to copy this message */
FILE *tempfp = NULL;
- BODY *pbody = NULL;
+ struct Body *pbody = NULL;
int i, killfrom = 0;
int fcc_error = 0;
int free_clear_content = 0;
- BODY *save_content = NULL;
- BODY *clear_content = NULL;
+ struct Body *save_content = NULL;
+ struct Body *clear_content = NULL;
char *pgpkeylist = NULL;
/* save current value of "pgp_sign_as" and "smime_default_key" */
char *pgp_signas = NULL;
if (*fcc && (mutt_strcmp("/dev/null", fcc) != 0))
{
- BODY *tmpbody = msg->content;
- BODY *save_sig = NULL;
- BODY *save_parts = NULL;
+ struct Body *tmpbody = msg->content;
+ struct Body *save_sig = NULL;
+ struct Body *save_parts = NULL;
if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPTFCCCLEAR))
msg->content = clear_content;
}
-int mutt_write_mime_header(BODY *a, FILE *f)
+int mutt_write_mime_header(struct Body *a, FILE *f)
{
PARAMETER *p = NULL;
char buffer[STRING];
#define write_as_text_part(a) \
(mutt_is_text_part(a) || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(a)))
-int mutt_write_mime_body(BODY *a, FILE *f)
+int mutt_write_mime_body(struct Body *a, FILE *f)
{
char *p, boundary[SHORT_STRING];
char send_charset[SHORT_STRING];
FILE *fpin = NULL;
- BODY *t = NULL;
+ struct Body *t = NULL;
FGETCONV *fc = NULL;
if (a->type == TYPEMULTIPART)
* Analyze the contents of a file to determine which MIME encoding to use.
* Also set the body charset, sometimes, or not.
*/
-CONTENT *mutt_get_content_info(const char *fname, BODY *b)
+CONTENT *mutt_get_content_info(const char *fname, struct Body *b)
{
CONTENT *info = NULL;
CONTENT_STATE state;
* The longest match is used so that we can match `ps.gz' when `gz' also
* exists.
*/
-int mutt_lookup_mime_type(BODY *att, const char *path)
+int mutt_lookup_mime_type(struct Body *att, const char *path)
{
FILE *f = NULL;
char *p = NULL, *q = NULL, *ct = NULL;
return type;
}
-static void transform_to_7bit(BODY *a, FILE *fpin)
+static void transform_to_7bit(struct Body *a, FILE *fpin)
{
char buff[_POSIX_PATH_MAX];
STATE s;
}
}
-void mutt_message_to_7bit(BODY *a, FILE *fp)
+void mutt_message_to_7bit(struct Body *a, FILE *fp)
{
char temp[_POSIX_PATH_MAX];
char *line = NULL;
}
/* determine which Content-Transfer-Encoding to use */
-static void set_encoding(BODY *b, CONTENT *info)
+static void set_encoding(struct Body *b, CONTENT *info)
{
char send_charset[SHORT_STRING];
}
}
-void mutt_stamp_attachment(BODY *a)
+void mutt_stamp_attachment(struct Body *a)
{
a->stamp = time(NULL);
}
/* Get a body's character set */
-char *mutt_get_body_charset(char *d, size_t dlen, BODY *b)
+char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b)
{
char *p = NULL;
}
-/* Assumes called from send mode where BODY->filename points to actual file */
-void mutt_update_encoding(BODY *a)
+/* Assumes called from send mode where Body->filename points to actual file */
+void mutt_update_encoding(struct Body *a)
{
CONTENT *info = NULL;
char chsbuff[STRING];
a->content = info;
}
-BODY *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg)
+struct Body *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg)
{
char buffer[LONG_STRING];
- BODY *body = NULL;
+ struct Body *body = NULL;
FILE *fp = NULL;
int cmflags, chflags;
int pgp = WithCrypto ? hdr->security : 0;
return body;
}
-BODY *mutt_make_file_attach(const char *path)
+struct Body *mutt_make_file_attach(const char *path)
{
- BODY *att = NULL;
+ struct Body *att = NULL;
CONTENT *info = NULL;
att = mutt_new_body();
return att;
}
-static int get_toplevel_encoding(BODY *a)
+static int get_toplevel_encoding(struct Body *a)
{
int e = ENC7BIT;
}
/* check for duplicate boundary. return 1 if duplicate */
-static bool check_boundary(const char *boundary, BODY *b)
+static bool check_boundary(const char *boundary, struct Body *b)
{
char *p = NULL;
return false;
}
-BODY *mutt_make_multipart(BODY *b)
+struct Body *mutt_make_multipart(struct Body *b)
{
- BODY *new = NULL;
+ struct Body *new = NULL;
new = mutt_new_body();
new->type = TYPEMULTIPART;
}
/* remove the multipart body if it exists */
-BODY *mutt_remove_multipart(BODY *b)
+struct Body *mutt_remove_multipart(struct Body *b)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
if (b->parts)
{
*/
-int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, BODY *attach, int mode, int privacy)
+int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, struct Body *attach, int mode, int privacy)
{
char buffer[LONG_STRING];
char *p = NULL, *q = NULL;
return top;
}
-static void set_noconv_flags(BODY *b, short flag)
+static void set_noconv_flags(struct Body *b, short flag)
{
for (; b; b = b->next)
{
}
-BODY *smime_build_smime_entity(BODY *a, char *certlist)
+struct Body *smime_build_smime_entity(struct Body *a, char *certlist)
{
char buf[LONG_STRING], certfile[LONG_STRING];
char tempfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
char smimeinfile[_POSIX_PATH_MAX];
char *cert_start = certlist, *cert_end = certlist;
FILE *smimein = NULL, *smimeerr = NULL, *fpout = NULL, *fptmp = NULL;
- BODY *t = NULL;
+ struct Body *t = NULL;
int err = 0, empty;
pid_t thepid;
}
-BODY *smime_sign_message(BODY *a)
+struct Body *smime_sign_message(struct Body *a)
{
- BODY *t = NULL;
+ struct Body *t = NULL;
char buffer[LONG_STRING];
char signedfile[_POSIX_PATH_MAX], filetosign[_POSIX_PATH_MAX];
FILE *smimein = NULL, *smimeout = NULL, *smimeerr = NULL, *sfp = NULL;
}
-int smime_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
{
char signedfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
FILE *fp = NULL, *smimeout = NULL, *smimeerr = NULL;
This handles application/pkcs7-mime which can either be a signed
or an encrypted message.
*/
-static BODY *smime_handle_entity(BODY *m, STATE *s, FILE *outFile)
+static struct Body *smime_handle_entity(struct Body *m, STATE *s, FILE *outFile)
{
int len = 0;
int c;
FILE *smimeout = NULL, *smimein = NULL, *smimeerr = NULL;
FILE *tmpfp = NULL, *tmpfp_buffer = NULL, *fpout = NULL;
struct stat info;
- BODY *p = NULL;
+ struct Body *p = NULL;
pid_t thepid = -1;
unsigned int type = mutt_is_application_smime(m);
}
-int smime_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
char tempfile[_POSIX_PATH_MAX];
STATE s;
}
-int smime_application_smime_handler(BODY *m, STATE *s)
+int smime_application_smime_handler(struct Body *m, STATE *s)
{
return smime_handle_entity(m, s, NULL) ? 0 : -1;
}
void smime_void_passphrase(void);
int smime_valid_passphrase(void);
-int smime_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
+int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
-int smime_application_smime_handler(BODY *m, STATE *s);
+int smime_application_smime_handler(struct Body *m, STATE *s);
-BODY *smime_sign_message(BODY *a);
+struct Body *smime_sign_message(struct Body *a);
-BODY *smime_build_smime_entity(BODY *a, char *certlist);
+struct Body *smime_build_smime_entity(struct Body *a, char *certlist);
-int smime_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
+int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
int smime_verify_sender(HEADER *h);