Floyd Anderson [Thu, 19 Apr 2018 03:42:01 +0000 (05:42 +0200)]
Reformat <para> elements: indentation/wrapping
...and tidy dashes, trailing whitespace, try to fix all spaces around
brackets and punctuation marks etc., e.g. keep link tags on the same
line to avoid an underlined space after hyperlinks in rendered result.
Floyd Anderson [Wed, 18 Apr 2018 03:37:24 +0000 (05:37 +0200)]
Reformat <screen> elements: too long or multi lines
...and tidy comments, dashes, potential Vim modelines, whitespace.
Floyd Anderson [Tue, 17 Apr 2018 21:15:03 +0000 (23:15 +0200)]
Add Vim modeline
Richard Russon [Thu, 19 Apr 2018 16:13:51 +0000 (17:13 +0100)]
doxygen: Add lots of new comment blocks
Richard Russon [Thu, 19 Apr 2018 16:38:59 +0000 (17:38 +0100)]
doxygen: Fix, improve, tidy comment blocks
Richard Russon [Tue, 17 Apr 2018 20:45:40 +0000 (21:45 +0100)]
merge: minor changes
* Add a comment in auth_gss about RFCs and null-termination.
* validate docs
* fix the case of some variables
* rename convert_to_7bit
* doxy: add headers
Richard Russon [Thu, 12 Apr 2018 10:00:59 +0000 (11:00 +0100)]
doxy: add headers
Richard Russon [Tue, 17 Apr 2018 19:35:23 +0000 (20:35 +0100)]
rename convert_to_7bit
Richard Russon [Sat, 14 Apr 2018 15:00:30 +0000 (16:00 +0100)]
fix the case of some variables
Richard Russon [Thu, 12 Apr 2018 22:36:05 +0000 (23:36 +0100)]
validate docs
Kevin McCarthy [Sun, 15 Apr 2018 22:57:28 +0000 (15:57 -0700)]
Add a comment in auth_gss about RFCs and null-termination.
Richard Russon [Sun, 15 Apr 2018 20:37:34 +0000 (21:37 +0100)]
Document the config priority
Richard Russon [Mon, 9 Apr 2018 17:08:24 +0000 (18:08 +0100)]
Adjust the precedence of some more config items
Pietro Cerutti [Thu, 12 Apr 2018 09:58:59 +0000 (09:58 +0000)]
Let config file have precedence over environment
Issue #1140
Pietro Cerutti [Tue, 20 Feb 2018 13:34:14 +0000 (13:34 +0000)]
add support for idn2 (IDNA2008)
Kevin McCarthy [Sat, 14 Apr 2018 03:39:35 +0000 (20:39 -0700)]
Improve gss debug printing of status_string.
Commit
f52ee2f7 ensured the debug strings were properly '\0'
terminated. However, it did not prevent the strncpy from reading past
the end of the status_string.value data; it simply capped it
afterwards. Improve the code so it only reads up to
status_string.length without overwriting the buffer.
Kevin McCarthy [Sat, 14 Apr 2018 02:03:29 +0000 (19:03 -0700)]
Remove trailing null count from gss_buffer_desc.length field.
RFC 2744 section 3.2.2 clearly states that trailing NULL characters
are not to be included in the length field, and are not to be assumed
to be present in the value field.
Thanks to Greg Hudson, who recently debugged this same issue with
fetchmail, and kindly took the time to look at Mutt's code too.
Joey Pabalinas [Thu, 12 Apr 2018 09:05:17 +0000 (23:05 -1000)]
minor IMAP string handling fixes
Richard Russon [Thu, 12 Apr 2018 09:00:49 +0000 (10:00 +0100)]
merge: improvements to libconn
* replace mutt_socket_write_d by mutt_socket_send_d
* rename mutt_socket_write to mutt_socket_send
* introduce mutt_socket_{read,write}
* don't try to determine buffer size if length was negative
* rename socket_new_conn to mutt_socket_new
* define mutt_ssl_socket_setup even when building without SSL
* move mutt_socket_free to conn/socket.c
* let mutt_socket_new add Connection to the list
* move Connections declaration to conn/socket.c
* add parameter to mutt_socket_new to specify socket type
* move raw connection to its own file
* conn/ssl.c: rename local var data to ssldata
* factorise ssl_socket_open and mutt_ssl_starttls
* rename tls_close to ssl_socket_close_and_restore
Damien Riegel [Wed, 8 Nov 2017 23:42:29 +0000 (18:42 -0500)]
conn: rename tls_close to ssl_socket_close_and_restore
Damien Riegel [Wed, 8 Nov 2017 22:55:06 +0000 (17:55 -0500)]
conn: factorise ssl_socket_open and mutt_ssl_starttls
It was in the TODO of mutt_ssl_starttls, so let's do this! The main
difference is that mutt_ssl_starttls now respects options
OPT_SSL_USE_SSLV2 and OPT_SSL_USE_SSLV3. These options default to 0, so
it should have no impacts for users who didn't explicitely set these
options in their config. And if they did, they should be aware of the
security concerns already.
Damien Riegel [Wed, 8 Nov 2017 22:08:52 +0000 (17:08 -0500)]
conn/ssl.c: rename local var data to ssldata
Damien Riegel [Wed, 8 Nov 2017 21:14:34 +0000 (16:14 -0500)]
conn: move raw connection to its own file
Damien Riegel [Wed, 8 Nov 2017 21:08:23 +0000 (16:08 -0500)]
conn: add parameter to mutt_socket_new to specify socket type
It's currently the responsibility of mutt_conn_find to setup the
Connection, but this should really be done by mutt_socket_new, as it's
part of the socket initialization. To let it know which kind of
Connection it should create, add a parameter to allow callers to
specify the type.
Damien Riegel [Wed, 8 Nov 2017 20:25:42 +0000 (15:25 -0500)]
move Connections declaration to conn/socket.c
Functions responsible for adding and removing entries to Connections
(the Connection list) are in conn/socket.c, so it makes sense to move
it there too.
Also change mutt_conn_find to use the accessor instead of the global
variable, so it can be made static again.
Damien Riegel [Wed, 8 Nov 2017 20:48:44 +0000 (15:48 -0500)]
conn: let mutt_socket_new add Connection to the list
mutt_socket_new is followed by a call to TAILQ_INSERT_HEAD; and
mutt_socket_free takes care of removing the Connection from the
Connection list. Make these two more in pair by making mutt_socket_new
adds the newly created Connection to the connection list.
Damien Riegel [Wed, 8 Nov 2017 20:47:35 +0000 (15:47 -0500)]
move mutt_socket_free to conn/socket.c
mutt_socket_new is in conn/socket.c, mutt_socket_free is in
mutt_socket.c. Let's move these two together. "Connections" is made
global during the transition to keep the diffs more straightforward.
Damien Riegel [Wed, 8 Nov 2017 20:26:39 +0000 (15:26 -0500)]
conn: define mutt_ssl_socket_setup even when building without SSL
Error conditions were duplicated for builds with and without SSL. This
can be factorized by letting mutt_ssl_socket_setup be defined even when
SSL is not enabled.
Damien Riegel [Wed, 8 Nov 2017 20:44:41 +0000 (15:44 -0500)]
conn: rename socket_new_conn to mutt_socket_new
Make this function be in the same "namespace" as other Connection
related functions by making its prefix be "mutt_socket".
Damien Riegel [Wed, 8 Nov 2017 15:53:36 +0000 (10:53 -0500)]
conn: don't try to determine buffer size if length was negative
It's caller's responsibility to pass the correct buffer size.
Damien Riegel [Wed, 8 Nov 2017 15:52:45 +0000 (10:52 -0500)]
conn: introduce mutt_socket_{read,write}
Damien Riegel [Wed, 8 Nov 2017 15:29:23 +0000 (10:29 -0500)]
conn: rename mutt_socket_write to mutt_socket_send
For consistency, and as the buffer size is not passed to this function,
rename it to use "send" instead of "write". This frees
"mutt_socket_write" symbol, so we will be able to reuse it as a wrapper
over conn->conn_write.
Damien Riegel [Wed, 8 Nov 2017 15:44:19 +0000 (10:44 -0500)]
conn: replace mutt_socket_write_d by mutt_socket_send_d
Every occurrence of mutt_socket_write_d used -1 as buffer size. Wrap
these calls in a new macro mutt_socket_send_d. Keep "write" for
functions where the size is passed as parameter.
Christian Ebert [Fri, 30 Mar 2018 12:37:54 +0000 (13:37 +0100)]
pager specific "show incoming mailboxes list" macro
Exiting the pager before change-folder avoids 'Not available in this
menu' error when selecting a different entry in some circumstances.
[ci skip]
Richard Russon [Thu, 12 Apr 2018 08:27:14 +0000 (09:27 +0100)]
merge: small cleanups
* add missing extern
* rename OPT_ variables
* comment list functions
* comment and reorder params
* history: move static functions first
* history: tidy/sync functions
* history: free resources
* free resources
rawtaz [Wed, 11 Apr 2018 11:40:43 +0000 (13:40 +0200)]
Clarify the relation between NeoMutt and Mutt
Fixes a discrepancy between the website and this README on the topic of "is it a fork?".
Pietro Cerutti [Wed, 11 Apr 2018 14:01:57 +0000 (15:01 +0100)]
Let mutt_ch_choose report conversion failure (#1137)
* Let mutt_ch_choose report conversion failure
Issue #1136
* Let mutt_ch_convert_string return errno if iconv(..) fails
Previously, mutt_ch_convert_string returned error only if any arguments
failed the sanity check or iconv_open() failed.
With this change, an error value is returned even if the iconv()
conversion fails, such as when the input string contains an invalid
character in the source character set (EILSEQ).
I have looked at each caller and it seems to me that this change won't
introduce any misbehaviour, but I'm far from being 100% confident.
Issue #1136
* test int functions against 0
* Better error reporting in mutt_ch_iconv
Issue #1136
Richard Russon [Sat, 7 Apr 2018 23:00:09 +0000 (00:00 +0100)]
free resources
Reis Radomil [Fri, 6 Apr 2018 01:55:51 +0000 (01:55 +0000)]
doc: Describe logging capabilities of NeoMutt
Describe the logging capabilities of NeoMutt in the User Guide. The
section currently covers the different log message types (perror, error,
warning, informational debug), where they are shown and how to enable
debug log messages.
Reis Radomil [Sun, 1 Apr 2018 13:31:16 +0000 (13:31 +0000)]
Rename <show-messages> to <show-log-messages>
Rename the function <show-messages> to <show-log-messages> as well as
its symbolic constant OP_SHOW_MESSAGES to OP_SHOW_LOG_MESSAGES.
Background is that 'messages' (in the context of neomutt) refers usually
to emails instead of log messages.
Reis Radomil [Sun, 1 Apr 2018 13:31:16 +0000 (13:31 +0000)]
Describe <show-messages> more precisely
The term 'message' is used for log-messages as well as for ordinary
mails. In the help 'message' usually means an email. Adjust the
description of <show-message>/OP_SHOW_MESSAGE to clarify that log and
debug messages are meant.
Reis Radomil [Sun, 1 Apr 2018 04:23:21 +0000 (04:23 +0000)]
Remove reminiscent of txt2c
txt2c is replaced by a routine in the configure/autosetup script.
Update .gitignore accordingly.
Pietro Cerutti [Fri, 6 Apr 2018 09:10:46 +0000 (09:10 +0000)]
Generate .clang_complete
For users of https://github.com/Rip-Rip/clang_complete, this allows to
always keep the .clang_complete file in sync with CFLAGS.
Pietro Cerutti [Thu, 5 Apr 2018 11:20:31 +0000 (12:20 +0100)]
Build: restructure ncurses/tinfo checks (#1119)
* Build: restructure ncurses/tinfo checks
Issue #1118
* Fallback to ncurses library for tgetent
This fixes the configure phase in NetBSD, which doesn't have a separate
tinfo library in base.
Issue #1118
Richard Russon [Wed, 4 Apr 2018 11:14:56 +0000 (12:14 +0100)]
history: free resources
Richard Russon [Wed, 4 Apr 2018 11:14:46 +0000 (12:14 +0100)]
history: tidy/sync functions
- sync format_str and menu_entry functions
- reduce scope of variables
- document functions
Richard Russon [Wed, 4 Apr 2018 11:13:26 +0000 (12:13 +0100)]
history: move static functions first
Richard Russon [Sat, 7 Apr 2018 22:59:34 +0000 (23:59 +0100)]
comment and reorder params
Richard Russon [Sat, 7 Apr 2018 22:57:26 +0000 (23:57 +0100)]
comment list functions
Richard Russon [Sun, 8 Apr 2018 01:38:57 +0000 (02:38 +0100)]
rename OPT_ variables
Richard Russon [Thu, 5 Apr 2018 00:10:04 +0000 (01:10 +0100)]
add missing extern
Richard Russon [Tue, 3 Apr 2018 16:59:46 +0000 (17:59 +0100)]
merge: fix cppcheck warnings
* reduce scope of variables
* printf format
* make logic clearer
* misc fixes
* match prototypes to their functions
Richard Russon [Tue, 3 Apr 2018 13:31:51 +0000 (14:31 +0100)]
cppcheck: match prototypes to their functions
Richard Russon [Tue, 3 Apr 2018 13:00:25 +0000 (14:00 +0100)]
cppcheck: misc
Richard Russon [Tue, 3 Apr 2018 12:53:14 +0000 (13:53 +0100)]
cppcheck: make logic clearer
Richard Russon [Tue, 3 Apr 2018 12:49:15 +0000 (13:49 +0100)]
cppcheck: printf format
Richard Russon [Sun, 1 Apr 2018 18:49:52 +0000 (19:49 +0100)]
split out progress functions
Richard Russon [Sun, 1 Apr 2018 04:12:17 +0000 (05:12 +0100)]
split out window functions
Richard Russon [Sun, 1 Apr 2018 02:33:43 +0000 (03:33 +0100)]
split out terminal setting
Richard Russon [Tue, 3 Apr 2018 16:58:50 +0000 (17:58 +0100)]
merge: rename functions for consistency
* body functions
* header functions
* enter_state functions
* alias functions
* menu functions
* rfc822 functions
Richard Russon [Tue, 3 Apr 2018 16:58:22 +0000 (17:58 +0100)]
merge: light tidying
* test ints against 0
* test int functions against 0
* tidy comments / docs
* tidy mutt_str_strdup
* tidy uses of mutt_str_getenv
Richard Russon [Tue, 3 Apr 2018 16:48:38 +0000 (17:48 +0100)]
merge: refactor config parsing on startup
* nntp config
* mailcap config
* tmpdir config
* editor, visual config
* separate get from set Charset
Richard Russon [Sat, 31 Mar 2018 18:07:28 +0000 (19:07 +0100)]
refactor: separate get from set Charset
Richard Russon [Fri, 30 Mar 2018 15:55:12 +0000 (16:55 +0100)]
refactor: editor, visual config
Precedence: environment, config, code
Richard Russon [Fri, 30 Mar 2018 14:15:50 +0000 (15:15 +0100)]
refactor: tmpdir config
Precedence: environment, config, code
Richard Russon [Fri, 30 Mar 2018 13:13:39 +0000 (14:13 +0100)]
refactor: mailcap config
Precedence: environment, config file, code
Richard Russon [Fri, 30 Mar 2018 12:25:20 +0000 (13:25 +0100)]
refactor: nntp config
Precedence: command line, environment, config file, system file
Richard Russon [Sun, 1 Apr 2018 17:48:49 +0000 (18:48 +0100)]
rename rfc822 functions
Richard Russon [Sun, 1 Apr 2018 03:30:33 +0000 (04:30 +0100)]
rename menu functions
Richard Russon [Sun, 1 Apr 2018 02:48:38 +0000 (03:48 +0100)]
rename alias functions
Richard Russon [Sun, 1 Apr 2018 02:38:33 +0000 (03:38 +0100)]
rename enter_state functions
Richard Russon [Sun, 1 Apr 2018 01:36:48 +0000 (02:36 +0100)]
rename header functions
Richard Russon [Sun, 1 Apr 2018 01:31:40 +0000 (02:31 +0100)]
rename body functions
Pietro Cerutti [Fri, 30 Mar 2018 15:11:29 +0000 (15:11 +0000)]
Enhance neomutt -v with NCURSES_VERSION_PATCH
Richard Russon [Fri, 30 Mar 2018 12:49:23 +0000 (13:49 +0100)]
tidy uses of mutt_str_getenv
Richard Russon [Fri, 30 Mar 2018 12:32:26 +0000 (13:32 +0100)]
tidy mutt_str_strdup
Richard Russon [Thu, 29 Mar 2018 21:50:00 +0000 (22:50 +0100)]
refactor: startup hostname
Delay the code that finds the FQDN until after the config and command
line have been processed.
This means that some users, with mis-configured network lookups, can work
around a long timeout during startup.
Richard Russon [Thu, 29 Mar 2018 15:40:03 +0000 (16:40 +0100)]
refactor: move the envlist code to the library
The envlist code keeps a private copy of the environment.
Richard Russon [Wed, 28 Mar 2018 22:21:56 +0000 (23:21 +0100)]
tidy comments / docs
Richard Russon [Wed, 28 Mar 2018 19:16:13 +0000 (20:16 +0100)]
test int functions against 0
Richard Russon [Wed, 28 Mar 2018 17:24:23 +0000 (18:24 +0100)]
cppcheck: reduce scope of variables
Richard Russon [Wed, 28 Mar 2018 17:21:30 +0000 (18:21 +0100)]
test ints against 0
Pietro Cerutti [Wed, 28 Mar 2018 07:33:15 +0000 (07:33 +0000)]
build: fix bmake's lack of variable expansion in "include" lines
Richard Russon [Wed, 28 Mar 2018 03:31:02 +0000 (04:31 +0100)]
slang: don't endwin() if slang wasn't started
Richard Russon [Wed, 28 Mar 2018 02:28:08 +0000 (03:28 +0100)]
merge: trivial improvements
* docs: update README
* sort switch cases
* sort option definitions
* sort colour fields
* remove unused variables
* initialise variables
* iwyu: fix #include usage
* docs: add missing comment
* refactor spanning ifs
* check for null pointer
Richard Russon [Wed, 28 Mar 2018 01:36:40 +0000 (02:36 +0100)]
check for null pointer
Richard Russon [Wed, 21 Mar 2018 16:28:39 +0000 (16:28 +0000)]
refactor spanning ifs
Refactor an `if` that spans an entire function, to return early.
Richard Russon [Wed, 21 Mar 2018 01:27:04 +0000 (01:27 +0000)]
docs: add missing comment
Richard Russon [Wed, 21 Mar 2018 01:25:43 +0000 (01:25 +0000)]
iwyu: fix #include usage
Richard Russon [Tue, 27 Mar 2018 17:43:01 +0000 (18:43 +0100)]
build: fix dependencies for test dir
Richard Russon [Sun, 25 Mar 2018 02:30:11 +0000 (03:30 +0100)]
initialise variables
scan-build warns that these variables may not get set elsewhere
Richard Russon [Sun, 25 Mar 2018 02:28:49 +0000 (03:28 +0100)]
remove unused variables
Remove variables that are set, but not used again.
Richard Russon [Tue, 27 Mar 2018 21:26:47 +0000 (22:26 +0100)]
sort colour fields
Richard Russon [Wed, 21 Mar 2018 13:33:43 +0000 (13:33 +0000)]
sort option definitions
Richard Russon [Tue, 27 Mar 2018 22:43:52 +0000 (23:43 +0100)]
sort switch cases
There are no code changes here.
The 'case' statements have been sorted where:
- There's a clear order, e.g. alphabetical
- Where they all have break/return statements
Richard Russon [Wed, 28 Mar 2018 00:18:44 +0000 (01:18 +0100)]
docs: update README
- links contributors
- add shields
Richard Russon [Tue, 27 Mar 2018 02:40:15 +0000 (03:40 +0100)]
convert init.h
Another (small) step towards the new config system
Richard Russon [Tue, 27 Mar 2018 02:40:07 +0000 (03:40 +0100)]
lua: fix variable getting/setting
Pietro Cerutti [Tue, 27 Mar 2018 16:49:55 +0000 (16:49 +0000)]
acutest: update with latest upstream (documentation fixes)
Richard Russon [Fri, 23 Mar 2018 23:44:43 +0000 (23:44 +0000)]
fix Notmuch deprecation warning
We need to distinguish between two versions of `notmuch.h`.
Both declare that they are v5.0.0. They are:
- libnotmuch 5.0 (Notmuch 0.25)
- `notmuch_database_add_message()` is a normal function
- `notmuch_database_index_file()` doesn't exist
- libnotmuch 5.1 (Notmuch 0.26)
- `notmuch_database_add_message()` is **deprecated**
- `notmuch_database_index_file()` exists
To work around this, we check for `notmuch_database_index_file()` specifically.