Skip to content

Commit

Permalink
merge: NeoMutt 2018-06-22
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jun 22, 2018
2 parents fe5c797 + c1821ab commit 77c2177
Show file tree
Hide file tree
Showing 54 changed files with 17,571 additions and 17,391 deletions.
4 changes: 4 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Bernard Pratz <guyzmo+github+pub@m0g.net> Bernard 'Guyzmo'
Bernard Pratz <guyzmo+github+pub@m0g.net> Bernard Pratz <guyzmo+github+pub@m0g.net> # @guyzmo
Bernard Pratz <guyzmo+github+pub@m0g.net> Guyzmo <guyzmo+github+pub@m0g.net> # @guyzmo
Bernard Pratz <guyzmo+github+pub@m0g.net> guyzmo <guyzmo+github+pub@m0g.net> # @guyzmo
Bertram Scharpf <software@bertram-scharpf.de> Bertram Scharpf <software@bertram-scharpf.de> # @bertramscharpf
Bletchley Park <18015852+libBletchley@users.noreply.github.com> Bletchley Park <18015852+libBletchley@users.noreply.github.com> # @libBletchley
Bo Yu <tsu.yubo@gmail.com> Bo <tsu.yubo@gmail.com> # @yuzibo
Bo Yu <tsu.yubo@gmail.com> Bo Yu <tsu.yubo@gmail.com> # @yuzibo
Expand Down Expand Up @@ -52,6 +53,7 @@ Ian Zimmerman <itz@very.loosely.org> Ian Zimmerman <i
Ian Zimmerman <itz@very.loosely.org> Ian Zimmerman <itz@very.loosely.org> # @nobrowser
Ian Zimmerman <itz@very.loosely.org> Ian Zimmerman <nobrowser@users.noreply.github.com> # @nobrowser
Ismaël Bouya <ismael.bouya@normalesup.org> Ismaël Bouya <ismael.bouya@normalesup.org> # @immae
Ivan J <parazyd@dyne.org> Ivan J <parazyd@users.noreply.github.com> # @parazyd
Ivan Tham <pickfire@riseup.net> Ivan Tham <pickfire@riseup.net> # @pickfire
Jack Stratton <jack@phroa.net> Jack Stratton <jack@phroa.net> # @phroa
Jakub Jindra <jakub.jindra@socialbakers.com> Jakub Jindra <jindraj@users.noreply.github.com> # @jindraj
Expand Down Expand Up @@ -111,11 +113,13 @@ Stefan Assmann <sassmann@kpanic.de> Stefan Assmann <
Stefan Bühler <stbuehler@web.de> Stefan Bühler <stbuehler@web.de> # @stbuehler
Stephen Gilles <sgilles@math.umd.edu> S. Gilles <sgilles@math.umd.edu> # @s-gilles
Steven Ragnarök <steven@nuclearsandwich.com> Steven! Ragnarök <steven@nuclearsandwich.com> # @nuclearsandwich
Stuart Henderson <stu-github@spacehopper.org> Stuart Henderson <sthen@users.noreply.github.com> # @sthen
Theo Jepsen <theojepsen@gmail.com> Theo <theojepsen@g-m-a-i-l-dotcom> # @theojepsen
Thiago Costa de Paiva <tecepe@tecepe.eng.br> Thiago Costa de Paiva <tcpaiva@cern.ch> # @tecepe
Thiago Costa de Paiva <tecepe@tecepe.eng.br> Thiago Costa de Paiva <tecepe@tecepe.eng.br> # @tecepe
Thomas Adam <thomas@xteddy.org> Thomas Adam <thomas@xteddy.org> # @thomasadam
Thomas Klausner <wiz@netbsd.org> Thomas Klausner <wiz@netbsd.org> # @0-wiz-0
Thomas Schneider <qsx@qsx.re> Thomas Schneider <qsx@qsx.re> # @qsuscs
Tobias Angele <toogley@mailbox.org> Tobias Angele <toogley@mailbox.org> # @toogley
Tobias Angele <toogley@mailbox.org> toogley <toogley@mailbox.org> # @toogley
Udo Schweigert <mutt@cert.siemens.de> Udo Schweigert <mutt@cert.siemens.de> #
Expand Down
27 changes: 27 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
2018-06-22 Richard Russon <rich@flatcap.org>
* Features
- Expand variables inside backticks
- Honour SASL-IR IMAP capability in SASL PLAIN
* Bug Fixes
- Fix toggle-read
- Do not truncate shell commands on ; or #
- pager: index must be rebuilt on MUTT_REOPENED
- Handle a BAD response in AUTH PLAIN w/o initial response
- fcc_attach: Don't ask every time
- Enlarge path buffers PATH_MAX (4096)
- Move LSUB call from connection establishment to mailbox SELECTion
* Translations
- Update Chinese (Simplified): 100%
- Update Czech: 100%
- Update German: 100%
- Update Lithuanian: 100%
- Update Portuguese (Brazil): 100%
- Update Slovak: 59%
- Reduce duplication of messages
* Code
- Tidy up the mailbox API
- Tidy up the header cache API
- Tidy up the encryption API
- Add doxygen docs for more functions
- Refactor more structs to use STAILQ

2018-05-12 Richard Russon <rich@flatcap.org>
* Features
- echo command
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ sorted through them, fixed them up and documented them.
Here's a list of everyone who's helped NeoMutt:

[Adam Borowski](https://github.com/kilobyte "kilobyte"),
[Ahmed El Gabri](https://github.com/ahmedelgabri "ahmedelgabri"),
[Alad Wenter](https://github.com/aladw "aladw"),
[Aleksa Sarai](https://github.com/cyphar "cyphar"),
[Alex Pearce](https://github.com/alexpearce "alexpearce"),
Expand All @@ -95,6 +96,7 @@ Here's a list of everyone who's helped NeoMutt:
[Baptiste Daroussin](https://github.com/bapt "bapt"),
[Benjamin Mako Hill](https://github.com/makoshark "makoshark"),
[Bernard Pratz](https://github.com/guyzmo "guyzmo"),
[Bertram Scharpf](https://github.com/bertramscharpf "bertramscharpf"),
[Bletchley Park](https://github.com/libBletchley "libBletchley"),
[Bo Yu](https://github.com/yuzibo "yuzibo"),
[Bryan Bennett](https://github.com/bbenne10 "bbenne10"),
Expand Down Expand Up @@ -126,6 +128,7 @@ Here's a list of everyone who's helped NeoMutt:
[Hugo Barrera](https://github.com/whynothugo "whynothugo"),
[Ian Zimmerman](https://github.com/nobrowser "nobrowser"),
[Ismaël Bouya](https://github.com/immae "immae"),
[Ivan J](https://github.com/parazyd "parazyd"),
[Ivan Tham](https://github.com/pickfire "pickfire"),
[J Lewis Muir](https://github.com/jlmuir "jlmuir"),
[Jack Stratton](https://github.com/phroa "phroa"),
Expand Down
2 changes: 1 addition & 1 deletion auto.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use system cc cc-lib mutt-gettext mutt-iconv
###############################################################################
# Names and versions
define PACKAGE "neomutt"
define PACKAGE_VERSION "20180512"
define PACKAGE_VERSION "20180622"
define BUGS_ADDRESS "neomutt-devel@neomutt.org"

# Subdirectories that contain additional Makefile.autosetup files
Expand Down
4 changes: 2 additions & 2 deletions autosetup/mutt-gettext.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2017 Pietro Cerutti <gahr@gahr.ch>. All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
Expand All @@ -8,7 +8,7 @@
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down
4 changes: 2 additions & 2 deletions autosetup/mutt-iconv.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2017 Pietro Cerutti <gahr@gahr.ch>. All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
Expand All @@ -8,7 +8,7 @@
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand Down
2 changes: 1 addition & 1 deletion buffy.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int buffy_mbox_check(struct Buffy *mailbox, struct stat *sb, bool check_s
if (check_stats && (mailbox->stats_last_checked < sb->st_mtime))
{
if (mx_mbox_open(mailbox->path, MUTT_READONLY | MUTT_QUIET | MUTT_NOSORT | MUTT_PEEK,
&ctx) != NULL)
&ctx) != NULL)
{
mailbox->msg_count = ctx.msgcount;
mailbox->msg_unread = ctx.unread;
Expand Down
4 changes: 2 additions & 2 deletions conn/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,10 +1380,10 @@ static int ssl_setup(struct Connection *conn)
return 0;

free_ssl:
SSL_free (ssldata->ssl);
SSL_free(ssldata->ssl);
ssldata->ssl = 0;
free_ctx:
SSL_CTX_free (ssldata->ctx);
SSL_CTX_free(ssldata->ctx);
ssldata->ctx = 0;
free_sasldata:
FREE(&ssldata);
Expand Down
2 changes: 1 addition & 1 deletion doc/makedoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ struct VariableTypes
{ "DT_NONE", "-none-" },
{ "DT_BOOL", "boolean" },
{ "DT_NUMBER", "number" },
{ "DT_LONG", "number (long)" },
{ "DT_LONG", "number (long)" },
{ "DT_STRING", "string" },
{ "DT_PATH", "path" },
{ "DT_QUAD", "quadoption" },
Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PROJECT_NAME = "NeoMutt"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2018-05-12
PROJECT_NUMBER = 2018-06-22

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
1 change: 0 additions & 1 deletion handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,4 +1784,3 @@ void mutt_decode_attachment(struct Body *b, struct State *s)
if (cd != (iconv_t)(-1))
iconv_close(cd);
}

5 changes: 2 additions & 3 deletions imap/auth_plain.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ enum ImapAuthRes imap_auth_plain(struct ImapData *idata, const char *method)
mutt_message(_("Logging in..."));

/* Prepare full AUTHENTICATE PLAIN message */
mutt_sasl_plain_msg(buf, sizeof(buf), auth_plain_cmd,
idata->conn->account.user, idata->conn->account.user,
idata->conn->account.pass);
mutt_sasl_plain_msg(buf, sizeof(buf), auth_plain_cmd, idata->conn->account.user,
idata->conn->account.user, idata->conn->account.pass);

if (mutt_bit_isset(idata->capabilities, SASL_IR))
{
Expand Down
5 changes: 2 additions & 3 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ enum GroupState
GS_ADDR
};


/**
* add_to_stailq - Add a string to a list
* @param head String list
Expand Down Expand Up @@ -1593,7 +1592,7 @@ static int parse_echo(struct Buffer *buf, struct Buffer *s, unsigned long data,
* If the 'finish' command is found, we should stop reading the current file.
*/
static int parse_finish(struct Buffer *buf, struct Buffer *s,
unsigned long data, struct Buffer *err)
unsigned long data, struct Buffer *err)
{
if (MoreArgs(s))
{
Expand Down Expand Up @@ -2409,7 +2408,7 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
if (rc < 0 || !*buf->data)
{
snprintf(err->data, err->dsize, _("%s: invalid value (%s)"), buf->data,
rc == -1 ? _("format error") : _("number overflow"));
rc == -1 ? _("format error") : _("number overflow"));
r = -1;
break;
}
Expand Down
3 changes: 1 addition & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,7 @@ int main(int argc, char *argv[], char *envp[])
mutt_startup_shutdown_hook(MUTT_STARTUPHOOK);

repeat_error = true;
Context = mx_mbox_open(
folder, ((flags & MUTT_RO) || ReadOnly) ? MUTT_READONLY : 0, NULL);
Context = mx_mbox_open(folder, ((flags & MUTT_RO) || ReadOnly) ? MUTT_READONLY : 0, NULL);
if (Context || !explicit_folder)
{
#ifdef USE_SIDEBAR
Expand Down
8 changes: 4 additions & 4 deletions mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ bool mbox_strict_cmp_headers(const struct Header *h1, const struct Header *h2)
if (h1 && h2)
{
if ((h1->received != h2->received) || (h1->date_sent != h2->date_sent) ||
(h1->content->length != h2->content->length) || (h1->lines != h2->lines) ||
(h1->zhours != h2->zhours) || (h1->zminutes != h2->zminutes) ||
(h1->zoccident != h2->zoccident) || (h1->mime != h2->mime) ||
!mutt_env_cmp_strict(h1->env, h2->env) ||
(h1->content->length != h2->content->length) ||
(h1->lines != h2->lines) || (h1->zhours != h2->zhours) ||
(h1->zminutes != h2->zminutes) || (h1->zoccident != h2->zoccident) ||
(h1->mime != h2->mime) || !mutt_env_cmp_strict(h1->env, h2->env) ||
!strict_cmp_bodies(h1->content, h2->content))
{
return false;
Expand Down
9 changes: 5 additions & 4 deletions mutt/charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,15 @@ int mutt_ch_check(const char *s, size_t slen, const char *from, const char *to)
{
int rc = 0;
iconv_t cd = mutt_ch_iconv_open(to, from, 0);
if (cd == (iconv_t)-1)
if (cd == (iconv_t) -1)
return -1;

size_t outlen = MB_LEN_MAX * slen;
char *out = mutt_mem_malloc(outlen + 1);
char *saved_out = out;

const size_t convlen = iconv(cd, (ICONV_CONST char **) &s, &slen, &out, (size_t *) &outlen);
const size_t convlen =
iconv(cd, (ICONV_CONST char **) &s, &slen, &out, (size_t *) &outlen);
if (convlen == -1)
rc = errno;

Expand Down Expand Up @@ -1002,8 +1003,8 @@ char *mutt_ch_choose(const char *fromcode, const char *charsets, char *u,
t[n] = '\0';

s = mutt_str_substr_dup(u, u + ulen);
const int rc = (d != NULL) ? mutt_ch_convert_string(&s, fromcode, t, 0)
: mutt_ch_check(s, ulen, fromcode, t);
const int rc = (d != NULL) ? mutt_ch_convert_string(&s, fromcode, t, 0) :
mutt_ch_check(s, ulen, fromcode, t);
if (rc)
{
FREE(&t);
Expand Down
3 changes: 1 addition & 2 deletions mx.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,7 @@ int mx_mbox_close(struct Context *ctx, int *index_hint)
snprintf(buf, sizeof(buf),
/* L10N: The first argument is the number of read messages to be
moved, the second argument is the target mailbox. */
ngettext("Move %d read message to %s?",
"Move %d read messages to %s?", read_msgs),
ngettext("Move %d read message to %s?", "Move %d read messages to %s?", read_msgs),
read_msgs, mbox);
move_messages = query_quadoption(Move, buf);
if (move_messages == MUTT_ABORT)
Expand Down
13 changes: 7 additions & 6 deletions ncrypt/pgpinvoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ void pgp_class_invoke_getkeys(struct Address *addr)
pid_t pgp_invoke_export(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpinfd,
int pgpoutfd, int pgperrfd, const char *uids)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false, NULL,
NULL, uids, PgpExportCommand);
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
NULL, NULL, uids, PgpExportCommand);
}

pid_t pgp_invoke_verify_key(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpinfd,
int pgpoutfd, int pgperrfd, const char *uids)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false, NULL,
NULL, uids, PgpVerifyKeyCommand);
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
NULL, NULL, uids, PgpVerifyKeyCommand);
}

/**
Expand Down Expand Up @@ -355,6 +355,7 @@ pid_t pgp_invoke_list_keys(FILE **pgpin, FILE **pgpout, FILE **pgperr,
strcpy(uids, tmpuids);
}

return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false, NULL, NULL,
uids, keyring == PGP_SECRING ? PgpListSecringCommand : PgpListPubringCommand);
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
NULL, NULL, uids,
keyring == PGP_SECRING ? PgpListSecringCommand : PgpListPubringCommand);
}
2 changes: 0 additions & 2 deletions ncrypt/pgplib.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ short pgp_get_abilities(unsigned char type)
return (pgp_canencrypt(type) << 1) | pgp_cansign(type);
}


static void pgp_free_uid(struct PgpUid **upp)
{
struct PgpUid *up = NULL, *q = NULL;
Expand Down Expand Up @@ -212,4 +211,3 @@ struct PgpKeyInfo *pgp_new_keyinfo(void)
{
return mutt_mem_calloc(1, sizeof(struct PgpKeyInfo));
}

13 changes: 9 additions & 4 deletions pattern.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include "mutt_notmuch.h"
#endif

// clang-format off
/* The regexes in a modern format */
#define RANGE_NUM_RX "([[:digit:]]+|0x[[:xdigit:]]+)[MmKk]?"
#define RANGE_REL_SLOT_RX "[[:blank:]]*([.^$]|-?" RANGE_NUM_RX ")?[[:blank:]]*"
Expand Down Expand Up @@ -103,6 +104,7 @@
#define RANGE_DOLLAR '$'
#define RANGE_LT '<'
#define RANGE_GT '>'
// clang-format on

/**
* enum EatRangeError - Error codes for eat_range_by_regex()
Expand Down Expand Up @@ -154,12 +156,13 @@ enum RangeSide
*/
struct PatternFlags
{
int tag; /**< character used to represent this op */
int op; /**< operation to perform */
int tag; /**< character used to represent this op */
int op; /**< operation to perform */
int class; /**< Pattern class, e.g. #MUTT_FULL_MSG */
bool (*eat_arg)(struct Pattern *, struct Buffer *, struct Buffer *); /**< Callback function to parse the argument */
};

// clang-format off
/**
* range_regexes - Set of Regexes for various range types
*
Expand All @@ -172,6 +175,7 @@ static struct RangeRegex range_regexes[] = {
[RANGE_K_GT] = { RANGE_GT_RX, 2, 1, 0 },
[RANGE_K_BARE] = { RANGE_BARE_RX, 1, 1, 0 },
};
// clang-format on

static struct Pattern *SearchPattern = NULL; /**< current search pattern */
static char LastSearch[STRING] = { 0 }; /**< last pattern searched for */
Expand Down Expand Up @@ -935,7 +939,7 @@ static bool eat_message_range(struct Pattern *pat, struct Buffer *s, struct Buff
}

/**
* patmatch - Compare a string to a Pattern
* patmatch - Compare a string to a Pattern
* @param pat Pattern to use
* @param buf String to compare
* @retval 0 Match
Expand Down Expand Up @@ -1109,6 +1113,7 @@ static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno)
return match;
}

// clang-format off
/**
* Flags - Lookup table for all patterns
*/
Expand Down Expand Up @@ -1164,6 +1169,7 @@ static const struct PatternFlags Flags[] = {
{ '/', MUTT_SERVERSEARCH, 0, eat_regex },
{ 0, 0, 0, NULL },
};
// clang-format on

/**
* lookup_tag - Lookup a pattern modifier
Expand Down Expand Up @@ -2463,4 +2469,3 @@ int mutt_search_command(int cur, int op)
mutt_error(_("Not found."));
return -1;
}

Loading

0 comments on commit 77c2177

Please sign in to comment.