X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/afee8ed17a56617618fb7f963b111d7cf0fb56e7..26cad4056c927e609753103897a60d00611ac9f7:/h/mh.h diff --git a/h/mh.h b/h/mh.h index 253af9cb..c92543c7 100644 --- a/h/mh.h +++ b/h/mh.h @@ -134,14 +134,7 @@ extern struct swit anoyes[]; /* standard yes/no switches */ /* * type for holding the sequence set of a message */ -typedef unsigned int seqset_t; - -/* - * Determine the number of user defined sequences we - * can have. The first 5 sequence flags are for - * internal nmh message flags. - */ -#define NUMATTRS ((sizeof(seqset_t) * Nbby) - 5) +typedef unsigned long seqset_t; /* * first free slot for user defined sequences @@ -149,6 +142,13 @@ typedef unsigned int seqset_t; */ #define FFATTRSLOT 5 +/* + * Determine the number of user defined sequences we + * can have. The first FFATTRSLOT sequence flags are for + * internal nmh message flags. + */ +#define NUMATTRS ((sizeof(seqset_t) * Nbby) - FFATTRSLOT) + /* * internal messages attributes (sequences) */ @@ -205,6 +205,18 @@ struct msgs { * in a particular sequence. */ seqset_t *msgstats; /* msg status */ + + /* + * A FILE handle containing an open filehandle for the sequence file + * for this folder. If non-NULL, use it when the sequence file is + * written. + */ + FILE *seqhandle; + + /* + * The name of the public sequence file; required by lkfclose() + */ + char *seqname; }; /* @@ -242,18 +254,18 @@ struct msgs { #define set_deleted(mp,msgnum) ((mp)->msgstats[(msgnum) - mp->lowoff] |= DELETED) #define in_sequence(mp,seqnum,msgnum) \ - ((mp)->msgstats[(msgnum) - mp->lowoff] & (1 << (FFATTRSLOT + seqnum))) + ((mp)->msgstats[(msgnum) - mp->lowoff] & ((seqset_t)1 << (FFATTRSLOT + seqnum))) #define clear_sequence(mp,seqnum,msgnum) \ - ((mp)->msgstats[(msgnum) - mp->lowoff] &= ~(1 << (FFATTRSLOT + seqnum))) + ((mp)->msgstats[(msgnum) - mp->lowoff] &= ~((seqset_t)1 << (FFATTRSLOT + seqnum))) #define add_sequence(mp,seqnum,msgnum) \ - ((mp)->msgstats[(msgnum) - mp->lowoff] |= (1 << (FFATTRSLOT + seqnum))) + ((mp)->msgstats[(msgnum) - mp->lowoff] |= ((seqset_t)1 << (FFATTRSLOT + seqnum))) #define is_seq_private(mp,seqnum) \ - ((mp)->attrstats & (1 << (FFATTRSLOT + seqnum))) + ((mp)->attrstats & ((seqset_t)1 << (FFATTRSLOT + seqnum))) #define make_seq_public(mp,seqnum) \ - ((mp)->attrstats &= ~(1 << (FFATTRSLOT + seqnum))) + ((mp)->attrstats &= ~((seqset_t)1 << (FFATTRSLOT + seqnum))) #define make_seq_private(mp,seqnum) \ - ((mp)->attrstats |= (1 << (FFATTRSLOT + seqnum))) + ((mp)->attrstats |= ((seqset_t)1 << (FFATTRSLOT + seqnum))) #define make_all_public(mp) \ ((mp)->attrstats = 0) @@ -374,7 +386,6 @@ extern char *formatproc; extern char *forwcomps; extern char *inbox; extern char *incproc; -extern char *installproc; extern char *lproc; extern char *mailproc; extern char *mh_defaults; @@ -388,6 +399,7 @@ extern char *moreproc; extern char *msgprot; extern char *mshproc; extern char *nmhaccessftp; +extern char *nmhaccessurl; extern char *nmhstorage; extern char *nmhcache; extern char *nmhprivcache;