Andreas Krennmair:
[apps/madmutt.git] / init.h
diff --git a/init.h b/init.h
index e668e6a..d9e7620 100644 (file)
--- a/init.h
+++ b/init.h
@@ -72,6 +72,12 @@ struct option_t
   unsigned long init; /* initial value */
 };
 
+struct feature_t
+{
+  char* name;
+  short builtin;
+};
+
 #define UL (unsigned long)
 
 #endif /* _MAKEDOC */
@@ -697,6 +703,16 @@ struct option_t MuttVars[] = {
   ** .pp
   ** Also see the ``$$record'' variable.
   */
+  { "force_buffy_check", DT_BOOL, R_NONE, OPTFORCEBUFFYCHECK, 0 },
+  /*
+  ** .pp
+  ** When \fIset\fP, it causes mutt-ng to check for new mail when the
+  ** \fIbuffy-list\fP command is invoked. When \fIunset\fP, \fIbuffy_list\fP
+  ** will just list all mailboxes which are already known to have new mail.
+  ** .pp
+  ** Also see the following variables: ``$$timeout'', ``$$mail_check'' and
+  ** ``$$imap_mail_check''.
+  */
   { "forward_decode",  DT_BOOL, R_NONE, OPTFORWDECODE, 1 },
   /*
   ** .pp
@@ -974,6 +990,16 @@ struct option_t MuttVars[] = {
   ** only subscribed folders or all folders.  This can be toggled in the
   ** IMAP browser with the \fItoggle-subscribed\fP function.
   */
+  { "imap_mail_check", DT_NUM,  R_NONE, UL &ImapBuffyTimeout, 5 },
+  /*
+  ** .pp
+  ** This variable configures how often (in seconds) mutt-ng should look for
+  ** new mail in IMAP folders. This is split from the ``$mail_check'' variable
+  ** to generate less traffic and get more accurate information for local folders.
+  ** .pp
+  ** It defaults to the default value of ``$mail_check'' which is 5 seconds. But
+  ** you may want to increase it.
+  */
   { "imap_pass",       DT_STR,  R_NONE, UL &ImapPass, UL 0 },
   /*
   ** .pp
@@ -1220,11 +1246,11 @@ struct option_t MuttVars[] = {
   ** Availability: Header Cache
   **
   ** .pp
-  ** The header_cache variable points to the header cache database. If
-  ** header_cache points to a directory there will be created one header cache
-  ** database per folder within this directory. If it doesn't point to a directory a
-  ** global header cache for all folders is used. Per default it is unset and so
-  ** no header caching will be used.
+  ** The header_cache variable points to the header cache database.
+  ** If header_cache points to a directory it will contain a header cache
+  ** database  per folder. If header_cache points to a file that file will
+  ** be a single global header cache. By default it is unset and so no
+  ** header caching will be used.
   */
   { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 },
   /*
@@ -3434,6 +3460,132 @@ struct option_t MuttVars[] = {
   { NULL }
 };
 
+const struct feature_t Features[] = {
+  { "ncurses", 
+#ifdef NCURSES_VERSION
+    1
+#else
+    0
+#endif
+  }, { "slang",
+#ifdef USE_SLANG_CURSES
+    1
+#else
+    0
+#endif
+  }, { "iconv",
+#ifdef _LIBICONV_VERSION
+    1
+#else
+    0
+#endif
+  }, { "idn",
+#ifdef HAVE_LIBIDN
+    1
+#else
+    0
+#endif
+  }, { "dotlock",
+#ifdef USE_DOTLOCK
+    1
+#else
+    0
+#endif
+  }, { "standalone",
+#ifdef DL_STANDALONE
+    1
+#else
+    0
+#endif
+  }, { "pop",
+#ifdef USE_POP
+    1
+#else
+    0
+#endif
+  }, { "nntp",
+#ifdef USE_NNTP
+    1
+#else
+    0
+#endif
+  }, { "imap",
+#ifdef USE_IMAP
+    1
+#else
+    0
+#endif
+  }, { "ssl",
+#ifdef USE_SSL
+    1
+#else
+    0
+#endif
+  }, { "gnutls",
+#ifdef USE_GNUTLS
+    1
+#else
+    0
+#endif
+  }, { "sasl",
+#ifdef USE_SASL
+    1
+#else
+    0
+#endif
+  }, { "sasl2",
+#ifdef USE_SASL2
+    1
+#else
+    0
+#endif
+  }, { "libesmtp",
+#ifdef USE_LIBESMTP
+    1
+#else
+    0
+#endif
+  }, { "compressed",
+#ifdef USE_COMPRESSED
+    1
+#else
+    0
+#endif
+  }, { "color",
+#ifdef HAVE_COLOR
+    1
+#else
+    0
+#endif
+  }, { "classic_pgp",
+#ifdef CRYPT_BACKEND_CLASSIC_PGP
+    1
+#else
+    0
+#endif
+  }, { "classic_smime",
+#ifdef CRYPT_BACKEND_CLASSIC_SMIME
+    1
+#else
+    0
+#endif
+  }, { "gpgme",
+#ifdef CRYPT_BACKEND_GPGME
+    1
+#else
+    0
+#endif
+  }, { "header_cache",
+#ifdef USE_HCACHE
+    1
+#else
+    0
+#endif
+  },
+  /* last */
+  { NULL,       0 }
+};
+
 const struct mapping_t SortMethods[] = {
   { "date",            SORT_DATE },
   { "date-sent",       SORT_DATE },
@@ -3505,6 +3657,7 @@ static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unalias (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_ifdef (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_ignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_unignore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 static int parse_source (BUFFER *, BUFFER *, unsigned long, BUFFER *);
@@ -3550,6 +3703,8 @@ struct command_t Commands[] = {
   { "append-hook",     mutt_parse_hook,        M_APPENDHOOK },
 #endif
   { "hdr_order",       parse_list,             UL &HeaderOrderList },
+  { "ifdef",           parse_ifdef,            1 },
+  { "ifndef",          parse_ifdef,            0 },
 #ifdef HAVE_ICONV
   { "iconv-hook",      mutt_parse_hook,        M_ICONVHOOK }, 
 #endif