Rename lots of constants to match the user-facing config names.
e.g.
"certificate_file" SslCertFile -> CertificateFile
"nm_open_timeout" NotmuchOpenTimeout -> NmOpenTimeout
static void alias_entry(char *s, size_t slen, struct Menu *m, int num)
{
- mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(AliasFmt), alias_format_str,
+ mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(AliasFormat), alias_format_str,
(unsigned long) ((struct Alias **) m->data)[num],
MUTT_FORMAT_ARROWCURSOR);
}
if (!a || !a->mailbox)
return NULL;
- return hash_find(ReverseAlias, a->mailbox);
+ return hash_find(ReverseAliases, a->mailbox);
}
void mutt_alias_add_reverse(struct Alias *t)
for (ap = t->addr; ap; ap = ap->next)
{
if (!ap->group && ap->mailbox)
- hash_insert(ReverseAlias, ap->mailbox, ap);
+ hash_insert(ReverseAliases, ap->mailbox, ap);
}
}
for (ap = t->addr; ap; ap = ap->next)
{
if (!ap->group && ap->mailbox)
- hash_delete(ReverseAlias, ap->mailbox, ap, NULL);
+ hash_delete(ReverseAliases, ap->mailbox, ap, NULL);
}
}
mutt_debug(5, "mutt_addr_is_user: yes, %s = %s\n", addr->mailbox, Username);
return true;
}
- if (string_is_address(addr->mailbox, Username, Hostname))
+ if (string_is_address(addr->mailbox, Username, ShortHostname))
{
- mutt_debug(5, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, Hostname);
+ mutt_debug(5, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, ShortHostname);
return true;
}
fqdn = mutt_fqdn(0);
if ((mutt_strcasecmp("text/plain", type) == 0) ||
(mutt_strcasecmp("application/postscript", type) == 0))
{
- return (mutt_pipe_attachment(fp, a, NONULL(PrintCmd), NULL));
+ return (mutt_pipe_attachment(fp, a, NONULL(PrintCommand), NULL));
}
else if (mutt_can_decode(a))
{
mutt_debug(2, "successfully opened %s read-only\n", newfile);
mutt_endwin(NULL);
- if ((thepid = mutt_create_filter(NONULL(PrintCmd), &fpout, NULL, NULL)) < 0)
+ if ((thepid = mutt_create_filter(NONULL(PrintCommand), &fpout, NULL, NULL)) < 0)
{
mutt_perror(_("Can't create filter"));
goto bail0;
int r = mutt_inbox_cmp(pa->name, pb->name);
if (r == 0)
r = mutt_strcoll(pa->name, pb->name);
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
static int browser_compare_desc(const void *a, const void *b)
int r = mutt_strcoll(pa->desc, pb->desc);
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
static int browser_compare_date(const void *a, const void *b)
int r = pa->mtime - pb->mtime;
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
static int browser_compare_size(const void *a, const void *b)
int r = pa->size - pb->size;
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
static int browser_compare_count(const void *a, const void *b)
else
r = 1;
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
static int browser_compare_count_new(const void *a, const void *b)
else
r = 1;
- return ((BrowserSort & SORT_REVERSE) ? -r : r);
+ return ((SortBrowser & SORT_REVERSE) ? -r : r);
}
/**
if ((mutt_strcoll(pb->desc, "../") == 0) || (mutt_strcoll(pb->desc, "..") == 0))
return 1;
- switch (BrowserSort & SORT_MASK)
+ switch (SortBrowser & SORT_MASK)
{
case SORT_DATE:
return browser_compare_date(a, b);
*/
static void browser_sort(struct BrowserState *state)
{
- switch (BrowserSort & SORT_MASK)
+ switch (SortBrowser & SORT_MASK)
{
/* Also called "I don't care"-sort-method. */
case SORT_ORDER:
if (op == 'D')
{
- t_fmt = NONULL(DateFmt);
+ t_fmt = NONULL(DateFormat);
if (*t_fmt == '!')
{
t_fmt++;
#ifdef USE_NNTP
if (option(OPT_NEWS))
- mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(GroupFormat), newsgroup_format_str,
+ mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(GroupIndexFormat), newsgroup_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
else
#endif
folder.ff = &((struct FolderFile *) menu->data)[num];
folder.num = num;
- mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(VirtFolderFormat),
+ mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(VfolderFormat),
folder_format_str, (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
}
#endif
int buffy = (flags & MUTT_SEL_BUFFY) ? 1 : 0;
/* Keeps in memory the directory we were in when hitting '='
- * to go directly to $folder (Maildir)
+ * to go directly to $folder (Folder)
*/
char GotoSwapper[_POSIX_PATH_MAX] = "";
*/
short browser_track;
- switch (BrowserSort & SORT_MASK)
+ switch (SortBrowser & SORT_MASK)
{
case SORT_DESC:
case SORT_SUBJECT:
case MUTT_MH:
case MUTT_MAILDIR:
case MUTT_IMAP:
- if (Maildir)
- strfcpy(LastDir, NONULL(Maildir), sizeof(LastDir));
+ if (Folder)
+ strfcpy(LastDir, NONULL(Folder), sizeof(LastDir));
else if (SpoolFile)
mutt_browser_select_dir(SpoolFile);
break;
break;
case 1: /* (d)ate */
- BrowserSort = SORT_DATE;
+ SortBrowser = SORT_DATE;
break;
case 2: /* (a)lpha */
- BrowserSort = SORT_SUBJECT;
+ SortBrowser = SORT_SUBJECT;
break;
case 3: /* si(z)e */
- BrowserSort = SORT_SIZE;
+ SortBrowser = SORT_SIZE;
break;
case 4: /* d(e)scription */
- BrowserSort = SORT_DESC;
+ SortBrowser = SORT_DESC;
break;
case 5: /* (c)ount */
- BrowserSort = SORT_COUNT;
+ SortBrowser = SORT_COUNT;
break;
case 6: /* ne(w) count */
- BrowserSort = SORT_UNREAD;
+ SortBrowser = SORT_UNREAD;
break;
case 7: /* do(n)'t sort */
- BrowserSort = SORT_ORDER;
+ SortBrowser = SORT_ORDER;
resort = 0;
break;
}
if (resort)
{
- BrowserSort |= reverse ? SORT_REVERSE : 0;
+ SortBrowser |= reverse ? SORT_REVERSE : 0;
browser_sort(&state);
browser_highlight_default(&state, menu);
menu->redraw = REDRAW_FULL;
if (i == OP_BROWSER_GOTO_FOLDER)
{
/* When in mailboxes mode, disables this feature */
- if (Maildir)
+ if (Folder)
{
- mutt_debug(5, "= hit! Maildir: %s, LastDir: %s\n", Maildir, LastDir);
+ mutt_debug(5, "= hit! Folder: %s, LastDir: %s\n", Folder, LastDir);
if (!GotoSwapper[0])
{
- if (mutt_strcmp(LastDir, Maildir) != 0)
+ if (mutt_strcmp(LastDir, Folder) != 0)
{
- /* Stores into GotoSwapper LastDir, and swaps to Maildir */
+ /* Stores into GotoSwapper LastDir, and swaps to Folder */
strfcpy(GotoSwapper, LastDir, sizeof(GotoSwapper));
strfcpy(OldLastDir, LastDir, sizeof(OldLastDir));
- strfcpy(LastDir, Maildir, sizeof(LastDir));
+ strfcpy(LastDir, Folder, sizeof(LastDir));
}
}
else
* mutt_buffy_check - Check all Incoming for new mail
*
* Check all Incoming for new mail and total/new/flagged messages
- * force: if true, ignore BuffyTimeout and check for new mail anyway
+ * force: if true, ignore MailCheck and check for new mail anyway
*/
int mutt_buffy_check(bool force)
{
return 0;
t = time(NULL);
- if (!force && (t - BuffyTime < BuffyTimeout))
+ if (!force && (t - BuffyTime < MailCheck))
return BuffyCount;
- if (option(OPT_MAIL_CHECK_STATS) && (t - BuffyStatsTime >= BuffyCheckStatsInterval))
+ if (option(OPT_MAIL_CHECK_STATS) && (t - BuffyStatsTime >= MailCheckStatsInterval))
{
check_stats = true;
BuffyStatsTime = t;
};
WHERE struct Buffy *Incoming;
-WHERE short BuffyTimeout;
-WHERE short BuffyCheckStatsInterval;
+WHERE short MailCheck;
+WHERE short MailCheckStatsInterval;
#ifdef USE_NOTMUCH
void mutt_buffy_vfolder(char *s, size_t slen);
hfi.pager_progress = ExtPagerProgress;
hfi.hdr = cur;
mutt_make_string_info(buf, sizeof(buf), MuttIndexWindow->cols,
- NONULL(PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT);
+ NONULL(PagerFormat), &hfi, MUTT_FORMAT_MAKEPRINT);
fputs(buf, fpout);
fputs("\n\n", fpout);
}
void mutt_print_message(struct Header *h)
{
- if (quadoption(OPT_PRINT) && (!PrintCmd || !*PrintCmd))
+ if (quadoption(OPT_PRINT) && (!PrintCommand || !*PrintCommand))
{
mutt_message(_("No printing command has been defined."));
return;
h ? _("Print message?") : _("Print tagged messages?")) != MUTT_YES)
return;
- if (_mutt_pipe_message(h, PrintCmd, option(OPT_PRINT_DECODE), 1,
+ if (_mutt_pipe_message(h, PrintCommand, option(OPT_PRINT_DECODE), 1,
option(OPT_PRINT_SPLIT), "\f") == 0)
mutt_message(h ? _("Message printed") : _("Messages printed"));
else
if (*s == '!')
p = NONULL(SpoolFile);
else
- p = NONULL(Maildir);
+ p = NONULL(Folder);
mutt_concat_path(imap_path, p, s + 1, sizeof(imap_path));
}
if (*s == '!')
strfcpy(exp_dirpart, NONULL(SpoolFile), sizeof(exp_dirpart));
else
- strfcpy(exp_dirpart, NONULL(Maildir), sizeof(exp_dirpart));
+ strfcpy(exp_dirpart, NONULL(Folder), sizeof(exp_dirpart));
if ((p = strrchr(s, '/')))
{
char buf[_POSIX_PATH_MAX];
}
if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME) &&
- (msg->security & ENCRYPT) && SmimeCryptAlg && *SmimeCryptAlg)
+ (msg->security & ENCRYPT) && SmimeEncryptWith && *SmimeEncryptWith)
{
SETCOLOR(MT_COLOR_COMPOSE_HEADER);
mutt_window_mvprintw(MuttIndexWindow, HDR_CRYPTINFO, 40, "%s",
_("Encrypt with: "));
NORMAL_COLOR;
- printw("%s", NONULL(SmimeCryptAlg));
+ printw("%s", NONULL(SmimeEncryptWith));
}
}
* compose_format_str - Format strings like printf()
*
* * \%a Total number of attachments
- * * \%h Hostname [option]
+ * * \%h ShortHostname [option]
* * \%l Approx. length of current message (in bytes)
* * \%v Mutt version
*
case 'h': /* hostname */
snprintf(fmt, sizeof(fmt), "%%%ss", prefix);
- snprintf(buf, buflen, fmt, NONULL(Hostname));
+ snprintf(buf, buflen, fmt, NONULL(ShortHostname));
break;
case 'l': /* approx length of current message in bytes */
ctx->magic = mx_get_magic(ctx->path);
}
else
- ctx->magic = DefaultMagic;
+ ctx->magic = MboxType;
/* We can only deal with mbox and mmdf mailboxes */
if ((ctx->magic != MUTT_MBOX) && (ctx->magic != MUTT_MMDF))
if (option(OPT_TEXT_FLOWED))
strfcpy(prefix, ">", sizeof(prefix));
else
- _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
+ _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
}
if (hdr->xlabel_changed)
#define CH_DECODE (1 << 2) /**< do RFC1522 decoding? */
#define CH_XMIT (1 << 3) /**< transmitting this message? */
#define CH_FROM (1 << 4) /**< retain the "From " message separator? */
-#define CH_PREFIX (1 << 5) /**< use Prefix string? */
+#define CH_PREFIX (1 << 5) /**< use IndentString string? */
#define CH_NOSTATUS (1 << 6) /**< suppress the status and x-status fields */
#define CH_REORDER (1 << 7) /**< Re-order output of headers */
#define CH_NONEWLINE (1 << 8) /**< don't output terminating newline */
}
}
- _mutt_make_string(s, l, NONULL(HdrFmt), Context, h, flag);
+ _mutt_make_string(s, l, NONULL(IndexFormat), Context, h, flag);
}
int index_color(int index_no)
if (menu->redraw & REDRAW_STATUS)
{
- menu_status_line(buf, sizeof(buf), menu, NONULL(Status));
+ menu_status_line(buf, sizeof(buf), menu, NONULL(StatusFormat));
mutt_window_move(MuttStatusWindow, 0, 0);
SETCOLOR(MT_COLOR_STATUS);
mutt_draw_statusline(MuttStatusWindow->cols, buf, sizeof(buf));
mutt_message(_("New mail in this mailbox."));
if (option(OPT_BEEP_NEW))
beep();
- if (NewMailCmd)
+ if (NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCommand));
mutt_system(cmd);
}
break;
menu->redraw |= REDRAW_STATUS;
if (option(OPT_BEEP_NEW))
beep();
- if (NewMailCmd)
+ if (NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCommand));
mutt_system(cmd);
}
}
case OP_MAIN_WINDOWED_VFOLDER_BACKWARD:
mutt_debug(2, "OP_MAIN_WINDOWED_VFOLDER_BACKWARD\n");
- if (NotmuchQueryWindowDuration <= 0)
+ if (NmQueryWindowDuration <= 0)
{
mutt_message(_("Windowed queries disabled."));
break;
}
- if (!NotmuchQueryWindowCurrentSearch)
+ if (!NmQueryWindowCurrentSearch)
{
mutt_message(_("No notmuch vfolder currently loaded."));
break;
}
nm_query_window_backward();
- strncpy(buf, NotmuchQueryWindowCurrentSearch, sizeof(buf));
+ strncpy(buf, NmQueryWindowCurrentSearch, sizeof(buf));
if (!nm_uri_from_query(Context, buf, sizeof(buf)))
mutt_message(_("Failed to create query, aborting."));
else
break;
case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
- if (NotmuchQueryWindowDuration <= 0)
+ if (NmQueryWindowDuration <= 0)
{
mutt_message(_("Windowed queries disabled."));
break;
}
- if (!NotmuchQueryWindowCurrentSearch)
+ if (!NmQueryWindowCurrentSearch)
{
mutt_message(_("No notmuch vfolder currently loaded."));
break;
}
nm_query_window_forward();
- strncpy(buf, NotmuchQueryWindowCurrentSearch, sizeof(buf));
+ strncpy(buf, NmQueryWindowCurrentSearch, sizeof(buf));
if (!nm_uri_from_query(Context, buf, sizeof(buf)))
mutt_message(_("Failed to create query, aborting."));
else
tmp[sizeof(tmp) - 1] = '\0';
if (prefix)
{
- strfcpy(tmp, NONULL(Prefix), sizeof(tmp));
+ strfcpy(tmp, NONULL(IndentString), sizeof(tmp));
tmplen = mutt_strlen(tmp);
p = tmp + tmplen;
tmplen = sizeof(tmp) - tmplen;
}
addch('\n');
- if (EscChar && tmp[0] == EscChar[0] && tmp[1] != EscChar[0])
+ if (Escape && tmp[0] == Escape[0] && tmp[1] != Escape[0])
{
/* remove trailing whitespace from the line */
p = tmp + mutt_strlen(tmp) - 1;
mutt_mktemp(tmp, sizeof(tmp));
- omagic = DefaultMagic;
- DefaultMagic = MUTT_MBOX;
+ omagic = MboxType;
+ MboxType = MUTT_MBOX;
rc = (mx_open_mailbox(tmp, MUTT_NEWFOLDER, &tmpctx) == NULL) ? -1 : 0;
- DefaultMagic = omagic;
+ MboxType = omagic;
if (rc == -1)
{
WHERE char ErrorBuf[STRING];
WHERE char AttachmentMarker[STRING];
-WHERE struct Address *EnvFrom;
+WHERE struct Address *EnvelopeFromAddress;
WHERE struct Address *From;
WHERE char *AliasFile;
-WHERE char *AliasFmt;
+WHERE char *AliasFormat;
WHERE char *AssumedCharset;
WHERE char *AttachSep;
WHERE char *Attribution;
WHERE char *ConfigCharset;
WHERE char *ContentType;
WHERE char *DefaultHook;
-WHERE char *DateFmt;
+WHERE char *DateFormat;
WHERE char *DisplayFilter;
WHERE char *DsnNotify;
WHERE char *DsnReturn;
WHERE char *Editor;
WHERE char *EmptySubject;
-WHERE char *EscChar;
+WHERE char *Escape;
WHERE char *FolderFormat;
-WHERE char *ForwardAttrIntro;
-WHERE char *ForwardAttrTrailer;
-WHERE char *ForwFmt;
-WHERE char *Fqdn;
+WHERE char *ForwardAttributionIntro;
+WHERE char *ForwardAttributionTrailer;
+WHERE char *ForwardFormat;
+WHERE char *Hostname;
WHERE struct MbTable *FromChars;
-WHERE char *HdrFmt;
-WHERE char *HistFile;
+WHERE char *IndexFormat;
+WHERE char *HistoryFile;
WHERE char *HomeDir;
-WHERE char *Hostname;
+WHERE char *ShortHostname;
#ifdef USE_IMAP
WHERE char *ImapAuthenticators;
WHERE char *ImapDelimChars;
WHERE char *ImapPass;
WHERE char *ImapUser;
#endif
-WHERE char *Inbox;
+WHERE char *Mbox;
WHERE char *Ispell;
WHERE char *MailcapPath;
-WHERE char *Maildir;
+WHERE char *Folder;
#if defined(USE_IMAP) || defined(USE_POP) || defined(USE_NNTP)
WHERE char *MessageCachedir;
#endif
#endif /* HAVE_GDBM || HAVE_BDB */
#endif /* USE_HCACHE */
WHERE char *MarkMacroPrefix;
-WHERE char *MhFlagged;
-WHERE char *MhReplied;
-WHERE char *MhUnseen;
-WHERE char *MimeTypeQueryCmd;
-WHERE char *MsgFmt;
+WHERE char *MhSeqFlagged;
+WHERE char *MhSeqReplied;
+WHERE char *MhSeqUnseen;
+WHERE char *MimeTypeQueryCommand;
+WHERE char *MessageFormat;
#ifdef USE_SOCKET
WHERE char *Preconnect;
WHERE struct ListHead Muttrc INITVAL(STAILQ_HEAD_INITIALIZER(Muttrc));
#ifdef USE_NNTP
-WHERE char *GroupFormat;
+WHERE char *GroupIndexFormat;
WHERE char *Inews;
WHERE char *NewsCacheDir;
WHERE char *NewsServer;
WHERE char *NntpUser;
WHERE char *NntpPass;
#endif
-WHERE char *Outbox;
+WHERE char *Record;
WHERE char *Pager;
-WHERE char *PagerFmt;
+WHERE char *PagerFormat;
WHERE char *PipeSep;
#ifdef USE_POP
WHERE char *PopAuthenticators;
-WHERE short PopCheckTimeout;
+WHERE short PopCheckinterval;
WHERE char *PopHost;
WHERE char *PopPass;
WHERE char *PopUser;
WHERE char *PostIndentString;
WHERE char *Postponed;
WHERE char *PostponeEncryptAs;
-WHERE char *Prefix;
-WHERE char *PrintCmd;
-WHERE char *NewMailCmd;
-WHERE char *QueryCmd;
+WHERE char *IndentString;
+WHERE char *PrintCommand;
+WHERE char *NewMailCommand;
+WHERE char *QueryCommand;
WHERE char *QueryFormat;
WHERE char *RealName;
WHERE short SearchContext;
WHERE char *SmtpUrl;
#endif /* USE_SMTP */
WHERE char *SpoolFile;
-WHERE char *SpamSep;
+WHERE char *SpamSeparator;
#ifdef USE_SSL
-WHERE char *SslCertFile;
+WHERE char *CertificateFile;
WHERE char *SslClientCert;
-WHERE char *SslEntropyFile;
+WHERE char *EntropyFile;
WHERE char *SslCiphers;
#ifdef USE_SSL_GNUTLS
-WHERE short SslDHPrimeBits;
-WHERE char *SslCACertFile;
+WHERE short SslMinDhPrimeBits;
+WHERE char *SslCaCertificatesFile;
#endif
#endif
-WHERE struct MbTable *StChars;
-WHERE char *Status;
-WHERE char *TempDir;
+WHERE struct MbTable *StatusChars;
+WHERE char *StatusFormat;
+WHERE char *Tmpdir;
WHERE struct MbTable *ToChars;
WHERE struct MbTable *FlagChars;
-WHERE char *TrashPath;
+WHERE char *Trash;
WHERE char *TSStatusFormat;
WHERE char *TSIconFormat;
WHERE short TSSupported;
WHERE char *Username;
WHERE char *Visual;
-WHERE char *XlabelDelim;
+WHERE char *XlabelDelimiter;
WHERE char *CurrentFolder;
WHERE char *LastFolder;
WHERE const char *GitVer;
WHERE struct Hash *Groups;
-WHERE struct Hash *ReverseAlias;
+WHERE struct Hash *ReverseAliases;
#ifdef USE_NOTMUCH
WHERE struct Hash *TagTransforms;
WHERE struct Hash *TagFormats;
WHERE unsigned short Counter;
#ifdef USE_NNTP
-WHERE short NewsPollTimeout;
+WHERE short NntpPoll;
WHERE short NntpContext;
#endif
#endif
WHERE short ConnectTimeout;
-WHERE short HistSize;
+WHERE short History;
WHERE short MenuContext;
WHERE short PagerContext;
WHERE short PagerIndexLines;
WHERE short ReadInc;
WHERE short ReflowWrap;
-WHERE short SaveHist;
+WHERE short SaveHistory;
WHERE short SendmailWait;
WHERE short SleepTime;
WHERE short SkipQuotedOffset;
WHERE short SmimeTimeout;
WHERE char *SmimeCertificates;
WHERE char *SmimeKeys;
-WHERE char *SmimeCryptAlg;
+WHERE char *SmimeEncryptWith;
WHERE char *SmimeCALocation;
WHERE char *SmimeVerifyCommand;
WHERE char *SmimeVerifyOpaqueCommand;
WHERE char *SmimeDecryptCommand;
WHERE char *SmimeSignCommand;
-WHERE char *SmimeDigestAlg;
+WHERE char *SmimeSignDigestAlg;
WHERE char *SmimeEncryptCommand;
WHERE char *SmimeGetSignerCertCommand;
WHERE char *SmimePk7outCommand;
WHERE char *SmimeSelfEncryptAs;
#ifdef USE_NOTMUCH
-WHERE int NotmuchOpenTimeout;
-WHERE char *NotmuchDefaultUri;
-WHERE char *NotmuchExcludeTags;
-WHERE char *NotmuchUnreadTag;
-WHERE char *NotmuchHiddenTags;
-WHERE char *VirtFolderFormat;
-WHERE int NotmuchDBLimit;
-WHERE char *NotmuchQueryType;
-WHERE char *NotmuchRecordTags;
-WHERE int NotmuchQueryWindowDuration;
-WHERE char *NotmuchQueryWindowTimebase;
-WHERE int NotmuchQueryWindowCurrentPosition;
-WHERE char *NotmuchQueryWindowCurrentSearch;
+WHERE int NmOpenTimeout;
+WHERE char *NmDefaultUri;
+WHERE char *NmExcludeTags;
+WHERE char *NmUnreadTag;
+WHERE char *NmHiddenTags;
+WHERE char *VfolderFormat;
+WHERE int NmDbLimit;
+WHERE char *NmQueryType;
+WHERE char *NmRecordTags;
+WHERE int NmQueryWindowDuration;
+WHERE char *NmQueryWindowTimebase;
+WHERE int NmQueryWindowCurrentPosition;
+WHERE char *NmQueryWindowCurrentSearch;
#endif
#ifdef MAIN_C
p = dest;
- cp = (op == 'd' || op == 'D') ? (NONULL(DateFmt)) : src;
+ cp = (op == 'd' || op == 'D') ? (NONULL(DateFormat)) : src;
if (*cp == '!')
{
do_locales = 0;
#include "lib/lib.h"
#include "protos.h"
-/* This history ring grows from 0..HistSize, with last marking the
+/* This history ring grows from 0..History, with last marking the
* where new entries go:
* 0 the oldest entry in the ring
* 1 entry
* last-> x NULL (this will be overwritten next)
* x+1 NULL
* ...
- * HistSize NULL
+ * 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
* ...
- * HistSize entry
+ * 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..HistSize are
+ * entries 0..last are compacted up. Entries last+1..History are
* compacted down:
* 0 entry
* 1 entry
* ...
* the oldest entry in the ring
* next oldest entry
- * HistSize entry
+ * History entry
*/
/**
/* global vars used for the string-history routines */
-static struct History History[HC_LAST];
+static struct History Histories[HC_LAST];
static int OldSize = 0;
-#define GET_HISTORY(CLASS) ((CLASS >= HC_LAST) ? NULL : &History[CLASS])
+#define GET_HISTORY(CLASS) ((CLASS >= HC_LAST) ? NULL : &Histories[CLASS])
static void init_history(struct History *h)
{
}
}
- if (HistSize)
- h->hist = safe_calloc(HistSize + 1, sizeof(char *));
+ if (History)
+ h->hist = safe_calloc(History + 1, sizeof(char *));
h->cur = 0;
h->last = 0;
char *linebuf = NULL, *p = NULL;
size_t buflen;
- if ((f = fopen(HistFile, "r")) == NULL)
+ if ((f = fopen(HistoryFile, "r")) == NULL)
return;
while ((linebuf = mutt_read_line(linebuf, &buflen, f, &line, 0)) != NULL)
bool regen_file = false;
struct Hash *dup_hashes[HC_LAST] = { 0 };
- if ((f = fopen(HistFile, "r")) == NULL)
+ if ((f = fopen(HistoryFile, "r")) == NULL)
return;
if (option(OPT_HISTORY_REMOVE_DUPS))
for (hclass = 0; hclass < HC_LAST; hclass++)
- dup_hashes[hclass] = hash_create(MAX(10, SaveHist * 2), MUTT_HASH_STRDUP_KEYS);
+ dup_hashes[hclass] = hash_create(MAX(10, SaveHistory * 2), MUTT_HASH_STRDUP_KEYS);
line = 0;
while ((linebuf = mutt_read_line(linebuf, &buflen, f, &line, 0)) != NULL)
if (!regen_file)
for (hclass = HC_FIRST; hclass < HC_LAST; hclass++)
- if (n[hclass] > SaveHist)
+ if (n[hclass] > SaveHistory)
{
regen_file = true;
break;
(dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0))
continue;
*p = '|';
- if (n[hclass]-- <= SaveHist)
+ if (n[hclass]-- <= SaveHistory)
fprintf(tmp, "%s\n", linebuf);
}
}
FREE(&linebuf);
if (tmp)
{
- if (fflush(tmp) == 0 && (f = fopen(HistFile, "w")) != NULL)
+ if (fflush(tmp) == 0 && (f = fopen(HistoryFile, "w")) != NULL)
{
rewind(tmp);
mutt_copy_stream(tmp, f);
if (!s || !*s) /* This shouldn't happen, but it's safer. */
return;
- if ((f = fopen(HistFile, "a")) == NULL)
+ if ((f = fopen(HistoryFile, "a")) == NULL)
{
mutt_perror("fopen");
return;
if (--n < 0)
{
- n = SaveHist;
+ n = SaveHistory;
shrink_histfile();
}
}
int source, dest, old_last;
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return; /* disabled */
/* Remove dups from 0..last-1 compacting up. */
while (source > h->last)
h->hist[source--] = NULL;
- /* Remove dups from last+1 .. HistSize compacting down. */
- source = dest = HistSize;
+ /* Remove dups from last+1 .. History compacting down. */
+ source = dest = History;
while (source > old_last)
{
if (!mutt_strcmp(h->hist[source], s))
void mutt_init_history(void)
{
- if (HistSize == OldSize)
+ if (History == OldSize)
return;
for (enum HistoryClass hclass = HC_FIRST; hclass < HC_LAST; hclass++)
- init_history(&History[hclass]);
+ init_history(&Histories[hclass]);
- OldSize = HistSize;
+ OldSize = History;
}
void mutt_history_add(enum HistoryClass hclass, const char *s, int save)
int prev;
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return; /* disabled */
if (*s)
{
prev = h->last - 1;
if (prev < 0)
- prev = HistSize;
+ prev = History;
/* don't add to prompt history:
* - lines beginning by a space
{
if (option(OPT_HISTORY_REMOVE_DUPS))
remove_history_dups(hclass, s);
- if (save && SaveHist)
+ if (save && SaveHistory)
save_history(hclass, s);
mutt_str_replace(&h->hist[h->last++], s);
- if (h->last > HistSize)
+ if (h->last > History)
h->last = 0;
}
}
int next;
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return ""; /* disabled */
next = h->cur;
do
{
next++;
- if (next > HistSize)
+ if (next > History)
next = 0;
if (next == h->last)
break;
int prev;
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return ""; /* disabled */
prev = h->cur;
{
prev--;
if (prev < 0)
- prev = HistSize;
+ prev = History;
if (prev == h->last)
break;
} while (h->hist[prev] == NULL);
{
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return; /* disabled */
h->cur = h->last;
{
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return 0; /* disabled */
return h->cur == h->last;
{
struct History *h = GET_HISTORY(hclass);
- if (!HistSize || !h)
+ if (!History || !h)
return; /* disabled */
/* Don't check if s has a value because the scratch buffer may contain
{
adr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
mutt_safe_path(buf, sizeof(buf), adr);
- mutt_concat_path(path, NONULL(Maildir), buf, pathlen);
+ mutt_concat_path(path, NONULL(Folder), buf, pathlen);
if (!option(OPT_FORCE_NAME) && mx_access(path, W_OK) != 0)
- strfcpy(path, NONULL(Outbox), pathlen);
+ strfcpy(path, NONULL(Record), pathlen);
}
else
- strfcpy(path, NONULL(Outbox), pathlen);
+ strfcpy(path, NONULL(Record), pathlen);
}
mutt_pretty_mailbox(path, pathlen);
}
tlen = mutt_strlen(target.mbox);
/* check whether we can do '=' substitution */
- if (mx_is_imap(Maildir) && !imap_parse_path(Maildir, &home))
+ if (mx_is_imap(Folder) && !imap_parse_path(Folder, &home))
{
hlen = mutt_strlen(home.mbox);
if (tlen && mutt_account_match(&home.account, &target.account) &&
t->orig_str = safe_strdup(s);
/* This could be more space efficient. However, being used on tiny
- * strings (ToChars and StChars), the overhead is not great. */
+ * strings (ToChars and StatusChars), the overhead is not great. */
t->chars = safe_calloc(slen, sizeof(char *));
d = t->segmented_str = safe_calloc(slen * 2, sizeof(char));
{
if (query || *s->dptr != '=')
{
- switch (DefaultMagic)
+ switch (MboxType)
{
case MUTT_MBOX:
p = "mbox";
p = "MH";
break;
case MUTT_MAILDIR:
- p = "Maildir";
+ p = "Folder";
break;
default:
p = "unknown";
{
char *p = NULL;
- switch (DefaultMagic)
+ switch (MboxType)
{
case MUTT_MBOX:
p = "mbox";
p = "MH";
break;
case MUTT_MAILDIR:
- p = "Maildir";
+ p = "Folder";
break;
default:
p = "unknown";
Groups = hash_create(1031, 0);
/* reverse alias keys need to be strdup'ed because of idna conversions */
- ReverseAlias = hash_create(1031, MUTT_HASH_STRCASECMP | MUTT_HASH_STRDUP_KEYS | MUTT_HASH_ALLOW_DUPS);
+ ReverseAliases = hash_create(1031, MUTT_HASH_STRCASECMP | MUTT_HASH_STRDUP_KEYS | MUTT_HASH_ALLOW_DUPS);
#ifdef USE_NOTMUCH
TagTransforms = hash_create(64, 1);
TagFormats = hash_create(64, 0);
/* some systems report the FQDN instead of just the hostname */
if ((p = strchr(utsname.nodename, '.')))
- Hostname = mutt_substrdup(utsname.nodename, p);
+ ShortHostname = mutt_substrdup(utsname.nodename, p);
else
- Hostname = safe_strdup(utsname.nodename);
+ ShortHostname = safe_strdup(utsname.nodename);
/* now get FQDN. Use configured domain first, DNS next, then uname */
#ifdef DOMAIN
- /* we have a compile-time domain name, use that for Fqdn */
- Fqdn = safe_malloc(mutt_strlen(DOMAIN) + mutt_strlen(Hostname) + 2);
- sprintf(Fqdn, "%s.%s", NONULL(Hostname), DOMAIN);
+ /* we have a compile-time domain name, use that for Hostname */
+ Hostname = safe_malloc(mutt_strlen(DOMAIN) + mutt_strlen(ShortHostname) + 2);
+ sprintf(Hostname, "%s.%s", NONULL(ShortHostname), DOMAIN);
#else
if (!(getdnsdomainname(buffer, sizeof(buffer))))
{
- Fqdn = safe_malloc(mutt_strlen(buffer) + mutt_strlen(Hostname) + 2);
- sprintf(Fqdn, "%s.%s", NONULL(Hostname), buffer);
+ Hostname = safe_malloc(mutt_strlen(buffer) + mutt_strlen(ShortHostname) + 2);
+ sprintf(Hostname, "%s.%s", NONULL(ShortHostname), buffer);
}
else
/*
* user to provide the correct hostname if the nodename won't work in their
* network.
*/
- Fqdn = safe_strdup(utsname.nodename);
+ Hostname = safe_strdup(utsname.nodename);
#endif
#ifdef USE_NNTP
"/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
}
- TempDir = safe_strdup((p = getenv("TMPDIR")) ? p : "/tmp");
+ Tmpdir = safe_strdup((p = getenv("TMPDIR")) ? p : "/tmp");
p = getenv("VISUAL");
if (!p)
mutt_exit(1);
}
- mutt_mkdir(TempDir, S_IRWXU);
+ mutt_mkdir(Tmpdir, S_IRWXU);
mutt_read_histfile();
** The default for this option is the currently used muttrc file, or
** ``~/.muttrc'' if no user muttrc was found.
*/
- { "alias_format", DT_STRING, R_NONE, UL &AliasFmt, UL "%4n %2f %t %-10a %r" },
+ { "alias_format", DT_STRING, R_NONE, UL &AliasFormat, UL "%4n %2f %t %-10a %r" },
/*
** .pp
** Specifies the format of the data displayed for the ``$alias'' menu. The
*/
#endif
#ifdef USE_SSL
- { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
+ { "certificate_file", DT_PATH, R_NONE, UL &CertificateFile, UL "~/.mutt_certificates" },
/*
** .pp
** This variable specifies the file where the certificates you trust
** If \fI``no''\fP, never attempt to verify cryptographic signatures.
** (Crypto only)
*/
- { "date_format", DT_STRING, R_MENU, UL &DateFmt, UL "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
+ { "date_format", DT_STRING, R_MENU, UL &DateFormat, UL "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
/*
** .pp
** This variable controls the format of the date printed by the ``%d''
** misinterpreting the line as a mbox message separator).
*/
#ifdef USE_SSL_OPENSSL
- { "entropy_file", DT_PATH, R_NONE, UL &SslEntropyFile, 0 },
+ { "entropy_file", DT_PATH, R_NONE, UL &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, UL &EnvFrom, 0 },
+ { "envelope_from_address", DT_ADDRESS, R_NONE, UL &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, UL &EscChar, UL "~" },
+ { "escape", DT_STRING, R_NONE, UL &Escape, UL "~" },
/*
** .pp
** Escape character to use for functions in the built-in editor.
** .pp
** If set, flagged messages cannot be deleted.
*/
- { "folder", DT_PATH, R_NONE, UL &Maildir, UL "~/Mail" },
+ { "folder", DT_PATH, R_NONE, UL &Folder, UL "~/Mail" },
/*
** .pp
** Specifies the default location of your mailboxes. A ``+'' or ``='' at the
** .pp
** Also see the $$record variable.
*/
- { "forward_attribution_intro", DT_STRING, R_NONE, UL &ForwardAttrIntro, UL "----- Forwarded message from %f -----" },
+ { "forward_attribution_intro", DT_STRING, R_NONE, UL &ForwardAttributionIntro, UL "----- 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, UL &ForwardAttrTrailer, UL "----- End forwarded message -----" },
+ { "forward_attribution_trailer", DT_STRING, R_NONE, UL &ForwardAttributionTrailer, UL "----- End forwarded message -----" },
/*
** .pp
** This is the string that will follow a message which has been forwarded
** 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, R_NONE, UL &ForwFmt, UL "[%a: %s]" },
+ { "forward_format", DT_STRING, R_NONE, UL &ForwardFormat, UL "[%a: %s]" },
/*
** .pp
** This variable controls the default subject when forwarding a message.
** ``Franklin'' to ``Franklin, Steve''.
*/
#ifdef USE_NNTP
- { "group_index_format", DT_STRING, R_BOTH, UL &GroupFormat, UL "%4C %M%N %5s %-45.45f %d" },
+ { "group_index_format", DT_STRING, R_BOTH, UL &GroupIndexFormat, UL "%4C %M%N %5s %-45.45f %d" },
/*
** .pp
** This variable allows you to customize the newsgroup browser display to
** caching will be used.
** .pp
** Header caching can greatly improve speed when opening POP, IMAP
- ** MH or Maildir folders, see ``$caching'' for details.
+ ** MH or Folder folders, see ``$caching'' for details.
*/
{ "header_cache_backend", DT_HCACHE, R_NONE, UL &HeaderCacheBackend, UL 0 },
/*
** top of threads in the thread tree. Note that when $$hide_missing is
** \fIset\fP, this option will have no effect.
*/
- { "history", DT_NUMBER, R_NONE, UL &HistSize, 10 },
+ { "history", DT_NUMBER, R_NONE, UL &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, UL &HistFile, UL "~/.mutthistory" },
+ { "history_file", DT_PATH, R_NONE, UL &HistoryFile, UL "~/.mutthistory" },
/*
** .pp
** The file in which Mutt will save its history.
** This variable controls whether or not a Mail-Followup-To header is
** honored when group-replying to a message.
*/
- { "hostname", DT_STRING, R_NONE, UL &Fqdn, 0 },
+ { "hostname", DT_STRING, R_NONE, UL &Hostname, 0 },
/*
** .pp
** Specifies the fully-qualified hostname of the system mutt is running on
** Controls whether or not Mutt includes only the first attachment
** of the message you are replying.
*/
- { "indent_string", DT_STRING, R_NONE, UL &Prefix, UL "> " },
+ { "indent_string", DT_STRING, R_NONE, UL &IndentString, UL "> " },
/*
** .pp
** Specifies the string to prepend to each line of text quoted in a
{ "indent_str", DT_SYNONYM, R_NONE, UL "indent_string", 0 },
/*
*/
- { "index_format", DT_STRING, R_BOTH, UL &HdrFmt, UL "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" },
+ { "index_format", DT_STRING, R_BOTH, UL &IndexFormat, UL "%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" },
/*
** .pp
** This variable allows you to customize the message index display to
** ``$$keywords_standard'' are \fCfalse\fP, mutt will save keywords
** to legacy headers to ensure that it does not lose your labels.
*/
- { "mail_check", DT_NUMBER, R_NONE, UL &BuffyTimeout, 5 },
+ { "mail_check", DT_NUMBER, R_NONE, UL &MailCheck, 5 },
/*
** .pp
** This variable configures how often (in seconds) mutt should look for
** \fIunset\fP, and has a separate option, $$mail_check_stats_interval, to
** control how often to update these counts.
*/
- { "mail_check_stats_interval", DT_NUMBER, R_NONE, UL &BuffyCheckStatsInterval, 60 },
+ { "mail_check_stats_interval", DT_NUMBER, R_NONE, UL &MailCheckStatsInterval, 60 },
/*
** .pp
** When $$mail_check_stats is \fIset\fP, this variable configures
{ "mark_macro_prefix",DT_STRING, R_NONE, UL &MarkMacroPrefix, UL "'" },
/*
** .pp
- ** Prefix for macros created using mark-message. A new macro
+ ** IndentString 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.
*/
** the \fInot\fP operator ``!''. Only files whose names match this mask
** will be shown. The match is always case-sensitive.
*/
- { "mbox", DT_PATH, R_BOTH, UL &Inbox, UL "~/mbox" },
+ { "mbox", DT_PATH, R_BOTH, UL &Mbox, UL "~/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, UL &DefaultMagic, MUTT_MBOX },
+ { "mbox_type", DT_MAGIC,R_NONE, UL &MboxType, MUTT_MBOX },
/*
** .pp
** The default mailbox type used when creating new folders. May be any of
- ** ``mbox'', ``MMDF'', ``MH'' and ``Maildir''. This is overridden by the
+ ** ``mbox'', ``MMDF'', ``MH'' and ``Folder''. This is overridden by the
** \fC-m\fP command-line option.
*/
{ "menu_context", DT_NUMBER, R_NONE, UL &MenuContext, 0 },
** Also see the $$message_cache_clean variable.
*/
#endif
- { "message_format", DT_STRING, R_NONE, UL &MsgFmt, UL "%s" },
+ { "message_format", DT_STRING, R_NONE, UL &MessageFormat, UL "%s" },
/*
** .pp
** This is the string displayed in the ``attachment'' menu for
** .pp
** This option is similar to $$maildir_trash for Maildir folders.
*/
- { "mh_seq_flagged", DT_STRING, R_NONE, UL &MhFlagged, UL "flagged" },
+ { "mh_seq_flagged", DT_STRING, R_NONE, UL &MhSeqFlagged, UL "flagged" },
/*
** .pp
** The name of the MH sequence used for flagged messages.
*/
- { "mh_seq_replied", DT_STRING, R_NONE, UL &MhReplied, UL "replied" },
+ { "mh_seq_replied", DT_STRING, R_NONE, UL &MhSeqReplied, UL "replied" },
/*
** .pp
** The name of the MH sequence used to tag replied messages.
*/
- { "mh_seq_unseen", DT_STRING, R_NONE, UL &MhUnseen, UL "unseen" },
+ { "mh_seq_unseen", DT_STRING, R_NONE, UL &MhSeqUnseen, UL "unseen" },
/*
** .pp
** The name of the MH sequence used for unseen messages.
** is Usenet article, because MIME for news is nonstandard feature.
*/
#endif
- { "mime_type_query_command", DT_STRING, R_NONE, UL &MimeTypeQueryCmd, UL "" },
+ { "mime_type_query_command", DT_STRING, R_NONE, UL &MimeTypeQueryCommand, UL "" },
/*
** .pp
** This specifies a command to run, to determine the mime type of a
** See also $$read_inc, $$write_inc and $$net_inc.
*/
#endif
- { "new_mail_command", DT_PATH, R_NONE, UL &NewMailCmd, UL NULL },
+ { "new_mail_command", DT_PATH, R_NONE, UL &NewMailCommand, UL NULL },
/*
** .pp
** If \fIset\fP, Mutt will call this command after a new message is received.
** .pp
** Your password for NNTP account.
*/
- { "nntp_poll", DT_NUMBER, R_NONE, UL &NewsPollTimeout, 60 },
+ { "nntp_poll", DT_NUMBER, R_NONE, UL &NntpPoll, 60 },
/*
** .pp
** The time in seconds until any operations on newsgroup except post new
*/
#endif
#ifdef USE_NOTMUCH
- { "nm_open_timeout", DT_NUMBER, R_NONE, UL &NotmuchOpenTimeout, 5 },
+ { "nm_open_timeout", DT_NUMBER, R_NONE, UL &NmOpenTimeout, 5 },
/*
** .pp
** This variable specifies the timeout for database open in seconds.
*/
- { "nm_default_uri", DT_STRING, R_NONE, UL &NotmuchDefaultUri, 0 },
+ { "nm_default_uri", DT_STRING, R_NONE, UL &NmDefaultUri, 0 },
/*
** .pp
** This variable specifies the default Notmuch database in format
** notmuch://<absolute path>.
*/
- { "nm_hidden_tags", DT_STRING, R_NONE, UL &NotmuchHiddenTags, UL "unread,draft,flagged,passed,replied,attachment,signed,encrypted" },
+ { "nm_hidden_tags", DT_STRING, R_NONE, UL &NmHiddenTags, UL "unread,draft,flagged,passed,replied,attachment,signed,encrypted" },
/*
** .pp
** This variable specifies private notmuch tags which should not be printed
** on screen.
*/
- { "nm_exclude_tags", DT_STRING, R_NONE, UL &NotmuchExcludeTags, 0 },
+ { "nm_exclude_tags", DT_STRING, R_NONE, UL &NmExcludeTags, 0 },
/*
** .pp
** The messages tagged with these tags are excluded and not loaded
** from notmuch DB to mutt unless specified explicitly.
*/
- { "nm_unread_tag", DT_STRING, R_NONE, UL &NotmuchUnreadTag, UL "unread" },
+ { "nm_unread_tag", DT_STRING, R_NONE, UL &NmUnreadTag, UL "unread" },
/*
** .pp
** This variable specifies notmuch tag which is used for unread messages. The
** variable is used to count unread messages in DB only. All other mutt commands
** use standard (e.g. maildir) flags.
*/
- { "nm_db_limit", DT_NUMBER, R_NONE, UL &NotmuchDBLimit, 0 },
+ { "nm_db_limit", DT_NUMBER, R_NONE, UL &NmDbLimit, 0 },
/*
** .pp
** This variable specifies the default limit used in notmuch queries.
*/
- { "nm_query_type", DT_STRING, R_NONE, UL &NotmuchQueryType, UL "messages" },
+ { "nm_query_type", DT_STRING, R_NONE, UL &NmQueryType, UL "messages" },
/*
** .pp
** This variable specifies the default query type (threads or messages) used in notmuch queries.
** .pp
** This variable specifies if the mutt record should indexed by notmuch.
*/
- { "nm_record_tags", DT_STRING, R_NONE, UL &NotmuchRecordTags, 0 },
+ { "nm_record_tags", DT_STRING, R_NONE, UL &NmRecordTags, 0 },
/*
** .pp
** This variable specifies the default tags applied to messages stored to the mutt record.
** When set to 0 this variable disable the window feature.
*/
- { "nm_query_window_duration", DT_NUMBER, R_NONE, UL &NotmuchQueryWindowDuration, 0 },
+ { "nm_query_window_duration", DT_NUMBER, R_NONE, UL &NmQueryWindowDuration, 0 },
/*
** .pp
** This variable sets the time base of a windowed notmuch query.
** Accepted values are 'minute', 'hour', 'day', 'week', 'month', 'year'
*/
- { "nm_query_window_timebase", DT_STRING, R_NONE, UL &NotmuchQueryWindowTimebase, UL "week" },
+ { "nm_query_window_timebase", DT_STRING, R_NONE, UL &NmQueryWindowTimebase, UL "week" },
/*
** .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_current_search", DT_STRING, R_NONE, UL &NotmuchQueryWindowCurrentSearch, UL "" },
+ { "nm_query_window_current_search", DT_STRING, R_NONE, UL &NmQueryWindowCurrentSearch, UL "" },
/*
** .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_current_position", DT_NUMBER, R_NONE, UL &NotmuchQueryWindowCurrentPosition, 0 },
+ { "nm_query_window_current_position", DT_NUMBER, R_NONE, UL &NmQueryWindowCurrentPosition, 0 },
/*
** .pp
** This variable contains the currently setup notmuch search for window based vfolder.
** 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, UL &PagerFmt, UL "-%Z- %C/%m: %-20.20n %s%* -- (%P)" },
+ { "pager_format", DT_STRING, R_PAGER, UL &PagerFormat, UL "-%Z- %C/%m: %-20.20n %s%* -- (%P)" },
/*
** .pp
** This variable controls the format of the one-line message ``status''
** set pop_authenticators="digest-md5:apop:user"
** .te
*/
- { "pop_checkinterval", DT_NUMBER, R_NONE, UL &PopCheckTimeout, 60 },
+ { "pop_checkinterval", DT_NUMBER, R_NONE, UL &PopCheckinterval, 60 },
/*
** .pp
** This variable configures how often (in seconds) mutt should look for
** This is set to ``ask-no'' by default, because some people
** accidentally hit ``p'' often.
*/
- { "print_command", DT_PATH, R_NONE, UL &PrintCmd, UL "lpr" },
+ { "print_command", DT_PATH, R_NONE, UL &PrintCommand, UL "lpr" },
/*
** .pp
** This specifies the command pipe that should be used to print messages.
** than returning to the index menu. If \fIunset\fP, Mutt will return to the
** index menu when the external pager exits.
*/
- { "query_command", DT_PATH, R_NONE, UL &QueryCmd, UL "" },
+ { "query_command", DT_PATH, R_NONE, UL &QueryCommand, UL "" },
/*
** .pp
** This specifies the command Mutt will use to make external address
** .pp
** Also see $$postponed variable.
*/
- { "record", DT_PATH, R_NONE, UL &Outbox, UL "~/sent" },
+ { "record", DT_PATH, R_NONE, UL &Record, UL "~/sent" },
/*
** .pp
** This specifies the file into which your outgoing messages should be
** \fBNote:\fP This only applies to mbox and MMDF folders, Mutt does not
** delete MH and Maildir directories.
*/
- { "save_history", DT_NUMBER, R_NONE, UL &SaveHist, 0 },
+ { "save_history", DT_NUMBER, R_NONE, UL &SaveHistory, 0 },
/*
** .pp
** This variable controls the size of the history (per category) saved in the
** Encrypt the message to $$smime_default_key too.
** (S/MIME only)
*/
- { "smime_encrypt_with", DT_STRING, R_NONE, UL &SmimeCryptAlg, UL "aes256" },
+ { "smime_encrypt_with", DT_STRING, R_NONE, UL &SmimeEncryptWith, UL "aes256" },
/*
** .pp
** This sets the algorithm that should be used for encryption.
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
- { "smime_sign_digest_alg", DT_STRING, R_NONE, UL &SmimeDigestAlg, UL "sha256" },
+ { "smime_sign_digest_alg", DT_STRING, R_NONE, UL &SmimeSignDigestAlg, UL "sha256" },
/*
** .pp
** This sets the algorithm that should be used for the signature message digest.
** 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, UL &BrowserSort, SORT_ALPHA },
+ { "sort_browser", DT_SORT|DT_SORT_BROWSER, R_NONE, UL &SortBrowser, SORT_ALPHA },
/*
** .pp
** Specifies how to sort entries in the file browser. By default, the
** .dd unsorted
** .ie
*/
- { "spam_separator", DT_STRING, R_NONE, UL &SpamSep, UL "," },
+ { "spam_separator", DT_STRING, R_NONE, UL &SpamSeparator, UL "," },
/*
** .pp
** This variable controls what happens when multiple spam headers
*/
#ifdef USE_SSL
#ifdef USE_SSL_GNUTLS
- { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
+ { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCaCertificatesFile, 0 },
/*
** .pp
** This variable specifies a file containing trusted CA certificates.
** option supersedes $$ssl_starttls.
*/
#ifdef USE_SSL_GNUTLS
- { "ssl_min_dh_prime_bits", DT_NUMBER, R_NONE, UL &SslDHPrimeBits, 0 },
+ { "ssl_min_dh_prime_bits", DT_NUMBER, R_NONE, UL &SslMinDhPrimeBits, 0 },
/*
** .pp
** This variable specifies the minimum acceptable prime size (in bits)
** required.)
*/
#endif /* defined(USE_SSL) */
- { "status_chars", DT_MBTABLE, R_BOTH, UL &StChars, UL "-*%A" },
+ { "status_chars", DT_MBTABLE, R_BOTH, UL &StatusChars, UL "-*%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, UL &Status, UL "-%r-NeoMutt: %f [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, UL &StatusFormat, UL "-%r-NeoMutt: %f [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''
** .pp
** A value of zero or less will cause Mutt to never time out.
*/
- { "tmpdir", DT_PATH, R_NONE, UL &TempDir, 0 },
+ { "tmpdir", DT_PATH, R_NONE, UL &Tmpdir, 0 },
/*
** .pp
** This variable allows you to specify where Mutt will place its
** .dt 11 .dd <space> .dd The mail is read - %Z expando.
** .de
*/
- { "trash", DT_PATH, R_NONE, UL &TrashPath, 0 },
+ { "trash", DT_PATH, R_NONE, UL &Trash, 0 },
/*
** .pp
** If set, this variable specifies the path of the trash folder where the
** given in the built-in editor.
*/
#ifdef USE_NOTMUCH
- { "vfolder_format", DT_STRING, R_INDEX, UL &VirtFolderFormat, UL "%2C %?n?%4n/& ?%4m %f" },
+ { "vfolder_format", DT_STRING, R_INDEX, UL &VfolderFormat, UL "%2C %?n?%4n/& ?%4m %f" },
/*
** .pp
** This variable allows you to customize the file browser display for virtual
{ "xterm_set_titles", DT_SYNONYM, R_NONE, UL "ts_enabled", 0 },
/*
*/
- { "xlabel_delimiter", DT_STRING, R_NONE, UL &XlabelDelim, UL "" },
+ { "xlabel_delimiter", DT_STRING, R_NONE, UL &XlabelDelimiter, UL "" },
/*
** .pp
** The character used to delimit distinct keywords in X-Label headers.
mutt_message = mutt_curses_message;
}
- /* Create the Maildir directory if it doesn't exist. */
- if (!option(OPT_NO_CURSES) && Maildir)
+ /* Create the Folder directory if it doesn't exist. */
+ if (!option(OPT_NO_CURSES) && Folder)
{
struct stat sb;
char fpath[_POSIX_PATH_MAX];
char msg2[STRING];
- strfcpy(fpath, Maildir, sizeof(fpath));
+ strfcpy(fpath, Folder, sizeof(fpath));
mutt_expand_path(fpath, sizeof(fpath));
bool skip = false;
#ifdef USE_IMAP
#endif
if (!skip && stat(fpath, &sb) == -1 && errno == ENOENT)
{
- snprintf(msg2, sizeof(msg2), _("%s does not exist. Create it?"), Maildir);
+ snprintf(msg2, sizeof(msg2), _("%s does not exist. Create it?"), Folder);
if (mutt_yesorno(msg2, MUTT_YES) == MUTT_YES)
{
if (mkdir(fpath, 0700) == -1 && errno != EEXIST)
- mutt_error(_("Can't create %s: %s."), Maildir, strerror(errno));
+ mutt_error(_("Can't create %s: %s."), Folder, strerror(errno));
}
}
}
{
if (SpoolFile)
strfcpy(folder, NONULL(SpoolFile), sizeof(folder));
- else if (Maildir)
- strfcpy(folder, NONULL(Maildir), sizeof(folder));
+ else if (Folder)
+ strfcpy(folder, NONULL(Folder), sizeof(folder));
/* else no folder */
}
char savefile[_POSIX_PATH_MAX];
- snprintf(savefile, sizeof(savefile), "%s/mutt.%s-%s-%u", NONULL(TempDir),
- NONULL(Username), NONULL(Hostname), (unsigned int) getpid());
+ snprintf(savefile, sizeof(savefile), "%s/mutt.%s-%s-%u", NONULL(Tmpdir),
+ NONULL(Username), NONULL(ShortHostname), (unsigned int) getpid());
rename(tempfile, savefile);
mutt_unblock_signals();
mx_fastclose_mailbox(ctx);
* struct MbTable - multibyte character table
*
* Allows for direct access to the individual multibyte characters in a
- * string. This is used for the FlagChars, FromChars, StChars and ToChars
+ * string. This is used for the FlagChars, FromChars, StatusChars and ToChars
* option types.
*/
struct MbTable
if (!(t = strtok(buff, " \t:")))
continue;
- if (mutt_strcmp(t, MhUnseen) == 0)
+ if (mutt_strcmp(t, MhSeqUnseen) == 0)
f = MH_SEQ_UNSEEN;
- else if (mutt_strcmp(t, MhFlagged) == 0)
+ else if (mutt_strcmp(t, MhSeqFlagged) == 0)
f = MH_SEQ_FLAGGED;
- else if (mutt_strcmp(t, MhReplied) == 0)
+ else if (mutt_strcmp(t, MhSeqReplied) == 0)
f = MH_SEQ_REPLIED;
else /* unknown sequence */
continue;
while (true)
{
snprintf(path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%" PRIu64, dest->path,
- NONULL(Hostname), (int) getpid(), mutt_rand64());
+ NONULL(ShortHostname), (int) getpid(), mutt_rand64());
if ((fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
{
if (errno != EEXIST)
struct MhSequences mhs;
memset(&mhs, 0, sizeof(mhs));
- snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(MhUnseen));
- snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(MhReplied));
- snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(MhFlagged));
+ 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));
if (mh_mkstemp(ctx, &nfp, &tmpfname) != 0)
{
/* write out the new sequences */
if (unseen)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_UNSEEN, NONULL(MhUnseen));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_UNSEEN, NONULL(MhSeqUnseen));
if (flagged)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_FLAGGED, NONULL(MhFlagged));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_FLAGGED, NONULL(MhSeqFlagged));
if (replied)
- mhs_write_one_sequence(nfp, &mhs, MH_SEQ_REPLIED, NONULL(MhReplied));
+ mhs_write_one_sequence(nfp, &mhs, MH_SEQ_REPLIED, NONULL(MhSeqReplied));
mhs_free_sequences(&mhs);
if (mh_mkstemp(ctx, &nfp, &tmpfname) == -1)
return;
- snprintf(seq_unseen, sizeof(seq_unseen), "%s:", NONULL(MhUnseen));
- snprintf(seq_replied, sizeof(seq_replied), "%s:", NONULL(MhReplied));
- snprintf(seq_flagged, sizeof(seq_flagged), "%s:", NONULL(MhFlagged));
+ 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(sequences, sizeof(sequences), "%s/.mh_sequences", ctx->path);
if ((ofp = fopen(sequences, "r")))
FREE(&buff);
if (!unseen_done && unseen)
- fprintf(nfp, "%s: %d\n", NONULL(MhUnseen), n);
+ fprintf(nfp, "%s: %d\n", NONULL(MhSeqUnseen), n);
if (!flagged_done && flagged)
- fprintf(nfp, "%s: %d\n", NONULL(MhFlagged), n);
+ fprintf(nfp, "%s: %d\n", NONULL(MhSeqFlagged), n);
if (!replied_done && replied)
- fprintf(nfp, "%s: %d\n", NONULL(MhReplied), n);
+ fprintf(nfp, "%s: %d\n", NONULL(MhSeqReplied), n);
safe_fclose(&nfp);
while (true)
{
snprintf(path, _POSIX_PATH_MAX, "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s", dest->path,
- subdir, (long long) time(NULL), mutt_rand64(), NONULL(Hostname), suffix);
+ subdir, (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix);
mutt_debug(2, "maildir_open_new_message (): Trying %s.\n", path);
while (true)
{
snprintf(path, _POSIX_PATH_MAX, "%s/%lld.R%" PRIu64 ".%s%s", subdir,
- (long long) time(NULL), mutt_rand64(), NONULL(Hostname), suffix);
+ (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix);
snprintf(full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
mutt_debug(2, "_maildir_commit_message (): renaming %s to %s.\n", msg->path, full);
*
* This stores the global NotMuch data, such as the database connection.
*
- * @sa Context#data, NotmuchDBLimit, NM_QUERY_TYPE_MESGS
+ * @sa Context#data, NmDbLimit, NM_QUERY_TYPE_MESGS
*/
struct NmCtxData
{
data = safe_calloc(1, sizeof(struct NmCtxData));
mutt_debug(1, "nm: initialize context data %p\n", (void *) data);
- data->db_limit = NotmuchDBLimit;
+ data->db_limit = NmDbLimit;
if (!url_parse_query(uri, &data->db_filename, &data->query_items))
{
static int string_to_query_type(const char *str)
{
if (!str)
- str = NotmuchQueryType; /* user's default */
+ str = NmQueryType; /* user's default */
if (!str)
return NM_QUERY_TYPE_MESGS; /* hardcoded default */
static void query_window_reset(void)
{
mutt_debug(2, "query_window_reset ()\n");
- NotmuchQueryWindowCurrentPosition = 0;
+ NmQueryWindowCurrentPosition = 0;
}
/**
{
mutt_debug(2, "nm: windowed_query_from_query (%s)\n", query);
- int beg = NotmuchQueryWindowDuration * (NotmuchQueryWindowCurrentPosition + 1);
- int end = NotmuchQueryWindowDuration * NotmuchQueryWindowCurrentPosition;
+ int beg = NmQueryWindowDuration * (NmQueryWindowCurrentPosition + 1);
+ int end = NmQueryWindowDuration * NmQueryWindowCurrentPosition;
/* if the duration is a non positive integer, disable the window */
- if (NotmuchQueryWindowDuration <= 0)
+ if (NmQueryWindowDuration <= 0)
{
query_window_reset();
return false;
}
/* if the query has changed, reset the window position */
- if (NotmuchQueryWindowCurrentSearch == NULL ||
- (strcmp(query, NotmuchQueryWindowCurrentSearch) != 0))
+ if (NmQueryWindowCurrentSearch == NULL ||
+ (strcmp(query, NmQueryWindowCurrentSearch) != 0))
query_window_reset();
- if (!query_window_check_timebase(NotmuchQueryWindowTimebase))
+ if (!query_window_check_timebase(NmQueryWindowTimebase))
{
mutt_message(_("Invalid nm_query_window_timebase value (valid values are: "
"hour, day, week, month or year)."));
if (end == 0)
snprintf(buf, bufsz, "date:%d%s..now and %s", beg,
- NotmuchQueryWindowTimebase, NotmuchQueryWindowCurrentSearch);
+ NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
else
- snprintf(buf, bufsz, "date:%d%s..%d%s and %s", beg, NotmuchQueryWindowTimebase,
- end, NotmuchQueryWindowTimebase, NotmuchQueryWindowCurrentSearch);
+ snprintf(buf, bufsz, "date:%d%s..%d%s and %s", beg, NmQueryWindowTimebase,
+ end, NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
mutt_debug(2, "nm: windowed_query_from_query (%s) -> %s\n", query, buf);
if (window)
{
char buf[LONG_STRING];
- mutt_str_replace(&NotmuchQueryWindowCurrentSearch, data->db_query);
+ mutt_str_replace(&NmQueryWindowCurrentSearch, data->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
if (!data)
return NULL;
- db_filename = data->db_filename ? data->db_filename : NotmuchDefaultUri;
+ db_filename = data->db_filename ? data->db_filename : NmDefaultUri;
if (!db_filename)
- db_filename = Maildir;
+ db_filename = Folder;
if (!db_filename)
return NULL;
if (strncmp(db_filename, "notmuch://", 10) == 0)
notmuch_status_t st = NOTMUCH_STATUS_SUCCESS;
mutt_debug(1, "nm: db open '%s' %s (timeout %d)\n", filename,
- writable ? "[WRITE]" : "[READ]", NotmuchOpenTimeout);
+ writable ? "[WRITE]" : "[READ]", NmOpenTimeout);
do
{
#ifdef NOTMUCH_API_3
writable ? NOTMUCH_DATABASE_MODE_READ_WRITE :
NOTMUCH_DATABASE_MODE_READ_ONLY);
#endif
- if (db || !NotmuchOpenTimeout || ((ct / 2) > NotmuchOpenTimeout))
+ if (db || !NmOpenTimeout || ((ct / 2) > NmOpenTimeout))
break;
if (verbose && ct && ((ct % 2) == 0))
{
char *buf = NULL, *p = NULL, *end = NULL, *tag = NULL;
- if (!NotmuchExcludeTags || !*NotmuchExcludeTags)
+ if (!NmExcludeTags || !*NmExcludeTags)
return;
- buf = safe_strdup(NotmuchExcludeTags);
+ buf = safe_strdup(NmExcludeTags);
for (p = buf; p && *p; p++)
{
tag_list = tmp;
/* filter out hidden tags */
- if (NotmuchHiddenTags)
+ if (NmHiddenTags)
{
- char *p = strstr(NotmuchHiddenTags, t);
+ char *p = strstr(NmHiddenTags, t);
size_t xsz = p ? strlen(t) : 0;
- if (p && ((p == NotmuchHiddenTags) || (*(p - 1) == ',') || (*(p - 1) == ' ')) &&
+ if (p && ((p == NmHiddenTags) || (*(p - 1) == ',') || (*(p - 1) == ' ')) &&
((*(p + xsz) == '\0') || (*(p + xsz) == ',') || (*(p + xsz) == ' ')))
continue;
}
if (data)
added = snprintf(uri, sizeof(uri), "notmuch://%s?query=", get_db_filename(data));
- else if (NotmuchDefaultUri)
- added = snprintf(uri, sizeof(uri), "%s?query=", NotmuchDefaultUri);
- else if (Maildir)
- added = snprintf(uri, sizeof(uri), "notmuch://%s?query=", Maildir);
+ else if (NmDefaultUri)
+ added = snprintf(uri, sizeof(uri), "%s?query=", NmDefaultUri);
+ else if (Folder)
+ added = snprintf(uri, sizeof(uri), "notmuch://%s?query=", Folder);
else
return NULL;
*/
void nm_query_window_forward(void)
{
- if (NotmuchQueryWindowCurrentPosition != 0)
- NotmuchQueryWindowCurrentPosition--;
+ if (NmQueryWindowCurrentPosition != 0)
+ NmQueryWindowCurrentPosition--;
- mutt_debug(2, "nm_query_window_forward (%d)\n", NotmuchQueryWindowCurrentPosition);
+ mutt_debug(2, "nm_query_window_forward (%d)\n", NmQueryWindowCurrentPosition);
}
/**
*/
void nm_query_window_backward(void)
{
- NotmuchQueryWindowCurrentPosition++;
- mutt_debug(2, "nm_query_window_backward (%d)\n", NotmuchQueryWindowCurrentPosition);
+ NmQueryWindowCurrentPosition++;
+ mutt_debug(2, "nm_query_window_backward (%d)\n", NmQueryWindowCurrentPosition);
}
int nm_modify_message_tags(struct Context *ctx, struct Header *hdr, char *buf)
if (!db_filename)
{
- if (NotmuchDefaultUri)
+ if (NmDefaultUri)
{
- if (strncmp(NotmuchDefaultUri, "notmuch://", 10) == 0)
- db_filename = NotmuchDefaultUri + 10;
+ if (strncmp(NmDefaultUri, "notmuch://", 10) == 0)
+ db_filename = NmDefaultUri + 10;
else
- db_filename = NotmuchDefaultUri;
+ db_filename = NmDefaultUri;
}
- else if (Maildir)
- db_filename = Maildir;
+ else if (Folder)
+ db_filename = Folder;
dflt = true;
}
{
char *qstr = NULL;
- safe_asprintf(&qstr, "( %s ) tag:%s", db_query, NotmuchUnreadTag);
+ safe_asprintf(&qstr, "( %s ) tag:%s", db_query, NmUnreadTag);
*new = count_query(db, qstr);
FREE(&qstr);
}
notmuch_message_maildir_flags_to_tags(msg);
if (h)
update_tags(msg, nm_header_get_tags(h));
- if (NotmuchRecordTags)
- update_tags(msg, NotmuchRecordTags);
+ if (NmRecordTags)
+ update_tags(msg, NmRecordTags);
}
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, SslCertFile, NULL);
+ * SSL_CTX_load_verify_locations (ssldata->ctx, CertificateFile, NULL);
*/
static int ssl_load_certificates(SSL_CTX *ctx)
{
SSL_CTX_set_cert_store(ctx, store);
}
- if ((fp = fopen(SslCertFile, "rt")) == NULL)
+ if ((fp = fopen(CertificateFile, "rt")) == NULL)
return 0;
while (NULL != PEM_read_X509(fp, &cert, NULL, NULL))
if (!HAVE_ENTROPY())
{
/* load entropy from files */
- add_entropy(SslEntropyFile);
+ add_entropy(EntropyFile);
add_entropy(RAND_file_name(path, sizeof(path)));
/* load entropy from egd sockets */
int pass = 0;
FILE *fp = NULL;
- if (!SslCertFile)
+ if (!CertificateFile)
return 0;
- if ((fp = fopen(SslCertFile, "rt")) == NULL)
+ if ((fp = fopen(CertificateFile, "rt")) == NULL)
return 0;
if (!X509_digest(peercert, EVP_sha256(), peermd, &peermdlen))
* true, then check_certificate_file() must be false. Therefore we don't need
* to also scan the certificate file here.
*/
- allow_always = allow_always && SslCertFile && check_certificate_expiration(cert, true);
+ allow_always = allow_always && 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;
- if ((fp = fopen(SslCertFile, "a")))
+ if ((fp = fopen(CertificateFile, "a")))
{
if (PEM_write_X509(fp, cert))
done = 1;
if (!preverify_ok || skip_mode)
{
/* automatic check from user's database */
- if (SslCertFile && check_certificate_by_digest(cert))
+ if (CertificateFile && check_certificate_by_digest(cert))
{
mutt_debug(2, "ssl_verify_callback: digest check passed\n");
SSL_set_ex_data(ssl, SkipModeExDataIndex, NULL);
}
}
- if (SslCertFile && !ssl_load_certificates(data->ctx))
+ if (CertificateFile && !ssl_load_certificates(data->ctx))
mutt_debug(1, "ssl_socket_open: Error loading trusted certificates\n");
ssl_get_client_cert(data, conn);
}
}
- if (SslCertFile && !ssl_load_certificates(ssldata->ctx))
+ if (CertificateFile && !ssl_load_certificates(ssldata->ctx))
mutt_debug(1, "mutt_ssl_starttls: Error loading trusted certificates\n");
ssl_get_client_cert(ssldata, conn);
regmatch_t pmatch[3];
/* try checking against names stored in stored certs file */
- if ((fp = fopen(SslCertFile, "r")))
+ if ((fp = fopen(CertificateFile, "r")))
{
if (REGCOMP(&preg,
"^#H ([a-zA-Z0-9_\\.-]+) ([0-9A-F]{4}( [0-9A-F]{4}){7})[ \t]*$",
unsigned char *b64_data_data = NULL;
struct stat filestat;
- if (stat(SslCertFile, &filestat) == -1)
+ if (stat(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(SslCertFile, "r");
+ fd1 = fopen(CertificateFile, "r");
if (!fd1)
{
return 0;
menu->title = title;
/* certificates with bad dates, or that are revoked, must be
accepted manually each and every time */
- if (SslCertFile && !savedcert &&
+ if (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;
- if ((fp = fopen(SslCertFile, "a")))
+ if ((fp = fopen(CertificateFile, "a")))
{
/* save hostname if necessary */
if (certerr & CERTERR_HOSTNAME)
return -1;
}
- gnutls_certificate_set_x509_trust_file(data->xcred, SslCertFile, GNUTLS_X509_FMT_PEM);
+ gnutls_certificate_set_x509_trust_file(data->xcred, CertificateFile, GNUTLS_X509_FMT_PEM);
/* ignore errors, maybe file doesn't exist yet */
- if (SslCACertFile)
+ if (SslCaCertificatesFile)
{
- gnutls_certificate_set_x509_trust_file(data->xcred, SslCACertFile, GNUTLS_X509_FMT_PEM);
+ gnutls_certificate_set_x509_trust_file(data->xcred, SslCaCertificatesFile, GNUTLS_X509_FMT_PEM);
}
if (SslClientCert)
goto fail;
}
- if (SslDHPrimeBits > 0)
+ if (SslMinDhPrimeBits > 0)
{
- gnutls_dh_set_prime_bits(data->state, SslDHPrimeBits);
+ gnutls_dh_set_prime_bits(data->state, SslMinDhPrimeBits);
}
/*
{
strfcpy(prefix, s, sizeof(prefix));
mutt_sanitize_filename(prefix, 1);
- snprintf(s, l, "%s/%s", NONULL(TempDir), prefix);
+ snprintf(s, l, "%s/%s", NONULL(Tmpdir), prefix);
if (lstat(s, &sb) == -1 && errno == ENOENT)
return;
{
#ifdef USE_IMAP
/* if folder = {host} or imap[s]://host/: don't append slash */
- if (mx_is_imap(NONULL(Maildir)) && (Maildir[strlen(Maildir) - 1] == '}' ||
- Maildir[strlen(Maildir) - 1] == '/'))
- strfcpy(p, NONULL(Maildir), sizeof(p));
+ if (mx_is_imap(NONULL(Folder)) && (Folder[strlen(Folder) - 1] == '}' ||
+ Folder[strlen(Folder) - 1] == '/'))
+ strfcpy(p, NONULL(Folder), sizeof(p));
else
#endif
#ifdef USE_NOTMUCH
- if (mx_is_notmuch(NONULL(Maildir)))
- strfcpy(p, NONULL(Maildir), sizeof(p));
+ if (mx_is_notmuch(NONULL(Folder)))
+ strfcpy(p, NONULL(Folder), sizeof(p));
else
#endif
- if (Maildir && *Maildir && Maildir[strlen(Maildir) - 1] == '/')
- strfcpy(p, NONULL(Maildir), sizeof(p));
+ if (Folder && *Folder && Folder[strlen(Folder) - 1] == '/')
+ strfcpy(p, NONULL(Folder), sizeof(p));
else
- snprintf(p, sizeof(p), "%s/", NONULL(Maildir));
+ snprintf(p, sizeof(p), "%s/", NONULL(Folder));
tail = s + 1;
}
case '>':
{
- strfcpy(p, NONULL(Inbox), sizeof(p));
+ strfcpy(p, NONULL(Mbox), sizeof(p));
tail = s + 1;
}
break;
case '<':
{
- strfcpy(p, NONULL(Outbox), sizeof(p));
+ strfcpy(p, NONULL(Record), sizeof(p));
tail = s + 1;
}
break;
void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
const char *src, int line)
{
- size_t n = snprintf(s, slen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(TempDir),
- NONULL(prefix), NONULL(Hostname), (int) getuid(), (int) getpid(),
+ size_t n = snprintf(s, slen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(Tmpdir),
+ NONULL(prefix), NONULL(ShortHostname), (int) getuid(), (int) getpid(),
mutt_rand64(), suffix ? "." : "", NONULL(suffix));
if (n >= slen)
mutt_debug(1, "%s:%d: ERROR: insufficient buffer space to hold temporary "
else if (strstr(p, "..") && (scheme == U_UNKNOWN || scheme == U_FILE) && realpath(p, tmp))
strfcpy(p, tmp, buflen - (p - s));
- if ((mutt_strncmp(s, Maildir, (len = mutt_strlen(Maildir))) == 0) && s[len] == '/')
+ if ((mutt_strncmp(s, Folder, (len = mutt_strlen(Folder))) == 0) && s[len] == '/')
{
*s++ = '=';
memmove(s, s + len, mutt_strlen(s + len) + 1);
#endif
#ifdef USE_NOTMUCH
if (mx_is_notmuch(path))
- strfcpy(output, NONULL(Maildir), olen);
+ strfcpy(output, NONULL(Folder), olen);
else
#endif
{
else if (st.st_size == 0)
{
/* hard to tell what zero-length files are, so assume the default magic */
- if (DefaultMagic == MUTT_MBOX || DefaultMagic == MUTT_MMDF)
- return DefaultMagic;
+ if (MboxType == MUTT_MBOX || MboxType == MUTT_MMDF)
+ return MboxType;
else
return MUTT_MBOX;
}
}
/**
- * mx_set_magic - set DefaultMagic to the given value
+ * mx_set_magic - set MboxType to the given value
*/
int mx_set_magic(const char *s)
{
if (mutt_strcasecmp(s, "mbox") == 0)
- DefaultMagic = MUTT_MBOX;
+ MboxType = MUTT_MBOX;
else if (mutt_strcasecmp(s, "mmdf") == 0)
- DefaultMagic = MUTT_MMDF;
+ MboxType = MUTT_MMDF;
else if (mutt_strcasecmp(s, "mh") == 0)
- DefaultMagic = MUTT_MH;
+ MboxType = MUTT_MH;
else if (mutt_strcasecmp(s, "maildir") == 0)
- DefaultMagic = MUTT_MAILDIR;
+ MboxType = MUTT_MAILDIR;
else
return -1;
ctx->magic = MUTT_COMPRESSED;
else
#endif
- ctx->magic = DefaultMagic;
+ ctx->magic = MboxType;
flags |= MUTT_APPENDNEW;
}
else
struct stat st, stc;
int opt_confappend, rc;
- if (!TrashPath || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
+ if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && option(OPT_MAILDIR_TRASH)))
return 0;
for (i = 0; i < ctx->msgcount; i++)
opt_confappend = option(OPT_CONFIRMAPPEND);
if (opt_confappend)
unset_option(OPT_CONFIRMAPPEND);
- rc = mutt_save_confirm(TrashPath, &st);
+ rc = mutt_save_confirm(Trash, &st);
if (opt_confappend)
set_option(OPT_CONFIRMAPPEND);
if (rc != 0)
return 0; /* we are in the trash folder: simple sync */
#ifdef USE_IMAP
- if (Context->magic == MUTT_IMAP && mx_is_imap(TrashPath))
+ if (Context->magic == MUTT_IMAP && mx_is_imap(Trash))
{
- if (!imap_fast_trash(Context, TrashPath))
+ if (!imap_fast_trash(Context, Trash))
return 0;
}
#endif
- if (mx_open_mailbox(TrashPath, MUTT_APPEND, &ctx_trash) != NULL)
+ if (mx_open_mailbox(Trash, MUTT_APPEND, &ctx_trash) != NULL)
{
/* continue from initial scan above */
for (; i < ctx->msgcount; i++)
}
else
{
- strfcpy(mbox, NONULL(Inbox), sizeof(mbox));
+ strfcpy(mbox, NONULL(Mbox), sizeof(mbox));
isSpool = mutt_is_spool(ctx->path) && !mutt_is_spool(mbox);
}
}
/* copy mails to the trash before expunging */
- if (purge && ctx->deleted && (mutt_strcmp(ctx->path, TrashPath) != 0))
+ if (purge && ctx->deleted && (mutt_strcmp(ctx->path, Trash) != 0))
{
if (trash_append(ctx) != 0)
{
msgcount = ctx->msgcount;
deleted = ctx->deleted;
- if (purge && ctx->deleted && (mutt_strcmp(ctx->path, TrashPath) != 0))
+ if (purge && ctx->deleted && (mutt_strcmp(ctx->path, Trash) != 0))
{
if (trash_append(ctx) != 0)
return -1;
MUTT_COMPRESSED,
};
-WHERE short DefaultMagic;
+WHERE short MboxType;
#define MMDF_SEP "\001\001\001\001\n"
from = mutt_default_from();
mailbox = from->mailbox;
- if (!mailbox && EnvFrom)
- mailbox = EnvFrom->mailbox;
+ if (!mailbox && EnvelopeFromAddress)
+ mailbox = EnvelopeFromAddress->mailbox;
if ((WithCrypto & APPLICATION_SMIME) && (msg->security & APPLICATION_SMIME))
crypt_smime_set_sender(mailbox);
if (dryrun)
{
- snprintf(tmpdir, sizeof(tmpdir), "%s/mutt-gpgme-XXXXXX", TempDir);
+ snprintf(tmpdir, sizeof(tmpdir), "%s/mutt-gpgme-XXXXXX", Tmpdir);
if (!mkdtemp(tmpdir))
{
mutt_debug(1, "Error creating temporary GPGME home\n");
const char *fname, const char *uids)
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
- smimeerrfd, fname, NULL, SmimeCryptAlg, NULL, NULL, uids,
+ smimeerrfd, fname, NULL, SmimeEncryptWith, NULL, NULL, uids,
NULL, SmimeEncryptCommand);
}
int smimeoutfd, int smimeerrfd, const char *fname)
{
return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
- smimeerrfd, fname, NULL, NULL, SmimeDigestAlg, SmimeKeyToUse,
+ smimeerrfd, fname, NULL, NULL, SmimeSignDigestAlg, SmimeKeyToUse,
SmimeCertToUse, SmimeIntermediateToUse, SmimeSignCommand);
}
mutt_generate_boundary(&t->parameter);
- micalg = openssl_md_to_smime_micalg(SmimeDigestAlg);
+ micalg = openssl_md_to_smime_micalg(SmimeSignDigestAlg);
mutt_set_parameter("micalg", micalg, &t->parameter);
FREE(&micalg);
switch (choice = mutt_multi_choice(_("1: DES, 2: Triple-DES "), _("dt")))
{
case 1:
- mutt_str_replace(&SmimeCryptAlg, "des");
+ mutt_str_replace(&SmimeEncryptWith, "des");
break;
case 2:
- mutt_str_replace(&SmimeCryptAlg, "des3");
+ mutt_str_replace(&SmimeEncryptWith, "des3");
break;
}
break;
_("1: RC2-40, 2: RC2-64, 3: RC2-128 "), _("468")))
{
case 1:
- mutt_str_replace(&SmimeCryptAlg, "rc2-40");
+ mutt_str_replace(&SmimeEncryptWith, "rc2-40");
break;
case 2:
- mutt_str_replace(&SmimeCryptAlg, "rc2-64");
+ mutt_str_replace(&SmimeEncryptWith, "rc2-64");
break;
case 3:
- mutt_str_replace(&SmimeCryptAlg, "rc2-128");
+ mutt_str_replace(&SmimeEncryptWith, "rc2-128");
break;
}
break;
_("1: AES128, 2: AES192, 3: AES256 "), _("895")))
{
case 1:
- mutt_str_replace(&SmimeCryptAlg, "aes128");
+ mutt_str_replace(&SmimeEncryptWith, "aes128");
break;
case 2:
- mutt_str_replace(&SmimeCryptAlg, "aes192");
+ mutt_str_replace(&SmimeEncryptWith, "aes192");
break;
case 3:
- mutt_str_replace(&SmimeCryptAlg, "aes256");
+ mutt_str_replace(&SmimeEncryptWith, "aes256");
break;
}
break;
case 4: /* (c)lear */
- FREE(&SmimeCryptAlg);
+ FREE(&SmimeEncryptWith);
/* fallback */
case -1: /* Ctrl-G or Enter */
choice = 0;
int rc, ret = 0;
void *hc = NULL;
- if (nserv->check_time + NewsPollTimeout > now)
+ if (nserv->check_time + NntpPoll > now)
return 0;
mutt_message(_("Checking for new messages..."));
size_t l2 = sizeof(buffer);
hfi.hdr = (IsHeader(rd->extra)) ? rd->extra->hdr : rd->extra->bdy->hdr;
mutt_make_string_info(buffer, l1 < l2 ? l1 : l2, rd->pager_status_window->cols,
- NONULL(PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT);
+ NONULL(PagerFormat), &hfi, MUTT_FORMAT_MAKEPRINT);
mutt_draw_statusline(rd->pager_status_window->cols, buffer, l2);
}
else
menu_redraw_current(rd->index);
/* print out the index status bar */
- menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(Status));
+ menu_status_line(buffer, sizeof(buffer), rd->index, NONULL(StatusFormat));
mutt_window_move(rd->index_status_window, 0, 0);
SETCOLOR(MT_COLOR_STATUS);
{
if (option(OPT_BEEP_NEW))
beep();
- if (NewMailCmd)
+ if (NewMailCommand)
{
char cmd[LONG_STRING];
- menu_status_line(cmd, sizeof(cmd), rd.index, NONULL(NewMailCmd));
+ menu_status_line(cmd, sizeof(cmd), rd.index, NONULL(NewMailCommand));
mutt_system(cmd);
}
}
/* if spam tag already exists, figure out how to amend it */
if (e->spam && *buf)
{
- /* If SpamSep defined, append with separator */
- if (SpamSep)
+ /* If SpamSeparator defined, append with separator */
+ if (SpamSeparator)
{
- mutt_buffer_addstr(e->spam, SpamSep);
+ mutt_buffer_addstr(e->spam, SpamSeparator);
mutt_buffer_addstr(e->spam, buf);
}
int ret;
struct PopData *pop_data = (struct PopData *) ctx->data;
- if ((pop_data->check_time + PopCheckTimeout) > time(NULL))
+ if ((pop_data->check_time + PopCheckinterval) > time(NULL))
return 0;
pop_logout(ctx);
{
struct Context *ctx = (struct Context *) menu->data;
- _mutt_make_string(s, slen, NONULL(HdrFmt), ctx, ctx->hdrs[entry], MUTT_FORMAT_ARROWCURSOR);
+ _mutt_make_string(s, slen, NONULL(IndexFormat), ctx, ctx->hdrs[entry], MUTT_FORMAT_ARROWCURSOR);
}
static struct Header *select_msg(void)
/* the cryptalg field must not be empty */
if ((WithCrypto & APPLICATION_SMIME) && *smime_cryptalg)
- mutt_str_replace(&SmimeCryptAlg, smime_cryptalg);
+ mutt_str_replace(&SmimeEncryptWith, smime_cryptalg);
/* Set {Smime,Pgp}SignAs, if desired. */
char *p = NULL;
pid_t thepid;
- mutt_expand_file_fmt(cmd, sizeof(cmd), QueryCmd, s);
+ mutt_expand_file_fmt(cmd, sizeof(cmd), QueryCommand, s);
if ((thepid = mutt_create_filter(cmd, NULL, &fp, NULL)) < 0)
{
struct Query *results = NULL;
struct Address *tmpa = NULL;
- if (!QueryCmd)
+ if (!QueryCommand)
{
mutt_error(_("Query command not defined."));
return 0;
void mutt_query_menu(char *buf, size_t buflen)
{
- if (!QueryCmd)
+ if (!QueryCommand)
{
mutt_error(_("Query command not defined."));
return;
break;
}
if (mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
- MsgFmt && aptr->content->hdr)
+ MessageFormat && aptr->content->hdr)
{
char s[SHORT_STRING];
- _mutt_make_string(s, sizeof(s), MsgFmt, NULL, aptr->content->hdr,
+ _mutt_make_string(s, sizeof(s), MessageFormat, NULL, aptr->content->hdr,
MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR);
if (*s)
{
}
else if (aptr->content->description ||
(mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
- MsgFmt && aptr->content->hdr))
+ MessageFormat && aptr->content->hdr))
break;
/* FALLS THROUGH TO 'F' */
case 'F':
return;
mutt_endwin(NULL);
memset(&state, 0, sizeof(struct State));
- thepid = mutt_create_filter(NONULL(PrintCmd), &state.fpout, NULL, NULL);
+ thepid = mutt_create_filter(NONULL(PrintCommand), &state.fpout, NULL, NULL);
print_attachment_list(actx, fp, tag, top, &state);
safe_fclose(&state.fpout);
if (mutt_wait_filter(thepid) != 0 || option(OPT_WAIT_KEY))
if (_prefix)
strfcpy(prefix, _prefix, sizeof(prefix));
else if (!option(OPT_TEXT_FLOWED))
- _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, hdr, 0);
+ _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, hdr, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
if (option(OPT_FORWARD_QUOTE))
{
if (!option(OPT_TEXT_FLOWED))
- _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent_hdr, 0);
+ _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
}
st.fpout = tmpfp;
if (!option(OPT_TEXT_FLOWED))
- _mutt_make_string(prefix, sizeof(prefix), NONULL(Prefix), Context, parent_hdr, 0);
+ _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0);
else
strfcpy(prefix, ">", sizeof(prefix));
struct Score *next;
};
-static struct Score *Score = NULL;
+static struct Score *ScoreList = NULL;
void mutt_check_rescore(struct Context *ctx)
{
/* look for an existing entry and update the value, else add it to the end
of the list */
- for (ptr = Score, last = NULL; ptr; last = ptr, ptr = ptr->next)
+ for (ptr = ScoreList, last = NULL; ptr; last = ptr, ptr = ptr->next)
if (mutt_strcmp(pattern, ptr->str) == 0)
break;
if (!ptr)
if (last)
last->next = ptr;
else
- Score = ptr;
+ ScoreList = ptr;
ptr->pat = pat;
ptr->str = pattern;
}
memset(&cache, 0, sizeof(cache));
hdr->score = 0; /* in case of re-scoring */
- for (tmp = Score; tmp; tmp = tmp->next)
+ for (tmp = ScoreList; tmp; tmp = tmp->next)
{
if (mutt_pattern_exec(tmp->pat, MUTT_MATCH_FULL_ADDRESS, NULL, hdr, &cache) > 0)
{
mutt_extract_token(buf, s, 0);
if (mutt_strcmp("*", buf->data) == 0)
{
- for (tmp = Score; tmp;)
+ for (tmp = ScoreList; tmp;)
{
last = tmp;
tmp = tmp->next;
mutt_pattern_free(&last->pat);
FREE(&last);
}
- Score = NULL;
+ ScoreList = NULL;
}
else
{
- for (tmp = Score; tmp; last = tmp, tmp = tmp->next)
+ for (tmp = ScoreList; tmp; last = tmp, tmp = tmp->next)
{
if (mutt_strcmp(buf->data, tmp->str) == 0)
{
if (last)
last->next = tmp->next;
else
- Score = tmp->next;
+ ScoreList = tmp->next;
mutt_pattern_free(&tmp->pat);
FREE(&tmp);
/* there should only be one score per pattern, so we can stop here */
{
char buffer[LONG_STRING];
- if (ForwardAttrIntro)
+ if (ForwardAttributionIntro)
{
setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(buffer, sizeof(buffer), ForwardAttrIntro, ctx, cur);
+ mutt_make_string(buffer, sizeof(buffer), ForwardAttributionIntro, ctx, cur);
setlocale(LC_TIME, "");
fputs(buffer, fp);
fputs("\n\n", fp);
{
char buffer[LONG_STRING];
- if (ForwardAttrTrailer)
+ if (ForwardAttributionTrailer)
{
setlocale(LC_TIME, NONULL(AttributionLocale));
- mutt_make_string(buffer, sizeof(buffer), ForwardAttrTrailer, ctx, cur);
+ mutt_make_string(buffer, sizeof(buffer), ForwardAttributionTrailer, ctx, cur);
setlocale(LC_TIME, "");
fputc('\n', fp);
fputs(buffer, fp);
char buffer[STRING];
/* set the default subject for the message. */
- mutt_make_string(buffer, sizeof(buffer), NONULL(ForwFmt), ctx, cur);
+ mutt_make_string(buffer, sizeof(buffer), NONULL(ForwardFormat), ctx, cur);
mutt_str_replace(&env->subject, buffer);
}
int dummy = 0;
pid_t thepid;
- mutt_expand_file_fmt(cmd, sizeof(cmd), MimeTypeQueryCmd, att->filename);
+ mutt_expand_file_fmt(cmd, sizeof(cmd), MimeTypeQueryCommand, att->filename);
if ((thepid = mutt_create_filter(cmd, NULL, &fp, &fperr)) < 0)
{
att = mutt_new_body();
att->filename = safe_strdup(path);
- if (MimeTypeQueryCmd && *MimeTypeQueryCmd && option(OPT_MIME_TYPE_QUERY_FIRST))
+ if (MimeTypeQueryCommand && *MimeTypeQueryCommand && option(OPT_MIME_TYPE_QUERY_FIRST))
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 && MimeTypeQueryCmd && *MimeTypeQueryCmd && !option(OPT_MIME_TYPE_QUERY_FIRST))
+ if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !option(OPT_MIME_TYPE_QUERY_FIRST))
run_mime_type_query(att);
if ((info = mutt_get_content_info(path, att)) == NULL)
{
char *p = NULL;
- if (Fqdn && Fqdn[0] != '@')
+ if (Hostname && Hostname[0] != '@')
{
- p = Fqdn;
+ p = Hostname;
if (may_hide_host && option(OPT_HIDDEN_HOST))
{
- if ((p = strchr(Fqdn, '.')))
+ if ((p = strchr(Hostname, '.')))
p++;
/* sanity check: don't hide the host if
*/
if (!p || !strchr(p, '.'))
- p = Fqdn;
+ p = Hostname;
}
}
now = time(NULL);
tm = gmtime(&now);
if (!(fqdn = mutt_fqdn(0)))
- fqdn = NONULL(Hostname);
+ fqdn = NONULL(ShortHostname);
snprintf(buf, sizeof(buf), "<%d%02d%02d%02d%02d%02d.%s@%s>", tm->tm_year + 1900,
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, rndid, fqdn);
if (option(OPT_USE_ENVELOPE_FROM))
{
- if (EnvFrom)
+ if (EnvelopeFromAddress)
{
args = add_option(args, &argslen, &argsmax, "-f");
- args = add_args(args, &argslen, &argsmax, EnvFrom);
+ args = add_args(args, &argslen, &argsmax, EnvelopeFromAddress);
}
else if (from && !from->next)
{
if (hdr->security & ENCRYPT)
{
fputc('E', msg->fp);
- if (SmimeCryptAlg && *SmimeCryptAlg)
- fprintf(msg->fp, "C<%s>", SmimeCryptAlg);
+ if (SmimeEncryptWith && *SmimeEncryptWith)
+ fprintf(msg->fp, "C<%s>", SmimeEncryptWith);
}
if (hdr->security & OPPENCRYPT)
fputc('O', msg->fp);
b->msg_flagged = Context->flagged;
}
- /* compute length of Maildir without trailing separator */
- size_t maildirlen = mutt_strlen(Maildir);
+ /* compute length of Folder without trailing separator */
+ size_t maildirlen = mutt_strlen(Folder);
if (maildirlen && SidebarDelimChars &&
- strchr(SidebarDelimChars, Maildir[maildirlen - 1]))
+ strchr(SidebarDelimChars, Folder[maildirlen - 1]))
maildirlen--;
- /* check whether Maildir is a prefix of the current folder's path */
+ /* check whether Folder is a prefix of the current folder's path */
bool maildir_is_prefix = false;
if ((mutt_strlen(b->path) > maildirlen) &&
- (mutt_strncmp(Maildir, b->path, maildirlen) == 0) &&
+ (mutt_strncmp(Folder, b->path, maildirlen) == 0) &&
SidebarDelimChars && strchr(SidebarDelimChars, b->path[maildirlen]))
maildir_is_prefix = true;
}
if (!(fqdn = mutt_fqdn(0)))
- fqdn = NONULL(Hostname);
+ fqdn = NONULL(ShortHostname);
snprintf(buf, sizeof(buf), "%s %s\r\n", Esmtp ? "EHLO" : "HELO", fqdn);
/* XXX there should probably be a wrapper in mutt_socket.c that
/* it might be better to synthesize an envelope from from user and host
* but this condition is most likely arrived at accidentally */
- if (EnvFrom)
- envfrom = EnvFrom->mailbox;
+ if (EnvelopeFromAddress)
+ envfrom = EnvelopeFromAddress->mailbox;
else if (from)
envfrom = from->mailbox;
else
void mutt_sort_headers(struct Context *ctx, int init);
int mutt_select_sort(int reverse);
-WHERE short BrowserSort;
+WHERE short SortBrowser;
WHERE short Sort;
WHERE short SortAux; /* auxiliary sorting method */
WHERE short SortAlias;
case 'h':
snprintf(fmt, sizeof(fmt), "%%%ss", prefix);
- snprintf(buf, buflen, fmt, NONULL(Hostname));
+ snprintf(buf, buflen, fmt, NONULL(ShortHostname));
break;
case 'l':
0);
}
- if (!StChars || !StChars->len)
+ if (!StatusChars || !StatusChars->len)
buf[0] = 0;
- else if (i >= StChars->len)
- snprintf(buf, buflen, "%s", StChars->chars[0]);
+ else if (i >= StatusChars->len)
+ snprintf(buf, buflen, "%s", StatusChars->chars[0]);
else
- snprintf(buf, buflen, "%s", StChars->chars[i]);
+ snprintf(buf, buflen, "%s", StatusChars->chars[i]);
break;
}