]> granicus.if.org Git - neomutt/log
neomutt
7 years agoFix rv assignment in mutt_window_mvprintw(). (closes #3964)
Kevin McCarthy [Mon, 4 Sep 2017 16:40:44 +0000 (09:40 -0700)]
Fix rv assignment in mutt_window_mvprintw(). (closes #3964)

Mutt doesn't check the return value, so this wasn't causing a bug, but
was incorrect.

Thanks to dcb314 for reporting the issue.

7 years agoFix fp resource leak. (closes #3965)
Kevin McCarthy [Mon, 4 Sep 2017 16:20:53 +0000 (09:20 -0700)]
Fix fp resource leak. (closes #3965)

Thanks to dcb314 for reporting the issue.

7 years agoFix the new certificate prompt translations.
Kevin McCarthy [Sat, 2 Sep 2017 16:36:52 +0000 (09:36 -0700)]
Fix the new certificate prompt translations.

The Esperanto, Dutch, and Czech po files weren't updated in time for
1.9.  Fix the certificate prompt translations by adding a "(s)kip"
choice.  Otherwise the prompts would not be functional.

7 years agoUpdated Japanese translation
TAKAHASHI Tamotsu [Tue, 5 Sep 2017 15:59:10 +0000 (16:59 +0100)]
Updated Japanese translation

7 years agoUpdated Catalan translation
Ivan Vilata i Balaguer [Tue, 5 Sep 2017 15:57:50 +0000 (16:57 +0100)]
Updated Catalan translation

7 years agoUpdated Danish translation
Morten Bo Johansen [Tue, 5 Sep 2017 15:49:24 +0000 (16:49 +0100)]
Updated Danish translation

7 years agoUpdated German translation
Olaf Hering [Tue, 5 Sep 2017 15:47:17 +0000 (16:47 +0100)]
Updated German translation

7 years agoUpdated Russian translation
Vsevolod Volkov [Tue, 5 Sep 2017 15:42:30 +0000 (16:42 +0100)]
Updated Russian translation

7 years agoUpdated Ukrainian translation
Vsevolod Volkov [Tue, 5 Sep 2017 15:36:52 +0000 (16:36 +0100)]
Updated Ukrainian translation

7 years agobuild: substitute-in package version
Damien Riegel [Fri, 25 Aug 2017 15:46:25 +0000 (16:46 +0100)]
build: substitute-in package version

7 years agorefactor nntp setup
Richard Russon [Thu, 24 Aug 2017 19:52:11 +0000 (20:52 +0100)]
refactor nntp setup

Reorder the code so that NewsServer is only set once.

7 years agobuild: drop unused test/symbol ICONV_NONTRANS
Richard Russon [Thu, 31 Aug 2017 14:30:02 +0000 (15:30 +0100)]
build: drop unused test/symbol ICONV_NONTRANS

7 years agotidy: fix whitespace
Richard Russon [Wed, 23 Aug 2017 23:32:12 +0000 (00:32 +0100)]
tidy: fix whitespace

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Fri, 1 Sep 2017 12:45:23 +0000 (13:45 +0100)]
merge: upstream fixes (mutt/default)

 * Create ATTACH_CONTEXT to hold attachment index. (see #3728)
 * Change helpers functions to pass actx. (see #3728)
 * Add helpers to add and remove actx entries. (see #3728)
 * Change recvattach to allow nested encryption. (see #3728)
 * Add virtual index to actx. (see #3728)
 * Fix the expand/collapse code to use the virtual index. (see #3728)
 * Fix shared attachment functions. (see #3728)
 * Fix attachment check_traditional and extract_keys operations. (see #3728)
 * Add edit-content-type helper and warning for decrypted attachments. (closes #3728)
 * Fix parent_hdr usage in mutt_attach_reply(). (see #3728)
 * Add option to run command to query attachment mime type. (closes #2933) (closes #3959)

7 years agoAdd option to run command to query attachment mime type. (closes #2933) (closes ...
Kevin McCarthy [Sat, 19 Aug 2017 15:33:57 +0000 (08:33 -0700)]
Add option to run command to query attachment mime type. (closes #2933) (closes #3959)

Add $mime_type_query_command to specify a command to run if the
attachment extension is not in the mime.types file.

Add $mime_type_query_first to allow the query command to be run before
the mime.types lookup.

7 years agoFix parent_hdr usage in mutt_attach_reply(). (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 16:04:48 +0000 (09:04 -0700)]
Fix parent_hdr usage in mutt_attach_reply(). (see #3728)

If the selected attachments are not messages and no (common) parent is
found, parent_hdr is set to the passed in hdr.  In that case, parent
will still be NULL, but parent_hdr and parent_fp will be set.

Change the test to parent_hdr being NULL, not parent, to check for
this case.

7 years agoAdd edit-content-type helper and warning for decrypted attachments. (closes #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:28 +0000 (18:18 -0700)]
Add edit-content-type helper and warning for decrypted attachments. (closes #3728)

Regenerating the actx index will overwrite any changes made to a
decrypted attachment.  Change the mutt_edit_content_type() function to
return 1 when a structural change is made.  Add a warning message when
that is the case and a decrypted message was edited, so the user is
not surprised.

Note: mutt_edit_content_type() appeared to regenerate multipart
subparts every time, leading to a memory leak.  I believe this was an
oversite, and it should have regenerated only when there were no
subparts, so have "fixed" this.

7 years agoFix attachment check_traditional and extract_keys operations. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:26 +0000 (18:18 -0700)]
Fix attachment check_traditional and extract_keys operations. (see #3728)

Add helpers and iterate over the actx->idx instead of the BODY structure.

7 years agoFix shared attachment functions. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:25 +0000 (18:18 -0700)]
Fix shared attachment functions. (see #3728)

With nested decryption, the correct FP is associated with the
ATTACHPTR entry.  Also, the BODY entries are not continguous, so the
functions need to iterate over the actx index, not the BODY structure.

7 years agoFix the expand/collapse code to use the virtual index. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:24 +0000 (18:18 -0700)]
Fix the expand/collapse code to use the virtual index. (see #3728)

Fix the init code to respect OPTDIGESTCOLLAPSE.

7 years agoAdd virtual index to actx. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:22 +0000 (18:18 -0700)]
Add virtual index to actx. (see #3728)

The virtual index is modeled after the CONTEXT.  Add a CURATTACH
helper to reduce code verbosity.  Store the actx as menu->data.

Simplify and consolidate the recvattach and compose menu update code
inside a function.

Because compose and recvattach share so much code, change compose to
use the virtual index even though it has no collapse/expand
functionality.

7 years agoChange recvattach to allow nested encryption. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:21 +0000 (18:18 -0700)]
Change recvattach to allow nested encryption. (see #3728)

* Add a FP and BODY array to the actx.  These are used to allow proper
  cleanup.

* Add HEADER and root_fp entries, to allow for index regeneration.

* Separate out the compose and recvattach index generation functions.

* Change the recvattach index generator to decrypt as encrypted parts
  are found.

7 years agoAdd helpers to add and remove actx entries. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:20 +0000 (18:18 -0700)]
Add helpers to add and remove actx entries. (see #3728)

Use the helper in compose update_idx(), to consolidate the resize
logic and simplify the code.

Separate out the actx "free" routine from a routine to empty out the
idx.  The index regeneration routines should flush and rebuild the
index without having to renerate the actx structure.

7 years agoChange helpers functions to pass actx. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:19 +0000 (18:18 -0700)]
Change helpers functions to pass actx. (see #3728)

Change the pager, compose, recvattach and recvcmd to pass the actx
instead of the individual idx and idxlen parameters.

Separate out the compose menu exit logic to first free the BODY data
and then call the shared actx free function at the bottom.

7 years agoCreate ATTACH_CONTEXT to hold attachment index. (see #3728)
Kevin McCarthy [Fri, 11 Aug 2017 01:18:18 +0000 (18:18 -0700)]
Create ATTACH_CONTEXT to hold attachment index. (see #3728)

Move the idx and idxlen into ATTACH_CONTEXT.  In subsequence patches,
this structure will hold more useful items, such as the virtual index.

The swap out is straightforward, except for:
  * update_idx() in compose.c, which post-increments the idxlen in the
    call and again in the function.
  * mutt_gen_attach_list() which doesn't need to returns the new values.

7 years agocontrib: Add guix-neomutt.scm.
ng0 [Sun, 20 Aug 2017 21:27:05 +0000 (21:27 +0000)]
contrib: Add guix-neomutt.scm.

7 years agoFix link in CODE_OF_CONDUCT.md
Pietro Cerutti [Thu, 31 Aug 2017 15:12:30 +0000 (16:12 +0100)]
Fix link in CODE_OF_CONDUCT.md

7 years agoteach gen-map-doc about the new opcode header
Damien Riegel [Thu, 24 Aug 2017 02:15:06 +0000 (22:15 -0400)]
teach gen-map-doc about the new opcode header

gen-map-doc was the last element of Neomutt using the OPS* files. By
teaching it the format of opcodes.h, it's now possible to remove these
files.

7 years agomove HelpStrings to help.c
Damien Riegel [Tue, 22 Aug 2017 16:24:27 +0000 (12:24 -0400)]
move HelpStrings to help.c

HelpStrings was only defined when included in help.c (with the
`#ifdef HELP_C` guard), and it's only used there so move it to where it
belongs and make it static.

7 years agouse opcodes.h instead of keymap_defs.h
Damien Riegel [Tue, 22 Aug 2017 16:22:30 +0000 (12:22 -0400)]
use opcodes.h instead of keymap_defs.h

keymap_defs.h is a generated header and sometimes it falls out of the
sync with config.h, which leads to weird errors about opcodes being
undefined. Using a static header prevents that.

As both keymap_defs.h and keymap_alldefs.h are now gone, gen_defs is no
longer necessary and can be removed as well.

7 years agointroduce opcodes header
Damien Riegel [Tue, 22 Aug 2017 16:11:58 +0000 (12:11 -0400)]
introduce opcodes header

This brings the opcodes in the C world. This requires a bit of macro
gymnastic to keep definitions in a central place. Opcodes are defined
like this:

  #define OPS(_fmt) \
    _fmt(OP_NULL, N_("null operation") \
    ...

By passing a different formator to `OPS`, one can keep only parts of the
definition she/he is interested in. See the end of opcodes.h for example
usages.

By introducing this new header, it is no longer necessary to generate
keymap_alldefs.h, which was used only for consumption by gettext.

7 years agodefine USE_NOTMUCH when creating the documentation
Damien Riegel [Tue, 22 Aug 2017 16:33:59 +0000 (12:33 -0400)]
define USE_NOTMUCH when creating the documentation

Header makedoc_defs.h is used in functions.h and init.h to define some
symbols when generating the documentation. Other mailbox backends are
defined (IMAP, POP), but notmuch was missing.

7 years agoAccept curses.h as a valid curses header (#733)
Pietro Cerutti [Fri, 25 Aug 2017 16:00:54 +0000 (17:00 +0100)]
Accept curses.h as a valid curses header (#733)

This fixes the build on NetBSD 7.1_RC2 with curses from base (no ncurses
package).

7 years agobuild: fix slang compile
Richard Russon [Wed, 23 Aug 2017 09:17:25 +0000 (10:17 +0100)]
build: fix slang compile

7 years agotrim trailing slash from completed dirs 720/head
Richard Russon [Wed, 16 Aug 2017 12:47:57 +0000 (13:47 +0100)]
trim trailing slash from completed dirs

When saving a email, selecting a maildir directory should override the
setting of $mbox_type.

Fixes #719

7 years agotidy: use explicit NUL for strings 724/head
Richard Russon [Mon, 21 Aug 2017 12:38:20 +0000 (13:38 +0100)]
tidy: use explicit NUL for strings

Using '\0' helps to visually reinforce the types of variables.
There are no functional changes to the code.

7 years agotime_t requires time.h (#726)
Pietro Cerutti [Tue, 22 Aug 2017 14:21:12 +0000 (15:21 +0100)]
time_t requires time.h (#726)

Fixes #725

7 years agoinclude term.h from wherever we find ncurses.h (#713)
Richard Russon [Tue, 22 Aug 2017 14:16:55 +0000 (15:16 +0100)]
include term.h from wherever we find ncurses.h (#713)

* include term.h from wherever we find ncurses.h

Solaris needs term.h for tigetstr(), but term.h doesn't always live in
/usr/include

* Do not forget about plain curses.h

7 years agoOnly include libintl.h if ENABLE_NLS is defined (#718)
Pietro Cerutti [Sun, 13 Aug 2017 16:29:10 +0000 (17:29 +0100)]
Only include libintl.h if ENABLE_NLS is defined (#718)

This fixes a compilation error because of missing libintl.h on systems
without gettext.

7 years agoHandle error if REGCOMP in pager fails when resizing.
Kevin McCarthy [Sun, 6 Aug 2017 17:22:45 +0000 (10:22 -0700)]
Handle error if REGCOMP in pager fails when resizing.

Thanks to JiaZhouyang for finding this issue and supplying the original patch.

7 years agocoverity fixes
Richard Russon [Sat, 5 Aug 2017 22:27:05 +0000 (23:27 +0100)]
coverity fixes

7 years agomerge: code tidying
Richard Russon [Thu, 10 Aug 2017 13:03:22 +0000 (14:03 +0100)]
merge: code tidying

 * lib: move some date/string functions
 * url drop ciss
 * drop unused param to mutt_system
 * split out body
 * split out envelope

7 years agosplit out envelope
Richard Russon [Mon, 7 Aug 2017 13:41:46 +0000 (14:41 +0100)]
split out envelope

7 years agosplit out body
Richard Russon [Mon, 7 Aug 2017 13:23:53 +0000 (14:23 +0100)]
split out body

7 years agodrop unused param to mutt_system
Richard Russon [Tue, 8 Aug 2017 13:41:36 +0000 (14:41 +0100)]
drop unused param to mutt_system

7 years agourl drop ciss
Richard Russon [Mon, 7 Aug 2017 15:46:07 +0000 (16:46 +0100)]
url drop ciss

7 years agolib: move some date/string functions
Richard Russon [Wed, 9 Aug 2017 16:17:51 +0000 (17:17 +0100)]
lib: move some date/string functions

7 years agoSmall cleanups to configure.ac (#714)
Pietro Cerutti [Thu, 10 Aug 2017 12:51:14 +0000 (13:51 +0100)]
Small cleanups to configure.ac (#714)

* Small configure.ac cleanup

* Group AC_ARG_WITHs, document slang/curses shenanigans

* build: fix order of OPS

7 years agoFix empty In-Reply-To generation (#716)
Pietro Cerutti [Wed, 9 Aug 2017 15:48:49 +0000 (16:48 +0100)]
Fix empty In-Reply-To generation (#716)

Fixes #715

7 years ago_mutt_enter_fname: verify that flag is not zero 712/head
Jenya Sovetkin [Wed, 9 Aug 2017 11:01:19 +0000 (13:01 +0200)]
_mutt_enter_fname: verify that flag is not zero

The flag argument in the _mutt_enter_fname function might not be
zero (e.g. in the definition of the mutt_enter_vfolder function, see
protos.h:297).

Fixes #707

7 years agocolor: call use_default_colors() in a single location 702/head
Fabrice Bellet [Fri, 4 Aug 2017 19:16:53 +0000 (21:16 +0200)]
color: call use_default_colors() in a single location

we call use_default_colors() when parsing colors in rc files only, and
unconditionally when defining the color of the tree element, because the
foreground color of the tree element may be combined dynamically with
the default background color of another element, not explicitely defined
in an rc file. This patch fixes a bug visible with some versions of the
ncurses library: use_default_colors() was used too late, and generated
color leakage effects. (#689)

7 years agoUse system's md5 instead of compiling our own mutt_md5 (#711)
Pietro Cerutti [Tue, 8 Aug 2017 12:56:23 +0000 (13:56 +0100)]
Use system's md5 instead of compiling our own mutt_md5 (#711)

* Use the system's md5(sum)? utility to compute the hcache md5

Issue #710

* Simplify md5 generation and truncation

Issue #710

* Handle different md5 programs more gracefully

Issue #710

* Solaris' uname is still SunOS

Issue #710

* Consistently use OpenSSL for md5, if it's available

Issue #710

7 years agoDo not include what we don't need (#708)
Pietro Cerutti [Mon, 7 Aug 2017 12:19:10 +0000 (13:19 +0100)]
Do not include what we don't need (#708)

Fixes #706

7 years agotidy list of commands
Richard Russon [Mon, 7 Aug 2017 10:51:36 +0000 (11:51 +0100)]
tidy list of commands

* reformat the list
* strictly sort commands

7 years agomerge: Standardise the handling of Lists
Richard Russon [Mon, 7 Aug 2017 09:23:55 +0000 (10:23 +0100)]
merge: Standardise the handling of Lists

 * Datastructures #1 - PoC of standardizing a couple of fields
 * Add queue.h to EXTRA_DIST
 * Convert userhdrs to STailQ
 * Convert mix chain to STailQ
 * HCache now depends on tailq structures instead of List
 * Convert UserHeader to STailQ
 * Convert MuttrcStack to STailQ
 * Convert AutoViewList to STailQ
 * Convert Muttrc to STailQ, start to gather common algos in list.h
 * Convert AlternativeOrderList and (Attach|Inline)(Allow|Exclude) to STailQ
 * Be consistent on variable names
 * Convert HeaderOrderList and (Un)?Ignore to STailQ
 * Convert MailtoAllow, MimeLookupList and SidebarWhitelist to STailQ
 * Remove unused functions
 * Convert List to STailQ in imap code
 * Convert List to STailQ in ncrypt code
 * Convert Hooks to TAILQ
 * More idiomatic definition of HookHead
 * Convert remaining List structures to STailQ in main.c
 * Convert last List instances to STailQ, kill List definition
 * Restore naming sanity: s/STailQ/List/g
 * Fix list structure name in hcachever.sh

7 years agoFix list structure name in hcachever.sh 688/head
Pietro Cerutti [Sun, 6 Aug 2017 15:02:53 +0000 (15:02 +0000)]
Fix list structure name in hcachever.sh

Issue #374

7 years agoRestore naming sanity: s/STailQ/List/g
Pietro Cerutti [Wed, 26 Jul 2017 09:33:44 +0000 (09:33 +0000)]
Restore naming sanity: s/STailQ/List/g

Issue #374

7 years agoConvert last List instances to STailQ, kill List definition
Pietro Cerutti [Wed, 26 Jul 2017 09:05:17 +0000 (09:05 +0000)]
Convert last List instances to STailQ, kill List definition

Issue #374

7 years agoConvert remaining List structures to STailQ in main.c
Pietro Cerutti [Wed, 26 Jul 2017 07:06:01 +0000 (07:06 +0000)]
Convert remaining List structures to STailQ in main.c

Issue #374

7 years agoMore idiomatic definition of HookHead
Pietro Cerutti [Tue, 25 Jul 2017 19:58:18 +0000 (19:58 +0000)]
More idiomatic definition of HookHead

Issue #374

7 years agoConvert Hooks to TAILQ
Pietro Cerutti [Tue, 25 Jul 2017 19:52:29 +0000 (19:52 +0000)]
Convert Hooks to TAILQ

For this one I have chosen to use a doubly-linked tail queue. See how it
simplifies the delete_hooks function.

Issue #374

7 years agoConvert List to STailQ in ncrypt code
Pietro Cerutti [Tue, 25 Jul 2017 19:21:37 +0000 (19:21 +0000)]
Convert List to STailQ in ncrypt code

Issue #374

7 years agoConvert List to STailQ in imap code
Pietro Cerutti [Tue, 25 Jul 2017 18:13:55 +0000 (18:13 +0000)]
Convert List to STailQ in imap code

Issue #374

7 years agoRemove unused functions
Pietro Cerutti [Tue, 25 Jul 2017 15:53:10 +0000 (15:53 +0000)]
Remove unused functions

Issue #374

7 years agoConvert MailtoAllow, MimeLookupList and SidebarWhitelist to STailQ
Pietro Cerutti [Tue, 25 Jul 2017 14:21:01 +0000 (14:21 +0000)]
Convert MailtoAllow, MimeLookupList and SidebarWhitelist to STailQ

Issue #374

7 years agoConvert HeaderOrderList and (Un)?Ignore to STailQ
Pietro Cerutti [Tue, 25 Jul 2017 14:05:33 +0000 (14:05 +0000)]
Convert HeaderOrderList and (Un)?Ignore to STailQ

Issue #374

7 years agoBe consistent on variable names
Pietro Cerutti [Tue, 25 Jul 2017 13:36:52 +0000 (13:36 +0000)]
Be consistent on variable names

Issue #374

7 years agoConvert AlternativeOrderList and (Attach|Inline)(Allow|Exclude) to STailQ
Pietro Cerutti [Tue, 25 Jul 2017 13:33:34 +0000 (13:33 +0000)]
Convert AlternativeOrderList and (Attach|Inline)(Allow|Exclude) to STailQ

Issue #374

7 years agoConvert Muttrc to STailQ, start to gather common algos in list.h
Pietro Cerutti [Tue, 25 Jul 2017 12:51:37 +0000 (12:51 +0000)]
Convert Muttrc to STailQ, start to gather common algos in list.h

Issue #374

7 years agoConvert AutoViewList to STailQ
Pietro Cerutti [Mon, 24 Jul 2017 16:07:37 +0000 (16:07 +0000)]
Convert AutoViewList to STailQ

Issue #374

7 years agoConvert MuttrcStack to STailQ
Pietro Cerutti [Mon, 24 Jul 2017 14:49:06 +0000 (14:49 +0000)]
Convert MuttrcStack to STailQ

Issue #374

7 years agoConvert UserHeader to STailQ
Pietro Cerutti [Mon, 24 Jul 2017 13:54:21 +0000 (13:54 +0000)]
Convert UserHeader to STailQ

Issue #374

7 years agoHCache now depends on tailq structures instead of List
Pietro Cerutti [Mon, 24 Jul 2017 13:32:51 +0000 (13:32 +0000)]
HCache now depends on tailq structures instead of List

Issue #374

7 years agoConvert mix chain to STailQ
Pietro Cerutti [Mon, 24 Jul 2017 13:03:36 +0000 (13:03 +0000)]
Convert mix chain to STailQ

Issue #374

7 years agoConvert userhdrs to STailQ
Pietro Cerutti [Mon, 24 Jul 2017 12:08:15 +0000 (12:08 +0000)]
Convert userhdrs to STailQ

Issue #374

7 years agoAdd queue.h to EXTRA_DIST
Pietro Cerutti [Fri, 21 Jul 2017 16:11:06 +0000 (16:11 +0000)]
Add queue.h to EXTRA_DIST

Issue #374

7 years agoDatastructures #1 - PoC of standardizing a couple of fields
Pietro Cerutti [Fri, 21 Jul 2017 15:05:25 +0000 (15:05 +0000)]
Datastructures #1 - PoC of standardizing a couple of fields

This commits changes the type of two fields in envelope.h from struct List to
to struct STailQHead. This new structure represents a singly-linked tail queue
implemented using FreeBSD's queue.h (imported).

This is a proof of concept to see how we like using macros to implement basic
datastructures (singly and doubly linked lists and tail queues) and algorithms
(traversal, removal, insertion, ...).

I encourage everybody to have a look at the result and comment. Is this the
direction we would like to take?

Issue #374

7 years agoresync translations
Richard Russon [Sat, 5 Aug 2017 13:54:19 +0000 (14:54 +0100)]
resync translations

7 years agoupdate French translation
Richard Russon [Mon, 31 Jul 2017 15:48:33 +0000 (16:48 +0100)]
update French translation

7 years agorefactor: move lock/unlink functions to lib/file
Richard Russon [Fri, 4 Aug 2017 02:28:36 +0000 (03:28 +0100)]
refactor: move lock/unlink functions to lib/file

7 years agorefactor: move atime/mtime functions to lib/file
Richard Russon [Fri, 4 Aug 2017 02:23:15 +0000 (03:23 +0100)]
refactor: move atime/mtime functions to lib/file

7 years agorefactor: move mutt_make_date to lib/date
Richard Russon [Fri, 4 Aug 2017 02:14:41 +0000 (03:14 +0100)]
refactor: move mutt_make_date to lib/date

7 years agobuild: move mutt_md5 to hcache
Richard Russon [Wed, 2 Aug 2017 18:19:38 +0000 (19:19 +0100)]
build: move mutt_md5 to hcache

This tool is only used by the build to create a header cache checksum.

7 years agoRemove ascii_* functions (#700)
Pietro Cerutti [Fri, 4 Aug 2017 14:54:44 +0000 (15:54 +0100)]
Remove ascii_* functions (#700)

Issue #699

7 years agobuild: squash lua warnings
Richard Russon [Fri, 4 Aug 2017 13:02:03 +0000 (14:02 +0100)]
build: squash lua warnings

7 years agobuild: fix warnings in wchar test code
Richard Russon [Fri, 4 Aug 2017 12:37:33 +0000 (13:37 +0100)]
build: fix warnings in wchar test code

These warnings can be safely ignored, but if you enable "-Werror", then
configure fails.

7 years agoFix truncated formating 685/head
Fabrice Bellet [Sun, 23 Jul 2017 19:04:15 +0000 (21:04 +0200)]
Fix truncated formating

This patch fixes the leak of index line attributes on the next line due
to the truncation of the output buffer based on terminal number of
columns, forgetting to include escapes sequence at the end of the input
buffer (#664).

7 years agoUse the correct TokyoCabinet API
Pietro Cerutti [Fri, 4 Aug 2017 11:39:56 +0000 (11:39 +0000)]
Use the correct TokyoCabinet API

Issue: #696

7 years agoEncode URIs created with nm_uri_from_query 692/head
William Pettersson [Sun, 30 Jul 2017 04:59:38 +0000 (14:59 +1000)]
Encode URIs created with nm_uri_from_query

Uses url_pct_encode to do the encoding. Note that url_pct_encode now
also encodes the ampersand, which shouldn't cause problems given that
it's only used for usernames and passwords otherwise.

Addresses issue #603

7 years agonm_description_to_path: fix a mailbox type 695/head
Jenya Sovetkin [Thu, 3 Aug 2017 08:17:30 +0000 (10:17 +0200)]
nm_description_to_path: fix a mailbox type

In nm_description_to_path a mailbox type is supposed to be MUTT_NOTMUCH,
since the function queries the path of a *notmuch* mailbox using
a description string.

Fixes #683.

7 years agoKill bundled wchar_t support, rely on the system's
Pietro Cerutti [Fri, 28 Jul 2017 13:43:52 +0000 (13:43 +0000)]
Kill bundled wchar_t support, rely on the system's

Issue #690

7 years agoDo not rely on backends setting error codes on success
Pietro Cerutti [Fri, 4 Aug 2017 07:36:06 +0000 (07:36 +0000)]
Do not rely on backends setting error codes on success

From the API documentation of KyotoCabinet, TokyoCabinet and QDBM, I am
not convinced that the error code routines consistently return 0 whenever
the previous operation succeeded. Also, I am not convinced that they
return 1 whenever the previous operation failed.
It is important that we do not return 0 on failure, so let's try to get
the error code and fallback to -1 if we couldn't get anything more
specific.

Issue #696

7 years agoReview hcache implementation return codes
Pietro Cerutti [Fri, 4 Aug 2017 06:40:41 +0000 (06:40 +0000)]
Review hcache implementation return codes

Especially, in this batch I have reviewed the return codes for fetch and
delete operations. KyotoCabinet, QDBM and TokyoCabinet were indeed
incorrectly implemented, as these backends generally return true on
success and false on failure.

I still have to investigate how to get a proper return code from QDBM.

Issue #696

7 years agoDoxify the Header cache
Pietro Cerutti [Fri, 4 Aug 2017 06:14:03 +0000 (06:14 +0000)]
Doxify the Header cache

The initial framework was written by @flatcap. I have merely filled in a
few blanks.

Issue #696

7 years agobuild: fix make dist
Richard Russon [Thu, 3 Aug 2017 20:00:45 +0000 (21:00 +0100)]
build: fix make dist

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Thu, 3 Aug 2017 15:56:36 +0000 (16:56 +0100)]
merge: upstream fixes (mutt/default)

 * Fix menu color calls to occur before positioning the cursor. (see #3956)
 * Change imap_cmd_start() to return OK when the cmd_queue is finished. (closes #3956)
 * When guessing an attachment type, don't allow text/plain if there is a null character. (see #2933)
 * Add timeout parameter to mutt_socket_poll.
 * Add $imap_poll_timeout to allow mailbox polling to time out.
 * Convert raw_socket_poll() to use gettimeofday().

7 years agoConvert raw_socket_poll() to use gettimeofday().
Kevin McCarthy [Fri, 28 Jul 2017 17:54:51 +0000 (10:54 -0700)]
Convert raw_socket_poll() to use gettimeofday().

As long as gettimeofday() is supported, it's better to be consistent
within mutt and ensure greater portability.

Change the raw_socket_poll() wait timer to count milliseconds, like
the mutt_progess_update() code.

Thanks to Vincent Lefèvre for his, as always, invaluable advice.

7 years agoAdd $imap_poll_timeout to allow mailbox polling to time out.
Kevin McCarthy [Sun, 23 Jul 2017 02:48:50 +0000 (19:48 -0700)]
Add $imap_poll_timeout to allow mailbox polling to time out.

Enable the polling flag for the NOOP in imap_check_mailbox(), the
STATUS command in imap_buffy_check(), and the LOGOUT command.

This is not intended to handle all blocking-IO related issues.
However, the periodic NOOP and STATUS are the most frequent places for
mutt to freeze up, especially after a laptop is sleep/woken.

Since these are quick operations with little data, this is a good place
to check if the connection is still working before hanging on a read.

7 years agoAdd timeout parameter to mutt_socket_poll.
Kevin McCarthy [Sun, 23 Jul 2017 02:48:49 +0000 (19:48 -0700)]
Add timeout parameter to mutt_socket_poll.

This will be used in the next commit to add a timeout when polling for
new mail.

7 years agoWhen guessing an attachment type, don't allow text/plain if there is a null character...
Kevin McCarthy [Fri, 21 Jul 2017 00:30:05 +0000 (17:30 -0700)]
When guessing an attachment type, don't allow text/plain if there is a null character. (see #2933)

Type text/plain should not contain any null characters.  Slightly
improve the type guesser by forcing an attachment with any null
characters to be application/octet-stream.

Note the type guesser could use much more improvement, but this is an
easy and obvious fix.