Nico Golde:
[apps/madmutt.git] / main.c
diff --git a/main.c b/main.c
index 6f66b2b..8f8ca9d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
  * Copyright (C) 1999-2002 Thomas Roessler <roessler@does-not-exist.org>
+ * Copyright (C) 2004 g10 Code GmbH
  * 
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
 
 #define MAIN_C 1
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "keymap.h"
 
 static const char *ReachingUs = N_("\
 To contact the developers, please mail to <mutt-ng-devel@lists.berlios.de>.\n\
-To report a bug, please use the flea(1) utility.\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");
 
 static const char *Notice = N_("\
 Copyright (C) 1996-2002 Michael R. Elkins and others.\n\
-Mutt comes with ABSOLUTELY NO WARRANTY; for details type `muttng -vv'.\n\
+Mutt-ng comes with ABSOLUTELY NO WARRANTY; for details type `muttng -vv'.\n\
 Mutt is free software, and you are welcome to redistribute it\n\
 under certain conditions; type `muttng -vv' for details.\n");
 
@@ -113,10 +119,10 @@ options:\n\
   -F <file>\tspecify an alternate muttrc file\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 from\n\
-  -i <file>\tspecify a file which Mutt should include in the reply\n\
+  -H <file>\tspecify a draft file to read header and body from\n\
+  -i <file>\tspecify a file which Mutt-ng should include in the body\n\
   -m <type>\tspecify a default mailbox type\n\
-  -n\t\tcauses Mutt not to read the system Muttrc\n\
+  -n\t\tcauses Mutt-ng not to read the system Muttngrc\n\
   -p\t\trecall a postponed message\n\
   -Q <variable>\tquery a configuration variable\n\
   -R\t\topen mailbox in read-only mode\n\
@@ -217,9 +223,15 @@ static void show_version (void)
 #endif
 
 #ifdef USE_FLOCK
-       "+USE_FLOCK"
+       "+USE_FLOCK   "
+#else
+       "-USE_FLOCK   "
+#endif
+       
+#ifdef USE_INODESORT
+       "+USE_INODESORT   "
 #else
-       "-USE_FLOCK"
+       "-USE_INODESORT   "
 #endif
        );
   puts (
@@ -266,6 +278,12 @@ static void show_version (void)
        "-USE_GNUTLS  "
 #endif
 
+#ifdef USE_GNUTLS
+       "+USE_GNUTLS  "
+#else
+       "-USE_GNUTLS  "
+#endif
+
 #ifdef USE_SASL
        "+USE_SASL  "
 #else
@@ -448,6 +466,18 @@ static void show_version (void)
        "-HAVE_GETADDRINFO  "
 #endif
 
+#if USE_HCACHE
+       "+USE_HCACHE  "
+#else
+       "-USE_HCACHE  "
+#endif
+
+#if USE_HCACHE
+       "+USE_HCACHE  "
+#else
+       "-USE_HCACHE  "
+#endif
+
        );
 
 #ifdef ISPELL
@@ -481,6 +511,7 @@ static void start_curses (void)
 #ifdef USE_SLANG_CURSES
   SLtt_Ignore_Beep = 1; /* don't do that #*$@^! annoying visual beep! */
   SLsmg_Display_Eight_Bit = 128; /* characters above this are printable */
+  SLtt_set_color(0, NULL, "default", "default");
 #else
   /* should come before initscr() so that ncurses 4.2 doesn't try to install
      its own SIGWINCH handler */
@@ -711,6 +742,9 @@ int main (int argc, char **argv)
   mutt_init (flags & M_NOSYSRC, commands);
   mutt_free_list (&commands);
 
+  /* Initialize crypto backends.  */
+  crypt_init ();
+
   if (queries)
     return mutt_query_variables (queries);
 
@@ -961,7 +995,8 @@ int main (int argc, char **argv)
     else
 #endif
     mutt_expand_path (folder, sizeof (folder));
-
+    
+    mutt_str_replace (&CurrentFolder, folder);
     mutt_str_replace (&LastFolder, folder);
 
     if (flags & M_IGNORE)