X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Flibcitadel.h;h=ff9590a343e89f82df177d975283a39960255a37;hb=fbe839e9aa6b9e055c78d1922a06cc1be8d74675;hp=32b3034dbdee4baff211c20c18a84b67cc824b85;hpb=f320c7f2b583a6554dc50e08f566d4b956249135;p=citadel.git diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index 32b3034db..ff9590a34 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -14,6 +14,7 @@ */ #include #include +#include #define LIBCITADEL_VERSION_NUMBER 737 /* @@ -199,6 +200,36 @@ void the_mime_parser(char *partnum, int dont_decode ); +typedef struct StrBuf StrBuf; + +StrBuf* NewStrBuf(void); +StrBuf* NewStrBufPlain(const char* ptr, int nChars); +StrBuf* _NewConstStrBuf(const char* StringConstant, size_t SizeOfStrConstant); +#define NewConstStrBuf(a) _NewConstStrBuf(a, sizeof(a)) +void FreeStrBuf (StrBuf **FreeMe); +void HFreeStrBuf (void *VFreeMe); +int FlushStrBuf(StrBuf *buf); + +inline const char *ChrPtr(StrBuf *Str); +inline int StrLength(StrBuf *Str); + +int StrBufTCP_read_line(StrBuf *buf, int fd, int append, const char **Error); + +int StrBufExtract_token(StrBuf *dest, const StrBuf *Source, int parmnum, char separator); +int StrBufSub(StrBuf *dest, const StrBuf *Source, size_t Offset, size_t nChars); +unsigned long StrBufExtract_unsigned_long(const StrBuf* Source, int parmnum, char separator); +long StrBufExtract_long(const StrBuf* Source, int parmnum, char separator); +int StrBufExtract_int(const StrBuf* Source, int parmnum, char separator); +inline int StrBufNum_tokens(const StrBuf *source, char tok); + +void StrBufAppendBuf(StrBuf *Buf, StrBuf *AppendBuf, size_t Offset); +void StrBufPrintf(StrBuf *Buf, const char *format, ...) __attribute__((__format__(__printf__,2,3))); +void StrBufCutLeft(StrBuf *Buf, int nChars); +void StrBufCutRight(StrBuf *Buf, int nChars); +void StrBufEUid_unescapize(StrBuf *target, StrBuf *source); + +long StrTol(StrBuf *Buf); + const char *GuessMimeType(char *data, size_t dlen); const char* GuessMimeByFilename(const char *what, size_t len); @@ -253,6 +284,7 @@ int is_msg_in_mset(char *mset, long msgnum); int pattern2(char *search, char *patn); void stripltlen(char *, int *); char *html_to_ascii(char *inputmsg, int msglen, int screenwidth, int do_citaformat); +void LoadEntityList(char *FileName);