From f6208feb3f5d5f2308f599a9b2a137a7e0478285 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 4 Sep 2017 19:16:37 +0100 Subject: [PATCH] rename: Global variables to match their config item Rename lots of constants to match the user-facing config names. e.g. "certificate_file" SslCertFile -> CertificateFile "nm_open_timeout" NotmuchOpenTimeout -> NmOpenTimeout --- addrbook.c | 2 +- alias.c | 10 ++-- attach.c | 4 +- browser.c | 56 ++++++++++---------- buffy.c | 6 +-- buffy.h | 4 +- commands.c | 6 +-- complete.c | 4 +- compose.c | 8 +-- compress.c | 2 +- copy.c | 2 +- copy.h | 2 +- curs_main.c | 24 ++++----- edit.c | 4 +- editmsg.c | 6 +-- globals.h | 110 +++++++++++++++++++-------------------- hdrline.c | 2 +- history.c | 68 ++++++++++++------------ hook.c | 6 +-- imap/util.c | 2 +- init.c | 32 ++++++------ init.h | 120 +++++++++++++++++++++---------------------- main.c | 14 ++--- mbox.c | 4 +- mbtable.h | 2 +- mh.c | 36 ++++++------- mutt_notmuch.c | 82 ++++++++++++++--------------- mutt_ssl.c | 20 ++++---- mutt_ssl_gnutls.c | 20 ++++---- muttlib.c | 30 +++++------ mx.c | 32 ++++++------ mx.h | 2 +- ncrypt/crypt.c | 4 +- ncrypt/crypt_gpgme.c | 2 +- ncrypt/smime.c | 24 ++++----- nntp.c | 2 +- pager.c | 8 +-- parse.c | 6 +-- pop.c | 2 +- postpone.c | 4 +- query.c | 6 +-- recvattach.c | 8 +-- recvcmd.c | 6 +-- score.c | 16 +++--- send.c | 10 ++-- sendlib.c | 24 ++++----- sidebar.c | 10 ++-- smtp.c | 6 +-- sort.h | 2 +- status.c | 10 ++-- 50 files changed, 436 insertions(+), 436 deletions(-) diff --git a/addrbook.c b/addrbook.c index 053d124bb28..dc3d56c42cc 100644 --- a/addrbook.c +++ b/addrbook.c @@ -85,7 +85,7 @@ static const char *alias_format_str(char *dest, size_t destlen, size_t col, int 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); } diff --git a/alias.c b/alias.c index 37421c41dd2..5d42ae537a4 100644 --- a/alias.c +++ b/alias.c @@ -460,7 +460,7 @@ struct Address *alias_reverse_lookup(struct Address *a) 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) @@ -477,7 +477,7 @@ 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); } } @@ -494,7 +494,7 @@ void mutt_alias_delete_reverse(struct Alias *t) 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); } } @@ -645,9 +645,9 @@ bool mutt_addr_is_user(struct Address *addr) 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); diff --git a/attach.c b/attach.c index 113768644be..a76c73af09a 100644 --- a/attach.c +++ b/attach.c @@ -1049,7 +1049,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) 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)) { @@ -1074,7 +1074,7 @@ int mutt_print_attachment(FILE *fp, struct Body *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; diff --git a/browser.c b/browser.c index f95553a71cc..750ea90f283 100644 --- a/browser.c +++ b/browser.c @@ -134,7 +134,7 @@ static int browser_compare_subject(const void *a, const void *b) 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) @@ -144,7 +144,7 @@ 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) @@ -154,7 +154,7 @@ 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) @@ -164,7 +164,7 @@ 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) @@ -180,7 +180,7 @@ 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) @@ -196,7 +196,7 @@ 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); } /** @@ -216,7 +216,7 @@ static int browser_compare(const void *a, const void *b) 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); @@ -242,7 +242,7 @@ static int browser_compare(const void *a, const void *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: @@ -301,7 +301,7 @@ static const char *folder_format_str(char *dest, size_t destlen, size_t col, int if (op == 'D') { - t_fmt = NONULL(DateFmt); + t_fmt = NONULL(DateFormat); if (*t_fmt == '!') { t_fmt++; @@ -902,7 +902,7 @@ static void folder_entry(char *s, size_t slen, struct Menu *menu, int num) #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 @@ -918,7 +918,7 @@ static void vfolder_entry(char *s, size_t slen, struct Menu *menu, int num) 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 @@ -1079,7 +1079,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf 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] = ""; @@ -1179,7 +1179,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf */ short browser_track; - switch (BrowserSort & SORT_MASK) + switch (SortBrowser & SORT_MASK) { case SORT_DESC: case SORT_SUBJECT: @@ -1221,8 +1221,8 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf 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; @@ -1761,37 +1761,37 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf 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; @@ -1808,17 +1808,17 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf 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 diff --git a/buffy.c b/buffy.c index 540f341a9d7..4a4b0be6edf 100644 --- a/buffy.c +++ b/buffy.c @@ -682,7 +682,7 @@ int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, * 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) { @@ -703,10 +703,10 @@ 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; diff --git a/buffy.h b/buffy.h index d37ccc7a4a9..c6e41064325 100644 --- a/buffy.h +++ b/buffy.h @@ -61,8 +61,8 @@ struct Buffy }; 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); diff --git a/commands.c b/commands.c index ccba7bc9f20..981eb21a4d8 100644 --- a/commands.c +++ b/commands.c @@ -156,7 +156,7 @@ int mutt_display_message(struct Header *cur) 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); } @@ -508,7 +508,7 @@ void mutt_pipe_message(struct Header *h) 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; @@ -518,7 +518,7 @@ void mutt_print_message(struct Header *h) 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 diff --git a/complete.c b/complete.c index c534ec2855d..45e63beb88f 100644 --- a/complete.c +++ b/complete.c @@ -129,7 +129,7 @@ int mutt_complete(char *s, size_t slen) if (*s == '!') p = NONULL(SpoolFile); else - p = NONULL(Maildir); + p = NONULL(Folder); mutt_concat_path(imap_path, p, s + 1, sizeof(imap_path)); } @@ -147,7 +147,7 @@ int mutt_complete(char *s, size_t slen) 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]; diff --git a/compose.c b/compose.c index 85a929744f0..1ac1afff184 100644 --- a/compose.c +++ b/compose.c @@ -311,13 +311,13 @@ static void redraw_crypt_lines(struct Header *msg) } 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)); } } @@ -686,7 +686,7 @@ static unsigned long cum_attachs_size(struct Menu *menu) * 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 * @@ -712,7 +712,7 @@ static const char *compose_format_str(char *buf, size_t buflen, size_t col, int 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 */ diff --git a/compress.c b/compress.c index 3122e6b3e3a..0f7b0636b35 100644 --- a/compress.c +++ b/compress.c @@ -545,7 +545,7 @@ static int comp_open_append_mailbox(struct Context *ctx, int flags) 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)) diff --git a/copy.c b/copy.c index 811618c3f96..ac6f59b0dbb 100644 --- a/copy.c +++ b/copy.c @@ -562,7 +562,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, 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) diff --git a/copy.h b/copy.h index f81af799405..a421d4d68dc 100644 --- a/copy.h +++ b/copy.h @@ -50,7 +50,7 @@ struct Context; #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 */ diff --git a/curs_main.c b/curs_main.c index 044fbc70034..e3161d98b88 100644 --- a/curs_main.c +++ b/curs_main.c @@ -664,7 +664,7 @@ void index_make_entry(char *s, size_t l, struct Menu *menu, int num) } } - _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) @@ -880,7 +880,7 @@ static void index_menu_redraw(struct Menu *menu) 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)); @@ -1011,10 +1011,10 @@ int mutt_index_menu(void) 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; @@ -1052,10 +1052,10 @@ int mutt_index_menu(void) 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); } } @@ -1950,18 +1950,18 @@ int mutt_index_menu(void) 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 @@ -1969,18 +1969,18 @@ int mutt_index_menu(void) 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 diff --git a/edit.c b/edit.c index 2728b44d166..2711009c0f0 100644 --- a/edit.c +++ b/edit.c @@ -83,7 +83,7 @@ static char **be_snarf_data(FILE *f, char **buf, int *bufmax, int *buflen, 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; @@ -356,7 +356,7 @@ int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur } 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; diff --git a/editmsg.c b/editmsg.c index e419a5585b5..0afa426286f 100644 --- a/editmsg.c +++ b/editmsg.c @@ -73,12 +73,12 @@ static int edit_one_message(struct Context *ctx, struct Header *cur) 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) { diff --git a/globals.h b/globals.h index 73054811d42..832d651898a 100644 --- a/globals.h +++ b/globals.h @@ -42,11 +42,11 @@ WHERE struct Context *Context; 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; @@ -59,23 +59,23 @@ WHERE char *ComposeFormat; 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; @@ -84,10 +84,10 @@ WHERE char *ImapLogin; 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 @@ -99,11 +99,11 @@ WHERE char *HeaderCachePageSize; #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; @@ -118,7 +118,7 @@ WHERE char *MixEntryFormat; 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; @@ -128,13 +128,13 @@ WHERE char *NntpAuthenticators; 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; @@ -142,10 +142,10 @@ 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; @@ -167,29 +167,29 @@ WHERE char *SmtpPass; 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; @@ -197,7 +197,7 @@ 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; @@ -235,7 +235,7 @@ extern unsigned char QuadOptions[]; WHERE unsigned short Counter; #ifdef USE_NNTP -WHERE short NewsPollTimeout; +WHERE short NntpPoll; WHERE short NntpContext; #endif @@ -245,13 +245,13 @@ WHERE char *DebugFile; #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; @@ -312,13 +312,13 @@ WHERE char *SmimeDefaultKey; 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; @@ -328,19 +328,19 @@ WHERE char *SmimeGetCertEmailCommand; 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 diff --git a/hdrline.c b/hdrline.c index f9360c59523..a864fcc1b82 100644 --- a/hdrline.c +++ b/hdrline.c @@ -719,7 +719,7 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co p = dest; - cp = (op == 'd' || op == 'D') ? (NONULL(DateFmt)) : src; + cp = (op == 'd' || op == 'D') ? (NONULL(DateFormat)) : src; if (*cp == '!') { do_locales = 0; diff --git a/history.c b/history.c index bd53879177e..d5d344f0358 100644 --- a/history.c +++ b/history.c @@ -32,7 +32,7 @@ #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 @@ -41,7 +41,7 @@ * 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: @@ -52,11 +52,11 @@ * 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 @@ -68,7 +68,7 @@ * ... * the oldest entry in the ring * next oldest entry - * HistSize entry + * History entry */ /** @@ -83,10 +83,10 @@ struct History /* 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) { @@ -102,8 +102,8 @@ 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; @@ -116,7 +116,7 @@ void mutt_read_histfile(void) 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) @@ -196,12 +196,12 @@ static void shrink_histfile(void) 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) @@ -226,7 +226,7 @@ static void shrink_histfile(void) if (!regen_file) for (hclass = HC_FIRST; hclass < HC_LAST; hclass++) - if (n[hclass] > SaveHist) + if (n[hclass] > SaveHistory) { regen_file = true; break; @@ -257,7 +257,7 @@ static void shrink_histfile(void) (dup_hash_dec(dup_hashes[hclass], linebuf + read) > 0)) continue; *p = '|'; - if (n[hclass]-- <= SaveHist) + if (n[hclass]-- <= SaveHistory) fprintf(tmp, "%s\n", linebuf); } } @@ -267,7 +267,7 @@ static void shrink_histfile(void) 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); @@ -290,7 +290,7 @@ static void save_history(enum HistoryClass hclass, const char *s) 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; @@ -317,7 +317,7 @@ static void save_history(enum HistoryClass hclass, const char *s) if (--n < 0) { - n = SaveHist; + n = SaveHistory; shrink_histfile(); } } @@ -333,7 +333,7 @@ static void remove_history_dups(enum HistoryClass hclass, const char *s) 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. */ @@ -355,8 +355,8 @@ static void remove_history_dups(enum HistoryClass hclass, const char *s) 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)) @@ -372,13 +372,13 @@ static void remove_history_dups(enum HistoryClass hclass, const char *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) @@ -386,14 +386,14 @@ 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 @@ -403,10 +403,10 @@ void mutt_history_add(enum HistoryClass hclass, const char *s, int save) { 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; } } @@ -418,14 +418,14 @@ char *mutt_history_next(enum HistoryClass hclass) 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; @@ -440,7 +440,7 @@ char *mutt_history_prev(enum HistoryClass hclass) int prev; struct History *h = GET_HISTORY(hclass); - if (!HistSize || !h) + if (!History || !h) return ""; /* disabled */ prev = h->cur; @@ -448,7 +448,7 @@ char *mutt_history_prev(enum HistoryClass hclass) { prev--; if (prev < 0) - prev = HistSize; + prev = History; if (prev == h->last) break; } while (h->hist[prev] == NULL); @@ -461,7 +461,7 @@ void mutt_reset_history_state(enum HistoryClass hclass) { struct History *h = GET_HISTORY(hclass); - if (!HistSize || !h) + if (!History || !h) return; /* disabled */ h->cur = h->last; @@ -471,7 +471,7 @@ int mutt_history_at_scratch(enum HistoryClass hclass) { struct History *h = GET_HISTORY(hclass); - if (!HistSize || !h) + if (!History || !h) return 0; /* disabled */ return h->cur == h->last; @@ -481,7 +481,7 @@ void mutt_history_save_scratch(enum HistoryClass hclass, const char *s) { 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 diff --git a/hook.c b/hook.c index af24ab34ea9..75937bd5aa7 100644 --- a/hook.c +++ b/hook.c @@ -490,12 +490,12 @@ void mutt_select_fcc(char *path, size_t pathlen, struct Header *hdr) { 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); } diff --git a/imap/util.c b/imap/util.c index 2209046a843..299cc496df2 100644 --- a/imap/util.c +++ b/imap/util.c @@ -440,7 +440,7 @@ void imap_pretty_mailbox(char *path) 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) && diff --git a/init.c b/init.c index 01a18e159b3..11da787e6f1 100644 --- a/init.c +++ b/init.c @@ -308,7 +308,7 @@ static struct MbTable *parse_mbtable(const char *s) 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)); @@ -2830,7 +2830,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data, { if (query || *s->dptr != '=') { - switch (DefaultMagic) + switch (MboxType) { case MUTT_MBOX: p = "mbox"; @@ -2842,7 +2842,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data, p = "MH"; break; case MUTT_MAILDIR: - p = "Maildir"; + p = "Folder"; break; default: p = "unknown"; @@ -3903,7 +3903,7 @@ int var_to_string(int idx, char *val, size_t len) { char *p = NULL; - switch (DefaultMagic) + switch (MboxType) { case MUTT_MBOX: p = "mbox"; @@ -3915,7 +3915,7 @@ int var_to_string(int idx, char *val, size_t len) p = "MH"; break; case MUTT_MAILDIR: - p = "Maildir"; + p = "Folder"; break; default: p = "unknown"; @@ -4089,7 +4089,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) 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); @@ -4172,20 +4172,20 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) /* 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 /* @@ -4197,7 +4197,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) * 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 @@ -4251,7 +4251,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) "/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) @@ -4441,7 +4441,7 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) mutt_exit(1); } - mutt_mkdir(TempDir, S_IRWXU); + mutt_mkdir(Tmpdir, S_IRWXU); mutt_read_histfile(); diff --git a/init.h b/init.h index 41257fde5bb..34ee1dc56a2 100644 --- a/init.h +++ b/init.h @@ -127,7 +127,7 @@ struct Option MuttVars[] = { ** 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 @@ -377,7 +377,7 @@ struct Option MuttVars[] = { */ #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 @@ -648,7 +648,7 @@ struct Option MuttVars[] = { ** 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'' @@ -823,20 +823,20 @@ struct Option MuttVars[] = { ** 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. @@ -870,7 +870,7 @@ struct Option MuttVars[] = { ** .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 @@ -955,7 +955,7 @@ struct Option MuttVars[] = { ** .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 @@ -963,7 +963,7 @@ struct Option MuttVars[] = { ** 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 @@ -1001,7 +1001,7 @@ struct Option MuttVars[] = { ** 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. @@ -1077,7 +1077,7 @@ struct Option MuttVars[] = { ** ``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 @@ -1125,7 +1125,7 @@ struct Option MuttVars[] = { ** 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 }, /* @@ -1220,14 +1220,14 @@ struct Option MuttVars[] = { ** 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. @@ -1258,7 +1258,7 @@ struct Option MuttVars[] = { ** 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 @@ -1490,7 +1490,7 @@ struct Option MuttVars[] = { ** 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 @@ -1506,7 +1506,7 @@ struct Option MuttVars[] = { { "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 @@ -1662,7 +1662,7 @@ struct Option MuttVars[] = { ** ``$$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 @@ -1689,7 +1689,7 @@ struct Option MuttVars[] = { ** \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 @@ -1742,7 +1742,7 @@ struct Option MuttVars[] = { { "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 \fIa\fP will be composed ** from this prefix and the letter \fIa\fP. */ @@ -1770,7 +1770,7 @@ struct Option MuttVars[] = { ** 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 @@ -1778,11 +1778,11 @@ struct Option MuttVars[] = { ** .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 }, @@ -1829,7 +1829,7 @@ struct Option MuttVars[] = { ** 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 @@ -1867,17 +1867,17 @@ struct Option MuttVars[] = { ** .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. @@ -1920,7 +1920,7 @@ struct Option MuttVars[] = { ** 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 @@ -1993,7 +1993,7 @@ struct Option MuttVars[] = { ** 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. @@ -2091,7 +2091,7 @@ struct Option MuttVars[] = { ** .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 @@ -2101,42 +2101,42 @@ struct Option MuttVars[] = { */ #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://. */ - { "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. @@ -2146,31 +2146,31 @@ struct Option MuttVars[] = { ** .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. @@ -2201,7 +2201,7 @@ struct Option MuttVars[] = { ** 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'' @@ -2654,7 +2654,7 @@ struct Option MuttVars[] = { ** 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 @@ -2788,7 +2788,7 @@ struct Option MuttVars[] = { ** 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. @@ -2828,7 +2828,7 @@ struct Option MuttVars[] = { ** 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 @@ -2925,7 +2925,7 @@ struct Option MuttVars[] = { ** .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 @@ -3116,7 +3116,7 @@ struct Option MuttVars[] = { ** \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 @@ -3536,7 +3536,7 @@ struct Option MuttVars[] = { ** 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. @@ -3640,7 +3640,7 @@ struct Option MuttVars[] = { ** 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. @@ -3777,7 +3777,7 @@ struct Option MuttVars[] = { ** 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 @@ -3808,7 +3808,7 @@ struct Option MuttVars[] = { ** .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 @@ -3827,7 +3827,7 @@ struct Option MuttVars[] = { */ #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. @@ -3856,7 +3856,7 @@ struct Option MuttVars[] = { ** 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) @@ -3960,7 +3960,7 @@ struct Option MuttVars[] = { ** 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. @@ -3977,7 +3977,7 @@ struct Option MuttVars[] = { ** 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'' @@ -4139,7 +4139,7 @@ struct Option MuttVars[] = { ** .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 @@ -4180,7 +4180,7 @@ struct Option MuttVars[] = { ** .dt 11 .dd .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 @@ -4308,7 +4308,7 @@ struct Option MuttVars[] = { ** 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 @@ -4405,7 +4405,7 @@ struct Option MuttVars[] = { { "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. diff --git a/main.c b/main.c index 0a9d2b5dfb7..4b81462f7dc 100644 --- a/main.c +++ b/main.c @@ -519,14 +519,14 @@ int main(int argc, char **argv, char **env) 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 @@ -538,11 +538,11 @@ int main(int argc, char **argv, char **env) #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)); } } } @@ -891,8 +891,8 @@ int main(int argc, char **argv, char **env) { 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 */ } diff --git a/mbox.c b/mbox.c index 50e349a10fa..4c6d8148e45 100644 --- a/mbox.c +++ b/mbox.c @@ -1291,8 +1291,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) 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); diff --git a/mbtable.h b/mbtable.h index d8ac109e830..7607c7788d3 100644 --- a/mbtable.h +++ b/mbtable.h @@ -27,7 +27,7 @@ * 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 diff --git a/mh.c b/mh.c index d2267a8c9b1..1b63da614fe 100644 --- a/mh.c +++ b/mh.c @@ -186,11 +186,11 @@ static int mh_read_sequences(struct MhSequences *mhs, const char *path) 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; @@ -382,7 +382,7 @@ static int mh_mkstemp(struct Context *dest, FILE **fp, char **tgt) 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) @@ -480,9 +480,9 @@ static void mh_update_sequences(struct Context *ctx) 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) { @@ -542,11 +542,11 @@ static void mh_update_sequences(struct Context *ctx) /* 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); @@ -586,9 +586,9 @@ static void mh_sequences_add_one(struct Context *ctx, int n, short unseen, 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"))) @@ -618,11 +618,11 @@ static void mh_sequences_add_one(struct Context *ctx, int n, short unseen, 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); @@ -1514,7 +1514,7 @@ static int maildir_open_new_message(struct Message *msg, struct Context *dest, 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); @@ -1594,7 +1594,7 @@ static int _maildir_commit_message(struct Context *ctx, struct Message *msg, str 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); diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 9533d7d8821..daacfa33c20 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -136,7 +136,7 @@ struct NmHdrData * * 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 { @@ -394,7 +394,7 @@ static struct NmCtxData *new_ctxdata(char *uri) 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)) { @@ -453,7 +453,7 @@ static struct NmCtxData *get_ctxdata(struct Context *ctx) 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 */ @@ -497,7 +497,7 @@ static bool query_window_check_timebase(const char *timebase) static void query_window_reset(void) { mutt_debug(2, "query_window_reset ()\n"); - NotmuchQueryWindowCurrentPosition = 0; + NmQueryWindowCurrentPosition = 0; } /** @@ -542,22 +542,22 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz { 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).")); @@ -567,10 +567,10 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz 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); @@ -630,7 +630,7 @@ static char *get_query_string(struct NmCtxData *data, int window) 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 @@ -665,9 +665,9 @@ static const char *get_db_filename(struct NmCtxData *data) 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) @@ -684,7 +684,7 @@ static notmuch_database_t *do_database_open(const char *filename, int writable, 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 @@ -695,7 +695,7 @@ static notmuch_database_t *do_database_open(const char *filename, int writable, 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)) @@ -831,9 +831,9 @@ static void apply_exclude_tags(notmuch_query_t *query) { 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++) { @@ -931,12 +931,12 @@ static int update_header_tags(struct Header *h, notmuch_message_t *msg) 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; } @@ -1845,10 +1845,10 @@ char *nm_uri_from_query(struct Context *ctx, char *buf, size_t bufsz) 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; @@ -1939,10 +1939,10 @@ bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz) */ 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); } /** @@ -1955,8 +1955,8 @@ void nm_query_window_forward(void) */ 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) @@ -2106,15 +2106,15 @@ int nm_nonctx_get_count(char *path, int *all, int *new) 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; } @@ -2133,7 +2133,7 @@ int nm_nonctx_get_count(char *path, int *all, int *new) { 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); } @@ -2216,8 +2216,8 @@ int nm_record_message(struct Context *ctx, char *path, struct Header *h) 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; diff --git a/mutt_ssl.c b/mutt_ssl.c index 3d721dbc6c6..7a721539373 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -101,7 +101,7 @@ struct SslSockData * 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) { @@ -121,7 +121,7 @@ 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)) @@ -505,7 +505,7 @@ static int ssl_init(void) 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 */ @@ -631,10 +631,10 @@ static int check_certificate_file(X509 *peercert) 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)) @@ -855,7 +855,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al * 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: @@ -901,7 +901,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al if (!allow_always) break; done = 0; - if ((fp = fopen(SslCertFile, "a"))) + if ((fp = fopen(CertificateFile, "a"))) { if (PEM_write_X509(fp, cert)) done = 1; @@ -1042,7 +1042,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) 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); @@ -1198,7 +1198,7 @@ static int ssl_socket_open(struct Connection *conn) } } - 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); @@ -1291,7 +1291,7 @@ int mutt_ssl_starttls(struct Connection *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); diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c index 30ea2141d2a..8c3293ab7e8 100644 --- a/mutt_ssl_gnutls.c +++ b/mutt_ssl_gnutls.c @@ -250,7 +250,7 @@ static int tls_check_stored_hostname(const gnutls_datum_t *cert, const char *hos 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]*$", @@ -303,7 +303,7 @@ static int tls_compare_certificates(const gnutls_datum_t *peercert) 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; @@ -311,7 +311,7 @@ static int tls_compare_certificates(const gnutls_datum_t *peercert) 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; @@ -695,7 +695,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata, 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"); @@ -739,7 +739,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata, 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) @@ -1040,12 +1040,12 @@ static int tls_negotiate(struct Connection *conn) 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) @@ -1083,9 +1083,9 @@ static int tls_negotiate(struct Connection *conn) goto fail; } - if (SslDHPrimeBits > 0) + if (SslMinDhPrimeBits > 0) { - gnutls_dh_set_prime_bits(data->state, SslDHPrimeBits); + gnutls_dh_set_prime_bits(data->state, SslMinDhPrimeBits); } /* diff --git a/muttlib.c b/muttlib.c index 8857ef377f9..1f3e4280440 100644 --- a/muttlib.c +++ b/muttlib.c @@ -105,7 +105,7 @@ void mutt_adv_mktemp(char *s, size_t l) { 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; @@ -247,20 +247,20 @@ char *_mutt_expand_path(char *s, size_t slen, int regex) { #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; } @@ -292,14 +292,14 @@ char *_mutt_expand_path(char *s, size_t slen, int regex) 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; @@ -530,8 +530,8 @@ uint64_t mutt_rand64(void) 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 " @@ -622,7 +622,7 @@ void mutt_pretty_mailbox(char *s, size_t buflen) 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); @@ -1809,7 +1809,7 @@ void mutt_get_parent_path(char *output, char *path, size_t olen) #endif #ifdef USE_NOTMUCH if (mx_is_notmuch(path)) - strfcpy(output, NONULL(Maildir), olen); + strfcpy(output, NONULL(Folder), olen); else #endif { diff --git a/mx.c b/mx.c index a4428c793c5..675a48094c3 100644 --- a/mx.c +++ b/mx.c @@ -254,8 +254,8 @@ int mx_get_magic(const char *path) 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; } @@ -312,18 +312,18 @@ int mx_get_magic(const char *path) } /** - * 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; @@ -369,7 +369,7 @@ static int mx_open_mailbox_append(struct Context *ctx, int flags) ctx->magic = MUTT_COMPRESSED; else #endif - ctx->magic = DefaultMagic; + ctx->magic = MboxType; flags |= MUTT_APPENDNEW; } else @@ -574,7 +574,7 @@ static int trash_append(struct Context *ctx) 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++) @@ -587,7 +587,7 @@ static int trash_append(struct Context *ctx) 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) @@ -601,14 +601,14 @@ static int trash_append(struct Context *ctx) 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++) @@ -698,7 +698,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) } else { - strfcpy(mbox, NONULL(Inbox), sizeof(mbox)); + strfcpy(mbox, NONULL(Mbox), sizeof(mbox)); isSpool = mutt_is_spool(ctx->path) && !mutt_is_spool(mbox); } @@ -811,7 +811,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) } /* 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) { @@ -1046,7 +1046,7 @@ int mx_sync_mailbox(struct Context *ctx, int *index_hint) 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; diff --git a/mx.h b/mx.h index b962973c361..a5b479d0300 100644 --- a/mx.h +++ b/mx.h @@ -81,7 +81,7 @@ enum MailboxFormat MUTT_COMPRESSED, }; -WHERE short DefaultMagic; +WHERE short MboxType; #define MMDF_SEP "\001\001\001\001\n" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index ba9e5b592c0..1d7f35590f4 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -213,8 +213,8 @@ int mutt_protect(struct Header *msg, char *keylist) 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); diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 79b16f904c7..1f3719a576e 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -2161,7 +2161,7 @@ static int pgp_gpgme_extract_keys(gpgme_data_t keydata, FILE **fp, int dryrun) 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"); diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 1f201ebaf84..4f533ae113f 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -1293,7 +1293,7 @@ static pid_t smime_invoke_encrypt(FILE **smimein, FILE **smimeout, FILE **smimee 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); } @@ -1301,7 +1301,7 @@ static pid_t smime_invoke_sign(FILE **smimein, FILE **smimeout, FILE **smimeerr, 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); } @@ -1564,7 +1564,7 @@ struct Body *smime_sign_message(struct Body *a) 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); @@ -2064,10 +2064,10 @@ int smime_send_menu(struct Header *msg) 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; @@ -2077,13 +2077,13 @@ int smime_send_menu(struct Header *msg) _("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; @@ -2093,19 +2093,19 @@ int smime_send_menu(struct Header *msg) _("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; diff --git a/nntp.c b/nntp.c index c25d45ff153..06a79bc4a05 100644 --- a/nntp.c +++ b/nntp.c @@ -1842,7 +1842,7 @@ static int check_mailbox(struct Context *ctx) 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...")); diff --git a/pager.c b/pager.c index d5858ff6ab9..dfb96f3fd35 100644 --- a/pager.c +++ b/pager.c @@ -1977,7 +1977,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) 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 @@ -2004,7 +2004,7 @@ static void pager_menu_redraw(struct Menu *pager_menu) 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); @@ -2227,10 +2227,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e { 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); } } diff --git a/parse.c b/parse.c index 397f023e73b..e8e5d146a5e 100644 --- a/parse.c +++ b/parse.c @@ -1202,10 +1202,10 @@ struct Envelope *mutt_read_rfc822_header(FILE *f, struct Header *hdr, /* 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); } diff --git a/pop.c b/pop.c index 03a0e36a255..ee9ac2c1aaf 100644 --- a/pop.c +++ b/pop.c @@ -778,7 +778,7 @@ static int pop_check_mailbox(struct Context *ctx, int *index_hint) 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); diff --git a/postpone.c b/postpone.c index 8fdccf7e197..6eeaa337a6d 100644 --- a/postpone.c +++ b/postpone.c @@ -177,7 +177,7 @@ static void post_entry(char *s, size_t slen, struct Menu *menu, int entry) { 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) @@ -494,7 +494,7 @@ int mutt_parse_crypt_hdr(const char *p, int set_empty_signas, int crypt_app) /* 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. */ diff --git a/query.c b/query.c index c3867c786e0..9d49ae5c7ff 100644 --- a/query.c +++ b/query.c @@ -124,7 +124,7 @@ static struct Query *run_query(char *s, int quiet) 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) { @@ -504,7 +504,7 @@ int mutt_query_complete(char *buf, size_t buflen) struct Query *results = NULL; struct Address *tmpa = NULL; - if (!QueryCmd) + if (!QueryCommand) { mutt_error(_("Query command not defined.")); return 0; @@ -533,7 +533,7 @@ int mutt_query_complete(char *buf, size_t buflen) void mutt_query_menu(char *buf, size_t buflen) { - if (!QueryCmd) + if (!QueryCommand) { mutt_error(_("Query command not defined.")); return; diff --git a/recvattach.c b/recvattach.c index b6dcfde4d76..4d50919ed4b 100644 --- a/recvattach.c +++ b/recvattach.c @@ -207,10 +207,10 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols, 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) { @@ -226,7 +226,7 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols, } 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': @@ -807,7 +807,7 @@ void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, int tag, struc 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)) diff --git a/recvcmd.c b/recvcmd.c index ad36e299b2a..ec39e52965f 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -340,7 +340,7 @@ static void include_header(int quote, FILE *ifp, struct Header *hdr, FILE *ofp, 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)); @@ -431,7 +431,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx 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)); } @@ -875,7 +875,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, 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)); diff --git a/score.c b/score.c index 352f4ed54e5..ab51ae98200 100644 --- a/score.c +++ b/score.c @@ -47,7 +47,7 @@ struct Score struct Score *next; }; -static struct Score *Score = NULL; +static struct Score *ScoreList = NULL; void mutt_check_rescore(struct Context *ctx) { @@ -100,7 +100,7 @@ int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data, /* 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) @@ -114,7 +114,7 @@ int mutt_parse_score(struct Buffer *buf, struct Buffer *s, unsigned long data, if (last) last->next = ptr; else - Score = ptr; + ScoreList = ptr; ptr->pat = pat; ptr->str = pattern; } @@ -147,7 +147,7 @@ void mutt_score_message(struct Context *ctx, struct Header *hdr, int upd_ctx) 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) { @@ -180,25 +180,25 @@ int mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, unsigned long data, 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 */ diff --git a/send.c b/send.c index 92587cecb89..e8e2421b8df 100644 --- a/send.c +++ b/send.c @@ -408,10 +408,10 @@ void mutt_forward_intro(struct Context *ctx, struct Header *cur, FILE *fp) { 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); @@ -422,10 +422,10 @@ void mutt_forward_trailer(struct Context *ctx, struct Header *cur, FILE *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); @@ -692,7 +692,7 @@ void mutt_make_forward_subject(struct Envelope *env, struct Context *ctx, struct 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); } diff --git a/sendlib.c b/sendlib.c index 3c0df155f3a..2800761e5d5 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1424,7 +1424,7 @@ static void run_mime_type_query(struct Body *att) 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) { @@ -1452,7 +1452,7 @@ struct Body *mutt_make_file_attach(const char *path) 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 @@ -1461,7 +1461,7 @@ struct Body *mutt_make_file_attach(const char *path) 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) @@ -2233,13 +2233,13 @@ const char *mutt_fqdn(short may_hide_host) { 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 @@ -2247,7 +2247,7 @@ const char *mutt_fqdn(short may_hide_host) */ if (!p || !strchr(p, '.')) - p = Fqdn; + p = Hostname; } } @@ -2267,7 +2267,7 @@ static char *gen_msgid(void) 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); @@ -2568,10 +2568,10 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres 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) { @@ -3040,8 +3040,8 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, 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); diff --git a/sidebar.c b/sidebar.c index 81c6ae4802c..510522afa3d 100644 --- a/sidebar.c +++ b/sidebar.c @@ -857,16 +857,16 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) 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; diff --git a/smtp.c b/smtp.c index 2dc9e3681ac..506957c52e6 100644 --- a/smtp.c +++ b/smtp.c @@ -346,7 +346,7 @@ static int smtp_helo(struct Connection *conn) } 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 @@ -646,8 +646,8 @@ int mutt_smtp_send(const struct Address *from, const struct Address *to, /* 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 diff --git a/sort.h b/sort.h index 3a07896aecc..6b3a62295d5 100644 --- a/sort.h +++ b/sort.h @@ -73,7 +73,7 @@ sort_t *mutt_get_sort_func(int method); 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; diff --git a/status.c b/status.c index d7fa3039f5c..3ee336e7b53 100644 --- a/status.c +++ b/status.c @@ -145,7 +145,7 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c case 'h': snprintf(fmt, sizeof(fmt), "%%%ss", prefix); - snprintf(buf, buflen, fmt, NONULL(Hostname)); + snprintf(buf, buflen, fmt, NONULL(ShortHostname)); break; case 'l': @@ -253,12 +253,12 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c 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; }