]> granicus.if.org Git - neomutt/log
neomutt
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

5 years agoadd typedef for MixCapFlags
Richard Russon [Sat, 2 Mar 2019 12:33:06 +0000 (12:33 +0000)]
add typedef for MixCapFlags

5 years agoadd typedef for HashFlags
Richard Russon [Sat, 2 Mar 2019 12:21:07 +0000 (12:21 +0000)]
add typedef for HashFlags

5 years agoadd typedef for AclFlags
Richard Russon [Sat, 2 Mar 2019 12:15:56 +0000 (12:15 +0000)]
add typedef for AclFlags

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

5 years agoadd typedef for CheckFlags
Richard Russon [Fri, 1 Mar 2019 21:52:01 +0000 (21:52 +0000)]
add typedef for CheckFlags

5 years agoadd typedef for AnsiFlags
Richard Russon [Fri, 1 Mar 2019 21:27:01 +0000 (21:27 +0000)]
add typedef for AnsiFlags

5 years agoadd typedef for SmtpCapFlags
Richard Russon [Sat, 2 Mar 2019 13:01:22 +0000 (13:01 +0000)]
add typedef for SmtpCapFlags

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

5 years agosmtp: convert capability enum to flags
Richard Russon [Fri, 1 Mar 2019 17:48:10 +0000 (17:48 +0000)]
smtp: convert capability enum to flags

5 years agoimap: rename constants to match capability strings
Richard Russon [Fri, 1 Mar 2019 17:40:58 +0000 (17:40 +0000)]
imap: rename constants to match capability strings

5 years agomerge: Define types for all of the flags/bitfields.
Richard Russon [Fri, 1 Mar 2019 13:26:44 +0000 (13:26 +0000)]
merge: Define types for all of the flags/bitfields.

Being 'C' this doesn't add any type safety, but it does make the code far more legible.<Paste>

 * add typedef for ConfigDumpFlags
 * add typedef for ConfigRedrawFlags
 * add typedef for MuttFormatFlags
 * add typedef for HookFlags
 * add typedef for ImapOpenFlags
 * add typedef for ImapCmdFlags
 * add typedef for MuttAccountFlags
 * add typedef for CompletionFlags
 * add typedef for TokenFlags
 * add typedef for MuttRedrawFlags
 * add typedef for MuttThreadFlags
 * add typedef for OpenMailboxFlags
 * add typedef for MsgOpenFlags
 * add typedef for PagerFlags
 * add typedef for SendFlags
 * add typedef for StateFlags
 * add typedef for KeyFlags
 * add typedef for SecurityFlags
 * add typedef for CopyHeaderFlags
 * add typedef for CopyMessageFlags

5 years agoadd typedef for CopyMessageFlags 1578/head
Richard Russon [Wed, 27 Feb 2019 00:53:51 +0000 (00:53 +0000)]
add typedef for CopyMessageFlags

5 years agoadd typedef for CopyHeaderFlags
Richard Russon [Wed, 27 Feb 2019 00:51:16 +0000 (00:51 +0000)]
add typedef for CopyHeaderFlags

5 years agoadd typedef for SecurityFlags
Richard Russon [Wed, 27 Feb 2019 00:16:33 +0000 (00:16 +0000)]
add typedef for SecurityFlags

5 years agoadd typedef for KeyFlags
Richard Russon [Wed, 27 Feb 2019 00:14:30 +0000 (00:14 +0000)]
add typedef for KeyFlags

5 years agoadd typedef for StateFlags
Richard Russon [Tue, 26 Feb 2019 23:45:54 +0000 (23:45 +0000)]
add typedef for StateFlags

5 years agoadd typedef for SendFlags
Richard Russon [Tue, 26 Feb 2019 23:44:53 +0000 (23:44 +0000)]
add typedef for SendFlags

5 years agoadd typedef for PagerFlags
Richard Russon [Tue, 26 Feb 2019 23:42:57 +0000 (23:42 +0000)]
add typedef for PagerFlags

5 years agoadd typedef for MsgOpenFlags
Richard Russon [Tue, 26 Feb 2019 23:42:08 +0000 (23:42 +0000)]
add typedef for MsgOpenFlags

5 years agoadd typedef for OpenMailboxFlags
Richard Russon [Tue, 26 Feb 2019 23:41:01 +0000 (23:41 +0000)]
add typedef for OpenMailboxFlags

5 years agoadd typedef for MuttThreadFlags
Richard Russon [Tue, 26 Feb 2019 23:39:05 +0000 (23:39 +0000)]
add typedef for MuttThreadFlags

5 years agoadd typedef for MuttRedrawFlags
Richard Russon [Tue, 26 Feb 2019 23:38:28 +0000 (23:38 +0000)]
add typedef for MuttRedrawFlags

5 years agoadd typedef for TokenFlags
Richard Russon [Tue, 26 Feb 2019 23:35:52 +0000 (23:35 +0000)]
add typedef for TokenFlags

5 years agoadd typedef for CompletionFlags
Richard Russon [Tue, 26 Feb 2019 23:35:15 +0000 (23:35 +0000)]
add typedef for CompletionFlags

5 years agoadd typedef for MuttAccountFlags
Richard Russon [Tue, 26 Feb 2019 23:34:26 +0000 (23:34 +0000)]
add typedef for MuttAccountFlags

5 years agoadd typedef for ImapCmdFlags
Richard Russon [Tue, 26 Feb 2019 23:33:59 +0000 (23:33 +0000)]
add typedef for ImapCmdFlags

5 years agoadd typedef for ImapOpenFlags
Richard Russon [Tue, 26 Feb 2019 23:32:03 +0000 (23:32 +0000)]
add typedef for ImapOpenFlags

5 years agoadd typedef for HookFlags
Richard Russon [Tue, 26 Feb 2019 23:31:02 +0000 (23:31 +0000)]
add typedef for HookFlags

5 years agoadd typedef for MuttFormatFlags
Richard Russon [Tue, 26 Feb 2019 23:29:50 +0000 (23:29 +0000)]
add typedef for MuttFormatFlags

5 years agoadd typedef for ConfigRedrawFlags
Richard Russon [Tue, 26 Feb 2019 23:23:19 +0000 (23:23 +0000)]
add typedef for ConfigRedrawFlags

5 years agoadd typedef for ConfigDumpFlags
Richard Russon [Tue, 26 Feb 2019 23:22:26 +0000 (23:22 +0000)]
add typedef for ConfigDumpFlags

5 years agomerge: Replace STRING constants
Richard Russon [Fri, 1 Mar 2019 13:06:29 +0000 (13:06 +0000)]
merge: Replace STRING constants

Constants like LONG_STRING aren't meaningful to anyone, so replace them
with their numeric equivalents.

 * replace SHORT_STRING with 128
 * replace STRING with 256
 * replace LONG_STRING with 1024
 * replace HUGE_STRING with 8192 or STR_COMMAND

5 years agoreplace HUGE_STRING with 8192 or STR_COMMAND 1576/head
Richard Russon [Sat, 23 Feb 2019 13:22:17 +0000 (13:22 +0000)]
replace HUGE_STRING with 8192 or STR_COMMAND

5 years agoreplace LONG_STRING with 1024
Richard Russon [Sat, 23 Feb 2019 12:31:54 +0000 (12:31 +0000)]
replace LONG_STRING with 1024

5 years agoreplace STRING with 256
Richard Russon [Sat, 23 Feb 2019 12:17:13 +0000 (12:17 +0000)]
replace STRING with 256

5 years agoreplace SHORT_STRING with 128
Richard Russon [Sat, 23 Feb 2019 11:58:14 +0000 (11:58 +0000)]
replace SHORT_STRING with 128

5 years agoconfig: add 'C_' prefix 1575/head
Richard Russon [Fri, 22 Feb 2019 21:01:47 +0000 (21:01 +0000)]
config: add 'C_' prefix

Each config variable has a global variable backing it.
The name of the global is the MixedCase transform of the config name.
While this is useful for remembering their names, it makes some
variables hard to search for, giving many false positives.

- Copy
- From
- Help
- Move
- Sort

Prefixing the globals with `C_` prevents this problem.

5 years agouse EmailList for piping and printing messages
Richard Russon [Fri, 1 Mar 2019 12:39:15 +0000 (12:39 +0000)]
use EmailList for piping and printing messages

5 years agoFix mutt_pipe_message() and mutt_print_message()
Richard Russon [Thu, 28 Feb 2019 23:51:27 +0000 (23:51 +0000)]
Fix mutt_pipe_message() and mutt_print_message()

A discrepancy in the prototype and the function lead to these functions
crashing.

Fixes: #1579
5 years agobuild: fix fmemopen
Richard Russon [Wed, 27 Feb 2019 23:48:25 +0000 (23:48 +0000)]
build: fix fmemopen

Thanks to @vinpublic

5 years agounify the naming of chflags/cmflags
Richard Russon [Wed, 27 Feb 2019 21:06:36 +0000 (21:06 +0000)]
unify the naming of chflags/cmflags

Most functions used `chflags` for header flags and `cmflags` for message
flags.  Now they all do.

5 years agomerge: trivial fixes
Richard Russon [Wed, 27 Feb 2019 15:19:48 +0000 (15:19 +0000)]
merge: trivial fixes

 * insert space to help parsing
 * fix backing global variable for config
 * doxy: fix typos
 * drop dupe prototype
 * lowercase variable
 * doxygen: update docs for #defines
 * add a 'SEC_' prefix to the security flags
 * rename State's members for better legibility
 * rename enum MenuTypes to MenuType
 * convert config dump defines into an enum
 * convert format flags enum into an int
 * tidy mutt_menu_new()

5 years agotidy mutt_menu_new()
Richard Russon [Mon, 25 Feb 2019 23:59:04 +0000 (23:59 +0000)]
tidy mutt_menu_new()

Rename the function parameter and the local variable to be clearer.

5 years agoconvert format flags enum into an int
Richard Russon [Mon, 25 Feb 2019 23:28:52 +0000 (23:28 +0000)]
convert format flags enum into an int

This wasn't really an enumeration, but a set of flags.

5 years agoconvert config dump defines into an enum
Richard Russon [Mon, 25 Feb 2019 23:24:48 +0000 (23:24 +0000)]
convert config dump defines into an enum

5 years agorename enum MenuTypes to MenuType
Richard Russon [Mon, 25 Feb 2019 23:07:55 +0000 (23:07 +0000)]
rename enum MenuTypes to MenuType

When dealing with an enum, you have a single value.

5 years agorename State's members for better legibility
Richard Russon [Mon, 25 Feb 2019 22:59:24 +0000 (22:59 +0000)]
rename State's members for better legibility

5 years agoadd a 'SEC_' prefix to the security flags
Richard Russon [Mon, 25 Feb 2019 22:17:44 +0000 (22:17 +0000)]
add a 'SEC_' prefix to the security flags

Symbols like 'SIGN' and 'INLINE' are hard to search for.

5 years agodoxygen: update docs for #defines
Richard Russon [Mon, 25 Feb 2019 21:15:01 +0000 (21:15 +0000)]
doxygen: update docs for #defines

5 years agolowercase variable
Richard Russon [Sun, 24 Feb 2019 16:39:12 +0000 (16:39 +0000)]
lowercase variable

Local variables should be lowercase.

5 years agodrop dupe prototype
Richard Russon [Sun, 24 Feb 2019 16:45:27 +0000 (16:45 +0000)]
drop dupe prototype

5 years agodoxy: fix typos
Richard Russon [Sun, 24 Feb 2019 16:43:22 +0000 (16:43 +0000)]
doxy: fix typos

5 years agofix backing global variable for config
Richard Russon [Sun, 24 Feb 2019 16:41:48 +0000 (16:41 +0000)]
fix backing global variable for config

Global name didn't match config name.

5 years agoinsert space to help parsing
Richard Russon [Sun, 24 Feb 2019 16:38:15 +0000 (16:38 +0000)]
insert space to help parsing

5 years agorelease: fix build tests
Richard Russon [Wed, 20 Feb 2019 17:41:44 +0000 (17:41 +0000)]
release: fix build tests

5 years agomerge: Use symbolic log levels
Richard Russon [Wed, 20 Feb 2019 15:56:46 +0000 (15:56 +0000)]
merge: Use symbolic log levels

 * Factor out awful inline code for logging binary buffer
 * Align numeric log level arguments
 * Adjust symbolic logging levels to avoid level 4, to be PROGRESS
 * Fix wrong calculation of remaining length in nntp_log_binbuf
 * Start replacing numeric loglevels with symbolic.

5 years agoStart replacing numeric loglevels with symbolic. 1570/head
Ian Zimmerman [Sat, 9 Feb 2019 21:11:24 +0000 (13:11 -0800)]
Start replacing numeric loglevels with symbolic.

This commit moves `mutt_debug(1, ...)` to `mutt_debug(LL_DEBUG1, ...)`

5 years agoFix wrong calculation of remaining length in nntp_log_binbuf
Ian Zimmerman [Sat, 9 Feb 2019 05:46:48 +0000 (21:46 -0800)]
Fix wrong calculation of remaining length in nntp_log_binbuf

An even better way to write nntp_log_binbuf

5 years agoAdjust symbolic logging levels to avoid level 4, to be PROGRESS
Ian Zimmerman [Fri, 8 Feb 2019 19:40:43 +0000 (11:40 -0800)]
Adjust symbolic logging levels to avoid level 4, to be PROGRESS

Adjust remaining uses of symbolic loglevels.

Mostly this means changing mutt_socket_readln to mutt_socket_readln_d
with MUTT_SOCK_LOG_FULL in cases where (in my very limited understanding)
private information *might* be logged.

5 years agoAlign numeric log level arguments
Ian Zimmerman [Fri, 8 Feb 2019 17:34:39 +0000 (09:34 -0800)]
Align numeric log level arguments

5 years agoFactor out awful inline code for logging binary buffer
Ian Zimmerman [Fri, 8 Feb 2019 19:49:17 +0000 (11:49 -0800)]
Factor out awful inline code for logging binary buffer

5 years agomerge: upstream changes
Richard Russon [Wed, 20 Feb 2019 00:55:12 +0000 (00:55 +0000)]
merge: upstream changes

 * Fix compilation with LibreSSL <2.7.0
 * Add attributes support on color declarations
 * Wrap ssl init calls for LibreSSL too
 * Change $pgp_use_gpg_agent to default set
 * Fix gnutls tls_socket_write() to properly retry
 * Fix tunnels to also retry and write full buffer
 * Improve attachment menu for s/mime parts
 * Simplify nested smime handling in the attachment menu
 * Show top-level decoded smime text/plain parts
 * Allow descending into maildir and mh directories in file browser
 * Add an error message for <descend-directory>
 * Updated French translation
 * Create <group-chat-reply> function
 * Updated French translation
 * Add mutt_buffer_len() helper
 * Add mutt_buffer helpers for base64 conversion
 * Change auth_gss to to use buffers and the buffer pool
 * Check the base64 decoding retval in auth_gss

5 years agoCheck the base64 decoding retval in auth_gss
Kevin McCarthy [Wed, 13 Feb 2019 03:04:28 +0000 (19:04 -0800)]
Check the base64 decoding retval in auth_gss

Abort if the value is not decodable.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange auth_gss to to use buffers and the buffer pool
Kevin McCarthy [Wed, 13 Feb 2019 00:41:07 +0000 (16:41 -0800)]
Change auth_gss to to use buffers and the buffer pool

Ticket #100 revealed that even a bufsize of 8192 isn't guaranteed to
be big enough.  Convert those large buffers to use the buffer pool
instead.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd mutt_buffer helpers for base64 conversion
Kevin McCarthy [Tue, 12 Feb 2019 23:58:13 +0000 (15:58 -0800)]
Add mutt_buffer helpers for base64 conversion

Add mutt_buffer_from_base64() mutt_buffer_to_base64() to help with
transitioning to buffers.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd mutt_buffer_len() helper
Kevin McCarthy [Tue, 12 Feb 2019 23:48:09 +0000 (15:48 -0800)]
Add mutt_buffer_len() helper

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoUpdated French translation
Vincent Lefevre [Wed, 6 Feb 2019 12:58:42 +0000 (13:58 +0100)]
Updated French translation

Co-authored-by: Richard Russon <rich@flatcap.org>