1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 20:25:42 +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
+1
View File
@@ -23,6 +23,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
of status bar
* core: allow incomplete commands if unambiguous, new option
weechat.look.command_incomplete (task #5419)
* api: add regex replace feature in function string_eval_expression
* api: use microseconds instead of milliseconds in functions util_timeval_diff
and util_timeval_add
* irc: display own nick changes in server buffer (closes #188)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+226 -24
View File
File diff suppressed because it is too large Load Diff
+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,
File diff suppressed because it is too large Load Diff