move history in lib-ui
[apps/madmutt.git] / init.c
diff --git a/init.c b/init.c
index bb8bedb..218e29c 100644 (file)
--- a/init.c
+++ b/init.c
 #include <lib-lib/debug.h>
 #include <lib-lib/rx.h>
 
+#include <lib-sys/unix.h>
+
 #include <lib-ui/curses.h>
+#include <lib-ui/history.h>
 
 #include "mutt.h"
-#include "history.h"
 #include "keymap.h"
 #include "mbyte.h"
 #include "charset.h"
@@ -2608,7 +2610,8 @@ void mutt_init (int skip_sys_rc, LIST * commands)
     if (!Homedir)
       Homedir = m_strdup(pw->pw_dir);
 
-    Realname = m_strdup(mutt_gecos_name (rnbuf, sizeof(rnbuf), pw));
+    mutt_gecos_name(rnbuf, sizeof(rnbuf), pw, GecosMask.rx);
+    Realname = m_strdup(rnbuf);
     Shell = m_strdup(pw->pw_shell);
     endpwent ();
   }
@@ -2641,7 +2644,7 @@ void mutt_init (int skip_sys_rc, LIST * commands)
   else
     Hostname = m_strdup(utsname.nodename);
 
-  if (!p && getdnsdomainname (buffer, sizeof(buffer)) == -1)
+  if (!p && getdnsdomainname(buffer, sizeof(buffer)) == -1)
     Fqdn = m_strdup("@");
   else
   if (*buffer != '@') {