mblaze/blaze822_priv.h

29 lines
831 B
C
Raw Normal View History

2016-07-13 13:01:09 +00:00
struct message {
char *msg;
char *end;
char *body;
char *bodyend;
2016-07-13 13:52:39 +00:00
char *bodychunk;
char *orig_header;
2016-07-13 13:01:09 +00:00
};
2016-07-13 13:52:39 +00:00
2016-07-13 13:56:50 +00:00
// WSP = SP / HTAB
2016-07-13 13:52:39 +00:00
#define iswsp(c) (((c) == ' ' || (c) == '\t'))
2016-07-13 13:56:50 +00:00
2016-07-13 14:00:20 +00:00
#define isfws(c) (((unsigned char)(c) == ' ' || (unsigned char)(c) == '\t' || (unsigned char)(c) == '\n' || (unsigned char)(c) == '\r'))
2020-03-08 16:11:36 +00:00
// ASCII lowercase/uppercase without alpha check (wrong for "@[\]^_")
2016-07-13 13:56:50 +00:00
#define lc(c) ((c) | 0x20)
2020-03-08 16:11:36 +00:00
#define uc(c) ((c) & 0xdf)
2016-07-26 16:10:39 +00:00
2020-03-08 16:16:50 +00:00
// dirent type that can be a mail/dir (following symlinks)
#if defined(DT_REG) && defined(DT_LNK) && defined(DT_UNKNOWN)
#define MAIL_DT(t) (t == DT_REG || t == DT_LNK || t == DT_UNKNOWN)
#define DIR_DT(t) (t == DT_DIR || t == DT_UNKNOWN)
#else
#define MAIL_DT(t) (1)
#define DIR_DT(t) (1)
#endif
2016-07-26 16:10:39 +00:00
void *mymemmem(const void *h0, size_t k, const void *n0, size_t l);