]> granicus.if.org Git - neomutt/log
neomutt
5 years agoConvert crypt-gpgme to use struct Buffer for tempfiles
Kevin McCarthy [Wed, 25 Sep 2019 22:28:30 +0000 (15:28 -0700)]
Convert crypt-gpgme to use struct Buffer for tempfiles

Use the pool where possible, but when the function calls other
long-running functions (such as mutt_body_handler() or
mutt_do_pager()), allocate the buffer.

smime_gpgme_decrypt_mime() was not freeing the "cur" struct Body generated on
error.  Add a call to mutt_free_body(cur) in the error handling.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoReuse the static space_stuff function for unstuffing
Kevin McCarthy [Sun, 1 Sep 2019 20:25:06 +0000 (13:25 -0700)]
Reuse the static space_stuff function for unstuffing

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRemove manual note about space-stuffing only once
Kevin McCarthy [Sat, 31 Aug 2019 21:17:22 +0000 (14:17 -0700)]
Remove manual note about space-stuffing only once

Stuffing is now performed each time.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRe-enable and cleanup format-flowed space stuffing
Kevin McCarthy [Sat, 31 Aug 2019 20:37:16 +0000 (13:37 -0700)]
Re-enable and cleanup format-flowed space stuffing

Commit 04cb5bde tried to fix re-stuffing a postponed message more than
once, but unfortunately broke the normal case of composing a new
message.  So actually, space-stuffing has been turned off the past 7
years.

Move format=flowed parameter setting below the standard message
pre-processing block.  It shouldn't be performed for draft-files even
with $resume_draft_files set.  Moving out of the block makes that
clearer.

Create mutt_rfc3676_space_(un)stuff() functions, which check the
content type and stuff/unstuff apprpropriately.  Note that the
stuff/unstuff does not depend on $text_flowed, which is only in charge
of setting the format=flowed parameter.  This parameter can also come
from resumed/resent/draft messages and should still be respected.

Add unstuffing to mutt_prepare_template().  This is called by
postponed, resent, and draft files.  This will prevent double-stuffing
in those cases.

Unstuff/restuff around editing the message in the compose menu, to
keep everything transparent to the user.  I originally put the
stuffing *after* the compose menu, but previewing the messages in the
compose menu did not work properly in that case.  It's cleaner this
way too.

Change the stuff/unstuff functions to preserve the original
hdr->content->filename.  The "hack" previously used would interact
poorly with editable body files (mutt -i -E).  Fortunately space
stuffing was pretty much disabled except in unusual cases before.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agofix: broken index_format
Richard Russon [Mon, 7 Oct 2019 12:07:26 +0000 (13:07 +0100)]
fix: broken index_format

A chance alignment made enum symbol MT_COLOR_INDEX_NUMBER equal to 37
(ASCII %).  This was causing problems when inserting colour codes into
the index_format string.

5 years agobuild: fix autosetup warning
Zero King [Sat, 5 Oct 2019 07:00:15 +0000 (07:00 +0000)]
build: fix autosetup warning

5 years agoadd: log warnings
Richard Russon [Wed, 2 Oct 2019 14:20:32 +0000 (15:20 +0100)]
add: log warnings

Distinguish between errors and warnings in the log and displayed on screen.

  color warning brightyellow default

5 years agoinit.h fix cast
Richard Russon [Fri, 4 Oct 2019 00:09:28 +0000 (01:09 +0100)]
init.h fix cast

5 years agotidy do...while loops
Richard Russon [Thu, 3 Oct 2019 01:30:33 +0000 (02:30 +0100)]
tidy do...while loops

5 years agofix crash on exit
Richard Russon [Wed, 2 Oct 2019 22:58:32 +0000 (23:58 +0100)]
fix crash on exit

Even if mx_mbox_open() fails, the Mailbox might still have an Account.

5 years agodocs: update list of colours
Richard Russon [Wed, 2 Oct 2019 00:50:36 +0000 (01:50 +0100)]
docs: update list of colours

Update the list of objects that can be coloured and give examples for
each category.

5 years agomerge: upstream refactoring
Richard Russon [Tue, 1 Oct 2019 10:48:33 +0000 (11:48 +0100)]
merge: upstream refactoring

 * Properly revert on an autocrypt postpone failure
 * Fix memory leak when attaching messages
 * Convert bcache to use buffer pools
 * Convert mutt_complete() to use the buffer pool
 * Convert compose check_attachments() to use buffer pool
 * Fix mutt_save_message() "enter_fname()" to use buffer version
 * Create mutt_buffer_get_field()
 * Convert buffer callers of mutt_get_field() to use buffer version
 * Convert compose menu fname variable to buffer
 * Convert compress setup_paths() to use buffer
 * Fix memory leak in compose write-fcc function
 * buffer: tidy checks for empty Buffers

5 years agobuffer: tidy checks for empty Buffers 1856/head
Richard Russon [Tue, 1 Oct 2019 10:33:09 +0000 (11:33 +0100)]
buffer: tidy checks for empty Buffers

5 years agoFix memory leak in compose write-fcc function
Kevin McCarthy [Sun, 22 Sep 2019 22:59:27 +0000 (15:59 -0700)]
Fix memory leak in compose write-fcc function

The outer multipart was not being freed after writing.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert compress setup_paths() to use buffer
Kevin McCarthy [Sun, 22 Sep 2019 22:58:58 +0000 (15:58 -0700)]
Convert compress setup_paths() to use buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert compose menu fname variable to buffer
Kevin McCarthy [Sun, 22 Sep 2019 21:38:03 +0000 (14:38 -0700)]
Convert compose menu fname variable to buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert buffer callers of mutt_get_field() to use buffer version
Kevin McCarthy [Sun, 22 Sep 2019 21:16:56 +0000 (14:16 -0700)]
Convert buffer callers of mutt_get_field() to use buffer version

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoCreate mutt_buffer_get_field()
Kevin McCarthy [Sun, 22 Sep 2019 21:11:43 +0000 (14:11 -0700)]
Create mutt_buffer_get_field()

This will reduce the buffer->dptr fiddling all over the place into one
spot until mutt_enter_string() can be converted.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix mutt_save_message() "enter_fname()" to use buffer version
Kevin McCarthy [Sun, 22 Sep 2019 01:34:51 +0000 (18:34 -0700)]
Fix mutt_save_message() "enter_fname()" to use buffer version

Commit be632f11 converted this function to use the buffer pool, but
accidentally used the non-buffer prompt when there was already a
buffer-converted version.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert compose check_attachments() to use buffer pool
Kevin McCarthy [Sun, 22 Sep 2019 02:41:28 +0000 (19:41 -0700)]
Convert compose check_attachments() to use buffer pool

Modify error message so that the filename comes last, to prevent a
long path from hiding the error message or prompt.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_complete() to use the buffer pool
Kevin McCarthy [Fri, 20 Sep 2019 01:52:24 +0000 (18:52 -0700)]
Convert mutt_complete() to use the buffer pool

Add helper functions mutt_buffer_substrcpy() and
mutt_buffer_concatn_path().

Remove mutt_concatn_path() because mutt_complete() was the only
caller.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert bcache to use buffer pools
Kevin McCarthy [Fri, 6 Sep 2019 23:14:08 +0000 (16:14 -0700)]
Convert bcache to use buffer pools

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix memory leak when attaching messages
Kevin McCarthy [Mon, 2 Sep 2019 02:10:23 +0000 (19:10 -0700)]
Fix memory leak when attaching messages

Setting actx->idx[]->content->parts to NULL causes a memory leak,
because message attachments store a BODY there that needs to be freed.

I looked through the various use cases of ci_send_message() and
actually believe content->parts will be NULL for all other cases
except message attachments.  From the comment added to
delete_attachment():

  Other ci_send_message() message constructors are careful to free
  any body->parts, removing depth:
   - mutt_prepare_template() used by postponed, resent, and draft files
   - mutt_copy_body() used by the recvattach menu and $forward_attachments.

  I believe it is safe to completely remove the "content->parts =
  NULL" statement.  But for safety, am doing so only for the case
  it must be avoided: message attachments.

Co-authored-by: Austin Ray <austin@austinray.io>
5 years agoProperly revert on an autocrypt postpone failure
Kevin McCarthy [Sat, 31 Aug 2019 20:36:28 +0000 (13:36 -0700)]
Properly revert on an autocrypt postpone failure

Co-authored-by: Austin Ray <austin@austinray.io>
5 years agomerge: fix new mail behaviour
Richard Russon [Tue, 1 Oct 2019 10:13:08 +0000 (11:13 +0100)]
merge: fix new mail behaviour

Fix a number of regressions to do with new mail.

 * fix: mbox_check_stats() retvals
 * fix mbox's handling of new mail
 * fix <change-folder> when $change_folder_next is set
 * fix sidebar colour for 'new' mailboxes
 * change check_stats() to return number of new emails

5 years agochange check_stats() to return number of new emails 1859/head
Richard Russon [Tue, 1 Oct 2019 10:09:42 +0000 (11:09 +0100)]
change check_stats() to return number of new emails

5 years agofix sidebar colour for 'new' mailboxes
Richard Russon [Wed, 25 Sep 2019 12:04:05 +0000 (13:04 +0100)]
fix sidebar colour for 'new' mailboxes

This depends on the new-ness of a Mailbox, not the presence of new
emails.

5 years agofix <change-folder> when $change_folder_next is set
Richard Russon [Wed, 25 Sep 2019 12:30:22 +0000 (13:30 +0100)]
fix <change-folder> when $change_folder_next is set

5 years agofix mbox's handling of new mail
Richard Russon [Thu, 12 Sep 2019 17:05:57 +0000 (18:05 +0100)]
fix mbox's handling of new mail

`Mailbox.has_new` is tied to the timestamp of an mbox, not its count of
new mail.  Visiting a Mailbox will clear the flag, touch(1) the file.

Whether the new emails get changed to old emails depends on $mark_old.

5 years agofix: mbox_check_stats() retvals
Richard Russon [Wed, 11 Sep 2019 13:31:08 +0000 (14:31 +0100)]
fix: mbox_check_stats() retvals

Change mbox_check_stats() to clearly show when a Mailbox has new mail.
Return:
 * -1 Error
 *  0 Success, no new mail
 *  1 Success, some new mail

A bug was introduced when mbox_check_stats() was created that caused
'mbox' Mailboxes to always appear as if they had new mail.

5 years agodrop unused variable
Richard Russon [Sat, 28 Sep 2019 16:07:33 +0000 (17:07 +0100)]
drop unused variable

'suffix' hasn't been used since the iconv code was stripped out.

5 years agoinitialise gpgme pointers
Richard Russon [Sat, 28 Sep 2019 16:04:42 +0000 (17:04 +0100)]
initialise gpgme pointers

These typedef'd types are all pointers, so initialise them to NULL.

5 years agodoxy: tidy wrapper comments
Richard Russon [Wed, 25 Sep 2019 13:57:19 +0000 (14:57 +0100)]
doxy: tidy wrapper comments

5 years agowindow: fix clear_screen
Richard Russon [Mon, 30 Sep 2019 12:51:43 +0000 (13:51 +0100)]
window: fix clear_screen

The compose screen wasn't being cleared properly by just `clearok()`.

5 years agobuild: WIFEXITED is defined in sys/wait.h
Pietro Cerutti [Mon, 30 Sep 2019 12:08:44 +0000 (12:08 +0000)]
build: WIFEXITED is defined in sys/wait.h

5 years agomerge: refactor use of curses
Richard Russon [Mon, 30 Sep 2019 11:43:11 +0000 (12:43 +0100)]
merge: refactor use of curses

Tidy:
 * eliminate curses from Progress Bar
 * move colour definitions to color.h
 * tidy naming of color functions
 * move KeyEvent out of mutt_curses.h

Refactor:
 * SET_COLOR() to mutt_curses_set_color()
 * NORMAL_COLOR() to mutt_curses_set_color()
 * ATTR_SET() to mutt_curses_set_attr()
 * curs_set() to mutt_curses_set_cursor()
 * beep() to mutt_beep()
 * addch() to mutt_window_addch()
 * addnstr() to mutt_window_addnstr()
 * addstr() to mutt_window_addstr()
 * clrtobot() to mutt_window_clrtobot()
 * move() to mutt_window_move_abs()
 * printw() to mutt_window_printf()
 * mutt_window_mvaddstr()
 * clearok() to mutt_window_clear_screen()
 * mutt_window_getxy() to mutt_window_get_coords()

5 years agorefactor: mutt_window_getxy() to mutt_window_get_coords() 1860/head
Richard Russon [Fri, 27 Sep 2019 23:18:02 +0000 (00:18 +0100)]
refactor: mutt_window_getxy() to mutt_window_get_coords()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: clearok() to mutt_window_clear_screen()
Richard Russon [Fri, 27 Sep 2019 23:09:17 +0000 (00:09 +0100)]
refactor: clearok() to mutt_window_clear_screen()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: mutt_window_mvaddstr()
Richard Russon [Fri, 27 Sep 2019 15:57:03 +0000 (16:57 +0100)]
refactor: mutt_window_mvaddstr()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: printw() to mutt_window_printf()
Richard Russon [Fri, 27 Sep 2019 15:22:13 +0000 (16:22 +0100)]
refactor: printw() to mutt_window_printf()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: move() to mutt_window_move_abs()
Richard Russon [Fri, 27 Sep 2019 15:03:52 +0000 (16:03 +0100)]
refactor: move() to mutt_window_move_abs()

Encapsulate a curses function to reduce dependencies.
This function works with absolute screen coordinates rather than coords
based on a MuttWindow.  This function should be eliminated soon.

5 years agorefactor: clrtobot() to mutt_window_clrtobot()
Richard Russon [Fri, 27 Sep 2019 14:52:57 +0000 (15:52 +0100)]
refactor: clrtobot() to mutt_window_clrtobot()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: addstr() to mutt_window_addstr()
Richard Russon [Fri, 27 Sep 2019 14:45:06 +0000 (15:45 +0100)]
refactor: addstr() to mutt_window_addstr()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: addnstr() to mutt_window_addnstr()
Richard Russon [Fri, 27 Sep 2019 14:36:19 +0000 (15:36 +0100)]
refactor: addnstr() to mutt_window_addnstr()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: addch() to mutt_window_addch()
Richard Russon [Fri, 27 Sep 2019 14:27:39 +0000 (15:27 +0100)]
refactor: addch() to mutt_window_addch()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: beep() to mutt_beep()
Richard Russon [Fri, 27 Sep 2019 13:30:53 +0000 (14:30 +0100)]
refactor: beep() to mutt_beep()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: curs_set() to mutt_curses_set_cursor()
Richard Russon [Fri, 27 Sep 2019 13:21:46 +0000 (14:21 +0100)]
refactor: curs_set() to mutt_curses_set_cursor()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: ATTR_SET() to mutt_curses_set_attr()
Richard Russon [Fri, 27 Sep 2019 12:57:35 +0000 (13:57 +0100)]
refactor: ATTR_SET() to mutt_curses_set_attr()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: NORMAL_COLOR() to mutt_curses_set_color()
Richard Russon [Fri, 27 Sep 2019 12:51:34 +0000 (13:51 +0100)]
refactor: NORMAL_COLOR() to mutt_curses_set_color()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: SET_COLOR() to mutt_curses_set_color()
Richard Russon [Fri, 27 Sep 2019 12:49:29 +0000 (13:49 +0100)]
refactor: SET_COLOR() to mutt_curses_set_color()

Encapsulate a curses function to reduce dependencies.

5 years agorefactor: move KeyEvent out of mutt_curses.h
Richard Russon [Fri, 27 Sep 2019 12:16:15 +0000 (13:16 +0100)]
refactor: move KeyEvent out of mutt_curses.h

KeyEvent doesn't belong in mutt_curses.h.

5 years agorefactor: tidy naming of color functions
Richard Russon [Fri, 27 Sep 2019 11:37:23 +0000 (12:37 +0100)]
refactor: tidy naming of color functions

Tidy colour functions for consistency.

5 years agorefactor: move colour definitions to color.h
Richard Russon [Fri, 27 Sep 2019 11:29:19 +0000 (12:29 +0100)]
refactor: move colour definitions to color.h

The colour defines and structures don't depend on curses.

5 years agorefactor: eliminate curses from Progress Bar
Richard Russon [Fri, 27 Sep 2019 23:18:37 +0000 (00:18 +0100)]
refactor: eliminate curses from Progress Bar

Change the Progress Bar to use the MuttMessageWindow rather than writing
to absolute screen coordinates.

5 years agoiwyu: backtrace
Richard Russon [Tue, 24 Sep 2019 10:31:40 +0000 (11:31 +0100)]
iwyu: backtrace

5 years agoclang-format
Richard Russon [Mon, 23 Sep 2019 16:55:42 +0000 (17:55 +0100)]
clang-format

5 years agoUnclobber mutt_parse headers 1851/head
Pietro Cerutti [Thu, 12 Sep 2019 13:38:31 +0000 (13:38 +0000)]
Unclobber mutt_parse headers

5 years agoRecurse into subparts when counting attachments
Pietro Cerutti [Thu, 12 Sep 2019 12:52:41 +0000 (12:52 +0000)]
Recurse into subparts when counting attachments

Fixes #1782

5 years agofix empty buffer
Richard Russon [Sat, 21 Sep 2019 18:17:34 +0000 (19:17 +0100)]
fix empty buffer

5 years agomerge: fix coverity defects
Richard Russon [Sat, 21 Sep 2019 17:15:03 +0000 (18:15 +0100)]
merge: fix coverity defects

 * config: expand flags typedef
 * fix Slist usage
 * nntp: check pointers
 * fix pointer checks in generate_body()
 * fix leak in imap_parse_path()
 * fix leak in mutt_attach_mail_sender()
 * fix pointer checks in rfc2047_decode()
 * check the buffer in enriched_putwc()
 * fix var type in text_enriched_handler()
 * check retval of mutt_str_atoui()
 * check the buffer in enriched_puts()
 * ensure that the buffer always exists in mutt_buffer_alloc()

5 years agoensure that the buffer always exists in mutt_buffer_alloc()
Richard Russon [Fri, 20 Sep 2019 13:08:50 +0000 (14:08 +0100)]
ensure that the buffer always exists in mutt_buffer_alloc()

5 years agocheck the buffer in enriched_puts()
Richard Russon [Fri, 20 Sep 2019 12:56:05 +0000 (13:56 +0100)]
check the buffer in enriched_puts()

5 years agocheck retval of mutt_str_atoui()
Richard Russon [Thu, 19 Sep 2019 23:25:28 +0000 (00:25 +0100)]
check retval of mutt_str_atoui()

5 years agofix var type in text_enriched_handler()
Richard Russon [Thu, 19 Sep 2019 22:56:36 +0000 (23:56 +0100)]
fix var type in text_enriched_handler()

The fgetwc() return value was being truncated into a wchar_t.
This meant the error condition couldn't be detected.

5 years agocheck the buffer in enriched_putwc()
Richard Russon [Thu, 19 Sep 2019 22:48:48 +0000 (23:48 +0100)]
check the buffer in enriched_putwc()

5 years agofix pointer checks in rfc2047_decode()
Richard Russon [Thu, 19 Sep 2019 22:41:12 +0000 (23:41 +0100)]
fix pointer checks in rfc2047_decode()

5 years agofix leak in mutt_attach_mail_sender()
Richard Russon [Thu, 19 Sep 2019 22:29:12 +0000 (23:29 +0100)]
fix leak in mutt_attach_mail_sender()

5 years agofix leak in imap_parse_path()
Richard Russon [Thu, 19 Sep 2019 22:19:51 +0000 (23:19 +0100)]
fix leak in imap_parse_path()

5 years agofix pointer checks in generate_body()
Richard Russon [Thu, 19 Sep 2019 20:07:23 +0000 (21:07 +0100)]
fix pointer checks in generate_body()

5 years agonntp: check pointers
Richard Russon [Thu, 19 Sep 2019 20:01:13 +0000 (21:01 +0100)]
nntp: check pointers

5 years agofix Slist usage
Richard Russon [Thu, 19 Sep 2019 17:35:16 +0000 (18:35 +0100)]
fix Slist usage

Some config variables were missing NULL checks for Slist types.

5 years agoconfig: expand flags typedef
Richard Russon [Thu, 19 Sep 2019 17:13:53 +0000 (18:13 +0100)]
config: expand flags typedef

The recent addition, CS_DUMP_SHOW_DEPRECATED, didn't fit into the flags'
typedef.

5 years agomerge: optimise #include usage
Richard Russon [Sat, 21 Sep 2019 16:55:55 +0000 (17:55 +0100)]
merge: optimise #include usage

 * fix cppcheck warnings
 * compose: fix minor dependency problem
 * build: check for <syscall.h> too
 * fix error checking in parse_keymap()
 * fix checks in menu_search()
 * fix checks in progress_choose_increment()
 * fix prototypes in md5.h
 * iwyu: optimise #include usage
 * iwyu: pragma keep some #includes
 * iwyu: pragma exports

5 years agoiwyu: pragma exports
Richard Russon [Sat, 21 Sep 2019 16:18:05 +0000 (17:18 +0100)]
iwyu: pragma exports

Define some header files as 'facades' -- wrappers for libraries.

5 years agoiwyu: pragma keep some #includes
Richard Russon [Sat, 21 Sep 2019 15:26:21 +0000 (16:26 +0100)]
iwyu: pragma keep some #includes

After pre-processing, some macros disappear, which means that iwyu
thinks that some headers aren't needed.

5 years agoiwyu: optimise #include usage
Richard Russon [Sat, 21 Sep 2019 15:25:13 +0000 (16:25 +0100)]
iwyu: optimise #include usage

5 years agofix prototypes in md5.h
Richard Russon [Sat, 21 Sep 2019 15:23:40 +0000 (16:23 +0100)]
fix prototypes in md5.h

5 years agofix checks in progress_choose_increment()
Richard Russon [Sat, 21 Sep 2019 15:22:34 +0000 (16:22 +0100)]
fix checks in progress_choose_increment()

5 years agofix checks in menu_search()
Richard Russon [Sat, 21 Sep 2019 15:21:35 +0000 (16:21 +0100)]
fix checks in menu_search()

5 years agofix error checking in parse_keymap()
Richard Russon [Sat, 21 Sep 2019 15:21:06 +0000 (16:21 +0100)]
fix error checking in parse_keymap()

5 years agobuild: check for <syscall.h> too
Richard Russon [Sat, 21 Sep 2019 15:20:31 +0000 (16:20 +0100)]
build: check for <syscall.h> too

5 years agocompose: fix minor dependency problem
Richard Russon [Sat, 21 Sep 2019 15:09:38 +0000 (16:09 +0100)]
compose: fix minor dependency problem

Define the struct before it's referenced in a macro.

5 years agofix cppcheck warnings
Richard Russon [Sat, 21 Sep 2019 15:49:46 +0000 (16:49 +0100)]
fix cppcheck warnings

5 years agomerge: fix lgtm warnings
Richard Russon [Thu, 19 Sep 2019 15:35:32 +0000 (16:35 +0100)]
merge: fix lgtm warnings

 * tidy mutt_draw_tree()
 * tidy mutt_yesorno()
 * reduce timestamp limits
 * rename global Lua

5 years agorename global Lua 1855/head
Richard Russon [Thu, 19 Sep 2019 15:08:01 +0000 (16:08 +0100)]
rename global Lua

Globals should have longer names

5 years agoreduce timestamp limits
Richard Russon [Thu, 19 Sep 2019 15:03:35 +0000 (16:03 +0100)]
reduce timestamp limits

The two tests were only applicable on 32-bit architectures.

5 years agotidy mutt_yesorno()
Richard Russon [Thu, 19 Sep 2019 14:42:48 +0000 (15:42 +0100)]
tidy mutt_yesorno()

5 years agotidy mutt_draw_tree()
Richard Russon [Thu, 19 Sep 2019 14:41:37 +0000 (15:41 +0100)]
tidy mutt_draw_tree()

5 years agodocs: update credits
Richard Russon [Wed, 18 Sep 2019 22:13:16 +0000 (23:13 +0100)]
docs: update credits

5 years agobuild: fix contrib install
Richard Russon [Mon, 16 Sep 2019 19:22:21 +0000 (20:22 +0100)]
build: fix contrib install

5 years agoconfig: add missing DT_COMMAND flags
Richard Russon [Sat, 14 Sep 2019 15:31:42 +0000 (16:31 +0100)]
config: add missing DT_COMMAND flags

5 years agoclang-format
Richard Russon [Sat, 14 Sep 2019 12:18:52 +0000 (13:18 +0100)]
clang-format

5 years agofix: crash in index
Richard Russon [Tue, 17 Sep 2019 10:44:51 +0000 (11:44 +0100)]
fix: crash in index

Before displaying a message, we check that `Context->mailbox` isn't
`NULL`.  However, events in `mutt_display_message()` can cause the
`Context` to be closed.

Fixes: #1854
5 years agotravis: upgrade to Ubuntu 18.04 (Bionic)
Richard Russon [Mon, 16 Sep 2019 14:23:50 +0000 (15:23 +0100)]
travis: upgrade to Ubuntu 18.04 (Bionic)

5 years agofix: mutt_any_key_to_continue()
Richard Russon [Fri, 13 Sep 2019 23:15:52 +0000 (00:15 +0100)]
fix: mutt_any_key_to_continue()

Originally, this function relied on `fflush(stdin)` to clear the input
buffer, but that isn't portable.  This version changes the terminal
settings, temporarily, so that it can read single characters without
blocking, or line-buffering.

5 years agomerge: upstream buffer refactoring
Richard Russon [Sun, 15 Sep 2019 15:33:55 +0000 (16:33 +0100)]
merge: upstream buffer refactoring

 * Convert mutt_display_message() to buffer pool
 * Convert mutt_save_message() to use buffer pool
 * Convert recvattach save_attachment functions to use buffer pool
 * Convert query_pipe_attachment to use buffer pool
 * Convert print_attachment_list to use buffer pool

5 years agoConvert print_attachment_list to use buffer pool 1853/head
Kevin McCarthy [Thu, 12 Sep 2019 02:47:13 +0000 (19:47 -0700)]
Convert print_attachment_list to use buffer pool

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert query_pipe_attachment to use buffer pool
Kevin McCarthy [Thu, 12 Sep 2019 02:40:48 +0000 (19:40 -0700)]
Convert query_pipe_attachment to use buffer pool

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert recvattach save_attachment functions to use buffer pool
Kevin McCarthy [Thu, 12 Sep 2019 02:10:02 +0000 (19:10 -0700)]
Convert recvattach save_attachment functions to use buffer pool

Convert utility functions prepend_curdir() and mutt_check_overwrite()
to use struct Buffer, as they are only used by those two functions.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_save_message() to use buffer pool
Kevin McCarthy [Wed, 11 Sep 2019 23:23:46 +0000 (16:23 -0700)]
Convert mutt_save_message() to use buffer pool

Change imap_copy_messages() dest parameter to const char *.

mutt_default_save() will be converted to use a buffer next, removing
the dptr fixups.

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