]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/libcitadel.h
* add gzip + configure detection -> re-bootstrap!
[citadel.git] / libcitadel / lib / libcitadel.h
index 32b3034dbdee4baff211c20c18a84b67cc824b85..66dba61e220d00f0ec7a256154cec18788c4269f 100644 (file)
@@ -14,7 +14,8 @@
  */
 #include <time.h>
 #include <stdlib.h>
-#define LIBCITADEL_VERSION_NUMBER      737
+#include <stdarg.h>
+#define LIBCITADEL_VERSION_NUMBER      738
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -199,7 +200,47 @@ void the_mime_parser(char *partnum,
                      int dont_decode
 );
 
-const char *GuessMimeType(char *data, size_t dlen);
+typedef struct StrBuf StrBuf;
+
+StrBuf* NewStrBuf(void);
+StrBuf* NewStrBufPlain(const char* ptr, int nChars);
+int StrBufPlain(StrBuf *Buf, 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 StrBufReadBLOB(StrBuf *Buf, int *fd, int append, long nBytes, 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 StrBufAppendBufPlain(StrBuf *Buf, const char *AppendBuf, long AppendSize, size_t Offset);
+void StrBufAppendBuf(StrBuf *Buf, StrBuf *AppendBuf, size_t Offset);
+#ifdef SHOW_ME_VAPPEND_PRINTF
+/* so owe don't create an include depndency, this is just visible on demand. */
+void StrBufVAppendPrintf(StrBuf *Buf, const char *format, va_list ap);
+#endif
+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);
+void StrBufEUid_escapize(StrBuf *target, StrBuf *source);
+
+int CompressBuffer(StrBuf *Buf);
+
+long StrTol(StrBuf *Buf);
+
+const char *GuessMimeType(const char *data, size_t dlen);
 const char* GuessMimeByFilename(const char *what, size_t len);
 
 /* Run once at Programstart */
@@ -253,6 +294,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);