]> 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 157f3c0801068bfe7ac08d5c8b41806be085efe7..67b71702c2f13b76379f251a131ffb23c3891375 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
 #define NMH_BUFSIZ  (BUFSIZ>=8192 ? BUFSIZ : 8192)
 
 #ifndef FALSE
 #define NMH_BUFSIZ  (BUFSIZ>=8192 ? BUFSIZ : 8192)
 
 #ifndef FALSE
-#define FALSE 0
+#define FALSE false
 #endif
 #ifndef TRUE
 #endif
 #ifndef TRUE
-#define TRUE 1
+#define TRUE true
 #endif
 typedef unsigned char  boolean;  /* not int so we can pack in a structure */
 
 #endif
 typedef unsigned char  boolean;  /* not int so we can pack in a structure */
 
@@ -43,6 +43,13 @@ typedef unsigned char  boolean;  /* not int so we can pack in a structure */
 #define NMH_UNUSED(i) i
 #endif
 
 #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:
 /*
  * char array that keeps track of size in both bytes and characters
  * Usage note:
@@ -60,6 +67,7 @@ void charstring_push_back (charstring_t, const char);
 /* Append possibly multi-byte character(s): */
 void charstring_push_back_chars (charstring_t, const char [], size_t, size_t);
 void charstring_append (charstring_t, const charstring_t);
 /* Append possibly multi-byte character(s): */
 void charstring_push_back_chars (charstring_t, const char [], size_t, size_t);
 void charstring_append (charstring_t, const charstring_t);
+void charstring_append_cstring (charstring_t, const char []);
 void charstring_clear (charstring_t);
 /* Don't store return value of charstring_buffer() and use later after
    intervening push_back's; use charstring_buffer_copy() instead. */
 void charstring_clear (charstring_t);
 /* Don't store return value of charstring_buffer() and use later after
    intervening push_back's; use charstring_buffer_copy() instead. */
@@ -159,7 +167,7 @@ extern struct swit anoyes[];        /* standard yes/no switches */
  * general folder attributes
  */
 #define READONLY   (1<<0)      /* No write access to folder    */
  * 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  */
 #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  */
@@ -376,7 +384,6 @@ typedef struct m_getfld_state *m_getfld_state_t;
 #define        MS_UNKNOWN      1       /* type not known yet         */
 #define        MS_MBOX         2       /* Unix-style "from" lines    */
 #define        MS_MMDF         3       /* string mmdlm2              */
 #define        MS_UNKNOWN      1       /* type not known yet         */
 #define        MS_MBOX         2       /* Unix-style "from" lines    */
 #define        MS_MMDF         3       /* string mmdlm2              */
-#define        MS_MSH          4       /* whacko msh                 */
 
 #define        NOUSE   0               /* draft being re-used */
 
 
 #define        NOUSE   0               /* draft being re-used */
 
@@ -392,12 +399,7 @@ typedef struct m_getfld_state *m_getfld_state_t;
 /*
  * credentials management
  */
 /*
  * credentials management
  */
-struct nmh_creds {
-    char *host;
-    char *user;
-    char *password;
-};
-
+struct nmh_creds;
 typedef struct nmh_creds *nmh_creds_t;
 
 /*
 typedef struct nmh_creds *nmh_creds_t;
 
 /*
@@ -449,6 +451,7 @@ extern char *components;
 extern char *context;
 extern char *current;
 extern char *credentials_file;
 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 *defaultfolder;
 extern char *digestcomps;
 extern char *distcomps;
@@ -489,6 +492,7 @@ extern char *sendproc;
 extern char *showmimeproc;
 extern char *showproc;
 extern char *usequence;
 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 char *version_num;
 extern char *version_str;
 extern char *whatnowproc;