simplifications
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index 29e6c5f..69de16b 100644 (file)
--- a/init.c
+++ b/init.c
@@ -29,7 +29,7 @@
 #include "mbyte.h"
 #include "charset.h"
 #include "thread.h"
-#include "mutt_crypt.h"
+#include <lib-crypt/crypt.h>
 #include "mutt_idna.h"
 
 #if defined(USE_SSL) || defined(USE_GNUTLS)
@@ -263,15 +263,15 @@ static void sys_to_string (char* dst, size_t dstlen,
   char *val = NULL, *t = NULL;
   int clean = 0;
 
-  /* get some $muttng_ values dynamically */
-  if (ascii_strcmp ("muttng_pwd", option->option) == 0) {
+  /* get some $madmutt_ values dynamically */
+  if (ascii_strcmp ("madmutt_pwd", option->option) == 0) {
     val = p_new(char, _POSIX_PATH_MAX);
     val = getcwd (val, _POSIX_PATH_MAX-1);
     clean = 1;
-  } else if (ascii_strcmp ("muttng_folder_path", option->option) == 0 &&
+  } else if (ascii_strcmp ("madmutt_folder_path", option->option) == 0 &&
              CurrentFolder && *CurrentFolder) {
     val = CurrentFolder;
-  } else if (ascii_strcmp ("muttng_folder_name", option->option) == 0 &&
+  } else if (ascii_strcmp ("madmutt_folder_name", option->option) == 0 &&
              CurrentFolder && *CurrentFolder) {
 
     ssize_t Maildirlength = m_strlen(Maildir);
@@ -2006,7 +2006,7 @@ static int parse_set (BUFFER * tmp, BUFFER * s, unsigned long data,
         break;
       }
 
-      /* the $muttng_ variables are read-only */
+      /* the $madmutt_ variables are read-only */
       if (!FuncTable[DTYPE (option->type)].opt_from_string) {
         snprintf (err->data, err->dsize, _("$%s is read-only"),
                   option->option);
@@ -2702,7 +2702,6 @@ void mutt_init (int skip_sys_rc, LIST * commands)
       p = "vi";
   }
   Editor = m_strdup(p);
-  Visual = m_strdup(p);
 
   if ((p = getenv ("REPLYTO")) != NULL) {
     BUFFER buf, token;
@@ -2731,14 +2730,11 @@ void mutt_init (int skip_sys_rc, LIST * commands)
 
   CurrentMenu = MENU_MAIN;
 
-
-#ifndef LOCALES_HACK
   /* Do we have a locale definition? */
   if (((p = getenv ("LC_ALL")) != NULL && p[0]) ||
       ((p = getenv ("LANG")) != NULL && p[0]) ||
       ((p = getenv ("LC_CTYPE")) != NULL && p[0]))
     set_option (OPTLOCALES);
-#endif
 
 #ifdef HAVE_GETSID
   /* Unset suspend by default if we're the session leader */
@@ -2766,18 +2762,18 @@ void mutt_init (int skip_sys_rc, LIST * commands)
 
   if (!Muttrc) {
 #if 0
-    snprintf (buffer, sizeof(buffer), "%s/.muttngrc-%s", NONULL (Homedir),
+    snprintf (buffer, sizeof(buffer), "%s/.madmuttrc-%s", NONULL (Homedir),
               MUTT_VERSION);
     if (access (buffer, F_OK) == -1)
 #endif
-      snprintf (buffer, sizeof(buffer), "%s/.muttngrc", NONULL (Homedir));
+      snprintf (buffer, sizeof(buffer), "%s/.madmuttrc", NONULL (Homedir));
     if (access (buffer, F_OK) == -1)
 #if 0
-      snprintf (buffer, sizeof(buffer), "%s/.muttng/muttngrc-%s",
+      snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc-%s",
                 NONULL (Homedir), MUTT_VERSION);
     if (access (buffer, F_OK) == -1)
 #endif
-      snprintf (buffer, sizeof(buffer), "%s/.muttng/muttngrc",
+      snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc",
                 NONULL (Homedir));
 
     default_rc = 1;
@@ -2795,15 +2791,15 @@ void mutt_init (int skip_sys_rc, LIST * commands)
   /* Process the global rc file if it exists and the user hasn't explicity
      requested not to via "-n".  */
   if (!skip_sys_rc) {
-    snprintf (buffer, sizeof(buffer), "%s/Muttngrc-%s", SYSCONFDIR,
+    snprintf (buffer, sizeof(buffer), "%s/Madmuttrc-%s", SYSCONFDIR,
               MUTT_VERSION);
     if (access (buffer, F_OK) == -1)
-      snprintf (buffer, sizeof(buffer), "%s/Muttngrc", SYSCONFDIR);
+      snprintf (buffer, sizeof(buffer), "%s/Madmuttrc", SYSCONFDIR);
     if (access (buffer, F_OK) == -1)
-      snprintf (buffer, sizeof(buffer), "%s/Muttngrc-%s", PKGDATADIR,
+      snprintf (buffer, sizeof(buffer), "%s/Madmuttrc-%s", PKGDATADIR,
                 MUTT_VERSION);
     if (access (buffer, F_OK) == -1)
-      snprintf (buffer, sizeof(buffer), "%s/Muttngrc", PKGDATADIR);
+      snprintf (buffer, sizeof(buffer), "%s/Madmuttrc", PKGDATADIR);
     if (access (buffer, F_OK) != -1) {
       if (source_rc (buffer, &err) != 0) {
         fputs (err.data, stderr);