]> granicus.if.org Git - neomutt/log
neomutt
4 years agomerge: light refactoring master
Richard Russon [Sun, 27 Oct 2019 03:04:09 +0000 (03:04 +0000)]
merge: light refactoring

 * unify state functions
 * add validator for wrap_headers
 * flagify PgpKeyValidFlags
 * tidy source
 * tidy conditionals 1
 * tidy conditionals 2
 * tidy conditionals 3
 * tidy conditionals 4

4 years agotidy conditionals 4
Richard Russon [Thu, 24 Oct 2019 00:46:16 +0000 (01:46 +0100)]
tidy conditionals 4

- move true condition first
- flatten 'else' clause when 'if' clause returns/breaks
- compare int functions to zero

4 years agotidy conditionals 3
Richard Russon [Thu, 24 Oct 2019 00:34:30 +0000 (01:34 +0100)]
tidy conditionals 3

- move true condition first
- flatten 'else' clause when 'if' clause returns/breaks
- compare int functions to zero

4 years agotidy conditionals 2
Richard Russon [Wed, 23 Oct 2019 22:30:09 +0000 (23:30 +0100)]
tidy conditionals 2

- move true condition first
- flatten 'else' clause when 'if' clause returns/breaks
- compare int functions to zero

4 years agotidy conditionals 1
Richard Russon [Wed, 23 Oct 2019 21:52:35 +0000 (22:52 +0100)]
tidy conditionals 1

- move true condition first
- flatten 'else' clause when 'if' clause returns/breaks
- compare int functions to zero

4 years agotidy source
Richard Russon [Wed, 23 Oct 2019 18:20:38 +0000 (19:20 +0100)]
tidy source

- move once-used symbol
- move statics to the top
- kill blank lines
- correct grammar in log
- reduce scope of variable
- add doxygen comments

4 years agoflagify PgpKeyValidFlags
Richard Russon [Thu, 24 Oct 2019 01:59:50 +0000 (02:59 +0100)]
flagify PgpKeyValidFlags

4 years agoadd validator for wrap_headers
Richard Russon [Thu, 24 Oct 2019 00:56:19 +0000 (01:56 +0100)]
add validator for wrap_headers

4 years agounify state functions
Richard Russon [Wed, 23 Oct 2019 23:59:10 +0000 (00:59 +0100)]
unify state functions

4 years agonotify: after command execution
Richard Russon [Mon, 7 Oct 2019 10:14:52 +0000 (11:14 +0100)]
notify: after command execution

4 years agomerge: upstream Buffer refactoring
Richard Russon [Sun, 27 Oct 2019 00:34:32 +0000 (01:34 +0100)]
merge: upstream Buffer refactoring

 * Convert hcache fetch and store raw to use buffer pool
 * Convert mutt_parse_hook() to use buffer pool
 * Convert set/reset and source_rc to use buffers for paths
 * Convert main() to use buffers for paths
 * Convert mbox_mbox_sync() to use buffer pool
 * Change ssl_init to use buffer pool for rand filename
 * Convert mutt_save_confirm() to use buffer pool
 * Convert mx_mbox_close() to use buffer pool
 * Convert pgp_app_handler to use buffer pool
 * Convert pgp_check_traditional_one_body() to use buffer pool
 * Convert pgp_class_verify_one() to use buffer pool
 * Convert pgp_extract_keys_from_attachment() to use buffer pool
 * Convert pgp_decrypt_part() to use buffer pool
 * Convert pgp_class_sign_message to use buffer pool
 * Convert pgp_class_encrypt_message() to use buffer pool
 * Convert pgp_class_traditional_encryptsign() to use buffer pool
 * Convert pgp_select_key() to use buffer pool
 * Convert pgp_class_make_key_attachment() to use buffer pool
 * Convert pop_fetch_message() to use buffer pool
 * Convert mutt_num_postponed() maildir check to use buffer pool
 * Convert attach_fmt %f to use buffer pool
 * Convert attach_forward_bodies to use buffer pool
 * Convert attach_forward_msgs() to use buffer pool
 * Convert mutt_attach_reply() to use buffer pool
 * Convert mailcap_lookup() to use buffer pool for path
 * Convert send_message() to use buffer pool
 * Convert fcc to a buffer

4 years agoConvert fcc to a buffer
Kevin McCarthy [Thu, 24 Oct 2019 06:46:06 +0000 (14:46 +0800)]
Convert fcc to a buffer

This affects the send.c flow(ci_send_message()), the compose menu,
and various helper functions.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/c5d770ead5cd8444859dd4a785677aa1920454f0
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert send_message() to use buffer pool
Kevin McCarthy [Thu, 24 Oct 2019 03:23:20 +0000 (11:23 +0800)]
Convert send_message() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/2fcde00525d7186406e3498682e3fdd2b80de685
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mailcap_lookup() to use buffer pool for path
Kevin McCarthy [Wed, 23 Oct 2019 11:01:17 +0000 (19:01 +0800)]
Convert mailcap_lookup() to use buffer pool for path

Adjust the rfc1524_mailcap_parse() and get_field_text() filename and
type parameters to be const.

Note that the sizeof(type) needs to be passed to
mailcap_lookup().  I'll fix that next.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/8997c55f48e356c28a9eadcc3fae224be5ffac02
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mutt_attach_reply() to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 08:03:56 +0000 (16:03 +0800)]
Convert mutt_attach_reply() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/6380cbd6b9450ab542df2eafaade12059eed8618
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert attach_forward_msgs() to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 07:36:59 +0000 (15:36 +0800)]
Convert attach_forward_msgs() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/8d12d9005ed83308272cc0b54fc0c5ccc743cda9
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert attach_forward_bodies to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 07:04:49 +0000 (15:04 +0800)]
Convert attach_forward_bodies to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/0b59dc759c3d9d59fd9423500cf775a76622b634
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert attach_fmt %f to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 06:44:47 +0000 (14:44 +0800)]
Convert attach_fmt %f to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/1f71fad9bb2d0b6d8f75f24d55576e52f7c108c0
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mutt_num_postponed() maildir check to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 06:33:09 +0000 (14:33 +0800)]
Convert mutt_num_postponed() maildir check to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/80bc61db364b4e031a9789ce8c79a5f083fc8652
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pop_fetch_message() to use buffer pool
Kevin McCarthy [Wed, 23 Oct 2019 05:53:26 +0000 (13:53 +0800)]
Convert pop_fetch_message() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/d8b6f94e6ba1af4bf88ccf956e9bf9f10d05eae3
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_class_make_key_attachment() to use buffer pool
Kevin McCarthy [Sun, 20 Oct 2019 07:27:10 +0000 (15:27 +0800)]
Convert pgp_class_make_key_attachment() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/26e89164ad16e22c7a94005f17493de584654dab
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_select_key() to use buffer pool
Kevin McCarthy [Sun, 20 Oct 2019 05:41:30 +0000 (13:41 +0800)]
Convert pgp_select_key() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/e3408a0032d0f25d503ca6dfcdfcd161ad5bcd74
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_class_traditional_encryptsign() to use buffer pool
Kevin McCarthy [Sat, 19 Oct 2019 07:50:22 +0000 (15:50 +0800)]
Convert pgp_class_traditional_encryptsign() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/782bcd7d7ba2c96f0bb9025e817f899d93bfbf65
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_class_encrypt_message() to use buffer pool
Kevin McCarthy [Sat, 19 Oct 2019 07:35:06 +0000 (15:35 +0800)]
Convert pgp_class_encrypt_message() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/978cdaf7b79e3b80cda2d3d97cc6dfecafda605a
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_class_sign_message to use buffer pool
Kevin McCarthy [Sat, 19 Oct 2019 07:07:53 +0000 (15:07 +0800)]
Convert pgp_class_sign_message to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/3829174887cda03b16a56df05707945174d0e620
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_decrypt_part() to use buffer pool
Kevin McCarthy [Fri, 18 Oct 2019 06:41:06 +0000 (14:41 +0800)]
Convert pgp_decrypt_part() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/e383f5c999ab4b65bd2f280f7abe767cc2cc546b
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_extract_keys_from_attachment() to use buffer pool
Kevin McCarthy [Fri, 18 Oct 2019 06:29:56 +0000 (14:29 +0800)]
Convert pgp_extract_keys_from_attachment() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/f3bfb7d105854f53428b98de95d920e6f5ebad0e
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_class_verify_one() to use buffer pool
Kevin McCarthy [Fri, 18 Oct 2019 06:21:19 +0000 (14:21 +0800)]
Convert pgp_class_verify_one() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/e27225519f79bdd50299fd209abd93a218d95ba3
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_check_traditional_one_body() to use buffer pool
Kevin McCarthy [Fri, 18 Oct 2019 06:02:02 +0000 (14:02 +0800)]
Convert pgp_check_traditional_one_body() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/c1f9f00f6890eaaeb98af5cbe2a0aaf95a213431
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert pgp_app_handler to use buffer pool
Kevin McCarthy [Wed, 16 Oct 2019 07:42:54 +0000 (15:42 +0800)]
Convert pgp_app_handler to use buffer pool

Rename the pgp_copy_checksig() and mutt_wait_filter() return code
variables to provide more clarity, and to make the purpose and
assignment of rc more obvious.

Change tmpfname creation failure to be like pgpoutfile and
pgperrfile, by going to the cleanup point.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/30b1ff48452c3474053e8acae28d3427978d70a4
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mx_mbox_close() to use buffer pool
Kevin McCarthy [Wed, 16 Oct 2019 06:13:05 +0000 (14:13 +0800)]
Convert mx_mbox_close() to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/23bfc45fba3e6a5b81c2f35ba8c9f27efc634177
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mutt_save_confirm() to use buffer pool
Kevin McCarthy [Tue, 15 Oct 2019 06:52:26 +0000 (14:52 +0800)]
Convert mutt_save_confirm() to use buffer pool

These are prompts, so don't really need the larger, dynamic
capability, but it might not hurt for a larger path.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/0944e89823219f659847b9894834682cc648664f
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoChange ssl_init to use buffer pool for rand filename
Kevin McCarthy [Tue, 15 Oct 2019 06:33:02 +0000 (14:33 +0800)]
Change ssl_init to use buffer pool for rand filename

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/140cd8853624cf1dfd00605191b55d600b3c572e
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mbox_mbox_sync() to use buffer pool
Kevin McCarthy [Tue, 15 Oct 2019 05:48:59 +0000 (13:48 +0800)]
Convert mbox_mbox_sync() to use buffer pool

Rewrite return (-1) to a new fatal target to ensure cleanup.

Remove some repetitive unlink(tempfile) operations by adding a new
flag pointing when to start and stop that during a bail.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/5572a3023d19c60529c08a4373e55b640d44cfd3
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert main() to use buffers for paths
Kevin McCarthy [Wed, 9 Oct 2019 04:59:41 +0000 (12:59 +0800)]
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.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/e4c176b3546c224c05a430c5aaae86567caec917
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert set/reset and source_rc to use buffers for paths
Kevin McCarthy [Tue, 8 Oct 2019 07:21:44 +0000 (15:21 +0800)]
Convert set/reset and source_rc to use buffers for paths

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/fb2487c2131cc665063f94525d1c65a7658c6b10
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mutt_parse_hook() to use buffer pool
Kevin McCarthy [Sun, 6 Oct 2019 05:37:14 +0000 (13:37 +0800)]
Convert mutt_parse_hook() to use buffer pool

Remove the path variable, as this is not needed:
mutt_buffer_expand_path() and mutt_check_simple() can operate directly
on the pattern/command buffers.

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/8351c060aa3be2ec0c14a26a0d9dcb5a15203512
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert hcache fetch and store raw to use buffer pool
Kevin McCarthy [Sat, 28 Sep 2019 02:21:26 +0000 (19:21 -0700)]
Convert hcache fetch and store raw to use buffer pool

Upstream-commit: https://gitlab.com/muttmua/mutt/commit/36ee8d39e2eed5d78fecc21c045fbdbe0953f233
Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agodocs: fix refs to Mutt
Richard Russon [Sat, 26 Oct 2019 12:59:19 +0000 (13:59 +0100)]
docs: fix refs to Mutt

4 years agofix: abort entire-thread if database lacks message
Austin Ray [Sat, 26 Oct 2019 02:55:39 +0000 (22:55 -0400)]
fix: abort entire-thread if database lacks message

If the notmuch database is missing a message, abort <entire-thread>
before causing a segfault. When <entire-thread> executes on a message
missing from the database, it segfaults. This happens because the
vfolder returned is empty and not in an properly initialized state for
the notmuch-backend. As such, the notmuch-backend segfaults.

To prevent a segfault, display a warning and pre-maturely exit
<entire-thread>. While the user is left in an empty vfolder, this is
consistent behavior for <entire-thread>. Ordinarily, you're left with
just the notmuch thread, which doesn't exist in this case.

The location of the abort is perfect for adding behavior to handle the
missing message. In the future, we can automatically run 'notmuch new'
after encountering a missing message. That is outside the scope of this
commit.

Fixes #1861

4 years agomerge: NeoMutt 2019-10-25 2019-10-25
Richard Russon [Fri, 25 Oct 2019 13:04:50 +0000 (14:04 +0100)]
merge: NeoMutt 2019-10-25

 * version 2019-10-25
 * update contributors
 * update changelog
 * sync translations

4 years agosync translations
Richard Russon [Fri, 25 Oct 2019 12:59:03 +0000 (13:59 +0100)]
sync translations

4 years agoupdate changelog
Richard Russon [Fri, 25 Oct 2019 12:48:24 +0000 (13:48 +0100)]
update changelog

4 years agoupdate contributors
Richard Russon [Fri, 25 Oct 2019 11:27:43 +0000 (12:27 +0100)]
update contributors

4 years agoversion 2019-10-25
Richard Russon [Fri, 25 Oct 2019 11:25:52 +0000 (12:25 +0100)]
version 2019-10-25

4 years agomerge: eliminate uses of MuttIndexWindow
Richard Russon [Wed, 23 Oct 2019 10:41:16 +0000 (11:41 +0100)]
merge: eliminate uses of MuttIndexWindow

 * eliminate MuttIndexWindow from mutt_copy_message()
 * eliminate MuttIndexWindow from deep functions
 * eliminate MuttIndexWindow from mutt_make_string_flags()
 * eliminate MuttIndexWindow from Mixmaster
 * eliminate MuttIndexWindow from mutt_display_message()

4 years agoeliminate MuttIndexWindow from mutt_display_message() 1873/head
Richard Russon [Mon, 21 Oct 2019 12:07:48 +0000 (13:07 +0100)]
eliminate MuttIndexWindow from mutt_display_message()

Pass `mutt_display_message()` a `MuttWindow` to work with, rather than
using the global `MuttIndexWindow`.

4 years agoeliminate MuttIndexWindow from Mixmaster
Richard Russon [Mon, 21 Oct 2019 11:39:26 +0000 (12:39 +0100)]
eliminate MuttIndexWindow from Mixmaster

Pass the Mixmaster code a `MuttWindow` to work with, rather than using
the global `MuttIndexWindow`.

4 years agoeliminate MuttIndexWindow from mutt_make_string_flags()
Richard Russon [Mon, 21 Oct 2019 11:34:04 +0000 (12:34 +0100)]
eliminate MuttIndexWindow from mutt_make_string_flags()

`mutt_make_string_flags()`, and its macro wrapper `mutt_make_string()`,
use `mutt_expando_format()` and `index_format_str()` to expand strings.

Some of the callers expect the string to be truncated at the screen
width.  These functions now have an extra paramter to avoid using
`MuttIndexWindow` directly.

4 years agoeliminate MuttIndexWindow from deep functions
Richard Russon [Mon, 21 Oct 2019 10:45:27 +0000 (11:45 +0100)]
eliminate MuttIndexWindow from deep functions

These functions needed an extra parameter:

- `mutt_help()`
- `dump_unbound()`
- `dump_menu()`
- `format_line()`

These functions used the new `State.wraplen` member:

- `quote_width()`
- `text_enriched_handler()`

4 years agoeliminate MuttIndexWindow from mutt_copy_message()
Richard Russon [Sat, 19 Oct 2019 15:53:57 +0000 (16:53 +0100)]
eliminate MuttIndexWindow from mutt_copy_message()

`mutt_copy_message()` uses a huge tree of functions to process and copy
the header and body of a message.

Some of these functions perform wrapping and some of the wrapping
functions use `MuttIndexWindow` to get the width of the current panel.

These functions needed an extra parameter:

- `mutt_copy_hdr()`
- `mutt_copy_header()`
- `mutt_copy_message()`
- `mutt_copy_message_fp()`
- `mutt_write_one_header()`

The rest used an extra member in `struct State`.
For example, this sequence of functions:

- `mutt_body_handler()`
- `valid_pgp_encrypted_handler()`
- `run_decode_and_handler()`
- `crypt_pgp_encrypted_handler()`
- `pgp_gpgme_encrypted_handler()`
- `mutt_protected_headers_handler()`

4 years agolgtm: fix warning
Richard Russon [Tue, 22 Oct 2019 11:53:43 +0000 (12:53 +0100)]
lgtm: fix warning

4 years agoclang-format
Richard Russon [Mon, 21 Oct 2019 10:46:16 +0000 (11:46 +0100)]
clang-format

4 years agofix read-only mbox
Richard Russon [Wed, 2 Oct 2019 22:58:39 +0000 (23:58 +0100)]
fix read-only mbox

If an mbox Mailbox doesn't have write privs, try opening it read-only.

Before the architectural changes, there could be multiple open Mailbox
objects representing a single folder.

By default a folder would be given a read-only Mailbox.  When the folder
needed to be written to, another Mailbox would be opened read-write.
This lead to synchronisation problems between the two Mailboxes.

Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
4 years agomerge: update translations
Richard Russon [Tue, 15 Oct 2019 00:42:15 +0000 (01:42 +0100)]
merge: update translations

 * po/zh_CN: 100%
 * Update PT BR translation

4 years agosync translations
Richard Russon [Tue, 15 Oct 2019 00:41:33 +0000 (01:41 +0100)]
sync translations

4 years agoUpdate PT BR translation
Thiago Costa de Paiva [Sun, 22 Sep 2019 02:24:08 +0000 (22:24 -0400)]
Update PT BR translation

4 years agopo/zh_CN: 100%
Mingcong Bai [Mon, 9 Sep 2019 14:46:56 +0000 (09:46 -0500)]
po/zh_CN: 100%

- Fix some translation errors in the about message.
- Fix translation for "menu".
- Complete translation.

4 years agoadd fallback for inotify_init1
Gero Treuner [Sun, 1 Sep 2019 14:58:46 +0000 (16:58 +0200)]
add fallback for inotify_init1

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agopop: move refno 1871/head
Richard Russon [Fri, 11 Oct 2019 23:55:32 +0000 (00:55 +0100)]
pop: move refno

`refno` isn't used outside of the POP backend.
Move `Email->refno` to `PopEmailData->refno`.

The value was saved in the Header Cache, but the restored value was never used (see pop_fetch_headers()).

4 years agopop: refactor Email->edata
Richard Russon [Sat, 12 Oct 2019 00:04:32 +0000 (01:04 +0100)]
pop: refactor Email->edata

Use a wrapper function around Email->edata, like the other backends.

4 years agoremove used member
Richard Russon [Sat, 12 Oct 2019 18:15:57 +0000 (19:15 +0100)]
remove used member

Body->is_signed_data was introduced 15 years ago and never used.

4 years agoClear connection input buffer when closing
Beck, Andre [Fri, 11 Oct 2019 11:17:58 +0000 (19:17 +0800)]
Clear connection input buffer when closing

An RFC-violating reply from the Dovecot SMTP submission service
uncovered a bug in Mutt.  Mutt was not clearing out the input buffer
when closing the connection.

Dovecot was including an extra 250 response after data submission:

  DATA
  354 OK
  Subject: Test 3

  Test 3
  .
  250 2.0.0  223 byte chunk, total 223
  250 2.0.0 OK id=1iIqT1-0004wS-Ac
  quit
  221 2.0.0 Bye

The multiline 250 reply requires a hyphen in the first response.  Mutt
closes the connection after the quit, but ends up leaving the
unexpected second line in the input buffer.  This causes an error in
the next usage of the connection.

Clean out bufpos and available when closing the socket.

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agomerge: add $toggle-quoted-show-levels feature
Richard Russon [Fri, 11 Oct 2019 12:51:13 +0000 (13:51 +0100)]
merge: add $toggle-quoted-show-levels feature

 * Add ability to limit levels hidden with toggle-quoted command
 * Give (*line_info)[n] a name

4 years agoGive (*line_info)[n] a name 1825/head
Pietro Cerutti [Fri, 11 Oct 2019 12:07:08 +0000 (12:07 +0000)]
Give (*line_info)[n] a name

4 years agoAdd ability to limit levels hidden with toggle-quoted command
Darren Kenny [Mon, 2 Sep 2019 11:34:26 +0000 (12:34 +0100)]
Add ability to limit levels hidden with toggle-quoted command

Closes: #1802
By setting the configuration variable `toggle_quoted_show_levels`, when you
execute the `toggle-quoted` command, the specified number of levels
will continue to be visible.

4 years agofix: hcache namer function
Richard Russon [Thu, 10 Oct 2019 13:29:21 +0000 (14:29 +0100)]
fix: hcache namer function

Fix error introduced when applying upstream Buffer refactoring.

4 years agomerge: refactor colour handling / notifications
Richard Russon [Tue, 8 Oct 2019 22:57:17 +0000 (23:57 +0100)]
merge: refactor colour handling / notifications

 * rename and reorder color constants
 * tidy whitespace
 * rename vars
 * convert retval to CommandResult
 * tidy code
 * rename/move function
 * do_uncolor change param to retval
 * encapsulate all the colours
 * fix max quote depth
 * encapsulate defs
 * encapsulate quoted
 * encapsulate color_list
 * move mutt_color_free
 * move parse_object
 * initialise lists
 * move color_line_new
 * move mutt_colors_free
 * deglobalise Colors
 * implement more uncolor commands
 * colour notifications
 * sort symbols
 * docs: color/uncolor

4 years agodocs: color/uncolor 1864/head
Richard Russon [Fri, 4 Oct 2019 17:59:41 +0000 (18:59 +0100)]
docs: color/uncolor

4 years agosort symbols
Richard Russon [Fri, 4 Oct 2019 11:41:11 +0000 (12:41 +0100)]
sort symbols

4 years agocolour notifications
Richard Russon [Fri, 4 Oct 2019 10:41:00 +0000 (11:41 +0100)]
colour notifications

4 years agoimplement more uncolor commands
Richard Russon [Fri, 4 Oct 2019 10:39:40 +0000 (11:39 +0100)]
implement more uncolor commands

4 years agodeglobalise Colors
Richard Russon [Fri, 4 Oct 2019 01:48:12 +0000 (02:48 +0100)]
deglobalise Colors

4 years agomove mutt_colors_free
Richard Russon [Fri, 4 Oct 2019 01:28:05 +0000 (02:28 +0100)]
move mutt_colors_free

4 years agomove color_line_new
Richard Russon [Fri, 4 Oct 2019 01:26:53 +0000 (02:26 +0100)]
move color_line_new

4 years agoinitialise lists
Richard Russon [Fri, 4 Oct 2019 01:25:59 +0000 (02:25 +0100)]
initialise lists

4 years agomove parse_object
Richard Russon [Fri, 4 Oct 2019 01:23:36 +0000 (02:23 +0100)]
move parse_object

4 years agomove mutt_color_free
Richard Russon [Fri, 4 Oct 2019 01:21:59 +0000 (02:21 +0100)]
move mutt_color_free

4 years agoencapsulate color_list
Richard Russon [Fri, 4 Oct 2019 01:19:18 +0000 (02:19 +0100)]
encapsulate color_list

4 years agoencapsulate quoted
Richard Russon [Fri, 4 Oct 2019 01:17:34 +0000 (02:17 +0100)]
encapsulate quoted

4 years agoencapsulate defs
Richard Russon [Fri, 4 Oct 2019 01:10:17 +0000 (02:10 +0100)]
encapsulate defs

4 years agofix max quote depth
Richard Russon [Fri, 4 Oct 2019 00:50:00 +0000 (01:50 +0100)]
fix max quote depth

4 years agoencapsulate all the colours
Richard Russon [Fri, 4 Oct 2019 00:37:14 +0000 (01:37 +0100)]
encapsulate all the colours

4 years agodo_uncolor change param to retval
Richard Russon [Thu, 3 Oct 2019 23:09:15 +0000 (00:09 +0100)]
do_uncolor change param to retval

4 years agorename/move function
Richard Russon [Thu, 3 Oct 2019 23:00:38 +0000 (00:00 +0100)]
rename/move function

4 years agotidy code
Richard Russon [Thu, 3 Oct 2019 22:10:08 +0000 (23:10 +0100)]
tidy code

4 years agoconvert retval to CommandResult
Richard Russon [Thu, 3 Oct 2019 22:09:57 +0000 (23:09 +0100)]
convert retval to CommandResult

4 years agorename vars
Richard Russon [Thu, 3 Oct 2019 22:04:18 +0000 (23:04 +0100)]
rename vars

4 years agotidy whitespace
Richard Russon [Thu, 3 Oct 2019 22:01:37 +0000 (23:01 +0100)]
tidy whitespace

4 years agorename and reorder color constants
Richard Russon [Thu, 3 Oct 2019 18:15:30 +0000 (19:15 +0100)]
rename and reorder color constants

4 years agoLet reply_to take precedence over C_ReplySelf 1863/head
Pietro Cerutti [Mon, 30 Sep 2019 15:59:39 +0000 (15:59 +0000)]
Let reply_to take precedence over C_ReplySelf

4 years agomerge: upstream refactoring
Richard Russon [Tue, 8 Oct 2019 22:34:59 +0000 (23:34 +0100)]
merge: upstream refactoring

 * Re-enable and cleanup format-flowed space stuffing
 * Remove manual note about space-stuffing only once
 * Reuse the static space_stuff function for unstuffing
 * Convert crypt-gpgme to use struct Buffer for tempfiles
 * Convert crypt_extract_keys and signed handler to use buffers
 * Convert edit_one_message() to use buffer pool
 * Convert run_decode_and_handler() to use buffer pool
 * Convert hcache db4 lockfile to buffer
 * Convert hcache_open to use buffer pool
 * Fix built-in pager checks for help and attachments
 * Convert mutt_edit_headers() to use buffer pool
 * Convert mutt_help() to use buffer for tempfile
 * Convert save-hook and fcc-hook to use buffer pool internally
 * Fix mutt_write_mime_body() application/pgp-encrypted handling
 * Convert imap_open_new_message() to use buffer pool
 * Convert imap fetch_new and fetch_message tempfiles to buffer pool
 * Convert imap_cachepath() and callers to use buffers
 * Convert parse_path_(un)list to use buffer pool for path
 * Convert start_debug() to use buffer pool

4 years agoConvert start_debug() to use buffer pool
Kevin McCarthy [Tue, 8 Oct 2019 07:22:27 +0000 (15:22 +0800)]
Convert start_debug() to use buffer pool

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert parse_path_(un)list to use buffer pool for path
Kevin McCarthy [Tue, 8 Oct 2019 05:07:40 +0000 (13:07 +0800)]
Convert parse_path_(un)list to use buffer pool for path

Don't use the buf parameter to avoid stretching it out, as it's used
for the entire rc parsing, and typically just holds command names.

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert imap_cachepath() and callers to use buffers
Kevin McCarthy [Tue, 8 Oct 2019 03:24:38 +0000 (11:24 +0800)]
Convert imap_cachepath() and callers to use buffers

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert imap fetch_new and fetch_message tempfiles to buffer pool
Kevin McCarthy [Mon, 7 Oct 2019 02:39:44 +0000 (10:39 +0800)]
Convert imap fetch_new and fetch_message tempfiles to buffer pool

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert imap_open_new_message() to use buffer pool
Kevin McCarthy [Mon, 7 Oct 2019 01:55:39 +0000 (09:55 +0800)]
Convert imap_open_new_message() to use buffer pool

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoFix mutt_write_mime_body() application/pgp-encrypted handling
Kevin McCarthy [Tue, 10 Sep 2019 01:32:59 +0000 (18:32 -0700)]
Fix mutt_write_mime_body() application/pgp-encrypted handling

It would blindly overwrite any attachment with that type, as if it
were the version label part of a multipart/encrypted message.

However attachments with extenstion .gpg are labeled that type if
$mime_type_query_command is set to "xdg-mime query filetype".  This
would cause the attachment to be overwritten too.

Add a check for a missing body->filename, which should only be the
case for the manually constructed part.

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert save-hook and fcc-hook to use buffer pool internally
Kevin McCarthy [Sun, 6 Oct 2019 08:32:42 +0000 (16:32 +0800)]
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.

Co-authored-by: Richard Russon <rich@flatcap.org>
4 years agoConvert mutt_help() to use buffer for tempfile
Kevin McCarthy [Sat, 5 Oct 2019 05:59:57 +0000 (13:59 +0800)]
Convert mutt_help() to use buffer for tempfile

Co-authored-by: Richard Russon <rich@flatcap.org>