]>
granicus.if.org Git - neomutt/log
Richard Russon [Sat, 13 Jul 2019 23:13:34 +0000 (00:13 +0100)]
merge: Improve const-correctness
* Improve const-correctness
* Do not cast const qualifier from sort callbacks
* Make const discards more explicit
* Remove useless cast
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Remove useless cast
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Make const discards more explicit
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Do not cast const qualifier from sort callbacks
If `const void*` points to an instance of type `T`, then it should be
casted to a `const T*` instance.
If `const void*` is a pointer to an instance of type `T`, then the pointer
is `const T*`.
The instance could be `const`, or could be not, but to be on the safe
side, it's casted to `T const *const *`.
In the case of pointer-to-pointer, `const` is on the right to ease
readability; from right to leaft it reads:
A pointer to a const pointer to a const T.
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Improve const-correctness
of
* convert_file_to
* get_quote_level
* mutt_write_one_header
* classify_quote
* gen_string_hash
* gen_case_string_hash
* mutt_buffer_enter_fname_full
* parse_references
Federico Kircheis [Sun, 7 Jul 2019 11:04:51 +0000 (13:04 +0200)]
Avoid using reserved identifiers
Found with `clang -Wreserved-id-macro`
Richard Russon [Sat, 6 Jul 2019 11:46:20 +0000 (12:46 +0100)]
merge: trivial fixes
* rename templates
* drop old refs to struct Header
* unify naming of Email vars/params
* unify naming of Mailbox vars/params
* doxy: unify MXAPI comments
* notmuch: fix prototypes
Richard Russon [Sat, 6 Jul 2019 11:10:47 +0000 (12:10 +0100)]
notmuch: fix prototypes
Richard Russon [Fri, 5 Jul 2019 15:46:26 +0000 (16:46 +0100)]
doxy: unify MXAPI comments
Richard Russon [Fri, 5 Jul 2019 14:33:05 +0000 (15:33 +0100)]
unify naming of Mailbox vars/params
Richard Russon [Fri, 5 Jul 2019 14:04:53 +0000 (15:04 +0100)]
unify naming of Email vars/params
Richard Russon [Fri, 5 Jul 2019 13:08:07 +0000 (14:08 +0100)]
drop old refs to struct Header
Richard Russon [Fri, 5 Jul 2019 14:27:35 +0000 (15:27 +0100)]
rename templates
Federico Kircheis [Sat, 6 Jul 2019 05:23:54 +0000 (07:23 +0200)]
Rename typedef to ParseDateRangeFlags
As there is another definition of PatternFlags
Richard Russon [Fri, 5 Jul 2019 11:19:00 +0000 (12:19 +0100)]
merge: trivial fixes
* fix whitespace
* add missing flag
* fix compress local init
* sidebar: pass in Mailbox
* debug: fix levels and messages
* tags: fix leak
* notify: fix observer retval
* drop nm_description_to_path() - unused
* rename locals for consistency
* rename account_remove_mailbox()
* monitor #define -> enum
Richard Russon [Fri, 5 Jul 2019 09:49:55 +0000 (10:49 +0100)]
monitor #define -> enum
Richard Russon [Wed, 3 Jul 2019 12:58:35 +0000 (13:58 +0100)]
rename account_remove_mailbox()
Richard Russon [Thu, 4 Jul 2019 18:41:57 +0000 (19:41 +0100)]
rename locals for consistency
Richard Russon [Wed, 3 Jul 2019 12:51:27 +0000 (13:51 +0100)]
drop nm_description_to_path() - unused
Richard Russon [Tue, 2 Jul 2019 14:27:28 +0000 (15:27 +0100)]
notify: fix observer retval
Richard Russon [Tue, 2 Jul 2019 13:54:39 +0000 (14:54 +0100)]
tags: fix leak
Richard Russon [Thu, 4 Jul 2019 17:20:49 +0000 (18:20 +0100)]
debug: fix levels and messages
Richard Russon [Thu, 4 Jul 2019 16:14:06 +0000 (17:14 +0100)]
sidebar: pass in Mailbox
Richard Russon [Mon, 1 Jul 2019 13:05:41 +0000 (14:05 +0100)]
fix compress local init
Richard Russon [Mon, 1 Jul 2019 11:01:13 +0000 (12:01 +0100)]
add missing flag
Richard Russon [Mon, 17 Jun 2019 16:30:42 +0000 (17:30 +0100)]
fix whitespace
Richard Russon [Fri, 5 Jul 2019 10:06:39 +0000 (11:06 +0100)]
merge: Avoid using c++ reserved identifiers
* Replace `try` variable with `user`
* Replace `virtual` variable with `vnum`
* Replace `template` variable with `tmpl`
* Replace `catch` variable with `restore`
* Replace `new` variable with `has_new_mail`
* Replace `new` variable with`new_file`
* Replace `public` variable with `only_public_key`
* Replace `delete` variable with `delete_original`
* Replace `new` variable with `mark_new`
* Replace `new` variable with `al_new`
* Replace `new` variable with `alias`
* Replace `new` variable with `ap`
* Replace `new` with `pnew`
* Unify `body_new` name instances
* Replace `new` variable with `add`
* Replace `new` variable with `new_mail`
* Replace `new` variable with `new_tag`
* Replace `new` variable with `new_label`
* Replace `new` variable with `tnew`
* Replace `new` variable with `new_mail`
* Replace `delete` variable with `delete_header`
* Replace `this` variable with `ctx_cur`
* Replace `this` variable with `key`
* Replace `class` variable with `qc`
* Replace `new` variable with `new_param`
* Replace `new` variable with `new_label`
* Replace `class` member with `flags`
* Replace `not` member with `pat_not`
* Replace `or` member with `pat_or`
* Fix functions declarations/definitions
Federico Kircheis [Thu, 4 Jul 2019 15:39:19 +0000 (17:39 +0200)]
Fix functions declarations/definitions
As the function declaration and definition did not match up
Federico Kircheis [Sat, 29 Jun 2019 19:27:34 +0000 (21:27 +0200)]
Replace `or` member with `pat_or`
It clashes with the alternate operators
Federico Kircheis [Sat, 29 Jun 2019 12:56:18 +0000 (14:56 +0200)]
Replace `not` member with `pat_not`
It clashes with the alternate operators
Federico Kircheis [Sun, 30 Jun 2019 03:30:19 +0000 (05:30 +0200)]
Replace `class` member with `flags`
As it's reserved in C++
Federico Kircheis [Thu, 4 Jul 2019 18:18:15 +0000 (20:18 +0200)]
Replace `new` variable with `new_label`
`new` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 18:52:32 +0000 (20:52 +0200)]
Replace `new` variable with `new_param`
`new` is a reserved keyword in c++
Federico Kircheis [Thu, 4 Jul 2019 15:14:19 +0000 (17:14 +0200)]
Replace `class` variable with `qc`
`class` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 19:32:57 +0000 (21:32 +0200)]
Replace `this` variable with `key`
`this` is a reserved keyword in c++
Federico Kircheis [Thu, 4 Jul 2019 04:14:09 +0000 (06:14 +0200)]
Replace `this` variable with `ctx_cur`
`this` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 19:22:06 +0000 (21:22 +0200)]
Replace `delete` variable with `delete_header`
`delete` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:35:03 +0000 (21:35 +0200)]
Replace `new` variable with `new_mail`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:29:39 +0000 (21:29 +0200)]
Replace `new` variable with `tnew`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:26:16 +0000 (21:26 +0200)]
Replace `new` variable with `new_label`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:22:45 +0000 (21:22 +0200)]
Replace `new` variable with `new_tag`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:18:00 +0000 (21:18 +0200)]
Replace `new` variable with `new_mail`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:12:26 +0000 (21:12 +0200)]
Replace `new` variable with `add`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 19:04:19 +0000 (21:04 +0200)]
Unify `body_new` name instances
`new` is a reserved keyword in c++
Most instances are named this way
Federico Kircheis [Wed, 3 Jul 2019 18:54:30 +0000 (20:54 +0200)]
Replace `new` with `pnew`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 18:46:17 +0000 (20:46 +0200)]
Replace `new` variable with `ap`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 18:27:35 +0000 (20:27 +0200)]
Replace `new` variable with `alias`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 18:21:23 +0000 (20:21 +0200)]
Replace `new` variable with `al_new`
`new` is a reserved keyword in c++
Federico Kircheis [Wed, 3 Jul 2019 18:13:28 +0000 (20:13 +0200)]
Replace `new` variable with `mark_new`
`new` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 19:14:11 +0000 (21:14 +0200)]
Replace `delete` variable with `delete_original`
`delete` is a reserved keyword in c++
Federico Kircheis [Sun, 30 Jun 2019 03:23:18 +0000 (05:23 +0200)]
Replace `public` variable with `only_public_key`
`public` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 18:52:50 +0000 (20:52 +0200)]
Replace `new` variable with`new_file`
`new` is a reserved keyword in c++
Rename both `new` and `old` to `new_file` and `old_file` for consistency
Federico Kircheis [Sat, 29 Jun 2019 13:06:28 +0000 (15:06 +0200)]
Replace `new` variable with `has_new_mail`
`new` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 13:09:54 +0000 (15:09 +0200)]
Replace `catch` variable with `restore`
`catch` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 13:00:17 +0000 (15:00 +0200)]
Replace `template` variable with `tmpl`
`virtual` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 18:57:10 +0000 (20:57 +0200)]
Replace `virtual` variable with `vnum`
`virtual` is a reserved keyword in c++
Federico Kircheis [Sat, 29 Jun 2019 12:11:54 +0000 (14:11 +0200)]
Replace `try` variable with `user`
`try` is a keyword in c++
While this should not affect C code, it affects unfortunately the
tooling.
This specific instance triggers a "syntax error" in Cppcheck, so it
could hide other problems.
(Cppcheck version 1.86, code parsed with `--language=c --std=c99`)
Of course it is a bug in Cppcheck, but renaming the variable is the most
pragmatic approach, as the bug in Cppcheck does not manifest itself in
a simple program.
Richard Russon [Tue, 2 Jul 2019 12:43:02 +0000 (13:43 +0100)]
notify: fix leak on exit
Pietro Cerutti [Mon, 1 Jul 2019 09:01:50 +0000 (09:01 +0000)]
Fix saving a msg to a non-existent mailbox
Fixes #1762
Federico Kircheis [Tue, 1 May 2018 14:55:20 +0000 (16:55 +0200)]
Avoid UB when clearing stdin
Flushing `stdin` is undefined behaviour.
References
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf, chapter 7.21.5.2 (The fflush function)
http://en.cppreference.com/w/c/io/fflush
Pietro Cerutti [Fri, 28 Jun 2019 11:41:05 +0000 (11:41 +0000)]
Sync autosetup required version with what we ship
Pietro Cerutti [Fri, 28 Jun 2019 07:08:25 +0000 (07:08 +0000)]
build: refactor idn headers check
Richard Russon [Thu, 27 Jun 2019 16:21:24 +0000 (17:21 +0100)]
build: check which idn2 headers to include
Richard Russon [Wed, 26 Jun 2019 22:17:39 +0000 (23:17 +0100)]
merge: update translations
* Various chages to spanish localization
* Update lt_LT translations
* modified some Japanese translations
* sync translations
Richard Russon [Wed, 26 Jun 2019 22:16:59 +0000 (23:16 +0100)]
sync translations
mochidai [Wed, 26 Jun 2019 19:15:25 +0000 (15:15 -0400)]
modified some Japanese translations
Marius Gedminas [Sun, 23 Jun 2019 11:44:46 +0000 (14:44 +0300)]
Update lt_LT translations
One fuzzy down.
Nagefire [Wed, 12 Jun 2019 22:12:45 +0000 (16:12 -0600)]
Various chages to spanish localization
Pietro Cerutti [Thu, 6 Jun 2019 13:51:36 +0000 (13:51 +0000)]
Optionally use pkg-config for 3rd party dependencies
Add a new --pkgconf switch to configure.
When specified, the compiler and linker flags for most 3rd party dependencies
will be figured out using pkg-config.
Pietro Cerutti [Mon, 24 Jun 2019 12:50:46 +0000 (12:50 +0000)]
Clarify header_cache behaviour on missing paths
Fixes #1752
Richard Russon [Mon, 24 Jun 2019 15:39:55 +0000 (16:39 +0100)]
merge: upstream fixes
* Convert last rfc1524_expand_command caller to use a Buffer
* Convert rfc1524_expand_command() implementation to use struct Buffer
* Rename mutt_buffer_rfc1524_expand_command()
* Fix send-mode printing when expand_filename() returns 1
* Fix compose and edit attachment symlink failure code
* Remove unnecessary strcmp for mutt_view_attachment()
* Remove mutt_rfc1524_expand_filename() return value and checks
* Make sure mailcap test %s is sanitized
* Clean up mutt_print_attachment() cleanup
* Add NULL checks to rfc1524_free_entry()
* Detail the documentation of %l for index_format
Vincent Lefevre [Sun, 23 Jun 2019 00:05:43 +0000 (02:05 +0200)]
Detail the documentation of %l for index_format
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 23:13:46 +0000 (16:13 -0700)]
Add NULL checks to rfc1524_free_entry()
The existing code was fine, but make it robust like other free
functions in mutt, so the behavior isn't surprising.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 23:01:19 +0000 (16:01 -0700)]
Clean up mutt_print_attachment() cleanup
Check if mutt_save_attachment() fails and abort the print in that
case.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 21:57:36 +0000 (14:57 -0700)]
Make sure mailcap test %s is sanitized
It's not clear to me if %s is allowed as part of a test field.
However since we are passing the attachment filename, we should
sanitize it first.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 20:33:11 +0000 (13:33 -0700)]
Remove mutt_rfc1524_expand_filename() return value and checks
The return value was of dubious value. It returned 0 only for the
case that a nametemplate was specified and it already matched the
supplied oldfile.
However, just because the nametemplate matched does not mean
attachment handling in send-mode should skip the mutt_adv_mktemp()
conversion, which includes a call to mutt_sanitize_filename(). We
didn't do so if *no* nametemplate was supplied.
Remove the return value from the function, and remove the checks and
"special handing" in mutt_attach.c calls.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 19:54:40 +0000 (12:54 -0700)]
Remove unnecessary strcmp for mutt_view_attachment()
mutt_rfc1524_expand_filename() runs the result through
mutt_adv_mktemp(), which will sanitize and relocate the filename under
$tmpdir. The strcmp() is unneeded and distracting to the program
logic; none of the other routines perform or need this check.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 19:35:58 +0000 (12:35 -0700)]
Fix compose and edit attachment symlink failure code
In the case where safe_symlink() fail, mutt prompts to continue, but
did not properly reset the filename to be operated on.
Fix up mutt_view_attachment() to use the same flow as the others, to
allow for easier comparison.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sat, 22 Jun 2019 17:09:02 +0000 (10:09 -0700)]
Fix send-mode printing when expand_filename() returns 1
It will return this when a nametemplate entry already matched the
passed in filename. So this bug required both a print entry and an
already matching nametemplate entry to trigger.
Co-authored-by: Richard Russon <rich@flatcap.org>
Kevin McCarthy [Sun, 14 Apr 2019 22:38:15 +0000 (15:38 -0700)]
Rename mutt_buffer_rfc1524_expand_command()
Remove buffer prefix now that all callers are converted.
Kevin McCarthy [Sun, 14 Apr 2019 20:34:37 +0000 (13:34 -0700)]
Convert rfc1524_expand_command() implementation to use struct Buffer
Add mutt_buffer_sanitize_filename() helper.
Add a few end-of-buffer checks while iterating over command.
Convert the parameter name, paramater value, and types to use struct Buffer
instead of fixed size strings.
Kevin McCarthy [Sun, 14 Apr 2019 18:38:49 +0000 (11:38 -0700)]
Convert last rfc1524_expand_command caller to use a Buffer
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
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>
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>
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>
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>
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>
Richard Russon [Sat, 15 Jun 2019 21:40:27 +0000 (22:40 +0100)]
test: fixes for recent updates
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()
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.
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
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
Richard Russon [Sat, 15 Jun 2019 19:54:00 +0000 (20:54 +0100)]
doxy: tidy compare_uid
Richard Russon [Sat, 15 Jun 2019 19:48:33 +0000 (20:48 +0100)]
unify GroupList variable naming
Richard Russon [Thu, 13 Jun 2019 13:24:59 +0000 (14:24 +0100)]
fix #includes
Richard Russon [Thu, 13 Jun 2019 12:11:53 +0000 (13:11 +0100)]
docs: fix typo
Richard Russon [Thu, 13 Jun 2019 10:22:33 +0000 (11:22 +0100)]
boolify Pattern.ready
Richard Russon [Thu, 13 Jun 2019 10:19:33 +0000 (11:19 +0100)]
initialise all struct members
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().