* add first draft of group-change detection
[citadel.git] / webcit / subst.h
index 58eaa797b4abbc714248e346a79d8a406aa22397..bffa39d20a9bd1b9a9b02405b6ab8a4b8f841d0c 100644 (file)
@@ -85,6 +85,7 @@ typedef struct _wcsubst {
 #define CTX_USERLIST 8
 #define CTX_MAILSUM 9
 #define CTX_MIME_ATACH 10
+#define CTX_FILELIST 11
 #define CTX_STRBUF 12
 #define CTX_LONGVECTOR 13
 
@@ -120,8 +121,13 @@ void RegisterITERATOR(const char *Name, long len, /* Our identifier */
                      SubTemplFunc DoSubTempl,       /* call this function on each iteration for svput & friends */
                      HashDestructorFunc Destructor, /* use this function to shut down the hash; NULL if its a reference */
                      int ContextType,               /* which context do we provide to the subtemplate? */
-                     int XPectContextType);         /* which context do we expct to be called in? */
-#define RegisterIterator(a, b, c, d, e, f, g, h) RegisterITERATOR(a, sizeof(a)-1, b, c, d, e, f, g, h)
+                     int XPectContextType,          /* which context do we expct to be called in? */
+                     int Flags);
+
+#define IT_NOFLAG 0
+#define IT_FLAG_DETECT_GROUPCHANGE (1<<0)
+
+#define RegisterIterator(a, b, c, d, e, f, g, h, i) RegisterITERATOR(a, sizeof(a)-1, b, c, d, e, f, g, h, i)
 
 void GetTemplateTokenString(WCTemplateToken *Tokens,
                            int N, 
@@ -160,6 +166,7 @@ void RegisterSortFunc(const char *name, long len,
                      const char *prepend, long preplen,
                      CompareFunc Forward, 
                      CompareFunc Reverse, 
+                     CompareFunc GroupChange, 
                      long ContextType);
 
 void dbg_print_longvector(long *LongVector);