Sébastien Helleu
72dce52901
core, plugins: replace "%p" by "%lx" in calls to sscanf
2025-05-15 20:12:12 +02:00
Sébastien Helleu
de7150c65b
Revert "core, plugins: replace "%lx" by "%p" in calls to sscanf"
...
This reverts commit e64ab3c675 .
This was causing incorrect conversion of strings "0x..." to pointers on systems
like Solaris/ILLUMOS.
And as a side effect, buffers were sometimes empty in weechat relay clients
like glowing-bear.
2025-05-15 20:10:32 +02:00
Sébastien Helleu
d475c16671
core: fix buffer overflow in function utf8_next_char and return NULL for empty string
...
Now the function utf8_next_char with an empty string returns NULL instead of
the next char, which is most of the time after an allocated buffer.
And the function utf8_char_size with an empty string now returns 0 instead of
1.
This indirectly fixes a buffer overflow in function eval_string_range_chars
when the input string is empty (for example when doing `/eval -n ${chars:}`).
2025-05-10 20:53:04 +02:00
Sébastien Helleu
2bc290b6ed
core: fix integer overflow and return "unsigned long" in function util_version_number
2025-05-08 18:45:39 +02:00
Sébastien Helleu
51d24fd2da
api: add function file_compare (issue #2250 )
2025-05-07 20:44:48 +02:00
Sébastien Helleu
a1cbe63a42
tests: move CMake file, main C++/headers for tests and scripts to unit directory
2025-05-05 13:18:34 +02:00
Sébastien Helleu
2475f20cb7
all: move description of C files below the copyright and license
2025-03-31 11:47:49 +02:00
Sébastien Helleu
3a6ac9ee76
all: add SPDX license tag
2025-03-31 07:49:26 +02:00
Sébastien Helleu
d8987a1678
all: replace Copyright lines by SPDX copyright tag
2025-03-30 14:47:12 +02:00
Sébastien Helleu
caa7af253a
tests: add tests on function util_strftimeval with microseconds < 0 or > 999999
2025-03-17 08:12:33 +01:00
Sébastien Helleu
9fe5fa23a0
core: convert "long long" to "unsigned long long" in functions util_get_microseconds_string and util_parse_delay
2025-03-16 11:13:25 +01:00
Sébastien Helleu
547e2b934e
core: update copyright dates
2025-02-01 23:13:18 +01:00
Sébastien Helleu
732f24b6ba
core: add command /pipe
2024-12-16 13:39:14 +01:00
Sébastien Helleu
244595d94f
api: add support of flags in functions hook_signal_send and hook_hsignal_send
...
For now the only supported flag is:
- "stop_on_error": stop execution of callbacks immediately after an
error (ie return code of callback is WEECHAT_RC_ERROR) and return this code
(by default execute all callbacks and return the last return code, or return
WEECHAT_RC_EAT immediately if a callback returns this)
Example:
hook_signal_send("[flags:stop_on_error]my_signal", WEECHAT_HOOK_SIGNAL_STRING, "test");
2024-11-24 10:29:32 +01:00
Sébastien Helleu
26e16fdea7
tests: add extra tests on function string_split
...
New tests:
- split empty string
- standard split with only separators in string
- standard split with only separators in string and strip separators
2024-10-21 08:23:55 +02:00
Sébastien Helleu
50a9c88b79
core: check that version is not NULL or empty string in function util_version_number
2024-10-21 08:23:55 +02:00
Sébastien Helleu
bca7c7438a
api: add special value - (hyphen-minus) in options of function command_options to prevent execution of commands (issue #2199 )
2024-10-13 11:15:10 +02:00
Sébastien Helleu
ec78084f49
tests: add tests on function input_data
2024-10-12 21:04:13 +02:00
Josh Soref
7f93f81a82
spelling: separator
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-09-28 21:22:56 +02:00
Sébastien Helleu
6908eec160
tests: replace POINTERS_EQUAL by STRCMP_EQUAL in string comparisons with NULL
2024-09-14 10:26:42 +02:00
Sébastien Helleu
5f62eb1f2b
tests: add tests on function string_rebuild_split_string with empty items
2024-09-07 08:27:26 +02:00
Sébastien Helleu
2a6b16d1de
tests: add tests of hdata returning NULL pointer in eval
2024-06-22 09:08:47 +02:00
Sébastien Helleu
e64ab3c675
core, plugins: replace "%lx" by "%p" in calls to sscanf
2024-06-14 17:59:02 +02:00
Sébastien Helleu
c83b08fae8
tests: add test on function hdata_count with empty list "gui_layouts"
2024-06-14 17:37:11 +02:00
Sébastien Helleu
ce3c5f0caa
core: add hdata count in evaluation of expressions
...
Syntax is one of:
- `hdata_count:name[list]`: uses a hdata name and list
- `hdata_count:name[pointer]`: uses a hdata name and pointer (count starts at
this pointer)
2024-06-14 17:04:06 +02:00
Sébastien Helleu
8945b7bf33
core: add function hdata_count
2024-06-14 17:04:06 +02:00
Sébastien Helleu
70417a1ac6
api: add hashtable type "longlong"
2024-06-10 23:55:34 +02:00
Sébastien Helleu
93433e5dd7
tests: add tests on hashtable with different key/value types
2024-06-10 19:42:57 +02:00
Sébastien Helleu
843dcd49b5
tests: add more tests on function string_split_shell
2024-06-08 14:24:43 +02:00
Sébastien Helleu
0df1cde496
tests: fix typo in comment
2024-05-08 09:30:33 +02:00
Sébastien Helleu
9f536d3dc7
api: return -1 or 1 if one input string is NULL and not the other in string comparison functions
2024-05-08 09:30:20 +02:00
Sébastien Helleu
a59fa70a94
irc: remove check of NULL pointers before calling weechat_list_free() (issue #865 )
2024-04-26 21:06:47 +02:00
Sébastien Helleu
ee51e6c05f
plugins: remove check of NULL pointers before calling weechat_infolist_free() (issue #865 )
2024-04-26 21:06:06 +02:00
Sébastien Helleu
561dd92d8e
plugins: remove check of NULL pointers before calling weechat_config_option_free() (issue #865 )
2024-04-26 20:59:44 +02:00
Sébastien Helleu
619b40b42f
core: remove check of NULL pointers before calling string_shared_free() (issue #865 )
2024-04-26 08:55:35 +02:00
Sébastien Helleu
0b2d9bcb9b
plugins: remove check of NULL pointers before calling weechat_hashtable_free() (issue #865 )
2024-04-26 08:53:22 +02:00
Sébastien Helleu
828ca37225
tests: split hook tests into multiple files (issue #865 )
2024-04-26 08:41:44 +02:00
Sébastien Helleu
6cf163f00c
tests: move hook modifier tests to a separate file (issue #865 )
2024-04-26 07:51:49 +02:00
Sébastien Helleu
3eed74a75c
plugins: remove check of NULL pointers before calling weechat_arraylist_free() (issue #865 )
2024-04-26 07:37:22 +02:00
90
8c3f16dbe3
core: add support for $XDG_STATE_HOME
2024-04-12 22:57:57 +02:00
Sébastien Helleu
2cf66de423
api: add function "asprintf"
2024-04-07 13:18:13 +02:00
Sébastien Helleu
4adb64284b
buffer: add property input_get_any_user_data in buffer (issue #2066 )
...
This allows buffers to get any user input, including commands, that are sent to
the buffer callback instead of being executed on the buffer.
2024-04-07 13:18:13 +02:00
Sébastien Helleu
965beb37de
core: fix print of pointer values
2024-04-01 21:08:52 +02:00
Sébastien Helleu
9bc4352089
core: fix tests on function strftimeval on Alpine
2024-03-24 20:56:29 +01:00
Sébastien Helleu
ea86f75319
tests: add hdata tests with struct timeval
2024-03-15 21:32:40 +01:00
Sébastien Helleu
3b9e2f480d
tests: reorder tests on core directory functions
2024-03-13 13:01:50 +01:00
Sébastien Helleu
24c4029c96
core: remove "wee-" prefix from source files in src/core and src/core/hook
2024-03-12 21:27:37 +01:00
Sébastien Helleu
9e0dd18152
api: add function "hdata_longlong" (issue #2081 )
2024-03-12 20:37:11 +01:00
Sébastien Helleu
361d55d9d7
api: add functions config_{boolean|integer|string|color|enum}_inherited in scripting API
2024-03-05 19:52:21 +01:00
Sébastien Helleu
6817542f95
tests: add tests on functions that read values of config options
2024-03-05 19:51:15 +01:00