]> granicus.if.org Git - neomutt/log
neomutt
5 years agoFix struct Buffer used as %s 1787/head
Zero King [Wed, 24 Jul 2019 16:51:12 +0000 (16:51 +0000)]
Fix struct Buffer used as %s

cmd is a Buffer struct, it does not correspond to %s in the format
string.

5 years agoHonour a Mailbox's hidden flag in the browser
Pietro Cerutti [Tue, 23 Jul 2019 13:22:38 +0000 (13:22 +0000)]
Honour a Mailbox's hidden flag in the browser

5 years agoUpdate to latest autosetup and bundled JimTcl
Pietro Cerutti [Tue, 23 Jul 2019 08:10:49 +0000 (08:10 +0000)]
Update to latest autosetup and bundled JimTcl

5 years agoUpdate to latest acutest.h
Pietro Cerutti [Tue, 23 Jul 2019 08:05:47 +0000 (08:05 +0000)]
Update to latest acutest.h

5 years agoFix browsing an IMAP backend
Pietro Cerutti [Mon, 22 Jul 2019 11:37:23 +0000 (11:37 +0000)]
Fix browsing an IMAP backend

Fixes #1783

5 years agomerge: light refactoring
Richard Russon [Sat, 20 Jul 2019 22:18:23 +0000 (23:18 +0100)]
merge: light refactoring

 * test: sync mutt_extract_token()
 * drop Buffer.destroy
 * refactor: Mailbox in mutt_display_message()
 * pager: reorganised the code
 * context: tidy for clarity
 * context: add notifications
 * notify: use data to match specific callbacks

5 years agonotify: use data to match specific callbacks
Richard Russon [Sat, 20 Jul 2019 12:48:19 +0000 (13:48 +0100)]
notify: use data to match specific callbacks

When removing a notification callback, check both the function and data
pointers.

This means we can reuse a single callback function with multiple data
objects.

5 years agocontext: add notifications
Richard Russon [Fri, 19 Jul 2019 13:51:46 +0000 (14:51 +0100)]
context: add notifications

Prepare for more Context refactoring by supporting notifications on the
Context object.

5 years agocontext: tidy for clarity
Richard Russon [Fri, 19 Jul 2019 11:09:37 +0000 (12:09 +0100)]
context: tidy for clarity

- rename msgnotreadyet
- insert whitespace into header

5 years agopager: reorganised the code
Richard Russon [Fri, 19 Jul 2019 12:38:03 +0000 (13:38 +0100)]
pager: reorganised the code

Move all the data, defines and structs to the top of the file, where
they're more discoverable.

5 years agorefactor: Mailbox in mutt_display_message()
Richard Russon [Fri, 19 Jul 2019 10:54:11 +0000 (11:54 +0100)]
refactor: Mailbox in mutt_display_message()

Pass the Mailbox into mutt_display_message() rather than relying on
Context->mailbox.

5 years agodrop Buffer.destroy
Richard Russon [Fri, 19 Jul 2019 21:48:51 +0000 (22:48 +0100)]
drop Buffer.destroy

This member controlled whether, when destroyed, a Buffer should delete
its data.  The member was only used in a couple of places, so it seems
better to duplicate the data in those cases and *always* destroy it
afterwards.

5 years agotest: sync mutt_extract_token()
Richard Russon [Fri, 19 Jul 2019 17:29:56 +0000 (18:29 +0100)]
test: sync mutt_extract_token()

The test code needs a private copy of mutt_extract_token().
Update the copy to match the latest code.

5 years agonntp: fix leaks
Richard Russon [Thu, 18 Jul 2019 16:23:54 +0000 (17:23 +0100)]
nntp: fix leaks

5 years agonntp: remove old Context references
Richard Russon [Thu, 18 Jul 2019 16:23:17 +0000 (17:23 +0100)]
nntp: remove old Context references

5 years agosmime: factor out context
Richard Russon [Thu, 18 Jul 2019 13:02:48 +0000 (14:02 +0100)]
smime: factor out context

5 years agoaddrlist: fix empty string
Richard Russon [Thu, 18 Jul 2019 12:41:24 +0000 (13:41 +0100)]
addrlist: fix empty string

5 years agonotify: fix shutdown order
Richard Russon [Thu, 18 Jul 2019 14:58:00 +0000 (15:58 +0100)]
notify: fix shutdown order

Free the Notify object after we free anyone who might use it.

5 years agoboolify monitor
Richard Russon [Wed, 17 Jul 2019 22:01:06 +0000 (23:01 +0100)]
boolify monitor

5 years agocontext: crypt_extract_keys_from_messages()
Richard Russon [Wed, 17 Jul 2019 13:33:19 +0000 (14:33 +0100)]
context: crypt_extract_keys_from_messages()

Change crypt_extract_keys_from_messages() to use a Context parameter
rather than the global.

5 years agonntp: fix refactoring bugs
Richard Russon [Wed, 17 Jul 2019 15:36:04 +0000 (16:36 +0100)]
nntp: fix refactoring bugs

- fix cli startup
- fix mailbox ptr
- fix change-folder

5 years agoemail: add events
Richard Russon [Mon, 15 Jul 2019 10:49:53 +0000 (11:49 +0100)]
email: add events

5 years agoiwyu: tidy more #includes
Richard Russon [Wed, 17 Jul 2019 01:10:53 +0000 (02:10 +0100)]
iwyu: tidy more #includes

5 years agomerge: trivial tidying
Richard Russon [Tue, 16 Jul 2019 21:43:12 +0000 (22:43 +0100)]
merge: trivial tidying

 * doxygen: fix comments
 * fix whitespace
 * rename mutt_emaillist_free() to _clear()
 * drop unused maildir_update_tables()
 * de-Context nntp_check_msgid()
 * de-Context nntp_check_children()
 * boolify imap_next_word()
 * rename dreadful local
 * email: shorten function names
 * rename ParameterList variables
 * unify private data free functions
 * hash: pick some better variable names
 * iwyu: tidy #includes

5 years agoiwyu: tidy #includes
Richard Russon [Tue, 16 Jul 2019 21:04:02 +0000 (22:04 +0100)]
iwyu: tidy #includes

5 years agohash: pick some better variable names
Richard Russon [Tue, 16 Jul 2019 20:14:50 +0000 (21:14 +0100)]
hash: pick some better variable names

5 years agounify private data free functions
Richard Russon [Tue, 16 Jul 2019 19:44:32 +0000 (20:44 +0100)]
unify private data free functions

5 years agorename ParameterList variables
Richard Russon [Tue, 16 Jul 2019 18:33:14 +0000 (19:33 +0100)]
rename ParameterList variables

5 years agoemail: shorten function names
Richard Russon [Tue, 16 Jul 2019 18:25:21 +0000 (19:25 +0100)]
email: shorten function names

5 years agorename dreadful local
Richard Russon [Tue, 16 Jul 2019 18:13:07 +0000 (19:13 +0100)]
rename dreadful local

5 years agoboolify imap_next_word()
Richard Russon [Tue, 16 Jul 2019 18:07:38 +0000 (19:07 +0100)]
boolify imap_next_word()

5 years agode-Context nntp_check_children()
Richard Russon [Tue, 16 Jul 2019 17:11:54 +0000 (18:11 +0100)]
de-Context nntp_check_children()

5 years agode-Context nntp_check_msgid()
Richard Russon [Tue, 16 Jul 2019 17:08:38 +0000 (18:08 +0100)]
de-Context nntp_check_msgid()

5 years agodrop unused maildir_update_tables()
Richard Russon [Tue, 16 Jul 2019 17:00:17 +0000 (18:00 +0100)]
drop unused maildir_update_tables()

5 years agorename mutt_emaillist_free() to _clear()
Richard Russon [Mon, 15 Jul 2019 17:36:16 +0000 (18:36 +0100)]
rename mutt_emaillist_free() to _clear()

The function doesn't free the Emails, just the list, so rename it to
match similar functions.

5 years agofix whitespace
Richard Russon [Mon, 15 Jul 2019 16:47:20 +0000 (17:47 +0100)]
fix whitespace

5 years agodoxygen: fix comments
Richard Russon [Sun, 14 Jul 2019 01:05:06 +0000 (02:05 +0100)]
doxygen: fix comments

5 years agomerge: upstream fixes
Richard Russon [Mon, 15 Jul 2019 21:37:03 +0000 (22:37 +0100)]
merge: upstream fixes

Sync to upstream: 82973a6e

 * change Command to use intptr_t
 * Don't read or save history if $history_file isn't set
 * Omit User-Agent: header by default
 * Remove unnecessary checks for strings
 * Convert $header_cache_pagesize to type DT_LONG

5 years agoConvert $header_cache_pagesize to type DT_LONG
Kevin McCarthy [Thu, 27 Jun 2019 18:06:19 +0000 (11:06 -0700)]
Convert $header_cache_pagesize to type DT_LONG

Prior to commit 4bc76c2f there was no LNUM type, and so the workaround
was to store it as a string, converting in the hcache_open_gdbm()
call.

This will not affect the user interface or config file, because DT_NUM
and DT_LNUM read in a string from the config file and convert to a
number.  Quotes are used for escaping style, not passed through to the
variable setter.

So essentially this simply moves the conversion to parse_set(), and
provides feedback for a non-numeric type immediately.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRemove unnecessary checks for strings
Kevin McCarthy [Thu, 27 Jun 2019 22:35:12 +0000 (15:35 -0700)]
Remove unnecessary checks for strings

MuttVars of those types are set via safe_strdup(), which returns NULL
if the original is "".  Thus Var implies *Var.

A good portion of the code relies on that axiom, but over the years
some (Var && *Var) checks have crept in, including from me.

This was partially because of the INITVAL("") that were in the code,
which implied (incorrectly) the initial value could be "".  Commit
2f91d43e removed those to make it more clear.

This commit removes the *Var checks to make it even clearer, and help
avoid them creeping back in again.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoOmit User-Agent: header by default
Daniel Kahn Gillmor [Sun, 14 Jul 2019 01:49:05 +0000 (21:49 -0400)]
Omit User-Agent: header by default

The User-Agent: header can be fun and interesting and useful for
debugging, but it also leaks quite a bit of information about the user
and their software stack.

This represents a potential security risk (attackers can target the
particular stack) and also an anonymity risk (a user trying to
preserve their anonymity by sending mail from a non-associated account
might reveal quite a lot of information if their choice of mail user
agent is exposed).

Users who want to configure `user_agent` to `yes` can still do so, but
it makes sense to have safer defaults.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoDon't read or save history if $history_file isn't set
Kevin McCarthy [Fri, 28 Jun 2019 19:57:24 +0000 (12:57 -0700)]
Don't read or save history if $history_file isn't set

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agochange Command to use intptr_t
Richard Russon [Mon, 15 Jul 2019 19:36:40 +0000 (20:36 +0100)]
change Command to use intptr_t

5 years agofix browser attach
Richard Russon [Mon, 15 Jul 2019 16:24:40 +0000 (17:24 +0100)]
fix browser attach

5 years agosync translations
Richard Russon [Mon, 15 Jul 2019 15:32:04 +0000 (16:32 +0100)]
sync translations

5 years agofix re-opening attachments
Richard Russon [Sun, 23 Jun 2019 12:24:40 +0000 (13:24 +0100)]
fix re-opening attachments

When opening an attachment with a two part suffix, e.g. `.tar.gz`
NeoMutt created a temporary file with just `.gz`.

Hack the splitting logic to give a useful suffix

Fixes: #1699
5 years agoAvoid implicit conversion between bool and quadopt
Federico Kircheis [Sun, 14 Jul 2019 07:24:09 +0000 (09:24 +0200)]
Avoid implicit conversion between bool and quadopt

Make the conversion between `bool and `QuadOption` explicit, and avoid
depending on the underlying `enum` value.

Also state that `mutt_yesorno` works correctly for `MUTT_YES` and `MUTT_NO`

5 years agoMake callback take const param
Federico Kircheis [Wed, 10 Jul 2019 07:20:42 +0000 (09:20 +0200)]
Make callback take const param

Otherwise a realloc is potentnially unsafe

5 years agoInitialize the variable `index_hint`
Federico Kircheis [Sun, 14 Jul 2019 07:13:53 +0000 (09:13 +0200)]
Initialize the variable `index_hint`

Prior to this commit, `index_hint` is initialized if `Context && !attach_msg`.

If `query_quadoption(C_Quit, _("Quit NeoMutt?")) == MUTT_YES`,
`!Context || ((check = mx_mbox_close(&Context)) == 0)` is `false` and
`(check == MUTT_NEW_MAIL) || (check == MUTT_REOPENED)` the function `update_index`
is called with parameter `index_hint`.

As one of the condition is `query_quadoption(C_Quit, _("Quit NeoMutt?")) == MUTT_YES`,
the real current position is probably not so important.

5 years agomerge: account preparations
Richard Russon [Sat, 13 Jul 2019 23:39:22 +0000 (00:39 +0100)]
merge: account preparations

 * split up mailbox.c
 * notify: add global notifications
 * neomutt: move AllAccounts
 * notify: add Account Events
 * refactor users of AllMailboxes
 * drop AllMailboxes
 * account: add mailbox_add()
 * notify: add Mailbox Events
 * notify: drop old Context notifications
 * config: add config subsets
 * config: convert to subset
 * mailbox: rename desc to name
 * create libcore

5 years agoversion: add colour for devel features
Richard Russon [Fri, 28 Jun 2019 12:19:34 +0000 (13:19 +0100)]
version: add colour for devel features

5 years agocreate libcore
Richard Russon [Fri, 12 Jul 2019 15:16:39 +0000 (16:16 +0100)]
create libcore

5 years agodoxygen: Address struct members
Richard Russon [Sat, 13 Jul 2019 22:03:49 +0000 (23:03 +0100)]
doxygen: Address struct members

5 years agomailbox: rename desc to name
Richard Russon [Fri, 12 Jul 2019 13:17:06 +0000 (14:17 +0100)]
mailbox: rename desc to name

5 years agodoxygen: Email struct members
Richard Russon [Sat, 13 Jul 2019 18:36:14 +0000 (19:36 +0100)]
doxygen: Email struct members

5 years agoconfig: convert to subset
Richard Russon [Thu, 11 Jul 2019 11:12:27 +0000 (12:12 +0100)]
config: convert to subset

5 years agogitignore: drop old test binaries
Richard Russon [Sat, 13 Jul 2019 18:29:50 +0000 (19:29 +0100)]
gitignore: drop old test binaries

5 years agoconfig: add config subsets
Richard Russon [Wed, 10 Jul 2019 16:37:29 +0000 (17:37 +0100)]
config: add config subsets

5 years agonotify: drop old Context notifications
Richard Russon [Wed, 10 Jul 2019 16:09:21 +0000 (17:09 +0100)]
notify: drop old Context notifications

5 years agonotify: add Mailbox Events
Richard Russon [Tue, 9 Jul 2019 14:23:50 +0000 (15:23 +0100)]
notify: add Mailbox Events

5 years agoaccount: add mailbox_add()
Richard Russon [Tue, 9 Jul 2019 14:12:55 +0000 (15:12 +0100)]
account: add mailbox_add()

5 years agodrop AllMailboxes
Richard Russon [Thu, 4 Jul 2019 15:01:02 +0000 (16:01 +0100)]
drop AllMailboxes

5 years agorefactor users of AllMailboxes
Richard Russon [Wed, 3 Jul 2019 21:37:52 +0000 (22:37 +0100)]
refactor users of AllMailboxes

5 years agonotify: add Account Events
Richard Russon [Wed, 3 Jul 2019 10:01:13 +0000 (11:01 +0100)]
notify: add Account Events

5 years agoneomutt: move AllAccounts
Richard Russon [Mon, 1 Jul 2019 16:28:40 +0000 (17:28 +0100)]
neomutt: move AllAccounts

5 years agonotify: add global notifications
Richard Russon [Wed, 3 Jul 2019 10:20:15 +0000 (11:20 +0100)]
notify: add global notifications

5 years agosplit up mailbox.c
Richard Russon [Thu, 11 Jul 2019 12:26:54 +0000 (13:26 +0100)]
split up mailbox.c

5 years agomerge: Improve const-correctness
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

5 years agoRemove useless cast 1772/head
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Remove useless cast

5 years agoMake const discards more explicit
Federico Kircheis [Wed, 10 Jul 2019 18:30:30 +0000 (20:30 +0200)]
Make const discards more explicit

5 years agoDo not cast const qualifier from sort callbacks
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.

5 years agoImprove const-correctness
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

5 years agoAvoid using reserved identifiers
Federico Kircheis [Sun, 7 Jul 2019 11:04:51 +0000 (13:04 +0200)]
Avoid using reserved identifiers

Found with `clang -Wreserved-id-macro`

5 years agomerge: trivial fixes
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

5 years agonotmuch: fix prototypes
Richard Russon [Sat, 6 Jul 2019 11:10:47 +0000 (12:10 +0100)]
notmuch: fix prototypes

5 years agodoxy: unify MXAPI comments
Richard Russon [Fri, 5 Jul 2019 15:46:26 +0000 (16:46 +0100)]
doxy: unify MXAPI comments

5 years agounify naming of Mailbox vars/params
Richard Russon [Fri, 5 Jul 2019 14:33:05 +0000 (15:33 +0100)]
unify naming of Mailbox vars/params

5 years agounify naming of Email vars/params
Richard Russon [Fri, 5 Jul 2019 14:04:53 +0000 (15:04 +0100)]
unify naming of Email vars/params

5 years agodrop old refs to struct Header
Richard Russon [Fri, 5 Jul 2019 13:08:07 +0000 (14:08 +0100)]
drop old refs to struct Header

5 years agorename templates
Richard Russon [Fri, 5 Jul 2019 14:27:35 +0000 (15:27 +0100)]
rename templates

5 years agoRename typedef to ParseDateRangeFlags
Federico Kircheis [Sat, 6 Jul 2019 05:23:54 +0000 (07:23 +0200)]
Rename typedef to ParseDateRangeFlags

As there is another definition of PatternFlags

5 years agomerge: trivial fixes
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

5 years agomonitor #define -> enum
Richard Russon [Fri, 5 Jul 2019 09:49:55 +0000 (10:49 +0100)]
monitor #define -> enum

5 years agorename account_remove_mailbox()
Richard Russon [Wed, 3 Jul 2019 12:58:35 +0000 (13:58 +0100)]
rename account_remove_mailbox()

5 years agorename locals for consistency
Richard Russon [Thu, 4 Jul 2019 18:41:57 +0000 (19:41 +0100)]
rename locals for consistency

5 years agodrop nm_description_to_path() - unused
Richard Russon [Wed, 3 Jul 2019 12:51:27 +0000 (13:51 +0100)]
drop nm_description_to_path() - unused

5 years agonotify: fix observer retval
Richard Russon [Tue, 2 Jul 2019 14:27:28 +0000 (15:27 +0100)]
notify: fix observer retval

5 years agotags: fix leak
Richard Russon [Tue, 2 Jul 2019 13:54:39 +0000 (14:54 +0100)]
tags: fix leak

5 years agodebug: fix levels and messages
Richard Russon [Thu, 4 Jul 2019 17:20:49 +0000 (18:20 +0100)]
debug: fix levels and messages

5 years agosidebar: pass in Mailbox
Richard Russon [Thu, 4 Jul 2019 16:14:06 +0000 (17:14 +0100)]
sidebar: pass in Mailbox

5 years agofix compress local init
Richard Russon [Mon, 1 Jul 2019 13:05:41 +0000 (14:05 +0100)]
fix compress local init

5 years agoadd missing flag
Richard Russon [Mon, 1 Jul 2019 11:01:13 +0000 (12:01 +0100)]
add missing flag

5 years agofix whitespace
Richard Russon [Mon, 17 Jun 2019 16:30:42 +0000 (17:30 +0100)]
fix whitespace

5 years agomerge: Avoid using c++ reserved identifiers
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

5 years agoFix functions declarations/definitions 1760/head
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

5 years agoReplace `or` member with `pat_or`
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

5 years agoReplace `not` member with `pat_not`
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

5 years agoReplace `class` member with `flags`
Federico Kircheis [Sun, 30 Jun 2019 03:30:19 +0000 (05:30 +0200)]
Replace `class` member with `flags`

As it's reserved in C++

5 years agoReplace `new` variable with `new_label`
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++

5 years agoReplace `new` variable with `new_param`
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++