Add ability to generate multipart/alternative using a filter script.
Create config variables $send_multipart_alternative (a quadoption)
and $send_multipart_alternative_filter. The filter script expects
output to be the mime type, a blank line, then the content.
Add ability to preview alternative from compose menu. <view-alt-text>
forces viewing as text. <view-alt-mailcap> forces using the mailcap.
Bind them to 'v' and 'V', respectively.
Improve <resend-message> so a multipart/alternative is stripped out,
which would just confuse the compose menu. Currently this preserves
the first alternative.
Allow alternative generation in batch mode, as long as the quadoption
is set to 'yes'.
Create multipart/mixed helpers.
Since we will be dealing with multipart/alternative, we need the
helpers to be a bit more specific.
We need to distinguish a top-level multipart/alternative from a
multipart/mixed created because of attachments.
Convert fcc to a buffer.
This affects the send.c flow (ci_send_message()), the compose menu,
and various helper functions.
Add typelen parameter to rfc1524_mailcap_lookup().
Because of mime_lookup commands, the call to mutt_check_lookup_list()
inside the function can modify the passed in type. Add an explicit
length parameter to the function, rather than assume the parameter
size. This also makes it more evident the type parameter can be
modified to callers.
Change the len parameter to mutt_check_lookup_list() to type size_t,
just to be correct about it.
Removed unused mutt_expand_link()
Convert main() to use buffers for paths.
Convert fpath (used for checking and creating $folder.
Convert expanded_infile and tempfile which are used for the -i,-H, and
-E options. We allocate buffers, rather than use the pool, because
they are used for the duration of the compose/send operation.
Convert save-hook and fcc-hook to use buffer pool internally.
The hook parameters still need to be converted, but I'm working
towards it slowly.
This will reduce the buffer->dptr fiddling all over the place into one
spot until mutt_enter_string() can be converted.
Convert mutt_complete() to use the buffer pool.
Add helper functions mutt_buffer_substrcpy() and
Remove mutt_concatn_path() because mutt_complete() was the only
Convert query_pipe_attachment to use buffer pool.
Convert recvattach save_attachment functions to use buffer pool.
Convert utility functions prepend_curdir() and mutt_check_overwrite()
to use BUFFER, as they are only used by those two functions.
Convert remaining mutt_encode_path() call to use BUFFER.
Then rename the other uses of mutt_buffer_encode_path() to
Convert bcache to use buffer pools.
Process autocrypt headers.
Create/update peer database accounts and gpg keys based on the headers.
Add autocrypt header parsing to mutt_parse_rfc822_line().
Convert parse_parameters() for autocrypt header usage:
* change to use a BUFFER to accomodate large autocrypt keydata
* Autocrypt header parameters are not rfc2231 compliant. Rather
than rolling another very similar function, just change the
existing one to allow space separation.
Factor out mutt_edit_address() in send.c.
For reuse by autocrypt for address prompts.
Convert Commands to use the union pointer_long_t too.
As with MuttVars, Commands was using an unsigned long to hold pointers
as well as enums. Convert to use the same union type of MuttVars.
Adjust command functions data parameter type to the union. Since
these are used outside init.c, relocate the union definition to
Although the number of functions affected was long, most of them did
not need much adjustment. Many of them made no use of the parameter.
Those that did were easily cast into an added "data" variable at the
Convert compress to use mutt_buffer_quote_filename().
Because the compress expandos operate differently than the rest of
mutt, requiring manual outer quoting, add a parameter to the function
to toggle outer quoting off.
Remove the now unused escape_path() function.
Convert migrated lib.c functions to use BUFFER.
Fix mutt_getcwd() to return NULL on failure.
Change mutt_rmtree(), mutt_mkwrapdir(), safe_open(), and
safe_symlink() to use BUFFER so they don't have filename length
Relocate lib.c functions to muttlib.c to enable BUFFER use.
Relocate safe_symlink(), safe_open(), mutt_rmtree() and their
This rearrangement is a bit awkward. Another approach for the future
might be to convert lib.c into a muttlib.c aware file, and just copy
the functions pgppubring.c uses inside itself.