To force evaluation of the expression before doing the comparison (less safe),
the "${eval_cond:xxx}" can be used.
With the old behavior we had:
>> ${if:a==b}
== [0]
>> ${if:${raw:a==b}}
== [0]
>> ${if:${eval_cond:${raw:a==b}}}
== [0]
And with the new behavior, we have:
>> ${if:a==b}
== [0]
>> ${if:${raw:a==b}}
== [1]
>> ${if:${eval_cond:${raw:a==b}}}
== [0]
These two formats are now supported, if "pointer_name" is present in the
"pointers" hashtable:
* "${pointer_name}": value of pointer (example: "0x1234abcd")
* ${buffer[pointer_name].full_name}: use of a pointer name instead of pointer
value or list name
New options to customize behavior on signals received, with the default
behavior:
- weechat.signal.sighup: quit in normal mode, reload config in headless
- weechat.signal.sigquit: quit
- weechat.signal.sigterm: quit
- weechat.signal.sigusr1: no command executed by default
- weechat.signal.sigusr2: no command executed by default
The signals SIGUSR1 and SIGUSR2 are introduced by this commit, so it's now
possible to run commands when they are received.
The SIGHUP signal makes now WeeChat quit, it was the behavior before version
2.9 of WeeChat (see commit de1e61f7cd50cbd1a99777fe6611642a51abf5f6).
Now a single -d in command /eval shows less debug messages than previous
versions.
To get the same debug messages than previous versions, two -d must be used.
New comparison operators:
- "==*": is matching mask, case sensitive (wildcard "*" is allowed)
- "!!*": is NOT matching mask, case sensitive (wildcard "*" is allowed)
- "==-": is included, case sensitive
- "!!-": is NOT included, case sensitive
- "=-": is included, case insensitive
- "!-": is NOT included, case insensitive
The memory leak was caused by a bug in function setlocale on FreeBSD:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243195
The fix is the following:
* Remove the calls to setlocale when formatting the result.
* The function snprintf is still called, and then is now locale dependent,
for example in French the decimal separator is a comma instead of a dot.
* A new function calc_sanitize_decimal_number is introduced to "sanitize" a
decimal number: keep only the decimal separator (replace it by a dot) and
remove any other separator found.
Unit tests are added on these functions:
* calc_sanitize_decimal_number
* calc_format_result