#endif
else
{
- mutt_path_concat(buf, LastDir, state.entry[menu->current].name,
- sizeof(buf));
+ mutt_path_concat(buf, LastDir, state.entry[menu->current].name, sizeof(buf));
}
enum MailboxType magic = mx_path_probe(buf, NULL);
else
{
char tmp[PATH_MAX];
- mutt_path_concat(tmp, LastDir,
- state.entry[menu->current].name, sizeof(tmp));
+ mutt_path_concat(tmp, LastDir, state.entry[menu->current].name, sizeof(tmp));
mutt_str_strfcpy(LastDir, tmp, sizeof(LastDir));
}
{
char buf2[PATH_MAX];
- mutt_path_concat(buf2, LastDir, state.entry[menu->current].name,
- sizeof(buf2));
+ mutt_path_concat(buf2, LastDir, state.entry[menu->current].name, sizeof(buf2));
struct Body *b = mutt_make_file_attach(buf2);
if (b)
{
mutt_message(_("Copying to %s..."), buf);
#ifdef USE_IMAP
- if ((Context->magic == MUTT_IMAP) && !(decode || decrypt) && (imap_path_probe(buf, NULL) == MUTT_IMAP))
+ if ((Context->magic == MUTT_IMAP) && !(decode || decrypt) &&
+ (imap_path_probe(buf, NULL) == MUTT_IMAP))
{
switch (imap_copy_messages(Context, h, buf, delete))
{
}
}
- const bool need_mailbox_cleanup = ((savectx->magic == MUTT_MBOX) || (savectx->magic == MUTT_MMDF));
+ const bool need_mailbox_cleanup =
+ ((savectx->magic == MUTT_MBOX) || (savectx->magic == MUTT_MMDF));
mx_mbox_close(&savectx, NULL);
{
char tmp[PATH_MAX];
if (!mutt_path_concatn(tmp, sizeof(tmp), exp_dirpart, strlen(exp_dirpart),
- buf + 1, (size_t)(p - buf - 1)))
+ buf + 1, (size_t)(p - buf - 1)))
{
return -1;
}
{
if (msg->security & (ENCRYPT | SIGN))
{
- if (mutt_yesorno(
- _("S/MIME already selected. Clear and continue? "), MUTT_YES) != MUTT_YES)
+ if (mutt_yesorno(_("S/MIME already selected. Clear and continue? "),
+ MUTT_YES) != MUTT_YES)
{
mutt_clear_error();
break;
if ((type == DT_PATH) && (value->data[0] == '/'))
mutt_pretty_mailbox(value->data, value->dsize);
- if ((type != DT_BOOL) && (type != DT_NUMBER) && (type != DT_LONG) && (type != DT_QUAD) &&
- !(flags & CS_DUMP_NO_ESCAPING))
+ if ((type != DT_BOOL) && (type != DT_NUMBER) && (type != DT_LONG) &&
+ (type != DT_QUAD) && !(flags & CS_DUMP_NO_ESCAPING))
{
mutt_buffer_reset(tmp);
size_t len = pretty_var(value->data, tmp);
if ((type == DT_PATH) && !(he->type & DT_MAILBOX))
mutt_pretty_mailbox(initial->data, initial->dsize);
- if ((type != DT_BOOL) && (type != DT_NUMBER) && (type != DT_LONG) && (type != DT_QUAD) &&
- !(flags & CS_DUMP_NO_ESCAPING))
+ if ((type != DT_BOOL) && (type != DT_NUMBER) && (type != DT_LONG) &&
+ (type != DT_QUAD) && !(flags & CS_DUMP_NO_ESCAPING))
{
mutt_buffer_reset(tmp);
size_t len = pretty_var(initial->data, tmp);
#endif
#ifdef USE_SSL
-bool SslUseSslv3; ///< Config: (ssl) INSECURE: Use SSLv3 for authentication
-bool SslUseTlsv1; ///< Config: (ssl) Use TLSv1 for authentication
-bool SslUseTlsv11; ///< Config: (ssl) Use TLSv1.1 for authentication
-bool SslUseTlsv12; ///< Config: (ssl) Use TLSv1.2 for authentication
+bool SslUseSslv3; ///< Config: (ssl) INSECURE: Use SSLv3 for authentication
+bool SslUseTlsv1; ///< Config: (ssl) Use TLSv1 for authentication
+bool SslUseTlsv11; ///< Config: (ssl) Use TLSv1.1 for authentication
+bool SslUseTlsv12; ///< Config: (ssl) Use TLSv1.2 for authentication
bool SslVerifyDates; ///< Config: (ssl) Verify the dates on the server certificate
bool SslVerifyHost; ///< Config: (ssl) Verify the server's hostname against the certificate
#endif
/* if we still have data in our read buffer, copy it into buf */
if (sasldata->blen > sasldata->bpos)
{
- olen = (sasldata->blen - sasldata->bpos > buflen) ? buflen :
- sasldata->blen - sasldata->bpos;
+ olen = (sasldata->blen - sasldata->bpos > buflen) ?
+ buflen :
+ sasldata->blen - sasldata->bpos;
memcpy(buf, sasldata->buf + sasldata->bpos, olen);
sasldata->bpos += olen;
}
} while (sasldata->blen == 0);
- olen = (sasldata->blen - sasldata->bpos > buflen) ? buflen :
- sasldata->blen - sasldata->bpos;
+ olen = (sasldata->blen - sasldata->bpos > buflen) ?
+ buflen :
+ sasldata->blen - sasldata->bpos;
memcpy(buf, sasldata->buf, olen);
sasldata->bpos += olen;
* @param buflen Length of the buffer
* @param data Certificate
*/
-static void tls_fingerprint(gnutls_digest_algorithm_t algo, char *buf, size_t buflen,
- const gnutls_datum_t *data)
+static void tls_fingerprint(gnutls_digest_algorithm_t algo, char *buf,
+ size_t buflen, const gnutls_datum_t *data)
{
unsigned char md[36];
size_t n;
/* These Config Variables are only used in curs_main.c */
bool ChangeFolderNext; ///< Config: Suggest the next folder, rather than the first when using '<change-folder>'
-bool CollapseAll; ///< Config: Collapse all threads when entering a folder
+bool CollapseAll; ///< Config: Collapse all threads when entering a folder
bool CollapseFlagged; ///< Config: Prevent the collapse of threads with flagged emails
bool CollapseUnread; ///< Config: Prevent the collapse of threads with unread emails
char *MarkMacroPrefix; ///< Config: Prefix for macros using '<mark-message>'
-bool PgpAutoDecode; ///< Config: Automatically decrypt PGP messages
+bool PgpAutoDecode; ///< Config: Automatically decrypt PGP messages
bool UncollapseJump; ///< Config: When opening a thread, jump to the next unread message
bool UncollapseNew; ///< Config: Open collapsed threads when new mail arrives
* switch statement would need to be run. */
mutt_folder_hook(buf);
- const int flags = (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0;
+ const int flags =
+ (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0;
Context = mx_mbox_open(buf, flags);
if (Context)
{
return -1;
}
- const int chflags = CH_NOLEN | ((ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
+ const int chflags =
+ CH_NOLEN | ((ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
rc = mutt_append_message(tmpctx, ctx, cur, 0, chflags);
oerrno = errno;
/* Config items */
bool MarkOld = false; ///< Config: Mark new emails as old when leaving the mailbox
struct Regex *ReplyRegex = NULL; ///< Config: Regex to match message reply subjects like "re: "
-char *SendCharset = NULL; ///< Config: Character sets for outgoing mail ///< Config: List of character sets for outgoing messages
+char *SendCharset = NULL; ///< Config: Character sets for outgoing mail ///< Config: List of character sets for outgoing messages
char *SpamSeparator = NULL; ///< Config: Separator for multiple spam headers ///< Config: Separator for spam headers
bool Weed = false; ///< Config: Filter headers when displaying/forwarding/printing/replying
{
while (a)
{
- if (a->personal &&
- ((strstr(a->personal, "=?")) || (AssumedCharset && *AssumedCharset)))
+ if (a->personal && ((strstr(a->personal, "=?")) || (AssumedCharset && *AssumedCharset)))
{
rfc2047_decode(&a->personal);
}
}
/* pipeline the postponed count if possible */
pmx.mbox = NULL;
- if ((imap_path_probe(Postponed, NULL) == MUTT_IMAP) && !imap_parse_path(Postponed, &pmx) &&
- mutt_account_match(&pmx.account, &mx.account))
+ if ((imap_path_probe(Postponed, NULL) == MUTT_IMAP) &&
+ !imap_parse_path(Postponed, &pmx) && mutt_account_match(&pmx.account, &mx.account))
{
imap_status(Postponed, true);
}
* Insert a key sequence into the specified map.
* The map is sorted by ASCII value (lowest to highest)
*/
-static int km_bind_err(const char *s, int menu, int op, char *macro, char *desc, struct Buffer *err)
+static int km_bind_err(const char *s, int menu, int op, char *macro, char *desc,
+ struct Buffer *err)
{
int retval = 0;
struct Keymap *last = NULL, *next = NULL;
if (check_stats && (mailbox->stats_last_checked < sb->st_mtime))
{
- struct Context *ctx = mx_mbox_open(mailbox->path, MUTT_READONLY | MUTT_QUIET | MUTT_NOSORT | MUTT_PEEK);
+ struct Context *ctx =
+ mx_mbox_open(mailbox->path, MUTT_READONLY | MUTT_QUIET | MUTT_NOSORT | MUTT_PEEK);
if (ctx)
{
mailbox->msg_count = ctx->msgcount;
else
#endif
if (stat(tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
- ((tmp->magic == MUTT_UNKNOWN) && (tmp->magic = mx_path_probe(tmp->path, NULL)) <= 0))
+ ((tmp->magic == MUTT_UNKNOWN) &&
+ (tmp->magic = mx_path_probe(tmp->path, NULL)) <= 0))
{
/* if the mailbox still doesn't exist, set the newly created flag to be
* ready for when it does. */
/* These Config Variables are only used in maildir/mh.c */
bool CheckNew; ///< Config: (maildir,mh) Check for new mail while the mailbox is open
bool MaildirHeaderCacheVerify; ///< Config: (hcache) Check for maildir changes when opening mailbox
-bool MhPurge; ///< Config: Really delete files in MH mailboxes
+bool MhPurge; ///< Config: Really delete files in MH mailboxes
char *MhSeqFlagged; ///< Config: MH sequence for flagged message
char *MhSeqReplied; ///< Config: MH sequence to tag replied messages
char *MhSeqUnseen; ///< Config: MH sequence for unseen messages
* Actually parse a maildir message. This may also be used to fill
* out a fake header structure generated by lazy maildir parsing.
*/
-struct Header *maildir_parse_stream(enum MailboxType magic, FILE *f, const char *fname,
- bool is_old, struct Header *h)
+struct Header *maildir_parse_stream(enum MailboxType magic, FILE *f,
+ const char *fname, bool is_old, struct Header *h)
{
struct stat st;
* This may also be used to fill out a fake header structure generated by lazy
* maildir parsing.
*/
-struct Header *maildir_parse_message(enum MailboxType magic, const char *fname, bool is_old,
- struct Header *h)
+struct Header *maildir_parse_message(enum MailboxType magic, const char *fname,
+ bool is_old, struct Header *h)
{
FILE *f = fopen(fname, "r");
if (!f)
/* check to see if the content-length looks valid. we expect to
* to see a valid message separator at this point in the stream
*/
- if (fseeko(ctx->fp, tmploc, SEEK_SET) != 0 ||
- !fgets(buf, sizeof(buf), ctx->fp) ||
+ if (fseeko(ctx->fp, tmploc, SEEK_SET) != 0 || !fgets(buf, sizeof(buf), ctx->fp) ||
(mutt_str_strncmp("From ", buf, 5) != 0))
{
mutt_debug(1, "bad content-length in message %d (cl=" OFF_T_FMT ")\n",
s = mutt_str_substr_dup(u, u + ulen);
const int rc = d ? mutt_ch_convert_string(&s, fromcode, t, 0) :
- mutt_ch_check(s, ulen, fromcode, t);
+ mutt_ch_check(s, ulen, fromcode, t);
if (rc)
{
FREE(&t);
/* These Config Variables are only used in mx.c */
unsigned char CatchupNewsgroup; ///< Config: (nntp) Mark all articles as read when leaving a newsgroup
bool KeepFlagged; ///< Config: Don't move flagged messages from Spoolfile to Mbox
-short MboxType; ///< Config: Default type for creating new mailboxes
+short MboxType; ///< Config: Default type for creating new mailboxes
unsigned char Move; ///< Config: Move emails from Spoolfile to Mbox when read
char *Trash; ///< Config: Folder to put deleted emails
* mx_ops - All the Mailbox backends
*/
static const struct MxOps *mx_ops[] = {
- /* These mailboxes can be recognised by their Url scheme */
+/* These mailboxes can be recognised by their Url scheme */
#ifdef USE_IMAP
&mx_imap_ops,
#endif
&mx_mh_ops,
&mx_mmdf_ops,
- /* If everything else fails... */
+/* If everything else fails... */
#ifdef USE_COMPRESSED
&mx_comp_ops,
#endif
*/
struct FgetConv *fc = mutt_ch_fgetconv_open(fp, charset, Charset, MUTT_ICONV_HOOK_FROM);
- for (complete = true, armor_header = true; mutt_ch_fgetconvs(buf, sizeof(buf), fc);
- complete = (strchr(buf, '\n')))
+ for (complete = true, armor_header = true;
+ mutt_ch_fgetconvs(buf, sizeof(buf), fc); complete = (strchr(buf, '\n')))
{
if (!complete)
{
bool PgpCheckExit; ///< Config: Check the exit code of PGP subprocess
bool PgpCheckGpgDecryptStatusFd; ///< Config: File descriptor used for status info
struct Regex *PgpDecryptionOkay; ///< Config: Text indicating a successful decryption
-struct Regex *PgpGoodSign; ///< Config: Text indicating a good signature
-long PgpTimeout; ///< Config: Time in seconds to cache a passphrase
+struct Regex *PgpGoodSign; ///< Config: Text indicating a good signature
+long PgpTimeout; ///< Config: Time in seconds to cache a passphrase
bool PgpUseGpgAgent; ///< Config: Use a PGP agent for caching passwords
char PgpPass[LONG_STRING];
/**
* pgp_check_decryption_okay - Check GPG output for status codes
* @param fpin File to read from
- * @retval 1 - no patterns were matched (if delegated to decryption_okay_regexp)
+ * @retval 1 - no patterns were matched (if delegated to decryption_okay_regex)
* @retval 0 - DECRYPTION_OKAY was seen, with no PLAINTEXT outside.
* @retval -1 - No decryption status codes were encountered
* @retval -2 - PLAINTEXT was encountered outside of DECRYPTION delimeters.
*/
struct FgetConv *fc = mutt_ch_fgetconv_open(fpin, charset, Charset, MUTT_ICONV_HOOK_FROM);
- for (complete = true, armor_header = true; mutt_ch_fgetconvs(buf, sizeof(buf), fc);
- complete = (strchr(buf, '\n')))
+ for (complete = true, armor_header = true;
+ mutt_ch_fgetconvs(buf, sizeof(buf), fc); complete = (strchr(buf, '\n')))
{
if (!complete)
{
int NmDbLimit; ///< Config: (notmuch) Default limit for Notmuch queries
char *NmDefaultUri; ///< Config: (notmuch) Path to the Notmuch database
char *NmExcludeTags; ///< Config: (notmuch) Exclude messages with these tags
-int NmOpenTimeout; ///< Config: (notmuch) Database timeout
+int NmOpenTimeout; ///< Config: (notmuch) Database timeout
char *NmQueryType; ///< Config: (notmuch) Default query type: 'threads' or 'messages'
int NmQueryWindowCurrentPosition; ///< Config: (notmuch) Position of current search window
char *NmQueryWindowTimebase; ///< Config: (notmuch) Units for the time duration
bool PagerStop; ///< Config: Don't automatically open the next message when at the end of a message
short SearchContext; ///< Config: Context to display around search matches
short SkipQuotedOffset; ///< Config: Lines of context to show when skipping quoted text
-bool SmartWrap; ///< Config: Wrap text at word boundaries
+bool SmartWrap; ///< Config: Wrap text at word boundaries
struct Regex *Smileys; ///< Config: Regex to match smileys to prevent mistakes when quoting text
bool Tilde; ///< Config: Character to pad blank lines in the pager
{
/* longer than the current prefix: try subclassing it */
if (!tmp && (mutt_str_strncmp(tail_qptr, (q_list->prefix) + offset,
- q_list->length - offset) == 0))
+ q_list->length - offset) == 0))
{
/* still a subclass: go down one level */
ptr = q_list;
short PopCheckinterval; ///< Config: (pop) Interval between checks for new mail
unsigned char PopDelete; ///< Config: (pop) After downloading POP messages, delete them on the server
char *PopHost; ///< Config: (pop) Url of the POP server
-bool PopLast; ///< Config: (pop) Use the 'LAST' command to fetch new mail
+bool PopLast; ///< Config: (pop) Use the 'LAST' command to fetch new mail
#ifdef USE_HCACHE
#define HC_FNAME "neomutt" /* filename for hcache as POP lacks paths */
* This function calls func(*line, *data) for each received line,
* func(NULL, *data) if rewind(*data) needs, exits when fail or done.
*/
-int pop_fetch_data(struct PopData *pop_data, const char *query, struct Progress *progressbar,
- int (*func)(char *, void *), void *data)
+int pop_fetch_data(struct PopData *pop_data, const char *query,
+ struct Progress *progressbar, int (*func)(char *, void *), void *data)
{
char buf[LONG_STRING];
long pos = 0;
/* These Config Variables are only used in recvattach.c */
char *AttachSep; ///< Config: Separator to add between saved/printed/piped attachments
-bool AttachSplit; ///< Config: Save/print/pipe tagged messages individually
+bool AttachSplit; ///< Config: Save/print/pipe tagged messages individually
bool DigestCollapse; ///< Config: Hide the subparts of a multipart/digest
char *MessageFormat; ///< Config: printf-like format string for listing attached messages
{
if (directory && *directory)
{
- mutt_path_concat(buf, *directory, mutt_path_basename(body->filename),
- sizeof(buf));
+ mutt_path_concat(buf, *directory, mutt_path_basename(body->filename), sizeof(buf));
}
else
mutt_str_strfcpy(buf, body->filename, sizeof(buf));
mutt_make_post_indent(Context, parent_hdr, tmpfp);
- if (mime_reply_any && !cur &&
- !copy_problematic_attachments(&tmphdr->content, actx, false))
+ if (mime_reply_any && !cur && !copy_problematic_attachments(&tmphdr->content, actx, false))
{
mutt_header_free(&tmphdr);
mutt_file_fclose(&tmpfp);
bool AskFollowUp; ///< Config: (nntp) Ask the user for follow-up groups before editing
bool AskXCommentTo; ///< Config: (nntp) Ask the user for the 'X-Comment-To' field before editing
char *ContentType; ///< Config: Default "Content-Type" for newly composed messages
-bool CryptAutoencrypt; ///< Config: Automatically PGP encrypt all outgoing mail
-bool CryptAutopgp; ///< Config: Allow automatic PGP functions
-bool CryptAutosign; ///< Config: Automatically PGP sign all outgoing mail
-bool CryptAutosmime; ///< Config: Allow automatic SMIME functions
+bool CryptAutoencrypt; ///< Config: Automatically PGP encrypt all outgoing mail
+bool CryptAutopgp; ///< Config: Allow automatic PGP functions
+bool CryptAutosign; ///< Config: Automatically PGP sign all outgoing mail
+bool CryptAutosmime; ///< Config: Allow automatic SMIME functions
bool CryptReplyencrypt; ///< Config: Encrypt replies to encrypted messages
-bool CryptReplysign; ///< Config: Sign replies to signed messages
+bool CryptReplysign; ///< Config: Sign replies to signed messages
bool CryptReplysignencrypted; ///< Config: Sign replies to encrypted messages
char *EmptySubject; ///< Config: Subject to use when replying to an email with none
bool FastReply; ///< Config: Don't prompt for the recipients and subject when replying/forwarding
unsigned char ForwardEdit; ///< Config: Automatically start the editor when forwarding a message
char *ForwardFormat; ///< Config: printf-like format string to control the subject when forwarding a message
bool ForwardReferences; ///< Config: Set the 'In-Reply-To' and 'References' headers when forwarding a message
-bool Hdrs; ///< Config: Add custom headers to outgoing mail
+bool Hdrs; ///< Config: Add custom headers to outgoing mail
unsigned char HonorFollowupTo; ///< Config: Honour the 'Mail-Followup-To' header when group replying
bool IgnoreListReplyTo; ///< Config: Ignore the 'Reply-To' header when using `<reply>` on a mailing list
unsigned char Include; ///< Config: Include a copy of the email that's being replied to
bool NmRecord; ///< Config: (notmuch) If the 'record' mailbox (sent mail) should be indexed
bool PgpReplyinline; ///< Config: Reply using old-style inline PGP messages (not recommended)
char *PostIndentString; ///< Config: Suffix message to add after reply text
-bool PostponeEncrypt; ///< Config: Self-encrypt postponed messages
+bool PostponeEncrypt; ///< Config: Self-encrypt postponed messages
char *PostponeEncryptAs; ///< Config: Fallback encryption key for postponed messages
unsigned char Recall; ///< Config: Recall postponed mesaages when asked to compose a message
bool ReplySelf; ///< Config: Really reply to yourself, when replying to your own email
bool ReplyWithXorig; ///< Config: Create 'From' header from 'X-Original-To' header
bool ReverseName; ///< Config: Set the 'From' from the address the email was sent to
bool ReverseRealname; ///< Config: Set the 'From' from the full 'To' address the email was sent to
-bool SigDashes; ///< Config: Insert '-- ' before the signature
+bool SigDashes; ///< Config: Insert '-- ' before the signature
char *Signature; ///< Config: File containing a signature to append to all mail
-bool SigOnTop; ///< Config: Insert the signature before the quoted text
-bool UseFrom; ///< Config: Set the 'From' header for outgoing mail
+bool SigOnTop; ///< Config: Insert the signature before the quoted text
+bool UseFrom; ///< Config: Set the 'From' header for outgoing mail
/**
* append_signature - Append a signature to an email
bool HiddenHost; ///< Config: Don't use the hostname, just the domain, when generating the message id
char *Inews; ///< Config: (nntp) External command to post news articles
bool MimeForwardDecode; ///< Config: Decode the forwarded message before attaching it
-bool MimeSubject; ///< Config: (nntp) Encode the article subject in base64
+bool MimeSubject; ///< Config: (nntp) Encode the article subject in base64
char *MimeTypeQueryCommand; ///< Config: External command to determine the MIME type of an attachment
bool MimeTypeQueryFirst; ///< Config: Run the MimeTypeQueryCommand before the mime.types lookup
-char *Sendmail; ///< Config: External command to send email
-short SendmailWait; ///< Config: Time to wait for sendmail to finish
-bool Use8bitmime; ///< Config: Use 8-bit messages and ESMTP to send messages
+char *Sendmail; ///< Config: External command to send email
+short SendmailWait; ///< Config: Time to wait for sendmail to finish
+bool Use8bitmime; ///< Config: Use 8-bit messages and ESMTP to send messages
bool UseEnvelopeFrom; ///< Config: Set the envelope sender of the message
-bool UserAgent; ///< Config: Add a 'User-Agent' head to outgoing mail
-short WrapHeaders; ///< Config: Width to wrap headers in outgoing messages
+bool UserAgent; ///< Config: Add a 'User-Agent' head to outgoing mail
+short WrapHeaders; ///< Config: Width to wrap headers in outgoing messages
/**
* encode_quoted - Encode text as quoted printable
}
mutt_sort_threads(ctx, init);
}
- else if (!(sortfunc = mutt_get_sort_func(Sort)) ||
- !(AuxSort = mutt_get_sort_func(SortAux)))
+ else if (!(sortfunc = mutt_get_sort_func(Sort)) || !(AuxSort = mutt_get_sort_func(SortAux)))
{
mutt_error(_("Could not find sorting function [report this bug]"));
return;