buf[0] = 0;
if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) {
if (!buf[0])
- m_strcpy(buf, sizeof(buf), ml_core.shell);
+ m_strcpy(buf, sizeof(buf), MCore.shell);
if (buf[0]) {
CLEARLINE (LINES - 1);
mutt_endwin (NULL);
WHERE char *DefaultHook;
WHERE char *DateFmt;
WHERE char *DisplayFilter;
-WHERE char *DsnNotify;
-WHERE char *DsnReturn;
WHERE char *EditorHeaders;
WHERE char *FileCharset;
WHERE char *FolderFormat;
** is viewed it is passed as standard input to $$display_filter, and the
** filtered message is read from the standard output.
*/
- {"dsn_notify", DT_STR, R_NONE, UL &DsnNotify, ""},
- /*
- ** .pp
- ** \fBNote:\fP you should not enable this unless you are using Sendmail
- ** 8.8.x or greater or in connection with the SMTP support via libESMTP.
- ** .pp
- ** This variable sets the request for when notification is returned. The
- ** string consists of a comma separated list (no spaces!) of one or more
- ** of the following: \fInever\fP, to never request notification,
- ** \fIfailure\fP, to request notification on transmission failure,
- ** \fIdelay\fP, to be notified of message delays, \fIsuccess\fP, to be
- ** notified of successful transmission.
- ** .pp
- ** Example: \fTset dsn_notify="failure,delay"\fP
- */
- {"dsn_return", DT_STR, R_NONE, UL &DsnReturn, ""},
- /*
- ** .pp
- ** \fBNote:\fP you should not enable this unless you are using Sendmail
- ** 8.8.x or greater or in connection with the SMTP support via libESMTP.
- ** .pp
- ** This variable controls how much of your message is returned in DSN
- ** messages. It may be set to either \fIhdrs\fP to return just the
- ** message header, or \fIfull\fP to return the full message.
- ** .pp
- ** Example: \fTset dsn_return=hdrs\fP
- */
{"duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTDUPTHREADS, "yes" },
/*
** .pp
## bindir
## docdir
## dotlock
+## dsn_notify
+## dsn_return
## editor
## hcache_backend
## quit
# define HCACHE_BACKEND "unknown"
#endif
-@package madmutt {
+@package MCore {
const string_t version = VERSION;
const string_t sysconfdir = SYSCONFDIR;
const string_t bindir = BINDIR;
path_t dotlock = BINDIR "/mutt_dotlock";
path_t editor = getenv("VISUAL") ?: getenv("EDITOR") ?: "vi";
- path_t sendmail = SENDMAIL " -eom -oi";
path_t shell = madmutt_init_shell();
quadopt_t quit = M_YES;
bool beep_new = 0;
const string_t pwd(void) = madmutt_pwd();
-} ml_core;
+} MCore;
+
+@package MTransport {
+ path_t sendmail = SENDMAIL " -eom -oi";
+
+ string_t dsn_notify = NULL;
+ string_t dsn_return = NULL;
+} MTransport;
/* vim:set ft=c: */
{LUA_STRLIBNAME, luaopen_string},
{LUA_MATHLIBNAME, luaopen_math},
{LUA_DBLIBNAME, luaopen_debug},
- {"madmutt", luaopen_madmutt},
+ {"MCore", luaopen_MCore},
+ {"MTransport", luaopen_MTransport},
};
int i;
mutt_quote_filename (f, sizeof (f), path);
snprintf(cmd, sizeof(cmd), "%s %s%s%s%s%s%s%s",
- ml_core.dotlock,
+ MCore.dotlock,
flags & DL_FL_TRY ? "-t " : "",
flags & DL_FL_UNLOCK ? "-u " : "",
flags & DL_FL_USEPRIV ? "-p " : "",
char cmd[LONG_STRING];
mutt_endwin (NULL);
- m_quotefile_fmt(cmd, sizeof (cmd), ml_core.editor, data);
+ m_quotefile_fmt(cmd, sizeof (cmd), MCore.editor, data);
if (mutt_system (cmd) == -1)
mutt_error (_("Error running \"%s\"!"), cmd);
keypad (stdscr, TRUE);
sidebar_draw ();
mutt_message (_("New mail in this mailbox."));
- if (ml_core.beep_new)
+ if (MCore.beep_new)
beep ();
}
else if (check == M_FLAGS)
menu->redraw |= REDRAW_SIDEBAR;
}
if (do_buffy_notify) {
- if (buffy_notify () && ml_core.beep_new)
+ if (buffy_notify () && MCore.beep_new)
beep ();
}
else
break;
}
- if (query_quadoption2(ml_core.quit, _("Quit Madmutt?")) == M_YES) {
+ if (query_quadoption2(MCore.quit, _("Quit Madmutt?")) == M_YES) {
int check;
oldcount = Context ? Context->msgcount : 0;
}
if ((menu->menu == MENU_MAIN)
- && (query_quadoption2(ml_core.quit,
+ && (query_quadoption2(MCore.quit,
_("Exit Madmutt without saving?")) == M_YES))
{
if (Context) {
#define CLEARLINE_WIN(x) move(x,(option(OPTMBOXPANE)?SidebarWidth:0)), clrtoeol()
#define CLEARLINE(x) move(x,0), clrtoeol()
#define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
-#define BEEP() do { if (ml_core.beep) beep(); } while (0)
+#define BEEP() do { if (MCore.beep) beep(); } while (0)
#if ! (defined(USE_SLANG_CURSES) || defined(HAVE_CURS_SET))
#define curs_set(x)
} else
#endif
{
- m_strcpy(cmd, sizeof(cmd), ml_core.sendmail);
+ m_strcpy(cmd, sizeof(cmd), MTransport.sendmail);
}
ps = cmd;
args = add_args (args, &argslen, &argsmax, f);
}
}
- if (DsnNotify) {
+ if (MTransport.dsn_notify) {
args = add_option (args, &argslen, &argsmax, "-N");
- args = add_option (args, &argslen, &argsmax, DsnNotify);
+ args = add_option (args, &argslen, &argsmax, MTransport.dsn_notify);
}
- if (DsnReturn) {
+ if (MTransport.dsn_return) {
args = add_option (args, &argslen, &argsmax, "-R");
- args = add_option (args, &argslen, &argsmax, DsnReturn);
+ args = add_option (args, &argslen, &argsmax, MTransport.dsn_return);
}
args = add_option (args, &argslen, &argsmax, "--");
args = add_args (args, &argslen, &argsmax, to);