]> granicus.if.org Git - neomutt/log
neomutt
5 years agomerge: upstream fixes
Richard Russon [Sun, 16 Jun 2019 00:32:52 +0000 (01:32 +0100)]
merge: upstream fixes

 * Improve imap_append_message() error message handling
 * Mention sources for ~p and ~P patterns
 * Allow imap_cmd_finish() to both expunge and fetch new mail
 * Improve $reverse_realname documentation
 * Add $fcc_before_send, defaulting unset

5 years agoAdd $fcc_before_send, defaulting unset
Kevin McCarthy [Tue, 11 Jun 2019 20:15:22 +0000 (13:15 -0700)]
Add $fcc_before_send, defaulting unset

When set, the message will be Fcc'ed the same as sent.  $fcc_clear and
$fcc_attach will be ignored.  This is because of the difficulty of
unwinding changes, notably Protected Headers, without potentially
breaking signatures.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoImprove $reverse_realname documentation
Kevin McCarthy [Fri, 14 Jun 2019 00:56:38 +0000 (17:56 -0700)]
Improve $reverse_realname documentation

Make it clear that, even if set, a missing realname part of the
matching address will be filled in by $realname.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAllow imap_cmd_finish() to both expunge and fetch new mail
Kevin McCarthy [Mon, 10 Jun 2019 21:51:50 +0000 (14:51 -0700)]
Allow imap_cmd_finish() to both expunge and fetch new mail

Since commit dd327606 changed check_status setting to use bit
operators, and imap_check_mailbox() can call imap_cmd_finish() twice,
there is no reason to delay the processing of new mail until a second
call.

imap_read_headers() deals with msn_end < msg_begin, so remove
the (count > idata->max_msn) check.  This will allow the reopen flag
to be reset if somehow it's not the case.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoMention sources for ~p and ~P patterns
Kevin McCarthy [Sun, 9 Jun 2019 18:07:16 +0000 (11:07 -0700)]
Mention sources for ~p and ~P patterns

The manual only mentioned alternates.  Add $from and local
account/hostname to the list.

The man page implied the only source was alternates.  Change to the
same wording as the manual.

Thanks to @rear1019 for pointing out the misleading man page.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoImprove imap_append_message() error message handling
Kevin McCarthy [Fri, 7 Jun 2019 20:43:36 +0000 (13:43 -0700)]
Improve imap_append_message() error message handling

If the rc is IMAP_CMD_BAD, then either idata->buf is stale or an error
message has already been printed (in cmd_handle_untagged()).

Use imap_next_word() to skip over the next two words instead of
directly skipping over SEQLEN, in case the buffer is in a different
format.  We don't want to jump over the end of string.

Skip the mutt_error() if there is nothing to print.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agotest: fixes for recent updates
Richard Russon [Sat, 15 Jun 2019 21:40:27 +0000 (22:40 +0100)]
test: fixes for recent updates

5 years agomerge: trivial fixes
Richard Russon [Sat, 15 Jun 2019 20:44:54 +0000 (21:44 +0100)]
merge: trivial fixes

 * initialise all struct members
 * boolify Pattern.ready
 * docs: fix typo
 * fix #includes
 * unify GroupList variable naming
 * doxy: tidy compare_uid
 * move mutt_str_split() to list.c
 * reorder params for mutt_str_substr_copy()
 * rename el_free()

5 years agorename el_free()
Richard Russon [Sat, 15 Jun 2019 20:24:38 +0000 (21:24 +0100)]
rename el_free()

Rename to mutt_emaillist_free() to match other functions.

5 years agoreorder params for mutt_str_substr_copy()
Richard Russon [Sat, 15 Jun 2019 20:19:01 +0000 (21:19 +0100)]
reorder params for mutt_str_substr_copy()

- rename substr_cpy() to substr_copy()
- reorder params to put dest and destlen together

5 years agomove mutt_str_split() to list.c
Richard Russon [Sat, 15 Jun 2019 20:09:12 +0000 (21:09 +0100)]
move mutt_str_split() to list.c

Remove List dependency from string.c

5 years agodoxy: tidy compare_uid
Richard Russon [Sat, 15 Jun 2019 19:54:00 +0000 (20:54 +0100)]
doxy: tidy compare_uid

5 years agounify GroupList variable naming
Richard Russon [Sat, 15 Jun 2019 19:48:33 +0000 (20:48 +0100)]
unify GroupList variable naming

5 years agofix #includes
Richard Russon [Thu, 13 Jun 2019 13:24:59 +0000 (14:24 +0100)]
fix #includes

5 years agodocs: fix typo
Richard Russon [Thu, 13 Jun 2019 12:11:53 +0000 (13:11 +0100)]
docs: fix typo

5 years agoboolify Pattern.ready
Richard Russon [Thu, 13 Jun 2019 10:22:33 +0000 (11:22 +0100)]
boolify Pattern.ready

5 years agoinitialise all struct members
Richard Russon [Thu, 13 Jun 2019 10:19:33 +0000 (11:19 +0100)]
initialise all struct members

5 years agodrop mutt_dump_variables()
Richard Russon [Sat, 15 Jun 2019 14:28:44 +0000 (15:28 +0100)]
drop mutt_dump_variables()

This function has been replaced by dump_config().

5 years agobuild: fix doc auto-generation
Richard Russon [Fri, 14 Jun 2019 11:59:58 +0000 (12:59 +0100)]
build: fix doc auto-generation

5 years agobuild: update to latest autosetup
Pietro Cerutti [Thu, 13 Jun 2019 12:41:53 +0000 (12:41 +0000)]
build: update to latest autosetup

This version includes the location of the Tcl interpreter used at
configure time in config.log.

5 years agomerge: overhaul of the config system
Richard Russon [Wed, 12 Jun 2019 23:43:08 +0000 (00:43 +0100)]
merge: overhaul of the config system

 * config: allow deeper inheritance
 * tests: minor fixes
 * tidy type definitions
 * move private flags
 * move sensitive flag to type
 * tidy init.h config definitions
 * move redraw flags
 * rename the flags field to data (and move it)
 * drop dt_path
 * drop dt_command
 * drop mutt dump
 * add enum type
 * add slist type
 * mbox_type -> enum
 * drop magic type
 * hidden_tags -> slist
 * mailcap_path -> slist
 * imap_authenticators -> slist
 * smtp_authenticators -> slist
 * pop_authenticators -> slist
 * preferred_languages -> slist
 * fix makedoc

5 years agofix makedoc
Richard Russon [Wed, 12 Jun 2019 00:11:44 +0000 (01:11 +0100)]
fix makedoc

Fix the `makedoc` documentation generator to understand the new types.

5 years agopreferred_languages -> slist
Richard Russon [Mon, 10 Jun 2019 21:48:25 +0000 (22:48 +0100)]
preferred_languages -> slist

Convert `$preferred_languages` to use the new DT_SLIST type (string list).

5 years agopop_authenticators -> slist
Richard Russon [Mon, 10 Jun 2019 20:14:34 +0000 (21:14 +0100)]
pop_authenticators -> slist

Convert `$pop_authenticators` to use the new DT_SLIST type (string list).

5 years agosmtp_authenticators -> slist
Richard Russon [Mon, 10 Jun 2019 19:41:48 +0000 (20:41 +0100)]
smtp_authenticators -> slist

Convert `$smtp_authenticators` to use the new DT_SLIST type (string list).

5 years agoimap_authenticators -> slist
Richard Russon [Mon, 10 Jun 2019 18:51:17 +0000 (19:51 +0100)]
imap_authenticators -> slist

Convert `$imap_authenticators` to use the new DT_SLIST type (string list).

5 years agomailcap_path -> slist
Richard Russon [Mon, 10 Jun 2019 13:44:18 +0000 (14:44 +0100)]
mailcap_path -> slist

Convert `$mailcap_path` to use the new DT_SLIST type (string list).

5 years agohidden_tags -> slist
Richard Russon [Mon, 10 Jun 2019 12:26:47 +0000 (13:26 +0100)]
hidden_tags -> slist

Convert `$hidden_tags` to use the new DT_SLIST type (string list).

5 years agodrop magic type
Richard Russon [Sun, 9 Jun 2019 15:56:10 +0000 (16:56 +0100)]
drop magic type

The DT_MAGIC type is unnecessary; it's an enumeration of four strings.
That's better handled by the new DT_ENUM type.

5 years agombox_type -> enum
Richard Russon [Sun, 9 Jun 2019 15:50:33 +0000 (16:50 +0100)]
mbox_type -> enum

Convert `$mbox_type` to use the new Config enumeration.

5 years agoadd slist type
Richard Russon [Sun, 9 Jun 2019 15:23:55 +0000 (16:23 +0100)]
add slist type

Add a string list type.  This manages strings delimited by space, comma
or colon.  The NeoMutt code doesn't need to parse the string any more,
it's simply presented with a STAILQ (list) of strings.

5 years agoadd enum type
Richard Russon [Sun, 9 Jun 2019 14:49:03 +0000 (15:49 +0100)]
add enum type

Create a new config type for enumerations.
This will use the `ConfigDef.data` field and an `EnumDef` to define the
allowed strings.

5 years agodrop mutt dump
Richard Russon [Sun, 9 Jun 2019 11:33:28 +0000 (12:33 +0100)]
drop mutt dump

Drop the legacy config dump code.
It's less versatile than the new code.

5 years agodrop dt_command
Richard Russon [Sun, 9 Jun 2019 10:26:23 +0000 (11:26 +0100)]
drop dt_command

The DT_COMMAND type is unnecessary; it behaves exactly the same as DT_STRING.
Only the NeoMutt code needs to make the distinction, so use a subclass
of DT_STRING instead of a separate type.

5 years agodrop dt_path
Richard Russon [Sun, 9 Jun 2019 10:21:53 +0000 (11:21 +0100)]
drop dt_path

The DT_PATH type is unnecessary; it behaves exactly the same as DT_STRING.
Only the NeoMutt code needs to make the distinction, so use a subclass
of DT_STRING instead of a separate type.

5 years agorename the flags field to data (and move it)
Richard Russon [Sun, 9 Jun 2019 02:25:28 +0000 (03:25 +0100)]
rename the flags field to data (and move it)

Deprecate the flags field of ConfigDef and create a data field.
The data field is inserted near the end of the struct as it won't be
used often.

5 years agomove redraw flags
Richard Russon [Sun, 9 Jun 2019 01:07:00 +0000 (02:07 +0100)]
move redraw flags

Move the redraw flags from a general flags field to the type field.
These GUI flags don't belong in the config definition, but once the
notification system is complete, the flags will be obsolete.

The `ConfigDef.flags` field is now unused.

5 years agotidy init.h config definitions
Richard Russon [Sun, 9 Jun 2019 00:12:28 +0000 (01:12 +0100)]
tidy init.h config definitions

Remove all the excess whitespace.
The fields may once have been aligned, but was long ago.

5 years agomove sensitive flag to type
Richard Russon [Sat, 8 Jun 2019 22:16:51 +0000 (23:16 +0100)]
move sensitive flag to type

Rename F_SENSITIVE to DT_SENSITIVE.
Move it from a general flags field, to the type field (with the other
type modifying flags).

5 years agomove private flags
Richard Russon [Sat, 8 Jun 2019 22:16:25 +0000 (23:16 +0100)]
move private flags

Move the private config flags to the 'top' of the variable.

5 years agotidy type definitions
Richard Russon [Sat, 8 Jun 2019 21:33:18 +0000 (22:33 +0100)]
tidy type definitions

Unify the flag definitions using the (1 << n) form.

5 years agotests: minor fixes
Richard Russon [Tue, 11 Jun 2019 12:13:13 +0000 (13:13 +0100)]
tests: minor fixes

Fix:
- Misleading output
- printf specifiers
- Missing test cases

5 years agoconfig: allow deeper inheritance
Richard Russon [Wed, 12 Jun 2019 19:00:29 +0000 (20:00 +0100)]
config: allow deeper inheritance

The code assumed that an inherited HashElem had a normal HashElem
parent.  This change removes the assumption, allowing deep nesting of
Config Items.

5 years agomerge: trivial fixes
Richard Russon [Fri, 7 Jun 2019 11:20:03 +0000 (12:20 +0100)]
merge: trivial fixes

 * fix folder use in mx_path_canon()
 * doxy: fix typos
 * rename local variable for clarity
 * test: tidy code
 * refactor #ifdef'd conditional
 * check includes with iwyu

5 years agocheck includes with iwyu
Richard Russon [Thu, 6 Jun 2019 19:38:01 +0000 (20:38 +0100)]
check includes with iwyu

5 years agorefactor #ifdef'd conditional
Richard Russon [Thu, 6 Jun 2019 23:37:11 +0000 (00:37 +0100)]
refactor #ifdef'd conditional

5 years agotest: tidy code
Richard Russon [Thu, 6 Jun 2019 23:22:12 +0000 (00:22 +0100)]
test: tidy code

- clang-format
- remove notes

5 years agorename local variable for clarity
Richard Russon [Thu, 6 Jun 2019 12:36:57 +0000 (13:36 +0100)]
rename local variable for clarity

5 years agodoxy: fix typos
Richard Russon [Tue, 4 Jun 2019 13:42:40 +0000 (14:42 +0100)]
doxy: fix typos

5 years agofix folder use in mx_path_canon()
Richard Russon [Thu, 6 Jun 2019 13:25:55 +0000 (14:25 +0100)]
fix folder use in mx_path_canon()

Use the parameter Context, not the global.

5 years agomerge: upstream fixes
Richard Russon [Fri, 7 Jun 2019 00:21:45 +0000 (01:21 +0100)]
merge: upstream fixes

 * Turn on $ssl_force_tls by default
 * Change mutt_addr_is_user() to no for a NULL address
 * Minor documentation correction
 * Fix dropped new mail notifications when an EXPUNGE_PENDING is set
 * Improve robustness of imap_append_message()
 * Enable the idata->check_status using bit operations

5 years agoEnable the idata->check_status using bit operations
Kevin McCarthy [Thu, 6 Jun 2019 23:03:42 +0000 (16:03 -0700)]
Enable the idata->check_status using bit operations

Commit e3f66d7e fixed dropped new mail notications, removing the
unsetting of idata->reopen IMAP_NEWMAIL_PENDING in imap_cmd_finish()
when an EXPUNGE was processed.

However, imap_cmd_finish() can be called twice by
imap_check_mailbox().  First as part of the imap_exec(), and manually
again just below.

Now that the IMAP_NEWMAIL_PENDING still exists, a second call could
overwrite idata->check_status if both reopen flags were set.

This unfortunately affects update_index(), which behaves differently
for MUTT_REOPENED.

I need to change the return value of mx_check_mailbox() in master to
preserve all the bits, so the index can both notify of new mail and
update_index() properly.

For stable, the best fix is to use bit operators to enable the
check_status flags in imap_cmd_finish() (and cmd_parse_fetch for
flags), and keep the imap_check_mailbox() priority of setting its
return value (it prioritizes IMAP_EXCHANGE_PENDING).

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoImprove robustness of imap_append_message()
Kevin McCarthy [Thu, 6 Jun 2019 20:38:03 +0000 (13:38 -0700)]
Improve robustness of imap_append_message()

First, check the imap_cmd_step() return value instead of looking at
idata->buf for "OK".  If the connection bombed and imap_cmd_step()
returned IMAP_CMD_BAD, the value of idata->buf is stale.

If the server returned "+ OK" for the command continuation request
response, the call to imap_code(idata->buf) would even end up
returning true, despite that the append failed!  (See #110, although
at the time of commit I can only hypothesize this is what is
happening.)

Second, check the status of the writes.  flush_buffer() was not
passing the rc from mutt_socket_write_n(), which was further making
the above disaster scenerio possible.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix dropped new mail notifications when an EXPUNGE_PENDING is set
Kevin McCarthy [Wed, 5 Jun 2019 21:04:55 +0000 (14:04 -0700)]
Fix dropped new mail notifications when an EXPUNGE_PENDING is set

Prior to the fetch_headers rework and introduction of
idata->max_msn (starting around e0376c75), cmd_handle_untagged() was
looking directly at ctx->msgcount, which isn't fixed up until
imap_expunge_mailbox().  At that time, more care had to be taken
inbetween handling the EXPUNGE message and the actual expunge of the
mailbox because of the discrepency between server state and mailbox
context state.

idata->max_msn is now decremented during the processing of EXPUNGE and
VANISHED notices from the server, so reflect "current" state.  So,
when we receive an EXISTS notice, we no longer need the checks for
expunge state and can always set the NEWMAIL_PENDING flag.

Additionally, fix imap_cmd_finish() to retain the IMAP_NEWMAIL_PENDING
flag after handling an expunge.  The expunge does not grab new
messages so dropping the flag would cause mutt to forget the new mail
status until another EXISTS command.

Since this is a stable branch fix, I'm leaving the either/or
processing of expunge versus new mail in imap_cmd_finish().  However,
I don't see why this has to be done in two calls.  I may rework that
in master to process an expunge and then the new mail one after the
other.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoMinor documentation correction
Kevin McCarthy [Thu, 30 May 2019 16:27:15 +0000 (09:27 -0700)]
Minor documentation correction

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange mutt_addr_is_user() to no for a NULL address
Kevin McCarthy [Sun, 26 May 2019 23:03:40 +0000 (16:03 -0700)]
Change mutt_addr_is_user() to no for a NULL address

The behavior is generating a false 'F' flag for a spam message with an
unparsable From address.

After reviewing the callers, I can't see a reason returning 'yes' in
this case.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoTurn on $ssl_force_tls by default
Kevin McCarthy [Sun, 26 May 2019 21:34:42 +0000 (14:34 -0700)]
Turn on $ssl_force_tls by default

Ticket #135 suggests that these days, it's better to force encryption
over all connections.  RFC8314 is recommending MUA's move in that
direction (actually even directing towards implicit TLS over
STARTTLS).

I'm enabling this at the beginning of the 1.13 development cycle to
give others time to chime in with any objections.  Personally, I've
had this option set myself for years.  The only place it could become
an issue is for a localhost IMAP server with no cert.  In that case,
it's easy enough to have an account hook unset if needed, and I think
a better idea that the user be forced to turn it off.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoSave attachments without prompting.
David Harrigan [Thu, 6 Jun 2019 12:09:25 +0000 (13:09 +0100)]
Save attachments without prompting.

If the 'attach_save_without_prompting' variable is set (to true), then on
saving a list of tagged attachments the user will not be prompted each time
for the name of file.

Conflicting filenames during save are also handled.

-=david=-

closes #1603

5 years agoUpdate to latest autosetup, use @include feature
Pietro Cerutti [Wed, 5 Jun 2019 08:45:19 +0000 (08:45 +0000)]
Update to latest autosetup, use @include feature

Up-to-date with Autosetup 4701f3e (2019-06-05)

5 years agoFix segfault on bounce
Pietro Cerutti [Thu, 6 Jun 2019 09:06:56 +0000 (09:06 +0000)]
Fix segfault on bounce

Fixes #1735

5 years agoadd missing translation file
Richard Russon [Wed, 5 Jun 2019 10:55:41 +0000 (11:55 +0100)]
add missing translation file

5 years agoshow backtrace on segfault 1731/head
Richard Russon [Mon, 3 Jun 2019 12:00:17 +0000 (13:00 +0100)]
show backtrace on segfault

Add a configure option `--backtrace` that uses libunwind to print a
basic backtrace if NeoMutt segfaults.

Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
5 years agoadd funding details
Richard Russon [Mon, 3 Jun 2019 14:03:05 +0000 (15:03 +0100)]
add funding details

5 years agomerge Config and normal Accounts
Richard Russon [Sun, 2 Jun 2019 23:32:30 +0000 (00:32 +0100)]
merge Config and normal Accounts

5 years agomerge: add basic notifications
Richard Russon [Mon, 3 Jun 2019 10:59:24 +0000 (11:59 +0100)]
merge: add basic notifications

 * debug: add notify level
 * add central NeoMutt object
 * add notify/observer
 * config notify
 * test: fix config tests

5 years agotest: fix config tests 1726/head
Richard Russon [Tue, 28 May 2019 14:20:44 +0000 (15:20 +0100)]
test: fix config tests

5 years agoconfig notify
Richard Russon [Tue, 21 May 2019 09:31:22 +0000 (10:31 +0100)]
config notify

5 years agoadd notify/observer
Richard Russon [Tue, 21 May 2019 12:52:03 +0000 (13:52 +0100)]
add notify/observer

5 years agoadd central NeoMutt object
Richard Russon [Mon, 20 May 2019 11:42:20 +0000 (12:42 +0100)]
add central NeoMutt object

5 years agodebug: add notify level
Richard Russon [Mon, 20 May 2019 14:29:24 +0000 (14:29 +0000)]
debug: add notify level

5 years agomerge: mime: use description if filename is missing
Richard Russon [Mon, 3 Jun 2019 09:01:25 +0000 (10:01 +0100)]
merge: mime: use description if filename is missing

 * mime_lookup: use description if filename isn't useful
 * mime_lookup: use compose mailcap entries when replying

5 years agomime_lookup: use compose mailcap entries when replying 1729/head
Andres Freund [Mon, 29 Aug 2016 18:16:38 +0000 (11:16 -0700)]
mime_lookup: use compose mailcap entries when replying

Use compose mailcap entries to format attachments when replying to a message

5 years agomime_lookup: use description if filename isn't useful
Andres Freund [Thu, 22 Nov 2012 23:12:18 +0000 (00:12 +0100)]
mime_lookup: use description if filename isn't useful

"fix" mime_lookup to also look into Description mime tags if the
filename tag doesn't come up with something useful

5 years agotest: fix config_dump
Richard Russon [Sun, 2 Jun 2019 00:04:14 +0000 (01:04 +0100)]
test: fix config_dump

5 years agomerge: small fixes and tidying
Richard Russon [Sat, 1 Jun 2019 23:48:01 +0000 (00:48 +0100)]
merge: small fixes and tidying

 * clang-format
 * use enum return value
 * test: fix lcov out-of-tree build
 * test: boolify test_mutt_pattern_comp()
 * refactor: replace ctime() with strftime()
 * bug: prevent unterminated string
 * check range of uuencoded char
 * log failed atoi() calls
 * fix buffer handling
 * restore randomness to mutt_buffer_mktemp_full()
 * check state buffer
 * check for overflow in mutt_edit_content_type()
 * reduce scope of variables
 * add/remove checks
 * use param, not global, in prereq()
 * add brackets to clarify logic
 * misc small changes

5 years agomisc small changes
Richard Russon [Sat, 1 Jun 2019 20:05:33 +0000 (21:05 +0100)]
misc small changes

- Initialise some variables
- Fix some formatting strings
- Remove unused variables

5 years agoadd brackets to clarify logic
Richard Russon [Sat, 1 Jun 2019 19:48:29 +0000 (20:48 +0100)]
add brackets to clarify logic

5 years agouse param, not global, in prereq()
Richard Russon [Sat, 1 Jun 2019 19:46:32 +0000 (20:46 +0100)]
use param, not global, in prereq()

The test function prereq() wasn't using the Context parameter, but the
Context global.

5 years agoadd/remove checks
Richard Russon [Sat, 1 Jun 2019 19:44:22 +0000 (20:44 +0100)]
add/remove checks

Some functions needed checks.
Some others had redundant checks.

5 years agoreduce scope of variables
Richard Russon [Sat, 1 Jun 2019 17:17:30 +0000 (18:17 +0100)]
reduce scope of variables

5 years agocheck for overflow in mutt_edit_content_type()
Richard Russon [Sat, 2 Mar 2019 14:27:15 +0000 (14:27 +0000)]
check for overflow in mutt_edit_content_type()

Thanks to lgtm.com

5 years agocheck state buffer
Richard Russon [Sat, 1 Jun 2019 11:28:24 +0000 (12:28 +0100)]
check state buffer

Coverity: CID 186614

5 years agorestore randomness to mutt_buffer_mktemp_full()
Richard Russon [Sat, 1 Jun 2019 11:25:34 +0000 (12:25 +0100)]
restore randomness to mutt_buffer_mktemp_full()

Coverity: CID 189775

5 years agofix buffer handling
Richard Russon [Sat, 1 Jun 2019 11:06:02 +0000 (12:06 +0100)]
fix buffer handling

Coverity: CID 197580, 198376, 198378, 198379

5 years agolog failed atoi() calls
Richard Russon [Sat, 1 Jun 2019 11:00:33 +0000 (12:00 +0100)]
log failed atoi() calls

Coverity: CID 198492, 198493

5 years agocheck range of uuencoded char
Richard Russon [Sat, 1 Jun 2019 10:50:18 +0000 (11:50 +0100)]
check range of uuencoded char

Coverity: CID 180829

5 years agobug: prevent unterminated string
Richard Russon [Sat, 1 Jun 2019 10:43:35 +0000 (11:43 +0100)]
bug: prevent unterminated string

Coverity: CID 83483

5 years agorefactor: replace ctime() with strftime()
Richard Russon [Fri, 31 May 2019 22:39:54 +0000 (23:39 +0100)]
refactor: replace ctime() with strftime()

ctime() is marked obsolete in POSIX:2008.
It's recommended to use strftime() instead.

Thanks to lgtm.com

5 years agotest: boolify test_mutt_pattern_comp()
Richard Russon [Fri, 31 May 2019 21:38:09 +0000 (22:38 +0100)]
test: boolify test_mutt_pattern_comp()

5 years agotest: fix lcov out-of-tree build
Richard Russon [Thu, 30 May 2019 22:40:48 +0000 (23:40 +0100)]
test: fix lcov out-of-tree build

5 years agouse enum return value
Richard Russon [Thu, 30 May 2019 20:24:48 +0000 (21:24 +0100)]
use enum return value

- mutt_check_mime_type()
- mutt_lookup_mime_type()

5 years agoclang-format
Richard Russon [Sat, 1 Jun 2019 20:19:14 +0000 (21:19 +0100)]
clang-format

5 years agotravis: workaround locale problems
Richard Russon [Thu, 30 May 2019 10:30:47 +0000 (11:30 +0100)]
travis: workaround locale problems

5 years agomerge: improve date tests
Richard Russon [Thu, 30 May 2019 10:08:56 +0000 (11:08 +0100)]
merge: improve date tests

 * date: move defines, so they can be used for testing
 * test: improve test_mutt_date_add_timeout()
 * test: improve test_mutt_date_check_month()
 * test: improve test_mutt_date_gmtime()
 * test: improve test_mutt_date_is_day_name()
 * test: improve test_mutt_date_local_tz()
 * test: improve test_mutt_date_localtime()
 * test: improve test_mutt_date_localtime_format()
 * test: improve test_mutt_date_make_date()
 * test: improve test_mutt_date_make_imap()
 * test: improve test_mutt_date_make_time()
 * test: improve test_mutt_date_make_tls()
 * test: improve test_mutt_date_normalize_time()
 * test: improve test_mutt_date_parse_date()
 * test: improve test_mutt_date_parse_imap()

5 years agotest: improve test_mutt_date_parse_imap()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_parse_imap()

5 years agotest: improve test_mutt_date_parse_date()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_parse_date()

5 years agotest: improve test_mutt_date_normalize_time()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_normalize_time()

5 years agotest: improve test_mutt_date_make_tls()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_make_tls()

5 years agotest: improve test_mutt_date_make_time()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_make_time()

5 years agotest: improve test_mutt_date_make_imap()
Richard Russon [Thu, 30 May 2019 09:34:25 +0000 (10:34 +0100)]
test: improve test_mutt_date_make_imap()