*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
VIEW_DRAFTS = 9, /* Drafts view */
VIEW_BLOG = 10, /* Blog view */
VIEW_QUEUE = 11, /* SMTP/... QUEUE rooms */
VIEW_DRAFTS = 9, /* Drafts view */
VIEW_BLOG = 10, /* Blog view */
VIEW_QUEUE = 11, /* SMTP/... QUEUE rooms */
const char *ChrPtr(const StrBuf *Str);
int StrLength(const StrBuf *Str);
#define SKEY(a) ChrPtr(a), StrLength(a)
const char *ChrPtr(const StrBuf *Str);
int StrLength(const StrBuf *Str);
#define SKEY(a) ChrPtr(a), StrLength(a)
long StrBufPeek(StrBuf *Buf, const char* ptr, long nThChar, char PeekValue);
long StrBufPook(StrBuf *Buf, const char* ptr, long nThChar, long nChars, char PookValue);
long StrBufPeek(StrBuf *Buf, const char* ptr, long nThChar, char PeekValue);
long StrBufPook(StrBuf *Buf, const char* ptr, long nThChar, long nChars, char PookValue);
void StrBuf_RFC822_to_Utf8(StrBuf *Target, const StrBuf *DecodeMe, const StrBuf* DefaultCharset, StrBuf *FoundCharset);
int StrBufDecodeBase64(StrBuf *Buf);
void StrBuf_RFC822_to_Utf8(StrBuf *Target, const StrBuf *DecodeMe, const StrBuf* DefaultCharset, StrBuf *FoundCharset);
int StrBufDecodeBase64(StrBuf *Buf);
int StrBufRFC2047encode(StrBuf **target, const StrBuf *source);
StrBuf *StrBufSanitizeEmailRecipientVector(const StrBuf *Recp,
StrBuf *UserName,
int StrBufRFC2047encode(StrBuf **target, const StrBuf *source);
StrBuf *StrBufSanitizeEmailRecipientVector(const StrBuf *Recp,
StrBuf *UserName,
#define QU (3)
void StrBufUrlescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
void StrBufUrlescUPAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
#define QU (3)
void StrBufUrlescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
void StrBufUrlescUPAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
void StrBufHexescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
void StrBufHexEscAppend(StrBuf *OutBuf, const StrBuf *In, const unsigned char *PlainIn, long PlainInLen);
void StrBufHexescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn);
void StrBufHexEscAppend(StrBuf *OutBuf, const StrBuf *In, const unsigned char *PlainIn, long PlainInLen);
long StrEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn, int nbsp, int nolinebreaks);
long StrECMAEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn);
long StrHtmlEcmaEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn, int nbsp, int nolinebreaks);
long StrEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn, int nbsp, int nolinebreaks);
long StrECMAEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn);
long StrHtmlEcmaEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn, int nbsp, int nolinebreaks);
const char *cbmstrcasestr(const char *text, const char *pattern);
const char *cbmstrcasestr_len(const char *text, size_t textlen, const char *pattern, size_t patlen);
void CtdlMakeTempFileName(char *name, int len);
const char *cbmstrcasestr(const char *text, const char *pattern);
const char *cbmstrcasestr_len(const char *text, size_t textlen, const char *pattern, size_t patlen);
void CtdlMakeTempFileName(char *name, int len);
int is_msg_in_mset(const char *mset, long msgnum);
int pattern2(char *search, char *patn);
void stripltlen(char *, int *);
int is_msg_in_mset(const char *mset, long msgnum);
int pattern2(char *search, char *patn);
void stripltlen(char *, int *);
int GetHashKeys(HashList *Hash, char ***List);
int dbg_PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second);
int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry);
int GetHashKeys(HashList *Hash, char ***List);
int dbg_PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second);
int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry);
-HashPos *GetNewHashPos(HashList *Hash, int StepWidth);
+HashPos *GetNewHashPos(const HashList *Hash, int StepWidth);
+void RewindHashPos(const HashList *Hash, HashPos *it, int StepWidth);
int GetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At);
int DeleteEntryFromHash(HashList *Hash, HashPos *At);
int GetHashPosCounter(HashList *Hash, HashPos *At);
void DeleteHashPos(HashPos **DelMe);
int NextHashPos(HashList *Hash, HashPos *At);
int GetHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data);
int GetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At);
int DeleteEntryFromHash(HashList *Hash, HashPos *At);
int GetHashPosCounter(HashList *Hash, HashPos *At);
void DeleteHashPos(HashPos **DelMe);
int NextHashPos(HashList *Hash, HashPos *At);
int GetHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data);
-int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data);
+int GetNextHashPos(const HashList *Hash, HashPos *At, long *HKLen, const char **HashKey, void **Data);
int GetHashAt(HashList *Hash,long At, long *HKLen, const char **HashKey, void **Data);
void SortByHashKey(HashList *Hash, int Order);
void SortByHashKeyStr(HashList *Hash);
int GetHashAt(HashList *Hash,long At, long *HKLen, const char **HashKey, void **Data);
void SortByHashKey(HashList *Hash, int Order);
void SortByHashKeyStr(HashList *Hash);
#define XMPPMORTUARY "application/x-citadel-xmpp-mortuary"
#define INTERNETCFG "application/x-citadel-internet-config"
#define XMPPMORTUARY "application/x-citadel-xmpp-mortuary"
#define INTERNETCFG "application/x-citadel-internet-config"
#define QR_ANONOPT 1024 /* Anonymous-Option room */
#define QR_NETWORK 2048 /* Shared network room */
#define QR_PREFONLY 4096 /* Preferred status needed to enter */
#define QR_ANONOPT 1024 /* Anonymous-Option room */
#define QR_NETWORK 2048 /* Shared network room */
#define QR_PREFONLY 4096 /* Preferred status needed to enter */
#define QR_MAILBOX 16384 /* Set if this is a private mailbox */
#define QR2_SYSTEM 1 /* System room; hide by default */
#define QR_MAILBOX 16384 /* Set if this is a private mailbox */
#define QR2_SYSTEM 1 /* System room; hide by default */
#define UA_HASNEWMSGS 8 /* Unread messages exist in this room */
#define UA_ZAPPED 16 /* User has forgotten (zapped) this room */
#define UA_POSTALLOWED 32 /* User may post top-level messages here */
#define UA_HASNEWMSGS 8 /* Unread messages exist in this room */
#define UA_ZAPPED 16 /* User has forgotten (zapped) this room */
#define UA_POSTALLOWED 32 /* User may post top-level messages here */
#define UA_DELETEALLOWED 128 /* User is allowed to delete messages from this room */
#define UA_REPLYALLOWED 256 /* User is allowed to reply to existing messages here */
/* runtime flag extracted from goto reply; not db persistant, should be moved if new flags added */
#define UA_DELETEALLOWED 128 /* User is allowed to delete messages from this room */
#define UA_REPLYALLOWED 256 /* User is allowed to reply to existing messages here */
/* runtime flag extracted from goto reply; not db persistant, should be moved if new flags added */