1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

api: add regex replace feature in function string_eval_expression

This commit is contained in:
Sébastien Helleu
2014-10-22 21:19:54 +02:00
parent 972bd26e5e
commit 633a32ccd3
8 changed files with 927 additions and 174 deletions
+9
View File
@@ -20,6 +20,8 @@
#ifndef WEECHAT_EVAL_H
#define WEECHAT_EVAL_H 1
#include <regex.h>
#define EVAL_STR_FALSE "0"
#define EVAL_STR_TRUE "1"
@@ -50,6 +52,13 @@ enum t_eval_comparison
EVAL_NUM_COMPARISONS,
};
struct t_eval_regex
{
const char *result;
regmatch_t match[100];
int last_match;
};
extern int eval_is_true (const char *value);
extern char *eval_expression (const char *expr,
struct t_hashtable *pointers,