#include <lib-lib/lib-lib.h>
#include <sys/utsname.h>
+#include <pthread.h>
#include <lib-lua/lib-lua.h>
#include <lib-sys/mutt_signal.h>
+#include <lib-sys/evtloop.h>
#include <lib-mime/mime.h>
#include <lib-ui/lib-ui.h>
#include <lib-mx/mx.h>
#endif
#ifdef USE_HCACHE
-#if defined(HAVE_QDBM)
-#include <depot.h>
+#if defined(HAVE_TOKYOCABINET)
+#include <tcutil.h>
#elif defined(HAVE_GDBM)
#include <gdbm.h>
#endif
#include <gnutls/gnutls.h>
#include <gpgme.h>
+#include <libintl.h>
+
void mutt_exit(int code)
{
mutt_endwin(NULL);
static void mutt_usage (void)
{
- puts(mutt_make_version());
+ puts(madmutt_version);
puts(_("\
usage: madmutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -f <file> ]\n\
struct utsname uts;
uname(&uts);
- puts(mutt_make_version());
+ puts(madmutt_version);
puts(_(" Copyright (C) 1996-2002 Michael R. Elkins and others."));
puts(_(" Copyright (C) 2005 The Mutt-ng Team"));
puts(_(" Copyright (C) 2006-2007 Pierre Habouzit"));
printf(" libidn %s\n", STRINGPREP_VERSION);
#endif
#ifdef USE_HCACHE
-#if defined(HAVE_QDBM)
- printf(" qdbm %s\n", dpversion);
+#if defined(HAVE_TOKYOCABINET)
+ printf(" tokyocabinet %s\n", tcversion);
#elif defined(HAVE_GDBM)
printf(" gdbm %s\n", gdbm_version);
#endif
puts (_("Compile Options:"));
puts (
-#ifdef USE_FCNTL
- " +USE_FCNTL"
-#else
- " -USE_FCNTL"
-#endif
-#ifdef USE_FLOCK
- " +USE_FLOCK"
-#else
- " -USE_FLOCK"
-#endif
#ifdef USE_HCACHE
" +USE_HCACHE"
#else
fputc('\n', stderr);
}
+static void *evtloop(void *data)
+{
+ for (;;) {
+ el_dispatch(100);
+ pthread_testcancel();
+ }
+}
+
int main (int argc, char **argv)
{
char folder[_POSIX_PATH_MAX] = "";
int version = 0;
int i;
int explicit_folder = 0;
+ pthread_t pt;
/* initialize random number for tmp file creation */
srand48((unsigned int) time (NULL));
}
/* set defaults and read init files */
+ el_initialize();
mutt_init (flags & M_NOSYSRC, commands);
string_list_wipe(&commands);
+ pthread_create(&pt, NULL, &evtloop, NULL);
if (!option(OPTNOCURSES)) {
ui_layout_init();
NULL)) || !explicit_folder)
{
mutt_index_menu ();
+
if (option (OPTXTERMSETTITLES))
printf("\033]2;%s\007", NONULL(XtermLeave));
if (Context)
mutt_endwin (Errorbuf);
}
+ pthread_cancel(pt);
+ pthread_join(pt, NULL);
luaM_shutdown();
mutt_sasl_shutdown();
+ el_shutdown();
exit (0);
}