Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-08-01 11:04:36 +0400
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-08-01 11:04:36 +0400
commite8ae6ec9336fc6c06bb9e18678aa2a0880913d21 (patch)
treeac73f03447debc58f6a65627f3257194ac9d1740 /include/zbxregexp.h
parent707aa139e5e26f2c90c79f6197229a7cc0e89bf5 (diff)
.......... [ZBX-4986] undoing changes in r37472
Diffstat (limited to 'include/zbxregexp.h')
-rw-r--r--include/zbxregexp.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/zbxregexp.h b/include/zbxregexp.h
new file mode 100644
index 00000000000..67c04609a22
--- /dev/null
+++ b/include/zbxregexp.h
@@ -0,0 +1,49 @@
+/*
+** Zabbix
+** Copyright (C) 2001-2013 Zabbix SIA
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+**/
+#ifndef ZABBIX_ZBXREGEXP_H
+#define ZABBIX_ZBXREGEXP_H
+
+#include "zbxalgo.h"
+
+typedef struct
+{
+ char *name;
+ char *expression;
+ int expression_type;
+ char exp_delimiter;
+ unsigned char case_sensitive;
+}
+zbx_expression_t;
+
+/* regular expressions */
+char *zbx_regexp_match(const char *string, const char *pattern, int *len);
+char *zbx_iregexp_match(const char *string, const char *pattern, int *len);
+char *zbx_regexp_sub(const char *string, const char *pattern, const char *output_template);
+char *zbx_mregexp_sub(const char *string, const char *pattern, const char *output_template);
+
+void zbx_regexp_clean_expressions(zbx_vector_ptr_t *expressions);
+
+void add_regexp_ex(zbx_vector_ptr_t *regexps, const char *name, const char *expression, int expression_type,
+ char exp_delimiter, int case_sensitive);
+int regexp_match_ex(zbx_vector_ptr_t *regexps, const char *string, const char *pattern, int case_sensitive);
+int regexp_sub_ex(zbx_vector_ptr_t *regexps, const char *string, const char *pattern, int case_sensitive,
+ const char *output_template, char **output);
+
+
+#endif /* ZABBIX_ZBXREGEXP_H */