]> diplodocus.org Git - nmh/blobdiff - h/mh.h
Replace strlen(foo) > 0 with *foo.
[nmh] / h / mh.h
diff --git a/h/mh.h b/h/mh.h
index 3c2fb061dbc3f2a91c4be13e679fdd56a68ae5d8..67b71702c2f13b76379f251a131ffb23c3891375 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -43,6 +43,9 @@ typedef unsigned char  boolean;  /* not int so we can pack in a structure */
 #define NMH_UNUSED(i) i
 #endif
 
+/* DIM gives the number of elements in the one-dimensional array a. */
+#define DIM(a) (sizeof (a) / sizeof (*(a)))
+
 /* LEN gives the strlen() of string constant s, excluding the
  * terminating NUL. */
 #define LEN(s) (sizeof (s) - 1)
@@ -396,12 +399,7 @@ typedef struct m_getfld_state *m_getfld_state_t;
 /*
  * credentials management
  */
-struct nmh_creds {
-    char *host;
-    char *user;
-    char *password;
-};
-
+struct nmh_creds;
 typedef struct nmh_creds *nmh_creds_t;
 
 /*