summaryrefslogtreecommitdiffstats
path: root/template.h
diff options
context:
space:
mode:
Diffstat (limited to 'template.h')
-rw-r--r--template.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/template.h b/template.h
index b5598b6d..d394809b 100644
--- a/template.h
+++ b/template.h
@@ -25,6 +25,7 @@
#ifndef TEMPLATE_H_INCLUDED
#define TEMPLATE_H_INCLUDED 1
+#include <libestr.h>
#include "regexp.h"
#include "stringbuf.h"
@@ -36,11 +37,11 @@ struct template {
int tpenElements; /* number of elements in templateEntry list */
struct templateEntry *pEntryRoot;
struct templateEntry *pEntryLast;
- char optFormatEscape; /* in text fields, 0 - do not escape,
- * 1 - escape "the MySQL way"
- * 2 - escape quotes by double quotes,
- * 3 - escape double quotes for JSON.
- */
+ char optFormatEscape; /* in text fields, */
+# define NO_ESCAPE 0 /* 0 - do not escape, */
+# define SQL_ESCAPE 1 /* 1 - escape "the MySQL way" */
+# define STDSQL_ESCAPE 2 /* 2 - escape quotes by double quotes, */
+# define JSON_ESCAPE 3 /* 3 - escape double quotes for JSON. */
/* following are options. All are 0/1 defined (either on or off).
* we use chars because they are faster than bit fields and smaller
* than short...
@@ -89,6 +90,8 @@ struct templateEntry {
unsigned char field_delim; /* support for field-counting: field delemiter char */
int field_expand; /* use multiple instances of the field delimiter as a single one? */
+ es_str_t *propName; /**< property name (currently being used for CEE only) */
+
enum tplFormatTypes eDateFormat;
enum tplFormatCaseConvTypes eCaseConv;
struct { /* bit fields! */
@@ -115,14 +118,14 @@ ENDinterface(tpl)
PROTOTYPEObj(tpl);
-struct template* tplConstruct(void);
-struct template *tplAddLine(char* pName, unsigned char** pRestOfConfLine);
-struct template *tplFind(char *pName, int iLenName);
+//struct template* tplConstruct(void);
+struct template *tplAddLine(rsconf_t *conf, char* pName, unsigned char** pRestOfConfLine);
+struct template *tplFind(rsconf_t *conf, char *pName, int iLenName);
int tplGetEntryCount(struct template *pTpl);
-void tplDeleteAll(void);
-void tplDeleteNew(void);
-void tplPrintList(void);
-void tplLastStaticInit(struct template *tpl);
+void tplDeleteAll(rsconf_t *conf);
+void tplDeleteNew(rsconf_t *conf);
+void tplPrintList(rsconf_t *conf);
+void tplLastStaticInit(rsconf_t *conf, struct template *tpl);
rsRetVal ExtendBuf(uchar **pBuf, size_t *pLenBuf, size_t iMinSize);
/* note: if a compiler warning for undefined type tells you to look at this
* code line below, the actual cause is that you currently MUST include template.h