-/*
- * mh.h -- main header file for all of nmh
+/* mh.h -- main header file for all of nmh
*/
#include <h/nmh.h>
#define NMH_BUFSIZ (BUFSIZ>=8192 ? BUFSIZ : 8192)
#ifndef FALSE
-#define FALSE 0
+#define FALSE false
#endif
#ifndef TRUE
-#define TRUE 1
+#define TRUE true
#endif
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)
+
/*
* char array that keeps track of size in both bytes and characters
* Usage note:
#define set_unseen(mp,msgnum) \
bvector_set (msgstat(mp, msgnum), SELECT_UNSEEN)
-/* for msh only */
-#define set_deleted(mp,msgnum) bvector_set (msgstat(mp, msgnum), DELETED)
-
#define in_sequence(mp,seqnum,msgnum) \
bvector_at (msgstat(mp, msgnum), FFATTRSLOT + seqnum)
#define clear_sequence(mp,seqnum,msgnum) \
/*
* credentials management
*/
-struct nmh_creds {
- char *host;
- char *user;
- char *password;
-};
-
+struct nmh_creds;
typedef struct nmh_creds *nmh_creds_t;
/*
extern char *context;
extern char *current;
extern char *credentials_file;
+extern int credentials_no_perm_check;
extern char *defaultfolder;
extern char *digestcomps;
extern char *distcomps;
extern char *showmimeproc;
extern char *showproc;
extern char *usequence;
+extern char *user_agent;
extern char *version_num;
extern char *version_str;
extern char *whatnowproc;
extern void (*done) (int) NORETURN;
#include <h/prototypes.h>
-