#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)
+
/*
* char array that keeps track of size in both bytes and characters
* Usage note:
/*
* credentials management
*/
-struct nmh_creds {
- char *host;
- char *user;
- char *password;
-};
-
+struct nmh_creds;
typedef struct nmh_creds *nmh_creds_t;
/*