-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
+#include <lib-mime/mime.h>
+
+#include <lib-ui/curses.h>
-static const char *ReachingUs = N_("\
-To contact the developers, please mail to <mutt-ng-devel@lists.berlios.de>.\n\
-To visit the Mutt-ng homepage go to http://www.muttng.org.\n\
-To report a bug, please use the fleang(1) utility.\n");
-
- _("usage: muttng [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -m <type> ] [ -f <file> ]\n\
- muttng [ -nR ] [ -e <cmd> ] [ -F <file> ] -Q <query> [ -Q <query> ] [...]\n\
- muttng [ -nR ] [ -e <cmd> ] [ -F <file> ] -A <alias> [ -A <alias> ] [...]\n\
- muttng [ -nR ] [ -e <cmd> ] [ -F <file> ] -t");
+ _("usage: madmutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -m <type> ] [ -f <file> ]\n\
+ madmutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -Q <query> [ -Q <query> ] [...]\n\
+ madmutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -A <alias> [ -A <alias> ] [...]\n\
+ madmutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -t");
- muttng [ -nR ] [ -e <cmd> ] [ -F <file> ] -T\n\
- muttng [ -nx ] [ -e <cmd> ] [ -a <file> ] [ -F <file> ] [ -H <file> ] [ -i <file> ] [ -s <subj> ] [ -b <addr> ] [ -c <addr> ] <addr> [ ... ]\n\
- muttng [ -n ] [ -e <cmd> ] [ -F <file> ] -p\n\
- muttng -v[v]\n\
+ madmutt [ -nR ] [ -e <cmd> ] [ -F <file> ] -T\n\
+ madmutt [ -nx ] [ -e <cmd> ] [ -a <file> ] [ -F <file> ] [ -H <file> ] [ -i <file> ] [ -s <subj> ] [ -b <addr> ] [ -c <addr> ] <addr> [ ... ]\n\
+ madmutt [ -n ] [ -e <cmd> ] [ -F <file> ] -p\n\
+ madmutt -v[v]\n\
\n\
options:\n\
-A <alias>\texpand the given alias\n\
-a <file>\tattach a file to the message\n\
-b <address>\tspecify a blind carbon-copy (BCC) address\n\
-c <address>\tspecify a carbon-copy (CC) address");
\n\
options:\n\
-A <alias>\texpand the given alias\n\
-a <file>\tattach a file to the message\n\
-b <address>\tspecify a blind carbon-copy (BCC) address\n\
-c <address>\tspecify a carbon-copy (CC) address");
puts _("\
-e <command>\tspecify a command to be executed after initialization\n\
-f <file>\tspecify which mailbox to read\n\
puts _("\
-e <command>\tspecify a command to be executed after initialization\n\
-f <file>\tspecify which mailbox to read\n\
-g <server>\tspecify a newsserver (if compiled with NNTP)\n\
-G\t\tselect a newsgroup (if compiled with NNTP)\n\
-H <file>\tspecify a draft file to read header and body from\n\
-g <server>\tspecify a newsserver (if compiled with NNTP)\n\
-G\t\tselect a newsgroup (if compiled with NNTP)\n\
-H <file>\tspecify a draft file to read header and body from\n\
-p\t\trecall a postponed message\n\
-Q <variable>\tquery a configuration variable\n\
-R\t\topen mailbox in read-only mode\n\
-p\t\trecall a postponed message\n\
-Q <variable>\tquery a configuration variable\n\
-R\t\topen mailbox in read-only mode\n\
-t\t\tprint the value of all variables to stdout\n\
-T\t\tprint the value of all changed variables to stdout\n\
-v\t\tshow version and compile-time definitions\n\
-t\t\tprint the value of all variables to stdout\n\
-T\t\tprint the value of all changed variables to stdout\n\
-v\t\tshow version and compile-time definitions\n\
-y\t\tselect a mailbox specified in your `mailboxes' list\n\
-z\t\texit immediately if there are no messages in the mailbox\n\
-Z\t\topen the first folder with new message, exit immediately if none\n\
-y\t\tselect a mailbox specified in your `mailboxes' list\n\
-z\t\texit immediately if there are no messages in the mailbox\n\
-Z\t\topen the first folder with new message, exit immediately if none\n\
printf (" DB4 %d.%d.%d\n", DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH);
#endif
printf (" DB4 %d.%d.%d\n", DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH);
#endif
#else
/* should come before initscr() so that ncurses 4.2 doesn't try to install
its own SIGWINCH handler */
#else
/* should come before initscr() so that ncurses 4.2 doesn't try to install
its own SIGWINCH handler */
- LIST *attach = NULL;
- LIST *commands = NULL;
- LIST *queries = NULL;
- LIST *alias_queries = NULL;
+ string_list_t *attach = NULL;
+ string_list_t *commands = NULL;
+ string_list_t *queries = NULL;
+ string_list_t *alias_queries = NULL;
- p_clear(Options, sizeof(Options));
- p_clear(QuadOptions, sizeof(QuadOptions));
+ p_clear(Options, countof(Options));
+ p_clear(QuadOptions, countof(QuadOptions));
if (i == 'b')
msg->env->bcc = rfc822_parse_adrlist (msg->env->bcc, optarg);
else
msg->env->cc = rfc822_parse_adrlist (msg->env->cc, optarg);
break;
if (i == 'b')
msg->env->bcc = rfc822_parse_adrlist (msg->env->bcc, optarg);
else
msg->env->cc = rfc822_parse_adrlist (msg->env->cc, optarg);
break;
- case 'd':
- {
- char buf[LONG_STRING];
- int level = atoi (optarg);
-
- snprintf (buf, sizeof (buf), "set debug_level=%d", level);
- commands = mutt_add_list (commands, buf);
- debug_setlevel (level);
- }
- break;
-
puts (_(Copyright_GPL_1));
puts (_(Copyright_GPL_2));
puts (_(Copyright_GPL_3));
puts (_(Copyright_GPL_1));
puts (_(Copyright_GPL_2));
puts (_(Copyright_GPL_3));
/* set defaults and read init files */
mx_init ();
mutt_init (flags & M_NOSYSRC, commands);
/* set defaults and read init files */
mx_init ();
mutt_init (flags & M_NOSYSRC, commands);
/* output in machine-readable form */
mutt_addrlist_to_idna (a, NULL);
mutt_write_address_list (a, stdout, 0, 0);
/* output in machine-readable form */
mutt_addrlist_to_idna (a, NULL);
mutt_write_address_list (a, stdout, 0, 0);
m_strcpy(fpath, sizeof(fpath), Maildir);
mutt_expand_path (fpath, sizeof (fpath));
/* we're not connected yet - skip mail folder creation */
if (mx_get_magic (fpath) != M_IMAP)
if (stat (fpath, &sb) == -1 && errno == ENOENT) {
m_strcpy(fpath, sizeof(fpath), Maildir);
mutt_expand_path (fpath, sizeof (fpath));
/* we're not connected yet - skip mail folder creation */
if (mx_get_magic (fpath) != M_IMAP)
if (stat (fpath, &sb) == -1 && errno == ENOENT) {
- snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"),
+ snprintf (mesg, sizeof (mesg), _("%s does not exist. Create it?"),
if (mkdir (fpath, 0700) == -1 && errno != EEXIST)
mutt_error (_("Can't create %s: %s."), Maildir, strerror (errno));
}
if (mkdir (fpath, 0700) == -1 && errno != EEXIST)
mutt_error (_("Can't create %s: %s."), Maildir, strerror (errno));
}
if (!option (OPTNOCURSES))
mutt_endwin (NULL);
fprintf (stderr, _("%s: unable to attach file.\n"), t->data);
if (!option (OPTNOCURSES))
mutt_endwin (NULL);
fprintf (stderr, _("%s: unable to attach file.\n"), t->data);
}
ci_send_message (sendflags, msg, tempfile, NULL, NULL);
}
ci_send_message (sendflags, msg, tempfile, NULL, NULL);