summaryrefslogtreecommitdiffstats
path: root/runtime/module-template.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r--runtime/module-template.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index b136b6a3..18aad650 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -412,6 +412,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
CODEqueryEtryPt_STD_MOD_QUERIES \
else if(!strcmp((char*) name, "parse")) {\
*pEtryPoint = parse;\
+ } else if(!strcmp((char*) name, "GetParserName")) {\
+ *pEtryPoint = GetParserName;\
}
/* modInit()
@@ -604,7 +606,6 @@ static rsRetVal doHUP(instanceData __attribute__((unused)) *pData)\
}
-
/* parse() - main entry point of parser modules
*/
#define BEGINparse \
@@ -620,5 +621,16 @@ static rsRetVal parse(msg_t *pMsg)\
}
+/* function to specify the parser name. This is done via a single command which
+ * receives a ANSI string as parameter.
+ */
+#define PARSER_NAME(x) \
+static rsRetVal GetParserName(uchar **ppSz)\
+{\
+ *ppSz = UCHAR_CONSTANT(x);\
+ return RS_RET_OK;\
+}
+
+
/* vim:set ai:
*/