struct NntpData *nntp_data = nserv->groups_list[i];
if (nntp_data && (nntp_data->new || (nntp_data->subscribed &&
(nntp_data->unread || !ShowOnlyUnread))))
+ {
add_folder(menu, state, nntp_data->group, NULL, NULL, NULL, nntp_data);
+ }
}
}
else
if (query_quadoption(Print,
h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
+ {
return;
+ }
if (pipe_message(h, PrintCommand, PrintDecode, 1, PrintSplit, "\f") == 0)
mutt_message(h ? _("Message printed") : _("Messages printed"));
buflen = sizeof(dn_common_name);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0,
dn_common_name, &buflen) != 0)
+ {
dn_common_name[0] = '\0';
+ }
buflen = sizeof(dn_email);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_PKCS9_EMAIL, 0, 0, dn_email, &buflen) != 0)
dn_email[0] = '\0';
buflen = sizeof(dn_organization);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_ORGANIZATION_NAME, 0,
0, dn_organization, &buflen) != 0)
+ {
dn_organization[0] = '\0';
+ }
buflen = sizeof(dn_organizational_unit);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME,
0, 0, dn_organizational_unit, &buflen) != 0)
+ {
dn_organizational_unit[0] = '\0';
+ }
buflen = sizeof(dn_locality);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0,
dn_locality, &buflen) != 0)
+ {
dn_locality[0] = '\0';
+ }
buflen = sizeof(dn_province);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME,
0, 0, dn_province, &buflen) != 0)
+ {
dn_province[0] = '\0';
+ }
buflen = sizeof(dn_country);
if (gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0,
dn_country, &buflen) != 0)
+ {
dn_country[0] = '\0';
+ }
snprintf(menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
buflen = sizeof(dn_common_name);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_COMMON_NAME, 0,
0, dn_common_name, &buflen) != 0)
+ {
dn_common_name[0] = '\0';
+ }
buflen = sizeof(dn_email);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_PKCS9_EMAIL, 0, 0,
dn_email, &buflen) != 0)
+ {
dn_email[0] = '\0';
+ }
buflen = sizeof(dn_organization);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_ORGANIZATION_NAME,
0, 0, dn_organization, &buflen) != 0)
+ {
dn_organization[0] = '\0';
+ }
buflen = sizeof(dn_organizational_unit);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME,
0, 0, dn_organizational_unit, &buflen) != 0)
+ {
dn_organizational_unit[0] = '\0';
+ }
buflen = sizeof(dn_locality);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_LOCALITY_NAME,
0, 0, dn_locality, &buflen) != 0)
+ {
dn_locality[0] = '\0';
+ }
buflen = sizeof(dn_province);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME,
0, 0, dn_province, &buflen) != 0)
+ {
dn_province[0] = '\0';
+ }
buflen = sizeof(dn_country);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert, GNUTLS_OID_X520_COUNTRY_NAME,
0, 0, dn_country, &buflen) != 0)
+ {
dn_country[0] = '\0';
+ }
snprintf(menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
if (mutt_copy_header(fpin, hdr, fpout, chflags,
(chflags & CH_PREFIX) ? prefix : NULL) == -1)
+ {
return -1;
+ }
new_offset = ftello(fpout);
}
mutt_unget_event(ch.op ? 0 : ch.ch, ch.op ? ch.op : 0);
if (mutt_get_field_full(pc, buf, blen, (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR,
multiple, files, numfiles) != 0)
+ {
buf[0] = '\0';
+ }
FREE(&pc);
#ifdef USE_NOTMUCH
if ((flags & MUTT_SEL_VFOLDER) && buf[0] && (strncmp(buf, "notmuch://", 10) != 0))
if (mutt_pattern_func(MUTT_UNDELETE,
_("Undelete messages matching: ")) == 0)
+ {
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
+ }
break;
case OP_MAIN_UNTAG_PATTERN:
if (check == 0)
{
if (newhdr && Context->vcount != ovc)
+ {
for (j = 0; j < Context->vcount; j++)
{
if (Context->hdrs[Context->v2r[j]] == newhdr)
break;
}
}
+ }
OPT_SEARCH_INVALID = true;
}
else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED)
state->curpos++;
while (state->curpos < state->lastchar &&
COMB_CHAR(state->wbuf[state->curpos]))
+ {
state->curpos++;
+ }
}
break;
state->curpos++;
while (state->curpos < state->lastchar &&
!iswspace(state->wbuf[state->curpos]))
+ {
state->curpos++;
+ }
}
break;
*/
if (h->searched && (changed != h->changed || deleted != ctx->deleted ||
tagged != ctx->tagged || flagged != ctx->flagged))
+ {
h->searched = false;
+ }
}
/**
if (km_expand_key(keystroke, sizeof(keystroke),
km_find_func(MENU_PAGER, OP_VIEW_ATTACHMENTS)))
+ {
fprintf(s->fpout, _("(use '%s' to view this part)"), keystroke);
+ }
else
fputs(_("(need 'view-attachments' bound to key!)"), s->fpout);
}
htmp = NULL;
if (flags & MUTT_FORMAT_TREE && (hdr->thread->prev && hdr->thread->prev->message &&
hdr->thread->prev->message->env->x_label))
+ {
htmp = hdr->thread->prev->message;
+ }
else if (flags & MUTT_FORMAT_TREE &&
(hdr->thread->parent && hdr->thread->parent->message &&
hdr->thread->parent->message->env->x_label))
+ {
htmp = hdr->thread->parent->message;
+ }
if (htmp && (mutt_str_strcasecmp(hdr->env->x_label, htmp->env->x_label) == 0))
i = 0;
}
{
if ((tmp->type & hook) && ((match && regexec(tmp->regex.regex, match, 0, NULL, 0) == 0) ^
tmp->regex.not))
+ {
mutt_list_insert_tail(matches, mutt_str_strdup(tmp->command));
+ }
}
}
new = (status->unseen > 0);
}
else if (!olduv && !oldun)
+ {
/* first check per session, use recent. might need a flag for this. */
new = (status->recent > 0);
+ }
else
new = (status->unseen > 0);
}
match = false;
/* don't include pending expunged messages */
if (hdrs[n]->active)
+ {
switch (flag)
{
case MUTT_DELETED:
match = true;
break;
}
+ }
if (match && (!changed || hdrs[n]->changed))
{
}
if (imap_read_literal(msg->fp, idata, bytes,
output_progress ? &progressbar : NULL) < 0)
+ {
goto bail;
+ }
/* pick up trailing line */
rc = imap_cmd_step(idata);
if (rc != IMAP_CMD_CONTINUE)
if (ch < 0x80)
{
if (0x20 <= ch && ch < 0x7f)
+ {
/* Printable US-ASCII */
goto bail;
+ }
*p++ = ch;
}
else if (ch < 0x800)
}
}
if (ch || k < 6)
+ {
/* Non-zero or too many extra bits */
goto bail;
+ }
if (!u7len || *u7 != '-')
+ {
/* BASE64 not properly terminated */
goto bail;
+ }
if (u7len > 2 && u7[1] == '&' && u7[2] != '-')
+ {
/* Adjacent BASE64 sections */
goto bail;
+ }
}
else if (*u7 < 0x20 || *u7 >= 0x7f)
+ {
/* Not printable US-ASCII */
goto bail;
+ }
else
*p++ = *u7;
}
while (*mailbox && ((ImapDelimChars && strchr(ImapDelimChars, *mailbox)) ||
(delim && *mailbox == delim)))
+ {
mailbox++;
+ }
path[i] = delim;
}
else
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
/* return the completed command */
strncpy(buffer, Completed, len - spaces);
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
strncpy(pt, Completed, buffer + len - pt - spaces);
}
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
strncpy(pt, Completed, buffer + len - pt - spaces);
}
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
/* return the completed query */
strncpy(pt, Completed, buffer + len - pt - spaces);
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
/* return the completed query */
strncpy(pt, Completed, buffer + len - pt);
if (numtabs == 1 && NumMatched == 2)
snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
else if (numtabs > 1 && NumMatched > 2)
+ {
/* cycle thru all the matches */
snprintf(Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % NumMatched]);
+ }
/* return the completed label */
strncpy(buffer, Completed, len - spaces);
goto bail;
}
else if (i < 0)
+ {
/* fatal error */
return -1;
+ }
/* Create a temporary file to write the new version of the mailbox in. */
mutt_mktemp(tempfile, sizeof(tempfile));
/* need to move the cursor? */
if ((DIRECTION *
(tmp = (menu->current - (menu->top + (neg ? (menu->pagelen - 1) - c : c))))) < 0)
+ {
menu->current -= tmp;
+ }
menu->redraw = REDRAW_INDEX;
}
menu->redraw = REDRAW_MOTION;
}
else
+ {
mutt_error(neg ? _("You are on the first page.") :
_("You are on the last page."));
+ }
menu->current = MIN(menu->current, menu->max - 1);
menu->current = MAX(menu->current, 0);
flags_changed = true;
if (ctx->hdrs[i]->deleted == ctx->hdrs[i]->trash)
+ {
if (ctx->hdrs[i]->deleted != p->h->deleted)
{
ctx->hdrs[i]->deleted = p->h->deleted;
flags_changed = true;
}
+ }
ctx->hdrs[i]->trash = p->h->trash;
/* this is a duplicate of an existing header, so remove it */
#define alignof(type) offsetof(struct { char c; type x; }, x)
#define UNALIGNED_P(p) (((size_t) p) % alignof(md5_uint32) != 0)
if (UNALIGNED_P(buffer))
+ {
while (len > 64)
{
mutt_md5_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx);
buffer = (const char *) buffer + 64;
len -= 64;
}
+ }
else
#endif
{
p++;
for (int i = pmatch[n].rm_so;
(i < pmatch[n].rm_eo) && (tlen < LONG_STRING - 1); i++)
+ {
dst[tlen++] = src[i];
+ }
}
}
else
int idx;
for (idx = pmatch[n].rm_so;
(idx < pmatch[n].rm_eo) && (tlen < buflen - 1); ++idx)
+ {
buf[tlen++] = str[idx];
+ }
}
p = e; /* skip over the parsed integer */
}
p = mutt_param_get("x-action", m->parameter);
if (p && ((mutt_str_strcasecmp(p, "sign") == 0) ||
(mutt_str_strcasecmp(p, "signclear") == 0)))
+ {
t |= PGPSIGN;
+ }
p = mutt_param_get("format", m->parameter);
if (p && (mutt_str_strcasecmp(p, "keys-only") == 0))
{
s = k->kobj->subkeys->keyid;
if ((!PgpLongIds) && (strlen(s) == 16))
+ {
/* Return only the short keyID. */
s += 8;
+ }
}
return s;
}
if (now < PgpExptime)
+ {
/* Use cached copy. */
return 1;
+ }
pgp_void_passphrase();
snprintf(buf, buflen, fmt, trust_flags[uid->trust & 0x03]);
}
else if (!(uid->trust & 0x03))
+ {
/* undefined trust */
optional = 0;
+ }
break;
default:
*buf = '\0';
if (addr->mailbox && u_addr->mailbox &&
(mutt_str_strcasecmp(addr->mailbox, u_addr->mailbox) == 0))
+ {
rc |= PGP_KV_ADDR;
+ }
if (addr->personal && u_addr->personal &&
(mutt_str_strcasecmp(addr->personal, u_addr->personal) == 0))
+ {
rc |= PGP_KV_STRING;
+ }
return rc;
}
/* XXX make error reporting more verbose */
if (OPT_PGP_CHECK_TRUST)
+ {
if (!pgp_key_is_valid(KeyTable[menu->current]->parent))
{
mutt_error(_("This key can't be used: expired/disabled/revoked."));
break;
}
+ }
if (OPT_PGP_CHECK_TRUST && (!pgp_id_is_valid(KeyTable[menu->current]) ||
!pgp_id_is_strong(KeyTable[menu->current])))
}
if (len >= 18 && p[1] == 3)
+ {
/* version 3 signature */
return (short) p[17];
+ }
else if (len >= 5 && p[1] == 4)
+ {
/* version 4 signature */
return (short) p[4];
+ }
else
{
mutt_debug(1, "Bad signature packet.\n");
time_t now = time(NULL);
if (now < SmimeExptime)
+ {
/* Use cached copy. */
return 1;
+ }
smime_void_passphrase();
{
if (mutt_str_strcasecmp(SmimeDefaultKey,
SmimeKeyToUse + mutt_str_strlen(SmimeKeys) + 1) == 0)
+ {
return;
+ }
smime_void_passphrase();
}
cnt = ch + 1;
}
if (!(flags & MUTT_PAGER_NSKIP))
+ {
/* skip leading blanks on the next line too */
while (*buf_ptr == ' ' || *buf_ptr == '\t')
buf_ptr++;
+ }
}
if (*buf_ptr == '\r')
/* some idiotic clients break their message-ids between lines */
if (s == p)
+ {
/* step past another whitespace */
s = p + 1;
+ }
else if (o)
+ {
/* more than two lines, give up */
s = o = onull = NULL;
+ }
else
{
/* remember the first line, start looking for the second */
{
for (id = 0, i = SHA_DIGEST_LENGTH - 8 + k * 4;
i < SHA_DIGEST_LENGTH + (k - 1) * 4; i++)
+ {
id = (id << 8) + digest[i];
+ }
snprintf((char *) scratch + k * 8, sizeof(scratch) - k * 8, "%08lX", id);
}
}
if (!client_start)
+ {
while (true)
{
rc = sasl_client_step(saslconn, buf, len, &interaction, &pc, &olen);
break;
mutt_sasl_interact(interaction);
}
+ }
else
{
olen = client_start;
{
ret = authenticator->authenticate(pop_data, method);
if (ret == POP_A_SOCKET)
+ {
switch (pop_connect(pop_data))
{
case 0:
case -2:
ret = POP_A_FAILURE;
}
+ }
if (ret != POP_A_UNAVAIL)
attempts++;
{
ret = authenticator->authenticate(pop_data, authenticator->method);
if (ret == POP_A_SOCKET)
+ {
switch (pop_connect(pop_data))
{
case 0:
case -2:
ret = POP_A_FAILURE;
}
+ }
if (ret != POP_A_UNAVAIL)
attempts++;
if (query_quadoption(PopReconnect,
_("Connection lost. Reconnect to POP server?")) != MUTT_YES)
+ {
return -1;
+ }
}
}
if (ci_send_message(flags, tmphdr, tmpbody, NULL,
parent_hdr ? parent_hdr : (cur ? cur->hdr : NULL)) == 0)
+ {
mutt_set_flag(Context, hdr, MUTT_REPLIED, 1);
+ }
}
/* this compare most occur before compose to match correctly */
if (get_field_text(field + 12, entry ? &entry->composetypecommand : NULL,
type, filename, line))
+ {
composecommand = true;
+ }
}
else if (mutt_str_strncasecmp(field, "compose", 7) == 0)
{
if (get_field_text(field + 7, entry ? &entry->composecommand : NULL,
type, filename, line))
+ {
composecommand = true;
+ }
}
else if (mutt_str_strncasecmp(field, "print", 5) == 0)
{
if (get_field_text(field + 5, entry ? &entry->printcommand : NULL,
type, filename, line))
+ {
printcommand = true;
+ }
}
else if (mutt_str_strncasecmp(field, "edit", 4) == 0)
{
return -1;
if (ReplyWithXorig && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
(edit_address(&en->from, "From: ") == -1))
+ {
return -1;
+ }
}
if (en->subject)
}
}
else if (cd[i] == (iconv_t)(-1) && score[i] == (size_t)(-1))
+ {
/* Special case for conversion to UTF-8 */
update_content_info(&infos[i], &states[i], bufu, ubl1);
+ }
}
if (ibl)
+ {
/* Save unused input */
memmove(bufi, ib, ibl);
+ }
else if (!ubl1 && ib < bufi + sizeof(bufi))
{
ret = 0;
/* send the recipient list */
if ((rc = smtp_rcpt_to(conn, to)) || (rc = smtp_rcpt_to(conn, cc)) ||
(rc = smtp_rcpt_to(conn, bcc)))
+ {
break;
+ }
/* send the message data */
rc = smtp_data(conn, msgfile);