attachment.c: redesign/simplify using the new API.
* libmailutils/mime/attachment.c (BUF_SIZE): Remove. (_mu_mime_io_buffer)<buf, bufsize>: Remove members. (MSG_HDR): Remove. (mu_message_create_attachment): Use mu_asprintf instead of manually crafting the string. (mu_mime_io_buffer_set_size) (mu_mime_io_buffer_get_size): Remove. (mu_message_save_attachment) (mu_message_encapsulate) (mu_message_unencapsulate): Use mu_header_sget to avoid unnecessary memory allocations. Use mu_stream_copy instead of (ineffective) loops. * include/mailutils/message.h (mu_mime_io_buffer_set_size) (mu_mime_io_buffer_get_size): Remove prototypes. * include/mailutils/header.h (MU_HEADER_RESENT_SENDER) (MU_HEADER_CONTENT_TRANSFER_ENCODING) (MU_HEADER_DELIVERY_DATE) (MU_HEADER_ENVELOPE_TO): Normalize spelling.
Showing
3 changed files
with
42 additions
and
120 deletions
-
Please register or sign in to post a comment