]> diplodocus.org Git - nmh/blobdiff - h/mh.h
Ensure a space after `#!'.
[nmh] / h / mh.h
diff --git a/h/mh.h b/h/mh.h
index 8dcad654e23e8161694a7aff6fdd729d166557ae..c0510be101e68eee63607abfa8f409a7f760e6ef 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -1,5 +1,4 @@
-/*
- * 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 */
 
@@ -43,6 +42,13 @@ 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:
@@ -160,7 +166,7 @@ extern struct swit anoyes[];        /* standard yes/no switches */
  * general folder attributes
  */
 #define READONLY   (1<<0)      /* No write access to folder    */
-#define        SEQMOD     (1<<1)       /* folder's sequences modifed   */
+#define        SEQMOD     (1<<1)       /* folder's sequences modified   */
 #define        ALLOW_NEW  (1<<2)       /* allow the "new" sequence     */
 #define        OTHERS     (1<<3)       /* folder has other files       */
 #define        MODIFIED   (1<<4)       /* msh in-core folder modified  */
@@ -314,9 +320,6 @@ struct msgs {
 #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) \
@@ -392,12 +395,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;
 
 /*
@@ -449,6 +447,7 @@ extern char *components;
 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;
@@ -498,4 +497,3 @@ extern char *whomproc;
 extern void (*done) (int) NORETURN;
 
 #include <h/prototypes.h>
-