summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-01-19 15:07:25 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-19 15:07:25 +0100
commit6db75eb0d2613ab423edfc88222f7a28556a8d03 (patch)
treebc9de33011699880e57e30ea2d2bf6770b54efd6
parent7ed586df12b8d2f6f70f21ab08bd99c71850ba6c (diff)
downloadrsyslog-6db75eb0d2613ab423edfc88222f7a28556a8d03.tar.gz
rsyslog-6db75eb0d2613ab423edfc88222f7a28556a8d03.tar.xz
rsyslog-6db75eb0d2613ab423edfc88222f7a28556a8d03.zip
cleanup: different text escape types made more portable
-rw-r--r--template.c10
-rw-r--r--template.h10
2 files changed, 5 insertions, 15 deletions
diff --git a/template.c b/template.c
index 12d27ff3..ca1688f7 100644
--- a/template.c
+++ b/template.c
@@ -50,16 +50,6 @@ DEFobjCurrIf(regexp)
static int bFirstRegexpErrmsg = 1; /**< did we already do a "can't load regexp" error message? */
#endif
-#warning check this merge
-#if 1
-enum {
- NO_ESCAPE = 0,
- SQL_ESCAPE,
- STDSQL_ESCAPE,
- JSON_ESCAPE,
-};
-#endif
-
/* helper to tplToString and strgen's, extends buffer */
#define ALLOC_INC 128
rsRetVal
diff --git a/template.h b/template.h
index 40dbe448..d394809b 100644
--- a/template.h
+++ b/template.h
@@ -37,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...