default magic is useless: only _create_ mboxes and maildirs.
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index 323d5ac..c9442ce 100644 (file)
--- a/init.c
+++ b/init.c
@@ -319,18 +319,6 @@ static int rx_from_string (struct option_t* dst, const char* val,
   return (1);
 }
 
-static void magic_to_string (char* dst, ssize_t dstlen,
-                             struct option_t* option) {
-  const char* s = NULL;
-  switch (option->data) {
-    case M_MBOX:    s = "mbox"; break;
-    case M_MH:      s = "MH"; break;
-    case M_MAILDIR: s = "Maildir"; break;
-    default:        s = "unknown"; break;
-  }
-  snprintf (dst, dstlen, "%s=%s", option->option, s);
-}
-
 static int magic_from_string (struct option_t* dst, const char* val,
                               char *errbuf, ssize_t errlen)
 {
@@ -367,7 +355,6 @@ static struct {
   { DT_QUAD,    quad_to_string,   quad_from_string },
   { DT_SORT,    sort_to_string,   sort_from_string },
   { DT_RX,      rx_to_string,     rx_from_string },
-  { DT_MAGIC,   magic_to_string,  magic_from_string },
 };
 
 
@@ -1099,7 +1086,6 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
     }
     else if (DTYPE (option->type) == DT_STR ||
              DTYPE (option->type) == DT_PATH ||
-             DTYPE (option->type) == DT_MAGIC ||
              DTYPE (option->type) == DT_NUM ||
              DTYPE (option->type) == DT_SORT ||
              DTYPE (option->type) == DT_RX)
@@ -1559,23 +1545,6 @@ int mutt_var_value_complete (char *buffer, ssize_t len, int pos)
                  (*((short *)option->data) & SORT_REVERSE) ? "reverse-" : "",
                  (*((short *)option->data) & SORT_LAST) ? "last-" : "", p);
       }
-      else if (DTYPE (option->type) == DT_MAGIC) {
-        const char *p;
-        switch (DefaultMagic) {
-          case M_MBOX:
-            p = "mbox";
-            break;
-          case M_MH:
-            p = "MH";
-            break;
-          case M_MAILDIR:
-            p = "Maildir";
-            break;
-          default:
-            p = "unknown";
-        }
-        m_strcpy(tmp, sizeof(tmp), p);
-      }
       else if (DTYPE (option->type) == DT_BOOL)
         m_strcpy(tmp, sizeof(tmp), option(option->data) ? "yes" : "no");
       else
@@ -1767,13 +1736,3 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
   }
 }
 
-int mutt_get_hook_type (const char *name)
-{
-  struct command_t *c;
-
-  for (c = Commands; c->name; c++)
-    if (c->func == mutt_parse_hook && ascii_strcasecmp (c->name, name) == 0)
-      return c->data;
-  return 0;
-}
-