]> granicus.if.org Git - neomutt/log
neomutt
5 years agoMake NotMuch hcache-aware
Pietro Cerutti [Thu, 21 Mar 2019 12:30:36 +0000 (12:30 +0000)]
Make NotMuch hcache-aware

Closes: #1600
5 years agoFix table in man page
Alyssa Ross [Thu, 21 Mar 2019 10:44:48 +0000 (10:44 +0000)]
Fix table in man page

Previously:

    /usr/bin/tbl:<standard input>:824: unrecognised format `\'
    /usr/bin/tbl:<standard input>:824: giving up on this table

It seems the period after table headers must be on its own line.

5 years agomerge: trivial fixes
Richard Russon [Mon, 18 Mar 2019 22:14:12 +0000 (22:14 +0000)]
merge: trivial fixes

 * trivial ()s and NUL
 * pop: add typedef for pop_fetch_data()
 * doxy: add links
 * more NULs
 * fix typos
 * add checks to imap_account_match()
 * add check to imap_adata_find()
 * maildir: rename context functions
 * add flags to maildir_mbox_check()

5 years agoadd flags to maildir_mbox_check()
Richard Russon [Sun, 17 Mar 2019 22:00:31 +0000 (22:00 +0000)]
add flags to maildir_mbox_check()

5 years agomaildir: rename context functions
Richard Russon [Sun, 17 Mar 2019 21:35:11 +0000 (21:35 +0000)]
maildir: rename context functions

These functions now work with Mailboxes:
- maildir_add_to_context()
- maildir_move_to_context()

5 years agoadd check to imap_adata_find()
Richard Russon [Sat, 16 Mar 2019 13:02:52 +0000 (13:02 +0000)]
add check to imap_adata_find()

5 years agoadd checks to imap_account_match()
Richard Russon [Sat, 16 Mar 2019 12:42:57 +0000 (12:42 +0000)]
add checks to imap_account_match()

5 years agofix typos
Richard Russon [Fri, 15 Mar 2019 16:32:15 +0000 (16:32 +0000)]
fix typos

5 years agomore NULs
Richard Russon [Thu, 14 Mar 2019 00:17:41 +0000 (00:17 +0000)]
more NULs

5 years agodoxy: add links
Richard Russon [Tue, 12 Mar 2019 15:27:46 +0000 (15:27 +0000)]
doxy: add links

5 years agopop: add typedef for pop_fetch_data()
Richard Russon [Mon, 11 Mar 2019 23:18:18 +0000 (23:18 +0000)]
pop: add typedef for pop_fetch_data()

5 years agotrivial ()s and NUL
Richard Russon [Mon, 11 Mar 2019 19:54:10 +0000 (19:54 +0000)]
trivial ()s and NUL

5 years agoDo not prepend "attach_save_dir" to an absolute path
Pietro Cerutti [Fri, 15 Mar 2019 12:27:16 +0000 (12:27 +0000)]
Do not prepend "attach_save_dir" to an absolute path

This happens when saving multiple attachment. Assume `attach_save_dir = ./`.
When saving multiple attachments to `/tmp/att`, the proposed path
becomes `.//tmp/att`.

5 years agohcache: fix hash generator
Pietro Cerutti [Thu, 14 Mar 2019 11:04:44 +0000 (11:04 +0000)]
hcache: fix hash generator

`struct Header` was renamed to `struct Email`

Fixes: #1595
5 years agoadded: localtime_r/gmtime_r wrappers
Victor Fernandes [Thu, 28 Feb 2019 18:28:14 +0000 (19:28 +0100)]
added: localtime_r/gmtime_r wrappers

Fixes: #1571
5 years agoFix incorrect IMAP message purging bug.
Kevin McCarthy [Wed, 13 Mar 2019 04:06:11 +0000 (12:06 +0800)]
Fix incorrect IMAP message purging bug.

Thanks to Ivan Middleton @imiddle for the awesome bug report and
suggested fix.

The bug is most easily generated using Gmail with the $trash variable
set.

Deleted messages are first copied to the $trash folder.  If this is
set to "[Gmail]/Trash", then Gmail inteprets the copy as a "delete"
and sends EXPUNGE messages back for the messages.

cmd_parse_expunge() and cmd_parse_vanished() set the hdr->index to
INT_MAX, which subsequently an imap_expunge_mailbox() will use to
remove the messages from the local mailbox.

If we close the mailbox instead of sync it, Mutt will end up executing
the 'Deleted' flag setting before processing the expunge (because
"imap_check_mailbox() -> imap_cmd_finish()' doesn't set check_status
when we are closing).  The expunged messages will then be included in
the set of 'Deleted' flags.

Unfortunately, because the messages are sorted by *index* before
msgset generation, an incorrect range of UIDs will be sent, which
could easily include messages that should not be deleted.

This fix is a minimal fix for a stable bug fix  excluding
messages with the index set to INT_MAX from all msg sets.  Other
things that should be investigated in master are:

- sorting by UID instead of index before msgset generation
- unsetting the 'active' flag in cmd_parse_expunge() and
  cmd_parse_vanished() instead of waiting until imap_expunge_mailbox()
  to do so.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix opening IMAP messages when the body cache is disabled
Pietro Cerutti [Mon, 11 Mar 2019 17:18:02 +0000 (17:18 +0000)]
Fix opening IMAP messages when the body cache is disabled

Fixes #1574

5 years agomx: fix mbox double free
Richard Russon [Mon, 11 Mar 2019 13:53:01 +0000 (13:53 +0000)]
mx: fix mbox double free

Fixes: #1597
5 years agoFix pointer assignment to '\0' introduced in 495153
Pietro Cerutti [Mon, 11 Mar 2019 08:32:46 +0000 (08:32 +0000)]
Fix pointer assignment to '\0' introduced in 495153

5 years agomerge: merge translations
Richard Russon [Sat, 9 Mar 2019 23:44:11 +0000 (23:44 +0000)]
merge: merge translations

 * Corrected several minor errors in the spanish translation
 * Update Czech translation
 * More miscellaneous improvements to spanish localization
 * Added a few miscellaneous translations
 * Update lt_LT translation
 * Polish translation update
 * update po files list
 * sync translations

5 years agosync translations
Richard Russon [Sat, 9 Mar 2019 23:37:47 +0000 (23:37 +0000)]
sync translations

5 years agoupdate po files list
Richard Russon [Sat, 9 Mar 2019 23:29:26 +0000 (23:29 +0000)]
update po files list

5 years agoPolish translation update
Marcin Rajner [Fri, 25 Jan 2019 16:48:14 +0000 (17:48 +0100)]
Polish translation update

5 years agoUpdate lt_LT translation
Marius Gedminas [Thu, 24 Jan 2019 12:52:58 +0000 (14:52 +0200)]
Update lt_LT translation

Fixed three new fuzzy entries and a lot of typos in old translations
because I decided to do a spell check on a whim.

5 years agoAdded a few miscellaneous translations
Nagefire [Sun, 3 Feb 2019 17:06:48 +0000 (10:06 -0700)]
Added a few miscellaneous translations

5 years agoMore miscellaneous improvements to spanish localization
Nagefire [Tue, 15 Jan 2019 04:06:51 +0000 (21:06 -0700)]
More miscellaneous improvements to spanish localization

5 years agoUpdate Czech translation
David Sterba [Fri, 11 Jan 2019 16:52:52 +0000 (17:52 +0100)]
Update Czech translation

5 years agoCorrected several minor errors in the spanish translation
Nagefire [Mon, 14 Jan 2019 17:44:07 +0000 (10:44 -0700)]
Corrected several minor errors in the spanish translation

5 years agoiwyu: optimise #includes
Richard Russon [Sun, 3 Mar 2019 17:06:48 +0000 (17:06 +0000)]
iwyu: optimise #includes

5 years agouse SecurityFlags more
Richard Russon [Fri, 8 Mar 2019 23:18:20 +0000 (23:18 +0000)]
use SecurityFlags more

Some functions missed out on the earlier upgrade.

5 years agomerge: Use NUL or NULL rather than 0
Richard Russon [Sat, 9 Mar 2019 14:44:05 +0000 (14:44 +0000)]
merge: Use NUL or NULL rather than 0

 * Use NUL or NULL rather than 0 when setting
 * Test string contents against NUL (==)
 * Test string contents against NUL (!=)

5 years agoTest string contents against NUL (!=)
Richard Russon [Sat, 9 Mar 2019 14:09:18 +0000 (14:09 +0000)]
Test string contents against NUL (!=)

```diff
- while (*buf)
+ while (*buf != '\0')
```

```diff
- if (bestname[0] != 0)
+ if (bestname[0] != '\0')
```

5 years agoTest string contents against NUL (==)
Richard Russon [Sat, 9 Mar 2019 14:08:09 +0000 (14:08 +0000)]
Test string contents against NUL (==)

```diff
- if (!bestname[0])
+ if (bestname[0] == '\0')
```

```diff
- if (dest[0] == 0)
+ if (dest[0] == '\0')
```

5 years agoUse NUL or NULL rather than 0 when setting
Richard Russon [Sat, 9 Mar 2019 13:39:18 +0000 (13:39 +0000)]
Use NUL or NULL rather than 0 when setting

This helps to reinforce the variables' types when reading the code.

```diff
 char buf[10];
-buf[0] = 0;
+buf[0] = '\0';
```

```diff
 void *ptr;
-ptr = 0;
+ptr = NULL;
```

5 years agomerge: trivial tidying
Richard Russon [Sat, 9 Mar 2019 14:43:15 +0000 (14:43 +0000)]
merge: trivial tidying

 * Rename variables: string -> str
 * docs: fix typos
 * fix comments
 * tidy L10N comments
 * fix block comments
 * fold comments

5 years agofold comments
Richard Russon [Fri, 8 Mar 2019 17:36:37 +0000 (17:36 +0000)]
fold comments

5 years agofix block comments
Richard Russon [Fri, 8 Mar 2019 17:05:57 +0000 (17:05 +0000)]
fix block comments

5 years agotidy L10N comments
Richard Russon [Thu, 7 Mar 2019 00:36:25 +0000 (00:36 +0000)]
tidy L10N comments

5 years agofix comments
Richard Russon [Thu, 7 Mar 2019 00:16:09 +0000 (00:16 +0000)]
fix comments

5 years agodocs: fix typos
Richard Russon [Wed, 6 Mar 2019 16:34:30 +0000 (16:34 +0000)]
docs: fix typos

5 years agoRename variables: string -> str
Richard Russon [Thu, 7 Mar 2019 00:41:28 +0000 (00:41 +0000)]
Rename variables: string -> str

Consistent variable naming makes the code easier to read.

5 years agofix pre-increment in for loops
Richard Russon [Thu, 7 Mar 2019 03:28:31 +0000 (03:28 +0000)]
fix pre-increment in for loops

In for loops, there's no difference in behaviour between:

  `for (int i = 0; i < 10; ++i)`
  `for (int i = 0; i < 10; i++)`

Use the C form, `i++`, for consistency.

5 years agomove switch/case break
Richard Russon [Thu, 7 Mar 2019 00:20:01 +0000 (00:20 +0000)]
move switch/case break

Move the `break` inside the {}s of a case statement (for consistency).

5 years agomove group to email
Richard Russon [Fri, 8 Mar 2019 21:45:13 +0000 (21:45 +0000)]
move group to email

group.[ch] have dependencies on Address, so they should live in libemail.

5 years agoDisable all history operations if history is not enabled
Pietro Cerutti [Thu, 7 Mar 2019 12:42:10 +0000 (12:42 +0000)]
Disable all history operations if history is not enabled

Fixes #1592

5 years agoFix composing a new message (again)
Pietro Cerutti [Thu, 7 Mar 2019 08:49:50 +0000 (08:49 +0000)]
Fix composing a new message (again)

The old code had crept in again in 028c34.

5 years agoadd parentheses to conditionals
Richard Russon [Wed, 6 Mar 2019 23:10:14 +0000 (23:10 +0000)]
add parentheses to conditionals

(flatcap discovers uncrustify)

5 years agoifdef: add support for environment variables
Jakub Jindra [Mon, 4 Mar 2019 12:38:51 +0000 (13:38 +0100)]
ifdef: add support for environment variables

This allows the user to make config decisions based on the existence of
environment variables.  e.g.

  ifdef PS1 source interactive.rc

5 years agodrop devel script
Richard Russon [Tue, 5 Mar 2019 12:08:19 +0000 (12:08 +0000)]
drop devel script

Committed by accident

[ci skip]

5 years agomerge: lots of tidying
Richard Russon [Tue, 5 Mar 2019 01:36:41 +0000 (01:36 +0000)]
merge: lots of tidying

 * fp prefix
 * return r
 * return ret
 * return result
 * rename SHA1 contexts
 * rename MD5 contexts
 * create enum SortType
 * add typedef for PatternFlags
 * use enum QuadOption for query_quadoption(), mutt_yesorno()
 * separate enum for mutt_view_attachment()
 * separate enum for mailcap lookups
 * separate enum for mutt_save_attachment()
 * separate enums for pattern types
 * create TreeChar enum for tree characters

5 years agocreate TreeChar enum for tree characters
Richard Russon [Mon, 4 Mar 2019 16:10:19 +0000 (16:10 +0000)]
create TreeChar enum for tree characters

5 years agoseparate enums for pattern types
Richard Russon [Mon, 4 Mar 2019 17:19:25 +0000 (17:19 +0000)]
separate enums for pattern types

5 years agoseparate enum for mutt_save_attachment()
Richard Russon [Mon, 4 Mar 2019 15:37:24 +0000 (15:37 +0000)]
separate enum for mutt_save_attachment()

5 years agoseparate enum for mailcap lookups
Richard Russon [Mon, 4 Mar 2019 15:08:50 +0000 (15:08 +0000)]
separate enum for mailcap lookups

5 years agoseparate enum for mutt_view_attachment()
Richard Russon [Mon, 4 Mar 2019 14:38:07 +0000 (14:38 +0000)]
separate enum for mutt_view_attachment()

5 years agouse enum QuadOption for query_quadoption(), mutt_yesorno()
Richard Russon [Mon, 4 Mar 2019 14:19:06 +0000 (14:19 +0000)]
use enum QuadOption for query_quadoption(), mutt_yesorno()

5 years agoadd typedef for PatternFlags
Richard Russon [Sun, 3 Mar 2019 23:03:00 +0000 (23:03 +0000)]
add typedef for PatternFlags

5 years agocreate enum SortType
Richard Russon [Sun, 3 Mar 2019 20:38:48 +0000 (20:38 +0000)]
create enum SortType

5 years agorename MD5 contexts
Richard Russon [Sun, 3 Mar 2019 16:45:42 +0000 (16:45 +0000)]
rename MD5 contexts

Distinguish MD5 contexts from Context contexts.

5 years agorename SHA1 contexts
Richard Russon [Sun, 3 Mar 2019 16:49:04 +0000 (16:49 +0000)]
rename SHA1 contexts

Distinguish SHA1 contexts from Context contexts.

5 years agoreturn result
Richard Russon [Thu, 28 Feb 2019 17:14:42 +0000 (17:14 +0000)]
return result

5 years agoreturn ret
Richard Russon [Thu, 28 Feb 2019 17:07:16 +0000 (17:07 +0000)]
return ret

5 years agoreturn r
Richard Russon [Thu, 28 Feb 2019 16:56:00 +0000 (16:56 +0000)]
return r

5 years agofp prefix
Richard Russon [Thu, 28 Feb 2019 16:35:39 +0000 (16:35 +0000)]
fp prefix

5 years agoLet ctx_update_tables update the mx size for IMAP emails
Pietro Cerutti [Wed, 27 Feb 2019 12:01:51 +0000 (12:01 +0000)]
Let ctx_update_tables update the mx size for IMAP emails

Issue #1577

5 years agoDecreasing mbox size is done at ctx_update_tables, !active is not used
Pietro Cerutti [Wed, 27 Feb 2019 11:50:15 +0000 (11:50 +0000)]
Decreasing mbox size is done at ctx_update_tables, !active is not used

Issue #1577

5 years agoFix crash when an email disappears from IMAP
Pietro Cerutti [Wed, 27 Feb 2019 11:47:27 +0000 (11:47 +0000)]
Fix crash when an email disappears from IMAP

Issue #1577

5 years agoUpdate to latest autosetup
Pietro Cerutti [Mon, 4 Mar 2019 12:06:38 +0000 (12:06 +0000)]
Update to latest autosetup

5 years agoFix composing a new message
Pietro Cerutti [Mon, 4 Mar 2019 10:10:40 +0000 (10:10 +0000)]
Fix composing a new message

Fixes #1582

5 years agomerge: fix coverity defects
Richard Russon [Sun, 3 Mar 2019 00:56:24 +0000 (00:56 +0000)]
merge: fix coverity defects

 * defect 180847: Pointer to local outside scope
 * defect 189753: Inferred misuse of enum
 * defect 190188: Unchecked return value from library
 * defect 190189: Unchecked return value
 * defect 190190: Dereference before null check
 * defect 190853: Dereference after null check
 * defect 190854: Logical vs. bitwise operator
 * defect 190855: Dereference after null check
 * defect 190856: Overlapping buffer in memory
 * defect 190857: Dereference after null check

5 years agodefect 190857: Dereference after null check
Richard Russon [Sat, 2 Mar 2019 14:57:12 +0000 (14:57 +0000)]
defect 190857: Dereference after null check

5 years agodefect 190856: Overlapping buffer in memory
Richard Russon [Sat, 2 Mar 2019 15:00:21 +0000 (15:00 +0000)]
defect 190856: Overlapping buffer in memory

5 years agodefect 190855: Dereference after null check
Richard Russon [Sat, 2 Mar 2019 15:15:20 +0000 (15:15 +0000)]
defect 190855: Dereference after null check

5 years agodefect 190854: Logical vs. bitwise operator
Richard Russon [Sat, 2 Mar 2019 15:26:20 +0000 (15:26 +0000)]
defect 190854: Logical vs. bitwise operator

5 years agodefect 190853: Dereference after null check
Richard Russon [Sat, 2 Mar 2019 15:28:10 +0000 (15:28 +0000)]
defect 190853: Dereference after null check

5 years agodefect 190190: Dereference before null check
Richard Russon [Sat, 2 Mar 2019 15:33:02 +0000 (15:33 +0000)]
defect 190190: Dereference before null check

5 years agodefect 190189: Unchecked return value
Richard Russon [Sat, 2 Mar 2019 15:35:28 +0000 (15:35 +0000)]
defect 190189: Unchecked return value

5 years agodefect 190188: Unchecked return value from library
Richard Russon [Sat, 2 Mar 2019 15:40:09 +0000 (15:40 +0000)]
defect 190188: Unchecked return value from library

5 years agodefect 189753: Inferred misuse of enum
Richard Russon [Sat, 2 Mar 2019 15:44:52 +0000 (15:44 +0000)]
defect 189753: Inferred misuse of enum

5 years agodefect 180847: Pointer to local outside scope
Richard Russon [Sat, 2 Mar 2019 15:53:18 +0000 (15:53 +0000)]
defect 180847: Pointer to local outside scope

5 years agomerge: trivial tidying
Richard Russon [Sun, 3 Mar 2019 00:49:57 +0000 (00:49 +0000)]
merge: trivial tidying

 * clang-format
 * rename variables: descrip -> desc
 * rename variables: buffer -> buf
 * rename variables: command -> cmd
 * rename variables: progressbar -> progress
 * rename variables: thepid -> pid
 * rename variables: synch -> sync
 * name macro variables
 * lowercase local variables
 * expand meaningless R_BOTH macros
 * tidy mutt_edit_content_type()
 * tidy generate_body()
 * tidy mutt_alias_create()
 * small code tidying
 * boolify variables/params
 * reduce variable scope

5 years agoreduce variable scope
Richard Russon [Thu, 28 Feb 2019 18:36:53 +0000 (18:36 +0000)]
reduce variable scope

5 years agoboolify variables/params
Richard Russon [Thu, 28 Feb 2019 15:13:21 +0000 (15:13 +0000)]
boolify variables/params

5 years agosmall code tidying
Richard Russon [Sat, 2 Mar 2019 15:17:25 +0000 (15:17 +0000)]
small code tidying

- fix typo
- drop once-used define
- rename old_msg_count
- drop unnec parentheses

5 years agotidy mutt_alias_create()
Richard Russon [Thu, 28 Feb 2019 15:30:30 +0000 (15:30 +0000)]
tidy mutt_alias_create()

- return early, reducing indent
- rename variables for clarity

5 years agotidy generate_body()
Richard Russon [Sat, 2 Mar 2019 15:03:50 +0000 (15:03 +0000)]
tidy generate_body()

- fix variable type

5 years agotidy mutt_edit_content_type()
Richard Russon [Sat, 2 Mar 2019 14:12:59 +0000 (14:12 +0000)]
tidy mutt_edit_content_type()

- boolify
- parenthesise

5 years agoexpand meaningless R_BOTH macros
Richard Russon [Thu, 28 Feb 2019 14:06:36 +0000 (14:06 +0000)]
expand meaningless R_BOTH macros

Both what?

- R_BOTH -> R_INDEX | R_PAGER
- R_RESORT_BOTH -> R_RESORT | R_RESORT_SUB

5 years agolowercase local variables
Richard Russon [Thu, 28 Feb 2019 14:00:57 +0000 (14:00 +0000)]
lowercase local variables

Local variables should be lowercase and snake_case.

Consistent variable naming makes the code easier to read.

5 years agoname macro variables
Richard Russon [Thu, 28 Feb 2019 13:52:01 +0000 (13:52 +0000)]
name macro variables

Change macros from:

`#define function(A,B,C) other(A,B,C)`

to

`#define function(ctx,buf,buflen) other(ctx,buf,buflen)`

5 years agorename variables: synch -> sync
Richard Russon [Thu, 28 Feb 2019 14:39:35 +0000 (14:39 +0000)]
rename variables: synch -> sync

Consistent variable naming makes the code easier to read.

5 years agorename variables: thepid -> pid
Richard Russon [Thu, 28 Feb 2019 14:38:28 +0000 (14:38 +0000)]
rename variables: thepid -> pid

Consistent variable naming makes the code easier to read.

5 years agorename variables: progressbar -> progress
Richard Russon [Thu, 28 Feb 2019 14:35:55 +0000 (14:35 +0000)]
rename variables: progressbar -> progress

Consistent variable naming makes the code easier to read.

5 years agorename variables: command -> cmd
Richard Russon [Thu, 28 Feb 2019 14:21:39 +0000 (14:21 +0000)]
rename variables: command -> cmd

Consistent variable naming makes the code easier to read.

5 years agorename variables: buffer -> buf
Richard Russon [Thu, 28 Feb 2019 14:16:33 +0000 (14:16 +0000)]
rename variables: buffer -> buf

Consistent variable naming makes the code easier to read.

5 years agorename variables: descrip -> desc
Richard Russon [Thu, 28 Feb 2019 14:32:05 +0000 (14:32 +0000)]
rename variables: descrip -> desc

Consistent variable naming makes the code easier to read.

5 years agoclang-format
Richard Russon [Sun, 3 Mar 2019 00:04:22 +0000 (00:04 +0000)]
clang-format

5 years agomerge: Define types for more flags/bitfields
Richard Russon [Sat, 2 Mar 2019 13:22:19 +0000 (13:22 +0000)]
merge: Define types for more flags/bitfields

 * imap: rename constants to match capability strings
 * smtp: convert capability enum to flags
 * add typedef for ImapCapFlags
 * add typedef for SmtpCapFlags
 * add typedef for AnsiFlags
 * add typedef for CheckFlags
 * add typedef for MhSeqFlags
 * add typedef for AclFlags
 * add typedef for HashFlags
 * add typedef for MixCapFlags
 * add typedef for CliFlags
 * add typedef for SelectFileFlags

5 years agoadd typedef for SelectFileFlags
Richard Russon [Sat, 2 Mar 2019 12:53:24 +0000 (12:53 +0000)]
add typedef for SelectFileFlags

5 years agoadd typedef for CliFlags
Richard Russon [Sat, 2 Mar 2019 12:45:19 +0000 (12:45 +0000)]
add typedef for CliFlags