]> diplodocus.org Git - nmh/blobdiff - config/config.c
getpass.c: Move interface to own file.
[nmh] / config / config.c
index 49d5c8a45a7fb3362cb0f876a3443fdc088c1837..55d862e71c19f6e17a4f857debfc37d3e401c0e0 100644 (file)
@@ -5,14 +5,14 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include "../sbr/m_maildir.h"
+#include "h/mh.h"
+#include "sbr/context_read.h"
+#include "sbr/m_maildir.h"
 #include <pwd.h>
 
 #define nmhbindir(file) NMHBINDIR#file
 #define nmhlibexecdir(file) NMHLIBEXECDIR#file
 #define nmhetcdir(file) NMHETCDIR#file
-#define nmhdocdir(file) NMHDOCDIR#file
 
 
 /*
@@ -24,6 +24,7 @@
  * 3) Next, check in nmh Mail directory.
  * 4) Next, check in nmh `etc' directory.
  *
+ * Does not return NULL.
  */
 
 char *
@@ -63,9 +64,9 @@ etcpath (char *file)
 
            if (access (epath, R_OK) != NOTOK)
                return epath;
-               /* FALLTHRU */
-try_it:
 
+            /* FALLTHRU */
+try_it:
        default: 
            /* Check nmh Mail directory */
            if (access ((cp = m_mailpath (file)), R_OK) != NOTOK) {
@@ -78,7 +79,7 @@ try_it:
 
     /* Check nmh `etc' directory */
     snprintf (epath, sizeof(epath), nmhetcdir(/%s), file);
-    return (access (epath, R_OK) != NOTOK ? epath : file);
+    return access(epath, R_OK) != NOTOK ? epath : file;
 }