exit system.c, mutt_system goes into lib-sys/
[apps/madmutt.git] / getdomain.c
index d11c26d..204a693 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright notice from original mutt:
+ * [none]
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
 #if HAVE_CONFIG_H
 # include "config.h"
 #endif
 #if HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -6,6 +15,7 @@
 #include <ctype.h>
 #include <string.h>
 
 #include <ctype.h>
 #include <string.h>
 
+#include <lib-lib/file.h>
 #include "mutt.h"
 
 #ifndef STDC_HEADERS
 #include "mutt.h"
 
 #ifndef STDC_HEADERS
@@ -45,8 +55,7 @@ int getdnsdomainname (char *s, size_t l)
     p = tmp;
     while (ISSPACE (*p))
       p++;
     p = tmp;
     while (ISSPACE (*p))
       p++;
-    if (mutt_strncmp ("domain", p, 6) == 0
-        || mutt_strncmp ("search", p, 6) == 0) {
+    if (m_strncmp("domain", p, 6) == 0 || m_strncmp("search", p, 6) == 0) {
       p += 6;
 
       for (q = strtok (p, " \t\n"); q; q = strtok (NULL, " \t\n"))
       p += 6;
 
       for (q = strtok (p, " \t\n"); q; q = strtok (NULL, " \t\n"))
@@ -55,7 +64,7 @@ int getdnsdomainname (char *s, size_t l)
 
       if (q) {
         strip_trailing_dot (q);
 
       if (q) {
         strip_trailing_dot (q);
-        strfcpy (s, q, l);
+        m_strcpy(s, l, q);
         safe_fclose (&f);
         return 0;
       }
         safe_fclose (&f);
         return 0;
       }