]> code.citadel.org Git - citadel.git/blobdiff - webcit/subst.h
* defines may now be ored or anded
[citadel.git] / webcit / subst.h
index 241cc7cba9332c747a13622cf300ff90d7fe749c..adfaf8b380de4f31854793be71f53570f9cb9274 100644 (file)
@@ -18,6 +18,7 @@ extern HashList *LocalTemplateCache;
 #define TYPE_INTDEFINE 8
 #define MAXPARAM  20
 
+#define IS_NUMBER(a) ((a == TYPE_LONG) || (a == TYPE_PREFINT) || (a == TYPE_INTDEFINE))
 
 /*
  * \brief Values for wcs_type
@@ -91,6 +92,11 @@ typedef int (*WCPreevalFunc)(WCTemplateToken *Token);
  */
 typedef int (*WCConditionalFunc)(StrBuf *Target, WCTemplputParams *TP);
 
+typedef enum _eBitMask {
+       eNO = 0,
+       eOR,
+       eAND
+}eBitMask;
 
 typedef struct _TemplateParam {
         /* are we a string or a number? */
@@ -100,6 +106,7 @@ typedef struct _TemplateParam {
        long len;
        /* if we're a number: */
        long lvalue;
+       eBitMask MaskBy;
 } TemplateParam;
 
 
@@ -357,7 +364,7 @@ void dbg_print_longvector(long *LongVector);
 
 
 
-#define do_template(a, b) DoTemplate(a, sizeof(a) -1, NULL, &NoCtx);
+#define do_template(a, b) DoTemplate(a, sizeof(a) -1, NULL, &NoCtx)
 const StrBuf *DoTemplate(const char *templatename, long len, StrBuf *Target, WCTemplputParams *TP);
 void url_do_template(void);