Insert {}s where the conditional or body take up more than one line.
if (a->name && strncmp(a->name, buf, strlen(buf)) == 0)
{
if (!bestname[0]) /* init */
+ {
mutt_str_strfcpy(bestname, a->name,
MIN(mutt_str_strlen(a->name) + 1, sizeof(bestname)));
+ }
else
{
int i;
if (use_pager)
{
if (a->description)
+ {
snprintf(descrip, sizeof(descrip),
_("---Command: %-20.20s Description: %s"), command, a->description);
+ }
else
+ {
snprintf(descrip, sizeof(descrip),
_("---Command: %-30.30s Attachment: %s"), command, type);
+ }
}
if ((mutt_wait_filter(thepid) || (entry->needsterminal && WaitKey)) && !use_pager)
if (flags & MUTT_FORMAT_OPTIONAL)
{
if (folder->ff->nd->unread != 0)
+ {
mutt_expando_format(buf, buflen, col, cols, if_str,
group_index_format_str, data, flags);
+ }
else
+ {
mutt_expando_format(buf, buflen, col, cols, else_str,
group_index_format_str, data, flags);
+ }
}
else if (Context && Context->data == folder->ff->nd)
{
continue;
if (Mask && Mask->regex &&
!((regexec(Mask->regex, nntp_data->group, 0, NULL, 0) == 0) ^ Mask->not))
+ {
continue;
+ }
add_folder(menu, state, nntp_data->group, NULL, NULL, NULL, nntp_data);
}
}
}
if (Mask && Mask->regex &&
!((regexec(Mask->regex, de->d_name, 0, NULL, 0) == 0) ^ Mask->not))
+ {
continue;
+ }
mutt_file_concat_path(buffer, d, de->d_name, sizeof(buffer));
if (lstat(buffer, &s) == -1)
#ifdef USE_NNTP
if (OptNews)
+ {
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
NONULL(GroupIndexFormat), group_index_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+ }
else
#endif
+ {
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
NONULL(FolderFormat), folder_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+ }
}
#ifdef USE_NOTMUCH
if (buffy)
snprintf(title, titlelen, _("Subscribed newsgroups"));
else
+ {
snprintf(title, titlelen, _("Newsgroups on server [%s]"),
CurrentNewsSrv->conn->account.host);
+ }
}
else
#endif
}
#endif
else
+ {
mutt_file_concat_path(buf, LastDir, state.entry[menu->current].name,
sizeof(buf));
+ }
if ((mx_get_magic(buf) <= 0)
#ifdef USE_IMAP
FREE(&((state.entry)[nentry].desc));
/* and move all other entries up */
if (nentry + 1 < state.entrylen)
+ {
memmove(state.entry + nentry, state.entry + nentry + 1,
sizeof(struct FolderFile) * (state.entrylen - (nentry + 1)));
+ }
memset(&state.entry[state.entrylen - 1], 0, sizeof(struct FolderFile));
state.entrylen--;
mutt_message(_("Mailbox deleted."));
if (CheckMboxSize)
new_or_changed = sb->st_size > mailbox->size;
else
+ {
new_or_changed = sb->st_mtime > sb->st_atime ||
(mailbox->newly_created && sb->st_ctime == sb->st_mtime &&
sb->st_ctime == sb->st_atime);
+ }
if (new_or_changed)
{
if (pipe_message(h, PrintCommand, PrintDecode, 1, PrintSplit, "\f") == 0)
mutt_message(ngettext("Message printed", "Messages printed", msgcount));
else
+ {
mutt_message(ngettext("Message could not be printed",
"Messages could not be printed", msgcount));
+ }
}
int mutt_select_sort(int reverse)
}
else if (((WithCrypto & APPLICATION_PGP) != 0) &&
mutt_is_application_pgp(hdr->content) & ENCRYPT)
+ {
decode = 1;
+ }
else if (((WithCrypto & APPLICATION_SMIME) != 0) &&
mutt_is_application_smime(hdr->content) & ENCRYPT)
{
if ((WithCrypto != 0) && need_passphrase && (decode || decrypt) &&
!crypt_valid_passphrase(app))
+ {
return -1;
+ }
mutt_message(_("Copying to %s..."), buf);
tmp[0] = 0;
mutt_str_strfcpy(tmp + strlen(tmp), filepart, sizeof(tmp) - strlen(tmp));
if (stat(tmp, &st) != -1 && (st.st_mode & S_IFDIR))
+ {
mutt_str_strfcpy(filepart + strlen(filepart), "/",
sizeof(filepart) - strlen(filepart));
+ }
init = 1;
}
}
if (mutt_enter_fname_full(prompt, fname, sizeof(fname), 0, 1, &files,
&numfiles, MUTT_SEL_MULTI) == -1 ||
*fname == '\0')
+ {
break;
+ }
int error = 0;
if (numfiles > 1)
+ {
mutt_message(ngettext("Attaching selected file...",
"Attaching selected files...", numfiles));
+ }
for (i = 0; i < numfiles; i++)
{
char *att = files[i];
} while (len > *sasldata->pbufsize);
}
else
+ {
/* just write using the underlying socket function */
rc = (sasldata->msasl_write)(conn, buf, len);
+ }
conn->sockdata = sasldata;
if (chainidx == 0 && SslVerifyHost != MUTT_NO &&
!gnutls_x509_crt_check_hostname(cert, hostname) &&
!tls_check_stored_hostname(certdata, hostname))
+ {
*certerr |= CERTERR_HOSTNAME;
+ }
/* see whether certificate is in our cache (certificates file) */
if (tls_compare_certificates(certdata))
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
((mutt_str_strncasecmp("Status:", buf, 7) == 0) ||
(mutt_str_strncasecmp("X-Status:", buf, 9) == 0)))
+ {
continue;
+ }
if ((flags & (CH_UPDATE_LEN | CH_XMIT | CH_NOLEN)) &&
((mutt_str_strncasecmp("Content-Length:", buf, 15) == 0) ||
(mutt_str_strncasecmp("Lines:", buf, 6) == 0)))
+ {
continue;
+ }
if ((flags & CH_UPDATE_REFS) && (mutt_str_strncasecmp("References:", buf, 11) == 0))
continue;
if ((flags & CH_UPDATE_IRT) && (mutt_str_strncasecmp("In-Reply-To:", buf, 12) == 0))
int mutt_copy_header(FILE *in, struct Header *h, FILE *out, int flags, const char *prefix)
{
if (h->env)
+ {
flags |= (h->env->irt_changed ? CH_UPDATE_IRT : 0) |
(h->env->refs_changed ? CH_UPDATE_REFS : 0);
+ }
if (mutt_copy_hdr(in, out, h->offset, h->content->offset, flags, prefix) == -1)
return -1;
{
/* notify the user of new mail */
if (check == MUTT_REOPENED)
+ {
mutt_error(
_("Mailbox was externally modified. Flags may be wrong."));
+ }
else if (check == MUTT_NEW_MAIL)
{
for (i = oldcount; i < Context->msgcount; i++)
else if (BrailleFriendly)
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 0);
else
+ {
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset,
MuttIndexWindow->cols - 1);
+ }
mutt_refresh();
if (SigWinch)
menu->redraw |= REDRAW_INDEX;
}
else
+ {
mutt_error(
_("Thread cannot be broken, message is not part of a thread"));
+ }
break;
if ((op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW ||
op == OP_MAIN_NEXT_NEW_THEN_UNREAD || op == OP_MAIN_PREV_NEW_THEN_UNREAD) &&
first_new != -1)
+ {
break;
+ }
}
if ((op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW ||
op == OP_MAIN_NEXT_NEW_THEN_UNREAD || op == OP_MAIN_PREV_NEW_THEN_UNREAD) &&
first_new != -1)
+ {
menu->current = first_new;
+ }
else if ((op == OP_MAIN_NEXT_UNREAD || op == OP_MAIN_PREV_UNREAD ||
op == OP_MAIN_NEXT_NEW_THEN_UNREAD || op == OP_MAIN_PREV_NEW_THEN_UNREAD) &&
first_unread != -1)
+ {
menu->current = first_unread;
+ }
if (menu->current == -1)
{
for (j = 0; j < Context->msgcount; j++)
{
if (message_is_tagged(Context, j))
+ {
mutt_set_flag(Context, Context->hdrs[j], MUTT_FLAG,
!Context->hdrs[j]->flagged);
+ }
}
menu->redraw |= REDRAW_INDEX;
}
}
else
+ {
/* L10N: This error is printed if <mark-message> cannot find a
Message-ID for the currently selected message in the index. */
mutt_error(_("No message ID to macro."));
+ }
break;
case OP_RECALL_MESSAGE:
rc = mutt_thread_set_flag(CURHDR, MUTT_DELETE, 0, op == OP_UNDELETE_THREAD ? 0 : 1);
if (rc != -1)
+ {
rc = mutt_thread_set_flag(CURHDR, MUTT_PURGE, 0,
op == OP_UNDELETE_THREAD ? 0 : 1);
+ }
if (rc != -1)
{
if (Resolve)
!mutt_addr_cmp_strict(e1->reply_to, e2->reply_to) ||
!mutt_addr_cmp_strict(e1->to, e2->to) || !mutt_addr_cmp_strict(e1->cc, e2->cc) ||
!mutt_addr_cmp_strict(e1->return_path, e2->return_path))
+ {
return false;
+ }
else
return true;
}
if ((a->encoding == ENCBASE64) || (a->encoding == ENCQUOTEDPRINTABLE) ||
(a->encoding == ENCUUENCODED))
+ {
mutt_body_free(&b);
+ }
return rc;
}
if ((a->encoding == ENCBASE64) || (a->encoding == ENCQUOTEDPRINTABLE) ||
(a->encoding == ENCUUENCODED))
+ {
mutt_body_free(&b);
+ }
/* make failure of a single part non-fatal */
if (rc < 0)
else
{
if (HonorDisposition && (b->disposition == DISPATTACH))
+ {
str = _("[-- This is an attachment (need 'view-attachments' bound to "
"key!) --]\n");
+ }
else
{
/* L10N: %s/%s is a MIME type, e.g. "text/plain". */
if (rc == MDB_SUCCESS)
ctx->txn_mode = TXN_READ;
else
+ {
mutt_debug(2, "%s: %s\n", ctx->txn ? "mdb_txn_renew" : "mdb_txn_begin",
mdb_strerror(rc));
+ }
return rc;
}
case 'a':
colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
if (hdr->env->from && hdr->env->from->mailbox)
+ {
mutt_format_s(buf + colorlen, buflen - colorlen, prec,
mutt_addr_for_display(hdr->env->from));
+ }
else
mutt_format_s(buf + colorlen, buflen - colorlen, prec, "");
add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
{
char *parent_tags = NULL;
if (hdr->thread->prev && hdr->thread->prev->message)
+ {
parent_tags =
driver_tags_get_transformed(&hdr->thread->prev->message->tags);
+ }
if (!parent_tags && hdr->thread->parent && hdr->thread->parent->message)
+ {
parent_tags =
driver_tags_get_transformed(&hdr->thread->parent->message->tags);
+ }
if (parent_tags && mutt_str_strcasecmp(tags, parent_tags) == 0)
i = 0;
FREE(&parent_tags);
case 'W':
if (!optional)
+ {
mutt_format_s(buf, buflen, prec,
hdr->env->organization ? hdr->env->organization : "");
+ }
else if (!hdr->env->organization)
optional = 0;
break;
#ifdef USE_NNTP
case 'x':
if (!optional)
+ {
mutt_format_s(buf, buflen, prec,
hdr->env->x_comment_to ? hdr->env->x_comment_to : "");
+ }
else if (!hdr->env->x_comment_to)
optional = 0;
break;
}
if (optional)
+ {
mutt_expando_format(buf, buflen, col, cols, if_str, index_format_str,
(unsigned long) hfi, flags);
+ }
else if (flags & MUTT_FORMAT_OPTIONAL)
+ {
mutt_expando_format(buf, buflen, col, cols, else_str, index_format_str,
(unsigned long) hfi, flags);
+ }
return src;
}
#ifdef USE_NNTP
if (!OptNewsSend)
#endif
+ {
if (!STAILQ_EMPTY(&msg->env->in_reply_to) &&
(STAILQ_EMPTY(&n->in_reply_to) ||
(mutt_str_strcmp(STAILQ_FIRST(&n->in_reply_to)->data,
STAILQ_FIRST(&msg->env->in_reply_to)->data) != 0)))
+ {
mutt_list_free(&msg->env->references);
+ }
+ }
/* restore old info. */
mutt_list_free(&n->references);
if (method)
mutt_debug(2, "%s unavailable\n", method);
else
+ {
mutt_debug(
1,
"Failure starting authentication exchange. No shared mechanisms?\n");
+ }
/* SASL doesn't support LOGIN, so fall back */
return IMAP_AUTH_UNAVAIL;
inc->msg_unread = status->unseen;
if (inc->new)
+ {
/* force back to keep detecting new mail until the mailbox is
opened */
status->uidnext = oldun;
+ }
FREE(&value);
return;
if (((mutt_str_strncmp(idata->buf, "* ", 2) == 0) ||
(mutt_str_strncmp(imap_next_word(idata->buf), "OK [", 4) == 0)) &&
cmd_handle_untagged(idata))
+ {
return IMAP_CMD_BAD;
+ }
/* server demands a continuation response from us */
if (idata->buf[0] == '+')
imap_munge_mbox_name(idata, munged, sizeof(munged), name);
if (check_stats)
+ {
snprintf(command, sizeof(command),
"STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged);
+ }
else
+ {
snprintf(command, sizeof(command),
"STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged);
+ }
if (imap_exec(idata, command, IMAP_CMD_QUEUE | IMAP_CMD_POLL) < 0)
{
imap_unmunge_mbox_name(idata, mbox);
}
else
+ {
/* Server does not support STATUS, and this is not the current mailbox.
* There is no lightweight way to check recent arrivals */
return -1;
+ }
if (queue)
{
mutt_bit_isset(idata->ctx->rights, MUTT_ACL_SEEN) ||
mutt_bit_isset(idata->ctx->rights, MUTT_ACL_WRITE) ||
mutt_bit_isset(idata->ctx->rights, MUTT_ACL_INSERT)))
+ {
ctx->readonly = true;
+ }
ctx->hdrmax = count;
ctx->hdrs = mutt_mem_calloc(count, sizeof(struct Header *));
idata->uidnext = maxuid + 1;
}
if (idata->uidnext > 1)
+ {
mutt_hcache_store_raw(idata->hcache, "/UIDNEXT", 8, &idata->uidnext,
sizeof(idata->uidnext));
+ }
imap_hcache_close(idata);
#endif /* USE_HCACHE */
if (mutt_str_atoui(pc, &uid) < 0)
goto bail;
if (uid != HEADER_DATA(h)->uid)
+ {
mutt_error(_(
"The message index is incorrect. Try reopening the mailbox."));
+ }
}
else if ((mutt_str_strncasecmp("RFC822", pc, 6) == 0) ||
(mutt_str_strncasecmp("BODY[]", pc, 6) == 0))
goto out;
}
else
+ {
mutt_message(ngettext("Copying %d message to %s...", "Copying %d messages to %s...", rc),
rc, mbox);
+ }
}
else
{
if (!c)
return -1;
else
+ {
/* walk past closing '}' */
mx->mbox = mutt_str_strdup(c + 1);
+ }
c = strrchr(tmp, '@');
if (c)
if (hlen == 0)
home_match = true;
else if (ImapDelimChars)
+ {
for (delim = ImapDelimChars; *delim != '\0'; delim++)
if (target.mbox[hlen] == *delim)
home_match = true;
+ }
}
FREE(&home.mbox);
}
else if (DTYPE(MuttVars[idx].type) == DT_MBTABLE)
free_mbtable((struct MbTable **) MuttVars[idx].var);
else
+ {
/* MuttVars[idx].var is already 'char**' (or some 'void**') or...
* so cast to 'void*' is okay */
FREE((void *) MuttVars[idx].var);
+ }
}
else if (query || *s->dptr != '=')
{
else
{
if (inv)
+ {
*(unsigned char *) MuttVars[idx].var =
toggle_quadoption(*(unsigned char *) MuttVars[idx].var);
+ }
else if (unset)
*(unsigned char *) MuttVars[idx].var = MUTT_NO;
else
(ch == '=' && (flags & MUTT_TOKEN_EQUAL)) ||
(ch == ';' && !(flags & MUTT_TOKEN_SEMICOLON)) ||
((flags & MUTT_TOKEN_PATTERN) && strchr("~%=!|", ch)))
+ {
break;
+ }
}
tok->dptr++;
count++;
if (!ctx->quiet)
+ {
mutt_progress_update(&progress, count,
(int) (ftello(ctx->fp) / (ctx->size / 100 + 1)));
+ }
if (ctx->msgcount == ctx->hdrmax)
mx_alloc_memory(ctx);
ctx->msgcount++;
if (!curhdr->env->return_path && return_path[0])
+ {
curhdr->env->return_path =
mutt_addr_parse_list(curhdr->env->return_path, return_path);
+ }
if (!curhdr->env->from)
curhdr->env->from = mutt_addr_copy_list(curhdr->env->return_path, false);
(mutt_str_strcmp(b1->subtype, b2->subtype) != 0) ||
(mutt_str_strcmp(b1->description, b2->description) != 0) ||
!mutt_param_cmp_strict(&b1->parameter, &b2->parameter) || b1->length != b2->length)
+ {
return 0;
+ }
return 1;
}
h1->zoccident != h2->zoccident || h1->mime != h2->mime ||
!mutt_env_cmp_strict(h1->env, h2->env) ||
!strict_cmp_bodies(h1->content, h2->content))
+ {
return 0;
+ }
else
return 1;
}
}
if (need_sort)
+ {
/* if the mailbox was reopened, the thread tree will be invalid so make
* sure to start threading from scratch. */
mutt_sort_headers(ctx, (need_sort == MUTT_REOPENED));
+ }
return rc;
}
else
{
if (menu->current < menu->top + c)
+ {
menu->top -= (menu->pagelen - c) * ((menu->top + menu->pagelen - 1 - menu->current) /
(menu->pagelen - c)) -
c;
+ }
else if ((menu->current >= menu->top + menu->pagelen - c))
+ {
menu->top +=
(menu->pagelen - c) * ((menu->current - menu->top) / (menu->pagelen - c)) - c;
+ }
}
}
_("Reverse search for: "),
buf, sizeof(buf), MUTT_CLEAR) != 0 ||
!buf[0])
+ {
return -1;
+ }
if (menu->menu >= 0 && menu->menu < MENU_MAX)
{
mutt_str_replace(&SearchBuffers[menu->menu], buf);
else if (BrailleFriendly)
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 0);
else
+ {
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset,
menu->indexwin->cols - 1);
+ }
mutt_refresh();
}
}
if (updseq)
+ {
mh_sequences_add_one(ctx, hi, !msg->flags.read, msg->flags.flagged,
msg->flags.replied);
+ }
return 0;
}
assert(strchr(MimeSpecials, '?'));
if ((c >= 0x7f) || (c < 0x20) || (*p == '_') ||
((c != ' ') && strchr(MimeSpecials, *p)))
+ {
count++;
+ }
}
len = ENCWORD_LEN_MIN - 2 + strlen(tocode);
if ((strcmp(timebase, "hour") == 0) || (strcmp(timebase, "day") == 0) ||
(strcmp(timebase, "week") == 0) || (strcmp(timebase, "month") == 0) ||
(strcmp(timebase, "year") == 0))
+ {
return true;
+ }
return false;
}
}
if (end == 0)
+ {
snprintf(buf, buflen, "date:%d%s..now and %s", beg, NmQueryWindowTimebase,
NmQueryWindowCurrentSearch);
+ }
else
+ {
snprintf(buf, buflen, "date:%d%s..%d%s and %s", beg, NmQueryWindowTimebase,
end, NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
+ }
mutt_debug(2, "nm: %s -> %s\n", query, buf);
}
if (data->progress_ready)
+ {
mutt_progress_update(&data->progress,
ctx->msgcount + data->ignmsgcount - data->oldmsgcount, -1);
+ }
}
/**
}
}
else if (NmDefaultUri)
+ {
added = snprintf(uri, sizeof(uri), "%s?type=%s&query=", NmDefaultUri,
query_type_to_string(string_to_query_type(NmQueryType)));
+ }
else if (Folder)
+ {
added = snprintf(uri, sizeof(uri), "notmuch://%s?type=%s&query=", Folder,
query_type_to_string(string_to_query_type(NmQueryType)));
+ }
else
return NULL;
if (GecosMask && GecosMask->regex)
{
if (regexec(GecosMask->regex, pw->pw_gecos, 1, pat_match, 0) == 0)
+ {
mutt_str_strfcpy(dest, pw->pw_gecos + pat_match[0].rm_so,
MIN(pat_match[0].rm_eo - pat_match[0].rm_so + 1, destlen));
+ }
}
else if ((p = strchr(pw->pw_gecos, ',')))
mutt_str_strfcpy(dest, pw->pw_gecos, MIN(destlen, p - pw->pw_gecos + 1));
NONULL(prefix), NONULL(ShortHostname), (int) getuid(),
(int) getpid(), mutt_rand64(), suffix ? "." : "", NONULL(suffix));
if (n >= slen)
+ {
mutt_debug(1,
"%s:%d: ERROR: insufficient buffer space to hold temporary "
"filename! slen=%zu but need %zu\n",
src, line, slen, n);
+ }
mutt_debug(3, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s);
if (unlink(s) && errno != ENOENT)
+ {
mutt_debug(1, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, line, s,
strerror(errno), errno);
+ }
}
/**
if (mutt_get_field(_("File under directory: "), tmp, sizeof(tmp),
MUTT_FILE | MUTT_CLEAR) != 0 ||
!tmp[0])
+ {
return -1;
+ }
mutt_file_concat_path(fname, path, tmp, flen);
}
for (char *p = tmp; p && *p; p++)
{
if (*p == '\'')
+ {
/* shell quoting doesn't permit escaping a single quote within
* single-quoted material. double-quoting instead will lead
* shell variable expansions, so break out of the single-quoted
* span, insert a double-quoted single quote, and resume. */
mutt_buffer_addstr(command, "'\"'\"'");
+ }
else
mutt_buffer_addch(command, *p);
}
{
/* fast-track in case the paths have been mutt_pretty_mailbox'ified */
if (a[0] == '=' && b[0] == '=')
+ {
return (mutt_str_strcasecmp(a + 1, "inbox") == 0) ?
-1 :
(mutt_str_strcasecmp(b + 1, "inbox") == 0) ? 1 : 0;
+ }
const char *a_end = strrchr(a, '/');
const char *b_end = strrchr(b, '/');
if (!ctx->quiet)
{
if (move_messages)
+ {
mutt_message(_("%d kept, %d moved, %d deleted."),
ctx->msgcount - ctx->deleted, read_msgs, ctx->deleted);
+ }
else
mutt_message(_("%d kept, %d deleted."), ctx->msgcount - ctx->deleted, ctx->deleted);
}
else
{
if (ctx->magic == MUTT_MH || ctx->magic == MUTT_MAILDIR)
+ {
ctx->size -= (ctx->hdrs[i]->content->length + ctx->hdrs[i]->content->offset -
ctx->hdrs[i]->content->hdr_offset);
+ }
/* remove message from the hash tables */
if (ctx->subj_hash && ctx->hdrs[i]->env->real_subj)
mutt_hash_delete(ctx->subj_hash, ctx->hdrs[i]->env->real_subj, ctx->hdrs[i]);
(mutt_str_strcasecmp(b->subtype, "encrypted") != 0) ||
!(p = mutt_param_get(&b->parameter, "protocol")) ||
(mutt_str_strcasecmp(p, "application/pgp-encrypted") != 0))
+ {
return 0;
+ }
return PGPENCRYPT;
}
(p = mutt_param_get(&m->parameter, "x-action")) ||
(p = mutt_param_get(&m->parameter, "action"))) &&
(mutt_str_strncasecmp("pgp-sign", p, 8) == 0))
+ {
t |= PGPSIGN;
+ }
else if (p && (mutt_str_strncasecmp("pgp-encrypt", p, 11) == 0))
t |= PGPENCRYPT;
else if (p && (mutt_str_strncasecmp("pgp-keys", p, 7) == 0))
if (!t)
{
if (complain)
+ {
mutt_message(
_("S/MIME messages with no hints on content are unsupported."));
+ }
return 0;
}
{
len++;
if (mutt_str_strcasecmp((t + len), "p7m") == 0)
+ {
/* Not sure if this is the correct thing to do, but
it's required for compatibility with Outlook */
return (SMIMESIGN | SMIMEOPAQUE);
+ }
else if (mutt_str_strcasecmp((t + len), "p7s") == 0)
return (SMIMESIGN | SMIMEOPAQUE);
}
if (((WithCrypto & APPLICATION_SMIME) != 0) && (hi->security & APPLICATION_SMIME))
{
if (hi->security & ENCRYPT)
+ {
mutt_copy_message_ctx(fpout, Context, hi,
MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
0);
+ }
else
mutt_copy_message_ctx(fpout, Context, hi, 0, 0);
fflush(fpout);
if (((WithCrypto & APPLICATION_SMIME) != 0) && (h->security & APPLICATION_SMIME))
{
if (h->security & ENCRYPT)
+ {
mutt_copy_message_ctx(fpout, Context, h,
MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
0);
+ }
else
mutt_copy_message_ctx(fpout, Context, h, 0, 0);
state_puts("\n", s);
}
else
+ {
state_puts(_("Warning: At least one certification key "
"has expired\n"),
s);
+ }
}
if ((sum & GPGME_SIGSUM_SIG_EXPIRED))
}
if ((sum & GPGME_SIGSUM_KEY_MISSING))
+ {
state_puts(_("Can't verify due to a missing "
"key or certificate\n"),
s);
+ }
if ((sum & GPGME_SIGSUM_CRL_MISSING))
{
*r_is_signed = -1; /* A signature exists. */
if ((s->flags & MUTT_DISPLAY))
+ {
state_attach_puts(_("[-- Begin signature "
"information --]\n"),
s);
+ }
for (idx = 0; (res = show_one_sig_status(ctx, idx, s)) != -1; idx++)
{
if (res == 1)
*r_is_signed = anywarn ? 2 : 1; /* Good signature. */
if ((s->flags & MUTT_DISPLAY))
+ {
state_attach_puts(_("[-- End signature "
"information --]\n\n"),
s);
+ }
}
gpgme_release(ctx);
ctx = NULL;
strftime(date, sizeof(date), "%Y-%m-%d", localtime(&tt));
if (!more)
+ {
fprintf(*fp, "pub %5.5s %d/%8s %s %s\n", gpgme_pubkey_algo_name(subkey->pubkey_algo),
subkey->length, shortid, date, uid->uid);
+ }
else
+ {
fprintf(*fp, "sub %5.5s %d/%8s %s\n", gpgme_pubkey_algo_name(subkey->pubkey_algo),
subkey->length, shortid, date);
+ }
subkey = subkey->next;
more = 1;
}
if (!fpout)
{
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(_("[-- Error: could not create temporary file! "
"--]\n"),
s);
+ }
return -1;
}
tattach->goodsig = is_signed > 0;
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
is_signed ? _("[-- The following data is PGP/MIME signed and "
"encrypted --]\n\n") :
_("[-- The following data is PGP/MIME encrypted --]\n\n"),
s);
+ }
{
FILE *savefp = s->fpin;
s->fpin = savefp;
}
- /*
- * if a multipart/signed is the _only_ sub-part of a
- * multipart/encrypted, cache signature verification
- * status.
- */
+ /* if a multipart/signed is the _only_ sub-part of a
+ * multipart/encrypted, cache signature verification
+ * status.
+ */
if (mutt_is_multipart_signed(tattach) && !tattach->next)
a->goodsig |= tattach->goodsig;
if (!fpout)
{
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(_("[-- Error: could not create temporary file! "
"--]\n"),
s);
+ }
return -1;
}
tattach->goodsig = is_signed > 0;
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
is_signed ? _("[-- The following data is S/MIME signed --]\n\n") :
_("[-- The following data is S/MIME encrypted --]\n\n"),
s);
+ }
{
FILE *savefp = s->fpin;
{
s = key->issuer_serial;
if (s)
+ {
fprintf(fp, "%*s0x%s\n", KeyInfoPadding[KIP_SERIAL_NO],
_(KeyInfoPrompts[KIP_SERIAL_NO]), s);
+ }
}
if (key->issuer_name)
ts = _("keys matching");
if (p)
+ {
/* L10N:
%1$s is one of the previous four entries.
%2$s is an address.
e.g. "S/MIME keys matching <me@mutt.org>." */
snprintf(buf, sizeof(buf), _("%s <%s>."), ts, p->mailbox);
+ }
else
+ {
/* L10N:
e.g. 'S/MIME keys matching "Michael Elkins".' */
snprintf(buf, sizeof(buf), _("%s \"%s\"."), ts, s);
+ }
menu->title = buf;
}
char buf2[LONG_STRING];
if (key_table[menu->current]->flags & KEYFLAG_CANTUSE)
+ {
warn_s = _("ID is expired/disabled/revoked. Do you really want to "
"use the key?");
+ }
else
{
warn_s = "??";
if (!is_uid && (!*is_subkey || !PgpIgnoreSubkeys ||
!((flags & KEYFLAG_DISABLED) || (flags & KEYFLAG_REVOKED) ||
(flags & KEYFLAG_EXPIRED))))
+ {
tmp.flags |= flags;
+ }
break;
(!needpass &&
((mutt_str_strcmp("-----END PGP SIGNATURE-----\n", buf) == 0) ||
(mutt_str_strcmp("-----END PGP PUBLIC KEY BLOCK-----\n", buf) == 0))))
+ {
break;
+ }
/* remember optional Charset: armor header as defined by RFC4880 */
if (mutt_str_strncmp("Charset: ", buf, 9) == 0)
{
mutt_file_fclose(&pgperr);
unlink(pgptmpfile);
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
_("[-- Error: could not create a PGP subprocess! --]\n\n"), s);
+ }
return NULL;
}
if (tattach)
{
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
_("[-- The following data is PGP/MIME encrypted --]\n\n"), s);
+ }
fpin = s->fpin;
s->fpin = fpout;
const char *fname, const char *uids, int sign)
{
if (sign)
+ {
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 1,
fname, NULL, uids, PgpEncryptSignCommand);
+ }
else
+ {
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 0,
fname, NULL, uids, PgpEncryptOnlyCommand);
+ }
}
pid_t pgp_invoke_traditional(FILE **pgpin, FILE **pgpout, FILE **pgperr,
const char *fname, const char *uids, int flags)
{
if (flags & ENCRYPT)
+ {
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd,
(flags & SIGN) ? 1 : 0, fname, NULL, uids,
(flags & SIGN) ? PgpEncryptSignCommand : PgpEncryptOnlyCommand);
+ }
else
+ {
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 1,
fname, NULL, NULL, PgpClearsignCommand);
+ }
}
void pgp_invoke_import(const char *fname)
if (r != 0)
return r > 0;
else
+ {
return (mutt_str_strcasecmp(pgp_fpr_or_lkeyid((*s)->parent),
pgp_fpr_or_lkeyid((*t)->parent)) > 0);
+ }
}
static int pgp_compare_address(const void *a, const void *b)
char buf2[LONG_STRING];
if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE)
+ {
str = _("ID is expired/disabled/revoked. Do you really want to use "
"the key?");
+ }
else
+ {
switch (KeyTable[menu->current]->trust & 0x03)
{
case 0:
"use the key?");
break;
}
+ }
snprintf(buf2, sizeof(buf2), "%s", str);
}
if (h->security & ENCRYPT)
+ {
mutt_copy_message_ctx(fpout, Context, h, MUTT_CM_DECODE_CRYPT & MUTT_CM_DECODE_SMIME,
CH_MIME | CH_WEED | CH_NONEWLINE);
+ }
else
mutt_copy_message_ctx(fpout, Context, h, 0, 0);
mutt_file_fclose(&smimeout);
mutt_file_unlink(tmpfname);
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
+ }
mutt_file_fclose(&smimeerr);
return NULL;
}
mutt_file_fclose(&smimeout);
mutt_file_unlink(tmpfname);
if (s->flags & MUTT_DISPLAY)
+ {
state_attach_puts(
_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s);
+ }
mutt_file_fclose(&smimeerr);
return NULL;
}
}
if (type & ENCRYPT)
+ {
state_attach_puts(_("[-- The following data is S/MIME"
" encrypted --]\n"),
s);
+ }
else
state_attach_puts(_("[-- The following data is S/MIME signed --]\n"), s);
}
if (nntp_data->newsrc_ent[j].first == nntp_data->newsrc_ent[j].last)
snprintf(buf + off, buflen - off, "%u", nntp_data->newsrc_ent[j].first);
else if (nntp_data->newsrc_ent[j].first < nntp_data->newsrc_ent[j].last)
+ {
snprintf(buf + off, buflen - off, "%u-%u",
nntp_data->newsrc_ent[j].first, nntp_data->newsrc_ent[j].last);
+ }
off += strlen(buf + off);
}
buf[off++] = '\n';
if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
!nntp_data->nserv->conn || !nntp_data->group ||
!(nntp_data->newsrc_ent || nntp_data->subscribed || SaveUnsubscribed))
+ {
return NULL;
+ }
mutt_account_tourl(&nntp_data->nserv->conn->account, &url);
url.path = nntp_data->group;
#endif
if (!nntp_data->bcache)
+ {
nntp_data->bcache =
mutt_bcache_open(&nntp_data->nserv->conn->account, nntp_data->group);
+ }
if (nntp_data->bcache)
{
mutt_debug(2, "%s/*\n", nntp_data->group);
if (DebugLevel < MUTT_SOCK_LOG_FULL)
{
if (strchr(buf, ' '))
+ {
mutt_debug(MUTT_SOCK_LOG_CMD, "%d> AUTHINFO SASL %s%s\n",
conn->fd, method, client_len ? " sasl_data" : "");
+ }
else
mutt_debug(MUTT_SOCK_LOG_CMD, "%d> sasl_data\n", conn->fd);
}
if (nserv->use_tls != 1 && (nserv->hasSTARTTLS || SslForceTls))
{
if (nserv->use_tls == 0)
+ {
nserv->use_tls =
SslForceTls || query_quadoption(SslStarttls,
_("Secure connection with TLS?")) == MUTT_YES ?
2 :
1;
+ }
if (nserv->use_tls == 2)
{
if (mutt_socket_send(conn, "STARTTLS\r\n") < 0 ||
}
}
else
+ {
for (current = first; current <= last; current++)
fc.messages[current - first] = 1;
+ }
/* fetching header from cache or server, or fallback to fetch overview */
if (!ctx->quiet)
+ {
mutt_progress_init(&fc.progress, _("Fetching message headers..."),
MUTT_PROGRESS_MSG, ReadInc, last - first + 1);
+ }
for (current = first; current <= last && rc == 0; current++)
{
if (!ctx->quiet)
/* fallback to fetch overview */
else if (nntp_data->nserv->hasOVER || nntp_data->nserv->hasXOVER)
+ {
if (NntpListgroup && nntp_data->nserv->hasLISTGROUP)
break;
else
continue;
+ }
/* fetch header from server */
else
if (rc > 0)
{
if (mutt_str_strncmp(NHDR(hdr)->article_num ? "423" : "430", buf, 3) == 0)
+ {
mutt_error(_("Article %d not found on the server."),
NHDR(hdr)->article_num ? article : hdr->env->message_id);
+ }
else
mutt_error("ARTICLE: %s", buf);
}
mutt_socket_send_d(nntp_data->nserv->conn, "\r\n", MUTT_SOCK_LOG_HDR) < 0) ||
mutt_socket_send_d(nntp_data->nserv->conn, ".\r\n", MUTT_SOCK_LOG_HDR) < 0 ||
mutt_socket_readln(buf, sizeof(buf), nntp_data->nserv->conn) < 0)
+ {
return nntp_connect_error(nntp_data->nserv);
+ }
if (buf[0] != '2')
{
mutt_error(_("Can't post article: %s"), buf);
if (mutt_str_strncmp("500", buf, 3) != 0)
mutt_error("XPAT: %s", buf);
else
+ {
mutt_error(_("Unable to find child articles because server does not "
"support XPAT command."));
+ }
}
return -1;
}
if (regexec(QuoteRegex->regex, buf, 1, pmatch, 0) == 0)
{
if (q_classify && line_info[n].quote == NULL)
+ {
line_info[n].quote = classify_quote(quote_list, buf + pmatch[0].rm_so,
pmatch[0].rm_eo - pmatch[0].rm_so,
force_redraw, q_level);
+ }
line_info[n].type = MT_COLOR_QUOTED;
}
else
else
{
if (q_classify && line_info[n].quote == NULL)
+ {
line_info[n].quote = classify_quote(quote_list, buf + pmatch[0].rm_so,
pmatch[0].rm_eo - pmatch[0].rm_so,
force_redraw, q_level);
+ }
line_info[n].type = MT_COLOR_QUOTED;
}
}
break;
}
if (++(line_info[n].chunks) > 1)
+ {
mutt_mem_realloc(&(line_info[n].syntax),
(line_info[n].chunks) * sizeof(struct Syntax));
+ }
}
i = line_info[n].chunks - 1;
pmatch[0].rm_so += offset;
if (!found)
{
if (++(line_info[n].chunks) > 1)
+ {
mutt_mem_realloc(&(line_info[n].syntax),
(line_info[n].chunks) * sizeof(struct Syntax));
+ }
}
i = line_info[n].chunks - 1;
pmatch[0].rm_so += offset;
(offset ? REG_NOTBOL : 0)) == 0)
{
if (++((*line_info)[n].search_cnt) > 1)
+ {
mutt_mem_realloc(&((*line_info)[n].search),
((*line_info)[n].search_cnt) * sizeof(struct Syntax));
+ }
else
(*line_info)[n].search = mutt_mem_malloc(sizeof(struct Syntax));
pmatch[0].rm_so += offset;
case OP_HALF_UP:
if (rd.topline)
+ {
rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
rd.topline, rd.hide_quoted);
+ }
else
mutt_error(_("Top of message is shown."));
break;
_("Search for: ") :
_("Reverse search for: "),
buffer, sizeof(buffer), MUTT_CLEAR) != 0)
+ {
break;
+ }
if (strcmp(buffer, searchbuf) == 0)
{
break;
}
if (IsMsgAttach(extra))
+ {
mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy,
SENDNEWS | SENDREPLY);
+ }
else
ci_send_message(SENDNEWS | SENDREPLY, NULL, NULL, extra->ctx, extra->hdr);
pager_menu->redraw = REDRAW_FULL;
CHECK_MODE(IsHeader(extra) || IsMsgAttach(extra));
CHECK_ATTACH;
if (IsMsgAttach(extra))
+ {
mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy,
SENDREPLY | SENDGROUPREPLY);
+ }
else
+ {
ci_send_message(SENDREPLY | SENDGROUPREPLY, NULL, NULL, extra->ctx,
extra->hdr);
+ }
pager_menu->redraw = REDRAW_FULL;
break;
CHECK_MODE(IsHeader(extra) || IsMsgAttach(extra));
CHECK_ATTACH;
if (IsMsgAttach(extra))
+ {
mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy,
SENDREPLY | SENDLISTREPLY);
+ }
else
+ {
ci_send_message(SENDREPLY | SENDLISTREPLY, NULL, NULL, extra->ctx,
extra->hdr);
+ }
pager_menu->redraw = REDRAW_FULL;
break;
r = mutt_thread_set_flag(extra->hdr, MUTT_DELETE, 0,
ch == OP_UNDELETE_THREAD ? 0 : 1);
if (r != -1)
+ {
r = mutt_thread_set_flag(extra->hdr, MUTT_PURGE, 0,
ch == OP_UNDELETE_THREAD ? 0 : 1);
+ }
if (r != -1)
{
if (Resolve)
{
/* we did get a full line. remove trailing space */
while (ISSPACE(*buf))
+ {
*buf-- = 0; /* we cannot come beyond line's beginning because
- * it begins with a non-space */
+ * it begins with a non-space */
+ }
/* check to see if the next line is a continuation line */
ch = fgetc(f);
{
pc = mutt_param_get(&ct->parameter, "charset");
if (!pc)
+ {
mutt_param_set(&ct->parameter, "charset",
(AssumedCharset && *AssumedCharset) ?
(const char *) mutt_ch_get_default_charset() :
"us-ascii");
+ }
}
}
if (ReplyRegex && ReplyRegex->regex &&
(regexec(ReplyRegex->regex, e->subject, 1, pmatch, 0) == 0))
+ {
e->real_subj = e->subject + pmatch[0].rm_eo;
+ }
else
e->real_subj = e->subject;
}
{
cache_entry = pat->alladdr ? &cache->list_all : &cache->list_one;
if (!is_pattern_cache_set(*cache_entry))
+ {
set_pattern_cache_value(
cache_entry, mutt_is_list_cc(pat->alladdr, h->env->to, h->env->cc));
+ }
result = get_pattern_cache_value(*cache_entry);
}
else
{
cache_entry = pat->alladdr ? &cache->sub_all : &cache->sub_one;
if (!is_pattern_cache_set(*cache_entry))
+ {
set_pattern_cache_value(
cache_entry,
mutt_is_list_recipient(pat->alladdr, h->env->to, h->env->cc));
+ }
result = get_pattern_cache_value(*cache_entry);
}
else
{
cache_entry = pat->alladdr ? &cache->pers_recip_all : &cache->pers_recip_one;
if (!is_pattern_cache_set(*cache_entry))
+ {
set_pattern_cache_value(cache_entry,
match_user(pat->alladdr, h->env->to, h->env->cc));
+ }
result = get_pattern_cache_value(*cache_entry);
}
else
_("Reverse search for: "),
buf, sizeof(buf), MUTT_CLEAR | MUTT_PATTERN) != 0 ||
!buf[0])
+ {
return -1;
+ }
if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
OptSearchReverse = false;
}
if (!ctx->quiet)
+ {
mutt_progress_init(&progress, _("Fetching message headers..."),
MUTT_PROGRESS_MSG, ReadInc, new_count - old_count);
+ }
if (ret == 0)
{
(mutt_str_strcasecmp(
mutt_param_get(&newhdr->content->parameter, "protocol"),
"application/pgp-signature") == 0))
+ {
newhdr->security |= APPLICATION_PGP;
+ }
else if (WithCrypto & APPLICATION_SMIME)
newhdr->security |= APPLICATION_SMIME;
{
if (mutt_str_strcasecmp("yes",
mutt_param_get(&b->parameter, "x-mutt-noconv")) == 0)
+ {
b->noconv = true;
+ }
else
{
s.flags |= MUTT_CHARCONV;
if (progress->size != 0)
{
if (progress->flags & MUTT_PROGRESS_SIZE)
+ {
mutt_str_pretty_size(progress->sizestr, sizeof(progress->sizestr),
progress->size);
+ }
else
snprintf(progress->sizestr, sizeof(progress->sizestr), "%zu", progress->size);
}
mutt_debug(1, "gettimeofday failed: %d\n", errno);
/* if timestamp is 0 no time-based suppression is done */
if (TimeInc != 0)
+ {
progress->timestamp =
((unsigned int) tv.tv_sec * 1000) + (unsigned int) (tv.tv_usec / 1000);
+ }
mutt_progress_update(progress, 0, 0);
}
/* refresh if size > inc */
if ((progress->flags & MUTT_PROGRESS_SIZE) &&
(pos >= (progress->pos + (progress->inc << 10))))
+ {
update = true;
+ }
else if (pos >= (progress->pos + progress->inc))
update = true;
if (!dst || !*dst || *dst == '/' || dstlen < 3 ||
/* XXX bad modularization, these are special to mutt_expand_path() */
!strchr("~=+@<>!-^", *dst))
+ {
return;
+ }
dstlen -= 3;
l = strlen(dst) + 2;
if (body->filename)
{
if (directory && *directory)
+ {
mutt_file_concat_path(buf, *directory, mutt_file_basename(body->filename),
sizeof(buf));
+ }
else
mutt_str_strfcpy(buf, body->filename, sizeof(buf));
}
if (mutt_get_field((filter ? _("Filter through: ") : _("Pipe to: ")), buf,
sizeof(buf), MUTT_CMD) != 0 ||
!buf[0])
+ {
return;
+ }
mutt_expand_path(buf, sizeof(buf));
menu->redraw = REDRAW_CURRENT;
}
else
+ {
mutt_message(
_("Only deletion of multipart attachments is supported."));
+ }
}
else
{
menu->redraw = REDRAW_INDEX;
}
else
+ {
mutt_message(
_("Only deletion of multipart attachments is supported."));
+ }
}
}
}
if (mutt_is_message_type(actx->idx[i]->content->type,
actx->idx[i]->content->subtype) &&
is_parent(i, actx, cur))
+ {
parent = actx->idx[i];
+ }
if (actx->idx[i]->content == cur)
break;
}
if (prefix)
mutt_str_strfcpy(prefix2, prefix, sizeof(prefix2));
else if (!TextFlowed)
+ {
mutt_make_string_flags(prefix2, sizeof(prefix2), NONULL(IndentString),
Context, hdr, 0);
+ }
else
mutt_str_strfcpy(prefix2, ">", sizeof(prefix2));
if (ForwardQuote)
{
if (!TextFlowed)
+ {
mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
Context, parent_hdr, 0);
+ }
else
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
}
st.fpout = tmpfp;
if (!TextFlowed)
+ {
mutt_make_string_flags(prefix, sizeof(prefix), NONULL(IndentString),
Context, parent_hdr, 0);
+ }
else
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
((mutt_str_strncasecmp(buf, type, btlen) != 0) ||
(buf[btlen] != 0 && /* implicit wild */
(mutt_str_strcmp(buf + btlen, "/*") != 0)))) /* wildsubtype */
+ {
continue;
+ }
/* next field is the viewcommand */
char *field = ch;
ptr->str = pattern;
}
else
+ {
/* 'buf' arg was cleared and 'pattern' holds the only reference;
* as here 'ptr' != NULL -> update the value only in which case
* ptr->str already has the string, so pattern should be freed.
*/
FREE(&pattern);
+ }
pc = buf->data;
if (*pc == '=')
{
if (((WithCrypto & APPLICATION_PGP) != 0) &&
(b = crypt_pgp_make_key_attachment(NULL)) == NULL)
+ {
return -1;
+ }
b->next = msg->content;
msg->content = b;
if (!OptNewsSend)
#endif
if (SmtpUrl)
+ {
return mutt_smtp_send(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
tempfile, (msg->content->encoding == ENC8BIT));
+ }
#endif /* USE_SMTP */
i = mutt_invoke_sendmail(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
/* Search for the regex in AbortNoattachRegex within a file */
if (!AbortNoattachRegex || !AbortNoattachRegex->regex || !QuoteRegex ||
!QuoteRegex->regex)
+ {
return false;
+ }
FILE *attf = mutt_file_fopen(filename, "r");
if (!attf)
*/
if (msg->env->from)
+ {
mutt_debug(5, "msg->env->from before set_reverse_name: %s\n",
msg->env->from->mailbox);
+ }
msg->env->from = set_reverse_name(cur->env);
}
if (cur && ReplyWithXorig && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
if ((mutt_str_strcasecmp(np->attribute, "boundary") == 0) &&
(strcmp(buffer, tmp) == 0))
+ {
snprintf(buffer, sizeof(buffer), "\"%s\"", tmp);
+ }
FREE(&tmp);
mutt_file_fclose(&fp);
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
+ {
mutt_param_set(&b->parameter, "charset",
(!info->hibin ? "us-ascii" :
Charset && !mutt_ch_is_us_ascii(Charset) ? Charset : "unknown-8bit"));
+ }
return info;
}
}
if (optional)
+ {
mutt_expando_format(buf, buflen, col, SidebarWidth, if_str,
sidebar_format_str, (unsigned long) sbe, flags);
+ }
else if (flags & MUTT_FORMAT_OPTIONAL)
+ {
mutt_expando_format(buf, buflen, col, SidebarWidth, else_str,
sidebar_format_str, (unsigned long) sbe, flags);
+ }
/* We return the format string, unchanged */
return src;
if ((mutt_str_strlen(b->path) > maildirlen) &&
(mutt_str_strncmp(Folder, b->path, maildirlen) == 0) &&
SidebarDelimChars && strchr(SidebarDelimChars, b->path[maildirlen]))
+ {
maildir_is_prefix = true;
+ }
/* calculate depth of current folder and generate its display name with indented spaces */
int sidebar_folder_depth = 0;
else if (mutt_bit_isset(Capabilities, STARTTLS) &&
(rc = query_quadoption(SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
+ {
return rc;
+ }
if (rc == MUTT_YES)
{
void state_prefix_put(const char *d, size_t dlen, struct State *s)
{
if (s->prefix)
+ {
while (dlen--)
state_prefix_putc(*d++, s);
+ }
else
fwrite(d, dlen, 1, s->fpout);
}
if (!menu)
break;
if (menu->top + menu->pagelen >= menu->max)
+ {
cp = menu->top ?
/* L10N: Status bar message: the end of the list emails is visible in the index */
_("end") :
/* L10N: Status bar message: all the emails are visible in the index */
_("all");
+ }
else
{
count = (100 * (menu->top + menu->pagelen)) / menu->max;
else
myarrow[0] = vtee;
if (width == 2)
+ {
myarrow[1] = pseudo ? MUTT_TREE_STAR :
(tree->duplicate_thread ? MUTT_TREE_EQUALS : MUTT_TREE_HLINE);
+ }
if (tree->visible)
{
myarrow[width] = MUTT_TREE_RARROW;
static sort_t *sort_func = NULL;
if (a && b)
+ {
return ((*sort_func)(&(*((struct MuttThread **) a))->sort_key,
&(*((struct MuttThread **) b))->sort_key));
+ }
/* a hack to let us reset sort_func even though we can't
* have extra arguments because of qsort
*/
if (!thread->sort_key ||
((((Sort & SORT_REVERSE) ? 1 : -1) *
compare_threads((void *) &thread, (void *) &sort_key)) > 0))
+ {
thread->sort_key = sort_key->sort_key;
+ }
}
else if (!thread->sort_key)
thread->sort_key = sort_key->sort_key;
if (!tmp)
cur->subject_changed = true;
else if (cur->env->real_subj && tmp->message->env->real_subj)
+ {
cur->subject_changed =
(mutt_str_strcmp(cur->env->real_subj, tmp->message->env->real_subj) != 0) ? true : false;
+ }
else
+ {
cur->subject_changed =
(cur->env->real_subj || tmp->message->env->real_subj) ? true : false;
+ }
}
}
if (Sort & SORT_REVERSE)
rc = threads[0]->message->msgno - (threads[1] ? threads[1]->message->msgno : -1);
else
+ {
rc = (threads[1] ? threads[1]->message->msgno : ctx->msgcount) -
threads[0]->message->msgno;
+ }
if (flag)
rc += 1;