]> granicus.if.org Git - neomutt/log
neomutt
7 years agocheck_idn
Richard Russon [Tue, 11 Apr 2017 17:08:55 +0000 (18:08 +0100)]
check_idn

7 years agocheck_for_mailing_list
Richard Russon [Tue, 11 Apr 2017 11:55:55 +0000 (12:55 +0100)]
check_for_mailing_list

7 years agocheck_certificate_expiration
Richard Russon [Mon, 10 Apr 2017 23:30:00 +0000 (00:30 +0100)]
check_certificate_expiration

7 years agocheck_certificate_cache
Richard Russon [Tue, 11 Apr 2017 11:55:32 +0000 (12:55 +0100)]
check_certificate_cache

7 years agocheck_boundary
Richard Russon [Tue, 11 Apr 2017 17:06:54 +0000 (18:06 +0100)]
check_boundary

7 years agoaddress_uses_unicode
Richard Russon [Tue, 11 Apr 2017 11:55:06 +0000 (12:55 +0100)]
address_uses_unicode

7 years agoaddresses_use_unicode
Richard Russon [Mon, 10 Apr 2017 20:41:26 +0000 (21:41 +0100)]
addresses_use_unicode

7 years agoaddrcmp
Richard Russon [Tue, 11 Apr 2017 11:54:42 +0000 (12:54 +0100)]
addrcmp

7 years agoadd_quote_suffix
Richard Russon [Mon, 10 Apr 2017 16:13:03 +0000 (17:13 +0100)]
add_quote_suffix

7 years agoFix memleak when attaching files.
Kevin McCarthy [Tue, 11 Apr 2017 19:14:47 +0000 (12:14 -0700)]
Fix memleak when attaching files.

7 years agomerge: fix coverity defects
Richard Russon [Tue, 11 Apr 2017 23:26:14 +0000 (00:26 +0100)]
merge: fix coverity defects

 * coverity: strfcpy
 * coverity: add variable - function arg could be NULL/invalid
 * coverity: add variable - failed function leads to invalid variable
 * coverity: add variable - Context could become NULL
 * coverity: add variable - alloc/strdup could return NULL
 * coverity: add variable - route through code leads to invalid variable
 * coverity: remove variable test
 * coverity: test functions
 * coverity: tidy switches
 * coverity: unused variables
 * coverity: refactor only
 * coverity: check for buffer underruns
 * coverity: fix leaks
 * coverity: minor fixes

7 years agocoverity: minor fixes 515/head
Richard Russon [Wed, 5 Apr 2017 14:59:15 +0000 (15:59 +0100)]
coverity: minor fixes

Fix a few minor bugs.

7 years agocoverity: fix leaks
Richard Russon [Wed, 5 Apr 2017 14:51:30 +0000 (15:51 +0100)]
coverity: fix leaks

Fix resource leaks.

7 years agocoverity: check for buffer underruns
Richard Russon [Wed, 5 Apr 2017 14:34:28 +0000 (15:34 +0100)]
coverity: check for buffer underruns

Prevent buffer underruns caused by functions that can return -1.

7 years agocoverity: refactor only
Richard Russon [Wed, 5 Apr 2017 14:29:36 +0000 (15:29 +0100)]
coverity: refactor only

Refactor code for clarity.

7 years agocoverity: unused variables
Richard Russon [Wed, 5 Apr 2017 14:28:38 +0000 (15:28 +0100)]
coverity: unused variables

Remove unused variables.

7 years agocoverity: tidy switches
Richard Russon [Wed, 5 Apr 2017 14:26:22 +0000 (15:26 +0100)]
coverity: tidy switches

Simplify a few switch cases:
- Factor out trivial fall throughs
- Document any other fall throughs

7 years agocoverity: test functions
Richard Russon [Wed, 5 Apr 2017 14:20:47 +0000 (15:20 +0100)]
coverity: test functions

Test the return value of some functions that could fail.

7 years agocoverity: remove variable test
Richard Russon [Wed, 5 Apr 2017 14:15:29 +0000 (15:15 +0100)]
coverity: remove variable test

Remove a few simple tests where the condition is guaranteed to be true.

7 years agocoverity: add variable - route through code leads to invalid variable
Richard Russon [Mon, 10 Apr 2017 13:07:03 +0000 (14:07 +0100)]
coverity: add variable - route through code leads to invalid variable

7 years agocoverity: add variable - alloc/strdup could return NULL
Richard Russon [Mon, 10 Apr 2017 13:01:22 +0000 (14:01 +0100)]
coverity: add variable - alloc/strdup could return NULL

7 years agocoverity: add variable - Context could become NULL
Richard Russon [Mon, 10 Apr 2017 12:51:55 +0000 (13:51 +0100)]
coverity: add variable - Context could become NULL

7 years agocoverity: add variable - failed function leads to invalid variable
Richard Russon [Mon, 10 Apr 2017 12:49:32 +0000 (13:49 +0100)]
coverity: add variable - failed function leads to invalid variable

7 years agocoverity: add variable - function arg could be NULL/invalid
Richard Russon [Mon, 10 Apr 2017 12:44:39 +0000 (13:44 +0100)]
coverity: add variable - function arg could be NULL/invalid

7 years agocoverity: strfcpy
Richard Russon [Wed, 5 Apr 2017 13:42:50 +0000 (14:42 +0100)]
coverity: strfcpy

Replace strncpy with strfcpy to avoid unterminated strings.

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Sun, 9 Apr 2017 19:43:22 +0000 (20:43 +0100)]
merge: upstream fixes (mutt/default)

 * Remove redraw flag setting after mutt_endwin().
 * Change km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877)
 * Separate out the compose menu redrawing. (see #3877)
 * Separate out the index menu redrawing. (see #3877)
 * Prepare for pager redraw separation. (see #3877)
 * Separate out the pager menu redrawing. (see #3877)
 * Don't create query menu until after initial prompt. (see #3877)
 * Silence imap progress messages for pipe-message. (see #3929)
 * Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929)

7 years agoEnsure mutt stays in endwin during calls to pipe_msg() (closes #3929)
Kevin McCarthy [Sat, 8 Apr 2017 21:21:15 +0000 (14:21 -0700)]
Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929)

The previous commit solved the problem reported in #3929: progressbar
output while downloading a message via IMAP was refreshing the mutt
ncurses session after launching the pipe program.

To ensure another place in the code doesn't inadvertantly generate
output, wrap OPTKEEPQUIET around the calls to
pipe_msg()/mutt_wait_filter() too.

7 years agoSilence imap progress messages for pipe-message. (see #3929)
Kevin McCarthy [Sat, 8 Apr 2017 21:18:26 +0000 (14:18 -0700)]
Silence imap progress messages for pipe-message. (see #3929)

_mutt_pipe_message() calls endwin(), and then calls pipe_msg().  If an
imap message body hasn't already been downloaded, this can end up
calling imap_fetch_message().

The progress messages in imap_fetch_message() were restoring curses,
just after extract_url was running.  This was leading to a condition
where mutt curses didn't think the screen had changed after
extract_url exited.

There was already a check for isendwin() inside imap_fetch_message(),
but it wasn't wrapped around the progressbar creation/usage.  Add a
check for those places too.

7 years agoDon't create query menu until after initial prompt. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:39 +0000 (16:09 -0700)]
Don't create query menu until after initial prompt. (see #3877)

A resize in the prompt will trigger a redraw, but the data won't be
loaded yet, displaying a blank screen instead of the previous menu.
Once the query is done, the data is loaded, but the menu->redraw state
has been changed by the resize.

We could manually flag a redraw, but it makes more sense visually
logically to just create the menu after the query and results are
loaded.

7 years agoSeparate out the pager menu redrawing. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:37 +0000 (16:09 -0700)]
Separate out the pager menu redrawing. (see #3877)

The pager relies on REDRAW_SIGWINCH, so add that to _mutt_get_field().

7 years agoPrepare for pager redraw separation. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:36 +0000 (16:09 -0700)]
Prepare for pager redraw separation. (see #3877)

Move some of the code inside SigWinch handling into the REDRAW part of
the code.

SigInt is handled by mutt_getch(), so remove the redundant code from
inside the pager.

7 years agoSeparate out the index menu redrawing. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:35 +0000 (16:09 -0700)]
Separate out the index menu redrawing. (see #3877)

7 years agoSeparate out the compose menu redrawing. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:34 +0000 (16:09 -0700)]
Separate out the compose menu redrawing. (see #3877)

Add a custom_menu_redraw to the menu and change menu_redraw() to call
that instead if set.

7 years agoChange km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877)
Kevin McCarthy [Wed, 5 Apr 2017 23:09:33 +0000 (16:09 -0700)]
Change km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877)

Change _mutt_enter_string() to pass the SigWinch through for
_mutt_get_field() or mutt_enter_string() to handle.

Add a call to mutt_current_menu() in _mutt_get_field() to properly
redisplay the screen in that case.

7 years agoRemove redraw flag setting after mutt_endwin().
Kevin McCarthy [Wed, 5 Apr 2017 23:09:31 +0000 (16:09 -0700)]
Remove redraw flag setting after mutt_endwin().

There is no need to set a redraw flag in this case.  The screen will
automatically be properly redrawn on the next refresh().

Remove, lest it get propagated.

7 years agofix make dist distcheck
Richard Russon [Sat, 8 Apr 2017 21:50:54 +0000 (22:50 +0100)]
fix make dist distcheck

7 years agobool-ify structs
Richard Russon [Sat, 1 Apr 2017 01:38:23 +0000 (02:38 +0100)]
bool-ify structs

Convert all struct members that are used as booleans, to "bool".

7 years agofix slang bools
Richard Russon [Thu, 6 Apr 2017 05:07:27 +0000 (06:07 +0100)]
fix slang bools

slang defines its own bool types which interfere with <stdbool.h>
So, undefine theirs and redefine ours.

7 years agomerge: bool-ify functions
Richard Russon [Sat, 8 Apr 2017 21:27:16 +0000 (22:27 +0100)]
merge: bool-ify functions

 * Convert two function to return bool
 * More boolification
 * Boolify is_parent
 * Boolify eat_* functions
 * Boolify is_ascii
 * Boolify pgp_cansign and pgp_canencrypt
 * Boolify mx_is_mh and mx_is_maildir
 * Boolify remaining mx_is_* functions
 * More boolification
 * Boolify mutt_nm_tag_complete and mutt_nm_query_complete

7 years agoBoolify mutt_nm_tag_complete and mutt_nm_query_complete
Pietro Cerutti [Tue, 4 Apr 2017 11:32:39 +0000 (11:32 +0000)]
Boolify mutt_nm_tag_complete and mutt_nm_query_complete

Issue: #492

7 years agoMore boolification
Pietro Cerutti [Tue, 4 Apr 2017 11:28:21 +0000 (11:28 +0000)]
More boolification

Issue: #492

7 years agoBoolify remaining mx_is_* functions
Pietro Cerutti [Mon, 3 Apr 2017 12:26:36 +0000 (12:26 +0000)]
Boolify remaining mx_is_* functions

Issue: #492

7 years agoBoolify mx_is_mh and mx_is_maildir
Pietro Cerutti [Mon, 3 Apr 2017 12:19:43 +0000 (12:19 +0000)]
Boolify mx_is_mh and mx_is_maildir

Issue: #492

7 years agoBoolify pgp_cansign and pgp_canencrypt
Pietro Cerutti [Mon, 3 Apr 2017 12:15:27 +0000 (12:15 +0000)]
Boolify pgp_cansign and pgp_canencrypt

Issue: #492

7 years agoBoolify is_ascii
Pietro Cerutti [Mon, 3 Apr 2017 12:05:42 +0000 (12:05 +0000)]
Boolify is_ascii

Issue: #492

7 years agoBoolify eat_* functions
Pietro Cerutti [Mon, 3 Apr 2017 10:49:05 +0000 (10:49 +0000)]
Boolify eat_* functions

Issue: #492

7 years agoBoolify is_parent
Pietro Cerutti [Mon, 3 Apr 2017 10:42:23 +0000 (10:42 +0000)]
Boolify is_parent

Issue: #492

7 years agoMore boolification
Pietro Cerutti [Mon, 3 Apr 2017 10:02:14 +0000 (10:02 +0000)]
More boolification

Issue: #492

7 years agoConvert two function to return bool
Pietro Cerutti [Mon, 3 Apr 2017 09:54:56 +0000 (09:54 +0000)]
Convert two function to return bool

Issue: #492

7 years agomerge: assorted small fixes
Richard Russon [Sat, 8 Apr 2017 21:25:32 +0000 (22:25 +0100)]
merge: assorted small fixes

 * build: fix warnings
 * add full neomutt version to log startup
 * drop duplicate versions of the sidebar contrib
 * drop comment from sidebar docs
 * build: remove unused macros
 * build: use SEEK_SET, SEEK_CUR, SEEK_END
 * bug: add missing break
 * build: remove constant code
 * bug: don't pass large object by value
 * fix: use correct buffer size
 * fix: bug in uncolor for notmuch tag
 * build: workaround slang warnings
 * shadow variables
 * 0 -> NULL

7 years ago0 -> NULL
Richard Russon [Mon, 27 Mar 2017 21:59:23 +0000 (22:59 +0100)]
0 -> NULL

7 years agoshadow variables
Richard Russon [Mon, 27 Mar 2017 16:12:51 +0000 (17:12 +0100)]
shadow variables

7 years agobuild: workaround slang warnings
Richard Russon [Wed, 5 Apr 2017 16:25:38 +0000 (17:25 +0100)]
build: workaround slang warnings

The prototypes for these four functions use (char*),
whereas the ncurses versions use (const char*)
  addnstr
  addstr
  mvaddnstr
  mvaddstr

We redefine the helper macros to hide the compiler warnings.

7 years agofix: bug in uncolor for notmuch tag
Richard Russon [Wed, 5 Apr 2017 14:36:45 +0000 (15:36 +0100)]
fix: bug in uncolor for notmuch tag

A bug caused by the order of COLOR constants prevented "uncolor" working on
MT_COLOR_INDEX_TAG.

7 years agofix: use correct buffer size
Richard Russon [Wed, 5 Apr 2017 13:38:28 +0000 (14:38 +0100)]
fix: use correct buffer size

One path of pop_auth_sasl() uses an incorrect buffer size parameter.

7 years agobug: don't pass large object by value
Richard Russon [Mon, 3 Apr 2017 17:31:53 +0000 (18:31 +0100)]
bug: don't pass large object by value

imap_delete_mailbox was passed an IMAP_MBOX object by value.

The object is >500 bytes so it would be better as a pointer.
Passing by value also led to a potential double-free.

7 years agobuild: remove constant code
Richard Russon [Tue, 4 Apr 2017 23:40:19 +0000 (00:40 +0100)]
build: remove constant code

Refactor the DOMAIN code to put it in one block.

The old code would define a constant in a #ifdef, which it then tested later.

7 years agobug: add missing break
Richard Russon [Wed, 5 Apr 2017 00:29:05 +0000 (01:29 +0100)]
bug: add missing break

Add a missing break to a switch.
OP_EDITOR_QUOTE_CHAR leak through into OP_EDITOR_TRANSPOSE_CHARS.

7 years agobuild: use SEEK_SET, SEEK_CUR, SEEK_END
Richard Russon [Wed, 5 Apr 2017 12:43:56 +0000 (13:43 +0100)]
build: use SEEK_SET, SEEK_CUR, SEEK_END

Change all the uses of fseek() and fseeko() to use defined constants:
    SEEK_SET, SEEK_CUR, SEEK_END

7 years agobuild: remove unused macros
Richard Russon [Mon, 3 Apr 2017 20:07:56 +0000 (21:07 +0100)]
build: remove unused macros

Remove some unused macros and substitue in one that is used just once.

7 years agodrop comment from sidebar docs
Richard Russon [Fri, 31 Mar 2017 16:53:30 +0000 (17:53 +0100)]
drop comment from sidebar docs

The comment is no longer applicable.

7 years agodrop duplicate versions of the sidebar contrib
Richard Russon [Fri, 31 Mar 2017 16:53:17 +0000 (17:53 +0100)]
drop duplicate versions of the sidebar contrib

These:
    contrib/sample.muttrc-sidebar
    contrib/sample.vimrc-sidebar
are dupes of:
    doc/muttrc.sidebar
    doc/vimrc.sidebar

7 years agoadd full neomutt version to log startup
Richard Russon [Fri, 31 Mar 2017 16:45:11 +0000 (17:45 +0100)]
add full neomutt version to log startup

Changes:
    NeoMutt/20170306 (1.8.0) debugging at level 2
to
    Neomutt 20170306-98-bf1d78 (1.8.0) debugging at level 2

7 years agobuild: fix warnings
Richard Russon [Wed, 5 Apr 2017 15:54:02 +0000 (16:54 +0100)]
build: fix warnings

7 years agoeducate github's linguist
Richard Russon [Fri, 7 Apr 2017 13:12:44 +0000 (14:12 +0100)]
educate github's linguist

GitHub creates language stats about NeoMutt using "linguist".
Unfortunately, it thinks that mutt.h and init.h are C++.

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Sun, 2 Apr 2017 01:31:28 +0000 (02:31 +0100)]
merge: upstream fixes (mutt/default)

 * Fix mutt_refresh() pausing during macro events.
 * Add a menu stack to track current and past menus.
 * Change CurrentMenu to be controlled by the menu stack.
 * Set refresh when popping the menu stack.
 * Remove redraw parameter from crypt send_menus.
 * Don't full redraw the index when handling a command from the pager.
 * Filter other directional markers that corrupt the screen.
 * Remove the OPTFORCEREDRAW options.
 * Remove SidebarNeedsRedraw.
 * Change reflow_windows() to set full redraw.
 * Create R_MENU redraw option.
 * Remove refresh parameter from mutt_enter_fname().

7 years agoRemove refresh parameter from mutt_enter_fname().
Kevin McCarthy [Sat, 1 Apr 2017 01:15:31 +0000 (18:15 -0700)]
Remove refresh parameter from mutt_enter_fname().

Also remove it from mutt_save_message(), which used it to pass through
to mutt_enter_fname().  The callers of this already had redraw logic,
to which REDRAW_STATUS merely needed to be added.

7 years agoCreate R_MENU redraw option.
Kevin McCarthy [Sat, 1 Apr 2017 01:15:28 +0000 (18:15 -0700)]
Create R_MENU redraw option.

Previously, the R_INDEX option meant both the index as well as all
other menus.  The removal of the OPTFORCEREDRAWINDEX option caused problems
with redrawing other menus for options such as arrow_cursor.

One solution would be change R_INDEX back to meaning "everything"
except pager, but there are only a handful of options that affect
other menus.

Instead, create R_MENU to indicate options that affect either all
menus or one of the other menus beside the index and pager.

7 years agoChange reflow_windows() to set full redraw.
Kevin McCarthy [Sat, 1 Apr 2017 01:15:22 +0000 (18:15 -0700)]
Change reflow_windows() to set full redraw.

A full redraw should always be set in this case.  This also enables us
to remove redraw flags for some options.

7 years agoRemove SidebarNeedsRedraw.
Kevin McCarthy [Sat, 1 Apr 2017 01:15:20 +0000 (18:15 -0700)]
Remove SidebarNeedsRedraw.

The menu stack can be used to flag a redraw of the sidebar window.

7 years agoRemove the OPTFORCEREDRAW options.
Kevin McCarthy [Sat, 1 Apr 2017 01:15:12 +0000 (18:15 -0700)]
Remove the OPTFORCEREDRAW options.

Use the menu stack to flag redraws for the index and pager.

7 years agoFilter other directional markers that corrupt the screen.
Vincent Lefevre [Fri, 31 Mar 2017 15:29:35 +0000 (17:29 +0200)]
Filter other directional markers that corrupt the screen.

7 years agoDon't full redraw the index when handling a command from the pager.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:45 +0000 (18:31 -0700)]
Don't full redraw the index when handling a command from the pager.

This causes a noticable flicker when moving through messages from the pager.

7 years agoRemove redraw parameter from crypt send_menus.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:43 +0000 (18:31 -0700)]
Remove redraw parameter from crypt send_menus.

The parameter was used to notify the caller if the sign (a)s menu was
invoked, which displayed the key selection menu.  This is no longer
necessary with the menu stack pop operation.

7 years agoSet refresh when popping the menu stack.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:41 +0000 (18:31 -0700)]
Set refresh when popping the menu stack.

This removes the need for the OPTNEEDREDRAW option and MAYBE_REDRAW
macro previously used to communicate back the need to refresh after
exiting a menu.

Remove the redraw parameter from ci_bounce_message() and
mix_make_chain() which served the same purpose.

7 years agoChange CurrentMenu to be controlled by the menu stack.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:40 +0000 (18:31 -0700)]
Change CurrentMenu to be controlled by the menu stack.

The pager menu is a bit tricky with respect to the menu->menu and
CurrentMenu, so add a few comments.

7 years agoAdd a menu stack to track current and past menus.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:39 +0000 (18:31 -0700)]
Add a menu stack to track current and past menus.

Change the pager to use a MENU, right now just to hold the refresh
state.

7 years agoFix mutt_refresh() pausing during macro events.
Kevin McCarthy [Sun, 26 Mar 2017 19:27:15 +0000 (12:27 -0700)]
Fix mutt_refresh() pausing during macro events.

Changeset a07e8215a0ef split input buffering into two pools.
Unfortunately, the mutt_refresh() was not changed to check the correct
buffer count, resulting in unnecessary refreshes during macros.

The SSL interactive certificate prompts set OPTIGNOREMACROEVENTS and
then put up a confirmation menu.  Perhaps we've just been lucky, but
it seems we should refresh the screen in those cases if we're in the
middle of a macro.  Add a check for this option in mutt_refresh() too.

7 years agomerge: Tidy the code - Part 3
Richard Russon [Thu, 30 Mar 2017 22:25:56 +0000 (23:25 +0100)]
merge: Tidy the code - Part 3

 * fix: typo in browser_compare_count{_new}
 * build: remove generated files from repo
 * tidy: comments
 * build: look for translations in all files
 * fix: arguments to printf-style functions
 * tidy: license text
 * tidy: unify include-guards
 * build: tidy makefiles
 * tidy: initialise pointers
 * tidy: make strcmp-like functions clearer
 * tidy: unify sizeof usage
 * build: remove forward declarations
 * tidy: remove ()s from return

7 years agotidy: remove ()s from return 488/head
Richard Russon [Sun, 26 Mar 2017 01:19:36 +0000 (02:19 +0100)]
tidy: remove ()s from return

The 'return' operator doesn't require its argument to the ()'d.
This has lead to some very inconsistent code.

This commit removes the ()s from return where the argument is a single
token, e.g.
    return 42;
    return fn(x);

There are ~480 occurrences.

7 years agobuild: remove forward declarations
Richard Russon [Sat, 25 Mar 2017 16:20:01 +0000 (16:20 +0000)]
build: remove forward declarations

7 years agotidy: unify sizeof usage
Richard Russon [Sat, 25 Mar 2017 15:57:40 +0000 (15:57 +0000)]
tidy: unify sizeof usage

The sizeof operator doesn't always require the argument to be ()'d.
However it wasn't used consistently.  Add ()s to all uses of sizeof.

7 years agotidy: make strcmp-like functions clearer
Richard Russon [Thu, 23 Mar 2017 02:28:31 +0000 (02:28 +0000)]
tidy: make strcmp-like functions clearer

There are ~600 uses of strcmp-like functions:
- ascii_strcasecmp
- ascii_strcmp
- ascii_strncasecmp
- ascii_strncmp
- imap_mxcmp
- imap_wordcasecmp
- mutt_inbox_cmp
- mutt_strcasecmp
- mutt_strcmp
- mutt_strncasecmp
- mutt_strncmp
- strcasecmp
- strcmp
- strncasecmp
- strncmp
- wcscasecmp

Because strcmp returns 0 on a successful match, conditionals can easily
be misread:

    if (strcmp(s, "hello"))
    {
        /* code if string 's' DOES NOT match */
    }

These have been changed to explicitly mention the return value:

    if (strcmp(s, "hello") != 0)
    {
        /* code if string 's' DOES NOT match */
    }

7 years agotidy: initialise pointers
Richard Russon [Wed, 22 Mar 2017 22:16:16 +0000 (22:16 +0000)]
tidy: initialise pointers

Initialise ~1000 pointer declarations to NULL.
This incurs a very tiny cost at runtime.

This command was used to create a vim location-list:
    grep -ni "^[ ^I]\+\<[a-z_0-9]\+ *\* *[a-z_0-9]\+;"

7 years agobuild: tidy makefiles
Richard Russon [Mon, 20 Mar 2017 19:12:32 +0000 (19:12 +0000)]
build: tidy makefiles

- sort out subdirs
- remove unnecessary HAVE_CONFIG_H define
- tidy source lists
- drop NLS config reference
- drop unused make targets

7 years agotidy: unify include-guards
Richard Russon [Thu, 16 Mar 2017 23:19:36 +0000 (23:19 +0000)]
tidy: unify include-guards

- add missing include-guards
- unify existing include-guards
- unnecessary conditionals around whole source

7 years agotidy: license text
Richard Russon [Thu, 16 Mar 2017 18:30:31 +0000 (18:30 +0000)]
tidy: license text

- add missing license text
- tidy existing license text

7 years agofix: arguments to printf-style functions
Richard Russon [Tue, 21 Mar 2017 23:35:25 +0000 (23:35 +0000)]
fix: arguments to printf-style functions

By adding an attribute to printf-style functions, the compiler can spot
errors in the arguments.

Because the attributes aren't portable, they haven't been committed.
    __attribute__((format (printf, 1, 2)))

7 years agobuild: look for translations in all files
Richard Russon [Tue, 21 Mar 2017 02:20:30 +0000 (02:20 +0000)]
build: look for translations in all files

List ALL of the source files to the passed to the translations.

7 years agotidy: comments
Richard Russon [Tue, 21 Mar 2017 03:03:18 +0000 (03:03 +0000)]
tidy: comments

- drop CVS marker: $Id$
- convert // comments
- delete blank line between comment and function

7 years agobuild: remove generated files from repo
Richard Russon [Mon, 20 Mar 2017 22:57:58 +0000 (22:57 +0000)]
build: remove generated files from repo

Build temporary:
po/stamp-po

Copied in by autoreconf
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin

7 years agofix: typo in browser_compare_count{_new}
Richard Russon [Fri, 24 Mar 2017 21:48:24 +0000 (21:48 +0000)]
fix: typo in browser_compare_count{_new}

A typo meant that sorting by "count" or "count new" could not be done in
reverse.

7 years agoadd mailmap entries
Richard Russon [Thu, 30 Mar 2017 20:20:31 +0000 (21:20 +0100)]
add mailmap entries

This covers all committers since the start of NeoMutt.

7 years agodoc: use neomutt mailinglist (#483)
Tobias Angele [Thu, 30 Mar 2017 15:23:07 +0000 (17:23 +0200)]
doc: use neomutt mailinglist (#483)

Closes neomutt/neomutt.github.io#30

Website page updated too.

7 years agoFix (un)sidebar_whitelist to expand paths.
Kevin McCarthy [Mon, 27 Mar 2017 18:39:42 +0000 (11:39 -0700)]
Fix (un)sidebar_whitelist to expand paths.

Thanks to Arturo for reporting the issue.

Closes #485

7 years agoFix inbox-first functionality when using mutt_pretty_mailbox (#490)
Pietro Cerutti [Tue, 28 Mar 2017 13:23:28 +0000 (14:23 +0100)]
Fix inbox-first functionality when using mutt_pretty_mailbox (#490)

Fix inbox-first functionality when using mutt_pretty_mailbox

Fixes #489

7 years agomerge: Tidy the code - Part 2
Richard Russon [Wed, 22 Mar 2017 16:44:02 +0000 (16:44 +0000)]
merge: Tidy the code - Part 2

 * build: force OPS to be rebuild after a reconfigure
 * build: fix minor code warnings / style
 * tidy: be specific about void functions
 * build: expand a few more alloc macros
 * tidy: add argument names to function prototypes
 * build: drop local copy of regex code
 * tidy: indent the docbook manual
 * tidy: rearrange code to avoid forward declarations
 * tidy: limit the scope of some functions
 * build: give the compress functions a unique name
 * tidy: use snake_case for function names
 * build: add missing newlines to mutt_debug

7 years agobuild: add missing newlines to mutt_debug 476/head
Richard Russon [Thu, 16 Mar 2017 14:26:59 +0000 (14:26 +0000)]
build: add missing newlines to mutt_debug

7 years agotidy: use snake_case for function names
Richard Russon [Thu, 16 Mar 2017 03:22:47 +0000 (03:22 +0000)]
tidy: use snake_case for function names

e.g.
- getDate          -> get_date
- mutt_menuDestroy -> mutt_menu_destroy

7 years agobuild: give the compress functions a unique name
Richard Russon [Thu, 16 Mar 2017 02:35:05 +0000 (02:35 +0000)]
build: give the compress functions a unique name

The compressed mailbox functions are passed as pointers to mutt.
Their names, e.g. "open_mailbox" are OK for compilation, but they are
ambiguous when debugging.

- prefix exported function names with "comp_"