* add a way for the tabbed api to re-open the same tab on save again.
[citadel.git] / webcit / subst.h
index 241cc7cba9332c747a13622cf300ff90d7fe749c..4bf5728edf4096e9e92120a99d0dcf738df4826a 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
@@ -54,8 +55,9 @@ enum {
 #define CTX_ITERATE 17
 #define CTX_ICAL 18
 #define CTX_DAVNS 19
+#define CTX_TAB 20
 
-#define CTX_UNKNOWN 20
+#define CTX_UNKNOWN 21
 
 
 /**
@@ -91,6 +93,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 +107,7 @@ typedef struct _TemplateParam {
        long len;
        /* if we're a number: */
        long lvalue;
+       eBitMask MaskBy;
 } TemplateParam;
 
 
@@ -357,7 +365,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);