Each config variable has a global variable backing it.
The name of the global is the MixedCase transform of the config name.
While this is useful for remembering their names, it makes some
variables hard to search for, giving many false positives.
- Copy
- From
- Help
- Move
- Sort
Prefixing the globals with `C_` prevents this problem.
#include "sort.h"
/* These Config Variables are only used in addrbook.c */
-char *AliasFormat; ///< Config: printf-like format string for the alias menu
-short SortAlias; ///< Config: Sort method for the alias menu
+char *C_AliasFormat; ///< Config: printf-like format string for the alias menu
+short C_SortAlias; ///< Config: Sort method for the alias menu
-#define RSORT(x) ((SortAlias & SORT_REVERSE) ? -x : x)
+#define RSORT(x) ((C_SortAlias & SORT_REVERSE) ? -x : x)
static const struct Mapping AliasHelp[] = {
{ N_("Exit"), OP_EXIT }, { N_("Del"), OP_DELETE },
*/
static void alias_make_entry(char *buf, size_t buflen, struct Menu *menu, int line)
{
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AliasFormat), alias_format_str,
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
+ NONULL(C_AliasFormat), alias_format_str,
(unsigned long) ((struct Alias **) menu->data)[line],
MUTT_FORMAT_ARROWCURSOR);
}
i++;
}
- if ((SortAlias & SORT_MASK) != SORT_ORDER)
+ if ((C_SortAlias & SORT_MASK) != SORT_ORDER)
{
qsort(AliasTable, menu->max, sizeof(struct Alias *),
- (SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_sort_address : alias_sort_alias);
+ (C_SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_sort_address : alias_sort_alias);
}
for (i = 0; i < menu->max; i++)
{
AliasTable[menu->current]->del = (op == OP_DELETE);
menu->redraw |= REDRAW_CURRENT;
- if (Resolve && menu->current < menu->max - 1)
+ if (C_Resolve && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw |= REDRAW_INDEX;
struct AliasList;
/* These Config Variables are only used in addrbook.c */
-extern char *AliasFormat;
-extern short SortAlias;
+extern char *C_AliasFormat;
+extern short C_SortAlias;
void mutt_alias_menu(char *buf, size_t buflen, struct AliasList *aliases);
last->next = NULL;
}
- if (UseDomain && (fqdn = mutt_fqdn(true)))
+ if (C_UseDomain && (fqdn = mutt_fqdn(true)))
{
/* now qualify all local addresses */
mutt_addr_qualify(head, fqdn);
*/
static void recode_buf(char *buf, size_t buflen)
{
- if (!ConfigCharset || !*ConfigCharset || !Charset)
+ if (!C_ConfigCharset || !*C_ConfigCharset || !C_Charset)
return;
char *s = mutt_str_strdup(buf);
if (!s)
return;
- if (mutt_ch_convert_string(&s, Charset, ConfigCharset, 0) == 0)
+ if (mutt_ch_convert_string(&s, C_Charset, C_ConfigCharset, 0) == 0)
mutt_str_strfcpy(buf, s, buflen);
FREE(&s);
}
TAILQ_INSERT_TAIL(&Aliases, new, entries);
- mutt_str_strfcpy(buf, AliasFile, sizeof(buf));
+ mutt_str_strfcpy(buf, C_AliasFile, sizeof(buf));
if (mutt_get_field(_("Save to file: "), buf, sizeof(buf), MUTT_FILE) != 0)
return;
mutt_expand_path(buf, sizeof(buf));
return true;
}
- if (From && (mutt_str_strcasecmp(From->mailbox, addr->mailbox) == 0))
+ if (C_From && (mutt_str_strcasecmp(C_From->mailbox, addr->mailbox) == 0))
{
- mutt_debug(5, "#5 yes, %s = %s\n", addr->mailbox, From->mailbox);
+ mutt_debug(5, "#5 yes, %s = %s\n", addr->mailbox, C_From->mailbox);
return true;
}
#include "muttlib.h"
/* These Config Variables are only used in bcache.c */
-char *MessageCachedir; ///< Config: (imap/pop) Directory for the message cache
+char *C_MessageCachedir; ///< Config: (imap/pop) Directory for the message cache
/**
* struct BodyCache - Local cache of email bodies
struct Url url = { U_UNKNOWN };
int len;
- if (!account || !MessageCachedir || !*MessageCachedir || !dst || (dstlen == 0))
+ if (!account || !C_MessageCachedir || !*C_MessageCachedir || !dst || (dstlen == 0))
return -1;
/* make up a Url we can turn into a string */
}
size_t mailboxlen = mutt_str_strlen(mailbox);
- len = snprintf(dst, dstlen, "%s/%s%s%s", MessageCachedir, host, NONULL(mailbox),
+ len = snprintf(dst, dstlen, "%s/%s%s%s", C_MessageCachedir, host, NONULL(mailbox),
(mailboxlen != 0 && mailbox[mailboxlen - 1] == '/') ? "" : "/");
mutt_encode_path(dst, dstlen, dst);
struct BodyCache;
/* These Config Variables are only used in bcache.c */
-extern char *MessageCachedir;
+extern char *C_MessageCachedir;
/**
* typedef bcache_list_t - Prototype for mutt_bcache_list() callback
#endif
/* These Config Variables are only used in browser.c */
-bool BrowserAbbreviateMailboxes; ///< Config: Abbreviate mailboxes using '~' and '=' in the browser
-char *FolderFormat; ///< Config: printf-like format string for the browser's display of folders
-char *GroupIndexFormat; ///< Config: (nntp) printf-like format string for the browser's display of newsgroups
-char *NewsgroupsCharset; ///< Config: (nntp) Character set of newsgroups' descriptions
-bool ShowOnlyUnread; ///< Config: (nntp) Only show subscribed newsgroups with unread articles
-short SortBrowser; ///< Config: Sort method for the browser
-char *VfolderFormat; ///< Config: (notmuch) printf-like format string for the browser's display of virtual folders
+bool C_BrowserAbbreviateMailboxes; ///< Config: Abbreviate mailboxes using '~' and '=' in the browser
+char *C_FolderFormat; ///< Config: printf-like format string for the browser's display of folders
+char *C_GroupIndexFormat; ///< Config: (nntp) printf-like format string for the browser's display of newsgroups
+char *C_NewsgroupsCharset; ///< Config: (nntp) Character set of newsgroups' descriptions
+bool C_ShowOnlyUnread; ///< Config: (nntp) Only show subscribed newsgroups with unread articles
+short C_SortBrowser; ///< Config: Sort method for the browser
+char *C_VfolderFormat; ///< Config: (notmuch) printf-like format string for the browser's display of virtual folders
static const struct Mapping FolderHelp[] = {
{ N_("Exit"), OP_EXIT },
int r = mutt_inbox_cmp(pa->name, pb->name);
if (r == 0)
r = mutt_str_strcoll(pa->name, pb->name);
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
int r = mutt_str_strcoll(pa->desc, pb->desc);
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
int r = pa->mtime - pb->mtime;
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
int r = pa->size - pb->size;
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
else
r = 1;
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
else
r = 1;
- return (SortBrowser & SORT_REVERSE) ? -r : r;
+ return (C_SortBrowser & SORT_REVERSE) ? -r : r;
}
/**
if ((mutt_str_strcoll(pb->desc, "../") == 0) || (mutt_str_strcoll(pb->desc, "..") == 0))
return 1;
- switch (SortBrowser & SORT_MASK)
+ switch (C_SortBrowser & SORT_MASK)
{
case SORT_COUNT:
return browser_compare_count(a, b);
*/
static void browser_sort(struct BrowserState *state)
{
- switch (SortBrowser & SORT_MASK)
+ switch (C_SortBrowser & SORT_MASK)
{
/* Also called "I don't care"-sort-method. */
case SORT_ORDER:
if (op == 'D')
{
- t_fmt = NONULL(DateFormat);
+ t_fmt = NONULL(C_DateFormat);
if (*t_fmt == '!')
{
t_fmt++;
continue;
if (prefix && *prefix && !mutt_str_startswith(mdata->group, prefix, CASE_MATCH))
continue;
- if (Mask && Mask->regex &&
- !((regexec(Mask->regex, mdata->group, 0, NULL, 0) == 0) ^ Mask->not))
+ if (C_Mask && C_Mask->regex &&
+ !((regexec(C_Mask->regex, mdata->group, 0, NULL, 0) == 0) ^ C_Mask->not))
{
continue;
}
{
continue;
}
- if (Mask && Mask->regex &&
- !((regexec(Mask->regex, de->d_name, 0, NULL, 0) == 0) ^ Mask->not))
+ if (C_Mask && C_Mask->regex &&
+ !((regexec(C_Mask->regex, de->d_name, 0, NULL, 0) == 0) ^ C_Mask->not))
{
continue;
}
for (unsigned int i = 0; i < adata->groups_num; i++)
{
struct NntpMboxData *mdata = adata->groups_list[i];
- if (mdata && (mdata->new || (mdata->subscribed && (mdata->unread || !ShowOnlyUnread))))
+ if (mdata && (mdata->new || (mdata->subscribed && (mdata->unread || !C_ShowOnlyUnread))))
{
add_folder(menu, state, mdata->group, NULL, NULL, NULL, mdata);
}
char buffer[PATH_MAX];
mutt_str_strfcpy(buffer, np->mailbox->path, sizeof(buffer));
- if (BrowserAbbreviateMailboxes)
+ if (C_BrowserAbbreviateMailboxes)
mutt_pretty_mailbox(buffer, sizeof(buffer));
switch (np->mailbox->magic)
if (OptNews)
{
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
- NONULL(GroupIndexFormat), group_index_format_str,
+ NONULL(C_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,
+ NONULL(C_FolderFormat), folder_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
}
}
mutt_str_strfcpy(path, LastDir, sizeof(path));
mutt_pretty_mailbox(path, sizeof(path));
snprintf(title, titlelen, _("Directory [%s], File mask: %s"), path,
- NONULL(Mask ? Mask->pattern : NULL));
+ NONULL(C_Mask ? C_Mask->pattern : NULL));
}
}
bool mailbox = (flags & MUTT_SEL_MAILBOX);
/* Keeps in memory the directory we were in when hitting '='
- * to go directly to $folder (Folder)
+ * to go directly to $folder (#C_Folder)
*/
char GotoSwapper[PATH_MAX] = "";
*/
bool browser_track = false;
- switch (SortBrowser & SORT_MASK)
+ switch (C_SortBrowser & SORT_MASK)
{
case SORT_DESC:
case SORT_SUBJECT:
case MUTT_MBOX:
case MUTT_MH:
case MUTT_MMDF:
- if (Folder)
- mutt_str_strfcpy(LastDir, Folder, sizeof(LastDir));
- else if (Spoolfile)
- mutt_browser_select_dir(Spoolfile);
+ if (C_Folder)
+ mutt_str_strfcpy(LastDir, C_Folder, sizeof(LastDir));
+ else if (C_Spoolfile)
+ mutt_browser_select_dir(C_Spoolfile);
break;
default:
mutt_browser_select_dir(CurrentFolder);
case OP_ENTER_MASK:
{
- mutt_str_strfcpy(buf, Mask ? Mask->pattern : NULL, sizeof(buf));
+ mutt_str_strfcpy(buf, C_Mask ? C_Mask->pattern : NULL, sizeof(buf));
if (mutt_get_field(_("File Mask: "), buf, sizeof(buf), 0) != 0)
break;
if (op == OP_BROWSER_GOTO_FOLDER)
{
/* When in mailboxes mode, disables this feature */
- if (Folder)
+ if (C_Folder)
{
- mutt_debug(LL_DEBUG3, "= hit! Folder: %s, LastDir: %s\n", Folder, LastDir);
+ mutt_debug(LL_DEBUG3, "= hit! Folder: %s, LastDir: %s\n", C_Folder, LastDir);
if (GotoSwapper[0] == '\0')
{
- if (mutt_str_strcmp(LastDir, Folder) != 0)
+ if (mutt_str_strcmp(LastDir, C_Folder) != 0)
{
- /* Stores into GotoSwapper LastDir, and swaps to Folder */
+ /* Stores into GotoSwapper LastDir, and swaps to C_Folder */
mutt_str_strfcpy(GotoSwapper, LastDir, sizeof(GotoSwapper));
mutt_str_strfcpy(OldLastDir, LastDir, sizeof(OldLastDir));
- mutt_str_strfcpy(LastDir, Folder, sizeof(LastDir));
+ mutt_str_strfcpy(LastDir, C_Folder, sizeof(LastDir));
}
}
else
#include <time.h>
/* These Config Variables are only used in browser.c */
-extern bool BrowserAbbreviateMailboxes;
-extern char *FolderFormat;
-extern char *GroupIndexFormat;
-extern char *NewsgroupsCharset;
-extern bool ShowOnlyUnread;
-extern short SortBrowser;
-extern char *VfolderFormat;
+extern bool C_BrowserAbbreviateMailboxes;
+extern char *C_FolderFormat;
+extern char *C_GroupIndexFormat;
+extern char *C_NewsgroupsCharset;
+extern bool C_ShowOnlyUnread;
+extern short C_SortBrowser;
+extern char *C_VfolderFormat;
/* flags to mutt_select_file() */
#define MUTT_SEL_MAILBOX (1 << 0)
{
char buf[LONG_STRING];
mutt_str_strfcpy(buf, s, sizeof(buf));
- mutt_check_simple(buf, sizeof(buf), NONULL(SimpleSearch));
+ mutt_check_simple(buf, sizeof(buf), NONULL(C_SimpleSearch));
tmp->color_pattern = mutt_pattern_comp(buf, MUTT_FULL_MSG, err);
if (!tmp->color_pattern)
{
#endif
/* These Config Variables are only used in commands.c */
-unsigned char CryptVerifySig; ///< Config: Verify PGP or SMIME signatures
-char *DisplayFilter; ///< Config: External command to pre-process an email before display
-bool PipeDecode; ///< Config: Decode the message when piping it
-char *PipeSep; ///< Config: Separator to add between multiple piped messages
-bool PipeSplit; ///< Config: Run the pipe command on each message separately
-bool PrintDecode; ///< Config: Decode message before printing it
-bool PrintSplit; ///< Config: Print multiple messages separately
-bool PromptAfter; ///< Config: Pause after running an external pager
+unsigned char C_CryptVerifySig; ///< Config: Verify PGP or SMIME signatures
+char *C_DisplayFilter; ///< Config: External command to pre-process an email before display
+bool C_PipeDecode; ///< Config: Decode the message when piping it
+char *C_PipeSep; ///< Config: Separator to add between multiple piped messages
+bool C_PipeSplit; ///< Config: Run the pipe command on each message separately
+bool C_PrintDecode; ///< Config: Decode message before printing it
+bool C_PrintSplit; ///< Config: Print multiple messages separately
+bool C_PromptAfter; ///< Config: Pause after running an external pager
static const char *ExtPagerProgress = "all";
struct Envelope *prot_headers = NULL;
regmatch_t pmatch[1];
- if (!CryptProtectedHeadersRead)
+ if (!C_CryptProtectedHeadersRead)
return;
/* Grab protected headers to update in the index */
mutt_str_replace(&cur->env->subject, prot_headers->subject);
FREE(&cur->env->disp_subj);
- if (regexec(ReplyRegex->regex, cur->env->subject, 1, pmatch, 0) == 0)
+ if (regexec(C_ReplyRegex->regex, cur->env->subject, 1, pmatch, 0) == 0)
cur->env->real_subj = cur->env->subject + pmatch[0].rm_eo;
else
cur->env->real_subj = cur->env->subject;
mx_save_hcache(Context->mailbox, cur);
/* Also persist back to the message headers if this is set */
- if (CryptProtectedHeadersSave)
+ if (C_CryptProtectedHeadersSave)
{
cur->env->changed |= MUTT_ENV_CHANGED_SUBJECT;
cur->changed = 1;
{
/* find out whether or not the verify signature */
/* L10N: Used for the $crypt_verify_sig prompt */
- if (query_quadoption(CryptVerifySig, _("Verify signature?")) == MUTT_YES)
+ if (query_quadoption(C_CryptVerifySig, _("Verify signature?")) == MUTT_YES)
{
cmflags |= MUTT_CM_VERIFY;
}
return 0;
}
- if (DisplayFilter && *DisplayFilter)
+ if (C_DisplayFilter && *C_DisplayFilter)
{
fpfilterout = fpout;
fpout = NULL;
- filterpid = mutt_create_filter_fd(DisplayFilter, &fpout, NULL, NULL, -1,
+ filterpid = mutt_create_filter_fd(C_DisplayFilter, &fpout, NULL, NULL, -1,
fileno(fpfilterout), -1);
if (filterpid < 0)
{
}
}
- if (!Pager || (mutt_str_strcmp(Pager, "builtin") == 0))
+ if (!C_Pager || (mutt_str_strcmp(C_Pager, "builtin") == 0))
builtin = true;
else
{
hfi.pager_progress = ExtPagerProgress;
hfi.email = cur;
mutt_make_string_info(buf, sizeof(buf), MuttIndexWindow->cols,
- NONULL(PagerFormat), &hfi, 0);
+ NONULL(C_PagerFormat), &hfi, 0);
fputs(buf, fpout);
fputs("\n\n", fpout);
}
- chflags = (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
+ chflags = (C_Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY;
#ifdef USE_NOTMUCH
if (Context->mailbox->magic == MUTT_NOTMUCH)
chflags |= CH_VIRTUAL;
char cmd[HUGE_STRING];
mutt_endwin();
- snprintf(cmd, sizeof(cmd), "%s %s", NONULL(Pager), tempfile);
+ snprintf(cmd, sizeof(cmd), "%s %s", NONULL(C_Pager), tempfile);
r = mutt_system(cmd);
if (r == -1)
mutt_error(_("Error running \"%s\""), cmd);
keypad(stdscr, true);
if (r != -1)
mutt_set_flag(Context->mailbox, cur, MUTT_READ, true);
- if (r != -1 && PromptAfter)
+ if (r != -1 && C_PromptAfter)
{
mutt_unget_event(mutt_any_key_to_continue(_("Command: ")), 0);
rc = km_dokey(MENU_PAGER);
else
snprintf(prompt, sizeof(prompt), "%s?", scratch);
- if (query_quadoption(Bounce, prompt) != MUTT_YES)
+ if (query_quadoption(C_Bounce, prompt) != MUTT_YES)
{
mutt_addr_free(&addr);
mutt_window_clearline(MuttMessageWindow, 0);
*cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
*chflags |= CH_DECODE | CH_REORDER;
- if (Weed)
+ if (C_Weed)
{
*chflags |= CH_WEED;
*cmflags |= MUTT_CM_WEED;
}
}
- if ((rc != 0) || WaitKey)
+ if ((rc != 0) || C_WaitKey)
mutt_any_key_to_continue(NULL);
return rc;
}
}
mutt_expand_path(buffer, sizeof(buffer));
- pipe_message(m, el, buffer, PipeDecode, false, PipeSplit, PipeSep);
+ pipe_message(m, el, buffer, C_PipeDecode, false, C_PipeSplit, C_PipeSep);
}
/**
if (!m || !el)
return;
- if (Print && (!PrintCommand || !*PrintCommand))
+ if (C_Print && (!C_PrintCommand || !*C_PrintCommand))
{
mutt_message(_("No printing command has been defined"));
return;
msg_count++;
}
- if (query_quadoption(Print, (msg_count == 1) ? _("Print message?") :
- _("Print tagged messages?")) != MUTT_YES)
+ if (query_quadoption(C_Print, (msg_count == 1) ?
+ _("Print message?") :
+ _("Print tagged messages?")) != MUTT_YES)
{
return;
}
- if (pipe_message(m, el, PrintCommand, PrintDecode, true, PrintSplit, "\f") == 0)
+ if (pipe_message(m, el, C_PrintCommand, C_PrintDecode, true, C_PrintSplit, "\f") == 0)
mutt_message(ngettext("Message printed", "Messages printed", msg_count));
else
{
*/
int mutt_select_sort(int reverse)
{
- int method = Sort; /* save the current method in case of abort */
+ int method = C_Sort; /* save the current method in case of abort */
int new_sort = -1;
switch (mutt_multi_choice(reverse ?
new_sort |= SORT_REVERSE;
cs_str_native_set(Config, "sort", new_sort, NULL);
- return (Sort != method) ? 0 : -1; /* no need to resort if it's the same */
+ return (C_Sort != method) ? 0 : -1; /* no need to resort if it's the same */
}
/**
if (mutt_get_field(_("Shell command: "), buf, sizeof(buf), MUTT_CMD) != 0)
return;
- if (!buf[0] && Shell)
- mutt_str_strfcpy(buf, Shell, sizeof(buf));
+ if (!buf[0] && C_Shell)
+ mutt_str_strfcpy(buf, C_Shell, sizeof(buf));
if (!buf[0])
return;
if (rc == -1)
mutt_debug(LL_DEBUG1, "Error running \"%s\"!", buf);
- if ((rc != 0) || WaitKey)
+ if ((rc != 0) || C_WaitKey)
mutt_any_key_to_continue(NULL);
mutt_mailbox_check(Context->mailbox, MUTT_MAILBOX_CHECK_FORCE);
}
{
*chflags |= CH_DECODE; /* then decode RFC2047 headers, */
- if (Weed)
+ if (C_Weed)
{
*chflags |= CH_WEED; /* and respect $weed. */
*cmflags |= MUTT_CM_WEED;
{
mutt_set_flag(Context->mailbox, e, MUTT_DELETE, true);
mutt_set_flag(Context->mailbox, e, MUTT_PURGE, true);
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_set_flag(Context->mailbox, e, MUTT_TAG, false);
}
struct Mailbox;
/* These Config Variables are only used in commands.c */
-extern unsigned char CryptVerifySig; /* verify PGP signatures */
-extern char * DisplayFilter;
-extern bool PipeDecode;
-extern char * PipeSep;
-extern bool PipeSplit;
-extern bool PrintDecode;
-extern bool PrintSplit;
-extern bool PromptAfter;
+extern unsigned char C_CryptVerifySig; /* verify PGP signatures */
+extern char * C_DisplayFilter;
+extern bool C_PipeDecode;
+extern char * C_PipeSep;
+extern bool C_PipeSplit;
+extern bool C_PrintDecode;
+extern bool C_PrintSplit;
+extern bool C_PromptAfter;
void ci_bounce_message(struct Mailbox *m, struct EmailList *el);
void mutt_check_stats(void);
if (*buf == '=' || *buf == '+' || *buf == '!')
{
if (*buf == '!')
- p = NONULL(Spoolfile);
+ p = NONULL(C_Spoolfile);
else
- p = NONULL(Folder);
+ p = NONULL(C_Folder);
mutt_path_concat(imap_path, p, buf + 1, sizeof(imap_path));
}
dirpart[0] = *buf;
dirpart[1] = '\0';
if (*buf == '!')
- mutt_str_strfcpy(exp_dirpart, Spoolfile, sizeof(exp_dirpart));
+ mutt_str_strfcpy(exp_dirpart, C_Spoolfile, sizeof(exp_dirpart));
else
- mutt_str_strfcpy(exp_dirpart, Folder, sizeof(exp_dirpart));
+ mutt_str_strfcpy(exp_dirpart, C_Folder, sizeof(exp_dirpart));
p = strrchr(buf, '/');
if (p)
{
#endif
/* These Config Variables are only used in compose.c */
-char *ComposeFormat; ///< Config: printf-like format string for the Compose panel's status bar
-char *Ispell; ///< Config: External command to perform spell-checking
-unsigned char Postpone; ///< Config: Save messages to the Postponed folder
+char *C_ComposeFormat; ///< Config: printf-like format string for the Compose panel's status bar
+char *C_Ispell; ///< Config: External command to perform spell-checking
+unsigned char C_Postpone; ///< Config: Save messages to the #C_Postponed folder
static const char *There_are_no_attachments = N_("There are no attachments");
{
struct AttachCtx *actx = menu->data;
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AttachFormat),
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(C_AttachFormat),
attach_format_str, (unsigned long) (actx->idx[actx->v2r[line]]),
MUTT_FORMAT_STAT_FILE | MUTT_FORMAT_ARROWCURSOR);
}
addstr(_(" (S/MIME)"));
}
- if (CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
+ if (C_CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
addstr(_(" (OppEnc mode)"));
mutt_window_clrtoeol(MuttIndexWindow);
SETCOLOR(MT_COLOR_COMPOSE_HEADER);
printw("%*s", HeaderPadding[HDR_CRYPTINFO], _(Prompts[HDR_CRYPTINFO]));
NORMAL_COLOR;
- printw("%s", PgpSignAs ? PgpSignAs : _("<default>"));
+ printw("%s", C_PgpSignAs ? C_PgpSignAs : _("<default>"));
}
if (((WithCrypto & APPLICATION_SMIME) != 0) &&
SETCOLOR(MT_COLOR_COMPOSE_HEADER);
printw("%*s", HeaderPadding[HDR_CRYPTINFO], _(Prompts[HDR_CRYPTINFO]));
NORMAL_COLOR;
- printw("%s", SmimeSignAs ? SmimeSignAs : _("<default>"));
+ printw("%s", C_SmimeSignAs ? C_SmimeSignAs : _("<default>"));
}
if (((WithCrypto & APPLICATION_SMIME) != 0) && (msg->security & APPLICATION_SMIME) &&
- (msg->security & SEC_ENCRYPT) && SmimeEncryptWith && *SmimeEncryptWith)
+ (msg->security & SEC_ENCRYPT) && C_SmimeEncryptWith && *C_SmimeEncryptWith)
{
SETCOLOR(MT_COLOR_COMPOSE_HEADER);
mutt_window_mvprintw(MuttIndexWindow, HDR_CRYPTINFO, 40, "%s", _("Encrypt with: "));
NORMAL_COLOR;
- printw("%s", NONULL(SmimeEncryptWith));
+ printw("%s", NONULL(C_SmimeEncryptWith));
}
}
mutt_window_mvprintw(MuttIndexWindow, HDR_CC, 0, "%*s",
HeaderPadding[HDR_FOLLOWUPTO], Prompts[HDR_FOLLOWUPTO]);
mutt_paddstr(W, NONULL(msg->env->followup_to));
- if (XCommentTo)
+ if (C_XCommentTo)
{
mutt_window_mvprintw(MuttIndexWindow, HDR_BCC, 0, "%*s",
HeaderPadding[HDR_XCOMMENTTO], Prompts[HDR_XCOMMENTTO]);
{
char buf[LONG_STRING];
compose_status_line(buf, sizeof(buf), 0, MuttStatusWindow->cols, menu,
- NONULL(ComposeFormat));
+ NONULL(C_ComposeFormat));
mutt_window_move(MuttStatusWindow, 0, 0);
SETCOLOR(MT_COLOR_STATUS);
mutt_paddstr(MuttStatusWindow->cols, buf);
break;
#endif
edit_address_list(HDR_TO, &msg->env->to);
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_BCC, &msg->env->bcc);
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
#endif
edit_address_list(HDR_CC, &msg->env->cc);
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
{
crypt_opportunistic_encrypt(msg);
redraw_crypt_lines(msg);
break;
case OP_COMPOSE_EDIT_X_COMMENT_TO:
- if (!(news && XCommentTo))
+ if (!(news && C_XCommentTo))
break;
if (msg->env->x_comment_to)
mutt_str_strfcpy(buf, msg->env->x_comment_to, sizeof(buf));
break;
case OP_COMPOSE_EDIT_MESSAGE:
- if (Editor && (mutt_str_strcmp("builtin", Editor) != 0) && !EditHeaders)
+ if (C_Editor && (mutt_str_strcmp("builtin", C_Editor) != 0) && !C_EditHeaders)
{
- mutt_edit_file(Editor, msg->content->filename);
+ mutt_edit_file(C_Editor, msg->content->filename);
mutt_update_encoding(msg->content);
menu->redraw = REDRAW_FULL;
mutt_message_hook(NULL, msg, MUTT_SEND2_HOOK);
/* fallthrough */
case OP_COMPOSE_EDIT_HEADERS:
- if ((mutt_str_strcmp("builtin", Editor) != 0) &&
- (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && EditHeaders)))
+ if ((mutt_str_strcmp("builtin", C_Editor) != 0) &&
+ (op == OP_COMPOSE_EDIT_HEADERS || (op == OP_COMPOSE_EDIT_MESSAGE && C_EditHeaders)))
{
const char *tag = NULL;
char *err = NULL;
mutt_env_to_local(msg->env);
- mutt_edit_headers(NONULL(Editor), msg->content->filename, msg, fcc, fcclen);
+ mutt_edit_headers(NONULL(C_Editor), msg->content->filename, msg, fcc, fcclen);
if (mutt_env_to_intl(msg->env, &tag, &err))
{
mutt_error(_("Bad IDN in '%s': '%s'"), tag, err);
FREE(&err);
}
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
crypt_opportunistic_encrypt(msg);
}
else
OptNews = false;
if (Context && (op == OP_COMPOSE_ATTACH_NEWS_MESSAGE))
{
- CurrentNewsSrv = nntp_select_server(Context->mailbox, NewsServer, false);
+ CurrentNewsSrv = nntp_select_server(Context->mailbox, C_NewsServer, false);
if (!CurrentNewsSrv)
break;
}
struct Context *this = Context; /* remember current folder and sort methods */
- int old_sort = Sort; /* Sort, SortAux could be changed in mutt_index_menu() */
- int old_sort_aux = SortAux;
+ int old_sort = C_Sort; /* C_Sort, SortAux could be changed in mutt_index_menu() */
+ int old_sort_aux = C_SortAux;
Context = ctx;
OptAttachMsg = true;
/* go back to the folder we started from */
Context = this;
/* Restore old $sort and $sort_aux */
- Sort = old_sort;
- SortAux = old_sort_aux;
+ C_Sort = old_sort;
+ C_SortAux = old_sort_aux;
menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
break;
}
/* go back to the folder we started from */
Context = this;
/* Restore old $sort and $sort_aux */
- Sort = old_sort;
- SortAux = old_sort_aux;
+ C_Sort = old_sort;
+ C_SortAux = old_sort_aux;
mutt_message_hook(NULL, msg, MUTT_SEND2_HOOK);
break;
}
if (!fcc_set && *fcc)
{
- int ans = query_quadoption(Copy, _("Save a copy of this message?"));
+ int ans = query_quadoption(C_Copy, _("Save a copy of this message?"));
if (ans == MUTT_ABORT)
break;
else if (ans == MUTT_NO)
case OP_COMPOSE_EDIT_FILE:
CHECK_COUNT;
- mutt_edit_file(NONULL(Editor), CURATTACH->content->filename);
+ mutt_edit_file(NONULL(C_Editor), CURATTACH->content->filename);
mutt_update_encoding(CURATTACH->content);
menu->redraw = REDRAW_CURRENT | REDRAW_STATUS;
mutt_message_hook(NULL, msg, MUTT_SEND2_HOOK);
case OP_EXIT:
{
int ans =
- query_quadoption(Postpone, _("Save (postpone) draft message?"));
+ query_quadoption(C_Postpone, _("Save (postpone) draft message?"));
if (ans == MUTT_NO)
{
for (int i = 0; i < actx->idxlen; i++)
case OP_COMPOSE_ISPELL:
endwin();
- snprintf(buf, sizeof(buf), "%s -x %s", NONULL(Ispell), msg->content->filename);
+ snprintf(buf, sizeof(buf), "%s -x %s", NONULL(C_Ispell), msg->content->filename);
if (mutt_system(buf) == -1)
mutt_error(_("Error running \"%s\""), buf);
else
struct Email;
/* These Config Variables are only used in compose.c */
-extern char * ComposeFormat;
-extern char * Ispell;
-extern unsigned char Postpone;
+extern char * C_ComposeFormat;
+extern char * C_Ispell;
+extern unsigned char C_Postpone;
/* flags for mutt_compose_menu() */
#define MUTT_COMPOSE_NOFREEHEADER (1 << 0)
m->magic = mx_path_probe(m->path, NULL);
}
else
- m->magic = MboxType;
+ m->magic = C_MboxType;
/* We can only deal with mbox and mmdf mailboxes */
if ((m->magic != MUTT_MBOX) && (m->magic != MUTT_MMDF))
else
{
/* If the file was removed, remove the compressed folder too */
- if ((access(m->path, F_OK) != 0) && !SaveEmpty)
+ if ((access(m->path, F_OK) != 0) && !C_SaveEmpty)
{
remove(m->realpath);
}
t->orig_str = mutt_str_strdup(s);
/* This could be more space efficient. However, being used on tiny
- * strings (Tochars and StatusChars), the overhead is not great. */
+ * strings (C_ToChars and C_StatusChars), the overhead is not great. */
t->chars = mutt_mem_calloc(slen, sizeof(char *));
t->segmented_str = mutt_mem_calloc(slen * 2, sizeof(char));
d = t->segmented_str;
/**
* struct MbTable - multibyte character table
*
- * Allows for direct access to the individual multibyte characters in a
- * string. This is used for the Flagchars, Fromchars, StatusChars and Tochars
+ * Allows for direct access to the individual multibyte characters in a string.
+ * This is used for the #C_FlagChars, #C_FromChars, #C_StatusChars and #C_ToChars
* option types.
*/
struct MbTable
#define SORT_LABEL 19 /**< Sort by the emails label */
#define SORT_DESC 20 /**< Sort by the folder's description */
-/* Sort and sort_aux are shorts, and are a composite of a constant sort
+/* C_Sort and C_SortAux are shorts, and are a composite of a constant sort
* operation number and a set of compounded bitflags.
*
* Everything below SORT_MASK is a constant. There's room for SORT_MASK
#include <stdbool.h>
#include <stdio.h>
-short ConnectTimeout = 0; ///< Config: Timeout for making network connections (-1 to wait indefinitely)
+short C_ConnectTimeout = 0; ///< Config: Timeout for making network connections (-1 to wait indefinitely)
#ifdef USE_SSL
-const char *CertificateFile = NULL; ///< Config: File containing trusted certificates
-const char *EntropyFile = NULL; ///< Config: (ssl) File/device containing random data to initialise SSL
-const char *SslCiphers = NULL; ///< Config: Ciphers to use when using SSL
-const char *SslClientCert = NULL; ///< Config: File containing client certificates
+const char *C_CertificateFile = NULL; ///< Config: File containing trusted certificates
+const char *C_EntropyFile = NULL; ///< Config: (ssl) File/device containing random data to initialise SSL
+const char *C_SslCiphers = NULL; ///< Config: Ciphers to use when using SSL
+const char *C_SslClientCert = NULL; ///< Config: File containing client certificates
#ifdef USE_SSL_GNUTLS
-const char *SslCaCertificatesFile = NULL; ///< Config: File containing trusted CA certificates
-short SslMinDhPrimeBits = 0; ///< Config: Minimum keysize for Diffie-Hellman key exchange
+const char *C_SslCaCertificatesFile = NULL; ///< Config: File containing trusted CA certificates
+short C_SslMinDhPrimeBits = 0; ///< Config: Minimum keysize for Diffie-Hellman key exchange
#endif
#endif
#ifdef USE_SOCKET
-const char *Preconnect = NULL; ///< Config: (socket) External command to run prior to opening a socket
-const char *Tunnel = NULL; ///< Config: Shell command to establish a tunnel
+const char *C_Preconnect = NULL; ///< Config: (socket) External command to run prior to opening a socket
+const char *C_Tunnel = NULL; ///< Config: Shell command to establish a tunnel
#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 SslVerifyDates; ///< Config: (ssl) Verify the dates on the server certificate
-bool SslVerifyHost; ///< Config: (ssl) Verify the server's hostname against the certificate
+bool C_SslUseSslv3; ///< Config: (ssl) INSECURE: Use SSLv3 for authentication
+bool C_SslUseTlsv1; ///< Config: (ssl) Use TLSv1 for authentication
+bool C_SslUseTlsv11; ///< Config: (ssl) Use TLSv1.1 for authentication
+bool C_SslUseTlsv12; ///< Config: (ssl) Use TLSv1.2 for authentication
+bool C_SslVerifyDates; ///< Config: (ssl) Verify the dates on the server certificate
+bool C_SslVerifyHost; ///< Config: (ssl) Verify the server's hostname against the certificate
#endif
#include <stdbool.h>
/* These variables are backing for config items */
-extern short ConnectTimeout;
+extern short C_ConnectTimeout;
#ifdef USE_SSL
-extern const char *CertificateFile;
-extern const char *EntropyFile;
-extern const char *SslCiphers;
-extern const char *SslClientCert;
+extern const char *C_CertificateFile;
+extern const char *C_EntropyFile;
+extern const char *C_SslCiphers;
+extern const char *C_SslClientCert;
#ifdef USE_SSL_GNUTLS
-extern const char *SslCaCertificatesFile;
-extern short SslMinDhPrimeBits;
+extern const char *C_SslCaCertificatesFile;
+extern short C_SslMinDhPrimeBits;
#endif
#endif
#ifdef USE_SOCKET
-extern const char *Preconnect;
-extern const char *Tunnel;
+extern const char *C_Preconnect;
+extern const char *C_Tunnel;
#endif
/* These Config Variables are only used in conn/conn_raw.c */
#ifdef HAVE_GETADDRINFO
-extern bool UseIpv6;
+extern bool C_UseIpv6;
#endif
#ifdef USE_SSL
-extern bool SslUseSslv3;
-extern bool SslUseTlsv1;
-extern bool SslUseTlsv11;
-extern bool SslUseTlsv12;
-extern bool SslVerifyDates;
-extern bool SslVerifyHost;
+extern bool C_SslUseSslv3;
+extern bool C_SslUseTlsv1;
+extern bool C_SslUseTlsv11;
+extern bool C_SslUseTlsv12;
+extern bool C_SslVerifyDates;
+extern bool C_SslVerifyHost;
#endif
#endif /* MUTT_CONN_CONN_GLOBALS_H */
/* These Config Variables are only used in conn/conn_raw.c */
#ifdef HAVE_GETADDRINFO
-bool UseIpv6; ///< Config: Lookup IPv6 addresses when making connections
+bool C_UseIpv6; ///< Config: Lookup IPv6 addresses when making connections
#endif
/**
return -1;
}
- if (ConnectTimeout > 0)
- alarm(ConnectTimeout);
+ if (C_ConnectTimeout > 0)
+ alarm(C_ConnectTimeout);
mutt_sig_allow_interrupt(1);
SigInt = 0; /* reset in case we caught SIGINTR while in connect() */
}
- if (ConnectTimeout > 0)
+ if (C_ConnectTimeout > 0)
alarm(0);
mutt_sig_allow_interrupt(0);
sigprocmask(SIG_UNBLOCK, &set, NULL);
/* we accept v4 or v6 STREAM sockets */
memset(&hints, 0, sizeof(hints));
- if (UseIpv6)
+ if (C_UseIpv6)
hints.ai_family = AF_UNSPEC;
else
hints.ai_family = AF_INET;
*/
static int socket_preconnect(void)
{
- if (!Preconnect)
+ if (!C_Preconnect)
return 0;
- mutt_debug(LL_DEBUG2, "Executing preconnect: %s\n", Preconnect);
- const int rc = mutt_system(Preconnect);
+ mutt_debug(LL_DEBUG2, "Executing preconnect: %s\n", C_Preconnect);
+ const int rc = mutt_system(C_Preconnect);
mutt_debug(LL_DEBUG2, "Preconnect result: %d\n", rc);
if (rc != 0)
{
* loaded into the trusted store. This function filters out expired certs.
*
* Previously the code used this form:
- * SSL_CTX_load_verify_locations (ssldata->ctx, CertificateFile, NULL);
+ * SSL_CTX_load_verify_locations (ssldata->ctx, #C_CertificateFile, NULL);
*/
static int ssl_load_certificates(SSL_CTX *ctx)
{
SSL_CTX_set_cert_store(ctx, store);
}
- fp = fopen(CertificateFile, "rt");
+ fp = fopen(C_CertificateFile, "rt");
if (!fp)
return 0;
#ifdef HAVE_SSL_PARTIAL_CHAIN
X509_VERIFY_PARAM *param = NULL;
- if (SslVerifyPartialChains)
+ if (C_SslVerifyPartialChains)
{
param = X509_VERIFY_PARAM_new();
if (param)
*/
static bool check_certificate_expiration(X509 *peercert, bool silent)
{
- if (SslVerifyDates == MUTT_NO)
+ if (C_SslVerifyDates == MUTT_NO)
return true;
if (X509_cmp_current_time(X509_get0_notBefore(peercert)) >= 0)
{
/* load entropy from files */
char path[PATH_MAX];
- add_entropy(EntropyFile);
+ add_entropy(C_EntropyFile);
add_entropy(RAND_file_name(path, sizeof(path)));
/* load entropy from egd sockets */
*/
static void ssl_get_client_cert(struct SslSockData *ssldata, struct Connection *conn)
{
- if (!SslClientCert)
+ if (!C_SslClientCert)
return;
- mutt_debug(LL_DEBUG2, "Using client certificate %s\n", SslClientCert);
+ mutt_debug(LL_DEBUG2, "Using client certificate %s\n", C_SslClientCert);
SSL_CTX_set_default_passwd_cb_userdata(ssldata->sctx, &conn->account);
SSL_CTX_set_default_passwd_cb(ssldata->sctx, ssl_passwd_cb);
- SSL_CTX_use_certificate_file(ssldata->sctx, SslClientCert, SSL_FILETYPE_PEM);
- SSL_CTX_use_PrivateKey_file(ssldata->sctx, SslClientCert, SSL_FILETYPE_PEM);
+ SSL_CTX_use_certificate_file(ssldata->sctx, C_SslClientCert, SSL_FILETYPE_PEM);
+ SSL_CTX_use_PrivateKey_file(ssldata->sctx, C_SslClientCert, SSL_FILETYPE_PEM);
/* if we are using a client cert, SASL may expect an external auth name */
if (mutt_account_getuser(&conn->account) < 0)
int pass = false;
FILE *fp = NULL;
- if (!CertificateFile)
+ if (!C_CertificateFile)
return false;
- fp = fopen(CertificateFile, "rt");
+ fp = fopen(C_CertificateFile, "rt");
if (!fp)
return false;
/* The leaf/host certificate can't be skipped. */
#ifdef HAVE_SSL_PARTIAL_CHAIN
- if ((idx != 0) && SslVerifyPartialChains)
+ if ((idx != 0) && C_SslVerifyPartialChains)
ALLOW_SKIP = 1;
#endif
* true, then check_certificate_file() must be false. Therefore we don't need
* to also scan the certificate file here.
*/
- allow_always =
- allow_always && CertificateFile && check_certificate_expiration(cert, true);
+ allow_always = allow_always && C_CertificateFile &&
+ check_certificate_expiration(cert, true);
/* L10N:
* These four letters correspond to the choices in the next four strings:
if (!allow_always)
break;
done = 0;
- fp = fopen(CertificateFile, "a");
+ fp = fopen(C_CertificateFile, "a");
if (fp)
{
if (PEM_write_X509(fp, cert))
* a second time with preverify_ok = 1. Don't show it or the user
* will think their "s" key is broken.
*/
- if (SslVerifyPartialChains)
+ if (C_SslVerifyPartialChains)
{
static int last_pos = 0;
static X509 *last_cert = NULL;
/* check hostname only for the leaf certificate */
buf[0] = 0;
- if (pos == 0 && SslVerifyHost != MUTT_NO)
+ if (pos == 0 && C_SslVerifyHost != MUTT_NO)
{
if (check_host(cert, host, buf, sizeof(buf)) == 0)
{
if (!preverify_ok || skip_mode)
{
/* automatic check from user's database */
- if (CertificateFile && check_certificate_by_digest(cert))
+ if (C_CertificateFile && check_certificate_by_digest(cert))
{
mutt_debug(LL_DEBUG2, "digest check passed\n");
SSL_set_ex_data(ssl, SkipModeExDataIndex, NULL);
/* disable SSL protocols as needed */
#ifdef SSL_OP_NO_TLSv1_2
- if (!SslUseTlsv12)
+ if (!C_SslUseTlsv12)
SSL_CTX_set_options(ssldata->sctx, SSL_OP_NO_TLSv1_2);
#endif
#ifdef SSL_OP_NO_TLSv1_1
- if (!SslUseTlsv11)
+ if (!C_SslUseTlsv11)
SSL_CTX_set_options(ssldata->sctx, SSL_OP_NO_TLSv1_1);
#endif
#ifdef SSL_OP_NO_TLSv1
- if (!SslUseTlsv1)
+ if (!C_SslUseTlsv1)
SSL_CTX_set_options(ssldata->sctx, SSL_OP_NO_TLSv1);
#endif
- if (!SslUseSslv3)
+ if (!C_SslUseSslv3)
SSL_CTX_set_options(ssldata->sctx, SSL_OP_NO_SSLv3);
- if (!SslUseSslv2)
+ if (!C_SslUseSslv2)
SSL_CTX_set_options(ssldata->sctx, SSL_OP_NO_SSLv2);
- if (SslUsesystemcerts)
+ if (C_SslUsesystemcerts)
{
if (!SSL_CTX_set_default_verify_paths(ssldata->sctx))
{
}
}
- if (CertificateFile && !ssl_load_certificates(ssldata->sctx))
+ if (C_CertificateFile && !ssl_load_certificates(ssldata->sctx))
mutt_debug(LL_DEBUG1, "Error loading trusted certificates\n");
ssl_get_client_cert(ssldata, conn);
- if (SslCiphers)
+ if (C_SslCiphers)
{
- SSL_CTX_set_cipher_list(ssldata->sctx, SslCiphers);
+ SSL_CTX_set_cipher_list(ssldata->sctx, C_SslCiphers);
}
if (ssl_set_verify_partial(ssldata->sctx))
regmatch_t pmatch[3];
/* try checking against names stored in stored certs file */
- FILE *fp = fopen(CertificateFile, "r");
+ FILE *fp = fopen(C_CertificateFile, "r");
if (fp)
{
if (REGCOMP(&preg, "^#H ([a-zA-Z0-9_\\.-]+) ([0-9A-F]{4}( [0-9A-F]{4}){7})[ \t]*$",
}
/**
- * tls_compare_certificates - Compare certificates against CertificateFile
+ * tls_compare_certificates - Compare certificates against #C_CertificateFile
* @param peercert Certificate
* @retval 1 Certificate matches file
* @retval 0 Error, or no match
unsigned char *b64_data_data = NULL;
struct stat filestat;
- if (stat(CertificateFile, &filestat) == -1)
+ if (stat(C_CertificateFile, &filestat) == -1)
return 0;
b64_data.size = filestat.st_size + 1;
b64_data_data[b64_data.size - 1] = '\0';
b64_data.data = b64_data_data;
- fd1 = fopen(CertificateFile, "r");
+ fd1 = fopen(C_CertificateFile, "r");
if (!fd1)
{
return 0;
* gnutls_certificate_set_verify_flags() with a flag disabling
* GnuTLS checking of the dates. So certstat shouldn't have the
* GNUTLS_CERT_EXPIRED and GNUTLS_CERT_NOT_ACTIVATED bits set. */
- if (SslVerifyDates != MUTT_NO)
+ if (C_SslVerifyDates != MUTT_NO)
{
if (gnutls_x509_crt_get_expiration_time(cert) < time(NULL))
*certerr |= CERTERR_EXPIRED;
*certerr |= CERTERR_NOTYETVALID;
}
- if (chainidx == 0 && SslVerifyHost != MUTT_NO &&
+ if (chainidx == 0 && C_SslVerifyHost != MUTT_NO &&
!gnutls_x509_crt_check_hostname(cert, hostname) &&
!tls_check_stored_hostname(certdata, hostname))
{
menu->title = title;
/* certificates with bad dates, or that are revoked, must be
accepted manually each and every time */
- if (CertificateFile && !savedcert &&
+ if (C_CertificateFile && !savedcert &&
!(certerr & (CERTERR_EXPIRED | CERTERR_NOTYETVALID | CERTERR_REVOKED)))
{
menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always");
break;
case OP_MAX + 3: /* accept always */
done = 0;
- fp = mutt_file_fopen(CertificateFile, "a");
+ fp = mutt_file_fopen(C_CertificateFile, "a");
if (fp)
{
/* save hostname if necessary */
size_t nproto = 4;
size_t priority_size;
- priority_size = SHORT_STRING + mutt_str_strlen(SslCiphers);
+ priority_size = SHORT_STRING + mutt_str_strlen(C_SslCiphers);
char *priority = mutt_mem_malloc(priority_size);
priority[0] = 0;
- if (SslCiphers)
- mutt_str_strcat(priority, priority_size, SslCiphers);
+ if (C_SslCiphers)
+ mutt_str_strcat(priority, priority_size, C_SslCiphers);
else
mutt_str_strcat(priority, priority_size, "NORMAL");
- if (!SslUseTlsv12)
+ if (!C_SslUseTlsv12)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.2");
}
- if (!SslUseTlsv11)
+ if (!C_SslUseTlsv11)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.1");
}
- if (!SslUseTlsv1)
+ if (!C_SslUseTlsv1)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-TLS1.0");
}
- if (!SslUseSslv3)
+ if (!C_SslUseSslv3)
{
nproto--;
mutt_str_strcat(priority, priority_size, ":-VERS-SSL3.0");
{
size_t nproto = 0; /* number of tls/ssl protocols */
- if (SslUseTlsv12)
+ if (C_SslUseTlsv12)
protocol_priority[nproto++] = GNUTLS_TLS1_2;
- if (SslUseTlsv11)
+ if (C_SslUseTlsv11)
protocol_priority[nproto++] = GNUTLS_TLS1_1;
- if (SslUseTlsv1)
+ if (C_SslUseTlsv1)
protocol_priority[nproto++] = GNUTLS_TLS1;
- if (SslUseSslv3)
+ if (C_SslUseSslv3)
protocol_priority[nproto++] = GNUTLS_SSL3;
protocol_priority[nproto] = 0;
return -1;
}
- if (SslCiphers)
+ if (C_SslCiphers)
{
mutt_error(
_("Explicit ciphersuite selection via $ssl_ciphers not supported"));
return -1;
}
- gnutls_certificate_set_x509_trust_file(data->xcred, CertificateFile, GNUTLS_X509_FMT_PEM);
+ gnutls_certificate_set_x509_trust_file(data->xcred, C_CertificateFile, GNUTLS_X509_FMT_PEM);
/* ignore errors, maybe file doesn't exist yet */
- if (SslCaCertificatesFile)
+ if (C_SslCaCertificatesFile)
{
- gnutls_certificate_set_x509_trust_file(data->xcred, SslCaCertificatesFile,
+ gnutls_certificate_set_x509_trust_file(data->xcred, C_SslCaCertificatesFile,
GNUTLS_X509_FMT_PEM);
}
- if (SslClientCert)
+ if (C_SslClientCert)
{
- mutt_debug(LL_DEBUG2, "Using client certificate %s\n", SslClientCert);
- gnutls_certificate_set_x509_key_file(data->xcred, SslClientCert,
- SslClientCert, GNUTLS_X509_FMT_PEM);
+ mutt_debug(LL_DEBUG2, "Using client certificate %s\n", C_SslClientCert);
+ gnutls_certificate_set_x509_key_file(data->xcred, C_SslClientCert,
+ C_SslClientCert, GNUTLS_X509_FMT_PEM);
}
#ifdef HAVE_DECL_GNUTLS_VERIFY_DISABLE_TIME_CHECKS
goto fail;
}
- if (SslMinDhPrimeBits > 0)
+ if (C_SslMinDhPrimeBits > 0)
{
- gnutls_dh_set_prime_bits(data->state, SslMinDhPrimeBits);
+ gnutls_dh_set_prime_bits(data->state, C_SslMinDhPrimeBits);
}
/* gnutls_set_cred (data->state, GNUTLS_ANON, NULL); */
struct TunnelSockData *tunnel = mutt_mem_malloc(sizeof(struct TunnelSockData));
conn->sockdata = tunnel;
- mutt_message(_("Connecting with \"%s\"..."), Tunnel);
+ mutt_message(_("Connecting with \"%s\"..."), C_Tunnel);
int rc = pipe(pin);
if (rc == -1)
/* Don't let the subprocess think it can use the controlling tty */
setsid();
- execle(EXECSHELL, "sh", "-c", Tunnel, NULL, mutt_envlist_getlist());
+ execle(EXECSHELL, "sh", "-c", C_Tunnel, NULL, mutt_envlist_getlist());
_exit(127);
}
mutt_sig_unblock_system(true);
if (e2)
{
e2->superseded = true;
- if (Score)
+ if (C_Score)
mutt_score_message(ctx->mailbox, e2, true);
}
}
mutt_hash_insert(m->subj_hash, e->env->real_subj, e);
mutt_label_hash_add(m, e);
- if (Score)
+ if (C_Score)
mutt_score_message(ctx->mailbox, e, false);
if (e->changed)
for (i = 0, j = 0; i < m->msg_count; i++)
{
if (!m->emails[i]->quasi_deleted &&
- ((committing && (!m->emails[i]->deleted || (m->magic == MUTT_MAILDIR && MaildirTrash))) ||
+ ((committing && (!m->emails[i]->deleted || (m->magic == MUTT_MAILDIR && C_MaildirTrash))) ||
(!committing && m->emails[i]->active)))
{
if (i != j)
else if (m->emails[j]->changed)
m->changed = true;
- if (!committing || (m->magic == MUTT_MAILDIR && MaildirTrash))
+ if (!committing || (m->magic == MUTT_MAILDIR && C_MaildirTrash))
{
if (m->emails[j]->deleted)
m->msg_deleted++;
if (chflags & (CH_DECODE | CH_PREFIX))
{
if (mutt_write_one_header(out, 0, headers[x], (chflags & CH_PREFIX) ? prefix : 0,
- mutt_window_wrap_cols(MuttIndexWindow, Wrap), chflags) == -1)
+ mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), chflags) == -1)
{
error = true;
break;
fputs("MIME-Version: 1.0\n", out);
fputs("Content-Transfer-Encoding: 8bit\n", out);
fputs("Content-Type: text/plain; charset=", out);
- mutt_ch_canonical_charset(chsbuf, sizeof(chsbuf), Charset ? Charset : "us-ascii");
+ mutt_ch_canonical_charset(chsbuf, sizeof(chsbuf), C_Charset ? C_Charset : "us-ascii");
mutt_addr_cat(buffer, sizeof(buffer), chsbuf, MimeSpecials);
fputs(buffer, out);
fputc('\n', out);
{
/* Add some fake headers based on notmuch data */
char *folder = nm_email_get_folder(e);
- if (folder && !(Weed && mutt_matches_ignore("folder")))
+ if (folder && !(C_Weed && mutt_matches_ignore("folder")))
{
char buf[LONG_STRING];
mutt_str_strfcpy(buf, folder, sizeof(buf));
}
#endif
char *tags = driver_tags_get(&e->tags);
- if (tags && !(Weed && mutt_matches_ignore("tags")))
+ if (tags && !(C_Weed && mutt_matches_ignore("tags")))
{
fputs("Tags: ", out);
fputs(tags, out);
if (!(chflags & CH_DECODE))
{
temp_hdr = mutt_str_strdup(temp_hdr);
- rfc2047_encode(&temp_hdr, NULL, sizeof("X-Label:"), SendCharset);
+ rfc2047_encode(&temp_hdr, NULL, sizeof("X-Label:"), C_SendCharset);
}
if (mutt_write_one_header(out, "X-Label", temp_hdr, chflags & CH_PREFIX ? prefix : 0,
- mutt_window_wrap_cols(MuttIndexWindow, Wrap), chflags) == -1)
+ mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), chflags) == -1)
{
return -1;
}
if (!(chflags & CH_DECODE))
{
temp_hdr = mutt_str_strdup(temp_hdr);
- rfc2047_encode(&temp_hdr, NULL, sizeof("Subject:"), SendCharset);
+ rfc2047_encode(&temp_hdr, NULL, sizeof("Subject:"), C_SendCharset);
}
if (mutt_write_one_header(out, "Subject", temp_hdr, chflags & CH_PREFIX ? prefix : 0,
- mutt_window_wrap_cols(MuttIndexWindow, Wrap), chflags) == -1)
+ mutt_window_wrap_cols(MuttIndexWindow, C_Wrap), chflags) == -1)
return -1;
if (!(chflags & CH_DECODE))
FREE(&temp_hdr);
if (cmflags & MUTT_CM_PREFIX)
{
- if (TextFlowed)
+ if (C_TextFlowed)
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
else
- mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
+ mutt_make_string(prefix, sizeof(prefix), NONULL(C_IndentString), Context,
Context->mailbox, e);
}
#define CH_DECODE (1 << 2) ///< Do RFC2047 header decoding
#define CH_XMIT (1 << 3) ///< Transmitting this message? (Ignore Lines: and Content-Length:)
#define CH_FROM (1 << 4) ///< Retain the "From " message separator?
-#define CH_PREFIX (1 << 5) ///< Quote header using IndentString string?
+#define CH_PREFIX (1 << 5) ///< Quote header using #C_IndentString string?
#define CH_NOSTATUS (1 << 6) ///< Suppress the status and x-status fields
#define CH_REORDER (1 << 7) ///< Re-order output of headers (specified by 'hdr_order')
#define CH_NONEWLINE (1 << 8) ///< Don't output terminating newline after the header
#endif
/* These Config Variables are only used in curs_lib.c */
-bool MetaKey; ///< Config: Interpret 'ALT-x' as 'ESC-x'
+bool C_MetaKey; ///< Config: Interpret 'ALT-x' as 'ESC-x'
/* not possible to unget more than one char under some curses libs, and it
* is impossible to unget function keys in SLang, so roll our own input
return timeout;
}
- if ((ch & 0x80) && MetaKey)
+ if ((ch & 0x80) && C_MetaKey)
{
/* send ALT-x as ESC-x */
ch &= ~0x80;
{
mutt_flushinp();
curs_set(1);
- if (Timeout)
+ if (C_Timeout)
mutt_getch_timeout(-1); /* restore blocking operation */
if (mutt_yesorno(_("Exit NeoMutt?"), MUTT_YES) == MUTT_YES)
{
{
int rc;
- if (!Pager || (mutt_str_strcmp(Pager, "builtin") == 0))
+ if (!C_Pager || (mutt_str_strcmp(C_Pager, "builtin") == 0))
rc = mutt_pager(banner, tempfile, do_color, info);
else
{
char cmd[STRING];
mutt_endwin();
- mutt_file_expand_fmt_quote(cmd, sizeof(cmd), Pager, tempfile);
+ mutt_file_expand_fmt_quote(cmd, sizeof(cmd), C_Pager, tempfile);
if (mutt_system(cmd) == -1)
{
mutt_error(_("Error running \"%s\""), cmd);
struct Pager;
/* These Config Variables are only used in curs_lib.c */
-extern bool MetaKey; /**< interpret ALT-x as ESC-x */
+extern bool C_MetaKey; /**< interpret ALT-x as ESC-x */
extern int MuttGetchTimeout; ///< Timeout in ms for mutt_getch()
#include "protos.h"
/* These Config Variables are only used in edit.c */
-char *Escape; ///< Config: Escape character to use for functions in the built-in editor
+char *C_Escape; ///< Config: Escape character to use for functions in the built-in editor
/* SLcurses_waddnstr() can't take a "const char *", so this is only
* declared "static" (sigh)
* @param[out] buflen Bytes of buffer used
* @param[in] offset Start reading at this file offset
* @param[in] bytes Read this many bytes
- * @param[in] prefix If true, prefix the lines with the IndentString
+ * @param[in] prefix If true, prefix the lines with the #C_IndentString
* @retval ptr Pointer to allocated buffer
*/
static char **be_snarf_data(FILE *f, char **buf, int *bufmax, int *buflen,
tmp[sizeof(tmp) - 1] = '\0';
if (prefix)
{
- mutt_str_strfcpy(tmp, IndentString, sizeof(tmp));
+ mutt_str_strfcpy(tmp, C_IndentString, sizeof(tmp));
tmplen = mutt_str_strlen(tmp);
p = tmp + tmplen;
tmplen = sizeof(tmp) - tmplen;
n--;
/* add the attribution */
- if (Attribution)
+ if (C_Attribution)
{
- setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(tmp, sizeof(tmp) - 1, Attribution, Context,
+ setlocale(LC_TIME, NONULL(C_AttributionLocale));
+ mutt_make_string(tmp, sizeof(tmp) - 1, C_Attribution, Context,
Context->mailbox, Context->mailbox->emails[n]);
setlocale(LC_TIME, "");
strcat(tmp, "\n");
addch('\n');
}
- if ((!e->cc && Askcc) || force)
+ if ((!e->cc && C_Askcc) || force)
{
addstr("Cc: ");
tmp[0] = '\0';
addch('\n');
}
- if (Askbcc || force)
+ if (C_Askbcc || force)
{
addstr("Bcc: ");
tmp[0] = '\0';
}
addch('\n');
- if (Escape && tmp[0] == Escape[0] && tmp[1] != Escape[0])
+ if (C_Escape && tmp[0] == C_Escape[0] && tmp[1] != C_Escape[0])
{
/* remove trailing whitespace from the line */
p = tmp + mutt_str_strlen(tmp) - 1;
bufmax = 0;
buflen = 0;
- if (EditHeaders)
+ if (C_EditHeaders)
{
mutt_env_to_local(msg->env);
- mutt_edit_headers(NONULL(Visual), path, msg, NULL, 0);
+ mutt_edit_headers(NONULL(C_Visual), path, msg, NULL, 0);
if (mutt_env_to_intl(msg->env, &tag, &err))
printw(_("Bad IDN in '%s': '%s'"), tag, err);
/* tag is a statically allocated string and should not be freed */
FREE(&err);
}
else
- mutt_edit_file(NONULL(Visual), path);
+ mutt_edit_file(NONULL(C_Visual), path);
buf = be_snarf_file(path, buf, &bufmax, &buflen, false);
struct Email;
/* These Config Variables are only used in edit.c */
-extern char *Escape;
+extern char *C_Escape;
int mutt_builtin_editor(const char *path, struct Email *msg, struct Email *cur);
mutt_mktemp(fname, sizeof(fname));
- enum MailboxType omagic = MboxType;
- MboxType = MUTT_MBOX;
+ enum MailboxType omagic = C_MboxType;
+ C_MboxType = MUTT_MBOX;
struct Mailbox *m_fname = mx_path_resolve(fname);
struct Context *tmpctx = mx_mbox_open(m_fname, MUTT_NEWFOLDER);
- MboxType = omagic;
+ C_MboxType = omagic;
if (!tmpctx)
{
/* Do not reuse the stat sb here as it is outdated. */
time_t mtime = mutt_file_decrease_mtime(fname, NULL);
- mutt_edit_file(NONULL(Editor), fname);
+ mutt_edit_file(NONULL(C_Editor), fname);
rc = stat(fname, &sb);
if (rc == -1)
mutt_set_flag(m, e, MUTT_PURGE, true);
mutt_set_flag(m, e, MUTT_READ, true);
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_set_flag(m, e, MUTT_TAG, false);
}
else if (rc == -1)
#include "mutt/mutt.h"
/* 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 *SpamSeparator = NULL; ///< Config: Separator for multiple spam headers ///< Config: Separator for spam headers
-bool Weed = false; ///< Config: Filter headers when displaying/forwarding/printing/replying
+bool C_MarkOld = false; ///< Config: Mark new emails as old when leaving the mailbox
+struct Regex *C_ReplyRegex = NULL; ///< Config: Regex to match message reply subjects like "re: "
+char *C_SendCharset = NULL; ///< Config: Character sets for outgoing mail ///< Config: List of character sets for outgoing messages
+char *C_SpamSeparator = NULL; ///< Config: Separator for multiple spam headers ///< Config: Separator for spam headers
+bool C_Weed = false; ///< Config: Filter headers when displaying/forwarding/printing/replying
/* Global variables */
struct RegexList NoSpamList = STAILQ_HEAD_INITIALIZER(NoSpamList);
#include "mutt/mutt.h"
/* Config items */
-extern bool MarkOld;
-extern struct Regex * ReplyRegex;
-extern char * SendCharset;
-extern char * SpamSeparator;
-extern bool Weed;
+extern bool C_MarkOld;
+extern struct Regex * C_ReplyRegex;
+extern char * C_SendCharset;
+extern char * C_SpamSeparator;
+extern bool C_Weed;
/* Global variables */
extern struct ListHead Ignore; ///< List of header patterns to ignore
/* These Config Variables are only used in mutt/idna.c */
#ifdef HAVE_LIBIDN
-bool IdnDecode; ///< Config: (idn) Decode international domain names
-bool IdnEncode; ///< Config: (idn) Encode international domain names
+bool C_IdnDecode; ///< Config: (idn) Decode international domain names
+bool C_IdnEncode; ///< Config: (idn) Encode international domain names
#endif
#ifdef HAVE_LIBIDN
* @retval ptr Newly allocated local email address
* @retval NULL Error in conversion
*
- * If #IdnDecode is set, then the domain will be converted from Punycode.
+ * If #C_IdnDecode is set, then the domain will be converted from Punycode.
* For example, "xn--ls8h.la" becomes the emoji domain: ":poop:.la"
* Then the user and domain are changed from 'utf-8' to the encoding in
- * #Charset.
+ * #C_Charset.
*
* If the flag #MI_MAY_BE_IRREVERSIBLE is NOT given, then the results will be
* checked to make sure that the transformation is "undo-able".
#ifdef HAVE_LIBIDN
bool is_idn_encoded = check_idn(local_domain);
- if (is_idn_encoded && IdnDecode)
+ if (is_idn_encoded && C_IdnDecode)
{
if (idna_to_unicode_8z8z(local_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
#endif /* HAVE_LIBIDN */
/* we don't want charset-hook effects, so we set flags to 0 */
- if (mutt_ch_convert_string(&local_user, "utf-8", Charset, 0) != 0)
+ if (mutt_ch_convert_string(&local_user, "utf-8", C_Charset, 0) != 0)
goto cleanup;
- if (mutt_ch_convert_string(&local_domain, "utf-8", Charset, 0) != 0)
+ if (mutt_ch_convert_string(&local_domain, "utf-8", C_Charset, 0) != 0)
goto cleanup;
/* make sure that we can convert back and come out with the same
{
reversed_user = mutt_str_strdup(local_user);
- if (mutt_ch_convert_string(&reversed_user, Charset, "utf-8", 0) != 0)
+ if (mutt_ch_convert_string(&reversed_user, C_Charset, "utf-8", 0) != 0)
{
mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for user = '%s'.\n",
reversed_user);
reversed_domain = mutt_str_strdup(local_domain);
- if (mutt_ch_convert_string(&reversed_domain, Charset, "utf-8", 0) != 0)
+ if (mutt_ch_convert_string(&reversed_domain, C_Charset, "utf-8", 0) != 0)
{
mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for domain = '%s'.\n",
reversed_domain);
* produce a non-matching domain! Thus we only want to do the
* idna_to_ascii_8z() if the original domain was IDNA encoded.
*/
- if (is_idn_encoded && IdnDecode)
+ if (is_idn_encoded && C_IdnDecode)
{
if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
{
* @retval ptr Newly allocated Punycode email address
* @retval NULL Error in conversion
*
- * The user and domain are assumed to be encoded according to #Charset.
- * They are converted to 'utf-8'. If #IdnEncode is set, then the domain
+ * The user and domain are assumed to be encoded according to #C_Charset.
+ * They are converted to 'utf-8'. If #C_IdnEncode is set, then the domain
* will be converted to Punycode. For example, the emoji domain:
* ":poop:.la" becomes "xn--ls8h.la"
*
char *intl_domain = mutt_str_strdup(domain);
/* we don't want charset-hook effects, so we set flags to 0 */
- if (mutt_ch_convert_string(&intl_user, Charset, "utf-8", 0) != 0)
+ if (mutt_ch_convert_string(&intl_user, C_Charset, "utf-8", 0) != 0)
goto cleanup;
- if (mutt_ch_convert_string(&intl_domain, Charset, "utf-8", 0) != 0)
+ if (mutt_ch_convert_string(&intl_domain, C_Charset, "utf-8", 0) != 0)
goto cleanup;
#ifdef HAVE_LIBIDN
- if (IdnEncode)
+ if (C_IdnEncode)
{
if (idna_to_ascii_8z(intl_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
#include <stdbool.h>
/* These Config Variables are only used in mutt/idna.c */
-extern bool IdnDecode;
-extern bool IdnEncode;
+extern bool C_IdnDecode;
+extern bool C_IdnEncode;
#define MI_MAY_BE_IRREVERSIBLE (1 << 0)
s++;
for (i = 0; *s && (i < (sizeof(buffer) - 1)); i++, s++)
{
- if (AssumedCharset && *AssumedCharset)
+ if (C_AssumedCharset && *C_AssumedCharset)
{
/* As iso-2022-* has a character of '"' with non-ascii state,
* ignore it. */
if (!pc)
{
mutt_param_set(&ct->parameter, "charset",
- (AssumedCharset && *AssumedCharset) ?
+ (C_AssumedCharset && *C_AssumedCharset) ?
(const char *) mutt_ch_get_default_charset() :
"us-ascii");
}
{
FREE(&env->list_post);
env->list_post = mutt_str_substr_dup(beg, end);
- if (AutoSubscribe)
+ if (C_AutoSubscribe)
mutt_auto_subscribe(env->list_post);
break;
switch (*p)
{
case 'O':
- e->old = MarkOld ? true : false;
+ e->old = C_MarkOld ? true : false;
break;
case 'R':
e->read = true;
/* restore the original line */
line[strlen(line)] = ':';
- if (!(weed && Weed && mutt_matches_ignore(line)))
+ if (!(weed && C_Weed && mutt_matches_ignore(line)))
{
struct ListNode *np = mutt_list_insert_tail(&env->userhdrs, mutt_str_strdup(line));
if (do_2047)
/* if spam tag already exists, figure out how to amend it */
if (env->spam && *buf)
{
- /* If SpamSeparator defined, append with separator */
- if (SpamSeparator)
+ /* If C_SpamSeparator defined, append with separator */
+ if (C_SpamSeparator)
{
- mutt_buffer_addstr(env->spam, SpamSeparator);
+ mutt_buffer_addstr(env->spam, C_SpamSeparator);
mutt_buffer_addstr(env->spam, buf);
}
{
regmatch_t pmatch[1];
- if (ReplyRegex && ReplyRegex->regex &&
- (regexec(ReplyRegex->regex, env->subject, 1, pmatch, 0) == 0))
+ if (C_ReplyRegex && C_ReplyRegex->regex &&
+ (regexec(C_ReplyRegex->regex, env->subject, 1, pmatch, 0) == 0))
{
env->real_subj = env->subject + pmatch[0].rm_eo;
}
{
char end = charset[charsetlen];
charset[charsetlen] = '\0';
- mutt_ch_convert_string(&buf->data, charset, Charset, MUTT_ICONV_HOOK_FROM);
+ mutt_ch_convert_string(&buf->data, charset, C_Charset, MUTT_ICONV_HOOK_FROM);
charset[charsetlen] = end;
mutt_mb_filter_unprintable(&buf->data);
mutt_buffer_addstr(res, buf->data);
*/
void rfc2047_encode(char **pd, const char *specials, int col, const char *charsets)
{
- if (!Charset || !*pd)
+ if (!C_Charset || !*pd)
return;
if (!charsets || !*charsets)
char *e = NULL;
size_t elen = 0;
- encode(*pd, strlen(*pd), col, Charset, charsets, &e, &elen, specials);
+ encode(*pd, strlen(*pd), col, C_Charset, charsets, &e, &elen, specials);
FREE(pd);
*pd = e;
/* Add non-encoded part */
{
- if (AssumedCharset && *AssumedCharset)
+ if (C_AssumedCharset && *C_AssumedCharset)
{
char *conv = mutt_str_substr_dup(s, s + holelen);
mutt_ch_convert_nonmime_string(&conv);
while (ptr)
{
if (ptr->personal)
- rfc2047_encode(&ptr->personal, AddressSpecials, col, SendCharset);
+ rfc2047_encode(&ptr->personal, AddressSpecials, col, C_SendCharset);
else if (ptr->group && ptr->mailbox)
- rfc2047_encode(&ptr->mailbox, AddressSpecials, col, SendCharset);
+ rfc2047_encode(&ptr->mailbox, AddressSpecials, col, C_SendCharset);
ptr = ptr->next;
}
}
{
while (a)
{
- if (a->personal && ((strstr(a->personal, "=?")) || (AssumedCharset && *AssumedCharset)))
+ if (a->personal && ((strstr(a->personal, "=?")) || (C_AssumedCharset && *C_AssumedCharset)))
{
rfc2047_decode(&a->personal);
}
rfc2047_encode_addrlist(env->reply_to, "Reply-To");
rfc2047_encode_addrlist(env->mail_followup_to, "Mail-Followup-To");
rfc2047_encode_addrlist(env->sender, "Sender");
- rfc2047_encode(&env->x_label, NULL, sizeof("X-Label:"), SendCharset);
- rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), SendCharset);
+ rfc2047_encode(&env->x_label, NULL, sizeof("X-Label:"), C_SendCharset);
+ rfc2047_encode(&env->subject, NULL, sizeof("Subject:"), C_SendCharset);
}
#include "rfc2047.h"
/* These Config Variables are only used in rfc2231.c */
-bool Rfc2047Parameters; ///< Config: Decode RFC2047-encoded MIME parameters
+bool C_Rfc2047Parameters; ///< Config: Decode RFC2047-encoded MIME parameters
/**
* struct Rfc2231Parameter - MIME section parameter
} while (par && (strcmp(par->attribute, attribute) == 0));
if (encoded)
- mutt_ch_convert_string(&value, charset, Charset, MUTT_ICONV_HOOK_FROM);
+ mutt_ch_convert_string(&value, charset, C_Charset, MUTT_ICONV_HOOK_FROM);
struct Parameter *np = mutt_param_new();
np->attribute = mutt_str_strdup(attribute);
* Internet Gateways. So we actually decode it.
*/
- if (Rfc2047Parameters && np->value && strstr(np->value, "=?"))
+ if (C_Rfc2047Parameters && np->value && strstr(np->value, "=?"))
rfc2047_decode(&np->value);
- else if (AssumedCharset && *AssumedCharset)
+ else if (C_AssumedCharset && *C_AssumedCharset)
mutt_ch_convert_nonmime_string(&np->value);
}
else if (*(s + 1) == '\0')
s = get_charset(np->value, charset, sizeof(charset));
decode_one(np->value, s);
- mutt_ch_convert_string(&np->value, charset, Charset, MUTT_ICONV_HOOK_FROM);
+ mutt_ch_convert_string(&np->value, charset, C_Charset, MUTT_ICONV_HOOK_FROM);
mutt_mb_filter_unprintable(&np->value);
dirty = true;
}
if (!*s)
return 0;
- if (!Charset || !SendCharset ||
- !(charset = mutt_ch_choose(Charset, SendCharset, *pd, strlen(*pd), &d, &dlen)))
+ if (!C_Charset || !C_SendCharset ||
+ !(charset = mutt_ch_choose(C_Charset, C_SendCharset, *pd, strlen(*pd), &d, &dlen)))
{
- charset = mutt_str_strdup(Charset ? Charset : "unknown-8bit");
+ charset = mutt_str_strdup(C_Charset ? C_Charset : "unknown-8bit");
FREE(&d);
d = *pd;
dlen = strlen(d);
struct ParameterList;
/* These Config Variables are only used in rfc2231.c */
-extern bool Rfc2047Parameters;
+extern bool C_Rfc2047Parameters;
void rfc2231_decode_parameters(struct ParameterList *p);
int rfc2231_encode_string(char **pd);
#include "tags.h"
/* These Config Variables are only used in email/tags.c */
-char *HiddenTags; ///< Config: Tags that shouldn't be displayed on screen
+char *C_HiddenTags; ///< Config: Tags that shouldn't be displayed on screen
struct Hash *TagTransforms; /**< Lookup table of alternative tag names */
np->transformed = mutt_str_strdup(new_tag_transformed);
/* filter out hidden tags */
- if (HiddenTags)
+ if (C_HiddenTags)
{
- char *p = strstr(HiddenTags, new_tag);
+ char *p = strstr(C_HiddenTags, new_tag);
size_t xsz = p ? mutt_str_strlen(new_tag) : 0;
- if (p && ((p == HiddenTags) || (*(p - 1) == ',') || (*(p - 1) == ' ')) &&
+ if (p && ((p == C_HiddenTags) || (*(p - 1) == ',') || (*(p - 1) == ' ')) &&
((*(p + xsz) == '\0') || (*(p + xsz) == ',') || (*(p + xsz) == ' ')))
{
np->hidden = true;
#include "mutt/mutt.h"
/* These Config Variables are only used in email/tags.c */
-extern char *HiddenTags;
+extern char *C_HiddenTags;
extern struct Hash *TagTransforms;
if (bf)
{
- if (!e->deleted && !m->readonly && (!e->flagged || !FlagSafe))
+ if (!e->deleted && !m->readonly && (!e->flagged || !C_FlagSafe))
{
e->deleted = true;
update = true;
{
struct MuttThread *start = NULL, *cur = e->thread;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error(_("Threading is not enabled"));
return -1;
/* All the variables below are backing for config items */
-WHERE struct Address *EnvelopeFromAddress; ///< Config: Manually set the sender for outgoing messages
-WHERE struct Address *From; ///< Config: Default 'From' address to use, if isn't otherwise set
-
-WHERE char *AliasFile; ///< Config: Save new aliases to this file
-WHERE char *Attribution; ///< Config: Message to start a reply, "On DATE, PERSON wrote:"
-WHERE char *AttributionLocale; ///< Config: Locale for dates in the attribution message
-WHERE char *AttachFormat; ///< Config: printf-like format string for the attachment menu
-WHERE char *ConfigCharset; ///< Config: Character set that the config files are in
-WHERE char *CryptProtectedHeadersSubject; ///< Config: Use this as the subject for encrypted emails
-WHERE char *DateFormat; ///< Config: strftime format string for the `%d` expando
-WHERE char *DsnNotify; ///< Config: Request notification for message delivery or delay
-WHERE char *DsnReturn; ///< Config: What to send as a notification of message delivery or delay
-WHERE char *Editor; ///< Config: External command to use as an email editor
-WHERE char *ExternalSearchCommand; ///< Config: External search command
-WHERE char *Hostname; ///< Config: Fully-qualified domain name of this machine
-WHERE char *IndexFormat; ///< Config: printf-like format string for the index menu (emails)
+WHERE struct Address *C_EnvelopeFromAddress; ///< Config: Manually set the sender for outgoing messages
+WHERE struct Address *C_From; ///< Config: Default 'From' address to use, if isn't otherwise set
+
+WHERE char *C_AliasFile; ///< Config: Save new aliases to this file
+WHERE char *C_Attribution; ///< Config: Message to start a reply, "On DATE, PERSON wrote:"
+WHERE char *C_AttributionLocale; ///< Config: Locale for dates in the attribution message
+WHERE char *C_AttachFormat; ///< Config: printf-like format string for the attachment menu
+WHERE char *C_ConfigCharset; ///< Config: Character set that the config files are in
+WHERE char *C_CryptProtectedHeadersSubject; ///< Config: Use this as the subject for encrypted emails
+WHERE char *C_DateFormat; ///< Config: strftime format string for the `%d` expando
+WHERE char *C_DsnNotify; ///< Config: Request notification for message delivery or delay
+WHERE char *C_DsnReturn; ///< Config: What to send as a notification of message delivery or delay
+WHERE char *C_Editor; ///< Config: External command to use as an email editor
+WHERE char *C_ExternalSearchCommand; ///< Config: External search command
+WHERE char *C_Hostname; ///< Config: Fully-qualified domain name of this machine
+WHERE char *C_IndexFormat; ///< Config: printf-like format string for the index menu (emails)
#ifdef USE_IMAP
-WHERE char *ImapUser; ///< Config: (imap) Username for the IMAP server
+WHERE char *C_ImapUser; ///< Config: (imap) Username for the IMAP server
#endif
-WHERE char *Mbox; ///< Config: Folder that receives read emails (see Move)
-WHERE char *MailcapPath; ///< Config: Colon-separated list of mailcap files
-WHERE char *Folder; ///< Config: Base folder for a set of mailboxes
+WHERE char *C_Mbox; ///< Config: Folder that receives read emails (see Move)
+WHERE char *C_MailcapPath; ///< Config: Colon-separated list of mailcap files
+WHERE char *C_Folder; ///< Config: Base folder for a set of mailboxes
#ifdef USE_HCACHE
-WHERE char *HeaderCache; ///< Config: (hcache) Directory/file for the header cache database
+WHERE char *C_HeaderCache; ///< Config: (hcache) Directory/file for the header cache database
#if defined(HAVE_GDBM) || defined(HAVE_BDB)
-WHERE char *HeaderCachePagesize; ///< Config: (hcache) Database page size (gdbm,bdb4)
+WHERE char *C_HeaderCachePagesize; ///< Config: (hcache) Database page size (gdbm,bdb4)
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
#ifdef USE_SOCKET
-WHERE short NetInc; ///< Config: (socket) Update the progress bar after this many KB sent/received (0 to disable)
+WHERE short C_NetInc; ///< Config: (socket) Update the progress bar after this many KB sent/received (0 to disable)
#endif /* USE_SOCKET */
#ifdef USE_NNTP
-WHERE char *NewsServer; ///< Config: (nntp) Url of the news server
+WHERE char *C_NewsServer; ///< Config: (nntp) Url of the news server
#endif
-WHERE char *Record; ///< Config: Folder to save 'sent' messages
-WHERE char *Pager; ///< Config: External command for viewing messages, or 'builtin' to use NeoMutt's
-WHERE char *PagerFormat; ///< Config: printf-like format string for the pager's status bar
-WHERE char *Postponed; ///< Config: Folder to store postponed messages
-WHERE char *IndentString; ///< Config: String used to indent 'reply' text
-WHERE char *PrintCommand; ///< Config: External command to print a message
-WHERE char *NewMailCommand; ///< Config: External command to run when new mail arrives
-WHERE char *Realname; ///< Config: Real name of the user
-WHERE char *Shell; ///< Config: External command to run subshells in
-WHERE char *SimpleSearch; ///< Config: Pattern to search for when search doesn't contain ~'s
+WHERE char *C_Record; ///< Config: Folder to save 'sent' messages
+WHERE char *C_Pager; ///< Config: External command for viewing messages, or 'builtin' to use NeoMutt's
+WHERE char *C_PagerFormat; ///< Config: printf-like format string for the pager's status bar
+WHERE char *C_Postponed; ///< Config: Folder to store postponed messages
+WHERE char *C_IndentString; ///< Config: String used to indent 'reply' text
+WHERE char *C_PrintCommand; ///< Config: External command to print a message
+WHERE char *C_NewMailCommand; ///< Config: External command to run when new mail arrives
+WHERE char *C_Realname; ///< Config: Real name of the user
+WHERE char *C_Shell; ///< Config: External command to run subshells in
+WHERE char *C_SimpleSearch; ///< Config: Pattern to search for when search doesn't contain ~'s
#ifdef USE_SMTP
-WHERE char *SmtpUrl; ///< Config: (smtp) Url of the SMTP server
+WHERE char *C_SmtpUrl; ///< Config: (smtp) Url of the SMTP server
#endif /* USE_SMTP */
-WHERE char *Spoolfile; ///< Config: Inbox
-WHERE char *StatusFormat; ///< Config: printf-like format string for the index's status line
-WHERE char *TsStatusFormat; ///< Config: printf-like format string for the terminal's status (window title)
-WHERE char *TsIconFormat; ///< Config: printf-like format string for the terminal's icon title
-WHERE char *Visual; ///< Config: Editor to use when '~v' is given in the built-in editor
-
-WHERE short ReadInc; ///< Config: Update the progress bar after this many records read (0 to disable)
-WHERE short SleepTime; ///< Config: Time to pause after certain info messages
-WHERE short Timeout; ///< Config: Time to wait for user input in menus
-WHERE short Wrap; ///< Config: Width to wrap text in the pager
-WHERE short WriteInc; ///< Config: Update the progress bar after this many records written (0 to disable)
+WHERE char *C_Spoolfile; ///< Config: Inbox
+WHERE char *C_StatusFormat; ///< Config: printf-like format string for the index's status line
+WHERE char *C_TsStatusFormat; ///< Config: printf-like format string for the terminal's status (window title)
+WHERE char *C_TsIconFormat; ///< Config: printf-like format string for the terminal's icon title
+WHERE char *C_Visual; ///< Config: Editor to use when '~v' is given in the built-in editor
+
+WHERE short C_ReadInc; ///< Config: Update the progress bar after this many records read (0 to disable)
+WHERE short C_SleepTime; ///< Config: Time to pause after certain info messages
+WHERE short C_Timeout; ///< Config: Time to wait for user input in menus
+WHERE short C_Wrap; ///< Config: Width to wrap text in the pager
+WHERE short C_WriteInc; ///< Config: Update the progress bar after this many records written (0 to disable)
#ifdef USE_SIDEBAR
-WHERE short SidebarWidth; ///< Config: (sidebar) Width of the sidebar
+WHERE short C_SidebarWidth; ///< Config: (sidebar) Width of the sidebar
#endif
#ifdef USE_IMAP
-WHERE short ImapKeepalive; ///< Config: (imap) Time to wait before polling an open IMAP connection
-WHERE short ImapPollTimeout; ///< Config: (imap) Maximum time to wait for a server response
+WHERE short C_ImapKeepalive; ///< Config: (imap) Time to wait before polling an open IMAP connection
+WHERE short C_ImapPollTimeout; ///< Config: (imap) Maximum time to wait for a server response
#endif
-WHERE char *PgpDefaultKey; ///< Config: Default key to use for PGP operations
-WHERE char *PgpSignAs; ///< Config: Use this alternative key for signing messages
-WHERE char *PgpEntryFormat; ///< Config: printf-like format string for the PGP key selection menu
+WHERE char *C_PgpDefaultKey; ///< Config: Default key to use for PGP operations
+WHERE char *C_PgpSignAs; ///< Config: Use this alternative key for signing messages
+WHERE char *C_PgpEntryFormat; ///< Config: printf-like format string for the PGP key selection menu
-WHERE char *SmimeDefaultKey; ///< Config: Default key for SMIME operations
-WHERE char *SmimeSignAs; ///< Config: Use this alternative key for signing messages
-WHERE char *SmimeEncryptWith; ///< Config: Algorithm for encryption
+WHERE char *C_SmimeDefaultKey; ///< Config: Default key for SMIME operations
+WHERE char *C_SmimeSignAs; ///< Config: Use this alternative key for signing messages
+WHERE char *C_SmimeEncryptWith; ///< Config: Algorithm for encryption
#ifdef USE_NOTMUCH
-WHERE int NmQueryWindowDuration; ///< Config: (notmuch) Time duration of the current search window
-WHERE char *NmQueryWindowCurrentSearch; ///< Config: (notmuch) Current search parameters
+WHERE int C_NmQueryWindowDuration; ///< Config: (notmuch) Time duration of the current search window
+WHERE char *C_NmQueryWindowCurrentSearch; ///< Config: (notmuch) Current search parameters
#endif
/* These variables are backing for config items */
-WHERE struct Regex *Mask; ///< Config: Only display files/dirs matching this regex in the browser
-WHERE struct Regex *QuoteRegex; ///< Config: Regex to match quoted text in a reply
+WHERE struct Regex *C_Mask; ///< Config: Only display files/dirs matching this regex in the browser
+WHERE struct Regex *C_QuoteRegex; ///< Config: Regex to match quoted text in a reply
/* Quad-options */
-WHERE unsigned char Bounce; ///< Config: Confirm before bouncing a message
-WHERE unsigned char Copy; ///< Config: Save outgoing emails to $record
-WHERE unsigned char Delete; ///< Config: Really delete messages, when the mailbox is closed
-WHERE unsigned char MimeForward; ///< Config: Forward a message as a 'message/RFC822' MIME part
-WHERE unsigned char Print; ///< Config: Confirm before printing a message
-WHERE unsigned char Quit; ///< Config: Prompt before exiting NeoMutt
+WHERE unsigned char C_Bounce; ///< Config: Confirm before bouncing a message
+WHERE unsigned char C_Copy; ///< Config: Save outgoing emails to $record
+WHERE unsigned char C_Delete; ///< Config: Really delete messages, when the mailbox is closed
+WHERE unsigned char C_MimeForward; ///< Config: Forward a message as a 'message/RFC822' MIME part
+WHERE unsigned char C_Print; ///< Config: Confirm before printing a message
+WHERE unsigned char C_Quit; ///< Config: Prompt before exiting NeoMutt
#ifdef USE_SSL
-WHERE unsigned char SslStarttls; ///< Config: (ssl) Use STARTTLS on servers advertising the capability
+WHERE unsigned char C_SslStarttls; ///< Config: (ssl) Use STARTTLS on servers advertising the capability
#endif
#ifdef USE_NNTP
-WHERE unsigned char PostModerated; ///< Config: (nntp) Allow posting to moderated newsgroups
-WHERE unsigned char FollowupToPoster; ///< Config: (nntp) Reply to the poster if 'poster' is in the 'Followup-To' header
+WHERE unsigned char C_PostModerated; ///< Config: (nntp) Allow posting to moderated newsgroups
+WHERE unsigned char C_FollowupToPoster; ///< Config: (nntp) Reply to the poster if 'poster' is in the 'Followup-To' header
#endif
-WHERE bool ArrowCursor; ///< Config: Use an arrow '->' instead of highlighting in the index
-WHERE bool AsciiChars; ///< Config: Use plain ASCII characters, when drawing email threads
-WHERE bool Askbcc; ///< Config: Ask the user for the blind-carbon-copy recipients
-WHERE bool Askcc; ///< Config: Ask the user for the carbon-copy recipients
-WHERE bool Autoedit; ///< Config: Skip the initial compose menu and edit the email
-WHERE bool AutoSubscribe; ///< Config: Automatically check if the user is subscribed to a mailing list
-WHERE bool AutoTag; ///< Config: Automatically apply actions to all tagged messages
-WHERE bool Beep; ///< Config: Make a noise when an error occurs
-WHERE bool BeepNew; ///< Config: Make a noise when new mail arrives
-WHERE bool BrailleFriendly; ///< Config: Move the cursor to the beginning of the line
-WHERE bool CheckMboxSize; ///< Config: (mbox,mmdf) Use mailbox size as an indicator of new mail
-WHERE bool Confirmappend; ///< Config: Confirm before appending emails to a mailbox
-WHERE bool Confirmcreate; ///< Config: Confirm before creating a new mailbox
-WHERE bool DeleteUntag; ///< Config: Untag messages when they are marked for deletion
-WHERE bool EditHeaders; ///< Config: Let the user edit the email headers whilst editing an email
-WHERE bool FlagSafe; ///< Config: Protect flagged messages from deletion
-WHERE bool ForwardDecode; ///< Config: Decode the message when forwarding it
-WHERE bool ForwardQuote; ///< Config: Automatically quote a forwarded message using IndentString
+WHERE bool C_ArrowCursor; ///< Config: Use an arrow '->' instead of highlighting in the index
+WHERE bool C_AsciiChars; ///< Config: Use plain ASCII characters, when drawing email threads
+WHERE bool C_Askbcc; ///< Config: Ask the user for the blind-carbon-copy recipients
+WHERE bool C_Askcc; ///< Config: Ask the user for the carbon-copy recipients
+WHERE bool C_Autoedit; ///< Config: Skip the initial compose menu and edit the email
+WHERE bool C_AutoSubscribe; ///< Config: Automatically check if the user is subscribed to a mailing list
+WHERE bool C_AutoTag; ///< Config: Automatically apply actions to all tagged messages
+WHERE bool C_Beep; ///< Config: Make a noise when an error occurs
+WHERE bool C_BeepNew; ///< Config: Make a noise when new mail arrives
+WHERE bool C_BrailleFriendly; ///< Config: Move the cursor to the beginning of the line
+WHERE bool C_CheckMboxSize; ///< Config: (mbox,mmdf) Use mailbox size as an indicator of new mail
+WHERE bool C_Confirmappend; ///< Config: Confirm before appending emails to a mailbox
+WHERE bool C_Confirmcreate; ///< Config: Confirm before creating a new mailbox
+WHERE bool C_DeleteUntag; ///< Config: Untag messages when they are marked for deletion
+WHERE bool C_EditHeaders; ///< Config: Let the user edit the email headers whilst editing an email
+WHERE bool C_FlagSafe; ///< Config: Protect flagged messages from deletion
+WHERE bool C_ForwardDecode; ///< Config: Decode the message when forwarding it
+WHERE bool C_ForwardQuote; ///< Config: Automatically quote a forwarded message using #C_IndentString
#ifdef USE_HCACHE
#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
-WHERE bool HeaderCacheCompress; ///< Config: (hcache) Enable database compression (qdbm,tokyocabinet,kyotocabinet)
+WHERE bool C_HeaderCacheCompress; ///< Config: (hcache) Enable database compression (qdbm,tokyocabinet,kyotocabinet)
#endif /* HAVE_QDBM */
#endif
-WHERE bool Header; ///< Config: Include the message headers in the reply email (Weed applies)
-WHERE bool Help; ///< Config: Display a help line with common key bindings
+WHERE bool C_Header; ///< Config: Include the message headers in the reply email (Weed applies)
+WHERE bool C_Help; ///< Config: Display a help line with common key bindings
#ifdef USE_IMAP
-WHERE bool ImapCheckSubscribed; ///< Config: (imap) When opening a mailbox, ask the server for a list of subscribed folders
-WHERE bool ImapCondStore; ///< Config: (imap) Enable the CONDSTORE extension
-WHERE bool ImapListSubscribed; ///< Config: (imap) When browsing a mailbox, only display subscribed folders
-WHERE bool ImapPassive; ///< Config: (imap) Reuse an existing IMAP connection to check for new mail
-WHERE bool ImapPeek; ///< Config: (imap) Don't mark messages as read when fetching them from the server
-WHERE bool ImapQResync; ///< Config: (imap) Enable the QRESYNC extension
+WHERE bool C_ImapCheckSubscribed; ///< Config: (imap) When opening a mailbox, ask the server for a list of subscribed folders
+WHERE bool C_ImapCondStore; ///< Config: (imap) Enable the CONDSTORE extension
+WHERE bool C_ImapListSubscribed; ///< Config: (imap) When browsing a mailbox, only display subscribed folders
+WHERE bool C_ImapPassive; ///< Config: (imap) Reuse an existing IMAP connection to check for new mail
+WHERE bool C_ImapPeek; ///< Config: (imap) Don't mark messages as read when fetching them from the server
+WHERE bool C_ImapQResync; ///< Config: (imap) Enable the QRESYNC extension
#endif
#ifdef USE_SSL
#ifndef USE_SSL_GNUTLS
-WHERE bool SslUsesystemcerts; ///< Config: (ssl) Use CA certificates in the system-wide store
-WHERE bool SslUseSslv2; ///< Config: (ssl) INSECURE: Use SSLv2 for authentication
+WHERE bool C_SslUsesystemcerts; ///< Config: (ssl) Use CA certificates in the system-wide store
+WHERE bool C_SslUseSslv2; ///< Config: (ssl) INSECURE: Use SSLv2 for authentication
#endif /* USE_SSL_GNUTLS */
-WHERE bool SslForceTls; ///< Config: (ssl) Require TLS encryption for all connections
+WHERE bool C_SslForceTls; ///< Config: (ssl) Require TLS encryption for all connections
#if defined(USE_SSL_OPENSSL) && defined(HAVE_SSL_PARTIAL_CHAIN)
-WHERE bool SslVerifyPartialChains; ///< Config: (ssl) Allow verification using partial certificate chains
+WHERE bool C_SslVerifyPartialChains; ///< Config: (ssl) Allow verification using partial certificate chains
#endif /* USE_SSL_OPENSSL */
#endif /* defined(USE_SSL) */
-WHERE bool MailCheckRecent; ///< Config: Notify the user about new mail since the last time the mailbox was opened
-WHERE bool MaildirTrash; ///< Config: Use the maildir 'trashed' flag, rather than deleting
-WHERE bool Markers; ///< Config: Display a '+' at the beginning of wrapped lines in the pager
+WHERE bool C_MailCheckRecent; ///< Config: Notify the user about new mail since the last time the mailbox was opened
+WHERE bool C_MaildirTrash; ///< Config: Use the maildir 'trashed' flag, rather than deleting
+WHERE bool C_Markers; ///< Config: Display a '+' at the beginning of wrapped lines in the pager
#if defined(USE_IMAP) || defined(USE_POP)
-WHERE bool MessageCacheClean; ///< Config: (imap/pop) Clean out obsolete entries from the message cache
+WHERE bool C_MessageCacheClean; ///< Config: (imap/pop) Clean out obsolete entries from the message cache
#endif
-WHERE bool ReadOnly; ///< Config: Open folders in read-only mode
-WHERE bool Resolve; ///< Config: Move to the next email whenever a command modifies an email
-WHERE bool ResumeDraftFiles; ///< Config: Process draft files like postponed messages
-WHERE bool SaveAddress; ///< Config: Use sender's full address as a default save folder
-WHERE bool SaveEmpty; ///< Config: (mbox,mmdf) Preserve empty mailboxes
-WHERE bool Score; ///< Config: Use message scoring
+WHERE bool C_ReadOnly; ///< Config: Open folders in read-only mode
+WHERE bool C_Resolve; ///< Config: Move to the next email whenever a command modifies an email
+WHERE bool C_ResumeDraftFiles; ///< Config: Process draft files like postponed messages
+WHERE bool C_SaveAddress; ///< Config: Use sender's full address as a default save folder
+WHERE bool C_SaveEmpty; ///< Config: (mbox,mmdf) Preserve empty mailboxes
+WHERE bool C_Score; ///< Config: Use message scoring
#ifdef USE_SIDEBAR
-WHERE bool SidebarVisible; ///< Config: (sidebar) Show the sidebar
-WHERE bool SidebarOnRight; ///< Config: (sidebar) Display the sidebar on the right
+WHERE bool C_SidebarVisible; ///< Config: (sidebar) Show the sidebar
+WHERE bool C_SidebarOnRight; ///< Config: (sidebar) Display the sidebar on the right
#endif
-WHERE bool StatusOnTop; ///< Config: Display the status bar at the top
-WHERE bool Suspend; ///< Config: Allow the user to suspend NeoMutt using '^Z'
-WHERE bool TextFlowed; ///< Config: Generate 'format=flowed' messages
-WHERE bool TsEnabled; ///< Config: Allow NeoMutt to set the terminal status line and icon
-WHERE bool UseDomain; ///< Config: Qualify local addresses using this domain
-WHERE bool WaitKey; ///< Config: Prompt to press a key after running external commands
-WHERE bool WrapSearch; ///< Config: Wrap around when the search hits the end
-WHERE bool WriteBcc; ///< Config: Write out the 'Bcc' field when preparing to send a mail
+WHERE bool C_StatusOnTop; ///< Config: Display the status bar at the top
+WHERE bool C_Suspend; ///< Config: Allow the user to suspend NeoMutt using '^Z'
+WHERE bool C_TextFlowed; ///< Config: Generate 'format=flowed' messages
+WHERE bool C_TsEnabled; ///< Config: Allow NeoMutt to set the terminal status line and icon
+WHERE bool C_UseDomain; ///< Config: Qualify local addresses using this domain
+WHERE bool C_WaitKey; ///< Config: Prompt to press a key after running external commands
+WHERE bool C_WrapSearch; ///< Config: Wrap around when the search hits the end
+WHERE bool C_WriteBcc; ///< Config: Write out the 'Bcc' field when preparing to send a mail
-WHERE bool CryptUsePka; ///< Config: Use GPGME to use PKA (lookup PGP keys using DNS)
+WHERE bool C_CryptUsePka; ///< Config: Use GPGME to use PKA (lookup PGP keys using DNS)
/* PGP options */
-WHERE bool CryptConfirmhook; ///< Config: Prompt the user to confirm keys before use
-WHERE bool CryptOpportunisticEncrypt; ///< Config: Enable encryption when the recipient's key is available
-WHERE bool CryptProtectedHeadersRead; ///< Config: Display protected headers (Memory Hole) in the pager
-WHERE bool CryptProtectedHeadersSave; ///< Config: Save the cleartext Subject with the headers
-WHERE bool CryptProtectedHeadersWrite; ///< Config: Generate protected header (Memory Hole) for signed and encrypted emails
-WHERE bool SmimeIsDefault; ///< Config: Use SMIME rather than PGP by default
-WHERE bool PgpIgnoreSubkeys; ///< Config: Only use the principal PGP key
-WHERE bool PgpLongIds; ///< Config: Display long PGP key IDs to the user
-WHERE bool PgpShowUnusable; ///< Config: Show non-usable keys in the key selection
-WHERE bool PgpAutoinline; ///< Config: Use old-style inline PGP messages (not recommended)
+WHERE bool C_CryptConfirmhook; ///< Config: Prompt the user to confirm keys before use
+WHERE bool C_CryptOpportunisticEncrypt; ///< Config: Enable encryption when the recipient's key is available
+WHERE bool C_CryptProtectedHeadersRead; ///< Config: Display protected headers (Memory Hole) in the pager
+WHERE bool C_CryptProtectedHeadersSave; ///< Config: Save the cleartext Subject with the headers
+WHERE bool C_CryptProtectedHeadersWrite; ///< Config: Generate protected header (Memory Hole) for signed and encrypted emails
+WHERE bool C_SmimeIsDefault; ///< Config: Use SMIME rather than PGP by default
+WHERE bool C_PgpIgnoreSubkeys; ///< Config: Only use the principal PGP key
+WHERE bool C_PgpLongIds; ///< Config: Display long PGP key IDs to the user
+WHERE bool C_PgpShowUnusable; ///< Config: Show non-usable keys in the key selection
+WHERE bool C_PgpAutoinline; ///< Config: Use old-style inline PGP messages (not recommended)
/* news options */
#ifdef USE_NNTP
-WHERE bool SaveUnsubscribed; ///< Config: (nntp) Save a list of unsubscribed newsgroups to the 'newsrc'
-WHERE bool XCommentTo; ///< Config: (nntp) Add 'X-Comment-To' header that contains article author
+WHERE bool C_SaveUnsubscribed; ///< Config: (nntp) Save a list of unsubscribed newsgroups to the 'newsrc'
+WHERE bool C_XCommentTo; ///< Config: (nntp) Add 'X-Comment-To' header that contains article author
#endif
#ifdef USE_NOTMUCH
-WHERE bool VirtualSpoolfile; ///< Config: (notmuch) Use the first virtual mailbox as a spool file
+WHERE bool C_VirtualSpoolfile; ///< Config: (notmuch) Use the first virtual mailbox as a spool file
#endif
#endif /* MUTT_GLOBALS_H */
#endif
/* These Config Variables are only used in handler.c */
-bool HonorDisposition; ///< Config: Don't display MIME parts inline if they have a disposition of 'attachment'
-bool ImplicitAutoview; ///< Config: Display MIME attachments inline if a 'copiousoutput' mailcap entry exists
-bool IncludeOnlyfirst; ///< Config: Only include the first attachment when replying
-char *PreferredLanguages; ///< Config: Preferred languages for multilingual MIME
-bool ReflowText; ///< Config: Reformat paragraphs of 'format=flowed' text
-char *ShowMultipartAlternative; ///< Config: How to display 'multipart/alternative' MIME parts
+bool C_HonorDisposition; ///< Config: Don't display MIME parts inline if they have a disposition of 'attachment'
+bool C_ImplicitAutoview; ///< Config: Display MIME attachments inline if a 'copiousoutput' mailcap entry exists
+bool C_IncludeOnlyfirst; ///< Config: Only include the first attachment when replying
+char *C_PreferredLanguages; ///< Config: Preferred languages for multilingual MIME
+bool C_ReflowText; ///< Config: Reformat paragraphs of 'format=flowed' text
+char *C_ShowMultipartAlternative; ///< Config: How to display 'multipart/alternative' MIME parts
#define BUFI_SIZE 1000
#define BUFO_SIZE 2000
snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype);
- if (ImplicitAutoview)
+ if (C_ImplicitAutoview)
{
/* $implicit_autoview is essentially the same as "auto_view *" */
is_av = true;
while ((buf = mutt_file_read_line(buf, &sz, s->fp_in, NULL, 0)))
{
- if ((mutt_str_strcmp(buf, "-- ") != 0) && TextFlowed)
+ if ((mutt_str_strcmp(buf, "-- ") != 0) && C_TextFlowed)
{
l = mutt_str_strlen(buf);
while (l > 0 && buf[l - 1] == ' ')
{
mutt_copy_hdr(s->fp_in, s->fp_out, off_start, b->parts->offset,
(((s->flags & MUTT_WEED) ||
- ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && Weed)) ?
+ ((s->flags & (MUTT_DISPLAY | MUTT_PRINTING)) && C_Weed)) ?
(CH_WEED | CH_REORDER) :
0) |
(s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM |
}
mutt_copy_hdr(s->fp_in, s->fp_out, ftello(s->fp_in), b->parts->offset,
- (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
+ (C_Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL);
}
}
else if (expiration && expire < time(NULL))
state_attach_puts(strbuf, s);
mutt_copy_hdr(s->fp_in, s->fp_out, ftello(s->fp_in), b->parts->offset,
- (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
+ (C_Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
}
}
else
state_attach_puts(strbuf, s);
mutt_copy_hdr(s->fp_in, s->fp_out, ftello(s->fp_in), b->parts->offset,
- (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
+ (C_Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
}
}
if (choice)
{
- if (s->flags & MUTT_DISPLAY && !Weed)
+ if (s->flags & MUTT_DISPLAY && !C_Weed)
{
fseeko(s->fp_in, choice->hdr_offset, SEEK_SET);
mutt_file_copy_bytes(s->fp_in, s->fp_out, choice->offset - choice->hdr_offset);
}
- if (mutt_str_strcmp("info", ShowMultipartAlternative) == 0)
+ if (mutt_str_strcmp("info", C_ShowMultipartAlternative) == 0)
{
print_part_line(s, choice, 0);
}
mutt_body_handler(choice, s);
- if (mutt_str_strcmp("info", ShowMultipartAlternative) == 0)
+ if (mutt_str_strcmp("info", C_ShowMultipartAlternative) == 0)
{
if (a->parts)
b = a->parts;
b = a;
char *preferred_languages = NULL;
- if (PreferredLanguages)
+ if (C_PreferredLanguages)
{
mutt_debug(LL_DEBUG2, "RFC8255 >> preferred_languages set in config to '%s'\n",
- PreferredLanguages);
- preferred_languages = mutt_str_strdup(PreferredLanguages);
+ C_PreferredLanguages);
+ preferred_languages = mutt_str_strdup(C_PreferredLanguages);
lang = strtok(preferred_languages, ",");
}
else
state_printf(s, _("[-- Attachment #%d --]\n"), count);
print_part_line(s, p, 0);
- if (!Weed)
+ if (!C_Weed)
{
fseeko(s->fp_in, p->hdr_offset, SEEK_SET);
mutt_file_copy_bytes(s->fp_in, s->fp_out, p->offset - p->hdr_offset);
TYPE(p), NONULL(p->subtype));
}
- if ((s->flags & MUTT_REPLYING) && IncludeOnlyfirst && (s->flags & MUTT_FIRSTDONE))
+ if ((s->flags & MUTT_REPLYING) && C_IncludeOnlyfirst && (s->flags & MUTT_FIRSTDONE))
{
break;
}
*/
if (((WithCrypto & APPLICATION_PGP) != 0) && mutt_is_application_pgp(b))
handler = crypt_pgp_application_handler;
- else if (ReflowText &&
+ else if (C_ReflowText &&
(mutt_str_strcasecmp("flowed",
mutt_param_get(&b->parameter, "format")) == 0))
{
}
else if (b->type == TYPE_MULTIPART)
{
- if ((mutt_str_strcmp("inline", ShowMultipartAlternative) != 0) &&
+ if ((mutt_str_strcmp("inline", C_ShowMultipartAlternative) != 0) &&
(mutt_str_strcasecmp("alternative", b->subtype) == 0))
{
handler = alternative_handler;
}
- else if ((mutt_str_strcmp("inline", ShowMultipartAlternative) != 0) &&
+ else if ((mutt_str_strcmp("inline", C_ShowMultipartAlternative) != 0) &&
(mutt_str_strcasecmp("multilingual", b->subtype) == 0))
{
handler = multilingual_handler;
/* only respect disposition == attachment if we're not
displaying from the attachment menu (i.e. pager) */
- if ((!HonorDisposition || ((b->disposition != DISP_ATTACH) || OptViewAttach)) &&
+ if ((!C_HonorDisposition || ((b->disposition != DISP_ATTACH) || OptViewAttach)) &&
(plaintext || handler))
{
rc = run_decode_and_handler(b, s, handler, plaintext);
/* print hint to use attachment menu for disposition == attachment
if we're not already being called from there */
else if ((s->flags & MUTT_DISPLAY) || ((b->disposition == DISP_ATTACH) && !OptViewAttach &&
- HonorDisposition && (plaintext || handler)))
+ C_HonorDisposition && (plaintext || handler)))
{
const char *str = NULL;
char keystroke[SHORT_STRING];
if (km_expand_key(keystroke, sizeof(keystroke),
km_find_func(MENU_PAGER, OP_VIEW_ATTACHMENTS)))
{
- if (HonorDisposition && b->disposition == DISP_ATTACH)
+ if (C_HonorDisposition && b->disposition == DISP_ATTACH)
{
/* L10N: Caution: Arguments %1$s and %2$s are also defined but should
not be used in this translation!
}
else
{
- if (HonorDisposition && (b->disposition == DISP_ATTACH))
+ if (C_HonorDisposition && (b->disposition == DISP_ATTACH))
{
str = _("[-- This is an attachment (need 'view-attachments' bound to "
"key) --]\n");
}
else
{
- if (HonorDisposition && (b->disposition == DISP_ATTACH))
+ if (C_HonorDisposition && (b->disposition == DISP_ATTACH))
str = _("[-- This is an attachment --]\n");
else
{
if (istext && s->flags & MUTT_CHARCONV)
{
char *charset = mutt_param_get(&b->parameter, "charset");
- if (!charset && AssumedCharset && *AssumedCharset)
+ if (!charset && C_AssumedCharset && *C_AssumedCharset)
charset = mutt_ch_get_default_charset();
- if (charset && Charset)
- cd = mutt_ch_iconv_open(Charset, charset, MUTT_ICONV_HOOK_FROM);
+ if (charset && C_Charset)
+ cd = mutt_ch_iconv_open(C_Charset, charset, MUTT_ICONV_HOOK_FROM);
}
else if (istext && b->charset)
- cd = mutt_ch_iconv_open(Charset, b->charset, MUTT_ICONV_HOOK_FROM);
+ cd = mutt_ch_iconv_open(C_Charset, b->charset, MUTT_ICONV_HOOK_FROM);
fseeko(s->fp_in, b->offset, SEEK_SET);
switch (b->encoding)
struct State;
/* These Config Variables are only used in handler.c */
-extern bool HonorDisposition;
-extern bool ImplicitAutoview;
-extern bool IncludeOnlyfirst;
-extern char *PreferredLanguages;
-extern bool ReflowText;
-extern char *ShowMultipartAlternative;
+extern bool C_HonorDisposition;
+extern bool C_ImplicitAutoview;
+extern bool C_IncludeOnlyfirst;
+extern char *C_PreferredLanguages;
+extern bool C_ReflowText;
+extern char *C_ShowMultipartAlternative;
int mutt_body_handler(struct Body *b, struct State *s);
bool mutt_can_decode(struct Body *a);
struct HcacheDbCtx *ctx = mutt_mem_malloc(sizeof(struct HcacheDbCtx));
- if (mutt_str_atoi(HeaderCachePagesize, &pagesize) < 0 || pagesize <= 0)
+ if (mutt_str_atoi(C_HeaderCachePagesize, &pagesize) < 0 || pagesize <= 0)
pagesize = 16384;
snprintf(ctx->lockfile, sizeof(ctx->lockfile), "%s-lock-hack", path);
{
int pagesize;
- if (mutt_str_atoi(HeaderCachePagesize, &pagesize) < 0 || pagesize <= 0)
+ if (mutt_str_atoi(C_HeaderCachePagesize, &pagesize) < 0 || pagesize <= 0)
pagesize = 16384;
GDBM_FILE db = gdbm_open((char *) path, pagesize, GDBM_WRCREAT, 00600, NULL);
#include "hcache/hcversion.h"
/* These Config Variables are only used in hcache/hcache.c */
-char *HeaderCacheBackend; ///< Config: (hcache) Header cache backend to use
+char *C_HeaderCacheBackend; ///< Config: (hcache) Header cache backend to use
static unsigned int hcachever = 0x0;
HCACHE_BACKEND(tokyocabinet)
#undef HCACHE_BACKEND
-#define hcache_get_ops() hcache_get_backend_ops(HeaderCacheBackend)
+#define hcache_get_ops() hcache_get_backend_ops(C_HeaderCacheBackend)
/**
* hcache_ops - Backend implementations
};
/* These Config Variables are only used in hcache/hcache.c */
-extern char *HeaderCacheBackend;
+extern char *C_HeaderCacheBackend;
/**
* mutt_hcache_open - open the connection to the header cache
int printfresult;
printfresult = snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex",
- path, HeaderCacheCompress ? "lc" : "l");
+ path, C_HeaderCacheCompress ? "lc" : "l");
if ((printfresult < 0) || (printfresult >= sizeof(kcdbpath)))
{
return NULL;
{
int flags = VL_OWRITER | VL_OCREAT;
- if (HeaderCacheCompress)
+ if (C_HeaderCacheCompress)
flags |= VL_OZCOMP;
return vlopen(path, flags, VL_CMPLEX);
if (convert && !mutt_str_is_ascii(c, size))
{
p = mutt_str_substr_dup(c, c + size);
- if (mutt_ch_convert_string(&p, Charset, "utf-8", 0) == 0)
+ if (mutt_ch_convert_string(&p, C_Charset, "utf-8", 0) == 0)
{
size = mutt_str_strlen(p) + 1;
}
if (convert && !mutt_str_is_ascii(*c, size))
{
char *tmp = mutt_str_strdup(*c);
- if (mutt_ch_convert_string(&tmp, "utf-8", Charset, 0) == 0)
+ if (mutt_ch_convert_string(&tmp, "utf-8", C_Charset, 0) == 0)
{
FREE(c);
*c = tmp;
serial_restore_char(&env->list_post, d, off, convert);
- if (AutoSubscribe)
+ if (C_AutoSubscribe)
mutt_auto_subscribe(env->list_post);
serial_restore_char(&env->subject, d, off, convert);
TCBDB *db = tcbdbnew();
if (!db)
return NULL;
- if (HeaderCacheCompress)
+ if (C_HeaderCacheCompress)
tcbdbtune(db, 0, 0, 0, -1, -1, BDBTDEFLATE);
if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT))
return db;
#include "sort.h"
/* These Config Variables are only used in hdrline.c */
-struct MbTable *CryptChars; ///< Config: User-configurable crypto flags: signed, encrypted etc.
-struct MbTable *FlagChars; ///< Config: User-configurable index flags: tagged, new, etc
-struct MbTable *FromChars; ///< Config: User-configurable index flags: to address, cc address, etc
-struct MbTable *ToChars; ///< Config: Indicator characters for the 'To' field in the index
+struct MbTable *C_CryptChars; ///< Config: User-configurable crypto flags: signed, encrypted etc.
+struct MbTable *C_FlagChars; ///< Config: User-configurable index flags: tagged, new, etc
+struct MbTable *C_FromChars; ///< Config: User-configurable index flags: to address, cc address, etc
+struct MbTable *C_ToChars; ///< Config: Indicator characters for the 'To' field in the index
/**
- * enum FlagChars - Index into the FlagChars variable ($flag_chars)
+ * enum FlagChars - Index into the #C_FlagChars variable ($flag_chars)
*/
enum FlagChars
{
};
/**
- * enum CryptChars - Index into the CryptChars variable ($crypt_chars)
+ * enum CryptChars - Index into the #C_CryptChars variable ($crypt_chars)
*/
enum CryptChars
{
[DISP_FROM] = "", [DISP_PLAIN] = "",
};
- if (!FromChars || !FromChars->chars || (FromChars->len == 0))
+ if (!C_FromChars || !C_FromChars->chars || (C_FromChars->len == 0))
return long_prefixes[disp];
- const char *pchar = get_nth_wchar(FromChars, disp);
+ const char *pchar = get_nth_wchar(C_FromChars, disp);
if (mutt_str_strlen(pchar) == 0)
return "";
const char *wch = NULL;
int i;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
- int threads = ((Sort & SORT_MASK) == SORT_THREADS);
+ int threads = ((C_Sort & SORT_MASK) == SORT_THREADS);
int is_index = (flags & MUTT_FORMAT_INDEX);
size_t colorlen;
p = buf;
- cp = (op == 'd' || op == 'D') ? (NONULL(DateFormat)) : src;
+ cp = (op == 'd' || op == 'D') ? (NONULL(C_DateFormat)) : src;
bool do_locales;
if (*cp == '!')
{
if (!optional)
{
make_from_addr(e->env, tmp, sizeof(tmp), true);
- if (!SaveAddress && (p = strpbrk(tmp, "%@")))
+ if (!C_SaveAddress && (p = strpbrk(tmp, "%@")))
*p = 0;
mutt_format_s(buf, buflen, prec, tmp);
}
case 'S':
if (e->deleted)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED);
else if (e->attach_del)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED_ATTACH);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED_ATTACH);
else if (e->tagged)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_TAGGED);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_TAGGED);
else if (e->flagged)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_IMPORTANT);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_IMPORTANT);
else if (e->replied)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_REPLIED);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
else if (e->read && (ctx && ctx->msgnotreadyet != e->msgno))
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_SEMPTY);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_SEMPTY);
else if (e->old)
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_OLD);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD);
else
- wch = get_nth_wchar(FlagChars, FLAG_CHAR_NEW);
+ wch = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW);
snprintf(tmp, sizeof(tmp), "%s", wch);
colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_FLAGS);
case 'T':
snprintf(fmt, sizeof(fmt), "%%%ss", prec);
snprintf(buf, buflen, fmt,
- (ToChars && ((i = user_is_recipient(e))) < ToChars->len) ?
- ToChars->chars[i] :
+ (C_ToChars && ((i = user_is_recipient(e))) < C_ToChars->len) ?
+ C_ToChars->chars[i] :
" ");
break;
{
const char *ch = NULL;
if (e->deleted)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED);
else if (e->attach_del)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED_ATTACH);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED_ATTACH);
else if (threads && thread_is_new(ctx, e))
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_NEW_THREAD);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW_THREAD);
else if (threads && thread_is_old(ctx, e))
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_OLD_THREAD);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD_THREAD);
else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
{
if (e->replied)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_REPLIED);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
else
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_ZEMPTY);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_ZEMPTY);
}
else
{
if (e->old)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_OLD);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD);
else
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_NEW);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW);
}
snprintf(tmp, sizeof(tmp), "%s", ch);
{
const char *ch = NULL;
if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
- ch = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_GOOD_SIGN);
+ ch = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_GOOD_SIGN);
else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
- ch = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_ENCRYPTED);
+ ch = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_ENCRYPTED);
else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
- ch = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_SIGNED);
+ ch = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_SIGNED);
else if (((WithCrypto & APPLICATION_PGP) != 0) && ((e->security & PGP_KEY) == PGP_KEY))
{
- ch = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_CONTAINS_KEY);
+ ch = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_CONTAINS_KEY);
}
else
- ch = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_NO_CRYPTO);
+ ch = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_NO_CRYPTO);
snprintf(tmp, sizeof(tmp), "%s", ch);
src++;
{
const char *ch = NULL;
if (e->tagged)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_TAGGED);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_TAGGED);
else if (e->flagged)
- ch = get_nth_wchar(FlagChars, FLAG_CHAR_IMPORTANT);
+ ch = get_nth_wchar(C_FlagChars, FLAG_CHAR_IMPORTANT);
else
- ch = get_nth_wchar(ToChars, user_is_recipient(e));
+ ch = get_nth_wchar(C_ToChars, user_is_recipient(e));
snprintf(tmp, sizeof(tmp), "%s", ch);
src++;
/* New/Old for threads; replied; New/Old for messages */
const char *first = NULL;
if (threads && thread_is_new(ctx, e))
- first = get_nth_wchar(FlagChars, FLAG_CHAR_NEW_THREAD);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW_THREAD);
else if (threads && thread_is_old(ctx, e))
- first = get_nth_wchar(FlagChars, FLAG_CHAR_OLD_THREAD);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD_THREAD);
else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
{
if (e->replied)
- first = get_nth_wchar(FlagChars, FLAG_CHAR_REPLIED);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_REPLIED);
else
- first = get_nth_wchar(FlagChars, FLAG_CHAR_ZEMPTY);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_ZEMPTY);
}
else
{
if (e->old)
- first = get_nth_wchar(FlagChars, FLAG_CHAR_OLD);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_OLD);
else
- first = get_nth_wchar(FlagChars, FLAG_CHAR_NEW);
+ first = get_nth_wchar(C_FlagChars, FLAG_CHAR_NEW);
}
/* Marked for deletion; deleted attachments; crypto */
const char *second = NULL;
if (e->deleted)
- second = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED);
+ second = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED);
else if (e->attach_del)
- second = get_nth_wchar(FlagChars, FLAG_CHAR_DELETED_ATTACH);
+ second = get_nth_wchar(C_FlagChars, FLAG_CHAR_DELETED_ATTACH);
else if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
- second = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_GOOD_SIGN);
+ second = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_GOOD_SIGN);
else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
- second = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_ENCRYPTED);
+ second = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_ENCRYPTED);
else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
- second = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_SIGNED);
+ second = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_SIGNED);
else if (((WithCrypto & APPLICATION_PGP) != 0) && (e->security & PGP_KEY))
- second = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_CONTAINS_KEY);
+ second = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_CONTAINS_KEY);
else
- second = get_nth_wchar(CryptChars, FLAG_CHAR_CRYPT_NO_CRYPTO);
+ second = get_nth_wchar(C_CryptChars, FLAG_CHAR_CRYPT_NO_CRYPTO);
/* Tagged, flagged and recipient flag */
const char *third = NULL;
if (e->tagged)
- third = get_nth_wchar(FlagChars, FLAG_CHAR_TAGGED);
+ third = get_nth_wchar(C_FlagChars, FLAG_CHAR_TAGGED);
else if (e->flagged)
- third = get_nth_wchar(FlagChars, FLAG_CHAR_IMPORTANT);
+ third = get_nth_wchar(C_FlagChars, FLAG_CHAR_IMPORTANT);
else
- third = get_nth_wchar(ToChars, user_is_recipient(e));
+ third = get_nth_wchar(C_ToChars, user_is_recipient(e));
snprintf(tmp, sizeof(tmp), "%s%s%s", first, second, third);
}
struct Email;
/* These Config Variables are only used in hdrline.c */
-extern struct MbTable *CryptChars;
-extern struct MbTable *FlagChars;
-extern struct MbTable *FromChars;
-extern struct MbTable *ToChars;
+extern struct MbTable *C_CryptChars;
+extern struct MbTable *C_FlagChars;
+extern struct MbTable *C_FromChars;
+extern struct MbTable *C_ToChars;
/**
* struct HdrFormatInfo - Data passed to index_format_str()
if (ismacro > 0)
{
- if (mutt_str_strcmp(Pager, "builtin") == 0)
+ if (mutt_str_strcmp(C_Pager, "builtin") == 0)
fputs("_\010", f);
fputs("M ", f);
col += 2;
if (*t3)
{
- if (mutt_str_strcmp(Pager, "builtin") != 0)
+ if (mutt_str_strcmp(C_Pager, "builtin") != 0)
{
fputc('\n', f);
n = 0;
else
{
n += col - MuttIndexWindow->cols;
- if (Markers)
+ if (C_Markers)
n++;
}
col = pad(f, n, col_b);
struct Context;
/* These Config Variables are only used in hook.c */
-char *DefaultHook; ///< Config: Pattern to use for hooks that only have a simple regex
-bool ForceName; ///< Config: Save outgoing mail in a folder of their name
-bool SaveName; ///< Config: Save outgoing message to mailbox of recipient's name if it exists
+char *C_DefaultHook; ///< Config: Pattern to use for hooks that only have a simple regex
+bool C_ForceName; ///< Config: Save outgoing mail in a folder of their name
+bool C_SaveName; ///< Config: Save outgoing message to mailbox of recipient's name if it exists
/**
* struct Hook - A list of user hooks
}
}
#endif
- else if (DefaultHook && (~data & MUTT_GLOBAL_HOOK) &&
+ else if (C_DefaultHook && (~data & MUTT_GLOBAL_HOOK) &&
!(data & (MUTT_CHARSET_HOOK | MUTT_ICONV_HOOK | MUTT_ACCOUNT_HOOK)) &&
(!WithCrypto || !(data & MUTT_CRYPT_HOOK)))
{
* patterns. If given a simple regex, we expand $default_hook.
*/
mutt_str_strfcpy(tmp, pattern.data, sizeof(tmp));
- mutt_check_simple(tmp, sizeof(tmp), DefaultHook);
+ mutt_check_simple(tmp, sizeof(tmp), C_DefaultHook);
FREE(&pattern.data);
mutt_buffer_init(&pattern);
pattern.data = mutt_str_strdup(tmp);
if (addr_hook(path, pathlen, MUTT_FCC_HOOK, NULL, e) != 0)
{
struct Envelope *env = e->env;
- if ((SaveName || ForceName) && (env->to || env->cc || env->bcc))
+ if ((C_SaveName || C_ForceName) && (env->to || env->cc || env->bcc))
{
struct Address *addr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
char buf[PATH_MAX];
mutt_safe_path(buf, sizeof(buf), addr);
- mutt_path_concat(path, NONULL(Folder), buf, pathlen);
- if (!ForceName && mx_access(path, W_OK) != 0)
- mutt_str_strfcpy(path, Record, pathlen);
+ mutt_path_concat(path, NONULL(C_Folder), buf, pathlen);
+ if (!C_ForceName && mx_access(path, W_OK) != 0)
+ mutt_str_strfcpy(path, C_Record, pathlen);
}
else
- mutt_str_strfcpy(path, Record, pathlen);
+ mutt_str_strfcpy(path, C_Record, pathlen);
}
mutt_pretty_mailbox(path, pathlen);
}
struct Mailbox;
/* These Config Variables are only used in hook.c */
-extern char *DefaultHook;
-extern bool ForceName;
-extern bool SaveName;
+extern char *C_DefaultHook;
+extern bool C_ForceName;
+extern bool C_SaveName;
/* types for mutt_parse_hook() */
#define MUTT_FOLDER_HOOK (1 << 0) ///< folder-hook: when entering a mailbox
#include "auth.h"
/* These Config Variables are only used in imap/auth.c */
-char *ImapAuthenticators; ///< Config: (imap) List of allowed IMAP authentication methods
+char *C_ImapAuthenticators; ///< Config: (imap) List of allowed IMAP authentication methods
/**
* imap_authenticators - Accepted authentication methods
{
int r = IMAP_AUTH_FAILURE;
- if (ImapAuthenticators && *ImapAuthenticators)
+ if (C_ImapAuthenticators && *C_ImapAuthenticators)
{
mutt_debug(LL_DEBUG2, "Trying user-defined imap_authenticators.\n");
/* Try user-specified list of authentication methods */
- char *methods = mutt_str_strdup(ImapAuthenticators);
+ char *methods = mutt_str_strdup(C_ImapAuthenticators);
char *delim = NULL;
for (const char *method = methods; method; method = delim)
retval = IMAP_AUTH_UNAVAIL;
goto cleanup;
}
- else if (DebugLevel >= 2)
+ else if (C_DebugLevel >= 2)
{
gss_display_name(&min_stat, target_name, &request_buf, &mech_name);
mutt_debug(LL_DEBUG2, "Using service name [%s]\n", (char *) request_buf.value);
/* don't print the password unless we're at the ungodly debugging level
* of 5 or higher */
- if (DebugLevel < IMAP_LOG_PASS)
+ if (C_DebugLevel < IMAP_LOG_PASS)
mutt_debug(LL_DEBUG2, "Sending LOGIN command for %s...\n",
adata->conn->account.user);
/* apply filemask filter. This should really be done at menu setup rather
* than at scan, since it's so expensive to scan. But that's big changes
* to browser.c */
- if (Mask && Mask->regex && !((regexec(Mask->regex, relpath, 0, NULL, 0) == 0) ^ Mask->not))
+ if (C_Mask && C_Mask->regex &&
+ !((regexec(C_Mask->regex, relpath, 0, NULL, 0) == 0) ^ C_Mask->not))
return;
imap_qualify_path(tmp, sizeof(tmp), &conn_account, folder);
return -1;
}
- save_lsub = ImapCheckSubscribed;
- ImapCheckSubscribed = false;
- mutt_str_strfcpy(list_cmd, ImapListSubscribed ? "LSUB" : "LIST", sizeof(list_cmd));
+ save_lsub = C_ImapCheckSubscribed;
+ C_ImapCheckSubscribed = false;
+ mutt_str_strfcpy(list_cmd, C_ImapListSubscribed ? "LSUB" : "LIST", sizeof(list_cmd));
// Pick first mailbox connected to the same server
struct MailboxNode *np = NULL;
mutt_clear_error();
if (save_lsub)
- ImapCheckSubscribed = true;
+ C_ImapCheckSubscribed = true;
return 0;
fail:
if (save_lsub)
- ImapCheckSubscribed = true;
+ C_ImapCheckSubscribed = true;
return -1;
}
#include "mx.h"
/* These Config Variables are only used in imap/command.c */
-bool ImapServernoise; ///< Config: (imap) Display server warnings as error messages
+bool C_ImapServernoise; ///< Config: (imap) Display server warnings as error messages
#define IMAP_CMD_BUFSIZE 512
return;
}
- if (!ImapCheckSubscribed)
+ if (!C_ImapCheckSubscribed)
return;
adata->cmdresult = &list;
imap_quote_string(errstr, sizeof(errstr), list.name, true);
url.path = errstr + 1;
url.path[strlen(url.path) - 1] = '\0';
- if (mutt_str_strcmp(url.user, ImapUser) == 0)
+ if (mutt_str_strcmp(url.user, C_ImapUser) == 0)
url.user = NULL;
url_tostring(&url, buf + 11, sizeof(buf) - 11, 0);
mutt_str_strcat(buf, sizeof(buf), "\"");
mutt_debug(LL_DEBUG3, "Found %s in mailbox list (OV: %u ON: %u U: %d)\n",
mailbox, olduv, oldun, mdata->unseen);
- if (MailCheckRecent)
+ if (C_MailCheckRecent)
{
if (olduv && olduv == mdata->uid_validity)
{
return -1;
}
- else if (ImapServernoise && mutt_str_startswith(s, "NO", CASE_IGNORE))
+ else if (C_ImapServernoise && mutt_str_startswith(s, "NO", CASE_IGNORE))
{
mutt_debug(LL_DEBUG2, "Handling untagged NO\n");
if (flags & IMAP_CMD_QUEUE)
return IMAP_EXEC_SUCCESS;
- if ((flags & IMAP_CMD_POLL) && (ImapPollTimeout > 0) &&
- (mutt_socket_poll(adata->conn, ImapPollTimeout)) == 0)
+ if ((flags & IMAP_CMD_POLL) && (C_ImapPollTimeout > 0) &&
+ (mutt_socket_poll(adata->conn, C_ImapPollTimeout)) == 0)
{
mutt_error(_("Connection to %s timed out"), adata->conn->account.host);
cmd_handle_fatal(adata);
return -1;
}
- if ((ImapPollTimeout > 0) && (mutt_socket_poll(adata->conn, ImapPollTimeout)) == 0)
+ if ((C_ImapPollTimeout > 0) && (mutt_socket_poll(adata->conn, C_ImapPollTimeout)) == 0)
{
mutt_error(_("Connection to %s timed out"), adata->conn->account.host);
cmd_handle_fatal(adata);
#endif
/* These Config Variables are only used in imap/imap.c */
-bool ImapIdle; ///< Config: (imap) Use the IMAP IDLE extension to check for new mail
+bool C_ImapIdle; ///< Config: (imap) Use the IMAP IDLE extension to check for new mail
/**
* check_capabilities - Make sure we can log in to this server
adata->status = IMAP_BYE;
imap_cmd_start(adata, "LOGOUT");
- if (ImapPollTimeout <= 0 || mutt_socket_poll(adata->conn, ImapPollTimeout) != 0)
+ if (C_ImapPollTimeout <= 0 || mutt_socket_poll(adata->conn, C_ImapPollTimeout) != 0)
{
while (imap_cmd_step(adata) == IMAP_CMD_CONTINUE)
;
bool r = false;
struct Buffer *buf = NULL;
- if (DebugLevel >= IMAP_LOG_LTRL)
+ if (C_DebugLevel >= IMAP_LOG_LTRL)
buf = mutt_buffer_alloc(bytes + 10);
mutt_debug(LL_DEBUG2, "reading %ld bytes\n", bytes);
if (pbar && !(pos % 1024))
mutt_progress_update(pbar, pos, -1);
- if (DebugLevel >= IMAP_LOG_LTRL)
+ if (C_DebugLevel >= IMAP_LOG_LTRL)
mutt_buffer_addch(buf, c);
}
- if (DebugLevel >= IMAP_LOG_LTRL)
+ if (C_DebugLevel >= IMAP_LOG_LTRL)
{
mutt_debug(IMAP_LOG_LTRL, "\n%s", buf->data);
mutt_buffer_free(&buf);
}
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
- if (!adata->conn->ssf && (SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS)))
+ if (!adata->conn->ssf && (C_SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS)))
{
int rc;
- if (SslForceTls)
+ if (C_SslForceTls)
rc = MUTT_YES;
- else if ((rc = query_quadoption(SslStarttls,
+ else if ((rc = query_quadoption(C_SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
{
goto err_close_conn;
}
}
- if (SslForceTls && !adata->conn->ssf)
+ if (C_SslForceTls && !adata->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
/* We make a copy of the headers just in case resorting doesn't give
exactly the original order (duplicate messages?), because other parts of
the ctx are tied to the header order. This may be overkill. */
- oldsort = Sort;
- if (Sort != SORT_ORDER)
+ oldsort = C_Sort;
+ if (C_Sort != SORT_ORDER)
{
emails = m->emails;
m->emails = mutt_mem_malloc(m->msg_count * sizeof(struct Email *));
memcpy(m->emails, emails, m->msg_count * sizeof(struct Email *));
- Sort = SORT_ORDER;
+ C_Sort = SORT_ORDER;
qsort(m->emails, m->msg_count, sizeof(struct Email *), compare_uid);
}
out:
mutt_buffer_free(&cmd);
- if (oldsort != Sort)
+ if (oldsort != C_Sort)
{
- Sort = oldsort;
+ C_Sort = oldsort;
FREE(&m->emails);
m->emails = emails;
}
int result = 0;
/* try IDLE first, unless force is set */
- if (!force && ImapIdle && (adata->capabilities & IMAP_CAP_IDLE) &&
- (adata->state != IMAP_IDLE || time(NULL) >= adata->lastread + ImapKeepalive))
+ if (!force && C_ImapIdle && (adata->capabilities & IMAP_CAP_IDLE) &&
+ (adata->state != IMAP_IDLE || time(NULL) >= adata->lastread + C_ImapKeepalive))
{
if (imap_cmd_idle(adata) < 0)
return -1;
}
}
- if ((force || (adata->state != IMAP_IDLE && time(NULL) >= adata->lastread + Timeout)) &&
+ if ((force || (adata->state != IMAP_IDLE && time(NULL) >= adata->lastread + C_Timeout)) &&
imap_exec(adata, "NOOP", IMAP_CMD_POLL) != IMAP_EXEC_SUCCESS)
{
return -1;
if (imap_adata_find(path, &adata, &mdata) < 0)
return -1;
- if (ImapCheckSubscribed)
+ if (C_ImapCheckSubscribed)
{
mutt_buffer_init(&token);
mutt_buffer_init(&err);
/* fire off command */
snprintf(tmp, sizeof(tmp), "%s \"\" \"%s%%\"",
- ImapListSubscribed ? "LSUB" : "LIST", mdata->real_name);
+ C_ImapListSubscribed ? "LSUB" : "LIST", mdata->real_name);
imap_cmd_start(adata, tmp);
break;
mutt_debug(LL_DEBUG3, "server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), dest_mdata->name);
- if (Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (C_Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
#endif
/* presort here to avoid doing 10 resorts in imap_exec_msgset */
- oldsort = Sort;
- if (Sort != SORT_ORDER)
+ oldsort = C_Sort;
+ if (C_Sort != SORT_ORDER)
{
emails = m->emails;
m->emails = mutt_mem_malloc(m->msg_count * sizeof(struct Email *));
memcpy(m->emails, emails, m->msg_count * sizeof(struct Email *));
- Sort = SORT_ORDER;
+ C_Sort = SORT_ORDER;
qsort(m->emails, m->msg_count, sizeof(struct Email *), mutt_get_sort_func(SORT_ORDER));
}
if (rc >= 0)
rc |= sync_helper(m, MUTT_ACL_WRITE, MUTT_REPLIED, "\\Answered");
- if (oldsort != Sort)
+ if (oldsort != C_Sort)
{
- Sort = oldsort;
+ C_Sort = oldsort;
FREE(&m->emails);
m->emails = emails;
}
adata->state = IMAP_AUTHENTICATED;
}
- if (MessageCacheClean)
+ if (C_MessageCacheClean)
imap_cache_clean(m);
return 0;
if (adata->capabilities & IMAP_CAP_QRESYNC)
{
adata->capabilities |= IMAP_CAP_CONDSTORE;
- if (ImapQResync)
+ if (C_ImapQResync)
imap_exec(adata, "ENABLE QRESYNC", IMAP_CMD_QUEUE);
}
}
/* pipeline the postponed count if possible */
- struct Mailbox *m_postponed = mx_mbox_find2(Postponed);
+ struct Mailbox *m_postponed = mx_mbox_find2(C_Postponed);
struct ImapAccountData *postponed_adata = imap_adata_get(m_postponed);
if (postponed_adata &&
mutt_account_match(&postponed_adata->conn_account, &adata->conn_account))
imap_mailbox_status(m_postponed, true);
- if (ImapCheckSubscribed)
+ if (C_ImapCheckSubscribed)
imap_exec(adata, "LSUB \"\" \"*\"", IMAP_CMD_QUEUE);
#ifdef USE_HCACHE
- if ((adata->capabilities & IMAP_CAP_CONDSTORE) && ImapCondStore)
+ if ((adata->capabilities & IMAP_CAP_CONDSTORE) && C_ImapCondStore)
condstore = " (CONDSTORE)";
else
#endif
}
/* dump the mailbox flags we've found */
- if (DebugLevel > 2)
+ if (C_DebugLevel > 2)
{
if (STAILQ_EMPTY(&mdata->flags))
mutt_debug(LL_DEBUG3, "No folder flags found\n");
char buf[PATH_MAX + 64];
snprintf(buf, sizeof(buf), _("Create %s?"), mdata->name);
- if (Confirmcreate && mutt_yesorno(buf, 1) != MUTT_YES)
+ if (C_Confirmcreate && mutt_yesorno(buf, 1) != MUTT_YES)
return -1;
if (imap_create_mailbox(adata, mdata->name) < 0)
struct Pattern;
/* These Config Variables are only used in imap/auth.c */
-extern char *ImapAuthenticators;
+extern char *C_ImapAuthenticators;
/* These Config Variables are only used in imap/imap.c */
-extern bool ImapIdle;
+extern bool C_ImapIdle;
/* These Config Variables are only used in imap/message.c */
-extern char *ImapHeaders;
+extern char *C_ImapHeaders;
/* These Config Variables are only used in imap/command.c */
-extern bool ImapServernoise;
+extern bool C_ImapServernoise;
/* These Config Variables are only used in imap/util.c */
-extern char *ImapDelimChars;
-extern short ImapPipelineDepth;
+extern char *C_ImapDelimChars;
+extern short C_ImapPipelineDepth;
/* imap.c */
int imap_access(const char *path);
struct BodyCache;
/* These Config Variables are only used in imap/message.c */
-char *ImapHeaders; ///< Config: (imap) Additional email headers to download when getting index
+char *C_ImapHeaders; ///< Config: (imap) Additional email headers to download when getting index
/**
* imap_edata_free - free ImapHeader structure
else if ((plen = mutt_str_startswith(s, "old", CASE_IGNORE)))
{
s += plen;
- edata->old = MarkOld ? true : false;
+ edata->old = C_MarkOld ? true : false;
}
else
{
/* L10N:
Comparing the cached data with the IMAP server's data */
- mutt_progress_init(&progress, _("Evaluating cache..."), MUTT_PROGRESS_MSG, ReadInc, msn_end);
+ mutt_progress_init(&progress, _("Evaluating cache..."), MUTT_PROGRESS_MSG,
+ C_ReadInc, msn_end);
/* If we are using CONDSTORE's "FETCH CHANGEDSINCE", then we keep
* the flags in the header cache, and update them further below.
/* L10N: Fetching IMAP flag changes, using the CONDSTORE extension */
mutt_progress_init(&progress, _("Fetching flag updates..."),
- MUTT_PROGRESS_MSG, ReadInc, msn_end);
+ MUTT_PROGRESS_MSG, C_ReadInc, msn_end);
snprintf(buf, sizeof(buf), "UID FETCH 1:%u (FLAGS) (CHANGEDSINCE %llu%s)",
uid_next - 1, hc_modseq, eval_qresync ? " VANISHED" : "");
if (adata->capabilities & IMAP_CAP_IMAP4REV1)
{
safe_asprintf(&hdrreq, "BODY.PEEK[HEADER.FIELDS (%s%s%s)]", want_headers,
- ImapHeaders ? " " : "", NONULL(ImapHeaders));
+ C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders));
}
else if (adata->capabilities & IMAP_CAP_IMAP4)
{
safe_asprintf(&hdrreq, "RFC822.HEADER.LINES (%s%s%s)", want_headers,
- ImapHeaders ? " " : "", NONULL(ImapHeaders));
+ C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders));
}
else
{ /* Unable to fetch headers for lower versions */
unlink(tempfile);
mutt_progress_init(&progress, _("Fetching message headers..."),
- MUTT_PROGRESS_MSG, ReadInc, msn_end);
+ MUTT_PROGRESS_MSG, C_ReadInc, msn_end);
while ((msn_begin <= msn_end) && (fetch_msn_end < msn_end))
{
if (mdata->modseq)
{
- if ((adata->capabilities & IMAP_CAP_CONDSTORE) && ImapCondStore)
+ if ((adata->capabilities & IMAP_CAP_CONDSTORE) && C_ImapCondStore)
has_condstore = true;
/* If IMAP_CAP_QRESYNC and ImapQResync then Mutt sends ENABLE QRESYNC.
rewind(fp);
mutt_progress_init(&progressbar, _("Uploading message..."),
- MUTT_PROGRESS_SIZE, NetInc, len);
+ MUTT_PROGRESS_SIZE, C_NetInc, len);
mutt_date_make_imap(internaldate, sizeof(internaldate), msg->received);
break;
mutt_debug(LL_DEBUG3, "server suggests TRYCREATE\n");
snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
- if (Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES)
+ if (C_Confirmcreate && mutt_yesorno(prompt, 1) != MUTT_YES)
{
mutt_clear_error();
goto out;
{
mutt_set_flag(m, en->email, MUTT_DELETE, true);
mutt_set_flag(m, en->email, MUTT_PURGE, true);
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_set_flag(m, en->email, MUTT_TAG, false);
}
}
snprintf(buf, sizeof(buf), "UID FETCH %u %s", imap_edata_get(e)->uid,
((adata->capabilities & IMAP_CAP_IMAP4REV1) ?
- (ImapPeek ? "BODY.PEEK[]" : "BODY[]") :
+ (C_ImapPeek ? "BODY.PEEK[]" : "BODY[]") :
"RFC822"));
imap_cmd_start(adata, buf);
if (output_progress)
{
mutt_progress_init(&progressbar, _("Fetching message..."),
- MUTT_PROGRESS_SIZE, NetInc, bytes);
+ MUTT_PROGRESS_SIZE, C_NetInc, bytes);
}
if (imap_read_literal(msg->fp, adata, bytes,
output_progress ? &progressbar : NULL) < 0)
*/
void imap_utf_encode(bool unicode, char **s)
{
- if (!Charset || !s)
+ if (!C_Charset || !s)
return;
char *t = mutt_str_strdup(*s);
- if (t && (mutt_ch_convert_string(&t, Charset, "utf-8", 0) == 0))
+ if (t && (mutt_ch_convert_string(&t, C_Charset, "utf-8", 0) == 0))
{
FREE(s);
if (unicode)
*/
void imap_utf_decode(bool unicode, char **s)
{
- if (!Charset)
+ if (!C_Charset)
return;
char *t = NULL;
else
t = utf7_to_utf8(*s, strlen(*s), 0, 0);
- if (t && mutt_ch_convert_string(&t, "utf-8", Charset, 0) == 0)
+ if (t && mutt_ch_convert_string(&t, "utf-8", C_Charset, 0) == 0)
{
FREE(s);
*s = t;
#endif
/* These Config Variables are only used in imap/util.c */
-char *ImapDelimChars; ///< Config: (imap) Characters that denote separators in IMAP folders
-short ImapPipelineDepth; ///< Config: (imap) Number of IMAP commands that may be queued up
+char *C_ImapDelimChars; ///< Config: (imap) Characters that denote separators in IMAP folders
+short C_ImapPipelineDepth; ///< Config: (imap) Number of IMAP commands that may be queued up
/**
* imap_adata_free - Release and clear storage in an ImapAccountData structure
adata->seqid = new_seqid;
adata->cmdbuf = mutt_buffer_new();
- adata->cmdslots = ImapPipelineDepth + 2;
+ adata->cmdslots = C_ImapPipelineDepth + 2;
adata->cmds = mutt_mem_calloc(adata->cmdslots, sizeof(*adata->cmds));
if (++new_seqid > 'z')
url.path = mbox;
url_tostring(&url, cachepath, sizeof(cachepath), U_PATH);
- return mutt_hcache_open(HeaderCache, cachepath, imap_hcache_namer);
+ return mutt_hcache_open(C_HeaderCache, cachepath, imap_hcache_namer);
}
/**
{
if (hlen == 0)
home_match = true;
- else if (ImapDelimChars)
+ else if (C_ImapDelimChars)
{
- for (delim = ImapDelimChars; *delim != '\0'; delim++)
+ for (delim = C_ImapDelimChars; *delim != '\0'; delim++)
if (target_mailbox[hlen] == *delim)
home_match = true;
}
while (mailbox && *mailbox && i < plen - 1)
{
- if ((ImapDelimChars && strchr(ImapDelimChars, *mailbox)) || (delim && *mailbox == delim))
+ if ((C_ImapDelimChars && strchr(C_ImapDelimChars, *mailbox)) ||
+ (delim && *mailbox == delim))
{
/* use connection delimiter if known. Otherwise use user delimiter */
if (server_delim == '\0')
delim = *mailbox;
- while (*mailbox && ((ImapDelimChars && strchr(ImapDelimChars, *mailbox)) ||
+ while (*mailbox && ((C_ImapDelimChars && strchr(C_ImapDelimChars, *mailbox)) ||
(delim && *mailbox == delim)))
{
mailbox++;
if (!adata || !adata->mailbox)
continue;
- if ((adata->state >= IMAP_AUTHENTICATED) && (now >= (adata->lastread + ImapKeepalive)))
+ if ((adata->state >= IMAP_AUTHENTICATED) && (now >= (adata->lastread + C_ImapKeepalive)))
imap_check_mailbox(adata->mailbox, true);
}
}
sigset_t oldmask;
int rc;
- bool imap_passive = ImapPassive;
+ bool imap_passive = C_ImapPassive;
- ImapPassive = true;
+ C_ImapPassive = true;
OptKeepQuiet = true;
sigprocmask(SIG_SETMASK, NULL, &oldmask);
sigaction(SIGALRM, &act, &oldalrm);
- alarm(ImapKeepalive);
+ alarm(C_ImapKeepalive);
while (waitpid(pid, &rc, 0) < 0 && errno == EINTR)
{
alarm(0); /* cancel a possibly pending alarm */
imap_keepalive();
- alarm(ImapKeepalive);
+ alarm(C_ImapKeepalive);
}
alarm(0); /* cancel a possibly pending alarm */
OptKeepQuiet = false;
if (!imap_passive)
- ImapPassive = false;
+ C_ImapPassive = false;
return rc;
}
const char *user = NONULL(Username);
- if ((a1->type == MUTT_ACCT_TYPE_IMAP) && ImapUser)
- user = ImapUser;
+ if ((a1->type == MUTT_ACCT_TYPE_IMAP) && C_ImapUser)
+ user = C_ImapUser;
if (a1->flags & MUTT_ACCT_USER)
return strcmp(a1->user, user) == 0;
#endif
/* These Config Variables are only used in index.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 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 UncollapseJump; ///< Config: When opening a thread, jump to the next unread message
-bool UncollapseNew; ///< Config: Open collapsed threads when new mail arrives
+bool C_ChangeFolderNext; ///< Config: Suggest the next folder, rather than the first when using '<change-folder>'
+bool C_CollapseAll; ///< Config: Collapse all threads when entering a folder
+bool C_CollapseFlagged; ///< Config: Prevent the collapse of threads with flagged emails
+bool C_CollapseUnread; ///< Config: Prevent the collapse of threads with unread emails
+char *C_MarkMacroPrefix; ///< Config: Prefix for macros using '<mark-message>'
+bool C_PgpAutoDecode; ///< Config: Automatically decrypt PGP messages
+bool C_UncollapseJump; ///< Config: When opening a thread, jump to the next unread message
+bool C_UncollapseNew; ///< Config: Open collapsed threads when new mail arrives
static const struct Mapping IndexHelp[] = {
{ N_("Quit"), OP_QUIT },
#define FLAGGED(email) mutt_thread_contains_flagged(Context, email)
#define CAN_COLLAPSE(email) \
- ((CollapseUnread || !UNREAD(email)) && (CollapseFlagged || !FLAGGED(email)))
+ ((C_CollapseUnread || !UNREAD(email)) && (C_CollapseFlagged || !FLAGGED(email)))
// Checks to perform before running a function
#define CHECK_IN_MAILBOX (1 << 0)
* @param toggle toggle collapsed state
*
* This function is called by the OP_MAIN_COLLAPSE_ALL command and on folder
- * enter if the CollapseAll option is set. In the first case, the @a toggle
+ * enter if the #C_CollapseAll option is set. In the first case, the @a toggle
* parameter is 1 to actually toggle collapsed/uncollapsed state on all
* threads. In the second case, the @a toggle parameter is 0, actually turning
* this function into a one-way collapse.
if (old != -1)
return old;
- /* If Sort is reverse and not threaded, the latest message is first.
- * If Sort is threaded, the latest message is first if exactly one
- * of Sort and SortAux are reverse.
+ /* If C_Sort is reverse and not threaded, the latest message is first.
+ * If C_Sort is threaded, the latest message is first if exactly one
+ * of C_Sort and C_SortAux are reverse.
*/
- if (((Sort & SORT_REVERSE) && (Sort & SORT_MASK) != SORT_THREADS) ||
- ((Sort & SORT_MASK) == SORT_THREADS && ((Sort ^ SortAux) & SORT_REVERSE)))
+ if (((C_Sort & SORT_REVERSE) && (C_Sort & SORT_MASK) != SORT_THREADS) ||
+ ((C_Sort & SORT_MASK) == SORT_THREADS && ((C_Sort ^ C_SortAux) & SORT_REVERSE)))
{
return 0;
}
}
}
- if ((Sort & SORT_MASK) == SORT_THREADS && menu->current < 0)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS && menu->current < 0)
menu->current = mutt_parent_message(Context, current, false);
if (menu->current < 0)
struct Email **save_new = NULL;
/* save the list of new messages */
- if ((check != MUTT_REOPENED) && oldcount && (ctx->pattern || UncollapseNew))
+ if ((check != MUTT_REOPENED) && oldcount && (ctx->pattern || C_UncollapseNew))
{
save_new = mutt_mem_malloc(sizeof(struct Email *) * (ctx->mailbox->msg_count - oldcount));
for (int i = oldcount; i < ctx->mailbox->msg_count; i++)
}
/* uncollapse threads with new mail */
- if (UncollapseNew)
+ if (C_UncollapseNew)
{
if (check == MUTT_REOPENED)
{
oldcount = 0; /* invalid message number! */
}
- if ((Sort & SORT_MASK) == SORT_THREADS)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS)
update_index_threaded(ctx, check, oldcount);
else
update_index_unthreaded(ctx, check, oldcount);
else
#endif
{
- mx_path_canon(buf, buflen, Folder, NULL);
+ mx_path_canon(buf, buflen, C_Folder, NULL);
}
enum MailboxType magic = mx_path_probe(buf, NULL);
* switch statement would need to be run. */
mutt_folder_hook(buf, m ? m->desc : NULL);
- const int flags = (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)
+ const int flags = (C_ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)
#ifdef USE_NOTMUCH
|| (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY)
#endif
mailbox_free(&m);
}
- if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll)
+ if (((C_Sort & SORT_MASK) == SORT_THREADS) && C_CollapseAll)
collapse_all(menu, 0);
#ifdef USE_SIDEBAR
int flag = MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX;
struct MuttThread *tmp = NULL;
- if ((Sort & SORT_MASK) == SORT_THREADS && e->tree)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS && e->tree)
{
flag |= MUTT_FORMAT_TREE; /* display the thread tree */
if (e->display_subject)
flag |= MUTT_FORMAT_FORCESUBJ;
else
{
- const int reverse = Sort & SORT_REVERSE;
+ const int reverse = C_Sort & SORT_REVERSE;
int edgemsgno;
if (reverse)
{
}
}
- mutt_make_string_flags(buf, buflen, NONULL(IndexFormat), Context,
+ mutt_make_string_flags(buf, buflen, NONULL(C_IndexFormat), Context,
Context->mailbox, e, flag);
}
if (menu->redraw & REDRAW_STATUS)
{
char buf[LONG_STRING];
- menu_status_line(buf, sizeof(buf), menu, NONULL(StatusFormat));
+ menu_status_line(buf, sizeof(buf), menu, NONULL(C_StatusFormat));
mutt_window_move(MuttStatusWindow, 0, 0);
SETCOLOR(MT_COLOR_STATUS);
mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf));
NORMAL_COLOR;
menu->redraw &= ~REDRAW_STATUS;
- if (TsEnabled && TsSupported)
+ if (C_TsEnabled && TsSupported)
{
- menu_status_line(buf, sizeof(buf), menu, NONULL(TsStatusFormat));
+ menu_status_line(buf, sizeof(buf), menu, NONULL(C_TsStatusFormat));
mutt_ts_status(buf);
- menu_status_line(buf, sizeof(buf), menu, NONULL(TsIconFormat));
+ menu_status_line(buf, sizeof(buf), menu, NONULL(C_TsIconFormat));
mutt_ts_icon(buf);
}
}
mutt_monitor_add(NULL);
#endif
- if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll)
+ if (((C_Sort & SORT_MASK) == SORT_THREADS) && C_CollapseAll)
{
collapse_all(menu, 0);
menu->redraw = REDRAW_FULL;
oldcount = Context ? Context->mailbox->msg_count : 0;
if (OptRedrawTree && Context && (Context->mailbox->msg_count != 0) &&
- ((Sort & SORT_MASK) == SORT_THREADS))
+ ((C_Sort & SORT_MASK) == SORT_THREADS))
{
mutt_draw_tree(Context);
menu->redraw |= REDRAW_STATUS;
if (!Context->mailbox->emails[i]->read)
{
mutt_message(_("New mail in this mailbox"));
- if (BeepNew)
+ if (C_BeepNew)
beep();
- if (NewMailCommand)
+ if (C_NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCommand));
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(C_NewMailCommand));
if (mutt_system(cmd) != 0)
mutt_error(_("Error running \"%s\""), cmd);
}
if (mutt_mailbox_notify(Context ? Context->mailbox : NULL))
{
menu->redraw |= REDRAW_STATUS;
- if (BeepNew)
+ if (C_BeepNew)
beep();
- if (NewMailCommand)
+ if (C_NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCommand));
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(C_NewMailCommand));
if (mutt_system(cmd) != 0)
mutt_error(_("Error running \"%s\""), cmd);
}
else
menu->oldcurrent = -1;
- if (ArrowCursor)
+ if (C_ArrowCursor)
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 2);
- else if (BrailleFriendly)
+ else if (C_BrailleFriendly)
mutt_window_move(MuttIndexWindow, menu->current - menu->top + menu->offset, 0);
else
{
tag = true;
continue;
}
- else if (AutoTag && Context && Context->mailbox && (Context->mailbox->msg_tagged != 0))
+ else if (C_AutoTag && Context && Context->mailbox &&
+ (Context->mailbox->msg_tagged != 0))
tag = true;
mutt_clear_error();
}
else
menu->current = 0;
- if ((Context->mailbox->msg_count != 0) && (Sort & SORT_MASK) == SORT_THREADS)
+ if ((Context->mailbox->msg_count != 0) && (C_Sort & SORT_MASK) == SORT_THREADS)
mutt_draw_tree(Context);
menu->redraw = REDRAW_FULL;
}
break;
}
- if (query_quadoption(Quit, _("Quit NeoMutt?")) == MUTT_YES)
+ if (query_quadoption(C_Quit, _("Quit NeoMutt?")) == MUTT_YES)
{
int check;
case OP_TAG:
if (!prereq(Context, menu, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE))
break;
- if (tag && !AutoTag)
+ if (tag && !C_AutoTag)
{
for (size_t i = 0; i < Context->mailbox->msg_count; i++)
if (message_is_visible(Context, i))
Context->last_tag);
menu->redraw |= REDRAW_STATUS;
- if (Resolve && menu->current < Context->mailbox->vcount - 1)
+ if (C_Resolve && menu->current < Context->mailbox->vcount - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
{
struct Email *oldcur = CUR_EMAIL;
- if ((Sort & SORT_MASK) == SORT_THREADS)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS)
mutt_sort_headers(Context, false);
menu->current = oldcur->virtual;
menu->redraw = REDRAW_STATUS | REDRAW_INDEX;
op = OP_DISPLAY_MESSAGE;
continue;
}
- if (Resolve)
+ if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
if (!prereq(Context, menu, CHECK_IN_MAILBOX))
break;
mutt_debug(LL_DEBUG2, "OP_MAIN_WINDOWED_VFOLDER_BACKWARD\n");
- if (NmQueryWindowDuration <= 0)
+ if (C_NmQueryWindowDuration <= 0)
{
mutt_message(_("Windowed queries disabled"));
break;
}
- if (!NmQueryWindowCurrentSearch)
+ if (!C_NmQueryWindowCurrentSearch)
{
mutt_message(_("No notmuch vfolder currently loaded"));
break;
}
nm_query_window_backward();
- mutt_str_strfcpy(buf, NmQueryWindowCurrentSearch, sizeof(buf));
+ mutt_str_strfcpy(buf, C_NmQueryWindowCurrentSearch, sizeof(buf));
if (!nm_uri_from_query(Context->mailbox, buf, sizeof(buf)))
mutt_message(_("Failed to create query, aborting"));
else
case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
if (!prereq(Context, menu, CHECK_IN_MAILBOX))
break;
- if (NmQueryWindowDuration <= 0)
+ if (C_NmQueryWindowDuration <= 0)
{
mutt_message(_("Windowed queries disabled"));
break;
}
- if (!NmQueryWindowCurrentSearch)
+ if (!C_NmQueryWindowCurrentSearch)
{
mutt_message(_("No notmuch vfolder currently loaded"));
break;
}
nm_query_window_forward();
- mutt_str_strfcpy(buf, NmQueryWindowCurrentSearch, sizeof(buf));
+ mutt_str_strfcpy(buf, C_NmQueryWindowCurrentSearch, sizeof(buf));
if (!nm_uri_from_query(Context->mailbox, buf, sizeof(buf)))
mutt_message(_("Failed to create query, aborting"));
else
#ifdef USE_NNTP
OptNews = false;
#endif
- if (attach_msg || ReadOnly ||
+ if (attach_msg || C_ReadOnly ||
#ifdef USE_NNTP
(op == OP_MAIN_CHANGE_GROUP_READONLY) ||
#endif
#endif
else
{
- if (ChangeFolderNext && Context && (Context->mailbox->path[0] != '\0'))
+ if (C_ChangeFolderNext && Context && (Context->mailbox->path[0] != '\0'))
{
mutt_str_strfcpy(buf, Context->mailbox->path, sizeof(buf));
mutt_pretty_mailbox(buf, sizeof(buf));
{
OptNews = true;
m = Context ? Context->mailbox : NULL;
- CurrentNewsSrv = nntp_select_server(m, NewsServer, false);
+ CurrentNewsSrv = nntp_select_server(m, C_NewsServer, false);
if (!CurrentNewsSrv)
break;
if (flags)
OptNeedResort = false;
- if (((Sort & SORT_MASK) == SORT_THREADS) && CUR_EMAIL->collapsed)
+ if (((C_Sort & SORT_MASK) == SORT_THREADS) && CUR_EMAIL->collapsed)
{
mutt_uncollapse_thread(Context, CUR_EMAIL);
mutt_set_virtual(Context);
- if (UncollapseJump)
+ if (C_UncollapseJump)
menu->current = mutt_thread_next_unread(Context, CUR_EMAIL);
}
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
}
if ((menu->menu == MENU_MAIN) &&
- (query_quadoption(Quit, _("Exit NeoMutt without saving?")) == MUTT_YES))
+ (query_quadoption(C_Quit, _("Exit NeoMutt without saving?")) == MUTT_YES))
{
if (Context)
{
if (!check_acl(Context, MUTT_ACL_WRITE, _("Cannot break thread")))
break;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
mutt_error(_("Threading is not enabled"));
else if (!STAILQ_EMPTY(&CUR_EMAIL->env->in_reply_to) ||
!STAILQ_EMPTY(&CUR_EMAIL->env->references))
if (!check_acl(Context, MUTT_ACL_WRITE, _("Cannot link threads")))
break;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
mutt_error(_("Threading is not enabled"));
else if (!CUR_EMAIL->env->message_id)
mutt_error(_("No Message-ID: header available to link thread"));
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (Resolve)
+ else if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
}
struct Email *e = Context->mailbox->emails[Context->mailbox->v2r[cur]];
- if (e->collapsed && ((Sort & SORT_MASK) == SORT_THREADS))
+ if (e->collapsed && ((C_Sort & SORT_MASK) == SORT_THREADS))
{
if ((UNREAD(e) != 0) && (first_unread == -1))
first_unread = cur;
else
{
mutt_set_flag(Context->mailbox, CUR_EMAIL, MUTT_FLAG, !CUR_EMAIL->flagged);
- if (Resolve)
+ if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
else
mutt_set_flag(Context->mailbox, CUR_EMAIL, MUTT_READ, true);
- if (Resolve)
+ if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
menu->redraw |= REDRAW_STATUS;
if (tag)
menu->redraw |= REDRAW_INDEX;
- else if (Resolve)
+ else if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
if (!prereq(Context, menu, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE))
break;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error(_("Threading is not enabled"));
break;
{
menu->current = mutt_uncollapse_thread(Context, CUR_EMAIL);
mutt_set_virtual(Context);
- if (UncollapseJump)
+ if (C_UncollapseJump)
menu->current = mutt_thread_next_unread(Context, CUR_EMAIL);
}
else if (CAN_COLLAPSE(CUR_EMAIL))
if (!prereq(Context, menu, CHECK_IN_MAILBOX | CHECK_MSGCOUNT | CHECK_VISIBLE))
break;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error(_("Threading is not enabled"));
break;
mutt_emails_set_flag(Context->mailbox, &el, MUTT_DELETE, 1);
mutt_emails_set_flag(Context->mailbox, &el, MUTT_PURGE, (op == OP_PURGE_MESSAGE));
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_emails_set_flag(Context->mailbox, &el, MUTT_TAG, 0);
el_free(&el);
}
else
{
- if (Resolve)
+ if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
break;
}
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_thread_set_flag(CUR_EMAIL, MUTT_TAG, false, subthread);
- if (Resolve)
+ if (C_Resolve)
{
menu->current = ci_next_undeleted(menu->current);
if (menu->current == -1)
else
edit = false;
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(&el, &menu->redraw);
}
break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(&el, &menu->redraw);
}
break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(&el, &menu->redraw);
}
/* in an IMAP folder index with imap_peek=no, piping could change
* new or old messages status to read. Redraw what's needed.
*/
- if ((Context->mailbox->magic == MUTT_IMAP) && !ImapPeek)
+ if ((Context->mailbox->magic == MUTT_IMAP) && !C_ImapPeek)
{
menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
}
/* in an IMAP folder index with imap_peek=no, printing could change
* new or old messages status to read. Redraw what's needed.
*/
- if ((Context->mailbox->magic == MUTT_IMAP) && !ImapPeek)
+ if ((Context->mailbox->magic == MUTT_IMAP) && !C_ImapPeek)
{
menu->redraw |= (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS;
}
int rc = mutt_thread_set_flag(CUR_EMAIL, MUTT_READ, true, (op != OP_MAIN_READ_THREAD));
if (rc != -1)
{
- if (Resolve)
+ if (C_Resolve)
{
menu->current =
(op == OP_MAIN_READ_THREAD ? mutt_next_thread(CUR_EMAIL) :
buf2[0])
{
char str[STRING], macro[STRING];
- snprintf(str, sizeof(str), "%s%s", MarkMacroPrefix, buf2);
+ snprintf(str, sizeof(str), "%s%s", C_MarkMacroPrefix, buf2);
snprintf(macro, sizeof(macro), "<search>~i \"%s\"\n", CUR_EMAIL->env->message_id);
/* L10N: "message hotkey" is the key bindings menu description of a
macro created by <mark-message>. */
break;
if ((op != OP_FOLLOWUP) || !CUR_EMAIL->env->followup_to ||
(mutt_str_strcasecmp(CUR_EMAIL->env->followup_to, "poster") != 0) ||
- query_quadoption(FollowupToPoster,
+ query_quadoption(C_FollowupToPoster,
_("Reply by mail as poster prefers?")) != MUTT_YES)
{
if (Context && (Context->mailbox->magic == MUTT_NNTP) &&
- !((struct NntpMboxData *) Context->mailbox->mdata)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
+ !((struct NntpMboxData *) Context->mailbox->mdata)->allowed && query_quadoption(C_PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
{
break;
}
break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
+ if (C_PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
mutt_check_traditional_pgp(&el, &menu->redraw);
}
(op != OP_TAG_THREAD));
if (rc != -1)
{
- if (Resolve)
+ if (C_Resolve)
{
if (op == OP_TAG_THREAD)
menu->current = mutt_next_thread(CUR_EMAIL);
}
else
{
- if (Resolve && menu->current < (Context->mailbox->vcount - 1))
+ if (C_Resolve && menu->current < (Context->mailbox->vcount - 1))
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
}
if (rc != -1)
{
- if (Resolve)
+ if (C_Resolve)
{
if (op == OP_UNDELETE_THREAD)
menu->current = mutt_next_thread(CUR_EMAIL);
if (!e || !e->subject)
continue;
- if (ReplyRegex && ReplyRegex->regex &&
- (regexec(ReplyRegex->regex, e->subject, 1, pmatch, 0) == 0))
+ if (C_ReplyRegex && C_ReplyRegex->regex &&
+ (regexec(C_ReplyRegex->regex, e->subject, 1, pmatch, 0) == 0))
{
e->real_subj = e->subject + pmatch[0].rm_eo;
continue;
struct Menu;
/* These Config Variables are only used in index.c */
-extern bool ChangeFolderNext;
-extern bool CollapseAll;
-extern bool CollapseFlagged;
-extern bool CollapseUnread;
-extern char *MarkMacroPrefix;
-extern bool PgpAutoDecode;
-extern bool UncollapseJump;
-extern bool UncollapseNew;
+extern bool C_ChangeFolderNext;
+extern bool C_CollapseAll;
+extern bool C_CollapseFlagged;
+extern bool C_CollapseUnread;
+extern char *C_MarkMacroPrefix;
+extern bool C_PgpAutoDecode;
+extern bool C_UncollapseJump;
+extern bool C_UncollapseNew;
int index_color(int line);
void index_make_entry(char *buf, size_t buflen, struct Menu *menu, int line);
char *str = NULL;
struct utsname utsname;
- if (Hostname)
+ if (C_Hostname)
{
- str = Hostname;
+ str = C_Hostname;
}
else
{
else
ShortHostname = mutt_str_strdup(str);
- if (!Hostname)
+ if (!C_Hostname)
{
/* now get FQDN. Use configured domain first, DNS next, then uname */
#ifdef DOMAIN
- /* we have a compile-time domain name, use that for Hostname */
- Hostname =
+ /* we have a compile-time domain name, use that for C_Hostname */
+ C_Hostname =
mutt_mem_malloc(mutt_str_strlen(DOMAIN) + mutt_str_strlen(ShortHostname) + 2);
- sprintf((char *) Hostname, "%s.%s", NONULL(ShortHostname), DOMAIN);
+ sprintf((char *) C_Hostname, "%s.%s", NONULL(ShortHostname), DOMAIN);
#else
- Hostname = getmailname();
- if (!Hostname)
+ C_Hostname = getmailname();
+ if (!C_Hostname)
{
char buffer[LONG_STRING];
if (getdnsdomainname(buffer, sizeof(buffer)) == 0)
{
- Hostname = mutt_mem_malloc(mutt_str_strlen(buffer) +
- mutt_str_strlen(ShortHostname) + 2);
- sprintf((char *) Hostname, "%s.%s", NONULL(ShortHostname), buffer);
+ C_Hostname = mutt_mem_malloc(mutt_str_strlen(buffer) +
+ mutt_str_strlen(ShortHostname) + 2);
+ sprintf((char *) C_Hostname, "%s.%s", NONULL(ShortHostname), buffer);
}
else
{
* It could be wrong, but we've done the best we can, at this point the
* onus is on the user to provide the correct hostname if the nodename
* won't work in their network. */
- Hostname = mutt_str_strdup(utsname.nodename);
+ C_Hostname = mutt_str_strdup(utsname.nodename);
}
}
#endif
}
- if (Hostname)
- cs_str_initial_set(Config, "hostname", Hostname, NULL);
+ if (C_Hostname)
+ cs_str_initial_set(Config, "hostname", C_Hostname, NULL);
return true;
}
mutt_buffer_init(&token);
while ((linebuf = mutt_file_read_line(linebuf, &buflen, f, &line, MUTT_CONT)))
{
- const int conv = ConfigCharset && (*ConfigCharset) && Charset;
+ const int conv = C_ConfigCharset && (*C_ConfigCharset) && C_Charset;
if (conv)
{
currentline = mutt_str_strdup(linebuf);
if (!currentline)
continue;
- mutt_ch_convert_string(¤tline, ConfigCharset, Charset, 0);
+ mutt_ch_convert_string(¤tline, C_ConfigCharset, C_Charset, 0);
}
else
currentline = linebuf;
mutt_grouplist_add_addrlist(&gc, tmp->addr);
mutt_alias_add_reverse(tmp);
- if (DebugLevel > 2)
+ if (C_DebugLevel > 2)
{
/* A group is terminated with an empty address, so check a->mailbox */
for (struct Address *a = tmp->addr; a && a->mailbox; a = a->next)
}
mutt_str_strfcpy(m->path, buf->data, sizeof(m->path));
- /* int rc = */ mx_path_canon2(m, Folder);
+ /* int rc = */ mx_path_canon2(m, C_Folder);
bool new_account = false;
struct Account *a = mx_ac_find(m);
cs_str_string_set(Config, "visual", env_ed, NULL);
}
- Charset = mutt_ch_get_langinfo_charset();
- mutt_ch_set_charset(Charset);
+ C_Charset = mutt_ch_get_langinfo_charset();
+ mutt_ch_set_charset(C_Charset);
Matches = mutt_mem_calloc(MatchesListsize, sizeof(char *));
#ifdef HAVE_GETSID
/* Unset suspend by default if we're the session leader */
if (getsid(0) == getpid())
- Suspend = false;
+ C_Suspend = false;
#endif
/* RFC2368, "4. Unsafe headers"
if (!get_hostname())
return 1;
- if (!Realname)
+ if (!C_Realname)
{
struct passwd *pw = getpwuid(getuid());
if (pw)
{
char buf[STRING];
- Realname = mutt_str_strdup(mutt_gecos_name(buf, sizeof(buf), pw));
+ C_Realname = mutt_str_strdup(mutt_gecos_name(buf, sizeof(buf), pw));
}
}
- cs_str_initial_set(Config, "realname", Realname, NULL);
+ cs_str_initial_set(Config, "realname", C_Realname, NULL);
if (need_pause && !OptNoCurses)
{
return 1; // TEST14: neomutt -e broken (press 'q')
}
- mutt_file_mkdir(Tmpdir, S_IRWXU);
+ mutt_file_mkdir(C_Tmpdir, S_IRWXU);
mutt_hist_init();
mutt_hist_read_file();
#ifdef USE_NOTMUCH
- if (VirtualSpoolfile)
+ if (C_VirtualSpoolfile)
{
/* Find the first virtual folder and open it */
struct MailboxNode *mp = NULL;
#endif
/* This option is deprecated */
-bool IgnoreLinearWhiteSpace = false;
+bool C_IgnoreLinearWhiteSpace = false;
int charset_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
int hcache_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
struct ConfigDef MuttVars[] = {
/*++*/
- { "abort_noattach", DT_QUAD, R_NONE, &AbortNoattach, MUTT_NO },
+ { "abort_noattach", DT_QUAD, R_NONE, &C_AbortNoattach, MUTT_NO },
/*
** .pp
** If set to \fIyes\fP, when composing messages containing the regular
** set abort_noattach_regex = "\\<attach(|ed|ments?)\\>"
** .te
*/
- { "abort_noattach_regex", DT_REGEX, R_NONE, &AbortNoattachRegex, IP "\\<(attach|attached|attachments?)\\>" },
+ { "abort_noattach_regex", DT_REGEX, R_NONE, &C_AbortNoattachRegex, IP "\\<(attach|attached|attachments?)\\>" },
/*
** .pp
** Specifies a regular expression to match against the body of the message, to
** if the pattern contains at least one upper case letter, and case
** insensitive otherwise.
*/
- { "abort_nosubject", DT_QUAD, R_NONE, &AbortNosubject, MUTT_ASKYES },
+ { "abort_nosubject", DT_QUAD, R_NONE, &C_AbortNosubject, MUTT_ASKYES },
/*
** .pp
** If set to \fIyes\fP, when composing messages and no subject is given
** \fIno\fP, composing messages with no subject given at the subject
** prompt will never be aborted.
*/
- { "abort_unmodified", DT_QUAD, R_NONE, &AbortUnmodified, MUTT_YES },
+ { "abort_unmodified", DT_QUAD, R_NONE, &C_AbortUnmodified, MUTT_YES },
/*
** .pp
** If set to \fIyes\fP, composition will automatically abort after
** check only happens after the \fIfirst\fP edit of the file). When set
** to \fIno\fP, composition will never be aborted.
*/
- { "alias_file", DT_PATH, R_NONE, &AliasFile, IP "~/.neomuttrc" },
+ { "alias_file", DT_PATH, R_NONE, &C_AliasFile, IP "~/.neomuttrc" },
/*
** .pp
** The default file in which to save aliases created by the
** The default for this option is the currently used neomuttrc file, or
** "~/.neomuttrc" if no user neomuttrc was found.
*/
- { "alias_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &AliasFormat, IP "%4n %2f %t %-10a %r" },
+ { "alias_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_AliasFormat, IP "%4n %2f %t %-10a %r" },
/*
** .pp
** Specifies the format of the data displayed for the "$alias" menu. The
** .dt %t .dd Character which indicates if the alias is tagged for inclusion
** .de
*/
- { "allow_8bit", DT_BOOL, R_NONE, &Allow8bit, true },
+ { "allow_8bit", DT_BOOL, R_NONE, &C_Allow8bit, true },
/*
** .pp
** Controls whether 8-bit data is converted to 7-bit using either Quoted-
** Printable or Base64 encoding when sending mail.
*/
- { "allow_ansi", DT_BOOL, R_NONE, &AllowAnsi, false },
+ { "allow_ansi", DT_BOOL, R_NONE, &C_AllowAnsi, false },
/*
** .pp
** Controls whether ANSI color codes in messages (and color tags in
** and give it the same color as your attachment color (see also
** $$crypt_timestamp).
*/
- { "arrow_cursor", DT_BOOL, R_MENU, &ArrowCursor, false },
+ { "arrow_cursor", DT_BOOL, R_MENU, &C_ArrowCursor, false },
/*
** .pp
** When \fIset\fP, an arrow ("->") will be used to indicate the current entry
** be redrawn on the screen when moving to the next or previous entries
** in the menu.
*/
- { "ascii_chars", DT_BOOL, R_BOTH, &AsciiChars, false },
+ { "ascii_chars", DT_BOOL, R_BOTH, &C_AsciiChars, false },
/*
** .pp
** If \fIset\fP, NeoMutt will use plain ASCII characters when displaying thread
** and attachment trees, instead of the default \fIACS\fP characters.
*/
#ifdef USE_NNTP
- { "ask_follow_up", DT_BOOL, R_NONE, &AskFollowUp, false },
+ { "ask_follow_up", DT_BOOL, R_NONE, &C_AskFollowUp, false },
/*
** .pp
** If set, NeoMutt will prompt you for follow-up groups before editing
** the body of an outgoing message.
*/
- { "ask_x_comment_to", DT_BOOL, R_NONE, &AskXCommentTo, false },
+ { "ask_x_comment_to", DT_BOOL, R_NONE, &C_AskXCommentTo, false },
/*
** .pp
** If set, NeoMutt will prompt you for x-comment-to field before editing
** the body of an outgoing message.
*/
#endif
- { "askbcc", DT_BOOL, R_NONE, &Askbcc, false },
+ { "askbcc", DT_BOOL, R_NONE, &C_Askbcc, false },
/*
** .pp
** If \fIset\fP, NeoMutt will prompt you for blind-carbon-copy (Bcc) recipients
** before editing an outgoing message.
*/
- { "askcc", DT_BOOL, R_NONE, &Askcc, false },
+ { "askcc", DT_BOOL, R_NONE, &C_Askcc, false },
/*
** .pp
** If \fIset\fP, NeoMutt will prompt you for carbon-copy (Cc) recipients before
** editing the body of an outgoing message.
*/
- { "assumed_charset", DT_STRING, R_NONE, &AssumedCharset, 0, charset_validator },
+ { "assumed_charset", DT_STRING, R_NONE, &C_AssumedCharset, 0, charset_validator },
/*
** .pp
** This variable is a colon-separated list of character encoding
** .pp
** However, only the first content is valid for the message body.
*/
- { "attach_charset", DT_STRING, R_NONE, &AttachCharset, 0, charset_validator },
+ { "attach_charset", DT_STRING, R_NONE, &C_AttachCharset, 0, charset_validator },
/*
** .pp
** This variable is a colon-separated list of character encoding
** Note: for Japanese users, "iso-2022-*" must be put at the head
** of the value as shown above if included.
*/
- { "attach_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &AttachFormat, IP "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " },
+ { "attach_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_AttachFormat, IP "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " },
/*
** .pp
** This variable describes the format of the "attachment" menu. The
** .pp
** For an explanation of "soft-fill", see the $$index_format documentation.
*/
- { "attach_save_dir", DT_PATH, R_NONE, &AttachSaveDir, IP "./" },
+ { "attach_save_dir", DT_PATH, R_NONE, &C_AttachSaveDir, IP "./" },
/*
** .pp
** The directory where attachments are saved.
*/
- { "attach_sep", DT_STRING, R_NONE, &AttachSep, IP "\n" },
+ { "attach_sep", DT_STRING, R_NONE, &C_AttachSep, IP "\n" },
/*
** .pp
** The separator to add between attachments when operating (saving,
** printing, piping, etc) on a list of tagged attachments.
*/
- { "attach_split", DT_BOOL, R_NONE, &AttachSplit, true },
+ { "attach_split", DT_BOOL, R_NONE, &C_AttachSplit, true },
/*
** .pp
** If this variable is \fIunset\fP, when operating (saving, printing, piping,
** $$attach_sep separator is added after each attachment. When \fIset\fP,
** NeoMutt will operate on the attachments one by one.
*/
- { "attribution", DT_STRING, R_NONE, &Attribution, IP "On %d, %n wrote:" },
+ { "attribution", DT_STRING, R_NONE, &C_Attribution, IP "On %d, %n wrote:" },
/*
** .pp
** This is the string that will precede a message which has been included
** in a reply. For a full listing of defined \fCprintf(3)\fP-like sequences see
** the section on $$index_format.
*/
- { "attribution_locale", DT_STRING, R_NONE, &AttributionLocale, 0 },
+ { "attribution_locale", DT_STRING, R_NONE, &C_AttributionLocale, 0 },
/*
** .pp
** The locale used by \fCstrftime(3)\fP to format dates in the
** will use your locale environment, so there is no need to set
** this except to override that default.
*/
- { "auto_subscribe", DT_BOOL, R_NONE, &AutoSubscribe, false },
+ { "auto_subscribe", DT_BOOL, R_NONE, &C_AutoSubscribe, false },
/*
** .pp
** When \fIset\fP, Mutt assumes the presence of a List-Post header
** to the "$subscribe" list. Parsing and checking these things slows
** header reading down, so this option is disabled by default.
*/
- { "auto_tag", DT_BOOL, R_NONE, &AutoTag, false },
+ { "auto_tag", DT_BOOL, R_NONE, &C_AutoTag, false },
/*
** .pp
** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
** unset, you must first use the \fC<tag-prefix>\fP function (bound to ";"
** by default) to make the next function apply to all tagged messages.
*/
- { "autoedit", DT_BOOL, R_NONE, &Autoedit, false },
+ { "autoedit", DT_BOOL, R_NONE, &C_Autoedit, false },
/*
** .pp
** When \fIset\fP along with $$edit_headers, NeoMutt will skip the initial
** .pp
** Also see $$fast_reply.
*/
- { "beep", DT_BOOL, R_NONE, &Beep, true },
+ { "beep", DT_BOOL, R_NONE, &C_Beep, true },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will beep when an error occurs.
*/
- { "beep_new", DT_BOOL, R_NONE, &BeepNew, false },
+ { "beep_new", DT_BOOL, R_NONE, &C_BeepNew, false },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will beep whenever it prints a message
** notifying you of new mail. This is independent of the setting of the
** $$beep variable.
*/
- { "bounce", DT_QUAD, R_NONE, &Bounce, MUTT_ASKYES },
+ { "bounce", DT_QUAD, R_NONE, &C_Bounce, MUTT_ASKYES },
/*
** .pp
** Controls whether you will be asked to confirm bouncing messages.
** message. Setting this variable to \fIno\fP is not generally useful,
** and thus not recommended, because you are unable to bounce messages.
*/
- { "bounce_delivered", DT_BOOL, R_NONE, &BounceDelivered, true },
+ { "bounce_delivered", DT_BOOL, R_NONE, &C_BounceDelivered, true },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will include Delivered-To headers when
** bouncing messages. Postfix users may wish to \fIunset\fP this variable.
*/
- { "braille_friendly", DT_BOOL, R_NONE, &BrailleFriendly, false },
+ { "braille_friendly", DT_BOOL, R_NONE, &C_BrailleFriendly, false },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will place the cursor at the beginning
** follow these menus. The option is \fIunset\fP by default because many
** visual terminals don't permit making the cursor invisible.
*/
- { "browser_abbreviate_mailboxes", DT_BOOL, R_NONE, &BrowserAbbreviateMailboxes, true },
+ { "browser_abbreviate_mailboxes", DT_BOOL, R_NONE, &C_BrowserAbbreviateMailboxes, true },
/*
** .pp
** When this variable is \fIset\fP, mutt will abbreviate mailbox
** desirable to \fIunset\fP this variable.
*/
#ifdef USE_NNTP
- { "catchup_newsgroup", DT_QUAD, R_NONE, &CatchupNewsgroup, MUTT_ASKYES },
+ { "catchup_newsgroup", DT_QUAD, R_NONE, &C_CatchupNewsgroup, MUTT_ASKYES },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will mark all articles in newsgroup
*/
#endif
#ifdef USE_SSL
- { "certificate_file", DT_PATH, R_NONE, &CertificateFile, IP "~/.mutt_certificates" },
+ { "certificate_file", DT_PATH, R_NONE, &C_CertificateFile, IP "~/.mutt_certificates" },
/*
** .pp
** This variable specifies the file where the certificates you trust
** .te
*/
#endif
- { "change_folder_next", DT_BOOL, R_NONE, &ChangeFolderNext, false },
+ { "change_folder_next", DT_BOOL, R_NONE, &C_ChangeFolderNext, false },
/*
** .pp
** When this variable is \fIset\fP, the \fC<change-folder>\fP function
** mailbox suggestion will start at the next folder in your "$mailboxes"
** list, instead of starting at the first folder in the list.
*/
- { "charset", DT_STRING|DT_NOT_EMPTY, R_NONE, &Charset, 0, charset_validator },
+ { "charset", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_Charset, 0, charset_validator },
/*
** .pp
** Character set your terminal uses to display and enter textual data.
** \fBNote:\fP It should only be set in case NeoMutt isn't able to determine the
** character set used correctly.
*/
- { "check_mbox_size", DT_BOOL, R_NONE, &CheckMboxSize, false },
+ { "check_mbox_size", DT_BOOL, R_NONE, &C_CheckMboxSize, false },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will use file size attribute instead of
** mailbox by performing a fast mailbox scan when it is defined.
** Afterwards the new mail status is tracked by file size changes.
*/
- { "check_new", DT_BOOL, R_NONE, &CheckNew, true },
+ { "check_new", DT_BOOL, R_NONE, &C_CheckNew, true },
/*
** .pp
** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style
** this variable is \fIunset\fP, no check for new mail is performed
** while the mailbox is open.
*/
- { "collapse_all", DT_BOOL, R_NONE, &CollapseAll, false },
+ { "collapse_all", DT_BOOL, R_NONE, &C_CollapseAll, false },
/*
** .pp
** When \fIset\fP, NeoMutt will collapse all threads when entering a folder.
*/
- { "collapse_flagged", DT_BOOL, R_NONE, &CollapseFlagged, true },
+ { "collapse_flagged", DT_BOOL, R_NONE, &C_CollapseFlagged, true },
/*
** .pp
** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any
** flagged messages.
*/
- { "collapse_unread", DT_BOOL, R_NONE, &CollapseUnread, true },
+ { "collapse_unread", DT_BOOL, R_NONE, &C_CollapseUnread, true },
/*
** .pp
** When \fIunset\fP, NeoMutt will not collapse a thread if it contains any
** unread messages.
*/
- { "compose_format", DT_STRING, R_MENU, &ComposeFormat, IP "-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" },
+ { "compose_format", DT_STRING, R_MENU, &C_ComposeFormat, IP "-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" },
/*
** .pp
** Controls the format of the status line displayed in the "compose"
** See the text describing the $$status_format option for more
** information on how to set $$compose_format.
*/
- { "config_charset", DT_STRING, R_NONE, &ConfigCharset, 0, charset_validator },
+ { "config_charset", DT_STRING, R_NONE, &C_ConfigCharset, 0, charset_validator },
/*
** .pp
** When defined, NeoMutt will recode commands in rc files from this
** characters as question marks which can lead to undesired
** side effects (for example in regular expressions).
*/
- { "confirmappend", DT_BOOL, R_NONE, &Confirmappend, true },
+ { "confirmappend", DT_BOOL, R_NONE, &C_Confirmappend, true },
/*
** .pp
** When \fIset\fP, NeoMutt will prompt for confirmation when appending messages to
** an existing mailbox.
*/
- { "confirmcreate", DT_BOOL, R_NONE, &Confirmcreate, true },
+ { "confirmcreate", DT_BOOL, R_NONE, &C_Confirmcreate, true },
/*
** .pp
** When \fIset\fP, NeoMutt will prompt for confirmation when saving messages to a
** mailbox which does not yet exist before creating it.
*/
- { "connect_timeout", DT_NUMBER, R_NONE, &ConnectTimeout, 30 },
+ { "connect_timeout", DT_NUMBER, R_NONE, &C_ConnectTimeout, 30 },
/*
** .pp
** Causes NeoMutt to timeout a network connection (for IMAP, POP or SMTP) after this
** many seconds if the connection is not able to be established. A negative
** value causes NeoMutt to wait indefinitely for the connection attempt to succeed.
*/
- { "content_type", DT_STRING, R_NONE, &ContentType, IP "text/plain" },
+ { "content_type", DT_STRING, R_NONE, &C_ContentType, IP "text/plain" },
/*
** .pp
** Sets the default Content-Type for the body of newly composed messages.
*/
- { "copy", DT_QUAD, R_NONE, &Copy, MUTT_YES },
+ { "copy", DT_QUAD, R_NONE, &C_Copy, MUTT_YES },
/*
** .pp
** This variable controls whether or not copies of your outgoing messages
** will be saved for later references. Also see $$record,
** $$save_name, $$force_name and "$fcc-hook".
*/
- { "crypt_autoencrypt", DT_BOOL, R_NONE, &CryptAutoencrypt, false },
+ { "crypt_autoencrypt", DT_BOOL, R_NONE, &C_CryptAutoencrypt, false },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to PGP
** settings can be overridden by use of the smime menu instead.
** (Crypto only)
*/
- { "crypt_autopgp", DT_BOOL, R_NONE, &CryptAutopgp, true },
+ { "crypt_autopgp", DT_BOOL, R_NONE, &C_CryptAutopgp, true },
/*
** .pp
** This variable controls whether or not NeoMutt may automatically enable
** $$crypt_replyencrypt,
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
- { "crypt_autosign", DT_BOOL, R_NONE, &CryptAutosign, false },
+ { "crypt_autosign", DT_BOOL, R_NONE, &C_CryptAutosign, false },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to
** be overridden by use of the smime menu instead of the pgp menu.
** (Crypto only)
*/
- { "crypt_autosmime", DT_BOOL, R_NONE, &CryptAutosmime, true },
+ { "crypt_autosmime", DT_BOOL, R_NONE, &C_CryptAutosmime, true },
/*
** .pp
** This variable controls whether or not NeoMutt may automatically enable
** $$crypt_replyencrypt,
** $$crypt_autosign, $$crypt_replysign and $$smime_is_default.
*/
- { "crypt_chars", DT_MBTABLE, R_BOTH, &CryptChars, IP "SPsK " },
+ { "crypt_chars", DT_MBTABLE, R_BOTH, &C_CryptChars, IP "SPsK " },
/*
** .pp
** Controls the characters used in cryptography flags.
** .dt 5 .dd <space> .dd The mail has no crypto info.
** .de
*/
- { "crypt_confirmhook", DT_BOOL, R_NONE, &CryptConfirmhook, true },
+ { "crypt_confirmhook", DT_BOOL, R_NONE, &C_CryptConfirmhook, true },
/*
** .pp
** If set, then you will be prompted for confirmation of keys when using
** be presented. This is generally considered unsafe, especially where
** typos are concerned.
*/
- { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, &CryptOpportunisticEncrypt, false },
+ { "crypt_opportunistic_encrypt", DT_BOOL, R_NONE, &C_CryptOpportunisticEncrypt, false },
/*
** .pp
** Setting this variable will cause NeoMutt to automatically enable and
** be manually re-enabled in the pgp or smime menus.
** (Crypto only)
*/
- { "crypt_protected_headers_read", DT_BOOL, R_NONE, &CryptProtectedHeadersRead, true },
+ { "crypt_protected_headers_read", DT_BOOL, R_NONE, &C_CryptProtectedHeadersRead, true },
/*
** .pp
** When set, Mutt will display protected headers ("Memory Hole") in the pager,
** the dummy Subject header, so be sure to open such a message first.
** (Crypto only)
*/
- { "crypt_protected_headers_save", DT_BOOL, R_NONE, &CryptProtectedHeadersSave, false },
+ { "crypt_protected_headers_save", DT_BOOL, R_NONE, &C_CryptProtectedHeadersSave, false },
/*
** .pp
** When $$crypt_protected_headers_read is set, and a message with a
** you enable this variable.
** (Crypto only)
*/
- { "crypt_protected_headers_subject", DT_STRING, R_NONE, &CryptProtectedHeadersSubject, IP "Encrypted subject" },
+ { "crypt_protected_headers_subject", DT_STRING, R_NONE, &C_CryptProtectedHeadersSubject, IP "Encrypted subject" },
/*
** .pp
** When $$crypt_protected_headers_write is set, and the message is marked
** to the empty string.
** (Crypto only)
*/
- { "crypt_protected_headers_write", DT_BOOL, R_NONE, &CryptProtectedHeadersWrite, false },
+ { "crypt_protected_headers_write", DT_BOOL, R_NONE, &C_CryptProtectedHeadersWrite, false },
/*
** .pp
** When set, Mutt will generate protected headers ("Memory Hole") for
** Currently Mutt only supports the Subject header.
** (Crypto only)
*/
- { "crypt_replyencrypt", DT_BOOL, R_NONE, &CryptReplyencrypt, true },
+ { "crypt_replyencrypt", DT_BOOL, R_NONE, &C_CryptReplyencrypt, true },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL encrypt replies to messages which are
** encrypted.
** (Crypto only)
*/
- { "crypt_replysign", DT_BOOL, R_NONE, &CryptReplysign, false },
+ { "crypt_replysign", DT_BOOL, R_NONE, &C_CryptReplysign, false },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages which are
** \fIand\fP signed!
** (Crypto only)
*/
- { "crypt_replysignencrypted", DT_BOOL, R_NONE, &CryptReplysignencrypted, false },
+ { "crypt_replysignencrypted", DT_BOOL, R_NONE, &C_CryptReplysignencrypted, false },
/*
** .pp
** If \fIset\fP, automatically PGP or OpenSSL sign replies to messages
** to find out whether an encrypted message is also signed.
** (Crypto only)
*/
- { "crypt_timestamp", DT_BOOL, R_NONE, &CryptTimestamp, true },
+ { "crypt_timestamp", DT_BOOL, R_NONE, &C_CryptTimestamp, true },
/*
** .pp
** If \fIset\fP, NeoMutt will include a time stamp in the lines surrounding
** you may \fIunset\fP this setting.
** (Crypto only)
*/
- { "crypt_use_gpgme", DT_BOOL, R_NONE, &CryptUseGpgme, false },
+ { "crypt_use_gpgme", DT_BOOL, R_NONE, &C_CryptUseGpgme, false },
/*
** .pp
** This variable controls the use of the GPGME-enabled crypto backends.
** Note that the GPGME backend does not support creating old-style inline
** (traditional) PGP encrypted or signed messages (see $$pgp_autoinline).
*/
- { "crypt_use_pka", DT_BOOL, R_NONE, &CryptUsePka, false },
+ { "crypt_use_pka", DT_BOOL, R_NONE, &C_CryptUsePka, false },
/*
** .pp
** Controls whether NeoMutt uses PKA
** (see http://www.g10code.de/docs/pka-intro.de.pdf) during signature
** verification (only supported by the GPGME backend).
*/
- { "crypt_verify_sig", DT_QUAD, R_NONE, &CryptVerifySig, MUTT_YES },
+ { "crypt_verify_sig", DT_QUAD, R_NONE, &C_CryptVerifySig, MUTT_YES },
/*
** .pp
** If \fI"yes"\fP, always attempt to verify PGP or S/MIME signatures.
** If \fI"no"\fP, never attempt to verify cryptographic signatures.
** (Crypto only)
*/
- { "date_format", DT_STRING|DT_NOT_EMPTY, R_MENU, &DateFormat, IP "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
+ { "date_format", DT_STRING|DT_NOT_EMPTY, R_MENU, &C_DateFormat, IP "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
/*
** .pp
** This variable controls the format of the date printed by the "%d"
** rest of the string are expanded in the \fIC\fP locale (that is in US
** English).
*/
- { "debug_file", DT_PATH, R_NONE, &DebugFile, IP "~/.neomuttdebug" },
+ { "debug_file", DT_PATH, R_NONE, &C_DebugFile, IP "~/.neomuttdebug" },
/*
** .pp
** Debug logging is controlled by the variables \fC$$debug_file\fP and \fC$$debug_level\fP.
** .pp
** See also: \fC$$debug_level\fP
*/
- { "debug_level", DT_NUMBER, R_NONE, &DebugLevel, 0, level_validator },
+ { "debug_level", DT_NUMBER, R_NONE, &C_DebugLevel, 0, level_validator },
/*
** .pp
** Debug logging is controlled by the variables \fC$$debug_file\fP and \fC$$debug_level\fP.
** .pp
** See also: \fC$$debug_file\fP
*/
- { "default_hook", DT_STRING, R_NONE, &DefaultHook, IP "~f %s !~P | (~P ~C %s)" },
+ { "default_hook", DT_STRING, R_NONE, &C_DefaultHook, IP "~f %s !~P | (~P ~C %s)" },
/*
** .pp
** This variable controls how "$message-hook", "$reply-hook", "$send-hook",
** "$alternates") and is to or cc'ed to a user matching the given
** regular expression.
*/
- { "delete", DT_QUAD, R_NONE, &Delete, MUTT_ASKYES },
+ { "delete", DT_QUAD, R_NONE, &C_Delete, MUTT_ASKYES },
/*
** .pp
** Controls whether or not messages are really deleted when closing or
** deleting will automatically be purged without prompting. If set to
** \fIno\fP, messages marked for deletion will be kept in the mailbox.
*/
- { "delete_untag", DT_BOOL, R_NONE, &DeleteUntag, true },
+ { "delete_untag", DT_BOOL, R_NONE, &C_DeleteUntag, true },
/*
** .pp
** If this option is \fIset\fP, NeoMutt will untag messages when marking them
** for deletion. This applies when you either explicitly delete a message,
** or when you save it to another folder.
*/
- { "digest_collapse", DT_BOOL, R_NONE, &DigestCollapse, true },
+ { "digest_collapse", DT_BOOL, R_NONE, &C_DigestCollapse, true },
/*
** .pp
** If this option is \fIset\fP, NeoMutt's received-attachments menu will not show the subparts of
** individual messages in a multipart/digest. To see these subparts, press "v" on that menu.
*/
- { "display_filter", DT_COMMAND, R_PAGER, &DisplayFilter, 0 },
+ { "display_filter", DT_COMMAND, R_PAGER, &C_DisplayFilter, 0 },
/*
** .pp
** When set, specifies a command used to filter messages. When a message
** This can be fixed by adding this to your config:
** \fCcolor body magenta default '^\[-- .* --\]$$$'\fP.
*/
- { "dsn_notify", DT_STRING, R_NONE, &DsnNotify, 0 },
+ { "dsn_notify", DT_STRING, R_NONE, &C_DsnNotify, 0 },
/*
** .pp
** This variable sets the request for when notification is returned. The
** for DSN. For SMTP delivery, DSN support is auto-detected so that it
** depends on the server whether DSN will be used or not.
*/
- { "dsn_return", DT_STRING, R_NONE, &DsnReturn, 0 },
+ { "dsn_return", DT_STRING, R_NONE, &C_DsnReturn, 0 },
/*
** .pp
** This variable controls how much of your message is returned in DSN
** for DSN. For SMTP delivery, DSN support is auto-detected so that it
** depends on the server whether DSN will be used or not.
*/
- { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &DuplicateThreads, true, pager_validator },
+ { "duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &C_DuplicateThreads, true, pager_validator },
/*
** .pp
** This variable controls whether NeoMutt, when $$sort is set to \fIthreads\fP, threads
** that it thinks they are duplicates of each other with an equals sign
** in the thread tree.
*/
- { "edit_headers", DT_BOOL, R_NONE, &EditHeaders, false },
+ { "edit_headers", DT_BOOL, R_NONE, &C_EditHeaders, false },
/*
** .pp
** This option allows you to edit the header of your outgoing messages
** \fBNote\fP that changes made to the References: and Date: headers are
** ignored for interoperability reasons.
*/
- { "editor", DT_COMMAND, R_NONE, &Editor, IP "vi" },
+ { "editor", DT_COMMAND, R_NONE, &C_Editor, IP "vi" },
/*
** .pp
** This variable specifies which editor is used by NeoMutt.
** .pp
** where \fIstring\fP is the expansion of \fC$$editor\fP described above.
*/
- { "empty_subject", DT_STRING, R_NONE, &EmptySubject, IP "Re: your mail" },
+ { "empty_subject", DT_STRING, R_NONE, &C_EmptySubject, IP "Re: your mail" },
/*
** .pp
** This variable specifies the subject to be used when replying to an email
** with an empty subject. It defaults to "Re: your mail".
*/
- { "encode_from", DT_BOOL, R_NONE, &EncodeFrom, false },
+ { "encode_from", DT_BOOL, R_NONE, &C_EncodeFrom, false },
/*
** .pp
** When \fIset\fP, NeoMutt will quoted-printable encode messages when
** misinterpreting the line as a mbox message separator).
*/
#ifdef USE_SSL_OPENSSL
- { "entropy_file", DT_PATH, R_NONE, &EntropyFile, 0 },
+ { "entropy_file", DT_PATH, R_NONE, &C_EntropyFile, 0 },
/*
** .pp
** The file which includes random data that is used to initialize SSL
** library functions.
*/
#endif
- { "envelope_from_address", DT_ADDRESS, R_NONE, &EnvelopeFromAddress, 0 },
+ { "envelope_from_address", DT_ADDRESS, R_NONE, &C_EnvelopeFromAddress, 0 },
/*
** .pp
** Manually sets the \fIenvelope\fP sender for outgoing messages.
** This value is ignored if $$use_envelope_from is \fIunset\fP.
*/
- { "escape", DT_STRING, R_NONE, &Escape, IP "~" },
+ { "escape", DT_STRING, R_NONE, &C_Escape, IP "~" },
/*
** .pp
** Escape character to use for functions in the built-in editor.
*/
- { "external_search_command", DT_COMMAND, R_NONE, &ExternalSearchCommand, 0 },
+ { "external_search_command", DT_COMMAND, R_NONE, &C_ExternalSearchCommand, 0 },
/*
** .pp
** If set, contains the name of the external program used by "~I" patterns.
** match the behavior of your indexer, but this should help users
** of indexers other than notmuch to integrate them cleanly with NeoMutt.
*/
- { "fast_reply", DT_BOOL, R_NONE, &FastReply, false },
+ { "fast_reply", DT_BOOL, R_NONE, &C_FastReply, false },
/*
** .pp
** When \fIset\fP, the initial prompt for recipients and subject are skipped
** \fBNote:\fP this variable has no effect when the $$autoedit
** variable is \fIset\fP.
*/
- { "fcc_attach", DT_QUAD, R_NONE, &FccAttach, MUTT_YES },
+ { "fcc_attach", DT_QUAD, R_NONE, &C_FccAttach, MUTT_YES },
/*
** .pp
** This variable controls whether or not attachments on outgoing messages
** are saved along with the main body of your message.
*/
- { "fcc_clear", DT_BOOL, R_NONE, &FccClear, false },
+ { "fcc_clear", DT_BOOL, R_NONE, &C_FccClear, false },
/*
** .pp
** When this variable is \fIset\fP, FCCs will be stored unencrypted and
** signed.
** (PGP only)
*/
- { "flag_chars", DT_MBTABLE, R_BOTH, &FlagChars, IP "*!DdrONon- " },
+ { "flag_chars", DT_MBTABLE, R_BOTH, &C_FlagChars, IP "*!DdrONon- " },
/*
** .pp
** Controls the characters used in several flags.
** .dt 11 .dd <space> .dd The mail is read - %Z expando.
** .de
*/
- { "flag_safe", DT_BOOL, R_NONE, &FlagSafe, false },
+ { "flag_safe", DT_BOOL, R_NONE, &C_FlagSafe, false },
/*
** .pp
** If set, flagged messages cannot be deleted.
*/
- { "folder", DT_PATH|DT_MAILBOX, R_NONE, &Folder, IP "~/Mail" },
+ { "folder", DT_PATH|DT_MAILBOX, R_NONE, &C_Folder, IP "~/Mail" },
/*
** .pp
** Specifies the default location of your mailboxes. A "+" or "=" at the
** you use "+" or "=" for any other variables since expansion takes place
** when handling the "$mailboxes" command.
*/
- { "folder_format", DT_STRING|DT_NOT_EMPTY, R_MENU, &FolderFormat, IP "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %i" },
+ { "folder_format", DT_STRING|DT_NOT_EMPTY, R_MENU, &C_FolderFormat, IP "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %i" },
/*
** .pp
** This variable allows you to customize the file browser display to your
** %m requires $$mail_check_stats to be set.
** %n requires $$mail_check_stats to be set (except for IMAP mailboxes).
*/
- { "followup_to", DT_BOOL, R_NONE, &FollowupTo, true },
+ { "followup_to", DT_BOOL, R_NONE, &C_FollowupTo, true },
/*
** .pp
** Controls whether or not the "Mail-Followup-To:" header field is
** of the same email for you.
*/
#ifdef USE_NNTP
- { "followup_to_poster", DT_QUAD, R_NONE, &FollowupToPoster, MUTT_ASKYES },
+ { "followup_to_poster", DT_QUAD, R_NONE, &C_FollowupToPoster, MUTT_ASKYES },
/*
** .pp
** If this variable is \fIset\fP and the keyword "poster" is present in
** message via mail.
*/
#endif
- { "force_name", DT_BOOL, R_NONE, &ForceName, false },
+ { "force_name", DT_BOOL, R_NONE, &C_ForceName, false },
/*
** .pp
** This variable is similar to $$save_name, except that NeoMutt will
** .pp
** Also see the $$record variable.
*/
- { "forward_attribution_intro", DT_STRING, R_NONE, &ForwardAttributionIntro, IP "----- Forwarded message from %f -----" },
+ { "forward_attribution_intro", DT_STRING, R_NONE, &C_ForwardAttributionIntro, IP "----- Forwarded message from %f -----" },
/*
** .pp
** This is the string that will precede a message which has been forwarded
** For a full listing of defined \fCprintf(3)\fP-like sequences see
** the section on $$index_format. See also $$attribution_locale.
*/
- { "forward_attribution_trailer", DT_STRING, R_NONE, &ForwardAttributionTrailer, IP "----- End forwarded message -----" },
+ { "forward_attribution_trailer", DT_STRING, R_NONE, &C_ForwardAttributionTrailer, IP "----- End forwarded message -----" },
/*
** .pp
** This is the string that will follow a message which has been forwarded
** For a full listing of defined \fCprintf(3)\fP-like sequences see
** the section on $$index_format. See also $$attribution_locale.
*/
- { "forward_decode", DT_BOOL, R_NONE, &ForwardDecode, true },
+ { "forward_decode", DT_BOOL, R_NONE, &C_ForwardDecode, true },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
** This variable is only used, if $$mime_forward is \fIunset\fP,
** otherwise $$mime_forward_decode is used instead.
*/
- { "forward_decrypt", DT_BOOL, R_NONE, &ForwardDecrypt, true },
+ { "forward_decrypt", DT_BOOL, R_NONE, &C_ForwardDecrypt, true },
/*
** .pp
** Controls the handling of encrypted messages when forwarding a message.
** $$mime_forward_decode is \fIunset\fP.
** (PGP only)
*/
- { "forward_edit", DT_QUAD, R_NONE, &ForwardEdit, MUTT_YES },
+ { "forward_edit", DT_QUAD, R_NONE, &C_ForwardEdit, MUTT_YES },
/*
** .pp
** This quadoption controls whether or not the user is automatically
** placed in the editor when forwarding messages. For those who always want
** to forward with no modification, use a setting of "no".
*/
- { "forward_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &ForwardFormat, IP "[%a: %s]" },
+ { "forward_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_ForwardFormat, IP "[%a: %s]" },
/*
** .pp
** This variable controls the default subject when forwarding a message.
** It uses the same format sequences as the $$index_format variable.
*/
- { "forward_quote", DT_BOOL, R_NONE, &ForwardQuote, false },
+ { "forward_quote", DT_BOOL, R_NONE, &C_ForwardQuote, false },
/*
** .pp
** When \fIset\fP, forwarded messages included in the main body of the
** message (when $$mime_forward is \fIunset\fP) will be quoted using
** $$indent_string.
*/
- { "forward_references", DT_BOOL, R_NONE, &ForwardReferences, false },
+ { "forward_references", DT_BOOL, R_NONE, &C_ForwardReferences, false },
/*
** .pp
** When \fIset\fP, forwarded messages set the "In-Reply-To:" and
** forwarded message becomes part of the original thread instead of starting
** a new one.
*/
- { "from", DT_ADDRESS, R_NONE, &From, 0 },
+ { "from", DT_ADDRESS, R_NONE, &C_From, 0 },
/*
** .pp
** When \fIset\fP, this variable contains a default "from" address. It
** .pp
** If not specified, then it may be read from the environment variable \fC$$$EMAIL\fP.
*/
- { "from_chars", DT_MBTABLE, R_BOTH, &FromChars, 0 },
+ { "from_chars", DT_MBTABLE, R_BOTH, &C_FromChars, 0 },
/*
** .pp
** Controls the character used to prefix the %F and %L fields in the
** string variables; one cannot tell a variable that is unset from one
** that is set to the empty string.
*/
- { "gecos_mask", DT_REGEX, R_NONE, &GecosMask, IP "^[^,]*" },
+ { "gecos_mask", DT_REGEX, R_NONE, &C_GecosMask, IP "^[^,]*" },
/*
** .pp
** A regular expression used by NeoMutt to parse the GECOS field of a password
** "Franklin" to "Franklin, Steve".
*/
#ifdef USE_NNTP
- { "group_index_format", DT_STRING|DT_NOT_EMPTY, R_BOTH, &GroupIndexFormat, IP "%4C %M%N %5s %-45.45f %d" },
+ { "group_index_format", DT_STRING|DT_NOT_EMPTY, R_BOTH, &C_GroupIndexFormat, IP "%4C %M%N %5s %-45.45f %d" },
/*
** .pp
** This variable allows you to customize the newsgroup browser display to
** .de
*/
#endif
- { "hdrs", DT_BOOL, R_NONE, &Hdrs, true },
+ { "hdrs", DT_BOOL, R_NONE, &C_Hdrs, true },
/*
** .pp
** When \fIunset\fP, the header fields normally added by the "$my_hdr"
** composing a new message or replying in order to take effect. If \fIset\fP,
** the user defined header fields are added to every new message.
*/
- { "header", DT_BOOL, R_NONE, &Header, false },
+ { "header", DT_BOOL, R_NONE, &C_Header, false },
/*
** .pp
** When \fIset\fP, this variable causes NeoMutt to include the header
** The $$weed setting applies.
*/
#ifdef USE_HCACHE
- { "header_cache", DT_PATH, R_NONE, &HeaderCache, 0 },
+ { "header_cache", DT_PATH, R_NONE, &C_HeaderCache, 0 },
/*
** .pp
** This variable points to the header cache database.
** Header caching can greatly improve speed when opening POP, IMAP
** MH or Maildir folders, see "$caching" for details.
*/
- { "header_cache_backend", DT_STRING, R_NONE, &HeaderCacheBackend, 0, hcache_validator },
+ { "header_cache_backend", DT_STRING, R_NONE, &C_HeaderCacheBackend, 0, hcache_validator },
/*
** .pp
** This variable specifies the header cache backend.
*/
#if defined(HAVE_QDBM) || defined(HAVE_TC) || defined(HAVE_KC)
- { "header_cache_compress", DT_BOOL, R_NONE, &HeaderCacheCompress, true },
+ { "header_cache_compress", DT_BOOL, R_NONE, &C_HeaderCacheCompress, true },
/*
** .pp
** When NeoMutt is compiled with qdbm, tokyocabinet or kyotocabinet
*/
#endif /* HAVE_QDBM */
#if defined(HAVE_GDBM) || defined(HAVE_BDB)
- { "header_cache_pagesize", DT_STRING, R_NONE, &HeaderCachePagesize, IP "16384" },
+ { "header_cache_pagesize", DT_STRING, R_NONE, &C_HeaderCachePagesize, IP "16384" },
/*
** .pp
** When NeoMutt is compiled with either gdbm or bdb4 as the header cache backend,
*/
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
- { "header_color_partial", DT_BOOL, R_PAGER_FLOW, &HeaderColorPartial, false },
+ { "header_color_partial", DT_BOOL, R_PAGER_FLOW, &C_HeaderColorPartial, false },
/*
** .pp
** When \fIset\fP, color header regexes behave like color body regexes:
** .pp
** See "$color" for more details.
*/
- { "help", DT_BOOL, R_REFLOW, &Help, true },
+ { "help", DT_BOOL, R_REFLOW, &C_Help, true },
/*
** .pp
** When \fIset\fP, help lines describing the bindings for the major functions
** running. Since this variable is primarily aimed at new users, neither
** of these should present a major problem.
*/
- { "hidden_host", DT_BOOL, R_NONE, &HiddenHost, false },
+ { "hidden_host", DT_BOOL, R_NONE, &C_HiddenHost, false },
/*
** .pp
** When \fIset\fP, NeoMutt will skip the host name part of $$hostname variable
** affect the generation of Message-IDs, and it will not lead to the
** cut-off of first-level domains.
*/
- { "hidden_tags", DT_STRING, R_NONE, &HiddenTags, IP "unread,draft,flagged,passed,replied,attachment,signed,encrypted" },
+ { "hidden_tags", DT_STRING, R_NONE, &C_HiddenTags, IP "unread,draft,flagged,passed,replied,attachment,signed,encrypted" },
/*
** .pp
** This variable specifies private notmuch/imap tags which should not be printed
** on screen.
*/
- { "hide_limited", DT_BOOL, R_TREE|R_INDEX, &HideLimited, false },
+ { "hide_limited", DT_BOOL, R_TREE|R_INDEX, &C_HideLimited, false },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden
** by limiting, in the thread tree.
*/
- { "hide_missing", DT_BOOL, R_TREE|R_INDEX, &HideMissing, true },
+ { "hide_missing", DT_BOOL, R_TREE|R_INDEX, &C_HideMissing, true },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of missing messages in the
** thread tree.
*/
- { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, &HideThreadSubject, true },
+ { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, &C_HideThreadSubject, true },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the subject of messages in the thread
** tree that have the same subject as their parent or closest previously
** displayed sibling.
*/
- { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, &HideTopLimited, false },
+ { "hide_top_limited", DT_BOOL, R_TREE|R_INDEX, &C_HideTopLimited, false },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of messages that are hidden
** by limiting, at the top of threads in the thread tree. Note that when
** $$hide_limited is \fIset\fP, this option will have no effect.
*/
- { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, &HideTopMissing, true },
+ { "hide_top_missing", DT_BOOL, R_TREE|R_INDEX, &C_HideTopMissing, true },
/*
** .pp
** When \fIset\fP, NeoMutt will not show the presence of missing messages at the
** top of threads in the thread tree. Note that when $$hide_missing is
** \fIset\fP, this option will have no effect.
*/
- { "history", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &History, 10 },
+ { "history", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_History, 10 },
/*
** .pp
** This variable controls the size (in number of strings remembered) of
** the string history buffer per category. The buffer is cleared each time the
** variable is set.
*/
- { "history_file", DT_PATH, R_NONE, &HistoryFile, IP "~/.mutthistory" },
+ { "history_file", DT_PATH, R_NONE, &C_HistoryFile, IP "~/.mutthistory" },
/*
** .pp
** The file in which NeoMutt will save its history.
** .pp
** Also see $$save_history.
*/
- { "history_remove_dups", DT_BOOL, R_NONE, &HistoryRemoveDups, false },
+ { "history_remove_dups", DT_BOOL, R_NONE, &C_HistoryRemoveDups, false },
/*
** .pp
** When \fIset\fP, all of the string history will be scanned for duplicates
** when a new entry is added. Duplicate entries in the $$history_file will
** also be removed when it is periodically compacted.
*/
- { "honor_disposition", DT_BOOL, R_NONE, &HonorDisposition, false },
+ { "honor_disposition", DT_BOOL, R_NONE, &C_HonorDisposition, false },
/*
** .pp
** When \fIset\fP, NeoMutt will not display attachments with a
** If \fIunset\fP, NeoMutt will render all MIME parts it can
** properly transform to plain text.
*/
- { "honor_followup_to", DT_QUAD, R_NONE, &HonorFollowupTo, MUTT_YES },
+ { "honor_followup_to", DT_QUAD, R_NONE, &C_HonorFollowupTo, MUTT_YES },
/*
** .pp
** This variable controls whether or not a Mail-Followup-To header is
** honored when group-replying to a message.
*/
- { "hostname", DT_STRING, R_NONE, &Hostname, 0 },
+ { "hostname", DT_STRING, R_NONE, &C_Hostname, 0 },
/*
** .pp
** Specifies the fully-qualified hostname of the system NeoMutt is running on
** Also see $$use_domain and $$hidden_host.
*/
#ifdef HAVE_LIBIDN
- { "idn_decode", DT_BOOL, R_MENU, &IdnDecode, true },
+ { "idn_decode", DT_BOOL, R_MENU, &C_IdnDecode, true },
/*
** .pp
** When \fIset\fP, NeoMutt will show you international domain names decoded.
** Note: You can use IDNs for addresses even if this is \fIunset\fP.
** This variable only affects decoding. (IDN only)
*/
- { "idn_encode", DT_BOOL, R_MENU, &IdnEncode, true },
+ { "idn_encode", DT_BOOL, R_MENU, &C_IdnEncode, true },
/*
** .pp
** When \fIset\fP, NeoMutt will encode international domain names using
** UTF-8 encoded domains. (IDN only)
*/
#endif /* HAVE_LIBIDN */
- { "ignore_list_reply_to", DT_BOOL, R_NONE, &IgnoreListReplyTo, false },
+ { "ignore_list_reply_to", DT_BOOL, R_NONE, &C_IgnoreListReplyTo, false },
/*
** .pp
** Affects the behavior of the \fC<reply>\fP function when replying to
** list.
*/
#ifdef USE_IMAP
- { "imap_authenticators", DT_STRING, R_NONE, &ImapAuthenticators, 0 },
+ { "imap_authenticators", DT_STRING, R_NONE, &C_ImapAuthenticators, 0 },
/*
** .pp
** This is a colon-delimited list of authentication methods NeoMutt may
** the previous methods are unavailable. If a method is available but
** authentication fails, NeoMutt will not connect to the IMAP server.
*/
- { "imap_check_subscribed", DT_BOOL, R_NONE, &ImapCheckSubscribed, false },
+ { "imap_check_subscribed", DT_BOOL, R_NONE, &C_ImapCheckSubscribed, false },
/*
** .pp
** When \fIset\fP, NeoMutt will fetch the set of subscribed folders from
** of mailboxes it polls for new mail just as if you had issued individual
** "$mailboxes" commands.
*/
- { "imap_condstore", DT_BOOL, R_NONE, &ImapCondStore, 0 },
+ { "imap_condstore", DT_BOOL, R_NONE, &C_ImapCondStore, 0 },
/*
** .pp
** When \fIset\fP, mutt will use the CONDSTORE extension (RFC 7162)
** those, and displays worse performance when enabled. Your
** mileage may vary.
*/
- { "imap_delim_chars", DT_STRING, R_NONE, &ImapDelimChars, IP "/." },
+ { "imap_delim_chars", DT_STRING, R_NONE, &C_ImapDelimChars, IP "/." },
/*
** .pp
** This contains the list of characters which you would like to treat
** as folder separators for displaying IMAP paths. In particular it
** helps in using the "=" shortcut for your \fIfolder\fP variable.
*/
- { "imap_headers", DT_STRING, R_INDEX, &ImapHeaders, 0 },
+ { "imap_headers", DT_STRING, R_INDEX, &C_ImapHeaders, 0 },
/*
** .pp
** NeoMutt requests these header fields in addition to the default headers
** and not contain the colon, e.g. "X-BOGOSITY X-SPAM-STATUS" for the
** "X-Bogosity:" and "X-Spam-Status:" header fields.
*/
- { "imap_idle", DT_BOOL, R_NONE, &ImapIdle, false },
+ { "imap_idle", DT_BOOL, R_NONE, &C_ImapIdle, false },
/*
** .pp
** When \fIset\fP, NeoMutt will attempt to use the IMAP IDLE extension
** to NeoMutt's implementation. If your connection seems to freeze
** up periodically, try unsetting this.
*/
- { "imap_keepalive", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &ImapKeepalive, 300 },
+ { "imap_keepalive", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_ImapKeepalive, 300 },
/*
** .pp
** This variable specifies the maximum amount of time in seconds that NeoMutt
** violated every now and then. Reduce this number if you find yourself
** getting disconnected from your IMAP server due to inactivity.
*/
- { "imap_list_subscribed", DT_BOOL, R_NONE, &ImapListSubscribed, false },
+ { "imap_list_subscribed", DT_BOOL, R_NONE, &C_ImapListSubscribed, false },
/*
** .pp
** This variable configures whether IMAP folder browsing will look for
** only subscribed folders or all folders. This can be toggled in the
** IMAP browser with the \fC<toggle-subscribed>\fP function.
*/
- { "imap_login", DT_STRING, R_NONE|F_SENSITIVE, &ImapLogin, 0 },
+ { "imap_login", DT_STRING, R_NONE|F_SENSITIVE, &C_ImapLogin, 0 },
/*
** .pp
** Your login name on the IMAP server.
** .pp
** This variable defaults to the value of $$imap_user.
*/
- { "imap_oauth_refresh_command", DT_STRING, R_NONE, &ImapOauthRefreshCmd, 0 },
+ { "imap_oauth_refresh_command", DT_STRING, R_NONE, &C_ImapOauthRefreshCmd, 0 },
/*
** .pp
** The command to run to generate an OAUTH refresh token for
** run on every connection attempt that uses the OAUTHBEARER authentication
** mechanism. See "$oauth" for details.
*/
- { "imap_pass", DT_STRING, R_NONE|F_SENSITIVE, &ImapPass, 0 },
+ { "imap_pass", DT_STRING, R_NONE|F_SENSITIVE, &C_ImapPass, 0 },
/*
** .pp
** Specifies the password for your IMAP account. If \fIunset\fP, NeoMutt will
** fairly secure machine, because the superuser can read your neomuttrc even
** if you are the only one who can read the file.
*/
- { "imap_passive", DT_BOOL, R_NONE, &ImapPassive, true },
+ { "imap_passive", DT_BOOL, R_NONE, &C_ImapPassive, true },
/*
** .pp
** When \fIset\fP, NeoMutt will not open new IMAP connections to check for new
** user/password pairs on NeoMutt invocation, or if opening the connection
** is slow.
*/
- { "imap_peek", DT_BOOL, R_NONE, &ImapPeek, true },
+ { "imap_peek", DT_BOOL, R_NONE, &C_ImapPeek, true },
/*
** .pp
** When \fIset\fP, NeoMutt will avoid implicitly marking your mail as read whenever
** but can make closing an IMAP folder somewhat slower. This option
** exists to appease speed freaks.
*/
- { "imap_pipeline_depth", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &ImapPipelineDepth, 15 },
+ { "imap_pipeline_depth", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_ImapPipelineDepth, 15 },
/*
** .pp
** Controls the number of IMAP commands that may be queued up before they
** .pp
** \fBNote:\fP Changes to this variable have no effect on open connections.
*/
- { "imap_poll_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &ImapPollTimeout, 15 },
+ { "imap_poll_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_ImapPollTimeout, 15 },
/*
** .pp
** This variable specifies the maximum amount of time in seconds
** for new mail, before timing out and closing the connection. Set
** to 0 to disable timing out.
*/
- { "imap_qresync", DT_BOOL, R_NONE, &ImapQResync, 0 },
+ { "imap_qresync", DT_BOOL, R_NONE, &C_ImapQResync, 0 },
/*
** .pp
** When \fIset\fP, mutt will use the QRESYNC extension (RFC 7162)
** strange behavior, such as duplicate or missing messages please
** file a bug report to let us know.
*/
- { "imap_servernoise", DT_BOOL, R_NONE, &ImapServernoise, true },
+ { "imap_servernoise", DT_BOOL, R_NONE, &C_ImapServernoise, true },
/*
** .pp
** When \fIset\fP, NeoMutt will display warning messages from the IMAP
** server which are out of the users' hands, you may wish to suppress
** them at some point.
*/
- { "imap_user", DT_STRING, R_NONE|F_SENSITIVE, &ImapUser, 0 },
+ { "imap_user", DT_STRING, R_NONE|F_SENSITIVE, &C_ImapUser, 0 },
/*
** .pp
** The name of the user whose mail you intend to access on the IMAP
** This variable defaults to your user name on the local machine.
*/
#endif
- { "implicit_autoview", DT_BOOL, R_NONE, &ImplicitAutoview, false },
+ { "implicit_autoview", DT_BOOL, R_NONE, &C_ImplicitAutoview, false },
/*
** .pp
** If set to "yes", NeoMutt will look for a mailcap entry with the
** use the viewer defined in that entry to convert the body part to text
** form.
*/
- { "include", DT_QUAD, R_NONE, &Include, MUTT_ASKYES },
+ { "include", DT_QUAD, R_NONE, &C_Include, MUTT_ASKYES },
/*
** .pp
** Controls whether or not a copy of the message(s) you are replying to
** is included in your reply.
*/
- { "include_onlyfirst", DT_BOOL, R_NONE, &IncludeOnlyfirst, false },
+ { "include_onlyfirst", DT_BOOL, R_NONE, &C_IncludeOnlyfirst, false },
/*
** .pp
** Controls whether or not NeoMutt includes only the first attachment
** of the message you are replying.
*/
- { "indent_string", DT_STRING, R_NONE, &IndentString, IP "> " },
+ { "indent_string", DT_STRING, R_NONE, &C_IndentString, IP "> " },
/*
** .pp
** Specifies the string to prepend to each line of text quoted in a
** This option is a format string, please see the description of
** $$index_format for supported \fCprintf(3)\fP-style sequences.
*/
- { "index_format", DT_STRING|DT_NOT_EMPTY, R_BOTH, &IndexFormat, IP "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" },
+ { "index_format", DT_STRING|DT_NOT_EMPTY, R_BOTH, &C_IndexFormat, IP "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" },
/*
** .pp
** This variable allows you to customize the message index display to
** ``$save-hook'', ``$fcc-hook'' and ``$fcc-save-hook'', too.
*/
#ifdef USE_NNTP
- { "inews", DT_COMMAND, R_NONE, &Inews, 0 },
+ { "inews", DT_COMMAND, R_NONE, &C_Inews, 0 },
/*
** .pp
** If set, specifies the program and arguments used to deliver news posted
** .te
*/
#endif
- { "ispell", DT_COMMAND, R_NONE, &Ispell, IP ISPELL },
+ { "ispell", DT_COMMAND, R_NONE, &C_Ispell, IP ISPELL },
/*
** .pp
** How to invoke ispell (GNU's spell-checking software).
*/
- { "keep_flagged", DT_BOOL, R_NONE, &KeepFlagged, false },
+ { "keep_flagged", DT_BOOL, R_NONE, &C_KeepFlagged, false },
/*
** .pp
** If \fIset\fP, read messages marked as flagged will not be moved
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a "$mbox-hook" command.
*/
- { "mail_check", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &MailCheck, 5 },
+ { "mail_check", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_MailCheck, 5 },
/*
** .pp
** This variable configures how often (in seconds) NeoMutt should look for
** new mail. Also see the $$timeout variable.
*/
- { "mail_check_recent", DT_BOOL, R_NONE, &MailCheckRecent, true },
+ { "mail_check_recent", DT_BOOL, R_NONE, &C_MailCheckRecent, true },
/*
** .pp
** When \fIset\fP, NeoMutt will only notify you about new mail that has been received
** When \fI$$mark_old\fP is set, NeoMutt does not consider the mailbox to contain new
** mail if only old messages exist.
*/
- { "mail_check_stats", DT_BOOL, R_NONE, &MailCheckStats, false },
+ { "mail_check_stats", DT_BOOL, R_NONE, &C_MailCheckStats, false },
/*
** .pp
** When \fIset\fP, NeoMutt will periodically calculate message
** Message statistics can also be explicitly calculated by invoking the
** \fC<check-stats>\fP function.
*/
- { "mail_check_stats_interval", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &MailCheckStatsInterval, 60 },
+ { "mail_check_stats_interval", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_MailCheckStatsInterval, 60 },
/*
** .pp
** When $$mail_check_stats is \fIset\fP, this variable configures
** how often (in seconds) NeoMutt will update message counts.
*/
- { "mailcap_path", DT_STRING, R_NONE, &MailcapPath, IP "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" },
+ { "mailcap_path", DT_STRING, R_NONE, &C_MailcapPath, IP "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" },
/*
** .pp
** This variable specifies which files to consult when attempting to
** .pp
** The default search path is from RFC1524.
*/
- { "mailcap_sanitize", DT_BOOL, R_NONE, &MailcapSanitize, true },
+ { "mailcap_sanitize", DT_BOOL, R_NONE, &C_MailcapSanitize, true },
/*
** .pp
** If \fIset\fP, NeoMutt will restrict possible characters in mailcap % expandos
** \fBDON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE
** DOING!\fP
*/
- { "maildir_check_cur", DT_BOOL, R_NONE, &MaildirCheckCur, false },
+ { "maildir_check_cur", DT_BOOL, R_NONE, &C_MaildirCheckCur, false },
/*
** .pp
** If \fIset\fP, NeoMutt will poll both the new and cur directories of
** to scan all cur messages.
*/
#ifdef USE_HCACHE
- { "maildir_header_cache_verify", DT_BOOL, R_NONE, &MaildirHeaderCacheVerify, true },
+ { "maildir_header_cache_verify", DT_BOOL, R_NONE, &C_MaildirHeaderCacheVerify, true },
/*
** .pp
** Check for Maildir unaware programs other than NeoMutt having modified maildir
** folders).
*/
#endif
- { "maildir_trash", DT_BOOL, R_NONE, &MaildirTrash, false },
+ { "maildir_trash", DT_BOOL, R_NONE, &C_MaildirTrash, false },
/*
** .pp
** If \fIset\fP, messages marked as deleted will be saved with the maildir
** to maildir-style mailboxes. Setting it will have no effect on other
** mailbox types.
*/
- { "mark_macro_prefix", DT_STRING, R_NONE, &MarkMacroPrefix, IP "'" },
+ { "mark_macro_prefix", DT_STRING, R_NONE, &C_MarkMacroPrefix, IP "'" },
/*
** .pp
** Prefix for macros created using mark-message. A new macro
** automatically generated with \fI<mark-message>a\fP will be composed
** from this prefix and the letter \fIa\fP.
*/
- { "mark_old", DT_BOOL, R_BOTH, &MarkOld, true },
+ { "mark_old", DT_BOOL, R_BOTH, &C_MarkOld, true },
/*
** .pp
** Controls whether or not NeoMutt marks \fInew\fP \fBunread\fP
** will show up with an "O" next to them in the index menu,
** indicating that they are old.
*/
- { "markers", DT_BOOL, R_PAGER_FLOW, &Markers, true },
+ { "markers", DT_BOOL, R_PAGER_FLOW, &C_Markers, true },
/*
** .pp
** Controls the display of wrapped lines in the internal pager. If set, a
** .pp
** Also see the $$smart_wrap variable.
*/
- { "mask", DT_REGEX|DT_REGEX_MATCH_CASE|DT_REGEX_ALLOW_NOT|DT_REGEX_NOSUB, R_NONE, &Mask, IP "!^\\.[^.]" },
+ { "mask", DT_REGEX|DT_REGEX_MATCH_CASE|DT_REGEX_ALLOW_NOT|DT_REGEX_NOSUB, R_NONE, &C_Mask, IP "!^\\.[^.]" },
/*
** .pp
** A regular expression used in the file browser, optionally preceded by
** the \fInot\fP operator "!". Only files whose names match this mask
** will be shown. The match is always case-sensitive.
*/
- { "mbox", DT_PATH|DT_MAILBOX, R_BOTH, &Mbox, IP "~/mbox" },
+ { "mbox", DT_PATH|DT_MAILBOX, R_BOTH, &C_Mbox, IP "~/mbox" },
/*
** .pp
** This specifies the folder into which read mail in your $$spoolfile
** .pp
** Also see the $$move variable.
*/
- { "mbox_type", DT_MAGIC, R_NONE, &MboxType, MUTT_MBOX },
+ { "mbox_type", DT_MAGIC, R_NONE, &C_MboxType, MUTT_MBOX },
/*
** .pp
** The default mailbox type used when creating new folders. May be any of
** .pp
** This can also be set using the \fC-m\fP command-line option.
*/
- { "menu_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &MenuContext, 0 },
+ { "menu_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_MenuContext, 0 },
/*
** .pp
** This variable controls the number of lines of context that are given
** when scrolling through menus. (Similar to $$pager_context.)
*/
- { "menu_move_off", DT_BOOL, R_NONE, &MenuMoveOff, true },
+ { "menu_move_off", DT_BOOL, R_NONE, &C_MenuMoveOff, true },
/*
** .pp
** When \fIunset\fP, the bottom entry of menus will never scroll up past
** the bottom of the screen, unless there are less entries than lines.
** When \fIset\fP, the bottom entry may move off the bottom.
*/
- { "menu_scroll", DT_BOOL, R_NONE, &MenuScroll, false },
+ { "menu_scroll", DT_BOOL, R_NONE, &C_MenuScroll, false },
/*
** .pp
** When \fIset\fP, menus will be scrolled up or down one line when you
** (useful for slow links to avoid many redraws).
*/
#if defined(USE_IMAP) || defined(USE_POP)
- { "message_cache_clean", DT_BOOL, R_NONE, &MessageCacheClean, false },
+ { "message_cache_clean", DT_BOOL, R_NONE, &C_MessageCacheClean, false },
/*
** .pp
** If \fIset\fP, NeoMutt will clean out obsolete entries from the message cache when
** every once in a while, since it can be a little slow
** (especially for large folders).
*/
- { "message_cachedir", DT_PATH, R_NONE, &MessageCachedir, 0 },
+ { "message_cachedir", DT_PATH, R_NONE, &C_MessageCachedir, 0 },
/*
** .pp
** Set this to a directory and NeoMutt will cache copies of messages from
** Also see the $$message_cache_clean variable.
*/
#endif
- { "message_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &MessageFormat, IP "%s" },
+ { "message_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_MessageFormat, IP "%s" },
/*
** .pp
** This is the string displayed in the "attachment" menu for
** attachments of type \fCmessage/rfc822\fP. For a full listing of defined
** \fCprintf(3)\fP-like sequences see the section on $$index_format.
*/
- { "meta_key", DT_BOOL, R_NONE, &MetaKey, false },
+ { "meta_key", DT_BOOL, R_NONE, &C_MetaKey, false },
/*
** .pp
** If \fIset\fP, forces NeoMutt to interpret keystrokes with the high bit (bit 8)
** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character
** "x".
*/
- { "metoo", DT_BOOL, R_NONE, &Metoo, false },
+ { "metoo", DT_BOOL, R_NONE, &C_Metoo, false },
/*
** .pp
** If \fIunset\fP, NeoMutt will remove your address (see the "$alternates"
** command) from the list of recipients when replying to a message.
*/
- { "mh_purge", DT_BOOL, R_NONE, &MhPurge, false },
+ { "mh_purge", DT_BOOL, R_NONE, &C_MhPurge, false },
/*
** .pp
** When \fIunset\fP, NeoMutt will mimic mh's behavior and rename deleted messages
** .pp
** This option is similar to $$maildir_trash for Maildir folders.
*/
- { "mh_seq_flagged", DT_STRING, R_NONE, &MhSeqFlagged, IP "flagged" },
+ { "mh_seq_flagged", DT_STRING, R_NONE, &C_MhSeqFlagged, IP "flagged" },
/*
** .pp
** The name of the MH sequence used for flagged messages.
*/
- { "mh_seq_replied", DT_STRING, R_NONE, &MhSeqReplied, IP "replied" },
+ { "mh_seq_replied", DT_STRING, R_NONE, &C_MhSeqReplied, IP "replied" },
/*
** .pp
** The name of the MH sequence used to tag replied messages.
*/
- { "mh_seq_unseen", DT_STRING, R_NONE, &MhSeqUnseen, IP "unseen" },
+ { "mh_seq_unseen", DT_STRING, R_NONE, &C_MhSeqUnseen, IP "unseen" },
/*
** .pp
** The name of the MH sequence used for unseen messages.
*/
- { "mime_forward", DT_QUAD, R_NONE, &MimeForward, MUTT_NO },
+ { "mime_forward", DT_QUAD, R_NONE, &C_MimeForward, MUTT_NO },
/*
** .pp
** When \fIset\fP, the message you are forwarding will be attached as a
** .pp
** Also see $$forward_decode and $$mime_forward_decode.
*/
- { "mime_forward_decode", DT_BOOL, R_NONE, &MimeForwardDecode, false },
+ { "mime_forward_decode", DT_BOOL, R_NONE, &C_MimeForwardDecode, false },
/*
** .pp
** Controls the decoding of complex MIME messages into \fCtext/plain\fP when
** forwarding a message while $$mime_forward is \fIset\fP. Otherwise
** $$forward_decode is used instead.
*/
- { "mime_forward_rest", DT_QUAD, R_NONE, &MimeForwardRest, MUTT_YES },
+ { "mime_forward_rest", DT_QUAD, R_NONE, &C_MimeForwardRest, MUTT_YES },
/*
** .pp
** When forwarding multiple attachments of a MIME message from the attachment
** be attached to the newly composed message if this option is \fIset\fP.
*/
#ifdef USE_NNTP
- { "mime_subject", DT_BOOL, R_NONE, &MimeSubject, true },
+ { "mime_subject", DT_BOOL, R_NONE, &C_MimeSubject, true },
/*
** .pp
** If \fIunset\fP, 8-bit "subject:" line in article header will not be
** is Usenet article, because MIME for news is nonstandard feature.
*/
#endif
- { "mime_type_query_command", DT_COMMAND, R_NONE, &MimeTypeQueryCommand, 0 },
+ { "mime_type_query_command", DT_COMMAND, R_NONE, &C_MimeTypeQueryCommand, 0 },
/*
** .pp
** This specifies a command to run, to determine the mime type of a
** Suggested values are "xdg-mime query filetype" or
** "file -bi".
*/
- { "mime_type_query_first", DT_BOOL, R_NONE, &MimeTypeQueryFirst, false },
+ { "mime_type_query_first", DT_BOOL, R_NONE, &C_MimeTypeQueryFirst, false },
/*
** .pp
** When \fIset\fP, the $$mime_type_query_command will be run before the
** mime.types lookup.
*/
#ifdef MIXMASTER
- { "mix_entry_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &MixEntryFormat, IP "%4n %c %-16s %a" },
+ { "mix_entry_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_MixEntryFormat, IP "%4n %c %-16s %a" },
/*
** .pp
** This variable describes the format of a remailer line on the mixmaster
** .dt %s .dd The remailer's short name
** .de
*/
- { "mixmaster", DT_COMMAND, R_NONE, &Mixmaster, IP MIXMASTER },
+ { "mixmaster", DT_COMMAND, R_NONE, &C_Mixmaster, IP MIXMASTER },
/*
** .pp
** This variable contains the path to the Mixmaster binary on your
** mixmaster chain.
*/
#endif
- { "move", DT_QUAD, R_NONE, &Move, MUTT_NO },
+ { "move", DT_QUAD, R_NONE, &C_Move, MUTT_NO },
/*
** .pp
** Controls whether or not NeoMutt will move read messages
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a "$mbox-hook" command.
*/
- { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, &NarrowTree, false },
+ { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, &C_NarrowTree, false },
/*
** .pp
** This variable, when \fIset\fP, makes the thread tree narrower, allowing
** deeper threads to fit on the screen.
*/
#ifdef USE_SOCKET
- { "net_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NetInc, 10 },
+ { "net_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NetInc, 10 },
/*
** .pp
** Operations that expect to transfer a large amount of data over the
** See also $$read_inc, $$write_inc and $$net_inc.
*/
#endif
- { "new_mail_command", DT_COMMAND, R_NONE, &NewMailCommand, 0 },
+ { "new_mail_command", DT_COMMAND, R_NONE, &C_NewMailCommand, 0 },
/*
** .pp
** If \fIset\fP, NeoMutt will call this command after a new message is received.
** into this command.
*/
#ifdef USE_NNTP
- { "news_cache_dir", DT_PATH, R_NONE, &NewsCacheDir, IP "~/.neomutt" },
+ { "news_cache_dir", DT_PATH, R_NONE, &C_NewsCacheDir, IP "~/.neomutt" },
/*
** .pp
** This variable pointing to directory where NeoMutt will save cached news
** articles and headers in. If \fIunset\fP, articles and headers will not be
** saved at all and will be reloaded from the server each time.
*/
- { "news_server", DT_STRING, R_NONE, &NewsServer, 0 },
+ { "news_server", DT_STRING, R_NONE, &C_NewsServer, 0 },
/*
** .pp
** This variable specifies domain name or address of NNTP server.
** environment variable \fC$$$NNTPSERVER\fP, or putting the server name in the
** file "/etc/nntpserver".
*/
- { "newsgroups_charset", DT_STRING, R_NONE, &NewsgroupsCharset, IP "utf-8", charset_validator },
+ { "newsgroups_charset", DT_STRING, R_NONE, &C_NewsgroupsCharset, IP "utf-8", charset_validator },
/*
** .pp
** Character set of newsgroups descriptions.
*/
- { "newsrc", DT_PATH, R_NONE, &Newsrc, IP "~/.newsrc" },
+ { "newsrc", DT_PATH, R_NONE, &C_Newsrc, IP "~/.newsrc" },
/*
** .pp
** The file, containing info about subscribed newsgroups - names and
*/
#endif
#ifdef USE_NOTMUCH
- { "nm_db_limit", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NmDbLimit, 0 },
+ { "nm_db_limit", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NmDbLimit, 0 },
/*
** .pp
** This variable specifies the default limit used in notmuch queries.
*/
- { "nm_default_uri", DT_STRING, R_NONE, &NmDefaultUri, 0 },
+ { "nm_default_uri", DT_STRING, R_NONE, &C_NmDefaultUri, 0 },
/*
** .pp
** This variable specifies the default Notmuch database in format
** notmuch://<absolute path>.
*/
- { "nm_exclude_tags", DT_STRING, R_NONE, &NmExcludeTags, 0 },
+ { "nm_exclude_tags", DT_STRING, R_NONE, &C_NmExcludeTags, 0 },
/*
** .pp
** The messages tagged with these tags are excluded and not loaded
** from notmuch DB to NeoMutt unless specified explicitly.
*/
- { "nm_flagged_tag", DT_STRING, R_NONE, &NmFlaggedTag, IP "flagged" },
+ { "nm_flagged_tag", DT_STRING, R_NONE, &C_NmFlaggedTag, IP "flagged" },
/*
** .pp
** This variable specifies notmuch tag which is used for flagged messages. The
** variable is used to count flagged messages in DB and set the flagged flag when
** modifying tags. All other NeoMutt commands use standard (e.g. maildir) flags.
*/
- { "nm_open_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NmOpenTimeout, 5 },
+ { "nm_open_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NmOpenTimeout, 5 },
/*
** .pp
** This variable specifies the timeout for database open in seconds.
*/
- { "nm_query_type", DT_STRING, R_NONE, &NmQueryType, IP "messages" },
+ { "nm_query_type", DT_STRING, R_NONE, &C_NmQueryType, IP "messages" },
/*
** .pp
** This variable specifies the default query type (threads or messages) used in notmuch queries.
*/
- { "nm_query_window_current_position", DT_NUMBER, R_NONE, &NmQueryWindowCurrentPosition, 0 },
+ { "nm_query_window_current_position", DT_NUMBER, R_NONE, &C_NmQueryWindowCurrentPosition, 0 },
/*
** .pp
** This variable contains the position of the current search for window based vfolder.
*/
- { "nm_query_window_current_search", DT_STRING, R_NONE, &NmQueryWindowCurrentSearch, 0 },
+ { "nm_query_window_current_search", DT_STRING, R_NONE, &C_NmQueryWindowCurrentSearch, 0 },
/*
** .pp
** This variable contains the currently setup notmuch search for window based vfolder.
*/
- { "nm_query_window_duration", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NmQueryWindowDuration, 0 },
+ { "nm_query_window_duration", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NmQueryWindowDuration, 0 },
/*
** .pp
** This variable sets the time duration of a windowed notmuch query.
** Accepted values all non negative integers. A value of 0 disables the feature.
*/
- { "nm_query_window_timebase", DT_STRING, R_NONE, &NmQueryWindowTimebase, IP "week" },
+ { "nm_query_window_timebase", DT_STRING, R_NONE, &C_NmQueryWindowTimebase, IP "week" },
/*
** .pp
** This variable sets the time base of a windowed notmuch query.
** Accepted values are 'minute', 'hour', 'day', 'week', 'month', 'year'
*/
- { "nm_record", DT_BOOL, R_NONE, &NmRecord, false },
+ { "nm_record", DT_BOOL, R_NONE, &C_NmRecord, false },
/*
** .pp
** This variable specifies if the NeoMutt record should indexed by notmuch.
*/
- { "nm_record_tags", DT_STRING, R_NONE, &NmRecordTags, 0 },
+ { "nm_record_tags", DT_STRING, R_NONE, &C_NmRecordTags, 0 },
/*
** .pp
** This variable specifies the default tags applied to messages stored to the NeoMutt record.
** When set to 0 this variable disable the window feature.
*/
- { "nm_replied_tag", DT_STRING, R_NONE, &NmRepliedTag, IP "replied" },
+ { "nm_replied_tag", DT_STRING, R_NONE, &C_NmRepliedTag, IP "replied" },
/*
** .pp
** This variable specifies notmuch tag which is used for replied messages. The
** variable is used to set the replied flag when modifiying tags. All other NeoMutt
** commands use standard (e.g. maildir) flags.
*/
- { "nm_unread_tag", DT_STRING, R_NONE, &NmUnreadTag, IP "unread" },
+ { "nm_unread_tag", DT_STRING, R_NONE, &C_NmUnreadTag, IP "unread" },
/*
** .pp
** This variable specifies notmuch tag which is used for unread messages. The
*/
#endif
#ifdef USE_NNTP
- { "nntp_authenticators", DT_STRING, R_NONE, &NntpAuthenticators, 0 },
+ { "nntp_authenticators", DT_STRING, R_NONE, &C_NntpAuthenticators, 0 },
/*
** .pp
** This is a colon-delimited list of authentication methods NeoMutt may
** the previous methods are unavailable. If a method is available but
** authentication fails, NeoMutt will not connect to the IMAP server.
*/
- { "nntp_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NntpContext, 1000 },
+ { "nntp_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NntpContext, 1000 },
/*
** .pp
** This variable defines number of articles which will be in index when
** number, oldest articles will be ignored. Also controls how many
** articles headers will be saved in cache when you quit newsgroup.
*/
- { "nntp_listgroup", DT_BOOL, R_NONE, &NntpListgroup, true },
+ { "nntp_listgroup", DT_BOOL, R_NONE, &C_NntpListgroup, true },
/*
** .pp
** This variable controls whether or not existence of each article is
** checked when newsgroup is entered.
*/
- { "nntp_load_description", DT_BOOL, R_NONE, &NntpLoadDescription, true },
+ { "nntp_load_description", DT_BOOL, R_NONE, &C_NntpLoadDescription, true },
/*
** .pp
** This variable controls whether or not descriptions for each newsgroup
** must be loaded when newsgroup is added to list (first time list
** loading or new newsgroup adding).
*/
- { "nntp_pass", DT_STRING, R_NONE|F_SENSITIVE, &NntpPass, 0 },
+ { "nntp_pass", DT_STRING, R_NONE|F_SENSITIVE, &C_NntpPass, 0 },
/*
** .pp
** Your password for NNTP account.
*/
- { "nntp_poll", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &NntpPoll, 60 },
+ { "nntp_poll", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_NntpPoll, 60 },
/*
** .pp
** The time in seconds until any operations on newsgroup except post new
** recheck newsgroup on each operation in index (stepping, read article,
** etc.).
*/
- { "nntp_user", DT_STRING, R_NONE|F_SENSITIVE, &NntpUser, 0 },
+ { "nntp_user", DT_STRING, R_NONE|F_SENSITIVE, &C_NntpUser, 0 },
/*
** .pp
** Your login name on the NNTP server. If \fIunset\fP and NNTP server requires
** connect to news server.
*/
#endif
- { "pager", DT_COMMAND, R_NONE, &Pager, IP "builtin" },
+ { "pager", DT_COMMAND, R_NONE, &C_Pager, IP "builtin" },
/*
** .pp
** This variable specifies which pager you would like to use to view
** directly from the pager, and screen resizes cause lines longer than
** the screen width to be badly formatted in the help menu.
*/
- { "pager_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &PagerContext, 0 },
+ { "pager_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_PagerContext, 0 },
/*
** .pp
** This variable controls the number of lines of context that are given
** results. If positive, this many lines will be given before a match,
** if 0, the match will be top-aligned.
*/
- { "pager_format", DT_STRING, R_PAGER, &PagerFormat, IP "-%Z- %C/%m: %-20.20n %s%* -- (%P)" },
+ { "pager_format", DT_STRING, R_PAGER, &C_PagerFormat, IP "-%Z- %C/%m: %-20.20n %s%* -- (%P)" },
/*
** .pp
** This variable controls the format of the one-line message "status"
** pager. The valid sequences are listed in the $$index_format
** section.
*/
- { "pager_index_lines", DT_NUMBER|DT_NOT_NEGATIVE, R_PAGER, &PagerIndexLines, 0 },
+ { "pager_index_lines", DT_NUMBER|DT_NOT_NEGATIVE, R_PAGER, &C_PagerIndexLines, 0 },
/*
** .pp
** Determines the number of lines of a mini-index which is shown when in
** is less than $$pager_index_lines, then the index will only use as
** many lines as it needs.
*/
- { "pager_stop", DT_BOOL, R_NONE, &PagerStop, false },
+ { "pager_stop", DT_BOOL, R_NONE, &C_PagerStop, false },
/*
** .pp
** When \fIset\fP, the internal-pager will \fBnot\fP move to the next message
** when you are at the end of a message and invoke the \fC<next-page>\fP
** function.
*/
- { "pgp_auto_decode", DT_BOOL, R_NONE, &PgpAutoDecode, false },
+ { "pgp_auto_decode", DT_BOOL, R_NONE, &C_PgpAutoDecode, false },
/*
** .pp
** If \fIset\fP, NeoMutt will automatically attempt to decrypt traditional PGP
** checked with the \fC$<check-traditional-pgp>\fP function, NeoMutt will automatically
** check the message for traditional pgp.
*/
- { "pgp_autoinline", DT_BOOL, R_NONE, &PgpAutoinline, false },
+ { "pgp_autoinline", DT_BOOL, R_NONE, &C_PgpAutoinline, false },
/*
** .pp
** This option controls whether NeoMutt generates old-style inline
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_check_exit", DT_BOOL, R_NONE, &PgpCheckExit, true },
+ { "pgp_check_exit", DT_BOOL, R_NONE, &C_PgpCheckExit, true },
/*
** .pp
** If \fIset\fP, NeoMutt will check the exit code of the PGP subprocess when
** subprocess failed.
** (PGP only)
*/
- { "pgp_check_gpg_decrypt_status_fd", DT_BOOL, R_NONE, &PgpCheckGpgDecryptStatusFd, 1 },
+ { "pgp_check_gpg_decrypt_status_fd", DT_BOOL, R_NONE, &C_PgpCheckGpgDecryptStatusFd, 1 },
/*
** .pp
** If \fIset\fP, mutt will check the status file descriptor output
** against $$pgp_decryption_okay.
** (PGP only)
*/
- { "pgp_clearsign_command", DT_COMMAND, R_NONE, &PgpClearsignCommand, 0 },
+ { "pgp_clearsign_command", DT_COMMAND, R_NONE, &C_PgpClearsignCommand, 0 },
/*
** .pp
** This format is used to create an old-style "clearsigned" PGP
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_decode_command", DT_COMMAND, R_NONE, &PgpDecodeCommand, 0 },
+ { "pgp_decode_command", DT_COMMAND, R_NONE, &C_PgpDecodeCommand, 0 },
/*
** .pp
** This format strings specifies a command which is used to decode
** alongside the documentation.
** (PGP only)
*/
- { "pgp_decrypt_command", DT_COMMAND, R_NONE, &PgpDecryptCommand, 0 },
+ { "pgp_decrypt_command", DT_COMMAND, R_NONE, &C_PgpDecryptCommand, 0 },
/*
** .pp
** This command is used to decrypt a PGP encrypted message.
** .pp
** See also: https://github.com/neomutt/neomutt/issues/1014
*/
- { "pgp_decryption_okay", DT_REGEX, R_NONE, &PgpDecryptionOkay, 0 },
+ { "pgp_decryption_okay", DT_REGEX, R_NONE, &C_PgpDecryptionOkay, 0 },
/*
** .pp
** If you assign text to this variable, then an encrypted PGP
** (PGP only)
*/
#endif
- { "pgp_default_key", DT_STRING, R_NONE, &PgpDefaultKey, 0 },
+ { "pgp_default_key", DT_STRING, R_NONE, &C_PgpDefaultKey, 0 },
/*
** .pp
** This is the default key-pair to use for PGP operations. It will be
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_encrypt_only_command", DT_COMMAND, R_NONE, &PgpEncryptOnlyCommand, 0 },
+ { "pgp_encrypt_only_command", DT_COMMAND, R_NONE, &C_PgpEncryptOnlyCommand, 0 },
/*
** .pp
** This command is used to encrypt a body part without signing it.
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_encrypt_sign_command", DT_COMMAND, R_NONE, &PgpEncryptSignCommand, 0 },
+ { "pgp_encrypt_sign_command", DT_COMMAND, R_NONE, &C_PgpEncryptSignCommand, 0 },
/*
** .pp
** This command is used to both sign and encrypt a body part.
** (PGP only)
*/
#endif
- { "pgp_entry_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &PgpEntryFormat, IP "%4n %t%f %4l/0x%k %-4a %2c %u" },
+ { "pgp_entry_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_PgpEntryFormat, IP "%4n %t%f %4l/0x%k %-4a %2c %u" },
/*
** .pp
** This variable allows you to customize the PGP key selection menu to
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_export_command", DT_COMMAND, R_NONE, &PgpExportCommand, 0 },
+ { "pgp_export_command", DT_COMMAND, R_NONE, &C_PgpExportCommand, 0 },
/*
** .pp
** This command is used to export a public key from the user's
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_getkeys_command", DT_COMMAND, R_NONE, &PgpGetkeysCommand, 0 },
+ { "pgp_getkeys_command", DT_COMMAND, R_NONE, &C_PgpGetkeysCommand, 0 },
/*
** .pp
** This command is invoked whenever NeoMutt needs to fetch the public key associated with
** unknown, which is why NeoMutt is invoking this command).
** (PGP only)
*/
- { "pgp_good_sign", DT_REGEX, R_NONE, &PgpGoodSign, 0 },
+ { "pgp_good_sign", DT_REGEX, R_NONE, &C_PgpGoodSign, 0 },
/*
** .pp
** If you assign a text to this variable, then a PGP signature is only
** (PGP only)
*/
#endif
- { "pgp_ignore_subkeys", DT_BOOL, R_NONE, &PgpIgnoreSubkeys, true },
+ { "pgp_ignore_subkeys", DT_BOOL, R_NONE, &C_PgpIgnoreSubkeys, true },
/*
** .pp
** Setting this variable will cause NeoMutt to ignore OpenPGP subkeys. Instead,
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_import_command", DT_COMMAND, R_NONE, &PgpImportCommand, 0 },
+ { "pgp_import_command", DT_COMMAND, R_NONE, &C_PgpImportCommand, 0 },
/*
** .pp
** This command is used to import a key from a message into
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_list_pubring_command", DT_COMMAND, R_NONE, &PgpListPubringCommand, 0 },
+ { "pgp_list_pubring_command", DT_COMMAND, R_NONE, &C_PgpListPubringCommand, 0 },
/*
** .pp
** This command is used to list the public key ring's contents. The
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_list_secring_command", DT_COMMAND, R_NONE, &PgpListSecringCommand, 0 },
+ { "pgp_list_secring_command", DT_COMMAND, R_NONE, &C_PgpListSecringCommand, 0 },
/*
** .pp
** This command is used to list the secret key ring's contents. The
** (PGP only)
*/
#endif
- { "pgp_long_ids", DT_BOOL, R_NONE, &PgpLongIds, true },
+ { "pgp_long_ids", DT_BOOL, R_NONE, &C_PgpLongIds, true },
/*
** .pp
** If \fIset\fP, use 64 bit PGP key IDs, if \fIunset\fP use the normal 32 bit key IDs.
** in the key selection menu and a few other places.
** (PGP only)
*/
- { "pgp_mime_auto", DT_QUAD, R_NONE, &PgpMimeAuto, MUTT_ASKYES },
+ { "pgp_mime_auto", DT_QUAD, R_NONE, &C_PgpMimeAuto, MUTT_ASKYES },
/*
** .pp
** This option controls whether NeoMutt will prompt you for
** \fBdeprecated\fP.
** (PGP only)
*/
- { "pgp_replyinline", DT_BOOL, R_NONE, &PgpReplyinline, false },
+ { "pgp_replyinline", DT_BOOL, R_NONE, &C_PgpReplyinline, false },
/*
** .pp
** Setting this variable will cause NeoMutt to always attempt to
** \fBdeprecated\fP.
** (PGP only)
*/
- { "pgp_retainable_sigs", DT_BOOL, R_NONE, &PgpRetainableSigs, false },
+ { "pgp_retainable_sigs", DT_BOOL, R_NONE, &C_PgpRetainableSigs, false },
/*
** .pp
** If \fIset\fP, signed and encrypted messages will consist of nested
** removed, while the inner \fCmultipart/signed\fP part is retained.
** (PGP only)
*/
- { "pgp_self_encrypt", DT_BOOL, R_NONE, &PgpSelfEncrypt, true },
+ { "pgp_self_encrypt", DT_BOOL, R_NONE, &C_PgpSelfEncrypt, true },
/*
** .pp
** When \fIset\fP, PGP encrypted messages will also be encrypted
** using the key in $$pgp_default_key.
** (PGP only)
*/
- { "pgp_show_unusable", DT_BOOL, R_NONE, &PgpShowUnusable, true },
+ { "pgp_show_unusable", DT_BOOL, R_NONE, &C_PgpShowUnusable, true },
/*
** .pp
** If \fIset\fP, NeoMutt will display non-usable keys on the PGP key selection
** have been marked as "disabled" by the user.
** (PGP only)
*/
- { "pgp_sign_as", DT_STRING, R_NONE, &PgpSignAs, 0 },
+ { "pgp_sign_as", DT_STRING, R_NONE, &C_PgpSignAs, 0 },
/*
** .pp
** If you have a different key pair to use for signing, you should
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_sign_command", DT_COMMAND, R_NONE, &PgpSignCommand, 0 },
+ { "pgp_sign_command", DT_COMMAND, R_NONE, &C_PgpSignCommand, 0 },
/*
** .pp
** This command is used to create the detached PGP signature for a
** (PGP only)
*/
#endif
- { "pgp_sort_keys", DT_SORT|DT_SORT_KEYS, R_NONE, &PgpSortKeys, SORT_ADDRESS },
+ { "pgp_sort_keys", DT_SORT|DT_SORT_KEYS, R_NONE, &C_PgpSortKeys, SORT_ADDRESS },
/*
** .pp
** Specifies how the entries in the pgp menu are sorted. The
** "reverse-".
** (PGP only)
*/
- { "pgp_strict_enc", DT_BOOL, R_NONE, &PgpStrictEnc, true },
+ { "pgp_strict_enc", DT_BOOL, R_NONE, &C_PgpStrictEnc, true },
/*
** .pp
** If \fIset\fP, NeoMutt will automatically encode PGP/MIME signed messages as
** (PGP only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_PGP
- { "pgp_timeout", DT_LONG|DT_NOT_NEGATIVE, R_NONE, &PgpTimeout, 300 },
+ { "pgp_timeout", DT_LONG|DT_NOT_NEGATIVE, R_NONE, &C_PgpTimeout, 300 },
/*
** .pp
** The number of seconds after which a cached passphrase will expire if
** not used.
** (PGP only)
*/
- { "pgp_use_gpg_agent", DT_BOOL, R_NONE, &PgpUseGpgAgent, true },
+ { "pgp_use_gpg_agent", DT_BOOL, R_NONE, &C_PgpUseGpgAgent, true },
/*
** .pp
** If \fIset\fP, NeoMutt expects a \fCgpg-agent(1)\fP process will handle
** \fIunset\fP this variable.
** (PGP only)
*/
- { "pgp_verify_command", DT_COMMAND, R_NONE, &PgpVerifyCommand, 0 },
+ { "pgp_verify_command", DT_COMMAND, R_NONE, &C_PgpVerifyCommand, 0 },
/*
** .pp
** This command is used to verify PGP signatures.
** possible \fCprintf(3)\fP-like sequences.
** (PGP only)
*/
- { "pgp_verify_key_command", DT_COMMAND, R_NONE, &PgpVerifyKeyCommand, 0 },
+ { "pgp_verify_key_command", DT_COMMAND, R_NONE, &C_PgpVerifyKeyCommand, 0 },
/*
** .pp
** This command is used to verify key information from the key selection
** (PGP only)
*/
#endif
- { "pipe_decode", DT_BOOL, R_NONE, &PipeDecode, false },
+ { "pipe_decode", DT_BOOL, R_NONE, &C_PipeDecode, false },
/*
** .pp
** Used in connection with the \fC<pipe-message>\fP command. When \fIunset\fP,
** will weed headers and will attempt to decode the messages
** first.
*/
- { "pipe_sep", DT_STRING, R_NONE, &PipeSep, IP "\n" },
+ { "pipe_sep", DT_STRING, R_NONE, &C_PipeSep, IP "\n" },
/*
** .pp
** The separator to add between messages when piping a list of tagged
** messages to an external Unix command.
*/
- { "pipe_split", DT_BOOL, R_NONE, &PipeSplit, false },
+ { "pipe_split", DT_BOOL, R_NONE, &C_PipeSplit, false },
/*
** .pp
** Used in connection with the \fC<pipe-message>\fP function following
** and the $$pipe_sep separator is added after each message.
*/
#ifdef USE_POP
- { "pop_auth_try_all", DT_BOOL, R_NONE, &PopAuthTryAll, true },
+ { "pop_auth_try_all", DT_BOOL, R_NONE, &C_PopAuthTryAll, true },
/*
** .pp
** If \fIset\fP, NeoMutt will try all available authentication methods.
** methods if the previous methods are unavailable. If a method is
** available but authentication fails, NeoMutt will not connect to the POP server.
*/
- { "pop_authenticators", DT_STRING, R_NONE, &PopAuthenticators, 0 },
+ { "pop_authenticators", DT_STRING, R_NONE, &C_PopAuthenticators, 0 },
/*
** .pp
** This is a colon-delimited list of authentication methods NeoMutt may
** set pop_authenticators="digest-md5:apop:user"
** .te
*/
- { "pop_checkinterval", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &PopCheckinterval, 60 },
+ { "pop_checkinterval", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_PopCheckinterval, 60 },
/*
** .pp
** This variable configures how often (in seconds) NeoMutt should look for
** new mail in the currently selected mailbox if it is a POP mailbox.
*/
- { "pop_delete", DT_QUAD, R_NONE, &PopDelete, MUTT_ASKNO },
+ { "pop_delete", DT_QUAD, R_NONE, &C_PopDelete, MUTT_ASKNO },
/*
** .pp
** If \fIset\fP, NeoMutt will delete successfully downloaded messages from the POP
** server when using the \fC$<fetch-mail>\fP function. When \fIunset\fP, NeoMutt will
** download messages but also leave them on the POP server.
*/
- { "pop_host", DT_STRING, R_NONE, &PopHost, 0 },
+ { "pop_host", DT_STRING, R_NONE, &C_PopHost, 0 },
/*
** .pp
** The name of your POP server for the \fC$<fetch-mail>\fP function. You
** .pp
** where "[...]" denotes an optional part.
*/
- { "pop_last", DT_BOOL, R_NONE, &PopLast, false },
+ { "pop_last", DT_BOOL, R_NONE, &C_PopLast, false },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will try to use the "\fCLAST\fP" POP command
** for retrieving only unread messages from the POP server when using
** the \fC$<fetch-mail>\fP function.
*/
- { "pop_oauth_refresh_command", DT_STRING, R_NONE, &PopOauthRefreshCmd, 0 },
+ { "pop_oauth_refresh_command", DT_STRING, R_NONE, &C_PopOauthRefreshCmd, 0 },
/*
** .pp
** The command to run to generate an OAUTH refresh token for
** run on every connection attempt that uses the OAUTHBEARER authentication
** mechanism. See "$oauth" for details.
*/
- { "pop_pass", DT_STRING, R_NONE|F_SENSITIVE, &PopPass, 0 },
+ { "pop_pass", DT_STRING, R_NONE|F_SENSITIVE, &C_PopPass, 0 },
/*
** .pp
** Specifies the password for your POP account. If \fIunset\fP, NeoMutt will
** fairly secure machine, because the superuser can read your neomuttrc
** even if you are the only one who can read the file.
*/
- { "pop_reconnect", DT_QUAD, R_NONE, &PopReconnect, MUTT_ASKYES },
+ { "pop_reconnect", DT_QUAD, R_NONE, &C_PopReconnect, MUTT_ASKYES },
/*
** .pp
** Controls whether or not NeoMutt will try to reconnect to the POP server if
** the connection is lost.
*/
- { "pop_user", DT_STRING, R_NONE|F_SENSITIVE, &PopUser, 0 },
+ { "pop_user", DT_STRING, R_NONE|F_SENSITIVE, &C_PopUser, 0 },
/*
** .pp
** Your login name on the POP server.
** This variable defaults to your user name on the local machine.
*/
#endif /* USE_POP */
- { "post_indent_string", DT_STRING, R_NONE, &PostIndentString, 0 },
+ { "post_indent_string", DT_STRING, R_NONE, &C_PostIndentString, 0 },
/*
** .pp
** Similar to the $$attribution variable, NeoMutt will append this
** string after the inclusion of a message which is being replied to.
*/
#ifdef USE_NNTP
- { "post_moderated", DT_QUAD, R_NONE, &PostModerated, MUTT_ASKYES },
+ { "post_moderated", DT_QUAD, R_NONE, &C_PostModerated, MUTT_ASKYES },
/*
** .pp
** If set to \fIyes\fP, NeoMutt will post article to newsgroup that have
** posting will not have an effect.
*/
#endif
- { "postpone", DT_QUAD, R_NONE, &Postpone, MUTT_ASKYES },
+ { "postpone", DT_QUAD, R_NONE, &C_Postpone, MUTT_ASKYES },
/*
** .pp
** Controls whether or not messages are saved in the $$postponed
** .pp
** Also see the $$recall variable.
*/
- { "postpone_encrypt", DT_BOOL, R_NONE, &PostponeEncrypt, false },
+ { "postpone_encrypt", DT_BOOL, R_NONE, &C_PostponeEncrypt, false },
/*
** .pp
** When \fIset\fP, postponed messages that are marked for encryption will be
** set, it will try the deprecated $$postpone_encrypt_as.
** (Crypto only)
*/
- { "postpone_encrypt_as", DT_STRING, R_NONE, &PostponeEncryptAs, 0 },
+ { "postpone_encrypt_as", DT_STRING, R_NONE, &C_PostponeEncryptAs, 0 },
/*
** .pp
** This is a deprecated fall-back variable for $$postpone_encrypt.
** Please use $$pgp_default_key or $$smime_default_key.
** (Crypto only)
*/
- { "postponed", DT_PATH|DT_MAILBOX, R_INDEX, &Postponed, IP "~/postponed" },
+ { "postponed", DT_PATH|DT_MAILBOX, R_INDEX, &C_Postponed, IP "~/postponed" },
/*
** .pp
** NeoMutt allows you to indefinitely "$postpone sending a message" which
** Also see the $$postpone variable.
*/
#ifdef USE_SOCKET
- { "preconnect", DT_STRING, R_NONE, &Preconnect, 0 },
+ { "preconnect", DT_STRING, R_NONE, &C_Preconnect, 0 },
/*
** .pp
** If \fIset\fP, a shell command to be executed if NeoMutt fails to establish
** remote machine without having to enter a password.
*/
#endif /* USE_SOCKET */
- { "preferred_languages", DT_STRING, R_NONE, &PreferredLanguages, 0 },
+ { "preferred_languages", DT_STRING, R_NONE, &C_PreferredLanguages, 0 },
/*
** .pp
** RFC8255 : user preferred languages to be search in parts and display
** Ex. : set preferred_languages="en,fr,de"
*/
- { "print", DT_QUAD, R_NONE, &Print, MUTT_ASKNO },
+ { "print", DT_QUAD, R_NONE, &C_Print, MUTT_ASKNO },
/*
** .pp
** Controls whether or not NeoMutt really prints messages.
** This is set to "ask-no" by default, because some people
** accidentally hit "p" often.
*/
- { "print_command", DT_COMMAND, R_NONE, &PrintCommand, IP "lpr" },
+ { "print_command", DT_COMMAND, R_NONE, &C_PrintCommand, IP "lpr" },
/*
** .pp
** This specifies the command pipe that should be used to print messages.
*/
- { "print_decode", DT_BOOL, R_NONE, &PrintDecode, true },
+ { "print_decode", DT_BOOL, R_NONE, &C_PrintDecode, true },
/*
** .pp
** Used in connection with the \fC<print-message>\fP command. If this
** some advanced printer filter which is able to properly format
** e-mail messages for printing.
*/
- { "print_split", DT_BOOL, R_NONE, &PrintSplit, false },
+ { "print_split", DT_BOOL, R_NONE, &C_PrintSplit, false },
/*
** .pp
** Used in connection with the \fC<print-message>\fP command. If this option
** Those who use the \fCenscript\fP(1) program's mail-printing mode will
** most likely want to \fIset\fP this option.
*/
- { "prompt_after", DT_BOOL, R_NONE, &PromptAfter, true },
+ { "prompt_after", DT_BOOL, R_NONE, &C_PromptAfter, true },
/*
** .pp
** If you use an \fIexternal\fP $$pager, setting this variable will
** than returning to the index menu. If \fIunset\fP, NeoMutt will return to the
** index menu when the external pager exits.
*/
- { "query_command", DT_COMMAND, R_NONE, &QueryCommand, 0 },
+ { "query_command", DT_COMMAND, R_NONE, &C_QueryCommand, 0 },
/*
** .pp
** This specifies the command NeoMutt will use to make external address
** the string, NeoMutt will append the user's query to the end of the string.
** See "$query" for more information.
*/
- { "query_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &QueryFormat, IP "%4c %t %-25.25a %-25.25n %?e?(%e)?" },
+ { "query_format", DT_STRING|DT_NOT_EMPTY, R_NONE, &C_QueryFormat, IP "%4c %t %-25.25a %-25.25n %?e?(%e)?" },
/*
** .pp
** This variable describes the format of the "query" menu. The
** .pp
** * = can be optionally printed if nonzero, see the $$status_format documentation.
*/
- { "quit", DT_QUAD, R_NONE, &Quit, MUTT_YES },
+ { "quit", DT_QUAD, R_NONE, &C_Quit, MUTT_YES },
/*
** .pp
** This variable controls whether "quit" and "exit" actually quit
** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
** prompted for confirmation when you try to quit.
*/
- { "quote_regex", DT_REGEX, R_PAGER, &QuoteRegex, IP "^([ \t]*[|>:}#])+" },
+ { "quote_regex", DT_REGEX, R_PAGER, &C_QuoteRegex, IP "^([ \t]*[|>:}#])+" },
/*
** .pp
** A regular expression used in the internal pager to determine quoted
** .pp
** Match detection may be overridden by the $$smileys regular expression.
*/
- { "read_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &ReadInc, 10 },
+ { "read_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_ReadInc, 10 },
/*
** .pp
** If set to a value greater than 0, NeoMutt will display which message it
** Also see the $$write_inc, $$net_inc and $$time_inc variables and the
** "$tuning" section of the manual for performance considerations.
*/
- { "read_only", DT_BOOL, R_NONE, &ReadOnly, false },
+ { "read_only", DT_BOOL, R_NONE, &C_ReadOnly, false },
/*
** .pp
** If \fIset\fP, all folders are opened in read-only mode.
*/
- { "realname", DT_STRING, R_BOTH, &Realname, 0 },
+ { "realname", DT_STRING, R_BOTH, &C_Realname, 0 },
/*
** .pp
** This variable specifies what "real" or "personal" name should be used
** If not specified, then the user's "real name" will be read from \fC/etc/passwd\fP.
** This option will not be used, if "$$from" is set.
*/
- { "recall", DT_QUAD, R_NONE, &Recall, MUTT_ASKYES },
+ { "recall", DT_QUAD, R_NONE, &C_Recall, MUTT_ASKYES },
/*
** .pp
** Controls whether or not NeoMutt recalls postponed messages
** .pp
** Also see $$postponed variable.
*/
- { "record", DT_PATH|DT_MAILBOX, R_NONE, &Record, IP "~/sent" },
+ { "record", DT_PATH|DT_MAILBOX, R_NONE, &C_Record, IP "~/sent" },
/*
** .pp
** This specifies the file into which your outgoing messages should be
** The value of \fI$$record\fP is overridden by the $$force_name and
** $$save_name variables, and the "$fcc-hook" command. Also see $$copy.
*/
- { "reflow_space_quotes", DT_BOOL, R_NONE, &ReflowSpaceQuotes, true },
+ { "reflow_space_quotes", DT_BOOL, R_NONE, &C_ReflowSpaceQuotes, true },
/*
** .pp
** This option controls how quotes from format=flowed messages are displayed
** \fBNote:\fP If $$reflow_text is \fIunset\fP, this option has no effect.
** Also, this option does not affect replies when $$text_flowed is \fIset\fP.
*/
- { "reflow_text", DT_BOOL, R_NONE, &ReflowText, true },
+ { "reflow_text", DT_BOOL, R_NONE, &C_ReflowText, true },
/*
** .pp
** When \fIset\fP, NeoMutt will reformat paragraphs in text/plain
** .pp
** Also see $$reflow_wrap, and $$wrap.
*/
- { "reflow_wrap", DT_NUMBER, R_NONE, &ReflowWrap, 78 },
+ { "reflow_wrap", DT_NUMBER, R_NONE, &C_ReflowWrap, 78 },
/*
** .pp
** This variable controls the maximum paragraph width when reformatting text/plain
** .pp
** Also see $$wrap.
*/
- { "reply_regex", DT_REGEX, R_INDEX|R_RESORT, &ReplyRegex, IP "^((re|aw|sv)(\\[[0-9]+\\])*:[ \t]*)*", reply_validator },
+ { "reply_regex", DT_REGEX, R_INDEX|R_RESORT, &C_ReplyRegex, IP "^((re|aw|sv)(\\[[0-9]+\\])*:[ \t]*)*", reply_validator },
/*
** .pp
** A regular expression used to recognize reply messages when threading
** and replying. The default value corresponds to the English "Re:", the
** German "Aw:" and the Swedish "Sv:".
*/
- { "reply_self", DT_BOOL, R_NONE, &ReplySelf, false },
+ { "reply_self", DT_BOOL, R_NONE, &C_ReplySelf, false },
/*
** .pp
** If \fIunset\fP and you are replying to a message sent by you, NeoMutt will
** .pp
** Also see the "$alternates" command.
*/
- { "reply_to", DT_QUAD, R_NONE, &ReplyTo, MUTT_ASKYES },
+ { "reply_to", DT_QUAD, R_NONE, &C_ReplyTo, MUTT_ASKYES },
/*
** .pp
** If \fIset\fP, when replying to a message, NeoMutt will use the address listed
** header field to the list address and you want to send a private
** message to the author of a message.
*/
- { "reply_with_xorig", DT_BOOL, R_NONE, &ReplyWithXorig, false },
+ { "reply_with_xorig", DT_BOOL, R_NONE, &C_ReplyWithXorig, false },
/*
** .pp
** This variable provides a toggle. When active, the From: header will be
** Assuming 'fast_reply' is disabled, this option will prompt the user with a
** prefilled From: header.
*/
- { "resolve", DT_BOOL, R_NONE, &Resolve, true },
+ { "resolve", DT_BOOL, R_NONE, &C_Resolve, true },
/*
** .pp
** When \fIset\fP, the cursor will be automatically advanced to the next
** (possibly undeleted) message whenever a command that modifies the
** current message is executed.
*/
- { "resume_draft_files", DT_BOOL, R_NONE, &ResumeDraftFiles, false },
+ { "resume_draft_files", DT_BOOL, R_NONE, &C_ResumeDraftFiles, false },
/*
** .pp
** If \fIset\fP, draft files (specified by \fC-H\fP on the command
** evaluated; no alias expansion takes place; user-defined headers
** and signatures are not added to the message.
*/
- { "resume_edited_draft_files", DT_BOOL, R_NONE, &ResumeEditedDraftFiles, true },
+ { "resume_edited_draft_files", DT_BOOL, R_NONE, &C_ResumeEditedDraftFiles, true },
/*
** .pp
** If \fIset\fP, draft files previously edited (via \fC-E -H\fP on
** user-defined headers, and other processing effects from being
** made multiple times to the draft file.
*/
- { "reverse_alias", DT_BOOL, R_BOTH, &ReverseAlias, false },
+ { "reverse_alias", DT_BOOL, R_BOTH, &C_ReverseAlias, false },
/*
** .pp
** This variable controls whether or not NeoMutt will display the "personal"
** "abd30425@somewhere.net." This is useful when the person's e-mail
** address is not human friendly.
*/
- { "reverse_name", DT_BOOL, R_BOTH, &ReverseName, false },
+ { "reverse_name", DT_BOOL, R_BOTH, &C_ReverseName, false },
/*
** .pp
** It may sometimes arrive that you receive mail to a certain machine,
** .pp
** Also see the "$alternates" command.
*/
- { "reverse_realname", DT_BOOL, R_BOTH, &ReverseRealname, true },
+ { "reverse_realname", DT_BOOL, R_BOTH, &C_ReverseRealname, true },
/*
** .pp
** This variable fine-tunes the behavior of the $$reverse_name feature.
** possibly including eventual real names. When it is \fIunset\fP, NeoMutt will
** override any such real names with the setting of the $$realname variable.
*/
- { "rfc2047_parameters", DT_BOOL, R_NONE, &Rfc2047Parameters, false },
+ { "rfc2047_parameters", DT_BOOL, R_NONE, &C_Rfc2047Parameters, false },
/*
** .pp
** When this variable is \fIset\fP, NeoMutt will decode RFC2047-encoded MIME
** that NeoMutt \fIgenerates\fP this kind of encoding. Instead, NeoMutt will
** unconditionally use the encoding specified in RFC2231.
*/
- { "save_address", DT_BOOL, R_NONE, &SaveAddress, false },
+ { "save_address", DT_BOOL, R_NONE, &C_SaveAddress, false },
/*
** .pp
** If \fIset\fP, NeoMutt will take the sender's full address when choosing a
** default folder for saving a mail. If $$save_name or $$force_name
** is \fIset\fP too, the selection of the Fcc folder will be changed as well.
*/
- { "save_empty", DT_BOOL, R_NONE, &SaveEmpty, true },
+ { "save_empty", DT_BOOL, R_NONE, &C_SaveEmpty, true },
/*
** .pp
** When \fIunset\fP, mailboxes which contain no saved messages will be removed
** \fBNote:\fP This only applies to mbox and MMDF folders, NeoMutt does not
** delete MH and Maildir directories.
*/
- { "save_history", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SaveHistory, 0 },
+ { "save_history", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SaveHistory, 0 },
/*
** .pp
** This variable controls the size of the history (per category) saved in the
** $$history_file file.
*/
- { "save_name", DT_BOOL, R_NONE, &SaveName, false },
+ { "save_name", DT_BOOL, R_NONE, &C_SaveName, false },
/*
** .pp
** This variable controls how copies of outgoing messages are saved.
** Also see the $$force_name variable.
*/
#ifdef USE_NNTP
- { "save_unsubscribed", DT_BOOL, R_NONE, &SaveUnsubscribed, false },
+ { "save_unsubscribed", DT_BOOL, R_NONE, &C_SaveUnsubscribed, false },
/*
** .pp
** When \fIset\fP, info about unsubscribed newsgroups will be saved into
** "newsrc" file and into cache.
*/
#endif
- { "score", DT_BOOL, R_NONE, &Score, true },
+ { "score", DT_BOOL, R_NONE, &C_Score, true },
/*
** .pp
** When this variable is \fIunset\fP, scoring is turned off. This can
** be useful to selectively disable scoring for certain folders when the
** $$score_threshold_delete variable and related are used.
*/
- { "score_threshold_delete", DT_NUMBER, R_NONE, &ScoreThresholdDelete, -1 },
+ { "score_threshold_delete", DT_NUMBER, R_NONE, &C_ScoreThresholdDelete, -1 },
/*
** .pp
** Messages which have been assigned a score equal to or lower than the value
** NeoMutt scores are always greater than or equal to zero, the default setting
** of this variable will never mark a message for deletion.
*/
- { "score_threshold_flag", DT_NUMBER, R_NONE, &ScoreThresholdFlag, 9999 },
+ { "score_threshold_flag", DT_NUMBER, R_NONE, &C_ScoreThresholdFlag, 9999 },
/*
** .pp
** Messages which have been assigned a score greater than or equal to this
** variable's value are automatically marked "flagged".
*/
- { "score_threshold_read", DT_NUMBER, R_NONE, &ScoreThresholdRead, -1 },
+ { "score_threshold_read", DT_NUMBER, R_NONE, &C_ScoreThresholdRead, -1 },
/*
** .pp
** Messages which have been assigned a score equal to or lower than the value
** NeoMutt scores are always greater than or equal to zero, the default setting
** of this variable will never mark a message read.
*/
- { "search_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SearchContext, 0 },
+ { "search_context", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SearchContext, 0 },
/*
** .pp
** For the pager, this variable specifies the number of lines shown
** before search results. By default, search results will be top-aligned.
*/
- { "send_charset", DT_STRING, R_NONE, &SendCharset, IP "us-ascii:iso-8859-1:utf-8", charset_validator },
+ { "send_charset", DT_STRING, R_NONE, &C_SendCharset, IP "us-ascii:iso-8859-1:utf-8", charset_validator },
/*
** .pp
** A colon-delimited list of character sets for outgoing messages. NeoMutt will use the
** In case the text cannot be converted into one of these exactly,
** NeoMutt uses $$charset as a fallback.
*/
- { "sendmail", DT_COMMAND, R_NONE, &Sendmail, IP SENDMAIL " -oem -oi" },
+ { "sendmail", DT_COMMAND, R_NONE, &C_Sendmail, IP SENDMAIL " -oem -oi" },
/*
** .pp
** Specifies the program and arguments used to deliver mail sent by NeoMutt.
** flags, such as for $$use_8bitmime, $$use_envelope_from,
** $$dsn_notify, or $$dsn_return will be added before the delimiter.
*/
- { "sendmail_wait", DT_NUMBER, R_NONE, &SendmailWait, 0 },
+ { "sendmail_wait", DT_NUMBER, R_NONE, &C_SendmailWait, 0 },
/*
** .pp
** Specifies the number of seconds to wait for the $$sendmail process
** process will be put in a temporary file. If there is some error, you
** will be informed as to where to find the output.
*/
- { "shell", DT_COMMAND, R_NONE, &Shell, IP "/bin/sh" },
+ { "shell", DT_COMMAND, R_NONE, &C_Shell, IP "/bin/sh" },
/*
** .pp
** Command to use when spawning a subshell.
** If not specified, then the user's login shell from \fC/etc/passwd\fP is used.
*/
- { "show_multipart_alternative", DT_STRING, R_NONE, &ShowMultipartAlternative, 0, multipart_validator },
+ { "show_multipart_alternative", DT_STRING, R_NONE, &C_ShowMultipartAlternative, 0, multipart_validator },
/*
** .pp
** When \fIset\fP to \fCinfo\fP, the multipart/alternative information is shown.
** When not set, the default behavior is to show only the chosen alternative.
*/
#ifdef USE_NNTP
- { "show_new_news", DT_BOOL, R_NONE, &ShowNewNews, true },
+ { "show_new_news", DT_BOOL, R_NONE, &C_ShowNewNews, true },
/*
** .pp
** If \fIset\fP, news server will be asked for new newsgroups on entering
** Also controls whether or not number of new articles of subscribed
** newsgroups will be then checked.
*/
- { "show_only_unread", DT_BOOL, R_NONE, &ShowOnlyUnread, false },
+ { "show_only_unread", DT_BOOL, R_NONE, &C_ShowOnlyUnread, false },
/*
** .pp
** If \fIset\fP, only subscribed newsgroups that contain unread articles
*/
#endif
#ifdef USE_SIDEBAR
- { "sidebar_component_depth", DT_NUMBER, R_SIDEBAR, &SidebarComponentDepth, 0 },
+ { "sidebar_component_depth", DT_NUMBER, R_SIDEBAR, &C_SidebarComponentDepth, 0 },
/*
** .pp
** By default the sidebar will show the mailbox's path, relative to the
** .pp
** \fBSee also:\fP $$sidebar_short_path
*/
- { "sidebar_delim_chars", DT_STRING, R_SIDEBAR, &SidebarDelimChars, IP "/." },
+ { "sidebar_delim_chars", DT_STRING, R_SIDEBAR, &C_SidebarDelimChars, IP "/." },
/*
** .pp
** This contains the list of characters which you would like to treat
** .pp
** \fBSee also:\fP $$sidebar_short_path, $$sidebar_folder_indent, $$sidebar_indent_string.
*/
- { "sidebar_divider_char", DT_STRING, R_SIDEBAR, &SidebarDividerChar, 0 },
+ { "sidebar_divider_char", DT_STRING, R_SIDEBAR, &C_SidebarDividerChar, 0 },
/*
** .pp
** This specifies the characters to be drawn between the sidebar (when
** visible) and the other NeoMutt panels. ASCII and Unicode line-drawing
** characters are supported.
*/
- { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, &SidebarFolderIndent, false },
+ { "sidebar_folder_indent", DT_BOOL, R_SIDEBAR, &C_SidebarFolderIndent, false },
/*
** .pp
** Set this to indent mailboxes in the sidebar.
** .pp
** \fBSee also:\fP $$sidebar_short_path, $$sidebar_indent_string, $$sidebar_delim_chars.
*/
- { "sidebar_format", DT_STRING|DT_NOT_EMPTY, R_SIDEBAR, &SidebarFormat, IP "%B%* %n" },
+ { "sidebar_format", DT_STRING|DT_NOT_EMPTY, R_SIDEBAR, &C_SidebarFormat, IP "%B%* %n" },
/*
** .pp
** This variable allows you to customize the sidebar display. This string is
** be \fIset\fP. When thus set, a suggested value for this option is
** "%B%?F? [%F]?%* %?N?%N/?%S".
*/
- { "sidebar_indent_string", DT_STRING, R_SIDEBAR, &SidebarIndentString, IP " " },
+ { "sidebar_indent_string", DT_STRING, R_SIDEBAR, &C_SidebarIndentString, IP " " },
/*
** .pp
** This specifies the string that is used to indent mailboxes in the sidebar.
** .pp
** \fBSee also:\fP $$sidebar_short_path, $$sidebar_folder_indent, $$sidebar_delim_chars.
*/
- { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, &SidebarNewMailOnly, false },
+ { "sidebar_new_mail_only", DT_BOOL, R_SIDEBAR, &C_SidebarNewMailOnly, false },
/*
** .pp
** When set, the sidebar will only display mailboxes containing new, or
** .pp
** \fBSee also:\fP $sidebar_whitelist.
*/
- { "sidebar_next_new_wrap", DT_BOOL, R_NONE, &SidebarNextNewWrap, false },
+ { "sidebar_next_new_wrap", DT_BOOL, R_NONE, &C_SidebarNextNewWrap, false },
/*
** .pp
** When set, the \fC<sidebar-next-new>\fP command will not stop and the end of
** \fC<sidebar-prev-new>\fP command is similarly affected, wrapping around to
** the end of the list.
*/
- { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, &SidebarOnRight, false },
+ { "sidebar_on_right", DT_BOOL, R_BOTH|R_REFLOW, &C_SidebarOnRight, false },
/*
** .pp
** When set, the sidebar will appear on the right-hand side of the screen.
*/
- { "sidebar_short_path", DT_BOOL, R_SIDEBAR, &SidebarShortPath, false },
+ { "sidebar_short_path", DT_BOOL, R_SIDEBAR, &C_SidebarShortPath, false },
/*
** .pp
** By default the sidebar will show the mailbox's path, relative to the
** \fBSee also:\fP $$sidebar_delim_chars, $$sidebar_folder_indent,
** $$sidebar_indent_string, $$sidebar_component_depth.
*/
- { "sidebar_sort_method", DT_SORT|DT_SORT_SIDEBAR, R_SIDEBAR, &SidebarSortMethod, SORT_ORDER },
+ { "sidebar_sort_method", DT_SORT|DT_SORT_SIDEBAR, R_SIDEBAR, &C_SidebarSortMethod, SORT_ORDER },
/*
** .pp
** Specifies how to sort entries in the file browser. By default, the
** You may optionally use the "reverse-" prefix to specify reverse sorting
** order (example: "\fCset sort_browser=reverse-date\fP").
*/
- { "sidebar_visible", DT_BOOL, R_REFLOW, &SidebarVisible, false },
+ { "sidebar_visible", DT_BOOL, R_REFLOW, &C_SidebarVisible, false },
/*
** .pp
** This specifies whether or not to show sidebar. The sidebar shows a list of
** .pp
** \fBSee also:\fP $$sidebar_format, $$sidebar_width
*/
- { "sidebar_width", DT_NUMBER|DT_NOT_NEGATIVE, R_REFLOW, &SidebarWidth, 30 },
+ { "sidebar_width", DT_NUMBER|DT_NOT_NEGATIVE, R_REFLOW, &C_SidebarWidth, 30 },
/*
** .pp
** This controls the width of the sidebar. It is measured in screen columns.
** Chinese characters.
*/
#endif
- { "sig_dashes", DT_BOOL, R_NONE, &SigDashes, true },
+ { "sig_dashes", DT_BOOL, R_NONE, &C_SigDashes, true },
/*
** .pp
** If \fIset\fP, a line containing "-- " (note the trailing space) will be inserted before your
** detect your signature. For example, NeoMutt has the ability to highlight
** the signature in a different color in the built-in pager.
*/
- { "sig_on_top", DT_BOOL, R_NONE, &SigOnTop, false },
+ { "sig_on_top", DT_BOOL, R_NONE, &C_SigOnTop, false },
/*
** .pp
** If \fIset\fP, the signature will be included before any quoted or forwarded
** unless you really know what you are doing, and are prepared to take
** some heat from netiquette guardians.
*/
- { "signature", DT_PATH, R_NONE, &Signature, IP "~/.signature" },
+ { "signature", DT_PATH, R_NONE, &C_Signature, IP "~/.signature" },
/*
** .pp
** Specifies the filename of your signature, which is appended to all
** assumed that filename is a shell command and input should be read from
** its standard output.
*/
- { "simple_search", DT_STRING, R_NONE, &SimpleSearch, IP "~f %s | ~s %s" },
+ { "simple_search", DT_STRING, R_NONE, &C_SimpleSearch, IP "~f %s | ~s %s" },
/*
** .pp
** Specifies how NeoMutt should expand a simple search into a real search
** replacing "%s" with the supplied string.
** For the default value, "joe" would be expanded to: "~f joe | ~s joe".
*/
- { "skip_quoted_offset", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SkipQuotedOffset, 0 },
+ { "skip_quoted_offset", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SkipQuotedOffset, 0 },
/*
** .pp
** Lines of quoted text that are displayed before the unquoted text after
** "skip to quoted" command (S)
*/
- { "sleep_time", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SleepTime, 1 },
+ { "sleep_time", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SleepTime, 1 },
/*
** .pp
** Specifies time, in seconds, to pause while displaying certain informational
** messages from the current folder. The default is to pause one second, so
** a value of zero for this option suppresses the pause.
*/
- { "smart_wrap", DT_BOOL, R_PAGER_FLOW, &SmartWrap, true },
+ { "smart_wrap", DT_BOOL, R_PAGER_FLOW, &C_SmartWrap, true },
/*
** .pp
** Controls the display of lines longer than the screen width in the
** \fIunset\fP, lines are simply wrapped at the screen edge. Also see the
** $$markers variable.
*/
- { "smileys", DT_REGEX, R_PAGER, &Smileys, IP "(>From )|(:[-^]?[][)(><}{|/DP])" },
+ { "smileys", DT_REGEX, R_PAGER, &C_Smileys, IP "(>From )|(:[-^]?[][)(><}{|/DP])" },
/*
** .pp
** The \fIpager\fP uses this variable to catch some common false
** happens at the beginning of a line.
*/
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
- { "smime_ask_cert_label", DT_BOOL, R_NONE, &SmimeAskCertLabel, true },
+ { "smime_ask_cert_label", DT_BOOL, R_NONE, &C_SmimeAskCertLabel, true },
/*
** .pp
** This flag controls whether you want to be asked to enter a label
** \fIset\fP by default.
** (S/MIME only)
*/
- { "smime_ca_location", DT_PATH, R_NONE, &SmimeCaLocation, 0 },
+ { "smime_ca_location", DT_PATH, R_NONE, &C_SmimeCaLocation, 0 },
/*
** .pp
** This variable contains the name of either a directory, or a file which
** contains trusted certificates for use with OpenSSL.
** (S/MIME only)
*/
- { "smime_certificates", DT_PATH, R_NONE, &SmimeCertificates, 0 },
+ { "smime_certificates", DT_PATH, R_NONE, &C_SmimeCertificates, 0 },
/*
** .pp
** Since for S/MIME there is no pubring/secring as with PGP, NeoMutt has to handle
** the location of the certificates.
** (S/MIME only)
*/
- { "smime_decrypt_command", DT_COMMAND, R_NONE, &SmimeDecryptCommand, 0 },
+ { "smime_decrypt_command", DT_COMMAND, R_NONE, &C_SmimeDecryptCommand, 0 },
/*
** .pp
** This format string specifies a command which is used to decrypt
** alongside the documentation.
** (S/MIME only)
*/
- { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, &SmimeDecryptUseDefaultKey, true },
+ { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, &C_SmimeDecryptUseDefaultKey, true },
/*
** .pp
** If \fIset\fP (default) this tells NeoMutt to use the default key for decryption. Otherwise,
** (S/MIME only)
*/
#endif
- { "smime_default_key", DT_STRING, R_NONE, &SmimeDefaultKey, 0 },
+ { "smime_default_key", DT_STRING, R_NONE, &C_SmimeDefaultKey, 0 },
/*
** .pp
** This is the default key-pair to use for S/MIME operations, and must be
** (S/MIME only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
- { "smime_encrypt_command", DT_COMMAND, R_NONE, &SmimeEncryptCommand, 0 },
+ { "smime_encrypt_command", DT_COMMAND, R_NONE, &C_SmimeEncryptCommand, 0 },
/*
** .pp
** This command is used to create encrypted S/MIME messages.
** (S/MIME only)
*/
#endif
- { "smime_encrypt_with", DT_STRING, R_NONE, &SmimeEncryptWith, IP "aes256" },
+ { "smime_encrypt_with", DT_STRING, R_NONE, &C_SmimeEncryptWith, IP "aes256" },
/*
** .pp
** This sets the algorithm that should be used for encryption.
** (S/MIME only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
- { "smime_get_cert_command", DT_COMMAND, R_NONE, &SmimeGetCertCommand, 0 },
+ { "smime_get_cert_command", DT_COMMAND, R_NONE, &C_SmimeGetCertCommand, 0 },
/*
** .pp
** This command is used to extract X509 certificates from a PKCS7 structure.
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_get_cert_email_command", DT_COMMAND, R_NONE, &SmimeGetCertEmailCommand, 0 },
+ { "smime_get_cert_email_command", DT_COMMAND, R_NONE, &C_SmimeGetCertEmailCommand, 0 },
/*
** .pp
** This command is used to extract the mail address(es) used for storing
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_get_signer_cert_command", DT_COMMAND, R_NONE, &SmimeGetSignerCertCommand, 0 },
+ { "smime_get_signer_cert_command", DT_COMMAND, R_NONE, &C_SmimeGetSignerCertCommand, 0 },
/*
** .pp
** This command is used to extract only the signers X509 certificate from a S/MIME
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_import_cert_command", DT_COMMAND, R_NONE, &SmimeImportCertCommand, 0 },
+ { "smime_import_cert_command", DT_COMMAND, R_NONE, &C_SmimeImportCertCommand, 0 },
/*
** .pp
** This command is used to import a certificate via smime_keys.
** (S/MIME only)
*/
#endif
- { "smime_is_default", DT_BOOL, R_NONE, &SmimeIsDefault, false },
+ { "smime_is_default", DT_BOOL, R_NONE, &C_SmimeIsDefault, false },
/*
** .pp
** The default behavior of NeoMutt is to use PGP on all auto-sign/encryption
** (S/MIME only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
- { "smime_keys", DT_PATH, R_NONE, &SmimeKeys, 0 },
+ { "smime_keys", DT_PATH, R_NONE, &C_SmimeKeys, 0 },
/*
** .pp
** Since for S/MIME there is no pubring/secring as with PGP, NeoMutt has to handle
** edited. This option points to the location of the private keys.
** (S/MIME only)
*/
- { "smime_pk7out_command", DT_COMMAND, R_NONE, &SmimePk7outCommand, 0 },
+ { "smime_pk7out_command", DT_COMMAND, R_NONE, &C_SmimePk7outCommand, 0 },
/*
** .pp
** This command is used to extract PKCS7 structures of S/MIME signatures,
** (S/MIME only)
*/
#endif
- { "smime_self_encrypt", DT_BOOL, R_NONE, &SmimeSelfEncrypt, true },
+ { "smime_self_encrypt", DT_BOOL, R_NONE, &C_SmimeSelfEncrypt, true },
/*
** .pp
** When \fIset\fP, S/MIME encrypted messages will also be encrypted
** using the certificate in $$smime_default_key.
** (S/MIME only)
*/
- { "smime_sign_as", DT_STRING, R_NONE, &SmimeSignAs, 0 },
+ { "smime_sign_as", DT_STRING, R_NONE, &C_SmimeSignAs, 0 },
/*
** .pp
** If you have a separate key to use for signing, you should set this
** (S/MIME only)
*/
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
- { "smime_sign_command", DT_COMMAND, R_NONE, &SmimeSignCommand, 0 },
+ { "smime_sign_command", DT_COMMAND, R_NONE, &C_SmimeSignCommand, 0 },
/*
** .pp
** This command is used to created S/MIME signatures of type
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_sign_digest_alg", DT_STRING, R_NONE, &SmimeSignDigestAlg, IP "sha256" },
+ { "smime_sign_digest_alg", DT_STRING, R_NONE, &C_SmimeSignDigestAlg, IP "sha256" },
/*
** .pp
** This sets the algorithm that should be used for the signature message digest.
** Valid choices are "md5", "sha1", "sha224", "sha256", "sha384", "sha512".
** (S/MIME only)
*/
- { "smime_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SmimeTimeout, 300 },
+ { "smime_timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SmimeTimeout, 300 },
/*
** .pp
** The number of seconds after which a cached passphrase will expire if
** not used.
** (S/MIME only)
*/
- { "smime_verify_command", DT_COMMAND, R_NONE, &SmimeVerifyCommand, 0 },
+ { "smime_verify_command", DT_COMMAND, R_NONE, &C_SmimeVerifyCommand, 0 },
/*
** .pp
** This command is used to verify S/MIME signatures of type \fCmultipart/signed\fP.
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_verify_opaque_command", DT_COMMAND, R_NONE, &SmimeVerifyOpaqueCommand, 0 },
+ { "smime_verify_opaque_command", DT_COMMAND, R_NONE, &C_SmimeVerifyOpaqueCommand, 0 },
/*
** .pp
** This command is used to verify S/MIME signatures of type
*/
#endif
#ifdef USE_SMTP
- { "smtp_authenticators", DT_STRING, R_NONE, &SmtpAuthenticators, 0 },
+ { "smtp_authenticators", DT_STRING, R_NONE, &C_SmtpAuthenticators, 0 },
/*
** .pp
** This is a colon-delimited list of authentication methods NeoMutt may
** set smtp_authenticators="digest-md5:cram-md5"
** .te
*/
- { "smtp_oauth_refresh_command", DT_STRING, R_NONE, &SmtpOauthRefreshCmd, 0 },
+ { "smtp_oauth_refresh_command", DT_STRING, R_NONE, &C_SmtpOauthRefreshCmd, 0 },
/*
** .pp
** The command to run to generate an OAUTH refresh token for
** run on every connection attempt that uses the OAUTHBEARER authentication
** mechanism. See "$oauth" for details.
*/
- { "smtp_pass", DT_STRING, R_NONE|F_SENSITIVE, &SmtpPass, 0 },
+ { "smtp_pass", DT_STRING, R_NONE|F_SENSITIVE, &C_SmtpPass, 0 },
/*
** .pp
** Specifies the password for your SMTP account. If \fIunset\fP, NeoMutt will
** fairly secure machine, because the superuser can read your neomuttrc even
** if you are the only one who can read the file.
*/
- { "smtp_url", DT_STRING, R_NONE|F_SENSITIVE, &SmtpUrl, 0 },
+ { "smtp_url", DT_STRING, R_NONE|F_SENSITIVE, &C_SmtpUrl, 0 },
/*
** .pp
** Defines the SMTP smarthost where sent messages should relayed for
** variable.
*/
#endif /* USE_SMTP */
- { "sort", DT_SORT, R_INDEX|R_RESORT, &Sort, SORT_DATE, pager_validator },
+ { "sort", DT_SORT, R_INDEX|R_RESORT, &C_Sort, SORT_DATE, pager_validator },
/*
** .pp
** Specifies how to sort messages in the "index" menu. Valid values
** set sort=reverse-date-sent
** .te
*/
- { "sort_alias", DT_SORT|DT_SORT_ALIAS, R_NONE, &SortAlias, SORT_ALIAS },
+ { "sort_alias", DT_SORT|DT_SORT_ALIAS, R_NONE, &C_SortAlias, SORT_ALIAS },
/*
** .pp
** Specifies how the entries in the "alias" menu are sorted. The
** .dd unsorted (leave in order specified in .neomuttrc)
** .ie
*/
- { "sort_aux", DT_SORT|DT_SORT_AUX, R_INDEX|R_RESORT_BOTH, &SortAux, SORT_DATE },
+ { "sort_aux", DT_SORT|DT_SORT_AUX, R_INDEX|R_RESORT_BOTH, &C_SortAux, SORT_DATE },
/*
** .pp
** This provides a secondary sort for messages in the "index" menu, used
** order, $$sort_aux is reversed again (which is not the right thing to do,
** but kept to not break any existing configuration setting).
*/
- { "sort_browser", DT_SORT|DT_SORT_BROWSER, R_NONE, &SortBrowser, SORT_ALPHA },
+ { "sort_browser", DT_SORT|DT_SORT_BROWSER, R_NONE, &C_SortBrowser, SORT_ALPHA },
/*
** .pp
** Specifies how to sort entries in the file browser. By default, the
** You may optionally use the "reverse-" prefix to specify reverse sorting
** order (example: "\fCset sort_browser=reverse-date\fP").
*/
- { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, &SortRe, true, pager_validator },
+ { "sort_re", DT_BOOL, R_INDEX|R_RESORT|R_RESORT_INIT, &C_SortRe, true, pager_validator },
/*
** .pp
** This variable is only useful when sorting by mailboxes in sidebar. By default,
** .dd unsorted
** .ie
*/
- { "spam_separator", DT_STRING, R_NONE, &SpamSeparator, IP "," },
+ { "spam_separator", DT_STRING, R_NONE, &C_SpamSeparator, IP "," },
/*
** .pp
** This variable controls what happens when multiple spam headers
** match will append to the previous, using this variable's value as a
** separator.
*/
- { "spoolfile", DT_PATH|DT_MAILBOX, R_NONE, &Spoolfile, 0 },
+ { "spoolfile", DT_PATH|DT_MAILBOX, R_NONE, &C_Spoolfile, 0 },
/*
** .pp
** If your spool mailbox is in a non-default place where NeoMutt cannot find
*/
#ifdef USE_SSL
#ifdef USE_SSL_GNUTLS
- { "ssl_ca_certificates_file", DT_PATH, R_NONE, &SslCaCertificatesFile, 0 },
+ { "ssl_ca_certificates_file", DT_PATH, R_NONE, &C_SslCaCertificatesFile, 0 },
/*
** .pp
** This variable specifies a file containing trusted CA certificates.
** .te
*/
#endif /* USE_SSL_GNUTLS */
- { "ssl_ciphers", DT_STRING, R_NONE, &SslCiphers, 0 },
+ { "ssl_ciphers", DT_STRING, R_NONE, &C_SslCiphers, 0 },
/*
** .pp
** Contains a colon-separated list of ciphers to use when using SSL.
** syntax and more details. (Note: GnuTLS version 2.1.7 or higher is
** required.)
*/
- { "ssl_client_cert", DT_PATH, R_NONE, &SslClientCert, 0 },
+ { "ssl_client_cert", DT_PATH, R_NONE, &C_SslClientCert, 0 },
/*
** .pp
** The file containing a client certificate and its associated private
** key.
*/
- { "ssl_force_tls", DT_BOOL, R_NONE, &SslForceTls, false },
+ { "ssl_force_tls", DT_BOOL, R_NONE, &C_SslForceTls, false },
/*
** .pp
** If this variable is \fIset\fP, NeoMutt will require that all connections
** option supersedes $$ssl_starttls.
*/
#ifdef USE_SSL_GNUTLS
- { "ssl_min_dh_prime_bits", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &SslMinDhPrimeBits, 0 },
+ { "ssl_min_dh_prime_bits", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_SslMinDhPrimeBits, 0 },
/*
** .pp
** This variable specifies the minimum acceptable prime size (in bits)
** the default from the GNUTLS library. (GnuTLS only)
*/
#endif /* USE_SSL_GNUTLS */
- { "ssl_starttls", DT_QUAD, R_NONE, &SslStarttls, MUTT_YES },
+ { "ssl_starttls", DT_QUAD, R_NONE, &C_SslStarttls, MUTT_YES },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will attempt to use \fCSTARTTLS\fP on servers
** use \fCSTARTTLS\fP regardless of the server's capabilities.
*/
#ifdef USE_SSL_OPENSSL
- { "ssl_use_sslv2", DT_BOOL, R_NONE, &SslUseSslv2, false },
+ { "ssl_use_sslv2", DT_BOOL, R_NONE, &C_SslUseSslv2, false },
/*
** .pp
** If \fIset\fP , Mutt will use SSLv2 when communicating with servers that
** (OpenSSL only)
*/
#endif /* defined USE_SSL_OPENSSL */
- { "ssl_use_sslv3", DT_BOOL, R_NONE, &SslUseSslv3, false },
+ { "ssl_use_sslv3", DT_BOOL, R_NONE, &C_SslUseSslv3, false },
/*
** .pp
** If \fIset\fP , Mutt will use SSLv3 when communicating with servers that
** request it. \fBN.B. As of 2015, SSLv3 is considered insecure, and using
** it is inadvisable. See https://tools.ietf.org/html/rfc7525 .\fP
*/
- { "ssl_use_tlsv1", DT_BOOL, R_NONE, &SslUseTlsv1, false },
+ { "ssl_use_tlsv1", DT_BOOL, R_NONE, &C_SslUseTlsv1, false },
/*
** .pp
** If \fIset\fP , Mutt will use TLSv1.0 when communicating with servers that
** request it. \fBN.B. As of 2015, TLSv1.0 is considered insecure, and using
** it is inadvisable. See https://tools.ietf.org/html/rfc7525 .\fP
*/
- { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, &SslUseTlsv11, false },
+ { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, &C_SslUseTlsv11, false },
/*
** .pp
** If \fIset\fP , Mutt will use TLSv1.1 when communicating with servers that
** request it. \fBN.B. As of 2015, TLSv1.1 is considered insecure, and using
** it is inadvisable. See https://tools.ietf.org/html/rfc7525 .\fP
*/
- { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, &SslUseTlsv12, true },
+ { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, &C_SslUseTlsv12, true },
/*
** .pp
** If \fIset\fP , Mutt will use TLSv1.2 when communicating with servers that
** request it.
*/
#ifdef USE_SSL_OPENSSL
- { "ssl_usesystemcerts", DT_BOOL, R_NONE, &SslUsesystemcerts, true },
+ { "ssl_usesystemcerts", DT_BOOL, R_NONE, &C_SslUsesystemcerts, true },
/*
** .pp
** If set to \fIyes\fP, NeoMutt will use CA certificates in the
** is signed by a trusted CA. (OpenSSL only)
*/
#endif
- { "ssl_verify_dates", DT_BOOL, R_NONE, &SslVerifyDates, true },
+ { "ssl_verify_dates", DT_BOOL, R_NONE, &C_SslVerifyDates, true },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will not automatically accept a server
** only unset this for particular known hosts, using the
** \fC$<account-hook>\fP function.
*/
- { "ssl_verify_host", DT_BOOL, R_NONE, &SslVerifyHost, true },
+ { "ssl_verify_host", DT_BOOL, R_NONE, &C_SslVerifyHost, true },
/*
** .pp
** If \fIset\fP (the default), NeoMutt will not automatically accept a server
*/
#ifdef USE_SSL_OPENSSL
#ifdef HAVE_SSL_PARTIAL_CHAIN
- { "ssl_verify_partial_chains", DT_BOOL, R_NONE, &SslVerifyPartialChains, false },
+ { "ssl_verify_partial_chains", DT_BOOL, R_NONE, &C_SslVerifyPartialChains, false },
/*
** .pp
** This option should not be changed from the default unless you understand
#endif /* defined HAVE_SSL_PARTIAL_CHAIN */
#endif /* defined USE_SSL_OPENSSL */
#endif /* defined(USE_SSL) */
- { "status_chars", DT_MBTABLE, R_BOTH, &StatusChars, IP "-*%A" },
+ { "status_chars", DT_MBTABLE, R_BOTH, &C_StatusChars, IP "-*%A" },
/*
** .pp
** Controls the characters used by the "%r" indicator in $$status_format.
** forwarding, etc. are not permitted in this mode)
** .de
*/
- { "status_format", DT_STRING, R_BOTH, &StatusFormat, IP "-%r-NeoMutt: %D [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---" },
+ { "status_format", DT_STRING, R_BOTH, &C_StatusFormat, IP "-%r-NeoMutt: %D [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---" },
/*
** .pp
** Controls the format of the status line displayed in the "index"
** will replace any dots in the expansion by underscores. This might be helpful
** with IMAP folders that don't like dots in folder names.
*/
- { "status_on_top", DT_BOOL, R_REFLOW, &StatusOnTop, false },
+ { "status_on_top", DT_BOOL, R_REFLOW, &C_StatusOnTop, false },
/*
** .pp
** Setting this variable causes the "status bar" to be displayed on
** the first line of the screen rather than near the bottom. If $$help
** is \fIset\fP, too it'll be placed at the bottom.
*/
- { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &StrictThreads, false, pager_validator },
+ { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &C_StrictThreads, false, pager_validator },
/*
** .pp
** If \fIset\fP, threading will only make use of the "In-Reply-To" and
** $$sort_re for a less drastic way of controlling this
** behavior.
*/
- { "suspend", DT_BOOL, R_NONE, &Suspend, true },
+ { "suspend", DT_BOOL, R_NONE, &C_Suspend, true },
/*
** .pp
** When \fIunset\fP, NeoMutt won't stop when the user presses the terminal's
** \fIsusp\fP key, usually "^Z". This is useful if you run NeoMutt
** inside an xterm using a command like "\fCxterm -e neomutt\fP".
*/
- { "text_flowed", DT_BOOL, R_NONE, &TextFlowed, false },
+ { "text_flowed", DT_BOOL, R_NONE, &C_TextFlowed, false },
/*
** .pp
** When \fIset\fP, NeoMutt will generate "format=flowed" bodies with a content type
** .pp
** Note that $$indent_string is ignored when this option is \fIset\fP.
*/
- { "thorough_search", DT_BOOL, R_NONE, &ThoroughSearch, true },
+ { "thorough_search", DT_BOOL, R_NONE, &C_ThoroughSearch, true },
/*
** .pp
** Affects the \fC~b\fP and \fC~h\fP search operations described in
** raw message received (for example quoted-printable encoded or with encoded
** headers) which may lead to incorrect search results.
*/
- { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &ThreadReceived, false, pager_validator },
+ { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, &C_ThreadReceived, false, pager_validator },
/*
** .pp
** When \fIset\fP, NeoMutt uses the date received rather than the date sent
** to thread messages by subject.
*/
- { "tilde", DT_BOOL, R_PAGER, &Tilde, false },
+ { "tilde", DT_BOOL, R_PAGER, &C_Tilde, false },
/*
** .pp
** When \fIset\fP, the internal-pager will pad blank lines to the bottom of the
** screen with a tilde ("~").
*/
- { "time_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &TimeInc, 0 },
+ { "time_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_TimeInc, 0 },
/*
** .pp
** Along with $$read_inc, $$write_inc, and $$net_inc, this
** .pp
** Also see the "$tuning" section of the manual for performance considerations.
*/
- { "timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &Timeout, 600 },
+ { "timeout", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_Timeout, 600 },
/*
** .pp
** When NeoMutt is waiting for user input either idling in menus or
** .pp
** A value of zero or less will cause NeoMutt to never time out.
*/
- { "tmpdir", DT_PATH, R_NONE, &Tmpdir, IP "/tmp" },
+ { "tmpdir", DT_PATH, R_NONE, &C_Tmpdir, IP "/tmp" },
/*
** .pp
** This variable allows you to specify where NeoMutt will place its
** If this variable is not set, the environment variable \fC$$$TMPDIR\fP is
** used. Failing that, then "\fC/tmp\fP" is used.
*/
- { "to_chars", DT_MBTABLE, R_BOTH, &ToChars, IP " +TCFLR" },
+ { "to_chars", DT_MBTABLE, R_BOTH, &C_ToChars, IP " +TCFLR" },
/*
** .pp
** Controls the character used to indicate mail addressed to you.
** .dt 7 .dd R .dd Your address appears in the "Reply-To:" header field but none of the above applies.
** .de
*/
- { "trash", DT_PATH|DT_MAILBOX, R_NONE, &Trash, 0 },
+ { "trash", DT_PATH|DT_MAILBOX, R_NONE, &C_Trash, 0 },
/*
** .pp
** If set, this variable specifies the path of the trash folder where the
** NOTE: When you delete a message in the trash folder, it is really
** deleted, so that you have a way to clean the trash.
*/
- { "ts_enabled", DT_BOOL, R_BOTH, &TsEnabled, false },
+ { "ts_enabled", DT_BOOL, R_BOTH, &C_TsEnabled, false },
/* The default must be off to force in the validity checking. */
/*
** .pp
** Controls whether NeoMutt tries to set the terminal status line and icon name.
** Most terminal emulators emulate the status line in the window title.
*/
- { "ts_icon_format", DT_STRING, R_BOTH, &TsIconFormat, IP "M%?n?AIL&ail?" },
+ { "ts_icon_format", DT_STRING, R_BOTH, &C_TsIconFormat, IP "M%?n?AIL&ail?" },
/*
** .pp
** Controls the format of the icon title, as long as "$$ts_enabled" is set.
** This string is identical in formatting to the one used by
** "$$status_format".
*/
- { "ts_status_format", DT_STRING, R_BOTH, &TsStatusFormat, IP "NeoMutt with %?m?%m messages&no messages?%?n? [%n NEW]?" },
+ { "ts_status_format", DT_STRING, R_BOTH, &C_TsStatusFormat, IP "NeoMutt with %?m?%m messages&no messages?%?n? [%n NEW]?" },
/*
** .pp
** Controls the format of the terminal status line (or window title),
** formatting to the one used by "$$status_format".
*/
#ifdef USE_SOCKET
- { "tunnel", DT_STRING, R_NONE, &Tunnel, 0 },
+ { "tunnel", DT_STRING, R_NONE, &C_Tunnel, 0 },
/*
** .pp
** Setting this variable will cause NeoMutt to open a pipe to a command
** tunnel commands per connection.
*/
#endif
- { "uncollapse_jump", DT_BOOL, R_NONE, &UncollapseJump, false },
+ { "uncollapse_jump", DT_BOOL, R_NONE, &C_UncollapseJump, false },
/*
** .pp
** When \fIset\fP, NeoMutt will jump to the next unread message, if any,
** when the current thread is \fIun\fPcollapsed.
*/
- { "uncollapse_new", DT_BOOL, R_NONE, &UncollapseNew, true },
+ { "uncollapse_new", DT_BOOL, R_NONE, &C_UncollapseNew, true },
/*
** .pp
** When \fIset\fP, NeoMutt will automatically uncollapse any collapsed thread
** remain collapsed. the presence of the new message will still affect
** index sorting, though.
*/
- { "use_8bitmime", DT_BOOL, R_NONE, &Use8bitmime, false },
+ { "use_8bitmime", DT_BOOL, R_NONE, &C_Use8bitmime, false },
/*
** .pp
** \fBWarning:\fP do not set this variable unless you are using a version
** When \fIset\fP, NeoMutt will invoke $$sendmail with the \fC-B8BITMIME\fP
** flag when sending 8-bit messages to enable ESMTP negotiation.
*/
- { "use_domain", DT_BOOL, R_NONE, &UseDomain, true },
+ { "use_domain", DT_BOOL, R_NONE, &C_UseDomain, true },
/*
** .pp
** When \fIset\fP, NeoMutt will qualify all local addresses (ones without the
** "@host" portion) with the value of $$hostname. If \fIunset\fP, no
** addresses will be qualified.
*/
- { "use_envelope_from", DT_BOOL, R_NONE, &UseEnvelopeFrom, false },
+ { "use_envelope_from", DT_BOOL, R_NONE, &C_UseEnvelopeFrom, false },
/*
** .pp
** When \fIset\fP, NeoMutt will set the \fIenvelope\fP sender of the message.
** if the $$sendmail variable already contains \fC-f\fP or if the
** executable pointed to by $$sendmail doesn't support the \fC-f\fP switch.
*/
- { "use_from", DT_BOOL, R_NONE, &UseFrom, true },
+ { "use_from", DT_BOOL, R_NONE, &C_UseFrom, true },
/*
** .pp
** When \fIset\fP, NeoMutt will generate the "From:" header field when
** command.
*/
#ifdef HAVE_GETADDRINFO
- { "use_ipv6", DT_BOOL, R_NONE, &UseIpv6, true },
+ { "use_ipv6", DT_BOOL, R_NONE, &C_UseIpv6, true },
/*
** .pp
** When \fIset\fP, NeoMutt will look for IPv6 addresses of hosts it tries to
** Normally, the default should work.
*/
#endif /* HAVE_GETADDRINFO */
- { "user_agent", DT_BOOL, R_NONE, &UserAgent, true },
+ { "user_agent", DT_BOOL, R_NONE, &C_UserAgent, true },
/*
** .pp
** When \fIset\fP, NeoMutt will add a "User-Agent:" header to outgoing
** them.
*/
#ifdef USE_NOTMUCH
- { "vfolder_format", DT_STRING|DT_NOT_EMPTY, R_INDEX, &VfolderFormat, IP "%2C %?n?%4n/& ?%4m %f" },
+ { "vfolder_format", DT_STRING|DT_NOT_EMPTY, R_INDEX, &C_VfolderFormat, IP "%2C %?n?%4n/& ?%4m %f" },
/*
** .pp
** This variable allows you to customize the file browser display for virtual
** folders to your personal taste. This string uses many of the same
** expandos as $$folder_format.
*/
- { "virtual_spoolfile", DT_BOOL, R_NONE, &VirtualSpoolfile, false },
+ { "virtual_spoolfile", DT_BOOL, R_NONE, &C_VirtualSpoolfile, false },
/*
** .pp
** When \fIset\fP, NeoMutt will use the first defined virtual mailbox (see
** virtual-mailboxes) as a spool file.
*/
#endif
- { "visual", DT_COMMAND, R_NONE, &Visual, IP "vi" },
+ { "visual", DT_COMMAND, R_NONE, &C_Visual, IP "vi" },
/*
** .pp
** Specifies the visual editor to invoke when the "\fC~v\fP" command is
** .pp
** $$visual is overridden by the environment variable \fC$$$VISUAL\fP or \fC$$$EDITOR\fP.
*/
- { "wait_key", DT_BOOL, R_NONE, &WaitKey, true },
+ { "wait_key", DT_BOOL, R_NONE, &C_WaitKey, true },
/*
** .pp
** Controls whether NeoMutt will ask you to press a key after an external command
** When \fIset\fP, NeoMutt will always ask for a key. When \fIunset\fP, NeoMutt will wait
** for a key only if the external command returned a non-zero status.
*/
- { "weed", DT_BOOL, R_NONE, &Weed, true },
+ { "weed", DT_BOOL, R_NONE, &C_Weed, true },
/*
** .pp
** When \fIset\fP, NeoMutt will weed headers when displaying, forwarding,
** printing, or replying to messages.
*/
- { "wrap", DT_NUMBER, R_PAGER_FLOW, &Wrap, 0 },
+ { "wrap", DT_NUMBER, R_PAGER_FLOW, &C_Wrap, 0 },
/*
** .pp
** When set to a positive value, NeoMutt will wrap text at $$wrap characters.
** .pp
** Also see $$reflow_wrap.
*/
- { "wrap_headers", DT_NUMBER|DT_NOT_NEGATIVE, R_PAGER, &WrapHeaders, 78 },
+ { "wrap_headers", DT_NUMBER|DT_NOT_NEGATIVE, R_PAGER, &C_WrapHeaders, 78 },
/*
** .pp
** This option specifies the number of characters to use for wrapping
** recommends a line length of 78 (the default), so \fBplease only change
** this setting when you know what you're doing\fP.
*/
- { "wrap_search", DT_BOOL, R_NONE, &WrapSearch, true },
+ { "wrap_search", DT_BOOL, R_NONE, &C_WrapSearch, true },
/*
** .pp
** Controls whether searches wrap around the end.
** When \fIset\fP, searches will wrap around the first (or last) item. When
** \fIunset\fP, incremental searches will not wrap.
*/
- { "write_bcc", DT_BOOL, R_NONE, &WriteBcc, true },
+ { "write_bcc", DT_BOOL, R_NONE, &C_WriteBcc, true },
/*
** .pp
** Controls whether NeoMutt writes out the "Bcc:" header when preparing
** option does nothing: NeoMutt will never write out the "Bcc:" header
** in this case.
*/
- { "write_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &WriteInc, 10 },
+ { "write_inc", DT_NUMBER|DT_NOT_NEGATIVE, R_NONE, &C_WriteInc, 10 },
/*
** .pp
** When writing a mailbox, a message will be printed every
** "$tuning" section of the manual for performance considerations.
*/
#ifdef USE_NNTP
- { "x_comment_to", DT_BOOL, R_NONE, &XCommentTo, false },
+ { "x_comment_to", DT_BOOL, R_NONE, &C_XCommentTo, false },
/*
** .pp
** If \fIset\fP, NeoMutt will add "X-Comment-To:" field (that contains full
#endif
/*--*/
- { "ignore_linear_white_space", DT_BOOL, R_NONE, &IgnoreLinearWhiteSpace, false },
- { "pgp_encrypt_self", DT_QUAD, R_NONE, &PgpEncryptSelf, MUTT_NO },
- { "smime_encrypt_self", DT_QUAD, R_NONE, &SmimeEncryptSelf, MUTT_NO },
- { "wrapmargin", DT_NUMBER, R_PAGER, &Wrap, 0 },
+ { "ignore_linear_white_space", DT_BOOL, R_NONE, &C_IgnoreLinearWhiteSpace, false },
+ { "pgp_encrypt_self", DT_QUAD, R_NONE, &C_PgpEncryptSelf, MUTT_NO },
+ { "smime_encrypt_self", DT_QUAD, R_NONE, &C_SmimeEncryptSelf, MUTT_NO },
+ { "wrapmargin", DT_NUMBER, R_PAGER, &C_Wrap, 0 },
{ "abort_noattach_regexp", DT_SYNONYM, R_NONE, NULL, IP "abort_noattach_regex", },
{ "attach_keyword", DT_SYNONYM, R_NONE, NULL, IP "abort_noattach_regex", },
while (true)
{
- int i = Timeout > 0 ? Timeout : 60;
+ int i = C_Timeout > 0 ? C_Timeout : 60;
#ifdef USE_IMAP
- /* keepalive may need to run more frequently than Timeout allows */
- if (ImapKeepalive)
+ /* keepalive may need to run more frequently than C_Timeout allows */
+ if (C_ImapKeepalive)
{
- if (ImapKeepalive >= i)
+ if (C_ImapKeepalive >= i)
imap_keepalive();
else
{
- while (ImapKeepalive && ImapKeepalive < i)
+ while (C_ImapKeepalive && C_ImapKeepalive < i)
{
- mutt_getch_timeout(ImapKeepalive * 1000);
+ mutt_getch_timeout(C_ImapKeepalive * 1000);
tmp = mutt_getch();
mutt_getch_timeout(-1);
/* If a timeout was not received, or the window was resized, exit the
if (tmp.ch != -2 || SigWinch)
#endif
goto gotkey;
- i -= ImapKeepalive;
+ i -= C_ImapKeepalive;
imap_keepalive();
}
}
#endif
/* These Config Variables are only used in mailbox.c */
-short MailCheck; ///< Config: Number of seconds before NeoMutt checks for new mail
-bool MailCheckStats; ///< Config: Periodically check for new mail
-short MailCheckStatsInterval; ///< Config: How often to check for new mail
-bool MaildirCheckCur; ///< Config: Check both 'new' and 'cur' directories for new mail
+short C_MailCheck; ///< Config: Number of seconds before NeoMutt checks for new mail
+bool C_MailCheckStats; ///< Config: Periodically check for new mail
+short C_MailCheckStatsInterval; ///< Config: How often to check for new mail
+bool C_MaildirCheckCur; ///< Config: Check both 'new' and 'cur' directories for new mail
static time_t MailboxTime = 0; /**< last time we started checking for mail */
static time_t MailboxStatsTime = 0; /**< last time we check performed mail_check_stats */
default:; /* do nothing */
}
}
- else if (CheckMboxSize && m_cur && (m_cur->path[0] != '\0'))
+ else if (C_CheckMboxSize && m_cur && (m_cur->path[0] != '\0'))
m_check->size = (off_t) sb.st_size; /* update the size of current folder */
#ifdef USE_SIDEBAR
struct utimbuf ut;
#endif
- if (CheckMboxSize)
+ if (C_CheckMboxSize)
{
struct Mailbox *m = mutt_find_mailbox(path);
if (m && !m->has_new)
return 0;
t = time(NULL);
- if (!force && (t - MailboxTime < MailCheck))
+ if (!force && (t - MailboxTime < C_MailCheck))
return MailboxCount;
if ((force & MUTT_MAILBOX_CHECK_FORCE_STATS) ||
- (MailCheckStats && ((t - MailboxStatsTime) >= MailCheckStatsInterval)))
+ (C_MailCheckStats && ((t - MailboxStatsTime) >= C_MailCheckStatsInterval)))
{
check_stats = true;
MailboxStatsTime = t;
STAILQ_FOREACH(np, &AllMailboxes, entries)
{
mailbox_check(m_cur, np->mailbox, &contex_sb,
- check_stats || (!np->mailbox->first_check_stats_done && MailCheckStats));
+ check_stats || (!np->mailbox->first_check_stats_done && C_MailCheckStats));
np->mailbox->first_check_stats_done = true;
}
struct stat;
/* These Config Variables are only used in mailbox.c */
-extern short MailCheck;
-extern bool MailCheckStats;
-extern short MailCheckStatsInterval;
-extern bool MaildirCheckCur;
+extern short C_MailCheck;
+extern bool C_MailCheckStats;
+extern short C_MailCheckStatsInterval;
+extern bool C_MaildirCheckCur;
#define MB_NORMAL 0
#define MB_HIDDEN 1
struct Email;
/* These Config Variables are only used in maildir/mh.c */
-extern bool CheckNew;
-extern bool MaildirHeaderCacheVerify;
-extern bool MhPurge;
-extern char *MhSeqFlagged;
-extern char *MhSeqReplied;
-extern char *MhSeqUnseen;
+extern bool C_CheckNew;
+extern bool C_MaildirHeaderCacheVerify;
+extern bool C_MhPurge;
+extern char *C_MhSeqFlagged;
+extern char *C_MhSeqReplied;
+extern char *C_MhSeqUnseen;
extern struct MxOps MxMaildirOps;
extern struct MxOps MxMhOps;
/* when $mail_check_recent is set, if the new/ directory hasn't been modified since
* the user last exited the m, then we know there is no recent mail.
*/
- if (check_new && MailCheckRecent)
+ if (check_new && C_MailCheckRecent)
{
if (stat(mutt_b2s(path), &sb) == 0 &&
mutt_file_stat_timespec_compare(&sb, MUTT_STAT_MTIME, &m->last_visited) < 0)
m->msg_unread++;
if (check_new)
{
- if (MailCheckRecent)
+ if (C_MailCheckRecent)
{
mutt_buffer_printf(msgpath, "%s/%s", mutt_b2s(path), de->d_name);
/* ensure this message was received since leaving this m */
struct MaildirMboxData *mdata = maildir_mdata_get(m);
/* XXX seems like this check belongs in mx_mbox_check() rather than here. */
- if (!CheckNew)
+ if (!C_CheckNew)
return 0;
struct Buffer *buf = mutt_buffer_pool_get();
maildir_check_dir(m, "new", check_new, check_stats);
- check_new = !m->has_new && MaildirCheckCur;
+ check_new = !m->has_new && C_MaildirCheckCur;
if (check_new || check_stats)
maildir_check_dir(m, "cur", check_new, check_stats);
{
int rc = 0;
#ifdef USE_HCACHE
- header_cache_t *hc = mutt_hcache_open(HeaderCache, m->path, NULL);
+ header_cache_t *hc = mutt_hcache_open(C_HeaderCache, m->path, NULL);
char *key = e->path + 3;
int keylen = maildir_hcache_keylen(key);
rc = mutt_hcache_store(hc, key, keylen, e, 0);
struct MhSequences mhs = { 0 };
- snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(MhSeqUnseen));
- snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(MhSeqReplied));
- snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(MhSeqFlagged));
+ snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(C_MhSeqUnseen));
+ snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(C_MhSeqReplied));
+ snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(C_MhSeqFlagged));
if (mh_mkstemp(m, &nfp, &tmpfname) != 0)
{
/* write out the new sequences */
if (unseen)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_UNSEEN, NONULL(MhSeqUnseen));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_UNSEEN, NONULL(C_MhSeqUnseen));
if (flagged)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_FLAGGED, NONULL(MhSeqFlagged));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_FLAGGED, NONULL(C_MhSeqFlagged));
if (replied)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_REPLIED, NONULL(MhSeqReplied));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_REPLIED, NONULL(C_MhSeqReplied));
mhs_free_sequences(&mhs);
if (!t)
continue;
- if (mutt_str_strcmp(t, MhSeqUnseen) == 0)
+ if (mutt_str_strcmp(t, C_MhSeqUnseen) == 0)
f = MH_SEQ_UNSEEN;
- else if (mutt_str_strcmp(t, MhSeqFlagged) == 0)
+ else if (mutt_str_strcmp(t, C_MhSeqFlagged) == 0)
f = MH_SEQ_FLAGGED;
- else if (mutt_str_strcmp(t, MhSeqReplied) == 0)
+ else if (mutt_str_strcmp(t, C_MhSeqReplied) == 0)
f = MH_SEQ_REPLIED;
else /* unknown sequence */
continue;
/* when $mail_check_recent is set and the .mh_sequences file hasn't changed
* since the last m visit, there is no "new mail" */
- if (MailCheckRecent && mh_sequences_changed(m) <= 0)
+ if (C_MailCheckRecent && mh_sequences_changed(m) <= 0)
{
rc = false;
check_new = false;
{
/* if the first unseen message we encounter was in the m during the
last visit, don't notify about it */
- if (!MailCheckRecent || mh_already_notified(m, i) == 0)
+ if (!C_MailCheckRecent || mh_already_notified(m, i) == 0)
{
m->has_new = true;
rc = true;
struct Hash *fnames = NULL;
struct MaildirMboxData *mdata = maildir_mdata_get(m);
- if (!CheckNew)
+ if (!C_CheckNew)
return 0;
mutt_str_strfcpy(buf, m->path, sizeof(buf));
#endif
/* 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
-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
+bool C_CheckNew; ///< Config: (maildir,mh) Check for new mail while the mailbox is open
+bool C_MaildirHeaderCacheVerify; ///< Config: (hcache) Check for maildir changes when opening mailbox
+bool C_MhPurge; ///< Config: Really delete files in MH mailboxes
+char *C_MhSeqFlagged; ///< Config: MH sequence for flagged message
+char *C_MhSeqReplied; ///< Config: MH sequence to tag replied messages
+char *C_MhSeqUnseen; ///< Config: MH sequence for unseen messages
#define INS_SORT_THRESHOLD 6
if (mh_mkstemp(m, &nfp, &tmpfname) == -1)
return;
- snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(MhSeqUnseen));
- snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(MhSeqReplied));
- snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(MhSeqFlagged));
+ snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(C_MhSeqUnseen));
+ snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(C_MhSeqReplied));
+ snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(C_MhSeqFlagged));
snprintf(sequences, sizeof(sequences), "%s/.mh_sequences", m->path);
ofp = fopen(sequences, "r");
FREE(&buf);
if (!unseen_done && unseen)
- fprintf(nfp, "%s: %d\n", NONULL(MhSeqUnseen), n);
+ fprintf(nfp, "%s: %d\n", NONULL(C_MhSeqUnseen), n);
if (!flagged_done && flagged)
- fprintf(nfp, "%s: %d\n", NONULL(MhSeqFlagged), n);
+ fprintf(nfp, "%s: %d\n", NONULL(C_MhSeqFlagged), n);
if (!replied_done && replied)
- fprintf(nfp, "%s: %d\n", NONULL(MhSeqReplied), n);
+ fprintf(nfp, "%s: %d\n", NONULL(C_MhSeqReplied), n);
mutt_file_fclose(&nfp);
if (subdir)
{
mutt_buffer_printf(buf, "%s/%s", m->path, subdir);
- is_old = MarkOld ? (mutt_str_strcmp("cur", subdir) == 0) : false;
+ is_old = C_MarkOld ? (mutt_str_strcmp("cur", subdir) == 0) : false;
}
else
mutt_buffer_strcpy(buf, m->path);
*/
static void mh_sort_natural(struct Mailbox *m, struct Maildir **md)
{
- if (!m || !md || !*md || (m->magic != MUTT_MH) || (Sort != SORT_ORDER))
+ if (!m || !md || !*md || (m->magic != MUTT_MH) || (C_Sort != SORT_ORDER))
return;
mutt_debug(LL_DEBUG3, "maildir: sorting %s into natural order\n", m->path);
*md = maildir_sort(*md, (size_t) -1, md_cmp_path);
#endif
#ifdef USE_HCACHE
- header_cache_t *hc = mutt_hcache_open(HeaderCache, m->path, NULL);
+ header_cache_t *hc = mutt_hcache_open(C_HeaderCache, m->path, NULL);
#endif
for (p = *md, count = 0; p; p = p->next, count++)
snprintf(fn, sizeof(fn), "%s/%s", m->path, p->email->path);
#ifdef USE_HCACHE
- if (MaildirHeaderCacheVerify)
+ if (C_MaildirHeaderCacheVerify)
{
ret = stat(fn, &lastchanged);
}
if (!m->quiet)
{
snprintf(msgbuf, sizeof(msgbuf), _("Scanning %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, 0);
}
struct MaildirMboxData *mdata = maildir_mdata_get(m);
if (!m->quiet)
{
snprintf(msgbuf, sizeof(msgbuf), _("Reading %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, count);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, count);
}
maildir_delayed_parsing(m, &md, &progress);
struct Mailbox *m = ctx->mailbox;
- if (Sort != SORT_ORDER)
+ if (C_Sort != SORT_ORDER)
{
- const short old_sort = Sort;
- Sort = SORT_ORDER;
+ const short old_sort = C_Sort;
+ C_Sort = SORT_ORDER;
mutt_sort_headers(ctx, true);
- Sort = old_sort;
+ C_Sort = old_sort;
}
const int old_count = m->msg_count;
break;
case 'T': /* trashed */
- if (!e->flagged || !FlagSafe)
+ if (!e->flagged || !C_FlagSafe)
{
e->trash = true;
e->deleted = true;
struct Email *e = m->emails[msgno];
- if (e->deleted && (m->magic != MUTT_MAILDIR || !MaildirTrash))
+ if (e->deleted && (m->magic != MUTT_MAILDIR || !C_MaildirTrash))
{
char path[PATH_MAX];
snprintf(path, sizeof(path), "%s/%s", m->path, e->path);
- if (m->magic == MUTT_MAILDIR || (MhPurge && m->magic == MUTT_MH))
+ if (m->magic == MUTT_MAILDIR || (C_MhPurge && m->magic == MUTT_MH))
{
#ifdef USE_HCACHE
if (hc)
}
}
else if (e->changed || e->attach_del ||
- (m->magic == MUTT_MAILDIR && (MaildirTrash || e->trash) && (e->deleted != e->trash)))
+ (m->magic == MUTT_MAILDIR && (C_MaildirTrash || e->trash) &&
+ (e->deleted != e->trash)))
{
if (m->magic == MUTT_MAILDIR)
{
#ifdef USE_HCACHE
if (m->magic == MUTT_MAILDIR || m->magic == MUTT_MH)
- hc = mutt_hcache_open(HeaderCache, m->path, NULL);
+ hc = mutt_hcache_open(C_HeaderCache, m->path, NULL);
#endif
if (!m->quiet)
{
snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, m->msg_count);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_WriteInc, m->msg_count);
}
for (i = 0; i < m->msg_count; i++)
{
for (i = 0, j = 0; i < m->msg_count; i++)
{
- if (!m->emails[i]->deleted || (m->magic == MUTT_MAILDIR && MaildirTrash))
+ if (!m->emails[i]->deleted || (m->magic == MUTT_MAILDIR && C_MaildirTrash))
m->emails[i]->index = j++;
}
}
{
int rc = 0;
#ifdef USE_HCACHE
- header_cache_t *hc = mutt_hcache_open(HeaderCache, m->path, NULL);
+ header_cache_t *hc = mutt_hcache_open(C_HeaderCache, m->path, NULL);
rc = mutt_hcache_store(hc, e->path, strlen(e->path), e, 0);
mutt_hcache_close(hc);
#endif
#endif
/* These Config Variables are only used in main.c */
-bool ResumeEditedDraftFiles; ///< Config: Resume editing previously saved draft files
+bool C_ResumeEditedDraftFiles; ///< Config: Resume editing previously saved draft files
#define MUTT_IGNORE (1 << 0) /* -z */
#define MUTT_MAILBOX (1 << 1) /* -Z */
/* "$news_server" precedence: command line, config file, environment, system file */
if (cli_nntp)
cs_str_string_set(Config, "news_server", cli_nntp, NULL);
- if (!NewsServer)
+ if (!C_NewsServer)
{
const char *env_nntp = mutt_str_getenv("NNTPSERVER");
cs_str_string_set(Config, "news_server", env_nntp, NULL);
}
- if (!NewsServer)
+ if (!C_NewsServer)
{
char buffer[1024];
char *server =
mutt_file_read_keyword(SYSCONFDIR "/nntpserver", buffer, sizeof(buffer));
cs_str_string_set(Config, "news_server", server, NULL);
}
- if (NewsServer)
- cs_str_initial_set(Config, "news_server", NewsServer, NULL);
+ if (C_NewsServer)
+ cs_str_initial_set(Config, "news_server", C_NewsServer, NULL);
#endif
/* Initialize crypto backends. */
log_queue_set_max_size(100);
}
- /* Create the Folder directory if it doesn't exist. */
- if (!OptNoCurses && Folder)
+ /* Create the C_Folder directory if it doesn't exist. */
+ if (!OptNoCurses && C_Folder)
{
struct stat sb;
char fpath[PATH_MAX];
- mutt_str_strfcpy(fpath, Folder, sizeof(fpath));
+ mutt_str_strfcpy(fpath, C_Folder, sizeof(fpath));
mutt_expand_path(fpath, sizeof(fpath));
bool skip = false;
#ifdef USE_IMAP
if (!skip && (stat(fpath, &sb) == -1) && (errno == ENOENT))
{
char msg2[STRING];
- snprintf(msg2, sizeof(msg2), _("%s does not exist. Create it?"), Folder);
+ snprintf(msg2, sizeof(msg2), _("%s does not exist. Create it?"), C_Folder);
if (mutt_yesorno(msg2, MUTT_YES) == MUTT_YES)
{
if ((mkdir(fpath, 0700) == -1) && (errno != EEXIST))
- mutt_error(_("Can't create %s: %s"), Folder, strerror(errno)); // TEST21: neomutt -n -F /dev/null (and ~/Mail doesn't exist)
+ mutt_error(_("Can't create %s: %s"), C_Folder, strerror(errno)); // TEST21: neomutt -n -F /dev/null (and ~/Mail doesn't exist)
}
}
}
msg->env->to = mutt_addr_parse_list(msg->env->to, argv[i]);
}
- if (!draft_file && Autoedit && !msg->env->to && !msg->env->cc)
+ if (!draft_file && C_Autoedit && !msg->env->to && !msg->env->cc)
{
mutt_error(_("No recipients specified"));
goto main_curses; // TEST26: neomutt -s test (with autoedit=yes)
goto main_curses;
}
- /* Scan for neomutt header to set ResumeDraftFiles */
+ /* Scan for neomutt header to set C_ResumeDraftFiles */
struct ListNode *np, *tmp;
STAILQ_FOREACH_SAFE(np, &msg->env->userhdrs, entries, tmp)
{
if (mutt_str_startswith(np->data, "X-Mutt-Resume-Draft:", CASE_IGNORE))
{
- if (ResumeEditedDraftFiles)
+ if (C_ResumeEditedDraftFiles)
cs_str_native_set(Config, "resume_draft_files", true, NULL);
STAILQ_REMOVE(&msg->env->userhdrs, np, ListNode, entries);
mutt_rfc822_write_header(
fout, msg->env, msg->content, MUTT_WRITE_HEADER_POSTPONE, false,
- CryptProtectedHeadersRead && mutt_should_hide_protected_subject(msg));
- if (ResumeEditedDraftFiles)
+ C_CryptProtectedHeadersRead && mutt_should_hide_protected_subject(msg));
+ if (C_ResumeEditedDraftFiles)
fprintf(fout, "X-Mutt-Resume-Draft: 1\n");
fputc('\n', fout);
if ((mutt_write_mime_body(msg->content, fout) == -1))
if (flags & MUTT_MAILBOX)
{
#ifdef USE_IMAP
- bool passive = ImapPassive;
- ImapPassive = false;
+ bool passive = C_ImapPassive;
+ C_ImapPassive = false;
#endif
if (mutt_mailbox_check(Context ? Context->mailbox : NULL, 0) == 0)
{
folder[0] = '\0';
mutt_mailbox(Context ? Context->mailbox : NULL, folder, sizeof(folder));
#ifdef USE_IMAP
- ImapPassive = passive;
+ C_ImapPassive = passive;
#endif
}
else if (flags & MUTT_SELECT)
if (flags & MUTT_NEWS)
{
OptNews = true;
- CurrentNewsSrv = nntp_select_server(Context->mailbox, NewsServer, false);
+ CurrentNewsSrv = nntp_select_server(Context->mailbox, C_NewsServer, false);
if (!CurrentNewsSrv)
goto main_curses; // TEST38: neomutt -G (unset news_server)
}
if (!folder[0])
{
- if (Spoolfile)
- mutt_str_strfcpy(folder, Spoolfile, sizeof(folder));
- else if (Folder)
- mutt_str_strfcpy(folder, Folder, sizeof(folder));
+ if (C_Spoolfile)
+ mutt_str_strfcpy(folder, C_Spoolfile, sizeof(folder));
+ else if (C_Folder)
+ mutt_str_strfcpy(folder, C_Folder, sizeof(folder));
/* else no folder */
}
repeat_error = true;
struct Mailbox *m = mx_path_resolve(folder);
- Context = mx_mbox_open(m, ((flags & MUTT_RO) || ReadOnly) ? MUTT_READONLY : 0);
+ Context = mx_mbox_open(m, ((flags & MUTT_RO) || C_ReadOnly) ? MUTT_READONLY : 0);
if (!Context)
{
mailbox_free(&m);
#include <stdbool.h>
/* These Config Variables are only used in main.c */
-extern bool ResumeEditedDraftFiles;
+extern bool C_ResumeEditedDraftFiles;
void mutt_exit(int code);
{
char msgbuf[STRING];
snprintf(msgbuf, sizeof(msgbuf), _("Reading %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, 0);
}
while (true)
{
char msgbuf[STRING];
snprintf(msgbuf, sizeof(msgbuf), _("Reading %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, 0);
}
if (!m->emails)
mutt_message(_("Reopening mailbox..."));
/* our heuristics require the old mailbox to be unsorted */
- if (Sort != SORT_ORDER)
+ if (C_Sort != SORT_ORDER)
{
short old_sort;
- old_sort = Sort;
- Sort = SORT_ORDER;
+ old_sort = C_Sort;
+ C_Sort = SORT_ORDER;
mutt_mailbox_changed(m, MBN_RESORT);
- Sort = old_sort;
+ C_Sort = old_sort;
}
old_hdrs = NULL;
/* When $mbox_check_recent is set, existing new mail is ignored, so do not
* reset the atime to mtime-1 to signal new mail.
*/
- if (!MailCheckRecent && utimebuf.actime >= utimebuf.modtime && mbox_has_new(m))
+ if (!C_MailCheckRecent && utimebuf.actime >= utimebuf.modtime && mbox_has_new(m))
{
utimebuf.actime = utimebuf.modtime - 1;
}
char msgbuf[PATH_MAX + 64];
/* sort message by their position in the mailbox on disk */
- if (Sort != SORT_ORDER)
+ if (C_Sort != SORT_ORDER)
{
- save_sort = Sort;
- Sort = SORT_ORDER;
+ save_sort = C_Sort;
+ C_Sort = SORT_ORDER;
mutt_mailbox_changed(m, MBN_RESORT);
- Sort = save_sort;
+ C_Sort = save_sort;
need_sort = 1;
}
if (!m->quiet)
{
snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, m->msg_count);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_WriteInc, m->msg_count);
}
for (i = first, j = 0; i < m->msg_count; i++)
char savefile[PATH_MAX];
- snprintf(savefile, sizeof(savefile), "%s/neomutt.%s-%s-%u", NONULL(Tmpdir),
+ snprintf(savefile, sizeof(savefile), "%s/neomutt.%s-%s-%u", NONULL(C_Tmpdir),
NONULL(Username), NONULL(ShortHostname), (unsigned int) getpid());
rename(tempfile, savefile);
mutt_sig_unblock();
unlink(tempfile); /* remove partial copy of the mailbox */
mutt_sig_unblock();
- if (CheckMboxSize)
+ if (C_CheckMboxSize)
{
struct Mailbox *tmp = mutt_find_mailbox(m->path);
if (tmp && !tmp->has_new)
}
mutt_file_fclose(&fp);
- if (!CheckMboxSize)
+ if (!C_CheckMboxSize)
{
/* need to restore the times here, the file was not really accessed,
* only the type was accessed. This is important, because detection
bool new_or_changed;
- if (CheckMboxSize)
+ if (C_CheckMboxSize)
new_or_changed = (sb.st_size > m->size);
else
{
if (new_or_changed)
{
- if (!MailCheckRecent ||
+ if (!C_MailCheckRecent ||
(mutt_file_stat_timespec_compare(&sb, MUTT_STAT_MTIME, &m->last_visited) > 0))
{
m->has_new = true;
}
}
- else if (CheckMboxSize)
+ else if (C_CheckMboxSize)
{
/* some other program has deleted mail from the folder */
m->size = (off_t) sb.st_size;
#endif
/* These Config Variables are only used in menu.c */
-short MenuContext; ///< Config: Number of lines of overlap when changing pages in the index
-bool MenuMoveOff; ///< Config: Allow the last menu item to move off the bottom of the screen
-bool MenuScroll; ///< Config: Scroll the menu/index by one line, rather than a page
+short C_MenuContext; ///< Config: Number of lines of overlap when changing pages in the index
+bool C_MenuMoveOff; ///< Config: Allow the last menu item to move off the bottom of the screen
+bool C_MenuScroll; ///< Config: Scroll the menu/index by one line, rather than a page
char *SearchBuffers[MENU_MAX];
switch (*s)
{
case MUTT_TREE_LLCORNER:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('`');
#ifdef WACS_LLCORNER
else
#endif
break;
case MUTT_TREE_ULCORNER:
- if (AsciiChars)
+ if (C_AsciiChars)
addch(',');
#ifdef WACS_ULCORNER
else
#endif
break;
case MUTT_TREE_LTEE:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('|');
#ifdef WACS_LTEE
else
#endif
break;
case MUTT_TREE_HLINE:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('-');
#ifdef WACS_HLINE
else
#endif
break;
case MUTT_TREE_VLINE:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('|');
#ifdef WACS_VLINE
else
#endif
break;
case MUTT_TREE_TTEE:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('-');
#ifdef WACS_TTEE
else
#endif
break;
case MUTT_TREE_BTEE:
- if (AsciiChars)
+ if (C_AsciiChars)
addch('-');
#ifdef WACS_BTEE
else
static void menu_pad_string(struct Menu *menu, char *buf, size_t buflen)
{
char *scratch = mutt_str_strdup(buf);
- int shift = ArrowCursor ? 3 : 0;
+ int shift = C_ArrowCursor ? 3 : 0;
int cols = menu->indexwin->cols - shift;
mutt_simple_format(buf, buflen, cols, cols, FMT_LEFT, ' ', scratch,
move(0, 0);
clrtobot();
- if (Help)
+ if (C_Help)
{
SETCOLOR(MT_COLOR_STATUS);
mutt_window_move(menu->helpwin, 0, 0);
if (i == menu->current)
{
SETCOLOR(MT_COLOR_INDICATOR);
- if (ArrowCursor)
+ if (C_ArrowCursor)
{
addstr("->");
ATTRSET(attr);
else
do_color = false;
}
- else if (ArrowCursor)
+ else if (C_ArrowCursor)
addstr(" ");
print_enriched_string(i, attr, (unsigned char *) buf, do_color);
mutt_window_move(menu->indexwin, menu->oldcurrent + menu->offset - menu->top, 0);
ATTRSET(old_color);
- if (ArrowCursor)
+ if (C_ArrowCursor)
{
/* clear the pointer */
addstr(" ");
menu_pad_string(menu, buf, sizeof(buf));
SETCOLOR(MT_COLOR_INDICATOR);
- if (ArrowCursor)
+ if (C_ArrowCursor)
{
addstr("->");
ATTRSET(attr);
*/
void menu_check_recenter(struct Menu *menu)
{
- int c = MIN(MenuContext, menu->pagelen / 2);
+ int c = MIN(C_MenuContext, menu->pagelen / 2);
int old_top = menu->top;
- if (!MenuMoveOff && menu->max <= menu->pagelen) /* less entries than lines */
+ if (!C_MenuMoveOff && menu->max <= menu->pagelen) /* less entries than lines */
{
if (menu->top != 0)
{
}
else
{
- if (MenuScroll || (menu->pagelen <= 0) || (c < MenuContext))
+ if (C_MenuScroll || (menu->pagelen <= 0) || (c < C_MenuContext))
{
if (menu->current < menu->top + c)
menu->top = menu->current - c;
}
}
- if (!MenuMoveOff) /* make entries stick to bottom */
+ if (!C_MenuMoveOff) /* make entries stick to bottom */
menu->top = MIN(menu->top, menu->max - menu->pagelen);
menu->top = MAX(menu->top, 0);
{
if (menu->max)
{
- int c = MIN(MenuContext, menu->pagelen / 2);
+ int c = MIN(C_MenuContext, menu->pagelen / 2);
if (menu->top + 1 < menu->max - c &&
- (MenuMoveOff || (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
+ (C_MenuMoveOff || (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
{
menu->top++;
if (menu->current < menu->top + c && menu->current < menu->max - 1)
{
if (menu->top > 0)
{
- int c = MIN(MenuContext, menu->pagelen / 2);
+ int c = MIN(C_MenuContext, menu->pagelen / 2);
menu->top--;
if (menu->current >= menu->top + menu->pagelen - c && menu->current > 1)
static void menu_length_jump(struct Menu *menu, int jumplen)
{
const int neg = (jumplen >= 0) ? 0 : -1;
- const int c = MIN(MenuContext, menu->pagelen / 2);
+ const int c = MIN(C_MenuContext, menu->pagelen / 2);
if (menu->max)
{
menu->top += jumplen;
/* jumped too long? */
- if ((neg || !MenuMoveOff) && DIRECTION * menu->top > tmp)
+ if ((neg || !C_MenuMoveOff) && DIRECTION * menu->top > tmp)
menu->top = tmp;
/* need to move the cursor? */
r += search_dir;
}
- if (WrapSearch && wrap++ == 0)
+ if (C_WrapSearch && wrap++ == 0)
{
r = search_dir == 1 ? 0 : menu->max - 1;
goto search_next;
menu->oldcurrent = menu->current;
/* move the cursor out of the way */
- if (ArrowCursor)
+ if (C_ArrowCursor)
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 2);
- else if (BrailleFriendly)
+ else if (C_BrailleFriendly)
mutt_window_move(menu->indexwin, menu->current - menu->top + menu->offset, 0);
else
{
i = -1;
}
}
- else if (menu->tagged && AutoTag)
+ else if (menu->tagged && C_AutoTag)
menu->tagprefix = true;
mutt_curs_set(1);
case OP_TAG:
if (menu->menu_tag && !menu->dialog)
{
- if (menu->tagprefix && !AutoTag)
+ if (menu->tagprefix && !C_AutoTag)
{
for (i = 0; i < menu->max; i++)
menu->tagged += menu->menu_tag(menu, i, 0);
{
int j = menu->menu_tag(menu, menu->current, -1);
menu->tagged += j;
- if (j && Resolve && menu->current < menu->max - 1)
+ if (j && C_Resolve && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw |= REDRAW_MOTION_RESYNCH;
#define EILSEQ EINVAL
#endif
-char *AssumedCharset; ///< Config: If a message is missing a character set, assume this character set
-char *Charset; ///< Config: Default character set for displaying text on screen
+char *C_AssumedCharset; ///< Config: If a message is missing a character set, assume this character set
+char *C_Charset; ///< Config: Default character set for displaying text on screen
/**
* ReplacementChar - When a Unicode character can't be displayed, use this instead
* @retval 0 Success
* @retval -1 Error
*
- * Work through #AssumedCharset looking for a character set conversion that
+ * Work through #C_AssumedCharset looking for a character set conversion that
* works. Failing that, try mutt_ch_get_default_charset().
*/
int mutt_ch_convert_nonmime_string(char **ps)
{
const char *c1 = NULL;
- for (const char *c = AssumedCharset; c; c = c1 ? c1 + 1 : 0)
+ for (const char *c = C_AssumedCharset; c; c = c1 ? c1 + 1 : 0)
{
char *u = *ps;
char *s = NULL;
fromcode = mutt_mem_malloc(n + 1);
mutt_str_strfcpy(fromcode, c, n + 1);
s = mutt_str_substr_dup(u, u + ulen);
- int m = mutt_ch_convert_string(&s, fromcode, Charset, 0);
+ int m = mutt_ch_convert_string(&s, fromcode, C_Charset, 0);
FREE(&fromcode);
FREE(&s);
if (m == 0)
}
}
mutt_ch_convert_string(ps, (const char *) mutt_ch_get_default_charset(),
- Charset, MUTT_ICONV_HOOK_FROM);
+ C_Charset, MUTT_ICONV_HOOK_FROM);
return -1;
}
char *mutt_ch_get_default_charset(void)
{
static char fcharset[SHORT_STRING];
- const char *c = AssumedCharset;
+ const char *c = C_AssumedCharset;
const char *c1 = NULL;
if (c && *c)
struct Buffer;
-extern char *AssumedCharset;
-extern char *Charset;
+extern char *C_AssumedCharset;
+extern char *C_Charset;
extern bool CharsetIsUtf8;
extern wchar_t ReplacementChar;
#include "message.h"
#include "string2.h"
-char *Tmpdir; ///< Config: Directory for temporary files
+char *C_Tmpdir; ///< Config: Directory for temporary files
/* these characters must be escaped in regular expressions */
static const char rx_special_chars[] = "^.[$()|*+?{\\";
{
char name[PATH_MAX];
- int n = snprintf(name, sizeof(name), "%s/neomutt-XXXXXX", NONULL(Tmpdir));
+ int n = snprintf(name, sizeof(name), "%s/neomutt-XXXXXX", NONULL(C_Tmpdir));
if (n < 0)
return NULL;
#include <time.h>
struct stat;
-extern char *Tmpdir;
+extern char *C_Tmpdir;
/* Flags for mutt_file_read_line() */
#define MUTT_CONT (1 << 0) /**< \-continuation */
*
* Read/write command history from/to a file.
*
- * This history ring grows from 0..History, with last marking the
+ * This history ring grows from 0..#C_History, with last marking the
* where new entries go:
* ```
* 0 the oldest entry in the ring
* last-> x NULL (this will be overwritten next)
* x+1 NULL
* ...
- * History NULL
+ * #C_History NULL
* ```
* Once the array fills up, it is used as a ring. last points where a new
* entry will go. Older entries are "up", and wrap around:
* last-> y entry (this will be overwritten next)
* y+1 the oldest entry in the ring
* ...
- * History entry
+ * #C_History entry
* ```
* When $history_remove_dups is set, duplicate entries are scanned and removed
* each time a new entry is added. In order to preserve the history ring size,
- * entries 0..last are compacted up. Entries last+1..History are
+ * entries 0..last are compacted up. Entries last+1..#C_History are
* compacted down:
* ```
* 0 entry
* ...
* the oldest entry in the ring
* next oldest entry
- * History entry
+ * #C_History entry
* ```
*/
#include "string2.h"
/* These Config Variables are only used in history.c */
-short History; ///< Config: Number of history entries to keep in memory per category
-char *HistoryFile; ///< Config: File to save history in
-bool HistoryRemoveDups; ///< Config: Remove duplicate entries from the history
-short SaveHistory; ///< Config: Number of history entries to save per category
+short C_History; ///< Config: Number of history entries to keep in memory per category
+char *C_HistoryFile; ///< Config: File to save history in
+bool C_HistoryRemoveDups; ///< Config: Remove duplicate entries from the history
+short C_SaveHistory; ///< Config: Number of history entries to save per category
#define HC_FIRST HC_CMD
}
}
- if (History != 0)
- h->hist = mutt_mem_calloc(History + 1, sizeof(char *));
+ if (C_History != 0)
+ h->hist = mutt_mem_calloc(C_History + 1, sizeof(char *));
h->cur = 0;
h->last = 0;
bool regen_file = false;
struct Hash *dup_hashes[HC_MAX] = { 0 };
- FILE *f = fopen(HistoryFile, "r");
+ FILE *f = fopen(C_HistoryFile, "r");
if (!f)
return;
- if (HistoryRemoveDups)
+ if (C_HistoryRemoveDups)
for (hclass = 0; hclass < HC_MAX; hclass++)
- dup_hashes[hclass] = mutt_hash_new(MAX(10, SaveHistory * 2), MUTT_HASH_STRDUP_KEYS);
+ dup_hashes[hclass] = mutt_hash_new(MAX(10, C_SaveHistory * 2), MUTT_HASH_STRDUP_KEYS);
line = 0;
while ((linebuf = mutt_file_read_line(linebuf, &buflen, f, &line, 0)))
if (hclass >= HC_MAX)
continue;
*p = '\0';
- if (HistoryRemoveDups && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
+ if (C_HistoryRemoveDups && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
{
regen_file = true;
continue;
{
for (hclass = HC_FIRST; hclass < HC_MAX; hclass++)
{
- if (n[hclass] > SaveHistory)
+ if (n[hclass] > C_SaveHistory)
{
regen_file = true;
break;
if (hclass >= HC_MAX)
continue;
*p = '\0';
- if (HistoryRemoveDups && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
+ if (C_HistoryRemoveDups && (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
{
continue;
}
*p = '|';
- if (n[hclass]-- <= SaveHistory)
+ if (n[hclass]-- <= C_SaveHistory)
fprintf(tmpfp, "%s\n", linebuf);
}
}
FREE(&linebuf);
if (tmpfp)
{
- if ((fflush(tmpfp) == 0) && (f = fopen(HistoryFile, "w")))
+ if ((fflush(tmpfp) == 0) && (f = fopen(C_HistoryFile, "w")))
{
rewind(tmpfp);
mutt_file_copy_stream(tmpfp, f);
}
mutt_file_fclose(&tmpfp);
}
- if (HistoryRemoveDups)
+ if (C_HistoryRemoveDups)
for (hclass = 0; hclass < HC_MAX; hclass++)
mutt_hash_free(&dup_hashes[hclass]);
}
if (!str || !*str) /* This shouldn't happen, but it's safer. */
return;
- f = fopen(HistoryFile, "a");
+ f = fopen(C_HistoryFile, "a");
if (!f)
{
mutt_perror("fopen");
}
tmp = mutt_str_strdup(str);
- mutt_ch_convert_string(&tmp, Charset, "utf-8", 0);
+ mutt_ch_convert_string(&tmp, C_Charset, "utf-8", 0);
/* Format of a history item (1 line): "<histclass>:<string>|".
* We add a '|' in order to avoid lines ending with '\'. */
if (--n < 0)
{
- n = SaveHistory;
+ n = C_SaveHistory;
shrink_histfile();
}
}
int source, dest, old_last;
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return; /* disabled */
/* Remove dups from 0..last-1 compacting up. */
while (source > h->last)
h->hist[source--] = NULL;
- /* Remove dups from last+1 .. History compacting down. */
- source = History;
- dest = History;
+ /* Remove dups from last+1 .. C_History compacting down. */
+ source = C_History;
+ dest = C_History;
while (source > old_last)
{
if (mutt_str_strcmp(h->hist[source], str) == 0)
struct History *h = get_history(hclass);
int match_count = 0, cur;
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return 0;
cur = h->last;
{
cur--;
if (cur < 0)
- cur = History;
+ cur = C_History;
if (cur == h->last)
break;
if (mutt_str_stristr(h->hist[cur], search_buf))
matches[match_count++] = h->hist[cur];
- } while (match_count < History);
+ } while (match_count < C_History);
return match_count;
}
if (!h->hist)
continue;
- /* The array has (History+1) elements */
- for (int i = 0; i <= History; i++)
+ /* The array has (C_History+1) elements */
+ for (int i = 0; i <= C_History; i++)
{
FREE(&h->hist[i]);
}
*/
void mutt_hist_init(void)
{
- if (History == OldSize)
+ if (C_History == OldSize)
return;
for (enum HistoryClass hclass = HC_FIRST; hclass < HC_MAX; hclass++)
init_history(&Histories[hclass]);
- OldSize = History;
+ OldSize = C_History;
}
/**
{
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return; /* disabled */
if (*str)
{
int prev = h->last - 1;
if (prev < 0)
- prev = History;
+ prev = C_History;
/* don't add to prompt history:
* - lines beginning by a space
*/
if ((*str != ' ') && (!h->hist[prev] || (mutt_str_strcmp(h->hist[prev], str) != 0)))
{
- if (HistoryRemoveDups)
+ if (C_HistoryRemoveDups)
remove_history_dups(hclass, str);
- if (save && (SaveHistory != 0))
+ if (save && (C_SaveHistory != 0))
save_history(hclass, str);
mutt_str_replace(&h->hist[h->last++], str);
- if (h->last > History)
+ if (h->last > C_History)
h->last = 0;
}
}
{
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return ""; /* disabled */
int next = h->cur;
do
{
next++;
- if (next > History)
+ if (next > C_History)
next = 0;
if (next == h->last)
break;
{
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return ""; /* disabled */
int prev = h->cur;
{
prev--;
if (prev < 0)
- prev = History;
+ prev = C_History;
if (prev == h->last)
break;
} while (!h->hist[prev]);
{
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return; /* disabled */
h->cur = h->last;
/**
* mutt_hist_read_file - Read the History from a file
*
- * The file #HistoryFile is read and parsed into separate History ring buffers.
+ * The file #C_HistoryFile is read and parsed into separate History ring buffers.
*/
void mutt_hist_read_file(void)
{
char *linebuf = NULL, *p = NULL;
size_t buflen;
- FILE *f = fopen(HistoryFile, "r");
+ FILE *f = fopen(C_HistoryFile, "r");
if (!f)
return;
p = mutt_str_strdup(linebuf + read);
if (p)
{
- mutt_ch_convert_string(&p, "utf-8", Charset, 0);
+ mutt_ch_convert_string(&p, "utf-8", C_Charset, 0);
mutt_hist_add(hclass, p, false);
FREE(&p);
}
{
struct History *h = get_history(hclass);
- if (!History || !h)
+ if (!C_History || !h)
return false; /* disabled */
return h->cur == h->last;
{
struct History *h = get_history(hclass);
- if ((History == 0) || !h)
+ if ((C_History == 0) || !h)
return; /* disabled */
/* Don't check if str has a value because the scratch buffer may contain
#include "config/lib.h"
/* These Config Variables are only used in mutt/history.c */
-extern short History;
-extern char *HistoryFile;
-extern bool HistoryRemoveDups;
-extern short SaveHistory;
+extern short C_History;
+extern char *C_HistoryFile;
+extern bool C_HistoryRemoveDups;
+extern short C_SaveHistory;
/**
* enum HistoryClass - Type to differentiate different histories
#include "pop/pop.h"
/* These Config Variables are only used in mutt_account.c */
-char *ImapLogin; ///< Config: (imap) Login name for the IMAP server (defaults to ImapUser)
-char *ImapOauthRefreshCmd; ///< Config: (imap) External command to generate OAUTH refresh token
-char *ImapPass; ///< Config: (imap) Password for the IMAP server
-char *NntpPass; ///< Config: (nntp) Password for the news server
-char *NntpUser; ///< Config: (nntp) Username for the news server
-char *PopOauthRefreshCmd; ///< Config: (pop) External command to generate OAUTH refresh token
-char *PopPass; ///< Config: (pop) Password of the POP server
-char *PopUser; ///< Config: (pop) Username of the POP server
-char *SmtpOauthRefreshCmd; ///< Config: (smtp) External command to generate OAUTH refresh token
-char *SmtpPass; ///< Config: (smtp) Password for the SMTP server
+char *C_ImapLogin; ///< Config: (imap) Login name for the IMAP server (defaults to #C_ImapUser)
+char *C_ImapOauthRefreshCmd; ///< Config: (imap) External command to generate OAUTH refresh token
+char *C_ImapPass; ///< Config: (imap) Password for the IMAP server
+char *C_NntpPass; ///< Config: (nntp) Password for the news server
+char *C_NntpUser; ///< Config: (nntp) Username for the news server
+char *C_PopOauthRefreshCmd; ///< Config: (pop) External command to generate OAUTH refresh token
+char *C_PopPass; ///< Config: (pop) Password of the POP server
+char *C_PopUser; ///< Config: (pop) Username of the POP server
+char *C_SmtpOauthRefreshCmd; ///< Config: (smtp) External command to generate OAUTH refresh token
+char *C_SmtpPass; ///< Config: (smtp) Password for the SMTP server
/**
* mutt_account_match - Compare account info (host/port/user)
const char *user = NONULL(Username);
#ifdef USE_IMAP
- if ((a1->type == MUTT_ACCT_TYPE_IMAP) && ImapUser)
- user = ImapUser;
+ if ((a1->type == MUTT_ACCT_TYPE_IMAP) && C_ImapUser)
+ user = C_ImapUser;
#endif
#ifdef USE_POP
- if ((a1->type == MUTT_ACCT_TYPE_POP) && PopUser)
- user = PopUser;
+ if ((a1->type == MUTT_ACCT_TYPE_POP) && C_PopUser)
+ user = C_PopUser;
#endif
#ifdef USE_NNTP
- if ((a1->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
- user = NntpUser;
+ if ((a1->type == MUTT_ACCT_TYPE_NNTP) && C_NntpUser)
+ user = C_NntpUser;
#endif
if (a1->flags & MUTT_ACCT_USER)
if (account->flags & MUTT_ACCT_USER)
return 0;
#ifdef USE_IMAP
- else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapUser)
- mutt_str_strfcpy(account->user, ImapUser, sizeof(account->user));
+ else if ((account->type == MUTT_ACCT_TYPE_IMAP) && C_ImapUser)
+ mutt_str_strfcpy(account->user, C_ImapUser, sizeof(account->user));
#endif
#ifdef USE_POP
- else if ((account->type == MUTT_ACCT_TYPE_POP) && PopUser)
- mutt_str_strfcpy(account->user, PopUser, sizeof(account->user));
+ else if ((account->type == MUTT_ACCT_TYPE_POP) && C_PopUser)
+ mutt_str_strfcpy(account->user, C_PopUser, sizeof(account->user));
#endif
#ifdef USE_NNTP
- else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
- mutt_str_strfcpy(account->user, NntpUser, sizeof(account->user));
+ else if ((account->type == MUTT_ACCT_TYPE_NNTP) && C_NntpUser)
+ mutt_str_strfcpy(account->user, C_NntpUser, sizeof(account->user));
#endif
else if (OptNoCurses)
return -1;
#ifdef USE_IMAP
else if (account->type == MUTT_ACCT_TYPE_IMAP)
{
- if (ImapLogin)
+ if (C_ImapLogin)
{
- mutt_str_strfcpy(account->login, ImapLogin, sizeof(account->login));
+ mutt_str_strfcpy(account->login, C_ImapLogin, sizeof(account->login));
account->flags |= MUTT_ACCT_LOGIN;
}
}
if (account->flags & MUTT_ACCT_PASS)
return 0;
#ifdef USE_IMAP
- else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapPass)
- mutt_str_strfcpy(account->pass, ImapPass, sizeof(account->pass));
+ else if ((account->type == MUTT_ACCT_TYPE_IMAP) && C_ImapPass)
+ mutt_str_strfcpy(account->pass, C_ImapPass, sizeof(account->pass));
#endif
#ifdef USE_POP
- else if ((account->type == MUTT_ACCT_TYPE_POP) && PopPass)
- mutt_str_strfcpy(account->pass, PopPass, sizeof(account->pass));
+ else if ((account->type == MUTT_ACCT_TYPE_POP) && C_PopPass)
+ mutt_str_strfcpy(account->pass, C_PopPass, sizeof(account->pass));
#endif
#ifdef USE_SMTP
- else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpPass)
- mutt_str_strfcpy(account->pass, SmtpPass, sizeof(account->pass));
+ else if ((account->type == MUTT_ACCT_TYPE_SMTP) && C_SmtpPass)
+ mutt_str_strfcpy(account->pass, C_SmtpPass, sizeof(account->pass));
#endif
#ifdef USE_NNTP
- else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
- mutt_str_strfcpy(account->pass, NntpPass, sizeof(account->pass));
+ else if ((account->type == MUTT_ACCT_TYPE_NNTP) && C_NntpPass)
+ mutt_str_strfcpy(account->pass, C_NntpPass, sizeof(account->pass));
#endif
else if (OptNoCurses)
return -1;
return NULL;
#ifdef USE_IMAP
- if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapOauthRefreshCmd)
- cmd = ImapOauthRefreshCmd;
+ if ((account->type == MUTT_ACCT_TYPE_IMAP) && C_ImapOauthRefreshCmd)
+ cmd = C_ImapOauthRefreshCmd;
#endif
#ifdef USE_POP
- else if ((account->type == MUTT_ACCT_TYPE_POP) && PopOauthRefreshCmd)
- cmd = PopOauthRefreshCmd;
+ else if ((account->type == MUTT_ACCT_TYPE_POP) && C_PopOauthRefreshCmd)
+ cmd = C_PopOauthRefreshCmd;
#endif
#ifdef USE_SMTP
- else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpOauthRefreshCmd)
- cmd = SmtpOauthRefreshCmd;
+ else if ((account->type == MUTT_ACCT_TYPE_SMTP) && C_SmtpOauthRefreshCmd)
+ cmd = C_SmtpOauthRefreshCmd;
#endif
if (!cmd)
struct Url;
/* These Config Variables are only used in mutt_account.c */
-extern char *ImapLogin;
-extern char *ImapOauthRefreshCmd;
-extern char *ImapPass;
-extern char *NntpPass;
-extern char *NntpUser;
-extern char *PopOauthRefreshCmd;
-extern char *PopPass;
-extern char *PopUser;
-extern char *SmtpOauthRefreshCmd;
-extern char *SmtpPass;
+extern char *C_ImapLogin;
+extern char *C_ImapOauthRefreshCmd;
+extern char *C_ImapPass;
+extern char *C_NntpPass;
+extern char *C_NntpUser;
+extern char *C_PopOauthRefreshCmd;
+extern char *C_PopPass;
+extern char *C_PopUser;
+extern char *C_SmtpOauthRefreshCmd;
+extern char *C_SmtpPass;
/**
* enum AccountType - account types
else if (a->type == TYPE_TEXT)
{
/* On text, default to editor */
- mutt_edit_file(NONULL(Editor), a->filename);
+ mutt_edit_file(NONULL(C_Editor), a->filename);
}
else
{
}
}
- if ((mutt_wait_filter(thepid) || (entry->needsterminal && WaitKey)) && !use_pager)
+ if ((mutt_wait_filter(thepid) || (entry->needsterminal && C_WaitKey)) && !use_pager)
mutt_any_key_to_continue(NULL);
if (tempfd != -1)
if (rv == -1)
mutt_debug(LL_DEBUG1, "Error running \"%s\"!", command);
- if ((rv != 0) || (entry->needsterminal && WaitKey))
+ if ((rv != 0) || (entry->needsterminal && C_WaitKey))
mutt_any_key_to_continue(NULL);
}
}
if (mutt_wait_filter(thepid) != 0)
rc = 0;
- if (rc == 0 || WaitKey)
+ if (rc == 0 || C_WaitKey)
mutt_any_key_to_continue(NULL);
return rc;
}
mutt_file_copy_stream(ifp, fpout);
mutt_file_fclose(&fpout);
mutt_file_fclose(&ifp);
- if (mutt_wait_filter(thepid) || WaitKey)
+ if (mutt_wait_filter(thepid) || C_WaitKey)
mutt_any_key_to_continue(NULL);
}
else
if (rc == -1)
mutt_debug(LL_DEBUG1, "Error running \"%s\"!", command);
- if ((rc != 0) || WaitKey)
+ if ((rc != 0) || C_WaitKey)
mutt_any_key_to_continue(NULL);
}
if ((mutt_str_strcasecmp("text/plain", type) == 0) ||
(mutt_str_strcasecmp("application/postscript", type) == 0))
{
- return mutt_pipe_attachment(fp, a, NONULL(PrintCommand), NULL);
+ return mutt_pipe_attachment(fp, a, NONULL(C_PrintCommand), NULL);
}
else if (mutt_can_decode(a))
{
mutt_debug(LL_DEBUG2, "successfully opened %s read-only\n", newfile);
mutt_endwin();
- thepid = mutt_create_filter(NONULL(PrintCommand), &fpout, NULL, NULL);
+ thepid = mutt_create_filter(NONULL(C_PrintCommand), &fpout, NULL, NULL);
if (thepid < 0)
{
mutt_perror(_("Can't create filter"));
mutt_file_fclose(&fpout);
mutt_file_fclose(&ifp);
- if (mutt_wait_filter(thepid) != 0 || WaitKey)
+ if (mutt_wait_filter(thepid) != 0 || C_WaitKey)
mutt_any_key_to_continue(NULL);
rc = 1;
}
#define BEEP() \
do \
{ \
- if (Beep) \
+ if (C_Beep) \
beep(); \
} while (false)
*/
void mutt_hist_complete(char *buf, size_t buflen, enum HistoryClass hclass)
{
- char **matches = mutt_mem_calloc(History, sizeof(char *));
+ char **matches = mutt_mem_calloc(C_History, sizeof(char *));
int match_count = mutt_hist_search(buf, hclass, matches);
if (match_count)
{
struct timeval LastError = { 0 };
-short DebugLevel = 0; ///< Config: Logging level for debug logs
-char *DebugFile = NULL; ///< Config: File to save debug logs
+short C_DebugLevel = 0; ///< Config: Logging level for debug logs
+char *C_DebugFile = NULL; ///< Config: File to save debug logs
char *CurrentFile = NULL; /**< The previous log file name */
const int NumOfLogs = 5; /**< How many log files to rotate */
return;
}
- unsigned long sleep = SleepTime * S_TO_NS;
+ unsigned long sleep = C_SleepTime * S_TO_NS;
long micro = micro_elapsed(&LastError, &now);
if ((micro * US_TO_NS) >= sleep)
return;
int log_disp_curses(time_t stamp, const char *file, int line,
const char *function, int level, ...)
{
- if (level > DebugLevel)
+ if (level > C_DebugLevel)
return 0;
char buf[LONG_STRING];
*/
int mutt_log_set_file(const char *file, bool verbose)
{
- if (mutt_str_strcmp(CurrentFile, DebugFile) != 0)
+ if (mutt_str_strcmp(CurrentFile, C_DebugFile) != 0)
{
- const char *name = rotate_logs(DebugFile, NumOfLogs);
+ const char *name = rotate_logs(C_DebugFile, NumOfLogs);
if (!name)
return -1;
log_file_set_filename(name, false);
FREE(&name);
- mutt_str_replace(&CurrentFile, DebugFile);
+ mutt_str_replace(&CurrentFile, C_DebugFile);
}
cs_str_string_set(Config, "debug_file", file, NULL);
int mutt_log_set_level(int level, bool verbose)
{
if (!CurrentFile)
- mutt_log_set_file(DebugFile, false);
+ mutt_log_set_file(C_DebugFile, false);
if (log_file_set_level(level, verbose) != 0)
return -1;
*/
int mutt_log_start(void)
{
- if (DebugLevel < 1)
+ if (C_DebugLevel < 1)
return 0;
if (log_file_running())
return 0;
- mutt_log_set_file(DebugFile, false);
+ mutt_log_set_file(C_DebugFile, false);
/* This will trigger the file creation */
- if (log_file_set_level(DebugLevel, true) < 0)
+ if (log_file_set_level(C_DebugLevel, true) < 0)
return -1;
return 0;
const char *name, enum ConfigEvent ev)
{
if (mutt_str_strcmp(name, "debug_file") == 0)
- mutt_log_set_file(DebugFile, true);
+ mutt_log_set_file(C_DebugFile, true);
else if (mutt_str_strcmp(name, "debug_level") == 0)
- mutt_log_set_level(DebugLevel, true);
+ mutt_log_set_level(C_DebugLevel, true);
return true;
}
#include <time.h>
#include "config/lib.h"
-extern short DebugLevel;
-extern char *DebugFile;
+extern short C_DebugLevel;
+extern char *C_DebugFile;
int log_disp_curses(time_t stamp, const char *file, int line, const char *function, int level, ...);
#include "keymap.h"
/* These Config Variables are only used in menu.c */
-extern short MenuContext;
-extern bool MenuMoveOff;
-extern bool MenuScroll;
+extern short C_MenuContext;
+extern bool C_MenuMoveOff;
+extern bool C_MenuScroll;
struct ConfigSet;
struct HashElem;
switch (sig)
{
case SIGTSTP: /* user requested a suspend */
- if (!Suspend)
+ if (!C_Suspend)
break;
IsEndwin = isendwin();
curs_set(1);
{
enum ConnectionType conn_type;
- if (Tunnel && *Tunnel)
+ if (C_Tunnel && *C_Tunnel)
conn_type = MUTT_CONNECTION_TUNNEL;
else if (account->flags & MUTT_ACCT_SSL)
conn_type = MUTT_CONNECTION_SSL;
#include "sort.h"
/* These Config Variables are only used in mutt_thread.c */
-bool DuplicateThreads; ///< Config: Highlight messages with duplicated message IDs
-bool HideLimited; ///< Config: Don't indicate hidden messages, in the thread tree
-bool HideMissing; ///< Config: Don't indicate missing messages, in the thread tree
-bool HideThreadSubject; ///< Config: Hide subjects that are similar to that of the parent message
-bool HideTopLimited; ///< Config: Don't indicate hidden top message, in the thread tree
-bool HideTopMissing; ///< Config: Don't indicate missing top message, in the thread tree
-bool NarrowTree; ///< Config: Draw a narrower thread tree in the index
-bool SortRe; ///< Config: Sort method for the sidebar
-bool StrictThreads; ///< Config: Thread messages using 'In-Reply-To' and 'References' headers
-bool ThreadReceived; ///< Config: Sort threaded messages by their received date
+bool C_DuplicateThreads; ///< Config: Highlight messages with duplicated message IDs
+bool C_HideLimited; ///< Config: Don't indicate hidden messages, in the thread tree
+bool C_HideMissing; ///< Config: Don't indicate missing messages, in the thread tree
+bool C_HideThreadSubject; ///< Config: Hide subjects that are similar to that of the parent message
+bool C_HideTopLimited; ///< Config: Don't indicate hidden top message, in the thread tree
+bool C_HideTopMissing; ///< Config: Don't indicate missing top message, in the thread tree
+bool C_NarrowTree; ///< Config: Draw a narrower thread tree in the index
+bool C_SortRe; ///< Config: Sort method for the sidebar
+bool C_StrictThreads; ///< Config: Thread messages using 'In-Reply-To' and 'References' headers
+bool C_ThreadReceived; ///< Config: Sort threaded messages by their received date
/**
* is_visible - Is the message visible?
struct MuttThread *tmp = NULL, *tree = e->thread;
/* if the user disabled subject hiding, display it */
- if (!HideThreadSubject)
+ if (!C_HideThreadSubject)
return true;
/* if our subject is different from our parent's, display it */
struct Mailbox *m = ctx->mailbox;
struct MuttThread *tree = ctx->tree;
- struct Email **array = m->emails + ((Sort & SORT_REVERSE) ? m->msg_count - 1 : 0);
+ struct Email **array = m->emails + ((C_Sort & SORT_REVERSE) ? m->msg_count - 1 : 0);
while (tree)
{
tree = tree->child;
*array = tree->message;
- array += (Sort & SORT_REVERSE) ? -1 : 1;
+ array += (C_Sort & SORT_REVERSE) ? -1 : 1;
if (tree->child)
tree = tree->child;
static void calculate_visibility(struct Context *ctx, int *max_depth)
{
struct MuttThread *tmp = NULL, *tree = ctx->tree;
- int hide_top_missing = HideTopMissing && !HideMissing;
- int hide_top_limited = HideTopLimited && !HideLimited;
+ int hide_top_missing = C_HideTopMissing && !C_HideMissing;
+ int hide_top_limited = C_HideTopLimited && !C_HideLimited;
int depth = 0;
/* we walk each level backwards to make it easier to compute next_subtree_visible */
else
{
tree->visible = false;
- tree->deep = !HideLimited;
+ tree->deep = !C_HideLimited;
}
}
else
{
tree->visible = false;
- tree->deep = !HideMissing;
+ tree->deep = !C_HideMissing;
}
tree->next_subtree_visible =
tree->next && (tree->next->next_subtree_visible || tree->next->subtree_visible);
void mutt_draw_tree(struct Context *ctx)
{
char *pfx = NULL, *mypfx = NULL, *arrow = NULL, *myarrow = NULL, *new_tree = NULL;
- char corner = (Sort & SORT_REVERSE) ? MUTT_TREE_ULCORNER : MUTT_TREE_LLCORNER;
- char vtee = (Sort & SORT_REVERSE) ? MUTT_TREE_BTEE : MUTT_TREE_TTEE;
- int depth = 0, start_depth = 0, max_depth = 0, width = NarrowTree ? 1 : 2;
+ char corner = (C_Sort & SORT_REVERSE) ? MUTT_TREE_ULCORNER : MUTT_TREE_LLCORNER;
+ char vtee = (C_Sort & SORT_REVERSE) ? MUTT_TREE_BTEE : MUTT_TREE_TTEE;
+ int depth = 0, start_depth = 0, max_depth = 0, width = C_NarrowTree ? 1 : 2;
struct MuttThread *nextdisp = NULL, *pseudo = NULL, *parent = NULL, *tree = ctx->tree;
/* Do the visibility calculations and free the old thread chars.
myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * width;
if (depth && start_depth == depth)
myarrow[0] = nextdisp ? MUTT_TREE_LTEE : corner;
- else if (parent->message && !HideLimited)
+ else if (parent->message && !C_HideLimited)
myarrow[0] = MUTT_TREE_HIDDEN;
- else if (!parent->message && !HideMissing)
+ else if (!parent->message && !C_HideMissing)
myarrow[0] = MUTT_TREE_MISSING;
else
myarrow[0] = vtee;
if (dateptr)
{
- thisdate = ThreadReceived ? cur->message->received : cur->message->date_sent;
+ thisdate = C_ThreadReceived ? cur->message->received : cur->message->date_sent;
if (!*dateptr || thisdate < *dateptr)
*dateptr = thisdate;
}
env = cur->message->env;
- if (env->real_subj && ((env->real_subj != env->subject) || (!SortRe)))
+ if (env->real_subj && ((env->real_subj != env->subject) || (!C_SortRe)))
{
struct ListNode *np = NULL;
STAILQ_FOREACH(np, subjects, entries)
!tmp->fake_thread && /* don't match pseudo threads */
tmp->message->subject_changed && /* only match interesting replies */
!is_descendant(tmp, cur) && /* don't match in the same thread */
- (date >= (ThreadReceived ? tmp->message->received : tmp->message->date_sent)) &&
- (!last || (ThreadReceived ? (last->message->received < tmp->message->received) :
- (last->message->date_sent < tmp->message->date_sent))) &&
+ (date >= (C_ThreadReceived ? tmp->message->received : tmp->message->date_sent)) &&
+ (!last || (C_ThreadReceived ?
+ (last->message->received < tmp->message->received) :
+ (last->message->date_sent < tmp->message->date_sent))) &&
tmp->message->env->real_subj &&
(mutt_str_strcmp(np->data, tmp->message->env->real_subj) == 0))
{
*/
else
{
- sort_func = mutt_get_sort_func(Sort);
+ sort_func = mutt_get_sort_func(C_Sort);
return sort_func ? 1 : 0;
}
}
* resorting, so we sort backwards and then put them back
* in reverse order so they're forwards
*/
- Sort ^= SORT_REVERSE;
+ C_Sort ^= SORT_REVERSE;
if (compare_threads(NULL, NULL) == 0)
return thread;
if (!thread->sort_key || thread->sort_children)
{
/* make sort_key the first or last sibling, as appropriate */
- sort_key = (!(Sort & SORT_LAST) ^ !(Sort & SORT_REVERSE)) ? thread->child : tmp;
+ sort_key = (!(C_Sort & SORT_LAST) ^ !(C_Sort & SORT_REVERSE)) ? thread->child : tmp;
/* we just sorted its children */
thread->sort_children = false;
oldsort_key = thread->sort_key;
thread->sort_key = thread->message;
- if (Sort & SORT_LAST)
+ if (C_Sort & SORT_LAST)
{
if (!thread->sort_key ||
- ((((Sort & SORT_REVERSE) ? 1 : -1) *
+ ((((C_Sort & SORT_REVERSE) ? 1 : -1) *
compare_threads((void *) &thread, (void *) &sort_key)) > 0))
{
thread->sort_key = sort_key->sort_key;
}
else
{
- Sort ^= SORT_REVERSE;
+ C_Sort ^= SORT_REVERSE;
FREE(&array);
return top;
}
memset(&top, 0, sizeof(top));
struct ListNode *ref = NULL;
- /* set Sort to the secondary method to support the set sort_aux=reverse-*
- * settings. The sorting functions just look at the value of
- * SORT_REVERSE
- */
- oldsort = Sort;
- Sort = SortAux;
+ /* Set C_Sort to the secondary method to support the set sort_aux=reverse-*
+ * settings. The sorting functions just look at the value of SORT_REVERSE */
+ oldsort = C_Sort;
+ C_Sort = C_SortAux;
if (!ctx->thread_hash)
init = true;
if (!cur->thread)
{
- if ((!init || DuplicateThreads) && cur->env->message_id)
+ if ((!init || C_DuplicateThreads) && cur->env->message_id)
thread = mutt_hash_find(ctx->thread_hash, cur->env->message_id);
else
thread = NULL;
}
else
{
- new = (DuplicateThreads ? thread : NULL);
+ new = (C_DuplicateThreads ? thread : NULL);
thread = mutt_mem_calloc(1, sizeof(struct MuttThread));
thread->message = cur;
check_subjects(ctx->mailbox, init);
- if (!StrictThreads)
+ if (!C_StrictThreads)
pseudo_threads(ctx);
if (ctx->tree)
ctx->tree = mutt_sort_subthreads(ctx->tree, init);
/* restore the oldsort order. */
- Sort = oldsort;
+ C_Sort = oldsort;
/* Put the list into an array. */
linearize_tree(ctx);
struct MuttThread *cur = NULL;
struct Email *tmp = NULL;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error(_("Threading is not enabled"));
return e->virtual;
}
else
{
- if (forwards ^ ((Sort & SORT_REVERSE) != 0))
+ if (forwards ^ ((C_Sort & SORT_REVERSE) != 0))
{
while (!cur->next && cur->parent)
cur = cur->parent;
}
}
- if (forwards ^ ((Sort & SORT_REVERSE) != 0))
+ if (forwards ^ ((C_Sort & SORT_REVERSE) != 0))
{
do
{
struct MuttThread *thread = NULL;
struct Email *parent = NULL;
- if ((Sort & SORT_MASK) != SORT_THREADS)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS)
{
mutt_error(_("Threading is not enabled"));
return e->virtual;
{
struct MuttThread *thread = NULL, *top = NULL;
struct Email *roothdr = NULL;
- int final, reverse = (Sort & SORT_REVERSE), minmsgno;
+ int final, reverse = (C_Sort & SORT_REVERSE), minmsgno;
int num_hidden = 0, new = 0, old = 0;
bool flagged = false;
int min_unread_msgno = INT_MAX, min_unread = cur->virtual;
#define CHECK_LIMIT (!ctx->pattern || cur->limited)
- if ((Sort & SORT_MASK) != SORT_THREADS && !(flag & MUTT_THREAD_GET_HIDDEN))
+ if ((C_Sort & SORT_MASK) != SORT_THREADS && !(flag & MUTT_THREAD_GET_HIDDEN))
{
mutt_error(_("Threading is not enabled"));
return cur->virtual;
struct MuttThread *threads[2];
int rc;
- if ((Sort & SORT_MASK) != SORT_THREADS || !e->thread)
+ if ((C_Sort & SORT_MASK) != SORT_THREADS || !e->thread)
return 1;
threads[0] = e->thread;
threads[i] = threads[i]->child;
}
- if (Sort & SORT_REVERSE)
+ if (C_Sort & SORT_REVERSE)
rc = threads[0]->message->msgno - (threads[1] ? threads[1]->message->msgno : -1);
else
{
struct MuttThread;
/* These Config Variables are only used in mutt_thread.c */
-extern bool DuplicateThreads;
-extern bool HideLimited;
-extern bool HideMissing;
-extern bool HideThreadSubject;
-extern bool HideTopLimited;
-extern bool HideTopMissing;
-extern bool NarrowTree;
-extern bool SortRe;
-extern bool StrictThreads;
-extern bool ThreadReceived;
+extern bool C_DuplicateThreads;
+extern bool C_HideLimited;
+extern bool C_HideMissing;
+extern bool C_HideThreadSubject;
+extern bool C_HideTopLimited;
+extern bool C_HideTopMissing;
+extern bool C_NarrowTree;
+extern bool C_SortRe;
+extern bool C_StrictThreads;
+extern bool C_ThreadReceived;
#define MUTT_THREAD_COLLAPSE (1 << 0) ///< Collapse an email thread
#define MUTT_THREAD_UNCOLLAPSE (1 << 1) ///< Uncollapse an email thread
MuttStatusWindow->rows = 1;
MuttStatusWindow->cols = COLS;
- MuttStatusWindow->row_offset = StatusOnTop ? 0 : LINES - 2;
+ MuttStatusWindow->row_offset = C_StatusOnTop ? 0 : LINES - 2;
MuttStatusWindow->col_offset = 0;
memcpy(MuttHelpWindow, MuttStatusWindow, sizeof(struct MuttWindow));
- if (!Help)
+ if (!C_Help)
MuttHelpWindow->rows = 0;
else
- MuttHelpWindow->row_offset = StatusOnTop ? LINES - 2 : 0;
+ MuttHelpWindow->row_offset = C_StatusOnTop ? LINES - 2 : 0;
memcpy(MuttMessageWindow, MuttStatusWindow, sizeof(struct MuttWindow));
MuttMessageWindow->row_offset = LINES - 1;
MuttIndexWindow->rows = MAX(
LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
MuttIndexWindow->row_offset =
- StatusOnTop ? MuttStatusWindow->rows : MuttHelpWindow->rows;
+ C_StatusOnTop ? MuttStatusWindow->rows : MuttHelpWindow->rows;
#ifdef USE_SIDEBAR
- if (SidebarVisible)
+ if (C_SidebarVisible)
{
memcpy(MuttSidebarWindow, MuttIndexWindow, sizeof(struct MuttWindow));
- MuttSidebarWindow->cols = SidebarWidth;
- MuttIndexWindow->cols -= SidebarWidth;
+ MuttSidebarWindow->cols = C_SidebarWidth;
+ MuttIndexWindow->cols -= C_SidebarWidth;
- if (SidebarOnRight)
+ if (C_SidebarOnRight)
{
- MuttSidebarWindow->col_offset = COLS - SidebarWidth;
+ MuttSidebarWindow->col_offset = COLS - C_SidebarWidth;
}
else
{
- MuttIndexWindow->col_offset += SidebarWidth;
+ MuttIndexWindow->col_offset += C_SidebarWidth;
}
}
#endif
MuttMessageWindow->rows = mw_rows;
MuttMessageWindow->row_offset = LINES - mw_rows;
- MuttStatusWindow->row_offset = StatusOnTop ? 0 : LINES - mw_rows - 1;
+ MuttStatusWindow->row_offset = C_StatusOnTop ? 0 : LINES - mw_rows - 1;
- if (Help)
- MuttHelpWindow->row_offset = StatusOnTop ? LINES - mw_rows - 1 : 0;
+ if (C_Help)
+ MuttHelpWindow->row_offset = C_StatusOnTop ? LINES - mw_rows - 1 : 0;
MuttIndexWindow->rows = MAX(
LINES - MuttStatusWindow->rows - MuttHelpWindow->rows - MuttMessageWindow->rows, 0);
#ifdef USE_SIDEBAR
- if (SidebarVisible)
+ if (C_SidebarVisible)
MuttSidebarWindow->rows = MuttIndexWindow->rows;
#endif
#endif
/* These Config Variables are only used in muttlib.c */
-struct Regex *GecosMask; ///< Config: Regex for parsing GECOS field of /etc/passwd
+struct Regex *C_GecosMask; ///< Config: Regex for parsing GECOS field of /etc/passwd
static const char *xdg_env_vars[] = {
[XDG_CONFIG_HOME] = "XDG_CONFIG_HOME",
struct Buffer *prefix = mutt_buffer_pool_get();
mutt_buffer_strcpy(prefix, buf->data);
mutt_file_sanitize_filename(prefix->data, 1);
- mutt_buffer_printf(buf, "%s/%s", NONULL(Tmpdir), mutt_b2s(prefix));
+ mutt_buffer_printf(buf, "%s/%s", NONULL(C_Tmpdir), mutt_b2s(prefix));
struct stat sb;
if (lstat(mutt_b2s(buf), &sb) == -1 && errno == ENOENT)
char prefix[PATH_MAX];
mutt_str_strfcpy(prefix, buf, sizeof(prefix));
mutt_file_sanitize_filename(prefix, true);
- snprintf(buf, buflen, "%s/%s", NONULL(Tmpdir), prefix);
+ snprintf(buf, buflen, "%s/%s", NONULL(C_Tmpdir), prefix);
struct stat sb;
if (lstat(buf, &sb) == -1 && errno == ENOENT)
return;
case '=':
case '+':
{
- enum MailboxType mb_type = mx_path_probe(Folder, NULL);
+ enum MailboxType mb_type = mx_path_probe(C_Folder, NULL);
/* if folder = {host} or imap[s]://host/: don't append slash */
- if ((mb_type == MUTT_IMAP) &&
- (Folder[strlen(Folder) - 1] == '}' || Folder[strlen(Folder) - 1] == '/'))
+ if ((mb_type == MUTT_IMAP) && (C_Folder[strlen(C_Folder) - 1] == '}' ||
+ C_Folder[strlen(C_Folder) - 1] == '/'))
{
- mutt_str_strfcpy(p, Folder, sizeof(p));
+ mutt_str_strfcpy(p, C_Folder, sizeof(p));
}
else if (mb_type == MUTT_NOTMUCH)
- mutt_str_strfcpy(p, Folder, sizeof(p));
- else if (Folder && *Folder && Folder[strlen(Folder) - 1] == '/')
- mutt_str_strfcpy(p, Folder, sizeof(p));
+ mutt_str_strfcpy(p, C_Folder, sizeof(p));
+ else if (C_Folder && *C_Folder && C_Folder[strlen(C_Folder) - 1] == '/')
+ mutt_str_strfcpy(p, C_Folder, sizeof(p));
else
- snprintf(p, sizeof(p), "%s/", NONULL(Folder));
+ snprintf(p, sizeof(p), "%s/", NONULL(C_Folder));
tail = buf + 1;
}
case '>':
{
- mutt_str_strfcpy(p, Mbox, sizeof(p));
+ mutt_str_strfcpy(p, C_Mbox, sizeof(p));
tail = buf + 1;
}
break;
case '<':
{
- mutt_str_strfcpy(p, Record, sizeof(p));
+ mutt_str_strfcpy(p, C_Record, sizeof(p));
tail = buf + 1;
}
break;
}
else
{
- mutt_str_strfcpy(p, Spoolfile, sizeof(p));
+ mutt_str_strfcpy(p, C_Spoolfile, sizeof(p));
tail = buf + 1;
}
}
* @retval ptr Result buffer on success
*
* Extract the real name from /etc/passwd's GECOS field. When set, honor the
- * regular expression in GecosMask, otherwise assume that the GECOS field is a
+ * regular expression in #C_GecosMask, otherwise assume that the GECOS field is a
* comma-separated list.
* Replace "&" by a capitalized version of the user's login name.
*/
memset(dest, 0, destlen);
- if (GecosMask && GecosMask->regex)
+ if (C_GecosMask && C_GecosMask->regex)
{
- if (regexec(GecosMask->regex, pw->pw_gecos, 1, pat_match, 0) == 0)
+ if (regexec(C_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));
void mutt_buffer_mktemp_full(struct Buffer *buf, const char *prefix,
const char *suffix, const char *src, int line)
{
- mutt_buffer_printf(buf, "%s/%s-%s-%d-%d-%ld%ld%s%s", NONULL(Tmpdir), NONULL(prefix),
- NONULL(Hostname), (int) getuid(), (int) getpid(), random(),
- random(), suffix ? "." : "", NONULL(suffix));
+ mutt_buffer_printf(buf, "%s/%s-%s-%d-%d-%ld%ld%s%s", NONULL(C_Tmpdir), NONULL(prefix),
+ NONULL(C_Hostname), (int) getuid(), (int) getpid(),
+ random(), random(), suffix ? "." : "", NONULL(suffix));
mutt_debug(LL_DEBUG3, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, mutt_b2s(buf));
if (unlink(mutt_b2s(buf)) && errno != ENOENT)
{
void mutt_mktemp_full(char *buf, size_t buflen, const char *prefix,
const char *suffix, const char *src, int line)
{
- size_t n = snprintf(buf, buflen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(Tmpdir),
- NONULL(prefix), NONULL(ShortHostname), (int) getuid(),
- (int) getpid(), mutt_rand64(), suffix ? "." : "", NONULL(suffix));
+ size_t n =
+ snprintf(buf, buflen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(C_Tmpdir),
+ NONULL(prefix), NONULL(ShortHostname), (int) getuid(),
+ (int) getpid(), mutt_rand64(), suffix ? "." : "", NONULL(suffix));
if (n >= buflen)
{
mutt_debug(LL_DEBUG1,
if (scheme == U_IMAP || scheme == U_IMAPS)
{
- imap_pretty_mailbox(buf, Folder);
+ imap_pretty_mailbox(buf, C_Folder);
return;
}
else if (strstr(p, "..") && (scheme == U_UNKNOWN || scheme == U_FILE) && realpath(p, tmp))
mutt_str_strfcpy(p, tmp, buflen - (p - buf));
- if ((len = mutt_str_startswith(buf, Folder, CASE_MATCH)) && buf[len] == '/')
+ if ((len = mutt_str_startswith(buf, C_Folder, CASE_MATCH)) && buf[len] == '/')
{
*buf++ = '=';
memmove(buf, buf + len, mutt_str_strlen(buf + len) + 1);
if (addr && addr->mailbox)
{
mutt_str_strfcpy(buf, addr->mailbox, buflen);
- if (!SaveAddress)
+ if (!C_SaveAddress)
{
char *p = strpbrk(buf, "%@");
if (p)
prefix[0] = '\0';
buflen--; /* save room for the terminal \0 */
- wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && ArrowCursor) ? 3 : 0;
+ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && C_ArrowCursor) ? 3 : 0;
col += wlen;
if ((flags & MUTT_FORMAT_NOFILTER) == 0)
}
else if (soft)
{
- int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && ArrowCursor) ? 3 : 0;
+ int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && C_ArrowCursor) ? 3 : 0;
int avail_cols = (cols > offset) ? (cols - offset) : 0;
/* \0-terminate buf for length computation in mutt_wstr_trunc() */
*wptr = 0;
if ((magic != MUTT_MAILBOX_ERROR) && (magic != MUTT_UNKNOWN) && !mx_access(s, W_OK))
{
- if (Confirmappend)
+ if (C_Confirmappend)
{
snprintf(tmp, sizeof(tmp), _("Append messages to %s?"), s);
rc = mutt_yesorno(tmp, MUTT_YES);
/* pathname does not exist */
if (errno == ENOENT)
{
- if (Confirmcreate)
+ if (C_Confirmcreate)
{
snprintf(tmp, sizeof(tmp), _("Create %s?"), s);
rc = mutt_yesorno(tmp, MUTT_YES);
ret = -1;
}
- /* user confirmed with MUTT_YES or set Confirmcreate */
+ /* user confirmed with MUTT_YES or set C_Confirmcreate */
if (ret == 0)
{
/* create dir recursively */
* mutt_sleep - Sleep for a while
* @param s Number of seconds to sleep
*
- * If the user config `SleepTime` is larger, sleep that long instead.
+ * If the user config '$sleep_time' is larger, sleep that long instead.
*/
void mutt_sleep(short s)
{
- if (SleepTime > s)
- sleep(SleepTime);
+ if (C_SleepTime > s)
+ sleep(C_SleepTime);
else if (s)
sleep(s);
}
void mutt_encode_path(char *buf, size_t buflen, const char *src)
{
char *p = mutt_str_strdup(src);
- int rc = mutt_ch_convert_string(&p, Charset, "us-ascii", 0);
+ int rc = mutt_ch_convert_string(&p, C_Charset, "us-ascii", 0);
/* 'src' may be NULL, such as when called from the pop3 driver. */
size_t len = mutt_str_strfcpy(buf, (rc == 0) ? p : src, buflen);
if (mb_magic == MUTT_IMAP)
imap_get_parent_path(path, buf, buflen);
else if (mb_magic == MUTT_NOTMUCH)
- mutt_str_strfcpy(buf, Folder, buflen);
+ mutt_str_strfcpy(buf, C_Folder, buflen);
else
{
mutt_str_strfcpy(buf, path, buflen);
struct stat;
/* These Config Variables are only used in muttlib.c */
-extern struct Regex *GecosMask;
+extern struct Regex *C_GecosMask;
#define MUTT_RANDTAG_LEN 16
#endif
/* 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
-unsigned char Move; ///< Config: Move emails from Spoolfile to Mbox when read
-char *Trash; ///< Config: Folder to put deleted emails
+unsigned char C_CatchupNewsgroup; ///< Config: (nntp) Mark all articles as read when leaving a newsgroup
+bool C_KeepFlagged; ///< Config: Don't move flagged messages from #C_Spoolfile to #C_Mbox
+short C_MboxType; ///< Config: Default type for creating new mailboxes
+unsigned char C_Move; ///< Config: #C_Move emails from #C_Spoolfile to #C_Mbox when read
+char *C_Trash; ///< Config: Folder to put deleted emails
/**
* mx_ops - All the Mailbox backends
*/
static bool mutt_is_spool(const char *str)
{
- return mutt_str_strcmp(Spoolfile, str) == 0;
+ return mutt_str_strcmp(C_Spoolfile, str) == 0;
}
/**
m->magic = MUTT_COMPRESSED;
else
#endif
- m->magic = MboxType;
+ m->magic = C_MboxType;
flags |= MUTT_APPENDNEW;
}
else
if ((m->magic == MUTT_UNKNOWN) && (flags & (MUTT_NEWFOLDER | MUTT_APPEND)))
{
- m->magic = MboxType;
+ m->magic = C_MboxType;
m->mx_ops = mx_get_ops(m->magic);
}
struct stat st, stc;
int opt_confappend, rc;
- if (!Trash || (m->msg_deleted == 0) || (m->magic == MUTT_MAILDIR && MaildirTrash))
+ if (!C_Trash || (m->msg_deleted == 0) || (m->magic == MUTT_MAILDIR && C_MaildirTrash))
{
return 0;
}
return 0; /* nothing to be done */
/* avoid the "append messages" prompt */
- opt_confappend = Confirmappend;
+ opt_confappend = C_Confirmappend;
if (opt_confappend)
- Confirmappend = false;
- rc = mutt_save_confirm(Trash, &st);
+ C_Confirmappend = false;
+ rc = mutt_save_confirm(C_Trash, &st);
if (opt_confappend)
- Confirmappend = true;
+ C_Confirmappend = true;
if (rc != 0)
{
/* L10N: Although we know the precise number of messages, we do not show it to the user.
}
#ifdef USE_IMAP
- if (m->magic == MUTT_IMAP && (imap_path_probe(Trash, NULL) == MUTT_IMAP))
+ if (m->magic == MUTT_IMAP && (imap_path_probe(C_Trash, NULL) == MUTT_IMAP))
{
- if (imap_fast_trash(m, Trash) == 0)
+ if (imap_fast_trash(m, C_Trash) == 0)
return 0;
}
#endif
- struct Mailbox *m_trash = mx_path_resolve(Trash);
+ struct Mailbox *m_trash = mx_path_resolve(C_Trash);
struct Context *ctx_trash = mx_mbox_open(m_trash, MUTT_APPEND);
if (ctx_trash)
{
if (mdata && mdata->adata && mdata->group)
{
- int rc = query_quadoption(CatchupNewsgroup, _("Mark all articles read?"));
+ int rc =
+ query_quadoption(C_CatchupNewsgroup, _("Mark all articles read?"));
if (rc == MUTT_ABORT)
return -1;
else if (rc == MUTT_YES)
{
if (!m->emails[i])
break;
- if (!m->emails[i]->deleted && m->emails[i]->read && !(m->emails[i]->flagged && KeepFlagged))
+ if (!m->emails[i]->deleted && m->emails[i]->read && !(m->emails[i]->flagged && C_KeepFlagged))
{
read_msgs++;
}
read_msgs = 0;
#endif
- if ((read_msgs != 0) && (Move != MUTT_NO))
+ if ((read_msgs != 0) && (C_Move != MUTT_NO))
{
bool is_spool;
char *p = mutt_find_hook(MUTT_MBOX_HOOK, m->path);
}
else
{
- mutt_str_strfcpy(mbox, Mbox, sizeof(mbox));
+ mutt_str_strfcpy(mbox, C_Mbox, sizeof(mbox));
is_spool = mutt_is_spool(m->path) && !mutt_is_spool(mbox);
}
moved, the second argument is the target mailbox. */
ngettext("Move %d read message to %s?", "Move %d read messages to %s?", read_msgs),
read_msgs, mbox);
- move_messages = query_quadoption(Move, buf);
+ move_messages = query_quadoption(C_Move, buf);
if (move_messages == MUTT_ABORT)
return -1;
}
/* There is no point in asking whether or not to purge if we are
* just marking messages as "trash".
*/
- if ((m->msg_deleted != 0) && !(m->magic == MUTT_MAILDIR && MaildirTrash))
+ if ((m->msg_deleted != 0) && !(m->magic == MUTT_MAILDIR && C_MaildirTrash))
{
snprintf(buf, sizeof(buf),
ngettext("Purge %d deleted message?", "Purge %d deleted messages?", m->msg_deleted),
m->msg_deleted);
- purge = query_quadoption(Delete, buf);
+ purge = query_quadoption(C_Delete, buf);
if (purge == MUTT_ABORT)
return -1;
}
- if (MarkOld)
+ if (C_MarkOld)
{
for (i = 0; i < m->msg_count; i++)
{
for (i = 0; i < m->msg_count; i++)
{
if (m->emails[i]->read && !m->emails[i]->deleted &&
- !(m->emails[i]->flagged && KeepFlagged))
+ !(m->emails[i]->flagged && C_KeepFlagged))
{
m->emails[i]->tagged = true;
}
for (i = 0; i < m->msg_count; i++)
{
if (m->emails[i]->read && !m->emails[i]->deleted &&
- !(m->emails[i]->flagged && KeepFlagged))
+ !(m->emails[i]->flagged && C_KeepFlagged))
{
if (mutt_append_message(ctx_read->mailbox, ctx->mailbox, m->emails[i],
0, CH_UPDATE_LEN) == 0)
}
/* copy mails to the trash before expunging */
- if (purge && (m->msg_deleted != 0) && (mutt_str_strcmp(m->path, Trash) != 0))
+ if (purge && (m->msg_deleted != 0) && (mutt_str_strcmp(m->path, C_Trash) != 0))
{
if (trash_append(ctx->mailbox) != 0)
return -1;
if ((m->msg_count == m->msg_deleted) &&
((m->magic == MUTT_MMDF) || (m->magic == MUTT_MBOX)) &&
- !mutt_is_spool(m->path) && !SaveEmpty)
+ !mutt_is_spool(m->path) && !C_SaveEmpty)
{
mutt_file_unlink_empty(m->path);
}
snprintf(buf, sizeof(buf),
ngettext("Purge %d deleted message?", "Purge %d deleted messages?", m->msg_deleted),
m->msg_deleted);
- purge = query_quadoption(Delete, buf);
+ purge = query_quadoption(C_Delete, buf);
if (purge == MUTT_ABORT)
return -1;
else if (purge == MUTT_NO)
msgcount = m->msg_count;
deleted = m->msg_deleted;
- if (purge && (m->msg_deleted != 0) && (mutt_str_strcmp(m->path, Trash) != 0))
+ if (purge && (m->msg_deleted != 0) && (mutt_str_strcmp(m->path, C_Trash) != 0))
{
if (trash_append(m) != 0)
return -1;
if ((m->msg_count == m->msg_deleted) &&
((m->magic == MUTT_MBOX) || (m->magic == MUTT_MMDF)) &&
- !mutt_is_spool(m->path) && !SaveEmpty)
+ !mutt_is_spool(m->path) && !C_SaveEmpty)
{
unlink(m->path);
mx_fastclose_mailbox(m);
}
else if ((buf[0] == '+') || (buf[0] == '='))
{
- size_t folder_len = mutt_str_strlen(Folder);
- if ((folder_len > 0) && (Folder[folder_len - 1] != '/'))
+ size_t folder_len = mutt_str_strlen(C_Folder);
+ if ((folder_len > 0) && (C_Folder[folder_len - 1] != '/'))
{
buf[0] = '/';
- mutt_str_inline_replace(buf, buflen, 0, Folder);
+ mutt_str_inline_replace(buf, buflen, 0, C_Folder);
}
else
{
- mutt_str_inline_replace(buf, buflen, 1, Folder);
+ mutt_str_inline_replace(buf, buflen, 1, C_Folder);
}
}
else if ((buf[1] == '/') || (buf[1] == '\0'))
{
if (buf[0] == '!')
{
- mutt_str_inline_replace(buf, buflen, 1, Spoolfile);
+ mutt_str_inline_replace(buf, buflen, 1, C_Spoolfile);
}
else if (buf[0] == '-')
{
}
else if (buf[0] == '<')
{
- mutt_str_inline_replace(buf, buflen, 1, Record);
+ mutt_str_inline_replace(buf, buflen, 1, C_Record);
}
else if (buf[0] == '>')
{
- mutt_str_inline_replace(buf, buflen, 1, Mbox);
+ mutt_str_inline_replace(buf, buflen, 1, C_Mbox);
}
else if (buf[0] == '^')
{
char buf[PATH_MAX];
mutt_str_strfcpy(buf, path, sizeof(buf));
- mx_path_canon(buf, sizeof(buf), Folder, NULL);
+ mx_path_canon(buf, sizeof(buf), C_Folder, NULL);
struct Account *np = NULL;
TAILQ_FOREACH(np, &AllAccounts, entries)
m = mailbox_new();
m->flags = MB_HIDDEN;
mutt_str_strfcpy(m->path, path, sizeof(m->path));
- mx_path_canon2(m, Folder);
+ mx_path_canon2(m, C_Folder);
return m;
}
struct stat;
/* These Config Variables are only used in mx.c */
-extern unsigned char CatchupNewsgroup;
-extern bool KeepFlagged;
-extern short MboxType;
-extern unsigned char Move;
-extern char * Trash;
+extern unsigned char C_CatchupNewsgroup;
+extern bool C_KeepFlagged;
+extern short C_MboxType;
+extern unsigned char C_Move;
+extern char * C_Trash;
/* flags for mutt_open_mailbox() */
#define MUTT_NOSORT (1 << 0) ///< Do not sort the mailbox after opening it
#include "state.h"
/* These Config Variables are only used in ncrypt/crypt.c */
-bool CryptTimestamp; ///< Config: Add a timestamp to PGP or SMIME output to prevent spoofing
-unsigned char PgpEncryptSelf;
-unsigned char PgpMimeAuto; ///< Config: Prompt the user to use MIME if inline PGP fails
-bool PgpRetainableSigs; ///< Config: Create nested multipart/signed or encrypted messages
-bool PgpSelfEncrypt; ///< Config: Encrypted messages will also be encrypted to PgpDefaultKey too
-bool PgpStrictEnc; ///< Config: Encode PGP signed messages with quoted-printable (don't unset)
-unsigned char SmimeEncryptSelf;
-bool SmimeSelfEncrypt; ///< Config: Encrypted messages will also be encrypt to SmimeDefaultKey too
+bool C_CryptTimestamp; ///< Config: Add a timestamp to PGP or SMIME output to prevent spoofing
+unsigned char C_PgpEncryptSelf;
+unsigned char C_PgpMimeAuto; ///< Config: Prompt the user to use MIME if inline PGP fails
+bool C_PgpRetainableSigs; ///< Config: Create nested multipart/signed or encrypted messages
+bool C_PgpSelfEncrypt; ///< Config: Encrypted messages will also be encrypted to C_PgpDefaultKey too
+bool C_PgpStrictEnc; ///< Config: Encode PGP signed messages with quoted-printable (don't unset)
+unsigned char C_SmimeEncryptSelf;
+bool C_SmimeSelfEncrypt; ///< Config: Encrypted messages will also be encrypt to C_SmimeDefaultKey too
/**
* crypt_current_time - Print the current time
if (!WithCrypto)
return;
- if (CryptTimestamp)
+ if (C_CryptTimestamp)
{
t = time(NULL);
strftime(p, sizeof(p), _(" (current time: %c)"), localtime(&t));
if ((msg->content->type != TYPE_TEXT) ||
(mutt_str_strcasecmp(msg->content->subtype, "plain") != 0))
{
- if (query_quadoption(PgpMimeAuto,
+ if (query_quadoption(C_PgpMimeAuto,
_("Inline PGP can't be used with attachments. "
"Revert to PGP/MIME?")) != MUTT_YES)
{
}
else if (mutt_str_strcasecmp("flowed", mutt_param_get(&msg->content->parameter, "format")) == 0)
{
- if ((query_quadoption(PgpMimeAuto,
+ if ((query_quadoption(C_PgpMimeAuto,
_("Inline PGP can't be used with format=flowed. "
"Revert to PGP/MIME?"))) != MUTT_YES)
{
/* otherwise inline won't work...ask for revert */
if (query_quadoption(
- PgpMimeAuto,
+ C_PgpMimeAuto,
_("Message can't be sent inline. Revert to using PGP/MIME?")) != MUTT_YES)
{
mutt_error(_("Mail not sent"));
if (WithCrypto & APPLICATION_PGP)
tmp_pgp_pbody = msg->content;
- if (CryptUsePka && (msg->security & SEC_SIGN))
+ if (C_CryptUsePka && (msg->security & SEC_SIGN))
{
/* Set sender (necessary for e.g. PKA). */
const char *mailbox = NULL;
from = mutt_default_from();
mailbox = from->mailbox;
- if (!mailbox && EnvelopeFromAddress)
- mailbox = EnvelopeFromAddress->mailbox;
+ if (!mailbox && C_EnvelopeFromAddress)
+ mailbox = C_EnvelopeFromAddress->mailbox;
if (((WithCrypto & APPLICATION_SMIME) != 0) && (msg->security & APPLICATION_SMIME))
crypt_smime_set_sender(mailbox);
mutt_addr_free(&from);
}
- if (CryptProtectedHeadersWrite)
+ if (C_CryptProtectedHeadersWrite)
{
struct Envelope *protected_headers = mutt_env_new();
mutt_str_replace(&protected_headers->subject, msg->env->subject);
}
if (((WithCrypto & APPLICATION_PGP) != 0) && (msg->security & APPLICATION_PGP) &&
- (!(flags & SEC_ENCRYPT) || PgpRetainableSigs))
+ (!(flags & SEC_ENCRYPT) || C_PgpRetainableSigs))
{
tmp_pbody = crypt_pgp_sign_message(msg->content);
if (!tmp_pbody)
a->encoding = ENC_7BIT;
crypt_convert_to_7bit(a->parts);
}
- else if (((WithCrypto & APPLICATION_PGP) != 0) && PgpStrictEnc)
+ else if (((WithCrypto & APPLICATION_PGP) != 0) && C_PgpStrictEnc)
crypt_convert_to_7bit(a->parts);
}
else if (a->type == TYPE_MESSAGE &&
else if (a->encoding == ENC_BINARY)
a->encoding = ENC_BASE64;
else if (a->content && a->encoding != ENC_BASE64 &&
- (a->content->from || (a->content->space && PgpStrictEnc)))
+ (a->content->from || (a->content->space && C_PgpStrictEnc)))
{
a->encoding = ENC_QUOTED_PRINTABLE;
}
return -1;
}
OptPgpCheckTrust = false;
- if (PgpSelfEncrypt || (PgpEncryptSelf == MUTT_YES))
- self_encrypt = PgpDefaultKey;
+ if (C_PgpSelfEncrypt || (C_PgpEncryptSelf == MUTT_YES))
+ self_encrypt = C_PgpDefaultKey;
}
if (((WithCrypto & APPLICATION_SMIME) != 0) && (msg->security & APPLICATION_SMIME))
{
mutt_addr_free(&addrlist);
return -1;
}
- if (SmimeSelfEncrypt || (SmimeEncryptSelf == MUTT_YES))
- self_encrypt = SmimeDefaultKey;
+ if (C_SmimeSelfEncrypt || (C_SmimeEncryptSelf == MUTT_YES))
+ self_encrypt = C_SmimeDefaultKey;
}
}
if (!WithCrypto)
return;
- if (!(CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT)))
+ if (!(C_CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT)))
return;
crypt_get_keys(msg, &pgpkeylist, 1);
*/
bool mutt_should_hide_protected_subject(struct Email *e)
{
- if (CryptProtectedHeadersWrite && (e->security & SEC_ENCRYPT) &&
- !(e->security & SEC_INLINE) && CryptProtectedHeadersSubject && *CryptProtectedHeadersSubject)
+ if (C_CryptProtectedHeadersWrite && (e->security & SEC_ENCRYPT) &&
+ !(e->security & SEC_INLINE) && C_CryptProtectedHeadersSubject && *C_CryptProtectedHeadersSubject)
{
return true;
}
*/
int mutt_protected_headers_handler(struct Body *a, struct State *s)
{
- if (CryptProtectedHeadersRead && a->mime_headers)
+ if (C_CryptProtectedHeadersRead && a->mime_headers)
{
if (a->mime_headers->subject)
{
- if ((s->flags & MUTT_DISPLAY) && Weed && mutt_matches_ignore("subject"))
+ if ((s->flags & MUTT_DISPLAY) && C_Weed && mutt_matches_ignore("subject"))
return 0;
state_mark_protected_header(s);
mutt_write_one_header(s->fp_out, "Subject", a->mime_headers->subject,
- s->prefix, mutt_window_wrap_cols(MuttIndexWindow, Wrap),
+ s->prefix, mutt_window_wrap_cols(MuttIndexWindow, C_Wrap),
(s->flags & MUTT_DISPLAY) ? CH_DISPLAY : 0);
state_puts("\n", s);
}
size_t hexdigits;
/* User input may be partial name, fingerprint or short or long key ID,
- * independent of PgpLongIds.
+ * independent of C_PgpLongIds.
* Fingerprint without spaces is 40 hex digits (SHA-1) or 32 hex digits (MD5).
* Strip leading "0x" for key ID detection and prepare pl and ps to indicate
* if an ID was found and to simplify logic in the key loop's inner
/* fromcode "utf-8" is sure, so we don't want
* charset-hook corrections: flags must be 0.
*/
- mutt_ch_convert_string(&tstr, "utf-8", Charset, 0);
+ mutt_ch_convert_string(&tstr, "utf-8", C_Charset, 0);
fputs(tstr, fp);
FREE(&tstr);
}
if (k->kobj && k->kobj->subkeys)
{
s = k->kobj->subkeys->keyid;
- if ((!PgpLongIds) && (strlen(s) == 16))
+ if ((!C_PgpLongIds) && (strlen(s) == 16))
{
/* Return only the short keyID. */
s += 8;
*/
static int set_signer(gpgme_ctx_t ctx, bool for_smime)
{
- char *signid = for_smime ? SmimeDefaultKey : PgpSignAs;
+ char *signid = for_smime ? C_SmimeDefaultKey : C_PgpSignAs;
gpgme_error_t err;
gpgme_ctx_t listctx;
gpgme_key_t key, key2;
return NULL;
}
- if (CryptUsePka)
+ if (C_CryptUsePka)
{
err = set_pka_sig_notation(ctx);
if (err)
return NULL;
}
- if (CryptUsePka)
+ if (C_CryptUsePka)
{
err = set_pka_sig_notation(ctx);
if (err)
state_puts("\n", s);
}
- if (CryptUsePka)
+ if (C_CryptUsePka)
{
if (sig->pka_trust == 1 && sig->pka_address)
{
if (legacy_api)
{
- snprintf(tmpdir, sizeof(tmpdir), "%s/neomutt-gpgme-XXXXXX", Tmpdir);
+ snprintf(tmpdir, sizeof(tmpdir), "%s/neomutt-gpgme-XXXXXX", C_Tmpdir);
if (!mkdtemp(tmpdir))
{
mutt_debug(LL_DEBUG1, "Error creating temporary GPGME home\n");
* be a wrong label, so we want the ability to do corrections via
* charset-hooks. Therefore we set flags to MUTT_ICONV_HOOK_FROM.
*/
- struct FgetConv *fc = mutt_ch_fgetconv_open(fp, charset, Charset, MUTT_ICONV_HOOK_FROM);
+ struct FgetConv *fc = mutt_ch_fgetconv_open(fp, charset, C_Charset, MUTT_ICONV_HOOK_FROM);
for (complete = true, armor_header = true;
mutt_ch_fgetconvs(buf, sizeof(buf), fc); complete = (strchr(buf, '\n')))
{
int c;
rewind(pgpout);
- struct FgetConv *fc = mutt_ch_fgetconv_open(pgpout, "utf-8", Charset, 0);
+ struct FgetConv *fc = mutt_ch_fgetconv_open(pgpout, "utf-8", C_Charset, 0);
while ((c = mutt_ch_fgetconv(fc)) != EOF)
{
state_putc(c, s);
entry.key = key_table[line];
entry.num = line + 1;
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(PgpEntryFormat),
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(C_PgpEntryFormat),
crypt_format_str, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
}
*/
static int crypt_compare_address(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
- compare_key_address(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
+ compare_key_address(a, b);
}
/**
*/
static int crypt_compare_keyid(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b);
}
/**
*/
static int crypt_compare_date(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) : compare_key_date(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) :
+ compare_key_date(a, b);
}
/**
*/
static int crypt_compare_trust(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
- compare_key_trust(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
+ compare_key_trust(a, b);
}
/**
struct CryptKeyInfo **key_table = NULL;
for (k = keys; k; k = k->next)
{
- if (!PgpShowUnusable && (k->flags & KEYFLAG_CANTUSE))
+ if (!C_PgpShowUnusable && (k->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
return NULL;
}
- switch (PgpSortKeys & SORT_MASK)
+ switch (C_PgpSortKeys & SORT_MASK)
{
case SORT_ADDRESS:
f = crypt_compare_address;
{
crypt_hook_val = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && CryptConfirmhook)
+ if (!oppenc_mode && C_CryptConfirmhook)
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"),
crypt_hook_val, p->mailbox);
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
+ if (C_CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
{
if (is_smime)
{
}
}
/* Opportunistic encryption option is set, but is toggled off for this message. */
- else if (CryptOpportunisticEncrypt)
+ else if (C_CryptOpportunisticEncrypt)
{
if (is_smime)
{
{
char input_signas[SHORT_STRING];
snprintf(input_signas, sizeof(input_signas), "0x%s", crypt_fpr_or_lkeyid(p));
- mutt_str_replace(is_smime ? &SmimeDefaultKey : &PgpSignAs, input_signas);
+ mutt_str_replace(is_smime ? &C_SmimeDefaultKey : &C_PgpSignAs, input_signas);
crypt_free_key(&p);
msg->security |= SEC_SIGN;
struct State;
/* These Config Variables are only used in ncrypt/cryptglue.c */
-bool CryptUseGpgme; ///< Config: Use GPGME crypto backend
+bool C_CryptUseGpgme; ///< Config: Use GPGME crypto backend
#ifdef CRYPT_BACKEND_CLASSIC_PGP
extern struct CryptModuleSpecs CryptModPgpClassic;
#ifdef CRYPT_BACKEND_CLASSIC_PGP
if (
#ifdef CRYPT_BACKEND_GPGME
- (!CryptUseGpgme)
+ (!C_CryptUseGpgme)
#else
1
#endif
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
if (
#ifdef CRYPT_BACKEND_GPGME
- (!CryptUseGpgme)
+ (!C_CryptUseGpgme)
#else
1
#endif
crypto_module_register(&CryptModSmimeClassic);
#endif
- if (CryptUseGpgme)
+ if (C_CryptUseGpgme)
{
#ifdef CRYPT_BACKEND_GPGME
crypto_module_register(&CryptModPgpGpgme);
else
return NULL;
- if (!(is_uid || is_fpr || (*is_subkey && PgpIgnoreSubkeys)))
+ if (!(is_uid || is_fpr || (*is_subkey && C_PgpIgnoreSubkeys)))
memset(&tmp, 0, sizeof(tmp));
break;
break;
}
- if (!is_uid && !(*is_subkey && PgpIgnoreSubkeys))
+ if (!is_uid && !(*is_subkey && C_PgpIgnoreSubkeys))
tmp.flags |= flags;
break;
{
mutt_debug(LL_DEBUG2, "key len: %s\n", p);
- if (!(*is_subkey && PgpIgnoreSubkeys) && mutt_str_atos(p, &tmp.keylen) < 0)
+ if (!(*is_subkey && C_PgpIgnoreSubkeys) && mutt_str_atos(p, &tmp.keylen) < 0)
{
goto bail;
}
{
mutt_debug(LL_DEBUG2, "pubkey algorithm: %s\n", p);
- if (!(*is_subkey && PgpIgnoreSubkeys))
+ if (!(*is_subkey && C_PgpIgnoreSubkeys))
{
int x = 0;
if (mutt_str_atoi(p, &x) < 0)
{
mutt_debug(LL_DEBUG2, "key id: %s\n", p);
- if (!(*is_subkey && PgpIgnoreSubkeys))
+ if (!(*is_subkey && C_PgpIgnoreSubkeys))
mutt_str_replace(&tmp.keyid, p);
break;
}
}
/* ignore user IDs on subkeys */
- if (!is_uid && (*is_subkey && PgpIgnoreSubkeys))
+ if (!is_uid && (*is_subkey && C_PgpIgnoreSubkeys))
break;
mutt_debug(LL_DEBUG2, "user ID: %s\n", NONULL(p));
}
}
- if (!is_uid && (!*is_subkey || !PgpIgnoreSubkeys ||
+ if (!is_uid && (!*is_subkey || !C_PgpIgnoreSubkeys ||
!((flags & KEYFLAG_DISABLED) || (flags & KEYFLAG_REVOKED) ||
(flags & KEYFLAG_EXPIRED))))
{
}
/* merge temp key back into real key */
- if (!(is_uid || is_fpr || (*is_subkey && PgpIgnoreSubkeys)))
+ if (!(is_uid || is_fpr || (*is_subkey && C_PgpIgnoreSubkeys)))
k = mutt_mem_malloc(sizeof(*k));
memcpy(k, &tmp, sizeof(*k));
/* fixup parentship of uids after merging the temp key into
if (devnull == -1)
return NULL;
- mutt_str_replace(&chs, Charset);
+ mutt_str_replace(&chs, C_Charset);
thepid = pgp_invoke_list_keys(NULL, &fp, NULL, -1, -1, devnull, keyring, hints);
if (thepid == -1)
struct State;
/* These Config Variables are only used in ncrypt/crypt.c */
-extern bool CryptTimestamp;
-extern unsigned char PgpEncryptSelf; ///< Deprecated, see PgpSelfEncrypt
-extern unsigned char PgpMimeAuto;
-extern bool PgpRetainableSigs;
-extern bool PgpSelfEncrypt;
-extern bool PgpStrictEnc;
-extern unsigned char SmimeEncryptSelf; ///< Deprecated, see SmimeSelfEncrypt
-extern bool SmimeSelfEncrypt;
+extern bool C_CryptTimestamp;
+extern unsigned char C_PgpEncryptSelf; ///< Deprecated, see #C_PgpSelfEncrypt
+extern unsigned char C_PgpMimeAuto;
+extern bool C_PgpRetainableSigs;
+extern bool C_PgpSelfEncrypt;
+extern bool C_PgpStrictEnc;
+extern unsigned char C_SmimeEncryptSelf; ///< Deprecated, see #C_SmimeSelfEncrypt
+extern bool C_SmimeSelfEncrypt;
/* These Config Variables are only used in ncrypt/cryptglue.c */
-extern bool CryptUseGpgme;
+extern bool C_CryptUseGpgme;
/* These Config Variables are only used in ncrypt/pgp.c */
-extern bool PgpCheckExit;
-extern bool PgpCheckGpgDecryptStatusFd;
-extern struct Regex *PgpDecryptionOkay;
-extern struct Regex *PgpGoodSign;
-extern long PgpTimeout;
-extern bool PgpUseGpgAgent;
+extern bool C_PgpCheckExit;
+extern bool C_PgpCheckGpgDecryptStatusFd;
+extern struct Regex *C_PgpDecryptionOkay;
+extern struct Regex *C_PgpGoodSign;
+extern long C_PgpTimeout;
+extern bool C_PgpUseGpgAgent;
/* These Config Variables are only used in ncrypt/pgpinvoke.c */
-extern char *PgpClearsignCommand;
-extern char *PgpDecodeCommand;
-extern char *PgpDecryptCommand;
-extern char *PgpEncryptOnlyCommand;
-extern char *PgpEncryptSignCommand;
-extern char *PgpExportCommand;
-extern char *PgpGetkeysCommand;
-extern char *PgpImportCommand;
-extern char *PgpListPubringCommand;
-extern char *PgpListSecringCommand;
-extern char *PgpSignCommand;
-extern char *PgpVerifyCommand;
-extern char *PgpVerifyKeyCommand;
+extern char *C_PgpClearsignCommand;
+extern char *C_PgpDecodeCommand;
+extern char *C_PgpDecryptCommand;
+extern char *C_PgpEncryptOnlyCommand;
+extern char *C_PgpEncryptSignCommand;
+extern char *C_PgpExportCommand;
+extern char *C_PgpGetkeysCommand;
+extern char *C_PgpImportCommand;
+extern char *C_PgpListPubringCommand;
+extern char *C_PgpListSecringCommand;
+extern char *C_PgpSignCommand;
+extern char *C_PgpVerifyCommand;
+extern char *C_PgpVerifyKeyCommand;
/* These Config Variables are only used in ncrypt/smime.c */
-extern bool SmimeAskCertLabel;
-extern char *SmimeCaLocation;
-extern char *SmimeCertificates;
-extern char *SmimeDecryptCommand;
-extern bool SmimeDecryptUseDefaultKey;
-extern char *SmimeEncryptCommand;
-extern char *SmimeGetCertCommand;
-extern char *SmimeGetCertEmailCommand;
-extern char *SmimeGetSignerCertCommand;
-extern char *SmimeImportCertCommand;
-extern char *SmimeKeys;
-extern char *SmimePk7outCommand;
-extern char *SmimeSignCommand;
-extern char *SmimeSignDigestAlg;
-extern long SmimeTimeout;
-extern char *SmimeVerifyCommand;
-extern char *SmimeVerifyOpaqueCommand;
+extern bool C_SmimeAskCertLabel;
+extern char *C_SmimeCaLocation;
+extern char *C_SmimeCertificates;
+extern char *C_SmimeDecryptCommand;
+extern bool C_SmimeDecryptUseDefaultKey;
+extern char *C_SmimeEncryptCommand;
+extern char *C_SmimeGetCertCommand;
+extern char *C_SmimeGetCertEmailCommand;
+extern char *C_SmimeGetSignerCertCommand;
+extern char *C_SmimeImportCertCommand;
+extern char *C_SmimeKeys;
+extern char *C_SmimePk7outCommand;
+extern char *C_SmimeSignCommand;
+extern char *C_SmimeSignDigestAlg;
+extern long C_SmimeTimeout;
+extern char *C_SmimeVerifyCommand;
+extern char *C_SmimeVerifyOpaqueCommand;
#define SEC_ENCRYPT (1 << 0) ///< Email is encrypted
#define SEC_SIGN (1 << 1) ///< Email is signed
#endif
/* These Config Variables are only used in ncrypt/pgp.c */
-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
-bool PgpUseGpgAgent; ///< Config: Use a PGP agent for caching passwords
+bool C_PgpCheckExit; ///< Config: Check the exit code of PGP subprocess
+bool C_PgpCheckGpgDecryptStatusFd; ///< Config: File descriptor used for status info
+struct Regex *C_PgpDecryptionOkay; ///< Config: Text indicating a successful decryption
+struct Regex *C_PgpGoodSign; ///< Config: Text indicating a good signature
+long C_PgpTimeout; ///< Config: Time in seconds to cache a passphrase
+bool C_PgpUseGpgAgent; ///< Config: Use a PGP agent for caching passwords
char PgpPass[LONG_STRING];
time_t PgpExptime = 0; /* when does the cached passphrase expire? */
if (mutt_get_password(_("Enter PGP passphrase:"), PgpPass, sizeof(PgpPass)) == 0)
{
- PgpExptime = mutt_date_add_timeout(time(NULL), PgpTimeout);
+ PgpExptime = mutt_date_add_timeout(time(NULL), C_PgpTimeout);
return 1;
}
else
char *tty = NULL;
/* GnuPG 2.1 no longer exports GPG_AGENT_INFO */
- if (!PgpUseGpgAgent)
+ if (!C_PgpUseGpgAgent)
return false;
tty = ttyname(0);
*/
static struct PgpKeyInfo *key_parent(struct PgpKeyInfo *k)
{
- if ((k->flags & KEYFLAG_SUBKEY) && k->parent && PgpIgnoreSubkeys)
+ if ((k->flags & KEYFLAG_SUBKEY) && k->parent && C_PgpIgnoreSubkeys)
k = k->parent;
return k;
*/
char *pgp_this_keyid(struct PgpKeyInfo *k)
{
- if (PgpLongIds)
+ if (C_PgpLongIds)
return k->keyid;
else
return k->keyid + 8;
int rc = -1;
- if (PgpGoodSign && PgpGoodSign->regex)
+ if (C_PgpGoodSign && C_PgpGoodSign->regex)
{
char *line = NULL;
int lineno = 0;
while ((line = mutt_file_read_line(line, &linelen, fpin, &lineno, 0)))
{
- if (regexec(PgpGoodSign->regex, line, 0, NULL, 0) == 0)
+ if (regexec(C_PgpGoodSign->regex, line, 0, NULL, 0) == 0)
{
mutt_debug(LL_DEBUG2, "\"%s\" matches regex.\n", line);
rc = 0;
{
int rc = -1;
- if (PgpDecryptionOkay && PgpDecryptionOkay->regex)
+ if (C_PgpDecryptionOkay && C_PgpDecryptionOkay->regex)
{
char *line = NULL;
int lineno = 0;
while ((line = mutt_file_read_line(line, &linelen, fpin, &lineno, 0)))
{
- if (regexec(PgpDecryptionOkay->regex, line, 0, NULL, 0) == 0)
+ if (regexec(C_PgpDecryptionOkay->regex, line, 0, NULL, 0) == 0)
{
mutt_debug(LL_DEBUG2, "\"%s\" matches regex.\n", line);
rc = 0;
size_t linelen;
int inside_decrypt = 0;
- if (!PgpCheckGpgDecryptStatusFd)
+ if (!C_PgpCheckGpgDecryptStatusFd)
return pgp_check_pgp_decryption_okay_regex(fpin);
while ((line = mutt_file_read_line(line, &linelen, fpin, &lineno, 0)))
* be a wrong label, so we want the ability to do corrections via
* charset-hooks. Therefore we set flags to MUTT_ICONV_HOOK_FROM.
*/
- struct FgetConv *fc = mutt_ch_fgetconv_open(fpin, charset, Charset, MUTT_ICONV_HOOK_FROM);
+ struct FgetConv *fc =
+ mutt_ch_fgetconv_open(fpin, charset, C_Charset, MUTT_ICONV_HOOK_FROM);
for (complete = true, armor_header = true;
mutt_ch_fgetconvs(buf, sizeof(buf), fc); complete = (strchr(buf, '\n')))
char *expected_charset = gpgcharset && *gpgcharset ? gpgcharset : "utf-8";
mutt_debug(LL_DEBUG3, "pgp: recoding inline from [%s] to [%s]\n",
- expected_charset, Charset);
+ expected_charset, C_Charset);
rewind(pgpout);
state_set_prefix(s);
- fc = mutt_ch_fgetconv_open(pgpout, expected_charset, Charset, MUTT_ICONV_HOOK_FROM);
+ fc = mutt_ch_fgetconv_open(pgpout, expected_charset, C_Charset, MUTT_ICONV_HOOK_FROM);
while ((ch = mutt_ch_fgetconv(fc)) != EOF)
state_prefix_putc(ch, s);
mutt_ch_fgetconv_close(&fc);
fputs(buffer, stdout);
}
- if (mutt_wait_filter(thepid) && PgpCheckExit)
+ if (mutt_wait_filter(thepid) && C_PgpCheckExit)
empty = true;
mutt_file_fclose(&pgperr);
{
keyID = crypt_hook->data;
r = MUTT_YES;
- if (!oppenc_mode && CryptConfirmhook)
+ if (!oppenc_mode && C_CryptConfirmhook)
{
snprintf(buf, sizeof(buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
r = mutt_yesorno(buf, MUTT_YES);
}
mutt_file_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && PgpCheckExit)
+ if (mutt_wait_filter(thepid) && C_PgpCheckExit)
empty = 1;
unlink(pgpinfile);
if (a->noconv)
from_charset = body_charset;
else
- from_charset = Charset;
+ from_charset = C_Charset;
if (!mutt_ch_is_us_ascii(body_charset))
{
fprintf(pgpin, "%s\n", PgpPass);
mutt_file_fclose(&pgpin);
- if (mutt_wait_filter(thepid) && PgpCheckExit)
+ if (mutt_wait_filter(thepid) && C_PgpCheckExit)
empty = true;
mutt_file_unlink(pgpinfile);
return msg->security;
/* If autoinline and no crypto options set, then set inline. */
- if (PgpAutoinline && !((msg->security & APPLICATION_PGP) &&
+ if (C_PgpAutoinline && !((msg->security & APPLICATION_PGP) &&
(msg->security & (SEC_SIGN | SEC_ENCRYPT))))
{
msg->security |= SEC_INLINE;
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
+ if (C_CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
{
if (msg->security & (SEC_ENCRYPT | SEC_SIGN))
{
/* Opportunistic encryption option is set, but is toggled off
* for this message.
*/
- else if (CryptOpportunisticEncrypt)
+ else if (C_CryptOpportunisticEncrypt)
{
/* When the message is not selected for signing or encryption, the toggle
* between PGP/MIME and Traditional doesn't make sense.
{
char input_signas[SHORT_STRING];
snprintf(input_signas, sizeof(input_signas), "0x%s", pgp_fpr_or_lkeyid(p));
- mutt_str_replace(&PgpSignAs, input_signas);
+ mutt_str_replace(&C_PgpSignAs, input_signas);
pgp_free_key(&p);
msg->security |= SEC_SIGN;
#endif
/* These Config Variables are only used in ncrypt/pgpinvoke.c */
-char *PgpClearsignCommand; ///< Config: (pgp) External command to inline-sign a message
-char *PgpDecodeCommand; ///< Config: (pgp) External command to decode a PGP attachment
-char *PgpDecryptCommand; ///< Config: (pgp) External command to decrypt a PGP message
-char *PgpEncryptOnlyCommand; ///< Config: (pgp) External command to encrypt, but not sign a message
-char *PgpEncryptSignCommand; ///< Config: (pgp) External command to encrypt and sign a message
-char *PgpExportCommand; ///< Config: (pgp) External command to export a public key from the user's keyring
-char *PgpGetkeysCommand; ///< Config: (pgp) External command to download a key for an email address
-char *PgpImportCommand; ///< Config: (pgp) External command to import a key into the user's keyring
-char *PgpListPubringCommand; ///< Config: (pgp) External command to list the public keys in a user's keyring
-char *PgpListSecringCommand; ///< Config: (pgp) External command to list the private keys in a user's keyring
-char *PgpSignCommand; ///< Config: (pgp) External command to create a detached PGP signature
-char *PgpVerifyCommand; ///< Config: (pgp) External command to verify PGP signatures
-char *PgpVerifyKeyCommand; ///< Config: (pgp) External command to verify key information
+char *C_PgpClearsignCommand; ///< Config: (pgp) External command to inline-sign a message
+char *C_PgpDecodeCommand; ///< Config: (pgp) External command to decode a PGP attachment
+char *C_PgpDecryptCommand; ///< Config: (pgp) External command to decrypt a PGP message
+char *C_PgpEncryptOnlyCommand; ///< Config: (pgp) External command to encrypt, but not sign a message
+char *C_PgpEncryptSignCommand; ///< Config: (pgp) External command to encrypt and sign a message
+char *C_PgpExportCommand; ///< Config: (pgp) External command to export a public key from the user's keyring
+char *C_PgpGetkeysCommand; ///< Config: (pgp) External command to download a key for an email address
+char *C_PgpImportCommand; ///< Config: (pgp) External command to import a key into the user's keyring
+char *C_PgpListPubringCommand; ///< Config: (pgp) External command to list the public keys in a user's keyring
+char *C_PgpListSecringCommand; ///< Config: (pgp) External command to list the private keys in a user's keyring
+char *C_PgpSignCommand; ///< Config: (pgp) External command to create a detached PGP signature
+char *C_PgpVerifyCommand; ///< Config: (pgp) External command to verify PGP signatures
+char *C_PgpVerifyKeyCommand; ///< Config: (pgp) External command to verify key information
/**
* struct PgpCommandContext - Data for a PGP command
cctx.need_passphrase = need_passphrase;
cctx.fname = fname;
cctx.sig_fname = sig_fname;
- if (PgpSignAs && *PgpSignAs)
- cctx.signas = PgpSignAs;
+ if (C_PgpSignAs && *C_PgpSignAs)
+ cctx.signas = C_PgpSignAs;
else
- cctx.signas = PgpDefaultKey;
+ cctx.signas = C_PgpDefaultKey;
cctx.ids = ids;
mutt_pgp_command(cmd, sizeof(cmd), &cctx, format);
int pgpoutfd, int pgperrfd, const char *fname, bool need_passphrase)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd,
- need_passphrase, fname, NULL, NULL, PgpDecodeCommand);
+ need_passphrase, fname, NULL, NULL, C_PgpDecodeCommand);
}
/**
int pgpoutfd, int pgperrfd, const char *fname, const char *sig_fname)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
- fname, sig_fname, NULL, PgpVerifyCommand);
+ fname, sig_fname, NULL, C_PgpVerifyCommand);
}
/**
int pgpoutfd, int pgperrfd, const char *fname)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, true,
- fname, NULL, NULL, PgpDecryptCommand);
+ fname, NULL, NULL, C_PgpDecryptCommand);
}
/**
int pgpoutfd, int pgperrfd, const char *fname)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, true,
- fname, NULL, NULL, PgpSignCommand);
+ fname, NULL, NULL, C_PgpSignCommand);
}
/**
if (sign)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, true,
- fname, NULL, uids, PgpEncryptSignCommand);
+ fname, NULL, uids, C_PgpEncryptSignCommand);
}
else
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
- fname, NULL, uids, PgpEncryptOnlyCommand);
+ fname, NULL, uids, C_PgpEncryptOnlyCommand);
}
}
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd,
(flags & SEC_SIGN), fname, NULL, uids,
- (flags & SEC_SIGN) ? PgpEncryptSignCommand : PgpEncryptOnlyCommand);
+ (flags & SEC_SIGN) ? C_PgpEncryptSignCommand : C_PgpEncryptOnlyCommand);
}
else
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, true,
- fname, NULL, NULL, PgpClearsignCommand);
+ fname, NULL, NULL, C_PgpClearsignCommand);
}
}
mutt_file_quote_filename(fname, tmp_fname, sizeof(tmp_fname));
cctx.fname = tmp_fname;
- if (PgpSignAs && *PgpSignAs)
- cctx.signas = PgpSignAs;
+ if (C_PgpSignAs && *C_PgpSignAs)
+ cctx.signas = C_PgpSignAs;
else
- cctx.signas = PgpDefaultKey;
+ cctx.signas = C_PgpDefaultKey;
- mutt_pgp_command(cmd, sizeof(cmd), &cctx, PgpImportCommand);
+ mutt_pgp_command(cmd, sizeof(cmd), &cctx, C_PgpImportCommand);
if (mutt_system(cmd) != 0)
mutt_debug(LL_DEBUG1, "Error running \"%s\"!", cmd);
}
struct PgpCommandContext cctx = { 0 };
- if (!PgpGetkeysCommand)
+ if (!C_PgpGetkeysCommand)
return;
personal = addr->personal;
cctx.ids = buf;
- mutt_pgp_command(cmd, sizeof(cmd), &cctx, PgpGetkeysCommand);
+ mutt_pgp_command(cmd, sizeof(cmd), &cctx, C_PgpGetkeysCommand);
devnull = open("/dev/null", O_RDWR);
int pgpoutfd, int pgperrfd, const char *uids)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
- NULL, NULL, uids, PgpExportCommand);
+ NULL, NULL, uids, C_PgpExportCommand);
}
/**
int pgpoutfd, int pgperrfd, const char *uids)
{
return pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, false,
- NULL, NULL, uids, PgpVerifyKeyCommand);
+ NULL, NULL, uids, C_PgpVerifyKeyCommand);
}
/**
pid_t rc = pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 0,
NULL, NULL, mutt_b2s(uids),
- keyring == PGP_SECRING ? PgpListSecringCommand : PgpListPubringCommand);
+ keyring == PGP_SECRING ? C_PgpListSecringCommand : C_PgpListPubringCommand);
mutt_buffer_pool_release(&uids);
return rc;
entry.uid = KeyTable[line];
entry.num = line + 1;
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(PgpEntryFormat),
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(C_PgpEntryFormat),
pgp_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
}
*/
static int pgp_compare_address(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
- compare_key_address(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_address(a, b) :
+ compare_key_address(a, b);
}
/**
*/
static int pgp_compare_keyid(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_keyid(a, b) : compare_keyid(a, b);
}
/**
*/
static int pgp_compare_date(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) : compare_key_date(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_date(a, b) :
+ compare_key_date(a, b);
}
/**
*/
static int pgp_compare_trust(const void *a, const void *b)
{
- return (PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
- compare_key_trust(a, b);
+ return (C_PgpSortKeys & SORT_REVERSE) ? !compare_key_trust(a, b) :
+ compare_key_trust(a, b);
}
/**
for (i = 0, kp = keys; kp; kp = kp->next)
{
- if (!PgpShowUnusable && (kp->flags & KEYFLAG_CANTUSE))
+ if (!C_PgpShowUnusable && (kp->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
for (a = kp->address; a; a = a->next)
{
- if (!PgpShowUnusable && (a->flags & KEYFLAG_CANTUSE))
+ if (!C_PgpShowUnusable && (a->flags & KEYFLAG_CANTUSE))
{
unusable = true;
continue;
return NULL;
}
- switch (PgpSortKeys & SORT_MASK)
+ switch (C_PgpSortKeys & SORT_MASK)
{
case SORT_ADDRESS:
f = pgp_compare_address;
#endif
/* These Config Variables are only used in ncrypt/smime.c */
-bool SmimeAskCertLabel; ///< Config: Prompt the user for a label for SMIME certificates
-char *SmimeCaLocation; ///< Config: File containing trusted certificates
-char *SmimeCertificates; ///< Config: File containing user's public certificates
-char *SmimeDecryptCommand; ///< Config: (smime) External command to decrypt an SMIME message
-bool SmimeDecryptUseDefaultKey; ///< Config: Use the default key for decryption
-char *SmimeEncryptCommand; ///< Config: (smime) External command to encrypt a message
-char *SmimeGetCertCommand; ///< Config: (smime) External command to extract a certificate from a message
-char *SmimeGetCertEmailCommand; ///< Config: (smime) External command to get a certificate for an email
-char *SmimeGetSignerCertCommand; ///< Config: (smime) External command to extract a certificate from an email
-char *SmimeImportCertCommand; ///< Config: (smime) External command to import a certificate
-char *SmimeKeys; ///< Config: File containing user's private certificates
-char *SmimePk7outCommand; ///< Config: (smime) External command to extract a public certificate
-char *SmimeSignCommand; ///< Config: (smime) External command to sign a message
-char *SmimeSignDigestAlg; ///< Config: Digest algorithm
-long SmimeTimeout; ///< Config: Time in seconds to cache a passphrase
-char *SmimeVerifyCommand; ///< Config: (smime) External command to verify a signed message
-char *SmimeVerifyOpaqueCommand; ///< Config: (smime) External command to verify a signature
+bool C_SmimeAskCertLabel; ///< Config: Prompt the user for a label for SMIME certificates
+char *C_SmimeCaLocation; ///< Config: File containing trusted certificates
+char *C_SmimeCertificates; ///< Config: File containing user's public certificates
+char *C_SmimeDecryptCommand; ///< Config: (smime) External command to decrypt an SMIME message
+bool C_SmimeDecryptUseDefaultKey; ///< Config: Use the default key for decryption
+char *C_SmimeEncryptCommand; ///< Config: (smime) External command to encrypt a message
+char *C_SmimeGetCertCommand; ///< Config: (smime) External command to extract a certificate from a message
+char *C_SmimeGetCertEmailCommand; ///< Config: (smime) External command to get a certificate for an email
+char *C_SmimeGetSignerCertCommand; ///< Config: (smime) External command to extract a certificate from an email
+char *C_SmimeImportCertCommand; ///< Config: (smime) External command to import a certificate
+char *C_SmimeKeys; ///< Config: File containing user's private certificates
+char *C_SmimePk7outCommand; ///< Config: (smime) External command to extract a public certificate
+char *C_SmimeSignCommand; ///< Config: (smime) External command to sign a message
+char *C_SmimeSignDigestAlg; ///< Config: Digest algorithm
+long C_SmimeTimeout; ///< Config: Time in seconds to cache a passphrase
+char *C_SmimeVerifyCommand; ///< Config: (smime) External command to verify a signed message
+char *C_SmimeVerifyOpaqueCommand; ///< Config: (smime) External command to verify a signature
/**
* struct SmimeCommandContext - Data for a SIME command
if (mutt_get_password(_("Enter S/MIME passphrase:"), SmimePass, sizeof(SmimePass)) == 0)
{
- SmimeExptime = mutt_date_add_timeout(time(NULL), SmimeTimeout);
+ SmimeExptime = mutt_date_add_timeout(time(NULL), C_SmimeTimeout);
return 1;
}
else
char buf1[LONG_STRING], buf2[LONG_STRING];
struct stat sb;
- mutt_str_strfcpy(path, SmimeCaLocation, sizeof(path));
+ mutt_str_strfcpy(path, C_SmimeCaLocation, sizeof(path));
mutt_expand_path(path, sizeof(path));
mutt_file_quote_filename(path, buf1, sizeof(buf1));
snprintf(fmt, sizeof(fmt), "%%%ss", prec);
snprintf(buf, buflen, fmt, buf2);
}
- else if (!SmimeCaLocation)
+ else if (!C_SmimeCaLocation)
optional = 0;
break;
}
struct SmimeKey **results_end = &results;
snprintf(index_file, sizeof(index_file), "%s/.index",
- public ? NONULL(SmimeCertificates) : NONULL(SmimeKeys));
+ public ? NONULL(C_SmimeCertificates) : NONULL(C_SmimeKeys));
FILE *fp = mutt_file_fopen(index_file, "r");
if (!fp)
* @param mailbox Email address
*
* This sets the '*ToUse' variables for an upcoming decryption, where the
- * required key is different from SmimeDefaultKey.
+ * required key is different from #C_SmimeDefaultKey.
*/
static void getkeys(char *mailbox)
{
/* the key used last time. */
if (*SmimeKeyToUse &&
- (mutt_str_strcasecmp(k, SmimeKeyToUse + mutt_str_strlen(SmimeKeys) + 1) == 0))
+ (mutt_str_strcasecmp(k, SmimeKeyToUse + mutt_str_strlen(C_SmimeKeys) + 1) == 0))
{
smime_free_key(&key);
return;
else
smime_class_void_passphrase();
- snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), k);
+ snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(C_SmimeKeys), k);
- snprintf(SmimeCertToUse, sizeof(SmimeCertToUse), "%s/%s", NONULL(SmimeCertificates), k);
+ snprintf(SmimeCertToUse, sizeof(SmimeCertToUse), "%s/%s",
+ NONULL(C_SmimeCertificates), k);
- if (mutt_str_strcasecmp(k, SmimeDefaultKey) != 0)
+ if (mutt_str_strcasecmp(k, C_SmimeDefaultKey) != 0)
smime_class_void_passphrase();
smime_free_key(&key);
if (*SmimeKeyToUse)
{
- if (mutt_str_strcasecmp(SmimeDefaultKey,
- SmimeKeyToUse + mutt_str_strlen(SmimeKeys) + 1) == 0)
+ if (mutt_str_strcasecmp(C_SmimeDefaultKey,
+ SmimeKeyToUse + mutt_str_strlen(C_SmimeKeys) + 1) == 0)
{
return;
}
smime_class_void_passphrase();
}
- snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys),
- NONULL(SmimeDefaultKey));
+ snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(C_SmimeKeys),
+ NONULL(C_SmimeDefaultKey));
snprintf(SmimeCertToUse, sizeof(SmimeCertToUse), "%s/%s",
- NONULL(SmimeCertificates), NONULL(SmimeDefaultKey));
+ NONULL(C_SmimeCertificates), NONULL(C_SmimeDefaultKey));
}
/**
struct Address *t = NULL;
bool found = false;
- if (SmimeDecryptUseDefaultKey && SmimeDefaultKey && *SmimeDefaultKey)
+ if (C_SmimeDecryptUseDefaultKey && C_SmimeDefaultKey && *C_SmimeDefaultKey)
{
- snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), SmimeDefaultKey);
+ snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(C_SmimeKeys),
+ C_SmimeDefaultKey);
snprintf(SmimeCertToUse, sizeof(SmimeCertToUse), "%s/%s",
- NONULL(SmimeCertificates), SmimeDefaultKey);
+ NONULL(C_SmimeCertificates), C_SmimeDefaultKey);
return;
}
}
thepid = smime_invoke(NULL, NULL, NULL, -1, fileno(fpout), fileno(fperr), certificate,
- NULL, NULL, NULL, NULL, NULL, NULL, SmimeGetCertEmailCommand);
+ NULL, NULL, NULL, NULL, NULL, NULL, C_SmimeGetCertEmailCommand);
if (thepid == -1)
{
mutt_message(_("Error: unable to create OpenSSL subprocess"));
extract the full set of certificates directly.
*/
thepid = smime_invoke(NULL, NULL, NULL, -1, fileno(fpout), fileno(fperr), infile,
- NULL, NULL, NULL, NULL, NULL, NULL, SmimePk7outCommand);
+ NULL, NULL, NULL, NULL, NULL, NULL, C_SmimePk7outCommand);
if (thepid == -1)
{
mutt_any_key_to_continue(_("Error: unable to create OpenSSL subprocess"));
/* Step 2: Extract the certificates from a PKCS#7 structure.
*/
thepid = smime_invoke(NULL, NULL, NULL, -1, fileno(fpout), fileno(fperr), pk7out,
- NULL, NULL, NULL, NULL, NULL, NULL, SmimeGetCertCommand);
+ NULL, NULL, NULL, NULL, NULL, NULL, C_SmimeGetCertCommand);
if (thepid == -1)
{
mutt_any_key_to_continue(_("Error: unable to create OpenSSL subprocess"));
/* Extract signer's certificate
*/
thepid = smime_invoke(NULL, NULL, NULL, -1, -1, fileno(fperr), infile, NULL, NULL,
- NULL, NULL, certfile, NULL, SmimeGetSignerCertCommand);
+ NULL, NULL, certfile, NULL, C_SmimeGetSignerCertCommand);
if (thepid == -1)
{
mutt_any_key_to_continue(_("Error: unable to create OpenSSL subprocess"));
}
buf[0] = '\0';
- if (SmimeAskCertLabel)
+ if (C_SmimeAskCertLabel)
{
if ((mutt_get_field(_("Label for certificate: "), buf, sizeof(buf), 0) != 0) ||
(buf[0] == 0))
pid_t thepid = smime_invoke(&smimein, NULL, NULL, -1, fileno(fpout),
fileno(fperr), certfile, NULL, NULL, NULL, NULL,
- NULL, NULL, SmimeImportCertCommand);
+ NULL, NULL, C_SmimeImportCertCommand);
if (thepid == -1)
{
mutt_message(_("Error: unable to create OpenSSL subprocess"));
const char *fname, const char *uids)
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
- smimeerrfd, fname, NULL, SmimeEncryptWith, NULL, NULL,
- uids, NULL, SmimeEncryptCommand);
+ smimeerrfd, fname, NULL, C_SmimeEncryptWith, NULL, NULL,
+ uids, NULL, C_SmimeEncryptCommand);
}
/**
int smimeoutfd, int smimeerrfd, const char *fname)
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd, smimeerrfd,
- fname, NULL, NULL, SmimeSignDigestAlg, SmimeKeyToUse,
- SmimeCertToUse, SmimeIntermediateToUse, SmimeSignCommand);
+ fname, NULL, NULL, C_SmimeSignDigestAlg, SmimeKeyToUse,
+ SmimeCertToUse, SmimeIntermediateToUse, C_SmimeSignCommand);
}
/**
{
off = mutt_str_strlen(certfile);
snprintf(certfile + off, sizeof(certfile) - off, "%s%s/%s",
- off ? " " : "", NONULL(SmimeCertificates), cert_start);
+ off ? " " : "", NONULL(C_SmimeCertificates), cert_start);
}
if (cert_end)
*cert_end++ = ' ';
pid_t thepid;
char *intermediates = NULL;
- char *signas = (SmimeSignAs && *SmimeSignAs) ? SmimeSignAs : SmimeDefaultKey;
+ char *signas = (C_SmimeSignAs && *C_SmimeSignAs) ? C_SmimeSignAs : C_SmimeDefaultKey;
if (!signas || !*signas)
{
mutt_error(_("Can't sign: No key specified. Use Sign As."));
mutt_write_mime_body(a, sfp);
mutt_file_fclose(&sfp);
- snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(SmimeKeys), signas);
+ snprintf(SmimeKeyToUse, sizeof(SmimeKeyToUse), "%s/%s", NONULL(C_SmimeKeys), signas);
snprintf(SmimeCertToUse, sizeof(SmimeCertToUse), "%s/%s",
- NONULL(SmimeCertificates), signas);
+ NONULL(C_SmimeCertificates), signas);
struct SmimeKey *signas_key = smime_get_key_by_hash(signas, 1);
if ((!signas_key) || (!mutt_str_strcmp("?", signas_key->issuer)))
intermediates = signas_key->issuer;
snprintf(SmimeIntermediateToUse, sizeof(SmimeIntermediateToUse), "%s/%s",
- NONULL(SmimeCertificates), intermediates);
+ NONULL(C_SmimeCertificates), intermediates);
smime_free_key(&signas_key);
mutt_generate_boundary(&t->parameter);
- char *micalg = openssl_md_to_smime_micalg(SmimeSignDigestAlg);
+ char *micalg = openssl_md_to_smime_micalg(C_SmimeSignDigestAlg);
mutt_param_set(&t->parameter, "micalg", micalg);
FREE(&micalg);
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
smimeerrfd, fname, sig_fname, NULL, NULL, NULL, NULL, NULL,
- (opaque ? SmimeVerifyOpaqueCommand : SmimeVerifyCommand));
+ (opaque ? C_SmimeVerifyOpaqueCommand : C_SmimeVerifyCommand));
}
/**
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
smimeerrfd, fname, NULL, NULL, NULL, SmimeKeyToUse,
- SmimeCertToUse, NULL, SmimeDecryptCommand);
+ SmimeCertToUse, NULL, C_SmimeDecryptCommand);
}
/**
* NOTE: "Signing" and "Clearing" only adjust the sign bit, so we have different
* letter choices for those.
*/
- if (CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
+ if (C_CryptOpportunisticEncrypt && (msg->security & SEC_OPPENCRYPT))
{
/* L10N: S/MIME options (opportunistic encryption is on) */
prompt = _("S/MIME (s)ign, encrypt (w)ith, sign (a)s, (c)lear, or (o)ppenc "
/* Opportunistic encryption option is set, but is toggled off
* for this message.
*/
- else if (CryptOpportunisticEncrypt)
+ else if (C_CryptOpportunisticEncrypt)
{
/* L10N: S/MIME options (opportunistic encryption is off) */
prompt = _("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, "
key = smime_ask_for_key(_("Sign as: "), KEYFLAG_CANSIGN, false);
if (key)
{
- mutt_str_replace(&SmimeSignAs, key->hash);
+ mutt_str_replace(&C_SmimeSignAs, key->hash);
smime_free_key(&key);
msg->security |= SEC_SIGN;
_("12")))
{
case 1:
- mutt_str_replace(&SmimeEncryptWith, "des");
+ mutt_str_replace(&C_SmimeEncryptWith, "des");
break;
case 2:
- mutt_str_replace(&SmimeEncryptWith, "des3");
+ mutt_str_replace(&C_SmimeEncryptWith, "des3");
break;
}
break;
_("123")))
{
case 1:
- mutt_str_replace(&SmimeEncryptWith, "rc2-40");
+ mutt_str_replace(&C_SmimeEncryptWith, "rc2-40");
break;
case 2:
- mutt_str_replace(&SmimeEncryptWith, "rc2-64");
+ mutt_str_replace(&C_SmimeEncryptWith, "rc2-64");
break;
case 3:
- mutt_str_replace(&SmimeEncryptWith, "rc2-128");
+ mutt_str_replace(&C_SmimeEncryptWith, "rc2-128");
break;
}
break;
_("123")))
{
case 1:
- mutt_str_replace(&SmimeEncryptWith, "aes128");
+ mutt_str_replace(&C_SmimeEncryptWith, "aes128");
break;
case 2:
- mutt_str_replace(&SmimeEncryptWith, "aes192");
+ mutt_str_replace(&C_SmimeEncryptWith, "aes192");
break;
case 3:
- mutt_str_replace(&SmimeEncryptWith, "aes256");
+ mutt_str_replace(&C_SmimeEncryptWith, "aes256");
break;
}
break;
case 4:
- FREE(&SmimeEncryptWith);
+ FREE(&C_SmimeEncryptWith);
/* (c)lear */
/* fallthrough */
case -1: /* Ctrl-G or Enter */
if (folder->ff->nd->desc)
{
char *desc = mutt_str_strdup(folder->ff->nd->desc);
- if (NewsgroupsCharset && *NewsgroupsCharset)
- mutt_ch_convert_string(&desc, NewsgroupsCharset, Charset, MUTT_ICONV_HOOK_FROM);
+ if (C_NewsgroupsCharset && *C_NewsgroupsCharset)
+ mutt_ch_convert_string(&desc, C_NewsgroupsCharset, C_Charset, MUTT_ICONV_HOOK_FROM);
mutt_mb_filter_unprintable(&desc);
snprintf(fmt, sizeof(fmt), "%%%ss", prec);
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
snprintf(buf, buflen, fmt, Context->mailbox->msg_new);
}
- else if (MarkOld && folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
+ else if (C_MarkOld && folder->ff->nd->last_cached >= folder->ff->nd->first_message &&
folder->ff->nd->last_cached <= folder->ff->nd->last_message)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
#endif
/* These Config Variables are only used in nntp/newsrc.c */
-char *NewsCacheDir; ///< Config: (nntp) Directory for cached news articles
-char *Newsrc; ///< Config: (nntp) File containing list of subscribed newsgroups
+char *C_NewsCacheDir; ///< Config: (nntp) Directory for cached news articles
+char *C_Newsrc; ///< Config: (nntp) File containing list of subscribed newsgroups
struct BodyCache;
int save_sort = SORT_ORDER;
unsigned int entries;
- if (Sort != SORT_ORDER)
+ if (C_Sort != SORT_ORDER)
{
- save_sort = Sort;
- Sort = SORT_ORDER;
+ save_sort = C_Sort;
+ C_Sort = SORT_ORDER;
mutt_mailbox_changed(m, MBN_RESORT);
}
}
mutt_mem_realloc(&mdata->newsrc_ent, mdata->newsrc_len * sizeof(struct NewsrcEntry));
- if (save_sort != Sort)
+ if (save_sort != C_Sort)
{
- Sort = save_sort;
+ C_Sort = save_sort;
mutt_mailbox_changed(m, MBN_RESORT);
}
}
else
mutt_str_strfcpy(file, src ? src : "", sizeof(file));
- snprintf(dst, dstlen, "%s/%s", NewsCacheDir, file);
+ snprintf(dst, dstlen, "%s/%s", C_NewsCacheDir, file);
/* remove trailing slash */
c = dst + strlen(dst) - 1;
char file[PATH_MAX];
if (!mdata->adata || !mdata->adata->cacheable || !mdata->adata->conn ||
- !mdata->group || !(mdata->newsrc_ent || mdata->subscribed || SaveUnsubscribed))
+ !mdata->group || !(mdata->newsrc_ent || mdata->subscribed || C_SaveUnsubscribed))
{
return NULL;
}
mutt_account_tourl(&mdata->adata->conn->account, &url);
url.path = mdata->group;
url_tostring(&url, file, sizeof(file), U_PATH);
- return mutt_hcache_open(NewsCacheDir, file, nntp_hcache_namer);
+ return mutt_hcache_open(C_NewsCacheDir, file, nntp_hcache_namer);
}
/**
mdata->group = group;
mdata->bcache = NULL;
}
- else if (mdata->newsrc_ent || mdata->subscribed || SaveUnsubscribed)
+ else if (mdata->newsrc_ent || mdata->subscribed || C_SaveUnsubscribed)
continue;
nntp_delete_group_cache(mdata);
/* try to create cache directory and enable caching */
adata->cacheable = false;
- if (rc >= 0 && NewsCacheDir && *NewsCacheDir)
+ if (rc >= 0 && C_NewsCacheDir && *C_NewsCacheDir)
{
cache_expand(file, sizeof(file), &conn->account, NULL);
if (mutt_file_mkdir(file, S_IRWXU) < 0)
if (rc >= 0)
{
mutt_expando_format(file, sizeof(file), 0, MuttIndexWindow->cols,
- NONULL(Newsrc), nntp_format_str, (unsigned long) adata, 0);
+ NONULL(C_Newsrc), nntp_format_str, (unsigned long) adata, 0);
mutt_expand_path(file, sizeof(file));
adata->newsrc_file = mutt_str_strdup(file);
rc = nntp_newsrc_parse(adata);
return;
/* article isn't read but cached, it's old */
- if (MarkOld)
+ if (C_MarkOld)
e->old = true;
}
return NULL;
mdata->subscribed = false;
- if (!SaveUnsubscribed)
+ if (!C_SaveUnsubscribed)
{
mdata->newsrc_len = 0;
FREE(&mdata->newsrc_ent);
#endif
/* These Config Variables are only used in nntp/nntp.c */
-char *NntpAuthenticators; ///< Config: (nntp) Allowed authentication methods
-short NntpContext; ///< Config: (nntp) Maximum number of articles to list (0 for all articles)
-bool NntpListgroup; ///< Config: (nntp) Check all articles when opening a newsgroup
-bool NntpLoadDescription; ///< Config: (nntp) Load descriptions for newsgroups when adding to the list
-short NntpPoll; ///< Config: (nntp) Interval between checks for new posts
-bool ShowNewNews; ///< Config: (nntp) Check for new newsgroups when entering the browser
+char *C_NntpAuthenticators; ///< Config: (nntp) Allowed authentication methods
+short C_NntpContext; ///< Config: (nntp) Maximum number of articles to list (0 for all articles)
+bool C_NntpListgroup; ///< Config: (nntp) Check all articles when opening a newsgroup
+bool C_NntpLoadDescription; ///< Config: (nntp) Load descriptions for newsgroups when adding to the list
+short C_NntpPoll; ///< Config: (nntp) Interval between checks for new posts
+bool C_ShowNewNews; ///< Config: (nntp) Check for new newsgroups when entering the browser
struct NntpAccountData *CurrentNewsSrv;
char *p = tmp;
char *sentinel = tmp + len;
- if (DebugLevel < dbg)
+ if (C_DebugLevel < dbg)
return;
memcpy(tmp, buf, len);
tmp[len] = '\0';
}
/* get list of authenticators */
- if (NntpAuthenticators && *NntpAuthenticators)
- mutt_str_strfcpy(authenticators, NntpAuthenticators, sizeof(authenticators));
+ if (C_NntpAuthenticators && *C_NntpAuthenticators)
+ mutt_str_strfcpy(authenticators, C_NntpAuthenticators, sizeof(authenticators));
else if (adata->hasCAPABILITIES)
{
mutt_str_strfcpy(authenticators, adata->authenticators, sizeof(authenticators));
struct Progress progress;
if (msg)
- mutt_progress_init(&progress, msg, MUTT_PROGRESS_MSG, ReadInc, 0);
+ mutt_progress_init(&progress, msg, MUTT_PROGRESS_MSG, C_ReadInc, 0);
mutt_str_strfcpy(buf, query, sizeof(buf));
if (nntp_query(mdata, buf, sizeof(buf)) < 0)
}
/* fetch list of articles */
- if (NntpListgroup && mdata->adata->hasLISTGROUP && !mdata->deleted)
+ if (C_NntpListgroup && mdata->adata->hasLISTGROUP && !mdata->deleted)
{
if (!m->quiet)
mutt_message(_("Fetching list of articles..."));
if (!m->quiet)
{
mutt_progress_init(&fc.progress, _("Fetching message headers..."),
- MUTT_PROGRESS_MSG, ReadInc, last - first + 1);
+ MUTT_PROGRESS_MSG, C_ReadInc, last - first + 1);
}
for (current = first; current <= last && rc == 0; current++)
{
/* fallback to fetch overview */
else if (mdata->adata->hasOVER || mdata->adata->hasXOVER)
{
- if (NntpListgroup && mdata->adata->hasLISTGROUP)
+ if (C_NntpListgroup && mdata->adata->hasLISTGROUP)
break;
else
continue;
first_over = current + 1;
}
- if (!NntpListgroup || !mdata->adata->hasLISTGROUP)
+ if (!C_NntpListgroup || !mdata->adata->hasLISTGROUP)
current = first_over;
/* fetch overview information */
int rc, ret = 0;
void *hc = NULL;
- if (adata->check_time + NntpPoll > now)
+ if (adata->check_time + C_NntpPoll > now)
return 0;
mutt_message(_("Checking for new messages..."));
if (mdata->last_message < mdata->last_loaded)
{
mdata->last_loaded = mdata->first_message - 1;
- if (NntpContext && mdata->last_message - mdata->last_loaded > NntpContext)
- mdata->last_loaded = mdata->last_message - NntpContext;
+ if (C_NntpContext && mdata->last_message - mdata->last_loaded > C_NntpContext)
+ mdata->last_loaded = mdata->last_message - C_NntpContext;
}
ret = MUTT_REOPENED;
}
struct Email *e = NULL;
anum_t first = mdata->first_message;
- if (NntpContext && mdata->last_message - first + 1 > NntpContext)
- first = mdata->last_message - NntpContext + 1;
+ if (C_NntpContext && mdata->last_message - first + 1 > C_NntpContext)
+ first = mdata->last_message - C_NntpContext + 1;
messages = mutt_mem_calloc(mdata->last_loaded - first + 1, sizeof(unsigned char));
hc = nntp_hcache_open(mdata);
nntp_hcache_update(mdata, hc);
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
- if (adata->use_tls != 1 && (adata->hasSTARTTLS || SslForceTls))
+ if (adata->use_tls != 1 && (adata->hasSTARTTLS || C_SslForceTls))
{
if (adata->use_tls == 0)
{
adata->use_tls =
- SslForceTls || query_quadoption(SslStarttls,
- _("Secure connection with TLS?")) == MUTT_YES ?
+ C_SslForceTls || query_quadoption(C_SslStarttls,
+ _("Secure connection with TLS?")) == MUTT_YES ?
2 :
1;
}
mdata = m->mdata;
else
{
- CurrentNewsSrv = nntp_select_server(m, NewsServer, false);
+ CurrentNewsSrv = nntp_select_server(m, C_NewsServer, false);
if (!CurrentNewsSrv)
return -1;
}
}
- if (NntpLoadDescription)
+ if (C_NntpLoadDescription)
rc = get_description(&tmp_mdata, "*", _("Loading descriptions..."));
nntp_active_save_cache(adata);
return -1;
/* check subscribed newsgroups for new articles */
- if (ShowNewNews)
+ if (C_ShowNewNews)
{
mutt_message(_("Checking for new messages..."));
for (i = 0; i < adata->groups_num; i++)
}
/* loading descriptions */
- if (NntpLoadDescription)
+ if (C_NntpLoadDescription)
{
unsigned int count = 0;
struct Progress progress;
mutt_progress_init(&progress, _("Loading descriptions..."),
- MUTT_PROGRESS_MSG, ReadInc, adata->groups_num - i);
+ MUTT_PROGRESS_MSG, C_ReadInc, adata->groups_num - i);
for (i = groups_num; i < adata->groups_num; i++)
{
struct NntpMboxData *mdata = adata->groups_list[i];
}
m->rights &= ~MUTT_ACL_INSERT; // Clear the flag
- if (!mdata->newsrc_ent && !mdata->subscribed && !SaveUnsubscribed)
+ if (!mdata->newsrc_ent && !mdata->subscribed && !C_SaveUnsubscribed)
m->readonly = true;
/* select newsgroup */
mdata->deleted = true;
nntp_active_save_cache(adata);
}
- if (mdata->newsrc_ent && !mdata->subscribed && !SaveUnsubscribed)
+ if (mdata->newsrc_ent && !mdata->subscribed && !C_SaveUnsubscribed)
{
FREE(&mdata->newsrc_ent);
mdata->newsrc_len = 0;
mdata->deleted = false;
/* get description if empty */
- if (NntpLoadDescription && !mdata->desc)
+ if (C_NntpLoadDescription && !mdata->desc)
{
if (get_description(mdata, NULL, NULL) < 0)
{
time(&adata->check_time);
m->mdata = mdata;
m->free_mdata = nntp_mdata_free;
- if (!mdata->bcache && (mdata->newsrc_ent || mdata->subscribed || SaveUnsubscribed))
+ if (!mdata->bcache && (mdata->newsrc_ent || mdata->subscribed || C_SaveUnsubscribed))
mdata->bcache = mutt_bcache_open(&adata->conn->account, mdata->group);
/* strip off extra articles if adding context is greater than $nntp_context */
first = mdata->first_message;
- if (NntpContext && mdata->last_message - first + 1 > NntpContext)
- first = mdata->last_message - NntpContext + 1;
+ if (C_NntpContext && mdata->last_message - first + 1 > C_NntpContext)
+ first = mdata->last_message - C_NntpContext + 1;
mdata->last_loaded = first ? first - 1 : 0;
count = mdata->first_message;
mdata->first_message = first;
struct stat;
/* These Config Variables are only used in nntp/nntp.c */
-extern char *NntpAuthenticators;
-extern short NntpContext;
-extern bool NntpListgroup;
-extern bool NntpLoadDescription;
-extern short NntpPoll;
-extern bool ShowNewNews;
+extern char *C_NntpAuthenticators;
+extern short C_NntpContext;
+extern bool C_NntpListgroup;
+extern bool C_NntpLoadDescription;
+extern short C_NntpPoll;
+extern bool C_ShowNewNews;
/* These Config Variables are only used in nntp/newsrc.c */
-extern char *NewsCacheDir;
-extern char *Newsrc;
+extern char *C_NewsCacheDir;
+extern char *C_Newsrc;
extern struct NntpAccountData *CurrentNewsSrv; ///< Current NNTP news server
extern struct MxOps MxNntpOps;
const int NmUriProtocolLen = sizeof(NmUriProtocol) - 1;
/* These Config Variables are only used in notmuch/mutt_notmuch.c */
-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
-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
-char *NmRecordTags; ///< Config: (notmuch) Tags to apply to the 'record' mailbox (sent mail)
-char *NmUnreadTag; ///< Config: (notmuch) Tag to use for unread messages
-char *NmFlaggedTag; ///< Config: (notmuch) Tag to use for flagged messages
-char *NmRepliedTag; ///< Config: (notmuch) Tag to use for replied messages
+int C_NmDbLimit; ///< Config: (notmuch) Default limit for Notmuch queries
+char *C_NmDefaultUri; ///< Config: (notmuch) Path to the Notmuch database
+char *C_NmExcludeTags; ///< Config: (notmuch) Exclude messages with these tags
+int C_NmOpenTimeout; ///< Config: (notmuch) Database timeout
+char *C_NmQueryType; ///< Config: (notmuch) Default query type: 'threads' or 'messages'
+int C_NmQueryWindowCurrentPosition; ///< Config: (notmuch) Position of current search window
+char *C_NmQueryWindowTimebase; ///< Config: (notmuch) Units for the time duration
+char *C_NmRecordTags; ///< Config: (notmuch) Tags to apply to the 'record' mailbox (sent mail)
+char *C_NmUnreadTag; ///< Config: (notmuch) Tag to use for unread messages
+char *C_NmFlaggedTag; ///< Config: (notmuch) Tag to use for flagged messages
+char *C_NmRepliedTag; ///< Config: (notmuch) Tag to use for replied messages
/**
* string_to_query_type - Lookup a query type
struct NmMboxData *mdata = mutt_mem_calloc(1, sizeof(struct NmMboxData));
mutt_debug(LL_DEBUG1, "nm: initialize mailbox mdata %p\n", (void *) mdata);
- mdata->db_limit = NmDbLimit;
- mdata->query_type = string_to_query_type(NmQueryType);
+ mdata->db_limit = C_NmDbLimit;
+ mdata->query_type = string_to_query_type(C_NmQueryType);
mdata->db_url = url_parse(uri);
if (!mdata->db_url)
{
// path to DB + query + URI "decoration"
char uri[PATH_MAX + LONG_STRING + 32];
- // Try to use NmDefaultUri or Folder.
+ // Try to use C_NmDefaultUri or C_Folder.
// If neither are set, it is impossible to create a Notmuch URI.
- if (NmDefaultUri)
- snprintf(uri, sizeof(uri), "%s", NmDefaultUri);
- else if (Folder)
- snprintf(uri, sizeof(uri), "notmuch://%s", Folder);
+ if (C_NmDefaultUri)
+ snprintf(uri, sizeof(uri), "%s", C_NmDefaultUri);
+ else if (C_Folder)
+ snprintf(uri, sizeof(uri), "notmuch://%s", C_Folder);
else
return NULL;
{
mutt_debug(LL_DEBUG2, "nm: %s\n", query);
- int beg = NmQueryWindowDuration * (NmQueryWindowCurrentPosition + 1);
- int end = NmQueryWindowDuration * NmQueryWindowCurrentPosition;
+ int beg = C_NmQueryWindowDuration * (C_NmQueryWindowCurrentPosition + 1);
+ int end = C_NmQueryWindowDuration * C_NmQueryWindowCurrentPosition;
/* if the duration is a non positive integer, disable the window */
- if (NmQueryWindowDuration <= 0)
+ if (C_NmQueryWindowDuration <= 0)
{
query_window_reset();
return false;
}
/* if the query has changed, reset the window position */
- if (!NmQueryWindowCurrentSearch || (strcmp(query, NmQueryWindowCurrentSearch) != 0))
+ if (!C_NmQueryWindowCurrentSearch || (strcmp(query, C_NmQueryWindowCurrentSearch) != 0))
query_window_reset();
- if (!query_window_check_timebase(NmQueryWindowTimebase))
+ if (!query_window_check_timebase(C_NmQueryWindowTimebase))
{
mutt_message(_("Invalid nm_query_window_timebase value (valid values are: "
"hour, day, week, month or year)"));
{
// Open-ended date allows mail from the future.
// This may occur is the sender's time settings are off.
- snprintf(buf, buflen, "date:%d%s.. and %s", beg, NmQueryWindowTimebase,
- NmQueryWindowCurrentSearch);
+ snprintf(buf, buflen, "date:%d%s.. and %s", beg, C_NmQueryWindowTimebase,
+ C_NmQueryWindowCurrentSearch);
}
else
{
- snprintf(buf, buflen, "date:%d%s..%d%s and %s", beg, NmQueryWindowTimebase,
- end, NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
+ snprintf(buf, buflen, "date:%d%s..%d%s and %s", beg, C_NmQueryWindowTimebase,
+ end, C_NmQueryWindowTimebase, C_NmQueryWindowCurrentSearch);
}
mutt_debug(LL_DEBUG2, "nm: %s -> %s\n", query, buf);
if (mdata->db_query)
return mdata->db_query;
- mdata->query_type = string_to_query_type(NmQueryType); /* user's default */
+ mdata->query_type = string_to_query_type(C_NmQueryType); /* user's default */
struct UrlQueryString *item = NULL;
STAILQ_FOREACH(item, &mdata->db_url->query_strings, entries)
if (window)
{
char buf[LONG_STRING];
- mutt_str_replace(&NmQueryWindowCurrentSearch, mdata->db_query);
+ mutt_str_replace(&C_NmQueryWindowCurrentSearch, mdata->db_query);
/* if a date part is defined, do not apply windows (to avoid the risk of
* having a non-intersected date frame). A good improvement would be to
*/
static void apply_exclude_tags(notmuch_query_t *query)
{
- if (!NmExcludeTags || !*NmExcludeTags)
+ if (!C_NmExcludeTags || !*C_NmExcludeTags)
return;
char *end = NULL, *tag = NULL;
- char *buf = mutt_str_strdup(NmExcludeTags);
+ char *buf = mutt_str_strdup(C_NmExcludeTags);
for (char *p = buf; p && *p; p++)
{
snprintf(msg, sizeof(msg), _("Reading messages..."));
// The total mail count is in oldmsgcount, so use that instead of recounting.
- mutt_progress_init(&mdata->progress, msg, MUTT_PROGRESS_MSG, ReadInc, mdata->oldmsgcount);
+ mutt_progress_init(&mdata->progress, msg, MUTT_PROGRESS_MSG, C_ReadInc,
+ mdata->oldmsgcount);
mdata->progress_ready = true;
}
if (*tag == '-')
{
tag = tag + 1;
- if (strcmp(tag, NmUnreadTag) == 0)
+ if (strcmp(tag, C_NmUnreadTag) == 0)
mutt_set_flag(m, e, MUTT_READ, true);
- else if (strcmp(tag, NmRepliedTag) == 0)
+ else if (strcmp(tag, C_NmRepliedTag) == 0)
mutt_set_flag(m, e, MUTT_REPLIED, false);
- else if (strcmp(tag, NmFlaggedTag) == 0)
+ else if (strcmp(tag, C_NmFlaggedTag) == 0)
mutt_set_flag(m, e, MUTT_FLAG, false);
}
else
{
tag = (*tag == '+') ? tag + 1 : tag;
- if (strcmp(tag, NmUnreadTag) == 0)
+ if (strcmp(tag, C_NmUnreadTag) == 0)
mutt_set_flag(m, e, MUTT_READ, false);
- else if (strcmp(tag, NmRepliedTag) == 0)
+ else if (strcmp(tag, C_NmRepliedTag) == 0)
mutt_set_flag(m, e, MUTT_REPLIED, true);
- else if (strcmp(tag, NmFlaggedTag) == 0)
+ else if (strcmp(tag, C_NmFlaggedTag) == 0)
mutt_set_flag(m, e, MUTT_FLAG, true);
}
end = NULL;
nm_parse_type_from_query(mdata, buf);
- if (get_limit(mdata) != NmDbLimit)
+ if (get_limit(mdata) != C_NmDbLimit)
{
added = snprintf(uri, sizeof(uri), "%s%s?type=%s&limit=%d&query=", NmUriProtocol,
nm_db_get_filename(m),
*/
void nm_query_window_forward(void)
{
- if (NmQueryWindowCurrentPosition != 0)
- NmQueryWindowCurrentPosition--;
+ if (C_NmQueryWindowCurrentPosition != 0)
+ C_NmQueryWindowCurrentPosition--;
- mutt_debug(LL_DEBUG2, "(%d)\n", NmQueryWindowCurrentPosition);
+ mutt_debug(LL_DEBUG2, "(%d)\n", C_NmQueryWindowCurrentPosition);
}
/**
*/
void nm_query_window_backward(void)
{
- NmQueryWindowCurrentPosition++;
- mutt_debug(LL_DEBUG2, "(%d)\n", NmQueryWindowCurrentPosition);
+ C_NmQueryWindowCurrentPosition++;
+ mutt_debug(LL_DEBUG2, "(%d)\n", C_NmQueryWindowCurrentPosition);
}
/**
char *db_filename = NULL, *db_query = NULL;
notmuch_database_t *db = NULL;
int rc = -1;
- int limit = NmDbLimit;
+ int limit = C_NmDbLimit;
mutt_debug(LL_DEBUG1, "nm: count\n");
url = url_parse(m->path);
db_filename = url->path;
if (!db_filename)
{
- if (NmDefaultUri)
+ if (C_NmDefaultUri)
{
- if (nm_path_probe(NmDefaultUri, NULL) == MUTT_NOTMUCH)
- db_filename = NmDefaultUri + NmUriProtocolLen;
+ if (nm_path_probe(C_NmDefaultUri, NULL) == MUTT_NOTMUCH)
+ db_filename = C_NmDefaultUri + NmUriProtocolLen;
else
- db_filename = NmDefaultUri;
+ db_filename = C_NmDefaultUri;
}
- else if (Folder)
- db_filename = Folder;
+ else if (C_Folder)
+ db_filename = C_Folder;
}
/* don't be verbose about connection, as we're called from
char *qstr = NULL;
// unread messages
- safe_asprintf(&qstr, "( %s ) tag:%s", db_query, NmUnreadTag);
+ safe_asprintf(&qstr, "( %s ) tag:%s", db_query, C_NmUnreadTag);
m->msg_unread = count_query(db, qstr, limit);
FREE(&qstr);
// flagged messages
- safe_asprintf(&qstr, "( %s ) tag:%s", db_query, NmFlaggedTag);
+ safe_asprintf(&qstr, "( %s ) tag:%s", db_query, C_NmFlaggedTag);
m->msg_flagged = count_query(db, qstr, limit);
FREE(&qstr);
update_tags(msg, tags);
FREE(&tags);
}
- if (NmRecordTags)
- update_tags(msg, NmRecordTags);
+ if (C_NmRecordTags)
+ update_tags(msg, C_NmRecordTags);
}
rc = 0;
{
/* all is in this function so we don't use data->progress here */
snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), m->path);
- mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, m->msg_count);
+ mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_WriteInc, m->msg_count);
}
for (int i = 0; i < m->msg_count; i++)
struct stat;
/* These Config Variables are only used in notmuch/mutt_notmuch.c */
-extern int NmDbLimit;
-extern char *NmDefaultUri;
-extern char *NmExcludeTags;
-extern int NmOpenTimeout;
-extern char *NmQueryType;
-extern int NmQueryWindowCurrentPosition;
-extern char *NmQueryWindowTimebase;
-extern char *NmRecordTags;
-extern char *NmUnreadTag;
-extern char *NmFlaggedTag;
-extern char *NmRepliedTag;
+extern int C_NmDbLimit;
+extern char *C_NmDefaultUri;
+extern char *C_NmExcludeTags;
+extern int C_NmOpenTimeout;
+extern char *C_NmQueryType;
+extern int C_NmQueryWindowCurrentPosition;
+extern char *C_NmQueryWindowTimebase;
+extern char *C_NmRecordTags;
+extern char *C_NmUnreadTag;
+extern char *C_NmFlaggedTag;
+extern char *C_NmRepliedTag;
extern struct MxOps MxNotmuchOps;
* @param m Mailbox
* @retval ptr Filename
*
- * @note The return value is a pointer into the NmDefaultUri global variable.
+ * @note The return value is a pointer into the #C_NmDefaultUri global variable.
* If that variable changes, the result will be invalid.
* It must not be freed.
*/
if (!mdata)
return NULL;
- char *db_filename = mdata->db_url->path ? mdata->db_url->path : NmDefaultUri;
- if (!db_filename && !Folder)
+ char *db_filename = mdata->db_url->path ? mdata->db_url->path : C_NmDefaultUri;
+ if (!db_filename && !C_Folder)
return NULL;
if (!db_filename)
- db_filename = Folder;
+ db_filename = C_Folder;
if (nm_path_probe(db_filename, NULL) == MUTT_NOTMUCH)
db_filename += NmUriProtocolLen;
#endif
mutt_debug(LL_DEBUG1, "nm: db open '%s' %s (timeout %d)\n", filename,
- writable ? "[WRITE]" : "[READ]", NmOpenTimeout);
+ writable ? "[WRITE]" : "[READ]", C_NmOpenTimeout);
const notmuch_database_mode_t mode =
writable ? NOTMUCH_DATABASE_MODE_READ_WRITE : NOTMUCH_DATABASE_MODE_READ_ONLY;
#else
db = notmuch_database_open(filename, mode);
#endif
- if ((st == NOTMUCH_STATUS_FILE_ERROR) || db || !NmOpenTimeout || ((ct / 2) > NmOpenTimeout))
+ if ((st == NOTMUCH_STATUS_FILE_ERROR) || db || !C_NmOpenTimeout || ((ct / 2) > C_NmOpenTimeout))
break;
if (verbose && ct && ((ct % 2) == 0))
#endif
/* These Config Variables are only used in pager.c */
-bool AllowAnsi; ///< Config: Allow ANSI colour codes in rich text messages
-bool HeaderColorPartial; ///< Config: Only colour the part of the header matching the regex
-short PagerContext; ///< Config: Number of lines of overlap when changing pages in the pager
-short PagerIndexLines; ///< Config: Number of index lines to display above the pager
-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
-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
+bool C_AllowAnsi; ///< Config: Allow ANSI colour codes in rich text messages
+bool C_HeaderColorPartial; ///< Config: Only colour the part of the header matching the regex
+short C_PagerContext; ///< Config: Number of lines of overlap when changing pages in the pager
+short C_PagerIndexLines; ///< Config: Number of index lines to display above the pager
+bool C_PagerStop; ///< Config: Don't automatically open the next message when at the end of a message
+short C_SearchContext; ///< Config: Context to display around search matches
+short C_SkipQuotedOffset; ///< Config: Lines of context to show when skipping quoted text
+bool C_SmartWrap; ///< Config: Wrap text at word boundaries
+struct Regex *C_Smileys; ///< Config: Regex to match smileys to prevent mistakes when quoting text
+bool C_Tilde; ///< Config: Character to pad blank lines in the pager
#define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT)
if (line_info[n].continuation)
{
- if (!cnt && Markers)
+ if (!cnt && C_Markers)
{
SETCOLOR(MT_COLOR_MARKERS);
addch('+');
* @param[out] pmatch Regex sub-matches
* @retval true Line is quoted
*
- * Checks if line matches the QuoteRegex and doesn't match Smileys.
+ * Checks if line matches the #C_QuoteRegex and doesn't match #C_Smileys.
* This is used by the pager for calling classify_quote.
*/
int mutt_is_quote_line(char *line, regmatch_t *pmatch)
if (!pmatch)
pmatch = pmatch_internal;
- if (QuoteRegex && QuoteRegex->regex && regexec(QuoteRegex->regex, line, 1, pmatch, 0) == 0)
+ if (C_QuoteRegex && C_QuoteRegex->regex &&
+ regexec(C_QuoteRegex->regex, line, 1, pmatch, 0) == 0)
{
- if (Smileys && Smileys->regex && regexec(Smileys->regex, line, 1, smatch, 0) == 0)
+ if (C_Smileys && C_Smileys->regex && regexec(C_Smileys->regex, line, 1, smatch, 0) == 0)
{
if (smatch[0].rm_so > 0)
{
char c = line[smatch[0].rm_so];
line[smatch[0].rm_so] = 0;
- if (regexec(QuoteRegex->regex, line, 1, pmatch, 0) == 0)
+ if (regexec(C_QuoteRegex->regex, line, 1, pmatch, 0) == 0)
is_quote = true;
line[smatch[0].rm_so] = c;
if (n > 0 && (buf[0] == ' ' || buf[0] == '\t'))
{
line_info[n].type = line_info[n - 1].type; /* wrapped line */
- if (!HeaderColorPartial)
+ if (!C_HeaderColorPartial)
{
(line_info[n].syntax)[0].color = (line_info[n - 1].syntax)[0].color;
line_info[n].is_cont_hdr = 1;
* same color. Otherwise, we handle the header patterns just
* like body patterns (further below).
*/
- if (!HeaderColorPartial)
+ if (!C_HeaderColorPartial)
{
STAILQ_FOREACH(color_line, &ColorHdrList, entries)
{
/* body patterns */
if (line_info[n].type == MT_COLOR_NORMAL || line_info[n].type == MT_COLOR_QUOTED ||
- (line_info[n].type == MT_COLOR_HDEFAULT && HeaderColorPartial))
+ (line_info[n].type == MT_COLOR_HDEFAULT && C_HeaderColorPartial))
{
size_t nl;
x++;
/* Character Attributes */
- if (AllowAnsi && a && (buf[x] == 'm'))
+ if (C_AllowAnsi && a && (buf[x] == 'm'))
{
if (pos == x)
{
int *pcol, int *pspecial, struct MuttWindow *pager_window)
{
int space = -1; /* index of the last space or TAB */
- int col = Markers ? (*line_info)[n].continuation : 0;
+ int col = C_Markers ? (*line_info)[n].continuation : 0;
size_t k;
int ch, vch, last_special = -1, special = 0, t;
wchar_t wc;
mbstate_t mbstate;
int wrap_cols =
- mutt_window_wrap_cols(pager_window, (flags & MUTT_PAGER_NOWRAP) ? 0 : Wrap);
+ mutt_window_wrap_cols(pager_window, (flags & MUTT_PAGER_NOWRAP) ? 0 : C_Wrap);
if (check_attachment_marker((char *) buf) == 0)
wrap_cols = pager_window->cols;
(*last)--;
goto out;
}
- if (QuoteRegex && QuoteRegex->regex &&
- regexec(QuoteRegex->regex, (char *) fmt, 1, pmatch, 0) == 0)
+ if (C_QuoteRegex && C_QuoteRegex->regex &&
+ regexec(C_QuoteRegex->regex, (char *) fmt, 1, pmatch, 0) == 0)
{
(*line_info)[n].quote =
classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
buf_ptr = buf + cnt;
/* move the break point only if smart_wrap is set */
- if (SmartWrap)
+ if (C_SmartWrap)
{
if ((cnt < b_read) && (ch != -1) && !ISHEADER((*line_info)[n].type) &&
!ISSPACE(buf[cnt]))
move(0, 0);
clrtobot();
- if (IsEmail(rd->extra) && Context && ((Context->mailbox->vcount + 1) < PagerIndexLines))
+ if (IsEmail(rd->extra) && Context && ((Context->mailbox->vcount + 1) < C_PagerIndexLines))
rd->indexlen = Context->mailbox->vcount + 1;
else
- rd->indexlen = PagerIndexLines;
+ rd->indexlen = C_PagerIndexLines;
rd->indicator = rd->indexlen / 3;
rd->index_status_window->rows = 0;
rd->index_window->rows = 0;
- if (IsEmail(rd->extra) && PagerIndexLines)
+ if (IsEmail(rd->extra) && C_PagerIndexLines)
{
memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow));
rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0;
- if (StatusOnTop)
+ if (C_StatusOnTop)
{
memcpy(rd->index_status_window, MuttStatusWindow, sizeof(struct MuttWindow));
}
}
- if (Help)
+ if (C_Help)
{
SETCOLOR(MT_COLOR_STATUS);
mutt_window_move(MuttHelpWindow, 0, 0);
FREE(&Resize);
}
- if (IsEmail(rd->extra) && PagerIndexLines)
+ if (IsEmail(rd->extra) && C_PagerIndexLines)
{
if (!rd->index)
{
while (rd->lines < rd->pager_window->rows)
{
mutt_window_clrtoeol(rd->pager_window);
- if (Tilde)
+ if (C_Tilde)
addch('~');
rd->lines++;
mutt_window_move(rd->pager_window, rd->lines, 0);
size_t l2 = sizeof(buffer);
hfi.email = (IsEmail(rd->extra)) ? rd->extra->email : rd->extra->body->email;
mutt_make_string_info(buffer, l1 < l2 ? l1 : l2, rd->pager_status_window->cols,
- NONULL(PagerFormat), &hfi, 0);
+ NONULL(C_PagerFormat), &hfi, 0);
mutt_draw_statusline(rd->pager_status_window->cols, buffer, l2);
}
else
mutt_draw_statusline(rd->pager_status_window->cols, bn, sizeof(bn));
}
NORMAL_COLOR;
- if (TsEnabled && TsSupported && rd->index)
+ if (C_TsEnabled && TsSupported && rd->index)
{
- menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(TsStatusFormat));
+ menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(C_TsStatusFormat));
mutt_ts_status(buffer);
- menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(TsIconFormat));
+ menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(C_TsIconFormat));
mutt_ts_icon(buffer);
}
}
menu_redraw_current(rd->index);
/* print out the index status bar */
- menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(StatusFormat));
+ menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(C_StatusFormat));
mutt_window_move(rd->index_status_window, 0, 0);
SETCOLOR(MT_COLOR_STATUS);
rd.banner = banner;
rd.flags = flags;
rd.extra = extra;
- rd.indexlen = PagerIndexLines;
+ rd.indexlen = C_PagerIndexLines;
rd.indicator = rd.indexlen / 3;
rd.helpstr = helpstr;
rd.searchbuf = searchbuf;
pager_custom_redraw(pager_menu);
- if (BrailleFriendly)
+ if (C_BrailleFriendly)
{
if (braille_line != -1)
{
if (mutt_mailbox_notify(Context ? Context->mailbox : NULL) || do_new_mail)
{
- if (BeepNew)
+ if (C_BeepNew)
beep();
- if (NewMailCommand)
+ if (C_NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), rd.index, NONULL(NewMailCommand));
+ menu_status_line(cmd, sizeof(cmd), rd.index, NONULL(C_NewMailCommand));
if (mutt_system(cmd) != 0)
mutt_error(_("Error running \"%s\""), cmd);
}
break;
case OP_QUIT:
- if (query_quadoption(Quit, _("Quit NeoMutt?")) == MUTT_YES)
+ if (query_quadoption(C_Quit, _("Quit NeoMutt?")) == MUTT_YES)
{
/* avoid prompting again in the index menu */
cs_str_native_set(Config, "quit", MUTT_YES, NULL);
case OP_NEXT_PAGE:
if (rd.line_info[rd.curline].offset < (rd.sb.st_size - 1))
{
- rd.topline = up_n_lines(PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
+ rd.topline = up_n_lines(C_PagerContext, rd.line_info, rd.curline, rd.hide_quoted);
}
- else if (PagerStop)
+ else if (C_PagerStop)
{
/* emulate "less -q" and don't go on to the next message. */
mutt_error(_("Bottom of message is shown"));
case OP_PREV_PAGE:
if (rd.topline != 0)
{
- rd.topline = up_n_lines(rd.pager_window->rows - PagerContext,
+ rd.topline = up_n_lines(rd.pager_window->rows - C_PagerContext,
rd.line_info, rd.topline, rd.hide_quoted);
}
else
rd.topline = up_n_lines(rd.pager_window->rows / 2, rd.line_info,
rd.curline, rd.hide_quoted);
}
- else if (PagerStop)
+ else if (C_PagerStop)
{
/* emulate "less -q" and don't go on to the next message. */
mutt_error(_("Bottom of message is shown"));
{
wrapped = false;
- if (SearchContext < rd.pager_window->rows)
- searchctx = SearchContext;
+ if (C_SearchContext < rd.pager_window->rows)
+ searchctx = C_SearchContext;
else
searchctx = 0;
if (i < rd.last_line)
rd.topline = i;
- else if (wrapped || !WrapSearch)
+ else if (wrapped || !C_WrapSearch)
mutt_error(_("Not found"));
else
{
if (i >= 0)
rd.topline = i;
- else if (wrapped || !WrapSearch)
+ else if (wrapped || !C_WrapSearch)
mutt_error(_("Not found"));
else
{
{
rd.search_flag = MUTT_SEARCH;
/* give some context for search results */
- if (SearchContext < rd.pager_window->rows)
- searchctx = SearchContext;
+ if (C_SearchContext < rd.pager_window->rows)
+ searchctx = C_SearchContext;
else
searchctx = 0;
if (rd.topline - searchctx > 0)
break;
}
- while (((new_topline + SkipQuotedOffset) < rd.last_line ||
+ while (((new_topline + C_SkipQuotedOffset) < rd.last_line ||
(0 == (dretval = display_line(
rd.fp, &rd.last_pos, &rd.line_info, new_topline, &rd.last_line,
&rd.max_line, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
&rd.quote_list, &rd.q_level, &rd.force_redraw,
&rd.search_re, rd.pager_window)))) &&
- rd.line_info[new_topline + SkipQuotedOffset].type != MT_COLOR_QUOTED)
+ rd.line_info[new_topline + C_SkipQuotedOffset].type != MT_COLOR_QUOTED)
{
new_topline++;
}
break;
}
- while (((new_topline + SkipQuotedOffset) < rd.last_line ||
+ while (((new_topline + C_SkipQuotedOffset) < rd.last_line ||
(0 == (dretval = display_line(
rd.fp, &rd.last_pos, &rd.line_info, new_topline, &rd.last_line,
&rd.max_line, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP),
&rd.quote_list, &rd.q_level, &rd.force_redraw,
&rd.search_re, rd.pager_window)))) &&
- rd.line_info[new_topline + SkipQuotedOffset].type == MT_COLOR_QUOTED)
+ rd.line_info[new_topline + C_SkipQuotedOffset].type == MT_COLOR_QUOTED)
{
new_topline++;
}
mutt_set_flag(Context->mailbox, extra->email, MUTT_DELETE, true);
mutt_set_flag(Context->mailbox, extra->email, MUTT_PURGE, (ch == OP_PURGE_MESSAGE));
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_set_flag(Context->mailbox, extra->email, MUTT_TAG, false);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
if (mutt_change_flag(Context->mailbox, &el, (ch == OP_MAIN_SET_FLAG)) == 0)
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (extra->email->deleted && Resolve)
+ if (extra->email->deleted && C_Resolve)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
break;
}
- if (DeleteUntag)
+ if (C_DeleteUntag)
mutt_thread_set_flag(extra->email, MUTT_TAG, 0, subthread);
- if (Resolve)
+ if (C_Resolve)
{
rc = OP_MAIN_NEXT_UNDELETED;
ch = -1;
}
- if (!Resolve && PagerIndexLines)
+ if (!C_Resolve && C_PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
break;
case OP_ENTER_COMMAND:
- old_PagerIndexLines = PagerIndexLines;
+ old_PagerIndexLines = C_PagerIndexLines;
mutt_enter_command();
pager_menu->redraw = REDRAW_FULL;
OptNeedResort = true;
}
- if (old_PagerIndexLines != PagerIndexLines)
+ if (old_PagerIndexLines != C_PagerIndexLines)
{
if (rd.index)
mutt_menu_destroy(&rd.index);
mutt_set_flag(Context->mailbox, extra->email, MUTT_FLAG, !extra->email->flagged);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
CHECK_MODE(IsEmail(extra) && !IsAttach(extra));
CHECK_ATTACH;
if (extra->ctx && extra->ctx->mailbox->magic == MUTT_NNTP &&
- !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
+ !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(C_PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
{
break;
}
CHECK_MODE(IsEmail(extra) || IsMsgAttach(extra));
CHECK_ATTACH;
if (extra->ctx && extra->ctx->mailbox->magic == MUTT_NNTP &&
- !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
+ !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(C_PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
{
break;
}
followup_to = extra->email->env->followup_to;
if (!followup_to || (mutt_str_strcasecmp(followup_to, "poster") != 0) ||
- query_quadoption(FollowupToPoster,
+ query_quadoption(C_FollowupToPoster,
_("Reply by mail as poster prefers?")) != MUTT_YES)
{
if (extra->ctx && (extra->ctx->mailbox->magic == MUTT_NNTP) &&
- !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
+ !((struct NntpMboxData *) extra->ctx->mailbox->mdata)->allowed && query_quadoption(C_PostModerated, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
{
break;
}
(ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY)) == 0) &&
((ch == OP_SAVE) || (ch == OP_DECODE_SAVE) || (ch == OP_DECRYPT_SAVE)))
{
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
}
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_NEXT_ENTRY;
first = false;
Context->msgnotreadyet = -1;
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_MAIN_NEXT_UNDELETED;
mutt_set_flag(Context->mailbox, extra->email, MUTT_DELETE, false);
mutt_set_flag(Context->mailbox, extra->email, MUTT_PURGE, false);
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
- if (Resolve)
+ if (C_Resolve)
{
ch = -1;
rc = OP_NEXT_ENTRY;
}
if (r != -1)
{
- if (Resolve)
+ if (C_Resolve)
{
rc = (ch == OP_DELETE_THREAD) ? OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
ch = -1;
}
- if (!Resolve && PagerIndexLines)
+ if (!C_Resolve && C_PagerIndexLines)
pager_menu->redraw = REDRAW_FULL;
else
pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
#include <stdio.h>
/* These Config Variables are only used in pager.c */
-extern bool AllowAnsi;
-extern bool HeaderColorPartial;
-extern short PagerContext;
-extern short PagerIndexLines;
-extern bool PagerStop;
-extern short SearchContext;
-extern short SkipQuotedOffset;
-extern bool SmartWrap;
-extern struct Regex *Smileys;
-extern bool Tilde;
+extern bool C_AllowAnsi;
+extern bool C_HeaderColorPartial;
+extern short C_PagerContext;
+extern short C_PagerIndexLines;
+extern bool C_PagerStop;
+extern short C_SearchContext;
+extern short C_SkipQuotedOffset;
+extern bool C_SmartWrap;
+extern struct Regex *C_Smileys;
+extern bool C_Tilde;
/* dynamic internal flags */
#define MUTT_SHOWFLAT (1 << 0) ///< Show characters (used for displaying help)
#endif
/* These Config Variables are only used in pattern.c */
-bool ThoroughSearch; ///< Config: Decode headers and messages before searching them
+bool C_ThoroughSearch; ///< Config: Decode headers and messages before searching them
// clang-format off
/* The regexes in a modern format */
struct Buffer tok_buf;
FILE *fp = NULL;
- if (!ExternalSearchCommand)
+ if (!C_ExternalSearchCommand)
{
mutt_buffer_printf(err, "%s", _("No search command defined"));
return false;
}
mutt_buffer_init(&cmd_buf);
- mutt_buffer_addstr(&cmd_buf, ExternalSearchCommand);
+ mutt_buffer_addstr(&cmd_buf, C_ExternalSearchCommand);
mutt_buffer_addch(&cmd_buf, ' ');
if (!Context || !Context->mailbox)
{
struct stat st;
#endif
- if (ThoroughSearch)
+ if (C_ThoroughSearch)
{
/* decode the header / body */
struct State s = { 0 };
mx_msg_close(m, &msg);
- if (ThoroughSearch)
+ if (C_ThoroughSearch)
{
mutt_file_fclose(&fp);
#ifdef USE_FMEMOPEN
mutt_message(_("Compiling search pattern..."));
simple = mutt_str_strdup(buf);
- mutt_check_simple(buf, sizeof(buf), NONULL(SimpleSearch));
+ mutt_check_simple(buf, sizeof(buf), NONULL(C_SimpleSearch));
mutt_buffer_init(&err);
err.dsize = STRING;
#endif
mutt_progress_init(&progress, _("Executing command on matching messages..."),
- MUTT_PROGRESS_MSG, ReadInc,
+ MUTT_PROGRESS_MSG, C_ReadInc,
(op == MUTT_LIMIT) ? Context->mailbox->msg_count :
Context->mailbox->vcount);
$simple_search has changed while we were searching */
char temp[LONG_STRING];
mutt_str_strfcpy(temp, buf, sizeof(temp));
- mutt_check_simple(temp, sizeof(temp), NONULL(SimpleSearch));
+ mutt_check_simple(temp, sizeof(temp), NONULL(C_SimpleSearch));
if (!SearchPattern || (mutt_str_strcmp(temp, LastSearchExpn) != 0))
{
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
- mutt_progress_init(&progress, _("Searching..."), MUTT_PROGRESS_MSG, ReadInc,
+ mutt_progress_init(&progress, _("Searching..."), MUTT_PROGRESS_MSG, C_ReadInc,
Context->mailbox->vcount);
for (int i = cur + incr, j = 0; j != Context->mailbox->vcount; j++)
if (i > Context->mailbox->vcount - 1)
{
i = 0;
- if (WrapSearch)
+ if (C_WrapSearch)
msg = _("Search wrapped to top");
else
{
else if (i < 0)
{
i = Context->mailbox->vcount - 1;
- if (WrapSearch)
+ if (C_WrapSearch)
msg = _("Search wrapped to bottom");
else
{
struct Mailbox;
/* These Config Variables are only used in pattern.c */
-extern bool ThoroughSearch;
+extern bool C_ThoroughSearch;
/* flag to mutt_pattern_comp() */
#define MUTT_FULL_MSG (1 << 0) /* enable body and header matching */
struct BodyCache;
/* These Config Variables are only used in pop/pop.c */
-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
+short C_PopCheckinterval; ///< Config: (pop) Interval between checks for new mail
+unsigned char C_PopDelete; ///< Config: (pop) After downloading POP messages, delete them on the server
+char *C_PopHost; ///< Config: (pop) Url of the POP server
+bool C_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 */
static header_cache_t *pop_hcache_open(struct PopAccountData *adata, const char *path)
{
if (!adata || !adata->conn)
- return mutt_hcache_open(HeaderCache, path, NULL);
+ return mutt_hcache_open(C_HeaderCache, path, NULL);
struct Url url;
char p[LONG_STRING];
mutt_account_tourl(&adata->conn->account, &url);
url.path = HC_FNAME;
url_tostring(&url, p, sizeof(p), U_PATH);
- return mutt_hcache_open(HeaderCache, p, pop_hcache_namer);
+ return mutt_hcache_open(C_HeaderCache, p, pop_hcache_namer);
}
#endif
if (!m->quiet)
{
mutt_progress_init(&progress, _("Fetching message headers..."),
- MUTT_PROGRESS_MSG, ReadInc, new_count - old_count);
+ MUTT_PROGRESS_MSG, C_ReadInc, new_count - old_count);
}
if (ret == 0)
{
if (bcached)
m->emails[i]->read = true;
- else if (MarkOld)
+ else if (C_MarkOld)
m->emails[i]->old = true;
}
else
* clean up cache, i.e. wipe messages deleted outside
* the availability of our cache
*/
- if (MessageCacheClean)
+ if (C_MessageCacheClean)
mutt_bcache_list(adata->bcache, msg_cache_check, m);
mutt_clear_error();
*/
void pop_fetch_mail(void)
{
- if (!PopHost)
+ if (!C_PopHost)
{
mutt_error(_("POP host is not defined"));
return;
int delanswer, last = 0, msgs, bytes, rset = 0, ret;
struct ConnAccount acct;
- char *p = mutt_mem_calloc(strlen(PopHost) + 7, sizeof(char));
+ char *p = mutt_mem_calloc(strlen(C_PopHost) + 7, sizeof(char));
char *url = p;
- if (url_check_scheme(PopHost) == U_UNKNOWN)
+ if (url_check_scheme(C_PopHost) == U_UNKNOWN)
{
strcpy(url, "pop://");
p = strchr(url, '\0');
}
- strcpy(p, PopHost);
+ strcpy(p, C_PopHost);
ret = pop_parse_path(url, &acct);
FREE(&url);
if (ret)
{
- mutt_error(_("%s is an invalid POP path"), PopHost);
+ mutt_error(_("%s is an invalid POP path"), C_PopHost);
return;
}
sscanf(buffer, "+OK %d %d", &msgs, &bytes);
/* only get unread messages */
- if (msgs > 0 && PopLast)
+ if (msgs > 0 && C_PopLast)
{
mutt_str_strfcpy(buffer, "LAST\r\n", sizeof(buffer));
ret = pop_query(adata, buffer, sizeof(buffer));
goto finish;
}
- struct Mailbox *m_spool = mx_path_resolve(Spoolfile);
+ struct Mailbox *m_spool = mx_path_resolve(C_Spoolfile);
struct Context *ctx = mx_mbox_open(m_spool, MUTT_APPEND);
if (!ctx)
{
goto finish;
}
- delanswer = query_quadoption(PopDelete, _("Delete messages from server?"));
+ delanswer = query_quadoption(C_PopDelete, _("Delete messages from server?"));
snprintf(msgbuf, sizeof(msgbuf),
ngettext("Reading new messages (%d byte)...",
struct PopAccountData *adata = pop_adata_get(m);
- if ((adata->check_time + PopCheckinterval) > time(NULL))
+ if ((adata->check_time + C_PopCheckinterval) > time(NULL))
return 0;
pop_logout(m);
return -1;
mutt_progress_init(&progress, _("Marking messages deleted..."),
- MUTT_PROGRESS_MSG, WriteInc, num_deleted);
+ MUTT_PROGRESS_MSG, C_WriteInc, num_deleted);
#ifdef USE_HCACHE
hc = pop_hcache_open(adata, m->path);
}
mutt_progress_init(&progressbar, _("Fetching message..."), MUTT_PROGRESS_SIZE,
- NetInc, e->content->length + e->content->offset - 1);
+ C_NetInc, e->content->length + e->content->offset - 1);
/* see if we can put in body cache; use our cache as fallback */
msg->fp = mutt_bcache_put(adata->bcache, cache_id(edata->uid));
*/
/* These Config Variables are only used in pop/pop.c */
-extern short PopCheckinterval;
-extern unsigned char PopDelete;
-extern char * PopHost;
-extern bool PopLast;
+extern short C_PopCheckinterval;
+extern unsigned char C_PopDelete;
+extern char * C_PopHost;
+extern bool C_PopLast;
/* These Config Variables are only used in pop/pop_auth.c */
-extern char *PopAuthenticators;
-extern bool PopAuthTryAll;
+extern char *C_PopAuthenticators;
+extern bool C_PopAuthTryAll;
/* These Config Variables are only used in pop/pop_lib.c */
-extern unsigned char PopReconnect;
+extern unsigned char C_PopReconnect;
extern struct MxOps MxPopOps;
#endif
/* These Config Variables are only used in pop/pop_auth.c */
-char *PopAuthenticators; ///< Config: (pop) List of allowed authentication methods
-bool PopAuthTryAll; ///< Config: (pop) Try all available authentication methods
+char *C_PopAuthenticators; ///< Config: (pop) List of allowed authentication methods
+bool C_PopAuthTryAll; ///< Config: (pop) Try all available authentication methods
#ifdef USE_SASL
/**
snprintf(buf, sizeof(buf), "PASS %s\r\n", adata->conn->account.pass);
ret = pop_query_d(adata, buf, sizeof(buf),
/* don't print the password unless we're at the ungodly debugging level */
- DebugLevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" : NULL);
+ C_DebugLevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" : NULL);
}
switch (ret)
snprintf(auth_cmd, auth_cmd_len, "AUTH OAUTHBEARER %s\r\n", oauthbearer);
FREE(&oauthbearer);
- int ret =
- pop_query_d(adata, auth_cmd, strlen(auth_cmd),
+ int ret = pop_query_d(adata, auth_cmd, strlen(auth_cmd),
#ifdef DEBUG
- /* don't print the bearer token unless we're at the ungodly debugging level */
- (DebugLevel < MUTT_SOCK_LOG_FULL) ? "AUTH OAUTHBEARER *\r\n" :
+ /* don't print the bearer token unless we're at the ungodly debugging level */
+ (C_DebugLevel < MUTT_SOCK_LOG_FULL) ?
+ "AUTH OAUTHBEARER *\r\n" :
#endif
- NULL);
+ NULL);
FREE(&auth_cmd);
switch (ret)
return -3;
}
- if (PopAuthenticators && *PopAuthenticators)
+ if (C_PopAuthenticators && *C_PopAuthenticators)
{
/* Try user-specified list of authentication methods */
- methods = mutt_str_strdup(PopAuthenticators);
+ methods = mutt_str_strdup(C_PopAuthenticators);
method = methods;
while (method)
if (ret != POP_A_UNAVAIL)
attempts++;
if ((ret == POP_A_SUCCESS) || (ret == POP_A_SOCKET) ||
- ((ret == POP_A_FAILURE) && !PopAuthTryAll))
+ ((ret == POP_A_FAILURE) && !C_PopAuthTryAll))
{
comma = NULL;
break;
if (ret != POP_A_UNAVAIL)
attempts++;
if ((ret == POP_A_SUCCESS) || (ret == POP_A_SOCKET) ||
- ((ret == POP_A_FAILURE) && !PopAuthTryAll))
+ ((ret == POP_A_FAILURE) && !C_PopAuthTryAll))
{
break;
}
#include "progress.h"
/* These Config Variables are only used in pop/pop_lib.c */
-unsigned char PopReconnect; ///< Config: (pop) Reconnect to the server is the connection is lost
+unsigned char C_PopReconnect; ///< Config: (pop) Reconnect to the server is the connection is lost
/**
* pop_parse_path - Parse a POP mailbox name
#ifdef USE_SSL
/* Attempt STLS if available and desired. */
- if (!adata->conn->ssf && (adata->cmd_stls || SslForceTls))
+ if (!adata->conn->ssf && (adata->cmd_stls || C_SslForceTls))
{
- if (SslForceTls)
+ if (C_SslForceTls)
adata->use_stls = 2;
if (adata->use_stls == 0)
{
- rc = query_quadoption(SslStarttls, _("Secure connection with TLS?"));
+ rc = query_quadoption(C_SslStarttls, _("Secure connection with TLS?"));
if (rc == MUTT_ABORT)
return -2;
adata->use_stls = 1;
}
}
- if (SslForceTls && !adata->conn->ssf)
+ if (C_SslForceTls && !adata->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
return -2;
{
struct Progress progressbar;
mutt_progress_init(&progressbar, _("Verifying message indexes..."),
- MUTT_PROGRESS_SIZE, NetInc, 0);
+ MUTT_PROGRESS_SIZE, C_NetInc, 0);
for (int i = 0; i < m->msg_count; i++)
m->emails[i]->refno = -1;
if (ret < -1)
return -1;
- if (query_quadoption(PopReconnect,
+ if (query_quadoption(C_PopReconnect,
_("Connection lost. Reconnect to POP server?")) != MUTT_YES)
{
return -1;
force = true;
}
- if (mutt_str_strcmp(Postponed, OldPostponed) != 0)
+ if (mutt_str_strcmp(C_Postponed, OldPostponed) != 0)
{
FREE(&OldPostponed);
- OldPostponed = mutt_str_strdup(Postponed);
+ OldPostponed = mutt_str_strdup(C_Postponed);
LastModify = 0;
force = true;
}
- if (!Postponed)
+ if (!C_Postponed)
return 0;
- // We currently are in the Postponed mailbox so just pick the current status
- if (m && mutt_str_strcmp(Postponed, m->realpath) == 0)
+ // We currently are in the C_Postponed mailbox so just pick the current status
+ if (m && mutt_str_strcmp(C_Postponed, m->realpath) == 0)
{
PostCount = m->msg_count - m->msg_deleted;
return PostCount;
#ifdef USE_IMAP
/* LastModify is useless for IMAP */
- if (imap_path_probe(Postponed, NULL) == MUTT_IMAP)
+ if (imap_path_probe(C_Postponed, NULL) == MUTT_IMAP)
{
if (force)
{
short newpc;
- newpc = imap_path_status(Postponed, false);
+ newpc = imap_path_status(C_Postponed, false);
if (newpc >= 0)
{
PostCount = newpc;
}
#endif
- if (stat(Postponed, &st) == -1)
+ if (stat(C_Postponed, &st) == -1)
{
PostCount = 0;
LastModify = 0;
char buf[PATH_MAX];
- snprintf(buf, sizeof(buf), "%s/new", Postponed);
+ snprintf(buf, sizeof(buf), "%s/new", C_Postponed);
if (access(buf, F_OK) == 0 && stat(buf, &st) == -1)
{
PostCount = 0;
#endif
LastModify = st.st_mtime;
- if (access(Postponed, R_OK | F_OK) != 0)
+ if (access(C_Postponed, R_OK | F_OK) != 0)
return PostCount = 0;
#ifdef USE_NNTP
if (optnews)
OptNews = false;
#endif
- struct Mailbox *m_post = mx_path_resolve(Postponed);
+ struct Mailbox *m_post = mx_path_resolve(C_Postponed);
struct Context *ctx = mx_mbox_open(m_post, MUTT_NOSORT | MUTT_QUIET);
if (!ctx)
{
{
struct Context *ctx = menu->data;
- mutt_make_string_flags(buf, buflen, NONULL(IndexFormat), ctx, ctx->mailbox,
+ mutt_make_string_flags(buf, buflen, NONULL(C_IndexFormat), ctx, ctx->mailbox,
ctx->mailbox->emails[line], MUTT_FORMAT_ARROWCURSOR);
}
mutt_menu_push_current(menu);
/* The postponed mailbox is setup to have sorting disabled, but the global
- * Sort variable may indicate something different. Sorting has to be
+ * C_Sort variable may indicate something different. Sorting has to be
* disabled while the postpone menu is being displayed. */
- const short orig_sort = Sort;
- Sort = SORT_ORDER;
+ const short orig_sort = C_Sort;
+ C_Sort = SORT_ORDER;
while (!done)
{
mutt_set_flag(ctx->mailbox, ctx->mailbox->emails[menu->current],
MUTT_DELETE, (i == OP_DELETE));
PostCount = ctx->mailbox->msg_count - ctx->mailbox->msg_deleted;
- if (Resolve && menu->current < menu->max - 1)
+ if (C_Resolve && menu->current < menu->max - 1)
{
menu->oldcurrent = menu->current;
menu->current++;
}
}
- Sort = orig_sort;
+ C_Sort = orig_sort;
mutt_menu_pop_current(menu);
mutt_menu_destroy(&menu);
return (r > -1) ? ctx->mailbox->emails[r] : NULL;
int mutt_get_postponed(struct Context *ctx, struct Email *hdr,
struct Email **cur, char *fcc, size_t fcclen)
{
- if (!Postponed)
+ if (!C_Postponed)
return -1;
struct Email *e = NULL;
const char *p = NULL;
struct Context *ctx_post = NULL;
- struct Mailbox *m = mx_path_resolve(Postponed);
+ struct Mailbox *m = mx_path_resolve(C_Postponed);
if (ctx->mailbox == m)
ctx_post = ctx;
else
PostCount = ctx_post->mailbox->msg_count - ctx_post->mailbox->msg_deleted;
/* avoid the "purge deleted messages" prompt */
- int opt_delete = Delete;
- Delete = MUTT_YES;
+ int opt_delete = C_Delete;
+ C_Delete = MUTT_YES;
if (ctx_post == ctx)
ctx_post = NULL;
else
mx_mbox_close(&ctx_post);
- Delete = opt_delete;
+ C_Delete = opt_delete;
struct ListNode *np, *tmp;
STAILQ_FOREACH_SAFE(np, &hdr->env->userhdrs, entries, tmp)
FREE(&np);
}
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
crypt_opportunistic_encrypt(hdr);
return rc;
/* the cryptalg field must not be empty */
if (((WithCrypto & APPLICATION_SMIME) != 0) && *smime_cryptalg)
- mutt_str_replace(&SmimeEncryptWith, smime_cryptalg);
+ mutt_str_replace(&C_SmimeEncryptWith, smime_cryptalg);
/* Set {Smime,Pgp}SignAs, if desired. */
if (((WithCrypto & APPLICATION_PGP) != 0) && (crypt_app == APPLICATION_PGP) &&
(flags & SEC_SIGN) && (set_empty_signas || *sign_as))
{
- mutt_str_replace(&PgpSignAs, sign_as);
+ mutt_str_replace(&C_PgpSignAs, sign_as);
}
if (((WithCrypto & APPLICATION_SMIME) != 0) && (crypt_app == APPLICATION_SMIME) &&
(flags & SEC_SIGN) && (set_empty_signas || *sign_as))
{
- mutt_str_replace(&SmimeSignAs, sign_as);
+ mutt_str_replace(&C_SmimeSignAs, sign_as);
}
return flags;
b->email->content = NULL; /* avoid dangling pointer */
}
- if (CryptProtectedHeadersRead && protected_headers && protected_headers->subject &&
+ if (C_CryptProtectedHeadersRead && protected_headers && protected_headers->subject &&
(mutt_str_strcmp(newhdr->env->subject, protected_headers->subject) != 0))
{
mutt_str_replace(&newhdr->env->subject, protected_headers->subject);
/* Theoretically, both could be set. Take the one the user wants to set by default. */
if ((newhdr->security & APPLICATION_PGP) && (newhdr->security & APPLICATION_SMIME))
{
- if (SmimeIsDefault)
+ if (C_SmimeIsDefault)
newhdr->security &= ~APPLICATION_PGP;
else
newhdr->security &= ~APPLICATION_SMIME;
#include "options.h"
/* These Config Variables are only used in progress.c */
-short TimeInc; ///< Config: Frequency of progress bar updates (milliseconds)
+short C_TimeInc; ///< Config: Frequency of progress bar updates (milliseconds)
/**
* message_bar - Draw a colourful progress bar
if (gettimeofday(&tv, NULL) < 0)
mutt_debug(LL_DEBUG1, "gettimeofday failed: %d\n", errno);
/* if timestamp is 0 no time-based suppression is done */
- if (TimeInc != 0)
+ if (C_TimeInc != 0)
{
progress->timestamp =
((unsigned int) tv.tv_sec * 1000) + (unsigned int) (tv.tv_usec / 1000);
if (update && progress->timestamp && (gettimeofday(&tv, NULL) == 0))
{
now = ((unsigned int) tv.tv_sec * 1000) + (unsigned int) (tv.tv_usec / 1000);
- if (now && ((now - progress->timestamp) < TimeInc))
+ if (now && ((now - progress->timestamp) < C_TimeInc))
update = false;
}
#include "mutt/mutt.h"
/* These Config Variables are only used in progress.c */
-extern short TimeInc;
+extern short C_TimeInc;
#define MUTT_PROGRESS_SIZE (1 << 0) /**< traffic-based progress */
#define MUTT_PROGRESS_MSG (1 << 1) /**< message-based progress */
#include "send.h"
/* These Config Variables are only used in query.c */
-char *QueryCommand; ///< Config: External command to query and external address book
-char *QueryFormat; ///< Config: printf-like format string for the query menu (address book)
+char *C_QueryCommand; ///< Config: External command to query and external address book
+char *C_QueryFormat; ///< Config: printf-like format string for the query menu (address book)
/**
* struct Query - An entry from an external address-book
char *p = NULL;
pid_t thepid;
- mutt_file_expand_fmt_quote(cmd, sizeof(cmd), QueryCommand, s);
+ mutt_file_expand_fmt_quote(cmd, sizeof(cmd), C_QueryCommand, s);
thepid = mutt_create_filter(cmd, NULL, &fp, NULL);
if (thepid < 0)
struct Entry *entry = &((struct Entry *) menu->data)[line];
entry->data->num = line;
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(QueryFormat),
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(C_QueryFormat),
query_format_str, (unsigned long) entry, MUTT_FORMAT_ARROWCURSOR);
}
struct Query *results = NULL;
struct Address *tmpa = NULL;
- if (!QueryCommand)
+ if (!C_QueryCommand)
{
mutt_error(_("Query command not defined"));
return 0;
*/
void mutt_query_menu(char *buf, size_t buflen)
{
- if (!QueryCommand)
+ if (!C_QueryCommand)
{
mutt_error(_("Query command not defined"));
return;
#include <stdio.h>
/* These Config Variables are only used in query.c */
-extern char *QueryCommand;
-extern char *QueryFormat;
+extern char *C_QueryCommand;
+extern char *C_QueryFormat;
int mutt_query_complete(char *buf, size_t buflen);
void mutt_query_menu(char *buf, size_t buflen);
#endif
/* These Config Variables are only used in recvattach.c */
-char *AttachSaveDir; ///< Config: Default directory where attachments are saved
-char *AttachSep; ///< Config: Separator to add between saved/printed/piped attachments
-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
+char *C_AttachSaveDir; ///< Config: Default directory where attachments are saved
+char *C_AttachSep; ///< Config: Separator to add between saved/printed/piped attachments
+bool C_AttachSplit; ///< Config: Save/print/pipe tagged messages individually
+bool C_DigestCollapse; ///< Config: Hide the subparts of a multipart/digest
+char *C_MessageFormat; ///< Config: printf-like format string for listing attached messages
static void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init);
break;
}
if (mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
- MessageFormat && aptr->content->email)
+ C_MessageFormat && aptr->content->email)
{
char s[SHORT_STRING];
- mutt_make_string_flags(s, sizeof(s), MessageFormat, NULL, NULL,
+ mutt_make_string_flags(s, sizeof(s), C_MessageFormat, NULL, NULL,
aptr->content->email,
MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_ARROWCURSOR);
if (*s)
}
else if (aptr->content->description ||
(mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
- MessageFormat && aptr->content->email))
+ C_MessageFormat && aptr->content->email))
{
break;
}
{
struct AttachCtx *actx = menu->data;
- mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AttachFormat),
+ mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(C_AttachFormat),
attach_format_str, (unsigned long) (actx->idx[actx->v2r[line]]),
MUTT_FORMAT_ARROWCURSOR);
}
}
/**
- * prepend_savedir - Add AttachSaveDir to the beginning of a path
+ * prepend_savedir - Add #C_AttachSaveDir to the beginning of a path
* @param buf Buffer for the result, must be valid
* @param bufsize Size of the buffer
*/
static void prepend_savedir(char *buf, size_t bufsize)
{
- const char *savedir = AttachSaveDir;
+ const char *savedir = C_AttachSaveDir;
if (!savedir || !*savedir)
savedir = "./";
}
if (!tag || top->tagged)
{
- if (!AttachSplit)
+ if (!C_AttachSplit)
{
if (!buf[0])
{
if (mutt_check_overwrite(top->filename, buf, tfile, sizeof(tfile), &append, NULL))
return;
rc = mutt_save_attachment(fp, top, tfile, append, e);
- if ((rc == 0) && AttachSep && (fpout = fopen(tfile, "a")))
+ if ((rc == 0) && C_AttachSep && (fpout = fopen(tfile, "a")))
{
- fprintf(fpout, "%s", AttachSep);
+ fprintf(fpout, "%s", C_AttachSep);
mutt_file_fclose(&fpout);
}
}
else
{
rc = mutt_save_attachment(fp, top, tfile, MUTT_SAVE_APPEND, e);
- if ((rc == 0) && AttachSep && (fpout = fopen(tfile, "a")))
+ if ((rc == 0) && C_AttachSep && (fpout = fopen(tfile, "a")))
{
- fprintf(fpout, "%s", AttachSep);
+ fprintf(fpout, "%s", C_AttachSep);
mutt_file_fclose(&fpout);
}
}
menu->redraw |= REDRAW_MOTION;
}
- if (!AttachSplit && (rc == 0))
+ if (!C_AttachSplit && (rc == 0))
mutt_message(_("Attachment saved"));
}
{
state->fp_in = fp;
mutt_decode_attachment(b, state);
- if (AttachSep)
- state_puts(AttachSep, state);
+ if (C_AttachSep)
+ state_puts(C_AttachSep, state);
}
else
{
}
mutt_file_copy_stream(ifp, state->fp_out);
mutt_file_fclose(&ifp);
- if (AttachSep)
- state_puts(AttachSep, state);
+ if (C_AttachSep)
+ state_puts(C_AttachSep, state);
}
}
}
if (!tag || top->tagged)
{
- if (!filter && !AttachSplit)
+ if (!filter && !C_AttachSplit)
pipe_attachment(fp, top, state);
else
query_pipe_attachment(command, fp, top, filter);
mutt_expand_path(buf, sizeof(buf));
- if (!filter && !AttachSplit)
+ if (!filter && !C_AttachSplit)
{
mutt_endwin();
pid_t thepid = mutt_create_filter(buf, &state.fp_out, NULL, NULL);
pipe_attachment_list(buf, actx, fp, tag, top, filter, &state);
mutt_file_fclose(&state.fp_out);
- if (mutt_wait_filter(thepid) != 0 || WaitKey)
+ if (mutt_wait_filter(thepid) != 0 || C_WaitKey)
mutt_any_key_to_continue(NULL);
}
else
if (!tag || top->tagged)
{
snprintf(type, sizeof(type), "%s/%s", TYPE(top), top->subtype);
- if (!AttachSplit && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
+ if (!C_AttachSplit && !rfc1524_mailcap_lookup(top, type, NULL, MUTT_PRINT))
{
if ((mutt_str_strcasecmp("text/plain", top->subtype) == 0) ||
(mutt_str_strcasecmp("application/postscript", top->subtype) == 0))
{
mutt_file_copy_stream(ifp, state->fp_out);
mutt_file_fclose(&ifp);
- if (AttachSep)
- state_puts(AttachSep, state);
+ if (C_AttachSep)
+ state_puts(C_AttachSep, state);
}
}
mutt_file_unlink(newfile);
tag ? ngettext("Print tagged attachment?", "Print %d tagged attachments?", tagmsgcount) :
_("Print attachment?"),
tagmsgcount);
- if (query_quadoption(Print, prompt) != MUTT_YES)
+ if (query_quadoption(C_Print, prompt) != MUTT_YES)
return;
- if (!AttachSplit)
+ if (!C_AttachSplit)
{
if (!can_print(actx, top, tag))
return;
mutt_endwin();
- pid_t thepid = mutt_create_filter(NONULL(PrintCommand), &state.fp_out, NULL, NULL);
+ pid_t thepid = mutt_create_filter(NONULL(C_PrintCommand), &state.fp_out, NULL, NULL);
print_attachment_list(actx, fp, tag, top, &state);
mutt_file_fclose(&state.fp_out);
- if (mutt_wait_filter(thepid) != 0 || WaitKey)
+ if (mutt_wait_filter(thepid) != 0 || C_WaitKey)
mutt_any_key_to_continue(NULL);
}
else
/* OR an inner container is of type 'multipart/digest' */
actx->idx[i]->content->collapsed =
- (DigestCollapse &&
+ (C_DigestCollapse &&
(digest ||
((actx->idx[i]->content->type == TYPE_MULTIPART) &&
(mutt_str_strcasecmp(actx->idx[i]->content->subtype, "digest") == 0))));
while ((rindex < actx->idxlen) && (actx->idx[rindex]->level > curlevel))
{
- if (DigestCollapse && actx->idx[rindex]->content->type == TYPE_MULTIPART &&
+ if (C_DigestCollapse && actx->idx[rindex]->content->type == TYPE_MULTIPART &&
!mutt_str_strcasecmp(actx->idx[rindex]->content->subtype, "digest"))
{
actx->idx[rindex]->content->collapsed = true;
mutt_save_attachment_list(actx, CURATTACH->fp, menu->tagprefix,
CURATTACH->content, e, menu);
- if (!menu->tagprefix && Resolve && menu->current < menu->max - 1)
+ if (!menu->tagprefix && C_Resolve && menu->current < menu->max - 1)
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH | REDRAW_FULL;
if (CURATTACH->parent_type == TYPE_MULTIPART)
{
CURATTACH->content->deleted = true;
- if (Resolve && menu->current < menu->max - 1)
+ if (C_Resolve && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
if (!menu->tagprefix)
{
CURATTACH->content->deleted = false;
- if (Resolve && menu->current < menu->max - 1)
+ if (C_Resolve && menu->current < menu->max - 1)
{
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
if (!CURATTACH->content->email->env->followup_to ||
(mutt_str_strcasecmp(CURATTACH->content->email->env->followup_to, "poster") != 0) ||
- (query_quadoption(FollowupToPoster,
+ (query_quadoption(C_FollowupToPoster,
_("Reply by mail as poster prefers?")) != MUTT_YES))
{
mutt_attach_reply(CURATTACH->fp, e, actx,
struct Email;
/* These Config Variables are only used in recvattach.c */
-extern char *AttachSaveDir;
-extern char *AttachSep;
-extern bool AttachSplit;
-extern bool DigestCollapse;
-extern char *MessageFormat;
+extern char *C_AttachSaveDir;
+extern char *C_AttachSep;
+extern bool C_AttachSplit;
+extern bool C_DigestCollapse;
+extern char *C_MessageFormat;
void mutt_attach_init(struct AttachCtx *actx);
void mutt_update_tree(struct AttachCtx *actx);
#endif
/* These Config Variables are only used in recvcmd.c */
-unsigned char MimeForwardRest; ///< Config: Forward all attachments, even if they can't be decoded
+unsigned char C_MimeForwardRest; ///< Config: Forward all attachments, even if they can't be decoded
/**
* check_msg - Are we working with an RFC822 message
else
mutt_str_strcat(prompt, sizeof(prompt), "?");
- if (query_quadoption(Bounce, prompt) != MUTT_YES)
+ if (query_quadoption(C_Bounce, prompt) != MUTT_YES)
{
mutt_addr_free(&addr);
mutt_window_clearline(MuttMessageWindow, 0);
int chflags = CH_DECODE;
char prefix2[SHORT_STRING];
- if (Weed)
+ if (C_Weed)
chflags |= CH_WEED | CH_REORDER;
if (quote)
{
if (prefix)
mutt_str_strfcpy(prefix2, prefix, sizeof(prefix2));
- else if (!TextFlowed)
+ else if (!C_TextFlowed)
{
- mutt_make_string(prefix2, sizeof(prefix2), NONULL(IndentString), Context,
- Context->mailbox, e);
+ mutt_make_string(prefix2, sizeof(prefix2), NONULL(C_IndentString),
+ Context, Context->mailbox, e);
}
else
mutt_str_strfcpy(prefix2, ">", sizeof(prefix2));
/* prepare the prefix here since we'll need it later. */
- if (ForwardQuote)
+ if (C_ForwardQuote)
{
- if (!TextFlowed)
+ if (!C_TextFlowed)
{
- mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
+ mutt_make_string(prefix, sizeof(prefix), NONULL(C_IndentString), Context,
Context->mailbox, e_parent);
}
else
mutt_str_strfcpy(prefix, ">", sizeof(prefix));
}
- include_header(ForwardQuote, parent_fp, e_parent, tmpfp, prefix);
+ include_header(C_ForwardQuote, parent_fp, e_parent, tmpfp, prefix);
/* Now, we have prepared the first part of the message body: The
* original message's header.
* or attach them.
*/
if ((!cur || mutt_can_decode(cur)) &&
- (rc = query_quadoption(MimeForward, _("Forward as attachments?"))) == MUTT_YES)
+ (rc = query_quadoption(C_MimeForward, _("Forward as attachments?"))) == MUTT_YES)
{
mime_fwd_all = true;
}
if (!mime_fwd_all && !cur && (nattach > 1) && !check_can_decode(actx, cur))
{
rc = query_quadoption(
- MimeForwardRest,
+ C_MimeForwardRest,
_("Can't decode all tagged attachments. MIME-forward the others?"));
if (rc == MUTT_ABORT)
goto bail;
/* initialize a state structure */
struct State st = { 0 };
- if (ForwardQuote)
+ if (C_ForwardQuote)
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (Weed)
+ if (C_Weed)
st.flags |= MUTT_WEED;
st.fp_out = tmpfp;
tmpbody[0] = '\0';
- rc = query_quadoption(MimeForward, _("Forward MIME encapsulated?"));
+ rc = query_quadoption(C_MimeForward, _("Forward MIME encapsulated?"));
if (rc == MUTT_NO)
{
/* no MIME encapsulation */
}
int cmflags = 0;
- if (ForwardQuote)
+ if (C_ForwardQuote)
{
chflags |= CH_PREFIX;
cmflags |= MUTT_CM_PREFIX;
}
- if (ForwardDecode)
+ if (C_ForwardDecode)
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (Weed)
+ if (C_Weed)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
mutt_make_attribution(Context->mailbox, cur, tmpfp);
- if (!Header)
+ if (!C_Header)
cmflags |= MUTT_CM_NOHEADER;
- if (Weed)
+ if (C_Weed)
{
chflags |= CH_WEED;
cmflags |= MUTT_CM_WEED;
if (nattach > 1 && !check_can_decode(actx, cur))
{
- const int rc = query_quadoption(MimeForwardRest,
+ const int rc = query_quadoption(C_MimeForwardRest,
_("Can't decode all tagged attachments. "
"MIME-encapsulate the others?"));
if (rc == MUTT_ABORT)
memset(&st, 0, sizeof(struct State));
st.fp_out = tmpfp;
- if (!TextFlowed)
+ if (!C_TextFlowed)
{
- mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
+ mutt_make_string(prefix, sizeof(prefix), NONULL(C_IndentString), Context,
Context->mailbox, e_parent);
}
else
st.prefix = prefix;
st.flags = MUTT_CHARCONV;
- if (Weed)
+ if (C_Weed)
st.flags |= MUTT_WEED;
- if (Header)
+ if (C_Header)
include_header(true, parent_fp, e_parent, tmpfp, prefix);
if (cur)
struct Email;
/* These Config Variables are only used in recvcmd.c */
-extern unsigned char MimeForwardRest;
+extern unsigned char C_MimeForwardRest;
void mutt_attach_bounce(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *cur);
void mutt_attach_resend(FILE *fp, struct AttachCtx *actx, struct Body *cur);
#endif
/* These Config Variables are only used in remailer.c */
-char *MixEntryFormat; ///< Config: (mixmaster) printf-like format string for the mixmaster chain
-char *Mixmaster; ///< Config: (mixmaster) External command to route a mixmaster message
+char *C_MixEntryFormat; ///< Config: (mixmaster) printf-like format string for the mixmaster chain
+char *C_Mixmaster; ///< Config: (mixmaster) External command to route a mixmaster message
#define MIX_CAP_COMPRESS (1 << 0)
#define MIX_CAP_MIDDLEMAN (1 << 1)
if (devnull == -1)
return NULL;
- snprintf(cmd, sizeof(cmd), "%s -T", Mixmaster);
+ snprintf(cmd, sizeof(cmd), "%s -T", C_Mixmaster);
mm_pid = mutt_create_filter_fd(cmd, NULL, &fp, NULL, devnull, -1, devnull);
if (mm_pid == -1)
{
struct Remailer **type2_list = menu->data;
mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols,
- NONULL(MixEntryFormat), mix_format_str,
+ NONULL(C_MixEntryFormat), mix_format_str,
(unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
}
int i = 0;
struct Buffer *cmd = mutt_buffer_pool_get();
- mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, Mixmaster);
+ mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, C_Mixmaster);
struct ListNode *np = NULL;
STAILQ_FOREACH(np, chain, entries)
struct Email;
/* These Config Variables are only used in remailer.c */
-extern char *MixEntryFormat;
-extern char *Mixmaster;
+extern char *C_MixEntryFormat;
+extern char *C_Mixmaster;
/* Mixmaster's maximum chain length. Don't change this. */
#include "protos.h"
/* These Config Variables are only used in rfc1524.c */
-bool MailcapSanitize; ///< Config: Restrict the possible characters in mailcap expandos
+bool C_MailcapSanitize; ///< Config: Restrict the possible characters in mailcap expandos
/**
* rfc1524_expand_command - Expand expandos in a command
mutt_str_strfcpy(type2, type, sizeof(type2));
- if (MailcapSanitize)
+ if (C_MailcapSanitize)
mutt_file_sanitize_filename(type2, false);
while (x < clen - 1 && command[x] && y < sizeof(buf) - 1)
pvalue2 = mutt_param_get(&a->parameter, param);
mutt_str_strfcpy(pvalue, pvalue2, sizeof(pvalue));
- if (MailcapSanitize)
+ if (C_MailcapSanitize)
mutt_file_sanitize_filename(pvalue, false);
y += mutt_file_quote_filename(pvalue, buf + y, sizeof(buf) - y);
{
char path[PATH_MAX];
int found = false;
- char *curr = MailcapPath;
+ char *curr = C_MailcapPath;
/* rfc1524 specifies that a path of mailcap files should be searched.
* joy. They say
struct Body;
/* These Config Variables are only used in rfc1524.c */
-extern bool MailcapSanitize;
+extern bool C_MailcapSanitize;
/**
* struct Rfc1524MailcapEntry - A mailcap entry
#include "state.h"
/* These Config Variables are only used in rfc3676.c */
-bool ReflowSpaceQuotes; ///< Config: Insert spaces into reply quotes for 'format=flowed' messages
-short ReflowWrap; ///< Config: Maximum paragraph width for reformatting 'format=flowed' text
+bool C_ReflowSpaceQuotes; ///< Config: Insert spaces into reply quotes for 'format=flowed' messages
+short C_ReflowWrap; ///< Config: Maximum paragraph width for reformatting 'format=flowed' text
#define FLOWED_MAX 72
*/
static int space_quotes(struct State *s)
{
- /* Allow quote spacing in the pager even for TextFlowed,
+ /* Allow quote spacing in the pager even for C_TextFlowed,
* but obviously not when replying.
*/
- if (TextFlowed && (s->flags & MUTT_REPLYING))
+ if (C_TextFlowed && (s->flags & MUTT_REPLYING))
return 0;
- return ReflowSpaceQuotes;
+ return C_ReflowSpaceQuotes;
}
/**
return false;
/* The prefix will add its own space */
- if (!TextFlowed && !ql && s->prefix)
+ if (!C_TextFlowed && !ql && s->prefix)
return false;
return true;
/* use given prefix only for format=fixed replies to format=flowed,
* for format=flowed replies to format=flowed, use '>' indentation
*/
- if (TextFlowed)
+ if (C_TextFlowed)
ql++;
else
{
*/
static int quote_width(struct State *s, int ql)
{
- int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap);
- if (TextFlowed && (s->flags & MUTT_REPLYING))
+ int width = mutt_window_wrap_cols(MuttIndexWindow, C_ReflowWrap);
+ if (C_TextFlowed && (s->flags & MUTT_REPLYING))
{
/* When replying, force a wrap at FLOWED_MAX to comply with RFC3676
* guidelines */
mutt_debug(LL_DEBUG3, "f=f: break line at %lu, %lu spaces left\n",
fst->width, fst->spaces);
/* only honor trailing spaces for format=flowed replies */
- if (TextFlowed)
+ if (C_TextFlowed)
for (; fst->spaces; fst->spaces--)
state_putc(' ', s);
state_putc('\n', s);
struct State;
/* These Config Variables are only used in rfc3676.c */
-extern bool ReflowSpaceQuotes;
-extern short ReflowWrap;
+extern bool C_ReflowSpaceQuotes;
+extern short C_ReflowWrap;
int rfc3676_handler(struct Body *a, struct State *s);
void rfc3676_space_stuff(struct Email *e);
#include "sort.h"
/* These Config Variables are only used in score.c */
-short ScoreThresholdDelete; ///< Config: Messages with a lower score will be automatically deleted
-short ScoreThresholdFlag; ///< Config: Messages with a greater score will be automatically flagged
-short ScoreThresholdRead; ///< Config: Messages with a lower score will be automatically marked read
+short C_ScoreThresholdDelete; ///< Config: Messages with a lower score will be automatically deleted
+short C_ScoreThresholdFlag; ///< Config: Messages with a greater score will be automatically flagged
+short C_ScoreThresholdRead; ///< Config: Messages with a lower score will be automatically marked read
/**
* struct Score - Scoring rule for email
*/
void mutt_check_rescore(struct Mailbox *m)
{
- if (OptNeedRescore && Score)
+ if (OptNeedRescore && C_Score)
{
- if ((Sort & SORT_MASK) == SORT_SCORE || (SortAux & SORT_MASK) == SORT_SCORE)
+ if ((C_Sort & SORT_MASK) == SORT_SCORE || (C_SortAux & SORT_MASK) == SORT_SCORE)
{
OptNeedResort = true;
- if ((Sort & SORT_MASK) == SORT_THREADS)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS)
OptSortSubthreads = true;
}
if (e->score < 0)
e->score = 0;
- if (e->score <= ScoreThresholdDelete)
+ if (e->score <= C_ScoreThresholdDelete)
mutt_set_flag_update(m, e, MUTT_DELETE, true, upd_mbox);
- if (e->score <= ScoreThresholdRead)
+ if (e->score <= C_ScoreThresholdRead)
mutt_set_flag_update(m, e, MUTT_READ, true, upd_mbox);
- if (e->score >= ScoreThresholdFlag)
+ if (e->score >= C_ScoreThresholdFlag)
mutt_set_flag_update(m, e, MUTT_FLAG, true, upd_mbox);
}
struct Mailbox;
/* These Config Variables are only used in score.c */
-extern short ScoreThresholdDelete;
-extern short ScoreThresholdFlag;
-extern short ScoreThresholdRead;
+extern short C_ScoreThresholdDelete;
+extern short C_ScoreThresholdFlag;
+extern short C_ScoreThresholdRead;
void mutt_check_rescore(struct Mailbox *m);
enum CommandResult mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
#endif
/* These Config Variables are only used in send.c */
-unsigned char AbortNoattach; ///< Config: Abort sending the email if attachments are missing
-struct Regex *AbortNoattachRegex; ///< Config: Regex to match text indicating attachments are expected
-unsigned char AbortNosubject; ///< Config: Abort creating the email if subject is missing
-unsigned char AbortUnmodified; ///< Config: Abort the sending if the message hasn't been edited
-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 CryptReplyencrypt; ///< Config: Encrypt replies to encrypted 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 FccAttach; ///< Config: Save send message with all their attachments
-bool FccClear; ///< Config: Save sent messages unencrypted and unsigned
-bool FollowupTo; ///< Config: Add the 'Mail-Followup-To' header is generated when sending mail
-char *ForwardAttributionIntro; ///< Config: Prefix message for forwarded messages
-char *ForwardAttributionTrailer; ///< Config: Suffix message for forwarded messages
-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
-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 Metoo; ///< Config: Remove the user's address from the list of recipients
-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
-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
-unsigned char ReplyTo; ///< Config: Address to use as a 'Reply-To' header
-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
-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
+unsigned char C_AbortNoattach; ///< Config: Abort sending the email if attachments are missing
+struct Regex *C_AbortNoattachRegex; ///< Config: Regex to match text indicating attachments are expected
+unsigned char C_AbortNosubject; ///< Config: Abort creating the email if subject is missing
+unsigned char C_AbortUnmodified; ///< Config: Abort the sending if the message hasn't been edited
+bool C_AskFollowUp; ///< Config: (nntp) Ask the user for follow-up groups before editing
+bool C_AskXCommentTo; ///< Config: (nntp) Ask the user for the 'X-Comment-To' field before editing
+char *C_ContentType; ///< Config: Default "Content-Type" for newly composed messages
+bool C_CryptAutoencrypt; ///< Config: Automatically PGP encrypt all outgoing mail
+bool C_CryptAutopgp; ///< Config: Allow automatic PGP functions
+bool C_CryptAutosign; ///< Config: Automatically PGP sign all outgoing mail
+bool C_CryptAutosmime; ///< Config: Allow automatic SMIME functions
+bool C_CryptReplyencrypt; ///< Config: Encrypt replies to encrypted messages
+bool C_CryptReplysign; ///< Config: Sign replies to signed messages
+bool C_CryptReplysignencrypted; ///< Config: Sign replies to encrypted messages
+char *C_EmptySubject; ///< Config: Subject to use when replying to an email with none
+bool C_FastReply; ///< Config: Don't prompt for the recipients and subject when replying/forwarding
+unsigned char C_FccAttach; ///< Config: Save send message with all their attachments
+bool C_FccClear; ///< Config: Save sent messages unencrypted and unsigned
+bool C_FollowupTo; ///< Config: Add the 'Mail-Followup-To' header is generated when sending mail
+char *C_ForwardAttributionIntro; ///< Config: Prefix message for forwarded messages
+char *C_ForwardAttributionTrailer; ///< Config: Suffix message for forwarded messages
+unsigned char C_ForwardEdit; ///< Config: Automatically start the editor when forwarding a message
+char *C_ForwardFormat; ///< Config: printf-like format string to control the subject when forwarding a message
+bool C_ForwardReferences; ///< Config: Set the 'In-Reply-To' and 'References' headers when forwarding a message
+bool C_Hdrs; ///< Config: Add custom headers to outgoing mail
+unsigned char C_HonorFollowupTo; ///< Config: Honour the 'Mail-Followup-To' header when group replying
+bool C_IgnoreListReplyTo; ///< Config: Ignore the 'Reply-To' header when using `<reply>` on a mailing list
+unsigned char C_Include; ///< Config: Include a copy of the email that's being replied to
+bool C_Metoo; ///< Config: Remove the user's address from the list of recipients
+bool C_NmRecord; ///< Config: (notmuch) If the 'record' mailbox (sent mail) should be indexed
+bool C_PgpReplyinline; ///< Config: Reply using old-style inline PGP messages (not recommended)
+char *C_PostIndentString; ///< Config: Suffix message to add after reply text
+bool C_PostponeEncrypt; ///< Config: Self-encrypt postponed messages
+char *C_PostponeEncryptAs; ///< Config: Fallback encryption key for postponed messages
+unsigned char C_Recall; ///< Config: Recall postponed mesaages when asked to compose a message
+bool C_ReplySelf; ///< Config: Really reply to yourself, when replying to your own email
+unsigned char C_ReplyTo; ///< Config: Address to use as a 'Reply-To' header
+bool C_ReplyWithXorig; ///< Config: Create 'From' header from 'X-Original-To' header
+bool C_ReverseName; ///< Config: Set the 'From' from the address the email was sent to
+bool C_ReverseRealname; ///< Config: Set the 'From' from the full 'To' address the email was sent to
+bool C_SigDashes; ///< Config: Insert '-- ' before the signature
+char *C_Signature; ///< Config: File containing a signature to append to all mail
+bool C_SigOnTop; ///< Config: Insert the signature before the quoted text
+bool C_UseFrom; ///< Config: Set the 'From' header for outgoing mail
/**
* append_signature - Append a signature to an email
FILE *tmpfp = NULL;
pid_t thepid;
- if (Signature && (tmpfp = mutt_open_read(Signature, &thepid)))
+ if (C_Signature && (tmpfp = mutt_open_read(C_Signature, &thepid)))
{
- if (SigDashes)
+ if (C_SigDashes)
fputs("\n-- \n", f);
mutt_file_copy_stream(tmpfp, f);
mutt_file_fclose(&tmpfp);
mutt_str_strfcpy(buf, en->followup_to, sizeof(buf));
else
buf[0] = 0;
- if (AskFollowUp && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
+ if (C_AskFollowUp && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
{
return -1;
}
mutt_str_strfcpy(buf, en->x_comment_to, sizeof(buf));
else
buf[0] = 0;
- if (XCommentTo && AskXCommentTo &&
+ if (C_XCommentTo && C_AskXCommentTo &&
mutt_get_field("X-Comment-To: ", buf, sizeof(buf), 0) != 0)
{
return -1;
{
if (edit_address(&en->to, _("To: ")) == -1 || !en->to)
return -1;
- if (Askcc && edit_address(&en->cc, _("Cc: ")) == -1)
+ if (C_Askcc && edit_address(&en->cc, _("Cc: ")) == -1)
return -1;
- if (Askbcc && edit_address(&en->bcc, _("Bcc: ")) == -1)
+ if (C_Askbcc && edit_address(&en->bcc, _("Bcc: ")) == -1)
return -1;
- if (ReplyWithXorig && (flags & (SEND_REPLY | SEND_LIST_REPLY | SEND_GROUP_REPLY)) &&
+ if (C_ReplyWithXorig && (flags & (SEND_REPLY | SEND_LIST_REPLY | SEND_GROUP_REPLY)) &&
(edit_address(&en->from, "From: ") == -1))
{
return -1;
if (en->subject)
{
- if (FastReply)
+ if (C_FastReply)
return 0;
else
mutt_str_strfcpy(buf, en->subject, sizeof(buf));
}
if (mutt_get_field(_("Subject: "), buf, sizeof(buf), 0) != 0 ||
- (!buf[0] && query_quadoption(AbortNosubject, _("No subject, abort?")) != MUTT_NO))
+ (!buf[0] && query_quadoption(C_AbortNosubject, _("No subject, abort?")) != MUTT_NO))
{
mutt_message(_("No subject, aborting"));
return -1;
*/
void mutt_forward_intro(struct Mailbox *m, struct Email *e, FILE *fp)
{
- if (!ForwardAttributionIntro || !fp)
+ if (!C_ForwardAttributionIntro || !fp)
return;
char buf[LONG_STRING];
- setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(buf, sizeof(buf), ForwardAttributionIntro, NULL, m, e);
+ setlocale(LC_TIME, NONULL(C_AttributionLocale));
+ mutt_make_string(buf, sizeof(buf), C_ForwardAttributionIntro, NULL, m, e);
setlocale(LC_TIME, "");
fputs(buf, fp);
fputs("\n\n", fp);
*/
void mutt_forward_trailer(struct Mailbox *m, struct Email *e, FILE *fp)
{
- if (!ForwardAttributionTrailer || !fp)
+ if (!C_ForwardAttributionTrailer || !fp)
return;
char buf[LONG_STRING];
- setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(buf, sizeof(buf), ForwardAttributionTrailer, NULL, m, e);
+ setlocale(LC_TIME, NONULL(C_AttributionLocale));
+ mutt_make_string(buf, sizeof(buf), C_ForwardAttributionTrailer, NULL, m, e);
setlocale(LC_TIME, "");
fputc('\n', fp);
fputs(buf, fp);
mutt_parse_mime_message(m, e);
mutt_message_hook(m, e, MUTT_MESSAGE_HOOK);
- if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT) && ForwardDecode)
+ if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT) && C_ForwardDecode)
{
/* make sure we have the user's passphrase before proceeding... */
if (!crypt_valid_passphrase(e->security))
mutt_forward_intro(m, e, out);
- if (ForwardDecode)
+ if (C_ForwardDecode)
{
cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV;
- if (Weed)
+ if (C_Weed)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
}
}
- if (ForwardQuote)
+ if (C_ForwardQuote)
cmflags |= MUTT_CM_PREFIX;
/* wrapping headers for forwarding is considered a display
*/
void mutt_make_attribution(struct Mailbox *m, struct Email *e, FILE *out)
{
- if (!Attribution || !out)
+ if (!C_Attribution || !out)
return;
char buf[LONG_STRING];
- setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(buf, sizeof(buf), Attribution, NULL, m, e);
+ setlocale(LC_TIME, NONULL(C_AttributionLocale));
+ mutt_make_string(buf, sizeof(buf), C_Attribution, NULL, m, e);
setlocale(LC_TIME, "");
fputs(buf, out);
fputc('\n', out);
*/
void mutt_make_post_indent(struct Mailbox *m, struct Email *e, FILE *out)
{
- if (!PostIndentString || !out)
+ if (!C_PostIndentString || !out)
return;
char buf[STRING];
- mutt_make_string(buf, sizeof(buf), PostIndentString, NULL, m, e);
+ mutt_make_string(buf, sizeof(buf), C_PostIndentString, NULL, m, e);
fputs(buf, out);
fputc('\n', out);
}
mutt_make_attribution(m, e, out);
- if (!Header)
+ if (!C_Header)
cmflags |= MUTT_CM_NOHEADER;
- if (Weed)
+ if (C_Weed)
{
chflags |= CH_WEED | CH_REORDER;
cmflags |= MUTT_CM_WEED;
if (flags & SEND_LIST_REPLY)
return 0;
- if (!ReplySelf && mutt_addr_is_user(env->from))
+ if (!C_ReplySelf && mutt_addr_is_user(env->from))
{
/* mail is from the user, assume replying to recipients */
mutt_addr_append(to, env->to, true);
{
if ((mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next &&
!env->reply_to->personal) ||
- (IgnoreListReplyTo && mutt_is_mail_list(env->reply_to) &&
+ (C_IgnoreListReplyTo && mutt_is_mail_list(env->reply_to) &&
(mutt_addr_search(env->reply_to, env->to) ||
mutt_addr_search(env->reply_to, env->cc))))
{
mutt_addr_append(to, env->from, false);
}
else if (!(mutt_addr_cmp(env->from, env->reply_to) && !env->reply_to->next) &&
- ReplyTo != MUTT_YES)
+ C_ReplyTo != MUTT_YES)
{
/* There are quite a few mailing lists which set the Reply-To:
* header field to the list address, which makes it quite impossible
If she says no, neomutt will reply to the from header's address instead. */
snprintf(prompt, sizeof(prompt), _("Reply to %s%s?"),
env->reply_to->mailbox, env->reply_to->next ? ",..." : "");
- switch (query_quadoption(ReplyTo, prompt))
+ switch (query_quadoption(C_ReplyTo, prompt))
{
case MUTT_YES:
mutt_addr_append(to, env->reply_to, false);
snprintf(prompt, sizeof(prompt), _("Follow-up to %s%s?"),
in->mail_followup_to->mailbox, in->mail_followup_to->next ? ",..." : "");
- hmfupto = query_quadoption(HonorFollowupTo, prompt);
+ hmfupto = query_quadoption(C_HonorFollowupTo, prompt);
if (hmfupto == MUTT_ABORT)
return -1;
}
*/
void mutt_fix_reply_recipients(struct Envelope *env)
{
- if (!Metoo)
+ if (!C_Metoo)
{
/* the order is important here. do the CC: first so that if the
* the user is the only recipient, it ends up on the TO: field
*/
env->cc = remove_user(env->cc, (env->to == NULL));
- env->to = remove_user(env->to, (env->cc == NULL) || ReplySelf);
+ env->to = remove_user(env->to, (env->cc == NULL) || C_ReplySelf);
}
/* the CC field can get cluttered, especially with lists */
char buf[STRING];
/* set the default subject for the message. */
- mutt_make_string(buf, sizeof(buf), NONULL(ForwardFormat), NULL, m, cur);
+ mutt_make_string(buf, sizeof(buf), NONULL(C_ForwardFormat), NULL, m, cur);
mutt_str_replace(&env->subject, buf);
}
sprintf(env->subject, "Re: %s", curenv->real_subj);
}
else if (!env->subject)
- env->subject = mutt_str_strdup(EmptySubject);
+ env->subject = mutt_str_strdup(C_EmptySubject);
}
/**
add_message_id(&env->in_reply_to, curenv);
#ifdef USE_NNTP
- if (OptNewsSend && XCommentTo && curenv->from)
+ if (OptNewsSend && C_XCommentTo && curenv->from)
env->x_comment_to = mutt_str_strdup(mutt_get_name(curenv->from));
#endif
}
else if (flags & SEND_FORWARD)
{
mutt_make_forward_subject(env, m, en->email);
- if (ForwardReferences)
+ if (C_ForwardReferences)
make_reference_headers(el, env);
}
if (flags & SEND_REPLY)
{
- i = query_quadoption(Include, _("Include message in reply?"));
+ i = query_quadoption(C_Include, _("Include message in reply?"));
if (i == MUTT_ABORT)
return -1;
}
else if (flags & SEND_FORWARD)
{
- i = query_quadoption(MimeForward, _("Forward as attachment?"));
+ i = query_quadoption(C_MimeForward, _("Forward as attachment?"));
if (i == MUTT_YES)
{
struct Body *last = msg->content;
* it hasn't already been set
*/
- if (!FollowupTo)
+ if (!C_FollowupTo)
return;
#ifdef USE_NNTP
if (OptNewsSend)
/* when $reverse_realname is not set, clear the personal name so that it
* may be set via a reply- or send-hook.
*/
- if (!ReverseRealname)
+ if (!C_ReverseRealname)
FREE(&tmp->personal);
}
return tmp;
* Is this the right thing to do?
*/
- if (From)
- addr = mutt_addr_copy(From);
+ if (C_From)
+ addr = mutt_addr_copy(C_From);
else
{
addr = mutt_addr_new();
- if (UseDomain)
+ if (C_UseDomain)
{
const char *fqdn = mutt_fqdn(true);
addr->mailbox =
return -1;
#ifdef USE_SMTP
- old_write_bcc = WriteBcc;
- if (SmtpUrl)
- WriteBcc = false;
+ old_write_bcc = C_WriteBcc;
+ if (C_SmtpUrl)
+ C_WriteBcc = false;
#endif
#ifdef MIXMASTER
mutt_rfc822_write_header(tempfp, msg->env, msg->content,
#endif
#ifdef USE_SMTP
if (old_write_bcc)
- WriteBcc = true;
+ C_WriteBcc = true;
#endif
fputc('\n', tempfp); /* tie off the header. */
#ifdef USE_NNTP
if (!OptNewsSend)
#endif
- if (SmtpUrl)
+ if (C_SmtpUrl)
{
return mutt_smtp_send(msg->env->from, msg->env->to, msg->env->cc, msg->env->bcc,
tempfile, (msg->content->encoding == ENC_8BIT));
{
if (t->description)
{
- rfc2047_encode(&t->description, NULL, sizeof("Content-Description:"), SendCharset);
+ rfc2047_encode(&t->description, NULL, sizeof("Content-Description:"), C_SendCharset);
}
if (recurse && t->parts)
mutt_encode_descriptions(t->parts, recurse);
* so fix that here */
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
{
- if (((WithCrypto & APPLICATION_SMIME) != 0) && SmimeIsDefault)
+ if (((WithCrypto & APPLICATION_SMIME) != 0) && C_SmimeIsDefault)
msg->security |= APPLICATION_SMIME;
else if (WithCrypto & APPLICATION_PGP)
msg->security |= APPLICATION_PGP;
msg->security |= APPLICATION_SMIME;
}
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
{
msg->security |= SEC_OPPENCRYPT;
crypt_opportunistic_encrypt(msg);
*/
static bool search_attach_keyword(char *filename)
{
- /* Search for the regex in AbortNoattachRegex within a file */
- if (!AbortNoattachRegex || !AbortNoattachRegex->regex || !QuoteRegex ||
- !QuoteRegex->regex)
+ /* Search for the regex in C_AbortNoattachRegex within a file */
+ if (!C_AbortNoattachRegex || !C_AbortNoattachRegex->regex || !C_QuoteRegex ||
+ !C_QuoteRegex->regex)
{
return false;
}
{
fgets(inputline, LONG_STRING, attf);
if (!mutt_is_quote_line(inputline, NULL) &&
- regexec(AbortNoattachRegex->regex, inputline, 0, NULL, 0) == 0)
+ regexec(C_AbortNoattachRegex->regex, inputline, 0, NULL, 0) == 0)
{
found = true;
break;
struct Body *save_sig = NULL;
struct Body *save_parts = NULL;
- if ((WithCrypto != 0) && (msg->security & (SEC_ENCRYPT | SEC_SIGN)) && FccClear)
+ if ((WithCrypto != 0) && (msg->security & (SEC_ENCRYPT | SEC_SIGN)) && C_FccClear)
{
msg->content = clear_content;
msg->security &= ~(SEC_ENCRYPT | SEC_SIGN);
(mutt_str_strcmp(msg->content->subtype, "signed") == 0)))
{
if ((clear_content->type == TYPE_MULTIPART) &&
- query_quadoption(FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
+ query_quadoption(C_FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
{
if (!(msg->security & SEC_ENCRYPT) && (msg->security & SEC_SIGN))
{
}
else
{
- if (query_quadoption(FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
+ if (query_quadoption(C_FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
msg->content = msg->content->parts;
}
}
int is_signed;
struct Body *clear_content = NULL;
- if (!(Postponed && *Postponed))
+ if (!(C_Postponed && *C_Postponed))
{
mutt_error(_("Cannot postpone. $postponed is unset"));
return -1;
mutt_encode_descriptions(msg->content, true);
- if ((WithCrypto != 0) && PostponeEncrypt && (msg->security & SEC_ENCRYPT))
+ if ((WithCrypto != 0) && C_PostponeEncrypt && (msg->security & SEC_ENCRYPT))
{
if (((WithCrypto & APPLICATION_PGP) != 0) && (msg->security & APPLICATION_PGP))
- encrypt_as = PgpDefaultKey;
+ encrypt_as = C_PgpDefaultKey;
else if (((WithCrypto & APPLICATION_SMIME) != 0) && (msg->security & APPLICATION_SMIME))
- encrypt_as = SmimeDefaultKey;
+ encrypt_as = C_SmimeDefaultKey;
if (!(encrypt_as && *encrypt_as))
- encrypt_as = PostponeEncryptAs;
+ encrypt_as = C_PostponeEncryptAs;
if (encrypt_as && *encrypt_as)
{
mutt_prepare_envelope(msg->env, false);
mutt_env_to_intl(msg->env, NULL, NULL); /* Handle bad IDNAs the next time. */
- if (mutt_write_fcc(NONULL(Postponed), msg,
+ if (mutt_write_fcc(NONULL(C_Postponed), msg,
(cur && (flags & SEND_REPLY)) ? cur->env->message_id : NULL,
true, fcc, NULL) < 0)
{
OptNewsSend = false;
#endif
- if (!flags && !msg && Recall != MUTT_NO &&
+ if (!flags && !msg && C_Recall != MUTT_NO &&
mutt_num_postponed(ctx ? ctx->mailbox : NULL, true))
{
/* If the user is composing a new message, check to see if there
* are any postponed messages first.
*/
- i = query_quadoption(Recall, _("Recall postponed message?"));
+ i = query_quadoption(C_Recall, _("Recall postponed message?"));
if (i == MUTT_ABORT)
return rc;
if (flags & SEND_POSTPONED)
{
if (WithCrypto & APPLICATION_PGP)
- pgp_signas = mutt_str_strdup(PgpSignAs);
+ pgp_signas = mutt_str_strdup(C_PgpSignAs);
if (WithCrypto & APPLICATION_SMIME)
- smime_signas = mutt_str_strdup(SmimeSignAs);
+ smime_signas = mutt_str_strdup(C_SmimeSignAs);
}
/* Delay expansion of aliases until absolutely necessary--shouldn't
pbody->next = msg->content; /* don't kill command-line attachments */
msg->content = pbody;
- ctype = mutt_str_strdup(ContentType);
+ ctype = mutt_str_strdup(C_ContentType);
if (!ctype)
ctype = mutt_str_strdup("text/plain");
mutt_parse_content_type(ctype, msg->content);
}
/* this is handled here so that the user can match ~f in send-hook */
- if (cur && ReverseName && !(flags & (SEND_POSTPONED | SEND_RESEND)))
+ if (cur && C_ReverseName && !(flags & (SEND_POSTPONED | SEND_RESEND)))
{
/* we shouldn't have to worry about freeing 'msg->env->from' before
* setting it here since this code will only execute when doing some
}
msg->env->from = set_reverse_name(cur->env);
}
- if (cur && ReplyWithXorig && !(flags & (SEND_POSTPONED | SEND_RESEND | SEND_FORWARD)))
+ if (cur && C_ReplyWithXorig && !(flags & (SEND_POSTPONED | SEND_RESEND | SEND_FORWARD)))
{
/* We shouldn't have to worry about freeing 'msg->env->from' before
* setting it here since this code will only execute when doing some
* line option.
*
* If there is already a from address recorded in 'msg->env->from',
- * then it theoretically comes from ReverseName handling, and we don't use
+ * then it theoretically comes from C_ReverseName handling, and we don't use
* the 'X-Orig-To header'.
*/
if (cur->env->x_original_to && !msg->env->from)
}
}
- if (!(flags & (SEND_POSTPONED | SEND_RESEND)) && !((flags & SEND_DRAFT_FILE) && ResumeDraftFiles))
+ if (!(flags & (SEND_POSTPONED | SEND_RESEND)) &&
+ !((flags & SEND_DRAFT_FILE) && C_ResumeDraftFiles))
{
if ((flags & (SEND_REPLY | SEND_FORWARD | SEND_TO_SENDER)) && ctx &&
envelope_defaults(msg->env, ctx->mailbox, el, flags) == -1)
goto cleanup;
}
- if (Hdrs)
+ if (C_Hdrs)
process_user_recips(msg->env);
/* Expand aliases and remove duplicates/crossrefs */
}
#endif
- if (!(flags & (SEND_MAILX | SEND_BATCH)) && !(Autoedit && EditHeaders) &&
- !((flags & SEND_REPLY) && FastReply))
+ if (!(flags & (SEND_MAILX | SEND_BATCH)) &&
+ !(C_Autoedit && C_EditHeaders) && !((flags & SEND_REPLY) && C_FastReply))
{
if (edit_envelope(msg->env, flags) == -1)
goto cleanup;
if (!(flags & SEND_KEY))
{
- if (TextFlowed && msg->content->type == TYPE_TEXT &&
+ if (C_TextFlowed && msg->content->type == TYPE_TEXT &&
(mutt_str_strcasecmp(msg->content->subtype, "plain") == 0))
{
mutt_param_set(&msg->content->parameter, "format", "flowed");
if (killfrom)
{
mutt_addr_free(&msg->env->from);
- if (UseFrom && !(flags & (SEND_POSTPONED | SEND_RESEND)))
+ if (C_UseFrom && !(flags & (SEND_POSTPONED | SEND_RESEND)))
msg->env->from = mutt_default_from();
killfrom = false;
}
- if (Hdrs)
+ if (C_Hdrs)
process_user_header(msg->env);
if (flags & SEND_BATCH)
mutt_file_copy_stream(stdin, tempfp);
- if (SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) && Editor &&
- (mutt_str_strcmp(Editor, "builtin") != 0))
+ if (C_SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) &&
+ C_Editor && (mutt_str_strcmp(C_Editor, "builtin") != 0))
{
append_signature(tempfp);
}
goto cleanup;
}
- if (!SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) &&
- Editor && (mutt_str_strcmp(Editor, "builtin") != 0))
+ if (!C_SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) &&
+ C_Editor && (mutt_str_strcmp(C_Editor, "builtin") != 0))
{
append_signature(tempfp);
}
/* wait until now to set the real name portion of our return address so
that $realname can be set in a send-hook */
if (msg->env->from && !msg->env->from->personal && !(flags & (SEND_RESEND | SEND_POSTPONED)))
- msg->env->from->personal = mutt_str_strdup(Realname);
+ msg->env->from->personal = mutt_str_strdup(C_Realname);
if (!(((WithCrypto & APPLICATION_PGP) != 0) && (flags & SEND_KEY)))
mutt_file_fclose(&tempfp);
* recipients.
*/
if (!(flags & SEND_KEY) &&
- ((flags & SEND_FORWARD) == 0 || (EditHeaders && Autoedit) ||
- query_quadoption(ForwardEdit, _("Edit forwarded message?")) == MUTT_YES))
+ ((flags & SEND_FORWARD) == 0 || (C_EditHeaders && C_Autoedit) ||
+ query_quadoption(C_ForwardEdit, _("Edit forwarded message?")) == MUTT_YES))
{
/* If the this isn't a text message, look for a mailcap edit command */
if (mutt_needs_mailcap(msg->content))
if (!mutt_edit_attachment(msg->content))
goto cleanup;
}
- else if (!Editor || (mutt_str_strcmp("builtin", Editor) == 0))
+ else if (!C_Editor || (mutt_str_strcmp("builtin", C_Editor) == 0))
mutt_builtin_editor(msg->content->filename, msg, cur);
- else if (EditHeaders)
+ else if (C_EditHeaders)
{
mutt_env_to_local(msg->env);
- mutt_edit_headers(Editor, msg->content->filename, msg, fcc, sizeof(fcc));
+ mutt_edit_headers(C_Editor, msg->content->filename, msg, fcc, sizeof(fcc));
mutt_env_to_intl(msg->env, NULL, NULL);
}
else
{
- mutt_edit_file(Editor, msg->content->filename);
+ mutt_edit_file(C_Editor, msg->content->filename);
if (stat(msg->content->filename, &st) == 0)
{
if (mtime != st.st_mtime)
* performed. If it has already been performed, the format=flowed
* parameter will be present.
*/
- if (TextFlowed && msg->content->type == TYPE_TEXT &&
+ if (C_TextFlowed && msg->content->type == TYPE_TEXT &&
(mutt_str_strcasecmp("plain", msg->content->subtype) == 0))
{
char *p = mutt_param_get(&msg->content->parameter, "format");
{
/* if the file was not modified, bail out now */
if (mtime == st.st_mtime && !msg->content->next &&
- query_quadoption(AbortUnmodified, _("Abort unmodified message?")) == MUTT_YES)
+ query_quadoption(C_AbortUnmodified,
+ _("Abort unmodified message?")) == MUTT_YES)
{
mutt_message(_("Aborted unmodified message"));
goto cleanup;
if ((WithCrypto != 0) && (msg->security == 0) &&
!(flags & (SEND_BATCH | SEND_MAILX | SEND_POSTPONED | SEND_RESEND)))
{
- if (CryptAutosign)
+ if (C_CryptAutosign)
msg->security |= SEC_SIGN;
- if (CryptAutoencrypt)
+ if (C_CryptAutoencrypt)
msg->security |= SEC_ENCRYPT;
- if (CryptReplyencrypt && cur && (cur->security & SEC_ENCRYPT))
+ if (C_CryptReplyencrypt && cur && (cur->security & SEC_ENCRYPT))
msg->security |= SEC_ENCRYPT;
- if (CryptReplysign && cur && (cur->security & SEC_SIGN))
+ if (C_CryptReplysign && cur && (cur->security & SEC_SIGN))
msg->security |= SEC_SIGN;
- if (CryptReplysignencrypted && cur && (cur->security & SEC_ENCRYPT))
+ if (C_CryptReplysignencrypted && cur && (cur->security & SEC_ENCRYPT))
msg->security |= SEC_SIGN;
if (((WithCrypto & APPLICATION_PGP) != 0) &&
- ((msg->security & (SEC_ENCRYPT | SEC_SIGN)) || CryptOpportunisticEncrypt))
+ ((msg->security & (SEC_ENCRYPT | SEC_SIGN)) || C_CryptOpportunisticEncrypt))
{
- if (PgpAutoinline)
+ if (C_PgpAutoinline)
msg->security |= SEC_INLINE;
- if (PgpReplyinline && cur && (cur->security & SEC_INLINE))
+ if (C_PgpReplyinline && cur && (cur->security & SEC_INLINE))
msg->security |= SEC_INLINE;
}
- if (msg->security || CryptOpportunisticEncrypt)
+ if (msg->security || C_CryptOpportunisticEncrypt)
{
/* When replying / forwarding, use the original message's
* crypto system. According to the documentation,
*/
if (cur)
{
- if (((WithCrypto & APPLICATION_PGP) != 0) && CryptAutopgp &&
+ if (((WithCrypto & APPLICATION_PGP) != 0) && C_CryptAutopgp &&
(cur->security & APPLICATION_PGP))
{
msg->security |= APPLICATION_PGP;
}
- else if (((WithCrypto & APPLICATION_SMIME) != 0) && CryptAutosmime &&
+ else if (((WithCrypto & APPLICATION_SMIME) != 0) && C_CryptAutosmime &&
(cur->security & APPLICATION_SMIME))
{
msg->security |= APPLICATION_SMIME;
*/
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP)))
{
- if (((WithCrypto & APPLICATION_SMIME) != 0) && CryptAutosmime && SmimeIsDefault)
+ if (((WithCrypto & APPLICATION_SMIME) != 0) && C_CryptAutosmime && C_SmimeIsDefault)
{
msg->security |= APPLICATION_SMIME;
}
- else if (((WithCrypto & APPLICATION_PGP) != 0) && CryptAutopgp)
+ else if (((WithCrypto & APPLICATION_PGP) != 0) && C_CryptAutopgp)
{
msg->security |= APPLICATION_PGP;
}
- else if (((WithCrypto & APPLICATION_SMIME) != 0) && CryptAutosmime)
+ else if (((WithCrypto & APPLICATION_SMIME) != 0) && C_CryptAutosmime)
{
msg->security |= APPLICATION_SMIME;
}
}
/* opportunistic encrypt relies on SMIME or PGP already being selected */
- if (CryptOpportunisticEncrypt)
+ if (C_CryptOpportunisticEncrypt)
{
- /* If something has already enabled encryption, e.g. CryptAutoencrypt
- * or CryptReplyencrypt, then don't enable opportunistic encrypt for
+ /* If something has already enabled encryption, e.g. C_CryptAutoencrypt
+ * or C_CryptReplyencrypt, then don't enable opportunistic encrypt for
* the message.
*/
if (!(msg->security & SEC_ENCRYPT))
/* specify a default fcc. if we are in batchmode, only save a copy of
* the message if the value of $copy is yes or ask-yes */
- if (!fcc[0] && !(flags & (SEND_POSTPONED_FCC)) && (!(flags & SEND_BATCH) || (Copy & 0x1)))
+ if (!fcc[0] && !(flags & (SEND_POSTPONED_FCC)) &&
+ (!(flags & SEND_BATCH) || (C_Copy & 0x1)))
{
/* set the default FCC */
if (!msg->env->from)
}
if (!msg->env->subject && !(flags & SEND_BATCH) &&
- (i = query_quadoption(AbortNosubject, _("No subject, abort sending?"))) != MUTT_NO)
+ (i = query_quadoption(C_AbortNosubject,
+ _("No subject, abort sending?"))) != MUTT_NO)
{
/* if the abort is automatic, print an error message */
- if (AbortNosubject == MUTT_YES)
+ if (C_AbortNosubject == MUTT_YES)
mutt_error(_("No subject specified"));
goto main_loop;
}
}
#endif
- if (!(flags & SEND_BATCH) && (AbortNoattach != MUTT_NO) &&
+ if (!(flags & SEND_BATCH) && (C_AbortNoattach != MUTT_NO) &&
!msg->content->next && (msg->content->type == TYPE_TEXT) &&
(mutt_str_strcasecmp(msg->content->subtype, "plain") == 0) &&
search_attach_keyword(msg->content->filename) &&
- query_quadoption(AbortNoattach, _("No attachments, cancel sending?")) != MUTT_NO)
+ query_quadoption(C_AbortNoattach, _("No attachments, cancel sending?")) != MUTT_NO)
{
/* if the abort is automatic, print an error message */
- if (AbortNoattach == MUTT_YES)
+ if (C_AbortNoattach == MUTT_YES)
{
mutt_error(_("Message contains text matching "
"\"$abort_noattach_regex\". Not sending."));
(flags & SEND_NEWS) ? _("Article posted") : /* USE_NNTP */
_("Mail sent"));
#ifdef USE_NOTMUCH
- if (NmRecord)
+ if (C_NmRecord)
nm_record_message(ctx ? ctx->mailbox : NULL, finalpath, cur);
#endif
mutt_sleep(0);
{
if (WithCrypto & APPLICATION_PGP)
{
- FREE(&PgpSignAs);
- PgpSignAs = pgp_signas;
+ FREE(&C_PgpSignAs);
+ C_PgpSignAs = pgp_signas;
}
if (WithCrypto & APPLICATION_SMIME)
{
- FREE(&SmimeSignAs);
- SmimeSignAs = smime_signas;
+ FREE(&C_SmimeSignAs);
+ C_SmimeSignAs = smime_signas;
}
}
struct Mailbox;
/* These Config Variables are only used in send.c */
-extern unsigned char AbortNoattach; /* forgotten attachment detector */
-extern struct Regex *AbortNoattachRegex;
-extern unsigned char AbortNosubject;
-extern unsigned char AbortUnmodified;
-extern bool AskFollowUp;
-extern bool AskXCommentTo;
-extern char * ContentType;
-extern bool CryptAutoencrypt;
-extern bool CryptAutopgp;
-extern bool CryptAutosign;
-extern bool CryptAutosmime;
-extern bool CryptReplyencrypt;
-extern bool CryptReplysign;
-extern bool CryptReplysignencrypted;
-extern char * EmptySubject;
-extern bool FastReply;
-extern unsigned char FccAttach;
-extern bool FccClear;
-extern bool FollowupTo;
-extern char * ForwardAttributionIntro;
-extern char * ForwardAttributionTrailer;
-extern unsigned char ForwardEdit;
-extern char * ForwardFormat;
-extern bool ForwardReferences;
-extern bool Hdrs;
-extern unsigned char HonorFollowupTo;
-extern bool IgnoreListReplyTo;
-extern unsigned char Include;
-extern bool Metoo;
-extern bool NmRecord;
-extern bool PgpReplyinline;
-extern char * PostIndentString;
-extern bool PostponeEncrypt;
-extern char * PostponeEncryptAs;
-extern unsigned char Recall;
-extern bool ReplySelf;
-extern unsigned char ReplyTo;
-extern bool ReplyWithXorig;
-extern bool ReverseName;
-extern bool ReverseRealname;
-extern bool SigDashes;
-extern char * Signature;
-extern bool SigOnTop;
-extern bool UseFrom;
+extern unsigned char C_AbortNoattach; /* forgotten attachment detector */
+extern struct Regex *C_AbortNoattachRegex;
+extern unsigned char C_AbortNosubject;
+extern unsigned char C_AbortUnmodified;
+extern bool C_AskFollowUp;
+extern bool C_AskXCommentTo;
+extern char * C_ContentType;
+extern bool C_CryptAutoencrypt;
+extern bool C_CryptAutopgp;
+extern bool C_CryptAutosign;
+extern bool C_CryptAutosmime;
+extern bool C_CryptReplyencrypt;
+extern bool C_CryptReplysign;
+extern bool C_CryptReplysignencrypted;
+extern char * C_EmptySubject;
+extern bool C_FastReply;
+extern unsigned char C_FccAttach;
+extern bool C_FccClear;
+extern bool C_FollowupTo;
+extern char * C_ForwardAttributionIntro;
+extern char * C_ForwardAttributionTrailer;
+extern unsigned char C_ForwardEdit;
+extern char * C_ForwardFormat;
+extern bool C_ForwardReferences;
+extern bool C_Hdrs;
+extern unsigned char C_HonorFollowupTo;
+extern bool C_IgnoreListReplyTo;
+extern unsigned char C_Include;
+extern bool C_Metoo;
+extern bool C_NmRecord;
+extern bool C_PgpReplyinline;
+extern char * C_PostIndentString;
+extern bool C_PostponeEncrypt;
+extern char * C_PostponeEncryptAs;
+extern unsigned char C_Recall;
+extern bool C_ReplySelf;
+extern unsigned char C_ReplyTo;
+extern bool C_ReplyWithXorig;
+extern bool C_ReverseName;
+extern bool C_ReverseRealname;
+extern bool C_SigDashes;
+extern char * C_Signature;
+extern bool C_SigOnTop;
+extern bool C_UseFrom;
/* flags to ci_send_message() */
#define SEND_REPLY (1 << 0) ///< Reply to sender
#endif
/* These Config Variables are only used in sendlib.c */
-bool Allow8bit; ///< Config: Allow 8-bit messages, don't use quoted-printable or base64
-char *AttachCharset; ///< Config: When attaching files, use one of these character sets
-bool BounceDelivered; ///< Config: Add 'Delivered-To' to bounced messages
-bool EncodeFrom; ///< Config: Encode 'From ' as 'quote-printable' at the beginning of lines
-bool ForwardDecrypt; ///< Config: Decrypt the message when forwarding it
-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
-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
-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 C_Allow8bit; ///< Config: Allow 8-bit messages, don't use quoted-printable or base64
+char *C_AttachCharset; ///< Config: When attaching files, use one of these character sets
+bool C_BounceDelivered; ///< Config: Add 'Delivered-To' to bounced messages
+bool C_EncodeFrom; ///< Config: Encode 'From ' as 'quote-printable' at the beginning of lines
+bool C_ForwardDecrypt; ///< Config: Decrypt the message when forwarding it
+bool C_HiddenHost; ///< Config: Don't use the hostname, just the domain, when generating the message id
+char *C_Inews; ///< Config: (nntp) External command to post news articles
+bool C_MimeForwardDecode; ///< Config: Decode the forwarded message before attaching it
+bool C_MimeSubject; ///< Config: (nntp) Encode the article subject in base64
+char *C_MimeTypeQueryCommand; ///< Config: External command to determine the MIME type of an attachment
+bool C_MimeTypeQueryFirst; ///< Config: Run the #C_MimeTypeQueryCommand before the mime.types lookup
+char *C_Sendmail; ///< Config: External command to send email
+short C_SendmailWait; ///< Config: Time to wait for sendmail to finish
+bool C_Use8bitmime; ///< Config: Use 8-bit messages and ESMTP to send messages
+bool C_UseEnvelopeFrom; ///< Config: Set the envelope sender of the message
+bool C_UserAgent; ///< Config: Add a 'User-Agent' head to outgoing mail
+short C_WrapHeaders; ///< Config: Width to wrap headers in outgoing messages
/**
* encode_quoted - Encode text as quoted printable
if (a->encoding != ENC_7BIT)
fprintf(f, "Content-Transfer-Encoding: %s\n", ENCODING(a->encoding));
- if (CryptProtectedHeadersWrite && a->mime_headers)
+ if (C_CryptProtectedHeadersWrite && a->mime_headers)
mutt_rfc822_write_header(f, a->mime_headers, NULL, MUTT_WRITE_HEADER_MIME, false, false);
/* Do NOT add the terminator here!!! */
{
char *chs = mutt_param_get(&b->parameter, "charset");
char *fchs = b->use_disp ?
- ((AttachCharset && *AttachCharset) ? AttachCharset : Charset) :
- Charset;
- if (Charset && (chs || SendCharset) &&
- convert_file_from_to(fp, fchs, chs ? chs : SendCharset, &fromcode,
+ ((C_AttachCharset && *C_AttachCharset) ? C_AttachCharset : C_Charset) :
+ C_Charset;
+ if (C_Charset && (chs || C_SendCharset) &&
+ convert_file_from_to(fp, fchs, chs ? chs : C_SendCharset, &fromcode,
&tocode, info) != (size_t)(-1))
{
if (!chs)
if (b && b->type == TYPE_TEXT && (!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"));
+ (!info->hibin ?
+ "us-ascii" :
+ C_Charset && !mutt_ch_is_us_ascii(C_Charset) ? C_Charset : "unknown-8bit"));
}
return info;
char send_charset[SHORT_STRING];
char *chsname = mutt_body_get_charset(b, send_charset, sizeof(send_charset));
if ((info->lobin && !mutt_str_startswith(chsname, "iso-2022", CASE_IGNORE)) ||
- info->linemax > 990 || (info->from && EncodeFrom))
+ info->linemax > 990 || (info->from && C_EncodeFrom))
{
b->encoding = ENC_QUOTED_PRINTABLE;
}
else if (info->hibin)
{
- b->encoding = Allow8bit ? ENC_8BIT : ENC_QUOTED_PRINTABLE;
+ b->encoding = C_Allow8bit ? ENC_8BIT : ENC_QUOTED_PRINTABLE;
}
else
{
{
if (info->lobin || info->hibin)
{
- if (Allow8bit && !info->lobin)
+ if (C_Allow8bit && !info->lobin)
b->encoding = ENC_8BIT;
else
mutt_message_to_7bit(b, NULL);
if (WithCrypto)
{
- if ((MimeForwardDecode || ForwardDecrypt) && (e->security & SEC_ENCRYPT))
+ if ((C_MimeForwardDecode || C_ForwardDecrypt) && (e->security & SEC_ENCRYPT))
{
if (!crypt_valid_passphrase(e->security))
return NULL;
chflags = CH_XMIT;
cmflags = 0;
- /* If we are attaching a message, ignore MimeForwardDecode */
- if (!attach_msg && MimeForwardDecode)
+ /* If we are attaching a message, ignore C_MimeForwardDecode */
+ if (!attach_msg && C_MimeForwardDecode)
{
chflags |= CH_MIME | CH_TXTPLAIN;
cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV;
if (WithCrypto & APPLICATION_SMIME)
pgp &= ~SMIME_ENCRYPT;
}
- else if ((WithCrypto != 0) && ForwardDecrypt && (e->security & SEC_ENCRYPT))
+ else if ((WithCrypto != 0) && C_ForwardDecrypt && (e->security & SEC_ENCRYPT))
{
if (((WithCrypto & APPLICATION_PGP) != 0) && mutt_is_multipart_encrypted(e->content))
{
int dummy = 0;
pid_t thepid;
- mutt_file_expand_fmt_quote(cmd, sizeof(cmd), MimeTypeQueryCommand, att->filename);
+ mutt_file_expand_fmt_quote(cmd, sizeof(cmd), C_MimeTypeQueryCommand, att->filename);
thepid = mutt_create_filter(cmd, NULL, &fp, &fperr);
if (thepid < 0)
struct Body *att = mutt_body_new();
att->filename = mutt_str_strdup(path);
- if (MimeTypeQueryCommand && *MimeTypeQueryCommand && MimeTypeQueryFirst)
+ if (C_MimeTypeQueryCommand && *C_MimeTypeQueryCommand && C_MimeTypeQueryFirst)
run_mime_type_query(att);
/* Attempt to determine the appropriate content-type based on the filename
if (!att->subtype)
mutt_lookup_mime_type(att, path);
- if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !MimeTypeQueryFirst)
+ if (!att->subtype && C_MimeTypeQueryCommand && *C_MimeTypeQueryCommand && !C_MimeTypeQueryFirst)
{
run_mime_type_query(att);
}
char *v = mutt_str_strdup(value);
bool display = (chflags & CH_DISPLAY);
- if (!display || Weed)
+ if (!display || C_Weed)
v = unfold_header(v);
/* when not displaying, use sane wrap value */
if (!display)
{
- if (WrapHeaders < 78 || WrapHeaders > 998)
+ if (C_WrapHeaders < 78 || C_WrapHeaders > 998)
wraplen = 78;
else
- wraplen = WrapHeaders;
+ wraplen = C_WrapHeaders;
}
else if (wraplen <= 0 || wraplen > MuttIndexWindow->cols)
wraplen = MuttIndexWindow->cols;
if (env->bcc)
{
if (mode == MUTT_WRITE_HEADER_POSTPONE || mode == MUTT_WRITE_HEADER_EDITHDRS ||
- (mode == MUTT_WRITE_HEADER_NORMAL && WriteBcc))
+ (mode == MUTT_WRITE_HEADER_NORMAL && C_WriteBcc))
{
fputs("Bcc: ", fp);
mutt_write_address_list(env->bcc, fp, 5, 0);
if (env->x_comment_to)
fprintf(fp, "X-Comment-To: %s\n", env->x_comment_to);
- else if (mode == MUTT_WRITE_HEADER_EDITHDRS && OptNewsSend && XCommentTo)
+ else if (mode == MUTT_WRITE_HEADER_EDITHDRS && OptNewsSend && C_XCommentTo)
fputs("X-Comment-To:\n", fp);
#endif
{
if (hide_protected_subject &&
(mode == MUTT_WRITE_HEADER_NORMAL || mode == MUTT_WRITE_HEADER_POSTPONE))
- mutt_write_one_header(fp, "Subject", CryptProtectedHeadersSubject, NULL, 0, 0);
+ mutt_write_one_header(fp, "Subject", C_CryptProtectedHeadersSubject, NULL, 0, 0);
else
mutt_write_one_header(fp, "Subject", env->subject, NULL, 0, 0);
}
}
}
- if (mode == MUTT_WRITE_HEADER_NORMAL && !privacy && UserAgent && !has_agent)
+ if (mode == MUTT_WRITE_HEADER_NORMAL && !privacy && C_UserAgent && !has_agent)
{
/* Add a vanity header */
fprintf(fp, "User-Agent: NeoMutt/%s%s\n", PACKAGE_VERSION, GitVer);
if (!tmp)
continue;
- rfc2047_encode(&tmp, NULL, i + 2, SendCharset);
+ rfc2047_encode(&tmp, NULL, i + 2, C_SendCharset);
mutt_mem_realloc(&np->data, i + 2 + mutt_str_strlen(tmp) + 1);
sprintf(np->data + i + 2, "%s", tmp);
*/
const char *mutt_fqdn(bool may_hide_host)
{
- if (!Hostname || (Hostname[0] == '@'))
+ if (!C_Hostname || (C_Hostname[0] == '@'))
return NULL;
- char *p = Hostname;
+ char *p = C_Hostname;
- if (may_hide_host && HiddenHost)
+ if (may_hide_host && C_HiddenHost)
{
- p = strchr(Hostname, '.');
+ p = strchr(C_Hostname, '.');
if (p)
p++;
*/
if (!p || !strchr(p, '.'))
- p = Hostname;
+ p = C_Hostname;
}
return p;
sigaddset(&set, SIGTSTP);
sigprocmask(SIG_BLOCK, &set, NULL);
- if (SendmailWait >= 0 && tempfile)
+ if (C_SendmailWait >= 0 && tempfile)
{
char tmp[PATH_MAX];
}
unlink(msg);
- if (SendmailWait >= 0 && tempfile && *tempfile)
+ if (C_SendmailWait >= 0 && tempfile && *tempfile)
{
/* *tempfile will be opened as stdout */
if (open(*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
_exit(S_ERR);
}
- /* SendmailWait > 0: interrupt waitpid() after SendmailWait seconds
- * SendmailWait = 0: wait forever
- * SendmailWait < 0: don't wait
+ /* C_SendmailWait > 0: interrupt waitpid() after C_SendmailWait seconds
+ * C_SendmailWait = 0: wait forever
+ * C_SendmailWait < 0: don't wait
*/
- if (SendmailWait > 0)
+ if (C_SendmailWait > 0)
{
SigAlrm = 0;
act.sa_handler = alarm_handler;
#endif
sigemptyset(&act.sa_mask);
sigaction(SIGALRM, &act, &oldalrm);
- alarm(SendmailWait);
+ alarm(C_SendmailWait);
}
- else if (SendmailWait < 0)
+ else if (C_SendmailWait < 0)
_exit(0xff & EX_OK);
if (waitpid(pid, &st, 0) > 0)
{
st = WIFEXITED(st) ? WEXITSTATUS(st) : S_ERR;
- if (SendmailWait && st == (0xff & EX_OK) && tempfile && *tempfile)
+ if (C_SendmailWait && st == (0xff & EX_OK) && tempfile && *tempfile)
{
unlink(*tempfile); /* no longer needed */
FREE(tempfile);
}
else
{
- st = (SendmailWait > 0 && errno == EINTR && SigAlrm) ? S_BKG : S_ERR;
- if (SendmailWait > 0 && tempfile && *tempfile)
+ st = (C_SendmailWait > 0 && errno == EINTR && SigAlrm) ? S_BKG : S_ERR;
+ if (C_SendmailWait > 0 && tempfile && *tempfile)
{
unlink(*tempfile);
FREE(tempfile);
}
}
- if (SendmailWait > 0)
+ if (C_SendmailWait > 0)
{
/* reset alarm; not really needed, but... */
alarm(0);
char cmd[LONG_STRING];
mutt_expando_format(cmd, sizeof(cmd), 0, MuttIndexWindow->cols,
- NONULL(Inews), nntp_format_str, 0, 0);
+ NONULL(C_Inews), nntp_format_str, 0, 0);
if (!*cmd)
{
i = nntp_post(Context->mailbox, msg);
}
else
#endif
- s = mutt_str_strdup(Sendmail);
+ s = mutt_str_strdup(C_Sendmail);
/* ensure that $sendmail is set to avoid a crash. http://dev.mutt.org/trac/ticket/3548 */
if (!s)
{
#endif
size_t extra_argslen = 0;
- /* If Sendmail contained a "--", we save the recipients to append to
+ /* If C_Sendmail contained a "--", we save the recipients to append to
* args after other possible options added below. */
if (ps)
{
}
}
- if (eightbit && Use8bitmime)
+ if (eightbit && C_Use8bitmime)
args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
- if (UseEnvelopeFrom)
+ if (C_UseEnvelopeFrom)
{
- if (EnvelopeFromAddress)
+ if (C_EnvelopeFromAddress)
{
args = add_option(args, &argslen, &argsmax, "-f");
- args = add_args(args, &argslen, &argsmax, EnvelopeFromAddress);
+ args = add_args(args, &argslen, &argsmax, C_EnvelopeFromAddress);
}
else if (from && !from->next)
{
}
}
- if (DsnNotify)
+ if (C_DsnNotify)
{
args = add_option(args, &argslen, &argsmax, "-N");
- args = add_option(args, &argslen, &argsmax, DsnNotify);
+ args = add_option(args, &argslen, &argsmax, C_DsnNotify);
}
- if (DsnReturn)
+ if (C_DsnReturn)
{
args = add_option(args, &argslen, &argsmax, "-R");
- args = add_option(args, &argslen, &argsmax, DsnReturn);
+ args = add_option(args, &argslen, &argsmax, C_DsnReturn);
}
args = add_option(args, &argslen, &argsmax, "--");
for (i = 0; i < extra_argslen; i++)
char date[SHORT_STRING];
int chflags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
- if (!BounceDelivered)
+ if (!C_BounceDelivered)
chflags |= CH_WEED_DELIVERED;
fseeko(fp, e->offset, SEEK_SET);
return -1;
}
#ifdef USE_SMTP
- if (SmtpUrl)
+ if (C_SmtpUrl)
rc = mutt_smtp_send(env_from, to, NULL, NULL, tempfile, e->content->encoding == ENC_8BIT);
else
#endif
* upon message criteria.
*/
if (!from->personal)
- from->personal = mutt_str_strdup(Realname);
+ from->personal = mutt_str_strdup(C_Realname);
if (fqdn)
mutt_addr_qualify(from, fqdn);
*/
mutt_rfc822_write_header(
msg->fp, e->env, e->content, post ? MUTT_WRITE_HEADER_POSTPONE : MUTT_WRITE_HEADER_NORMAL,
- false, CryptProtectedHeadersRead && mutt_should_hide_protected_subject(e));
+ false, C_CryptProtectedHeadersRead && mutt_should_hide_protected_subject(e));
/* (postponement) if this was a reply of some sort, <msgid> contains the
* Message-ID: of message replied to. Save it using a special X-Mutt-
if (e->security & SEC_SIGN)
{
fputc('S', msg->fp);
- if (PgpSignAs && *PgpSignAs)
- fprintf(msg->fp, "<%s>", PgpSignAs);
+ if (C_PgpSignAs && *C_PgpSignAs)
+ fprintf(msg->fp, "<%s>", C_PgpSignAs);
}
if (e->security & SEC_INLINE)
fputc('I', msg->fp);
if (e->security & SEC_ENCRYPT)
{
fputc('E', msg->fp);
- if (SmimeEncryptWith && *SmimeEncryptWith)
- fprintf(msg->fp, "C<%s>", SmimeEncryptWith);
+ if (C_SmimeEncryptWith && *C_SmimeEncryptWith)
+ fprintf(msg->fp, "C<%s>", C_SmimeEncryptWith);
}
if (e->security & SEC_OPPENCRYPT)
fputc('O', msg->fp);
if (e->security & SEC_SIGN)
{
fputc('S', msg->fp);
- if (SmimeSignAs && *SmimeSignAs)
- fprintf(msg->fp, "<%s>", SmimeSignAs);
+ if (C_SmimeSignAs && *C_SmimeSignAs)
+ fprintf(msg->fp, "<%s>", C_SmimeSignAs);
}
if (e->security & SEC_INLINE)
fputc('I', msg->fp);
struct ParameterList;
/* These Config Variables are only used in sendlib.c */
-extern bool Allow8bit;
-extern char *AttachCharset;
-extern bool BounceDelivered;
-extern bool EncodeFrom;
-extern bool ForwardDecrypt;
-extern bool HiddenHost;
-extern char *Inews;
-extern bool MimeForwardDecode;
-extern bool MimeSubject; /**< encode subject line with RFC2047 */
-extern char *MimeTypeQueryCommand;
-extern bool MimeTypeQueryFirst;
-extern char *Sendmail;
-extern short SendmailWait;
-extern bool Use8bitmime;
-extern bool UseEnvelopeFrom;
-extern bool UserAgent;
-extern short WrapHeaders;
+extern bool C_Allow8bit;
+extern char *C_AttachCharset;
+extern bool C_BounceDelivered;
+extern bool C_EncodeFrom;
+extern bool C_ForwardDecrypt;
+extern bool C_HiddenHost;
+extern char *C_Inews;
+extern bool C_MimeForwardDecode;
+extern bool C_MimeSubject; /**< encode subject line with RFC2047 */
+extern char *C_MimeTypeQueryCommand;
+extern bool C_MimeTypeQueryFirst;
+extern char *C_Sendmail;
+extern short C_SendmailWait;
+extern bool C_Use8bitmime;
+extern bool C_UseEnvelopeFrom;
+extern bool C_UserAgent;
+extern short C_WrapHeaders;
/**
* enum MuttWriteHeaderMode - Modes for mutt_rfc822_write_header()
#include "sort.h"
/* These Config Variables are only used in sidebar.c */
-short SidebarComponentDepth; ///< Config: (sidebar) Strip leading path components from sidebar folders
-char *SidebarDelimChars; ///< Config: (sidebar) Characters that separate nested folders
-char *SidebarDividerChar; ///< Config: (sidebar) Character to draw between the sidebar and index
-bool SidebarFolderIndent; ///< Config: (sidebar) Indent nested folders
-char *SidebarFormat; ///< Config: (sidebar) printf-like format string for the sidebar panel
-char *SidebarIndentString; ///< Config: (sidebar) Indent nested folders using this string
-bool SidebarNewMailOnly; ///< Config: (sidebar) Only show folders with new/flagged mail
-bool SidebarNextNewWrap; ///< Config: (sidebar) Wrap around when searching for the next mailbox with new mail
-bool SidebarShortPath; ///< Config: (sidebar) Abbreviate the paths using the Folder variable
-short SidebarSortMethod; ///< Config: (sidebar) Method to sort the sidebar
+short C_SidebarComponentDepth; ///< Config: (sidebar) Strip leading path components from sidebar folders
+char *C_SidebarDelimChars; ///< Config: (sidebar) Characters that separate nested folders
+char *C_SidebarDividerChar; ///< Config: (sidebar) Character to draw between the sidebar and index
+bool C_SidebarFolderIndent; ///< Config: (sidebar) Indent nested folders
+char *C_SidebarFormat; ///< Config: (sidebar) printf-like format string for the sidebar panel
+char *C_SidebarIndentString; ///< Config: (sidebar) Indent nested folders using this string
+bool C_SidebarNewMailOnly; ///< Config: (sidebar) Only show folders with new/flagged mail
+bool C_SidebarNextNewWrap; ///< Config: (sidebar) Wrap around when searching for the next mailbox with new mail
+bool C_SidebarShortPath; ///< Config: (sidebar) Abbreviate the paths using the #C_Folder variable
+short C_SidebarSortMethod; ///< Config: (sidebar) Method to sort the sidebar
/* Previous values for some sidebar config */
static short PreviousSort = SORT_ORDER; /* sidebar_sort_method */
if (optional)
{
- mutt_expando_format(buf, buflen, col, SidebarWidth, if_str,
+ mutt_expando_format(buf, buflen, col, C_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,
+ mutt_expando_format(buf, buflen, col, C_SidebarWidth, else_str,
sidebar_format_str, (unsigned long) sbe, flags);
}
mutt_str_strfcpy(sbe->box, box, sizeof(sbe->box));
- mutt_expando_format(buf, buflen, 0, width, NONULL(SidebarFormat),
+ mutt_expando_format(buf, buflen, 0, width, NONULL(C_SidebarFormat),
sidebar_format_str, (unsigned long) sbe, 0);
/* Force string to be exactly the right width */
int result = 0;
- switch ((SidebarSortMethod & SORT_MASK))
+ switch ((C_SidebarSortMethod & SORT_MASK))
{
case SORT_COUNT:
if (m2->msg_count == m1->msg_count)
}
}
- if (SidebarSortMethod & SORT_REVERSE)
+ if (C_SidebarSortMethod & SORT_REVERSE)
result = -result;
return result;
*/
static void update_entries_visibility(void)
{
- short new_only = SidebarNewMailOnly;
+ short new_only = C_SidebarNewMailOnly;
struct SbEntry *sbe = NULL;
for (int i = 0; i < EntryCount; i++)
{
*/
static void sort_entries(void)
{
- short ssm = (SidebarSortMethod & SORT_MASK);
+ short ssm = (C_SidebarSortMethod & SORT_MASK);
/* These are the only sort methods we understand */
if ((ssm == SORT_COUNT) || (ssm == SORT_UNREAD) || (ssm == SORT_FLAGGED) || (ssm == SORT_PATH))
qsort(Entries, EntryCount, sizeof(*Entries), cb_qsort_sbe);
- else if ((ssm == SORT_ORDER) && (SidebarSortMethod != PreviousSort))
+ else if ((ssm == SORT_ORDER) && (C_SidebarSortMethod != PreviousSort))
unsort_entries();
}
entry++;
if (entry == EntryCount)
{
- if (SidebarNextNewWrap)
+ if (C_SidebarNextNewWrap)
entry = 0;
else
return false;
entry--;
if (entry < 0)
{
- if (SidebarNextNewWrap)
+ if (C_SidebarNextNewWrap)
entry = EntryCount - 1;
else
return false;
HilIndex = i;
}
- if ((HilIndex < 0) || Entries[HilIndex]->is_hidden || (SidebarSortMethod != PreviousSort))
+ if ((HilIndex < 0) || Entries[HilIndex]->is_hidden || (C_SidebarSortMethod != PreviousSort))
{
if (OpnIndex >= 0)
HilIndex = OpnIndex;
/* Set the Top and Bottom to frame the HilIndex in groups of page_size */
- /* If SidebarNewMailOnly is set, some entries may be hidden so we
+ /* If C_SidebarNewMailOnly is set, some entries may be hidden so we
* need to scan for the framing interval */
- if (SidebarNewMailOnly)
+ if (C_SidebarNewMailOnly)
{
TopIndex = -1;
BotIndex = -1;
if (BotIndex > (EntryCount - 1))
BotIndex = EntryCount - 1;
- PreviousSort = SidebarSortMethod;
+ PreviousSort = C_SidebarSortMethod;
return true;
}
enum DivType altchar = SB_DIV_UTF8;
/* Calculate the width of the delimiter in screen cells */
- delim_len = mutt_strwidth(SidebarDividerChar);
+ delim_len = mutt_strwidth(C_SidebarDividerChar);
if (delim_len < 0)
{
delim_len = 1; /* Bad character */
}
else if (delim_len == 0)
{
- if (SidebarDividerChar)
+ if (C_SidebarDividerChar)
return 0; /* User has set empty string */
delim_len = 1; /* Unset variable */
altchar = SB_DIV_USER; /* User config */
}
- if (AsciiChars && (altchar != SB_DIV_ASCII))
+ if (C_AsciiChars && (altchar != SB_DIV_ASCII))
{
/* $ascii_chars overrides Unicode divider chars */
if (altchar == SB_DIV_UTF8)
{
altchar = SB_DIV_ASCII;
}
- else if (SidebarDividerChar)
+ else if (C_SidebarDividerChar)
{
for (int i = 0; i < delim_len; i++)
{
- if (SidebarDividerChar[i] & ~0x7F) /* high-bit is set */
+ if (C_SidebarDividerChar[i] & ~0x7F) /* high-bit is set */
{
altchar = SB_DIV_ASCII;
delim_len = 1;
SETCOLOR(MT_COLOR_DIVIDER);
- int col = SidebarOnRight ? 0 : (SidebarWidth - delim_len);
+ int col = C_SidebarOnRight ? 0 : (C_SidebarWidth - delim_len);
for (int i = 0; i < num_rows; i++)
{
switch (altchar)
{
case SB_DIV_USER:
- addstr(NONULL(SidebarDividerChar));
+ addstr(NONULL(C_SidebarDividerChar));
break;
case SB_DIV_ASCII:
addch('|');
/* Fill the remaining rows with blank space */
NORMAL_COLOR;
- if (!SidebarOnRight)
+ if (!C_SidebarOnRight)
div_width = 0;
for (int r = 0; r < num_rows; r++)
{
if (TopIndex < 0)
return;
- int w = MIN(num_cols, (SidebarWidth - div_width));
+ int w = MIN(num_cols, (C_SidebarWidth - div_width));
int row = 0;
for (int entryidx = TopIndex; (entryidx < EntryCount) && (row < num_rows); entryidx++)
{
else if (m->msg_flagged > 0)
SETCOLOR(MT_COLOR_FLAGGED);
else if ((ColorDefs[MT_COLOR_SB_SPOOLFILE] != 0) &&
- (mutt_str_strcmp(m->path, Spoolfile) == 0))
+ (mutt_str_strcmp(m->path, C_Spoolfile) == 0))
{
SETCOLOR(MT_COLOR_SB_SPOOLFILE);
}
}
int col = 0;
- if (SidebarOnRight)
+ if (C_SidebarOnRight)
col = div_width;
mutt_window_move(MuttSidebarWindow, row, col);
m->msg_flagged = Context->mailbox->msg_flagged;
}
- /* compute length of Folder without trailing separator */
- size_t maildirlen = mutt_str_strlen(Folder);
- if (maildirlen && SidebarDelimChars && strchr(SidebarDelimChars, Folder[maildirlen - 1]))
+ /* compute length of C_Folder without trailing separator */
+ size_t maildirlen = mutt_str_strlen(C_Folder);
+ if (maildirlen && C_SidebarDelimChars &&
+ strchr(C_SidebarDelimChars, C_Folder[maildirlen - 1]))
maildirlen--;
- /* check whether Folder is a prefix of the current folder's path */
+ /* check whether C_Folder is a prefix of the current folder's path */
bool maildir_is_prefix = false;
if ((mutt_str_strlen(m->path) > maildirlen) &&
- (mutt_str_strncmp(Folder, m->path, maildirlen) == 0) &&
- SidebarDelimChars && strchr(SidebarDelimChars, m->path[maildirlen]))
+ (mutt_str_strncmp(C_Folder, m->path, maildirlen) == 0) &&
+ C_SidebarDelimChars && strchr(C_SidebarDelimChars, m->path[maildirlen]))
{
maildir_is_prefix = true;
}
/* calculate depth of current folder and generate its display name with indented spaces */
int sidebar_folder_depth = 0;
char *sidebar_folder_name = NULL;
- if (SidebarShortPath)
+ if (C_SidebarShortPath)
{
/* disregard a trailing separator, so strlen() - 2 */
sidebar_folder_name = m->path;
for (int i = mutt_str_strlen(sidebar_folder_name) - 2; i >= 0; i--)
{
- if (SidebarDelimChars && strchr(SidebarDelimChars, sidebar_folder_name[i]))
+ if (C_SidebarDelimChars && strchr(C_SidebarDelimChars, sidebar_folder_name[i]))
{
sidebar_folder_name += (i + 1);
break;
}
}
}
- else if ((SidebarComponentDepth > 0) && SidebarDelimChars)
+ else if ((C_SidebarComponentDepth > 0) && C_SidebarDelimChars)
{
sidebar_folder_name = m->path + maildir_is_prefix * (maildirlen + 1);
- for (int i = 0; i < SidebarComponentDepth; i++)
+ for (int i = 0; i < C_SidebarComponentDepth; i++)
{
- char *chars_after_delim = strpbrk(sidebar_folder_name, SidebarDelimChars);
+ char *chars_after_delim = strpbrk(sidebar_folder_name, C_SidebarDelimChars);
if (!chars_after_delim)
break;
else
{
sidebar_folder_name = m->desc;
}
- else if (maildir_is_prefix && SidebarFolderIndent)
+ else if (maildir_is_prefix && C_SidebarFolderIndent)
{
int lastsep = 0;
const char *tmp_folder_name = m->path + maildirlen + 1;
int tmplen = (int) mutt_str_strlen(tmp_folder_name) - 1;
for (int i = 0; i < tmplen; i++)
{
- if (SidebarDelimChars && strchr(SidebarDelimChars, tmp_folder_name[i]))
+ if (C_SidebarDelimChars && strchr(C_SidebarDelimChars, tmp_folder_name[i]))
{
sidebar_folder_depth++;
lastsep = i + 1;
}
if (sidebar_folder_depth > 0)
{
- if (SidebarShortPath)
+ if (C_SidebarShortPath)
tmp_folder_name += lastsep; /* basename */
int sfn_len = mutt_str_strlen(tmp_folder_name) +
- sidebar_folder_depth * mutt_str_strlen(SidebarIndentString) + 1;
+ sidebar_folder_depth * mutt_str_strlen(C_SidebarIndentString) + 1;
sidebar_folder_name = mutt_mem_malloc(sfn_len);
sidebar_folder_name[0] = 0;
for (int i = 0; i < sidebar_folder_depth; i++)
- mutt_str_strcat(sidebar_folder_name, sfn_len, NONULL(SidebarIndentString));
+ mutt_str_strcat(sidebar_folder_name, sfn_len, NONULL(C_SidebarIndentString));
mutt_str_strcat(sidebar_folder_name, sfn_len, tmp_folder_name);
}
}
*/
void mutt_sb_draw(void)
{
- if (!SidebarVisible)
+ if (!C_SidebarVisible)
return;
#ifdef USE_SLANG_CURSES
*/
void mutt_sb_change_mailbox(int op)
{
- if (!SidebarVisible)
+ if (!C_SidebarVisible)
return;
if (HilIndex < 0) /* It'll get reset on the next draw */
*/
struct Mailbox *mutt_sb_get_highlight(void)
{
- if (!SidebarVisible)
+ if (!C_SidebarVisible)
return NULL;
if (!EntryCount || (HilIndex < 0))
struct Context;
/* These Config Variables are only used in sidebar.c */
-extern short SidebarComponentDepth;
-extern char *SidebarDelimChars;
-extern char *SidebarDividerChar;
-extern bool SidebarFolderIndent;
-extern char *SidebarFormat;
-extern char *SidebarIndentString;
-extern bool SidebarNewMailOnly;
-extern bool SidebarNextNewWrap;
-extern bool SidebarShortPath;
-extern short SidebarSortMethod;
+extern short C_SidebarComponentDepth;
+extern char *C_SidebarDelimChars;
+extern char *C_SidebarDividerChar;
+extern bool C_SidebarFolderIndent;
+extern char *C_SidebarFormat;
+extern char *C_SidebarIndentString;
+extern bool C_SidebarNewMailOnly;
+extern bool C_SidebarNextNewWrap;
+extern bool C_SidebarShortPath;
+extern short C_SidebarSortMethod;
void mutt_sb_change_mailbox(int op);
void mutt_sb_draw(void);
#endif
/* These Config Variables are only used in smtp.c */
-char *SmtpAuthenticators; ///< Config: (smtp) List of allowed authentication methods
+char *C_SmtpAuthenticators; ///< Config: (smtp) List of allowed authentication methods
#define smtp_success(x) ((x) / 100 == 2)
#define SMTP_READY 334
a = a->next;
continue;
}
- if ((Capabilities & SMTP_CAP_DSN) && DsnNotify)
- snprintf(buf, sizeof(buf), "RCPT TO:<%s> NOTIFY=%s\r\n", a->mailbox, DsnNotify);
+ if ((Capabilities & SMTP_CAP_DSN) && C_DsnNotify)
+ snprintf(buf, sizeof(buf), "RCPT TO:<%s> NOTIFY=%s\r\n", a->mailbox, C_DsnNotify);
else
snprintf(buf, sizeof(buf), "RCPT TO:<%s>\r\n", a->mailbox);
if (mutt_socket_send(conn, buf) == -1)
stat(msgfile, &st);
unlink(msgfile);
mutt_progress_init(&progress, _("Sending message..."), MUTT_PROGRESS_SIZE,
- NetInc, st.st_size);
+ C_NetInc, st.st_size);
snprintf(buf, sizeof(buf), "DATA\r\n");
if (mutt_socket_send(conn, buf) == -1)
account->port = 0;
account->type = MUTT_ACCT_TYPE_SMTP;
- struct Url *url = url_parse(SmtpUrl);
+ struct Url *url = url_parse(C_SmtpUrl);
if (!url || (url->scheme != U_SMTP && url->scheme != U_SMTPS) || !url->host ||
mutt_account_fromurl(account, url) < 0)
{
url_free(&url);
- mutt_error(_("Invalid SMTP URL: %s"), SmtpUrl);
+ mutt_error(_("Invalid SMTP URL: %s"), C_SmtpUrl);
return -1;
}
if (conn->account.flags & MUTT_ACCT_USER)
esmtp = true;
#ifdef USE_SSL
- if (SslForceTls || SslStarttls != MUTT_NO)
+ if (C_SslForceTls || C_SslStarttls != MUTT_NO)
esmtp = true;
#endif
}
{
int r = SMTP_AUTH_UNAVAIL;
- if (SmtpAuthenticators && *SmtpAuthenticators)
+ if (C_SmtpAuthenticators && *C_SmtpAuthenticators)
{
- char *methods = mutt_str_strdup(SmtpAuthenticators);
+ char *methods = mutt_str_strdup(C_SmtpAuthenticators);
char *method = NULL;
char *delim = NULL;
#ifdef USE_SSL
if (conn->ssf)
rc = MUTT_NO;
- else if (SslForceTls)
+ else if (C_SslForceTls)
rc = MUTT_YES;
else if ((Capabilities & SMTP_CAP_STARTTLS) &&
- (rc = query_quadoption(SslStarttls,
+ (rc = query_quadoption(C_SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
{
return rc;
/* it might be better to synthesize an envelope from from user and host
* but this condition is most likely arrived at accidentally */
- if (EnvelopeFromAddress)
- envfrom = EnvelopeFromAddress->mailbox;
+ if (C_EnvelopeFromAddress)
+ envfrom = C_EnvelopeFromAddress->mailbox;
else if (from)
envfrom = from->mailbox;
else
mutt_str_strncat(buf, sizeof(buf), " BODY=8BITMIME", 15);
len += 14;
}
- if (DsnReturn && (Capabilities & SMTP_CAP_DSN))
- len += snprintf(buf + len, sizeof(buf) - len, " RET=%s", DsnReturn);
+ if (C_DsnReturn && (Capabilities & SMTP_CAP_DSN))
+ len += snprintf(buf + len, sizeof(buf) - len, " RET=%s", C_DsnReturn);
if ((Capabilities & SMTP_CAP_SMTPUTF8) &&
(address_uses_unicode(envfrom) || addresses_use_unicode(to) ||
addresses_use_unicode(cc) || addresses_use_unicode(bcc)))
struct Address;
/* These Config Variables are only used in smtp.c */
-extern char *SmtpAuthenticators;
+extern char *C_SmtpAuthenticators;
#ifdef USE_SMTP
int mutt_smtp_send(const struct Address *from, const struct Address *to, const struct Address *cc, const struct Address *bcc, const char *msgfile, bool eightbit);
#endif
/* These Config Variables are only used in sort.c */
-bool ReverseAlias; ///< Config: Display the alias in the index, rather than the message's sender
+bool C_ReverseAlias; ///< Config: Display the alias in the index, rather than the message's sender
/* function to use as discriminator when normal sort method is equal */
static sort_t *AuxSort = NULL;
if (a)
{
- if (ReverseAlias && (ali = mutt_alias_reverse_lookup(a)) && ali->personal)
+ if (C_ReverseAlias && (ali = mutt_alias_reverse_lookup(a)) && ali->personal)
return ali->personal;
else if (a->personal)
return a->personal;
if (!ctx->mailbox->quiet)
mutt_message(_("Sorting mailbox..."));
- if (OptNeedRescore && Score)
+ if (OptNeedRescore && C_Score)
{
for (int i = 0; i < ctx->mailbox->msg_count; i++)
mutt_score_message(ctx->mailbox, ctx->mailbox->emails[i], true);
if (init && ctx->tree)
mutt_clear_threads(ctx);
- if ((Sort & SORT_MASK) == SORT_THREADS)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS)
{
AuxSort = NULL;
/* if $sort_aux changed after the mailbox is sorted, then all the
subthreads need to be resorted */
if (OptSortSubthreads)
{
- int i = Sort;
- Sort = SortAux;
+ int i = C_Sort;
+ C_Sort = C_SortAux;
if (ctx->tree)
ctx->tree = mutt_sort_subthreads(ctx->tree, true);
- Sort = i;
+ C_Sort = i;
OptSortSubthreads = false;
}
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(C_Sort)) ||
+ !(AuxSort = mutt_get_sort_func(C_SortAux)))
{
mutt_error(_("Could not find sorting function [report this bug]"));
return;
}
/* re-collapse threads marked as collapsed */
- if ((Sort & SORT_MASK) == SORT_THREADS)
+ if ((C_Sort & SORT_MASK) == SORT_THREADS)
{
top = ctx->tree;
while ((thread = top))
struct Context;
/* These Config Variables are only used in sort.c */
-extern bool ReverseAlias;
+extern bool C_ReverseAlias;
-#define SORTCODE(x) ((OptAuxSort ? SortAux : Sort) & SORT_REVERSE) ? -(x) : x
+#define SORTCODE(x) ((OptAuxSort ? C_SortAux : C_Sort) & SORT_REVERSE) ? -(x) : x
/**
* typedef sort_t - Prototype for a function to compare two emails
const char *mutt_get_name(struct Address *a);
/* These variables are backing for config items */
-WHERE short Sort; ///< Config: Sort method for the index
-WHERE short SortAux; ///< Config: Secondary sort method for the index
+WHERE short C_Sort; ///< Config: Sort method for the index
+WHERE short C_SortAux; ///< Config: Secondary sort method for the index
/* FIXME: This one does not belong to here */
-WHERE short PgpSortKeys; ///< Config: Sort order for PGP keys
+WHERE short C_PgpSortKeys; ///< Config: Sort order for PGP keys
#endif /* MUTT_SORT_H */
{
if (!s || !s->fp_out)
return;
- if ((s->flags & MUTT_DISPLAY) && (mutt_str_strcmp(Pager, "builtin") == 0))
+ if ((s->flags & MUTT_DISPLAY) && (mutt_str_strcmp(C_Pager, "builtin") == 0))
state_puts(AttachmentMarker, s);
}
*/
void state_mark_protected_header(struct State *s)
{
- if ((s->flags & MUTT_DISPLAY) && (mutt_str_strcmp(Pager, "builtin") == 0))
+ if ((s->flags & MUTT_DISPLAY) && (mutt_str_strcmp(C_Pager, "builtin") == 0))
state_puts(ProtectedHeaderMarker, s);
}
#include "sort.h"
/* These Config Variables are only used in status.c */
-struct MbTable *StatusChars; ///< Config: Indicator characters for the status bar
+struct MbTable *C_StatusChars; ///< Config: Indicator characters for the status bar
/**
* get_sort_str - Get the sort method as a string
0);
}
- if (!StatusChars || !StatusChars->len)
+ if (!C_StatusChars || !C_StatusChars->len)
buf[0] = 0;
- else if (i >= StatusChars->len)
- snprintf(buf, buflen, "%s", StatusChars->chars[0]);
+ else if (i >= C_StatusChars->len)
+ snprintf(buf, buflen, "%s", C_StatusChars->chars[0]);
else
- snprintf(buf, buflen, "%s", StatusChars->chars[i]);
+ snprintf(buf, buflen, "%s", C_StatusChars->chars[i]);
break;
}
case 's':
snprintf(fmt, sizeof(fmt), "%%%ss", prec);
- snprintf(buf, buflen, fmt, get_sort_str(tmp, sizeof(tmp), Sort));
+ snprintf(buf, buflen, fmt, get_sort_str(tmp, sizeof(tmp), C_Sort));
break;
case 'S':
snprintf(fmt, sizeof(fmt), "%%%ss", prec);
- snprintf(buf, buflen, fmt, get_sort_str(tmp, sizeof(tmp), SortAux));
+ snprintf(buf, buflen, fmt, get_sort_str(tmp, sizeof(tmp), C_SortAux));
break;
case 't':
struct Menu;
/* These Config Variables are only used in status.c */
-extern struct MbTable *StatusChars;
+extern struct MbTable *C_StatusChars;
void menu_status_line(char *buf, size_t buflen, struct Menu *menu, const char *p);
return;
}
- Charset = "utf-8";
+ C_Charset = "utf-8";
for (size_t i = 0; i < mutt_array_size(test_data); ++i)
{