Sébastien Helleu
bd850398e8
core: add missing comments before functions when the result must be freed after use
2015-07-04 08:24:53 +02:00
Sébastien Helleu
9bf40517d3
api: add support of evaluated sub-strings and current date/time in function string_eval_expression() and command /eval
2015-06-30 20:25:35 +02:00
Sébastien Helleu
a79c0fcff3
core: allow pointer as list name in evaluation of hdata ( closes #450 )
2015-06-23 20:55:52 +02:00
Sébastien Helleu
6b2c9d2cb8
api: add support of environment variables in function string_eval_expression() and command /eval (issue #388 )
2015-04-26 11:50:39 +02:00
Sébastien Helleu
d322389e04
core: add support of full color option name in command /eval and API function string_eval_expression()
2015-04-26 10:29:30 +02:00
Sébastien Helleu
a020c28ea6
core: update copyright dates
2015-01-01 09:23:23 +01:00
Sébastien Helleu
ae013b7881
core: fix regex replace in eval_expression when regex or regex_replace is empty
2014-11-23 08:31:29 +01:00
Sébastien Helleu
633a32ccd3
api: add regex replace feature in function string_eval_expression
2014-10-22 21:19:54 +02:00
Sébastien Helleu
f62f759c3d
core: add hide of chars in string in evaluation of expressions
...
The syntax is: ${hide:char,string}.
All chars in string are replaced with char (which can be one or more chars).
2014-10-16 20:46:06 +02:00
Sébastien Helleu
9d849db85a
core: move default prefix/suffix for evaluation in wee-eval.h
2014-10-12 18:22:02 +02:00
Sébastien Helleu
0f363218b6
core: make argument "errors" optional in function string_replace_with_callback
2014-08-13 07:33:49 +02:00
Sébastien Helleu
c5710c6f24
core: fix evaluation of expressions with regex condition ( closes #63 )
...
The regex itself is not evaluated any more (so parentheses are kept).
Before the fix:
>> abcd =~ (?-i)^abc
== [0]
>> (abcd) =~ \(abcd\)
== [0]
After the fix:
>> abcd =~ (?-i)^abc
== [1]
>> (abcd) =~ \(abcd\)
== [1]
2014-07-12 10:10:05 +02:00
Sébastien Helleu
37144535a5
core: fix evaluation of expression with regex when a comparison char is in the regex
2014-04-04 16:52:12 +02:00
Sebastien Helleu
6fbba54bf0
core: fix recursive calls to function eval_expression
2014-03-06 18:23:20 +01:00
Sebastien Helleu
4b57c95494
core: fix memory leak in evaluation of sub-conditions
2014-03-02 17:43:19 +01:00
Sebastien Helleu
ea71121723
api: add support of escaped strings in function string_eval_expression and command /eval
2014-02-28 14:31:40 +01:00
Sebastien Helleu
58c615f33b
core: fix memory leak in regex matching when evaluating expression
2014-01-26 20:04:05 +01:00
Sebastien Helleu
9040dfbf52
core: fix crash in /eval when config option has a NULL value
2014-01-08 09:05:58 +01:00
Sebastien Helleu
846dde00aa
core: fix crash with hdata_update on shared strings, add hdata type "shared_string" (bug #41104 )
2014-01-05 14:37:27 +01:00
Sebastien Helleu
892aa79fb5
core: update copyright dates
2014-01-01 00:14:12 +01:00
Sebastien Helleu
ff62f3edff
api: add support of infos with format ${info:name,arguments} in function string_eval_expression and command /eval
2013-11-09 15:35:54 +01:00
Sebastien Helleu
86e7d95b9c
core: fix evaluation of expressions with parentheses
...
First evaluate sub-expressions between parentheses.
Before the fix:
>> 1 && (0 || 0)
== [1]
After the fix:
>> 1 && (0 || 0)
== [0]
2013-08-25 13:34:51 +02:00
Sebastien Helleu
390443112c
core: optimize creation of hashtable "pointers" in eval_expression if argument is NULL
...
The hashtable is created on first call to eval_expression with pointers == NULL.
On next calls, the hashtable is cleared, then used again.
The hashtable is freed on exit.
2013-08-04 12:42:29 +02:00
Sebastien Helleu
6ea81f4c8c
api: add support of colors with format "${color:xxx}" in function string_eval_expression and command /eval
2013-08-04 10:09:53 +02:00
Sebastien Helleu
dc878c5b69
api: add argument "options" in function string_eval_expression, add option "-c" for command /eval (to evaluate a condition)
2013-08-04 08:56:56 +02:00
Sebastien Helleu
a490195032
core: add secured data with optional encryption in file sec.conf
2013-07-27 12:57:08 +02:00
Sebastien Helleu
50ab62b75d
core: fix priority of logical operators in evaluation of expression
...
The AND ("&&") takes precedence over the OR ("||").
Before the fix:
>> 1 || 1 && 0
== [0]
After the fix:
>> 1 || 1 && 0
== [1]
Since the "&&" has higher priority, expression is evaluated as:
"1 || (1 && 0)".
2013-07-24 08:15:17 +02:00
Sebastien Helleu
3744787ec0
core: fix crash in evaluation of expression when reading a string in hdata with a NULL value (bug #39419 )
2013-07-08 08:28:27 +02:00
Sebastien Helleu
149c77decd
core: fix typos in many comments and some strings
2013-03-17 12:55:20 +01:00
Sebastien Helleu
25eaec3864
core: use size of 32 for hashtables (instead of 4, 8 or 16)
...
A size of 32 will use a little more memory but will reduce collisions in key
hashs, and then length of linked lists inside hash structure (faster search in
hashtable).
2013-01-26 19:26:43 +01:00
Sebastien Helleu
53c6b62ae3
core: fix some copyright dates
2013-01-10 23:14:33 +01:00
Sebastien Helleu
cd37f12059
core: fix memory leak in evaluation of expression when a logical operator ("&&" or "||") is found
2013-01-07 08:24:40 +01:00
Sebastien Helleu
f97598b4aa
core: update copyright dates
2013-01-01 13:12:49 +01:00
Sebastien Helleu
0f749dc65d
core: fix compilation warning on FreeBSD
2012-12-19 09:37:26 +01:00
Sebastien Helleu
7eb5cc4b97
core: move comments with description of C file to top of files
2012-12-15 12:27:57 +01:00
Sebastien Helleu
7d34812f1c
core: reformat comments for functions
2012-12-13 18:51:44 +01:00
Sebastien Helleu
4d436e3ac6
core: expand buffer local variables in evaluation of expressions (command /eval and function "string_eval_expression" in plugin API)
2012-11-02 15:40:15 +01:00
Sebastien Helleu
32c93b5c0a
core: add command /eval, use expression in conditions for bars, add function "string_eval_expression" in plugin API
2012-11-02 09:37:15 +01:00