~kevin8t8/mutt

Add a mutt_error() when copy/save messages fails.

Avoid using "part" translations for the tag/untagged copy/save
combinations, even though that makes the code longer.
Refresh index if a tagged save aborts in the middle.

Make the sure the index message flags and status line are properly
redrawn in that case.
Merge branch 'stable'
Fix pager dropped input on SigWinch flag handling.

The code to process the SigWinch flag ocurred after, and would drop an
input character when the flag was set outside of, km_dokey().  This
could happen, for instance, when a pipe operation was invoked.

Thanks to Vincent Lefèvre for uncovering the problem.
Fix memory leak in imap_copy_messages().

mx.mbox (allocated by imap_parse_path) was not always freed before
return.

The sync_cmd and cmd buffers were also not always freed.  One case was
on retrying after creating the mailbox, which would overwrite the
allocated pointers.

As long as I'm touching the buffers, convert them to use the buffer
pool.  I think the mutt_buffer_clear() at the beginning of the retry
loop isn't necessary, but will keep it to make it clear any existing
values won't be reused a second time through the loop.
0a836cee — Vincent Lefevre 2 days ago
Fix typos in the manual, found by codespell.
Add mutt_buffer_rewind() function.

This makes it a bit clearer what the assignment is doing, and reduces
direct dptr manipulation a bit.
Fix a few mutt_extract_token() callers dest parameters.

Some callers performed a mutt_buffer_init(), called
mutt_extract_token() and then assumed that the buffer->data would
never be NULL.  Prior to the "fix" in commit f420be68, this was not
true, even if MoreArgs() returns true, because the argument could be
just ''.

The parse_keymap() change fixed a possible segv.  Don't use the buffer
pool, because it returns buf->data to the caller.

I don't believe the other two would segv, but they did still rely on
the old behavior where the the buffer would have a '\0' appended
always.  So, change them to use the buffer pool to be cleaner.
Merge branch 'stable'
Ensure mutt_extract_token() never returns a NULL dest->data.

Commit e5a32a61 removed a 'mutt_buffer_addch (dest, 0)' at the end of
the function.  Most callers had been converted to use the buffer pool,
and the call was strange since buffers self-terminate.

However, this line covered up logic errors in some of the callers,
which assumed the buffer->data could not be NULL afterwards.

I will try to fix up callers with the logic errors in master.  This is
to fix the problem in stable, and also ensure future callers don't
make the same mistake.
Merge branch 'stable'
Fix REPLY_TO environment variable handling.

Commit 4e153adf changed this code to reuse the function buffer
variable, but forgot to rewind the buffer for parsing in
parse_my_hdr().

Additionally commit e5a32a61 removed an extra "null termination"
mutt_buffer_addch() at the end of mutt_extract_token().  This caused a
NULL value to be passed to the strpbrk() in parse_my_hdr(), causing a
segv.  Change to use a buffer pool token parameter instead.

I actually think, like with the previous IMAP mailbox handling, this
method of adding a my_hdr is dangerous.  I'll look into refactoring it
in master instead.

Thanks to Paul Nevai for reporting the problem and tracking down the
backtrace.
0149944d — Vincent Lefevre 4 days ago
Updated Project-Id-Version to 2.0.2.
679c8184 — Vincent Lefevre 4 days ago
Updated French translation.
Fix undefined NULL pointer arithmetic.

clang 10 is giving a warning about arithmetic with a NULL pointer.  To
prevent any problems, add checks in the BUFFER increase-size handling
functions.
Merge branch 'stable'
Fix exact-address recording of last value.

If the last address was also terminated by a comma (e.g: foo@local,
bar@local,) the exact-address was incorrectly overwriting the recorded
value.
Surround new and old debug functions with #ifdef DEBUG.

The new function directly references debugfile, so needs the ifdef.
The old function compiles fine, but since it's not used, put it inside
the ifdef too.

Thanks to Ian Allen for reporting the problem.
Fix exact-address handling when addr->personal is set.

The exact-address compile-time option takes an exact copy of an
address when it is parsed, and prints that out when outputting the
address.  The idea is to preserve older "user@host (Name)" syntax.

Unfortunately, when code tries to "update" the personal/name field, it
needs to clear the exact-address copy for it to have any effect.

An object-oriented design encapsulating the setting would help prevent
this problem.  It might be desirable to create a C function instead,
but callers would have to remember it, and such a thing isn't common
in the Mutt codebase.

Another patch (I'm still debating applying) changes the address parser
to discard the exact-address copy when it exactly matches the
mailbox.  However, that still won't fix every case (and it makes the
parser even more difficult to follow.)

So this commit (to stable) takes the straightforward approach.

It fixes bugs in:

* Alias creation.  The "personal name" prompt was ignored.

* Autocrypt initialization from address setting with $realname.

* $pgp_getkeys_command handling.

* Query menu results.

* "unset $reverse_realname" handling.

* $from handling of $realname.

* Bounce Resent-From handling of $realname.
a3011236 — David Champion 13 days ago
add dprintf(n, fmt, ...) debugging macro

dprintf(n, fmt, ...) is a more natural form of
dprint(n, (debugfile, fmt, ...)). It prints code location in the debug
file where possible.

I believe this approach, while common, was not previously used because
we were trying to be C90-compatible.  C90 doesn't provide variadic
macros.  Now we require C99, so it makes sense to add this pattern.
Add configure error if C compiler doesn't support C99.

We added the test, but did not check to ensure it was found.  Thanks
to Oswald Buddenhagen for pointing out the missing check.  He
suggested the AC_PROG_CC might be redundant, but the info page seems
to indicate AC_PROG_CC_C99 checks the properties of an already located
compiler, so I'm leaving AC_PROG_CC in.

Also, remove the $U check just below.  Commit 64b1460a removed the
call to AM_C_PROTOTYPES, but forgot to remove the $U check too.
Next