Sébastien Helleu
3dc72b2e5f
core: free use of pointer after free in case of error in function string_dyn_concat
2017-06-10 17:35:47 +02:00
Sébastien Helleu
112bebcddf
core: add a way to count the suffix length in max chars displayed in cut of string ("cut:" and "cutscr:") ( closes #963 )
...
The format to use is one of:
- ${cut:+max,suffix,string}
- ${cutscr:+max,suffix,string}
With the "+" before max, WeeChat ensures there are at most "max" chars in
output, including the length of suffix string.
2017-04-24 22:37:49 +02:00
Sébastien Helleu
94355e2e38
core: ensure length is not negative in function string_strndup
2017-04-22 15:15:54 +02:00
Sébastien Helleu
c652598ad7
api: fix memory leak in function string_dyn_free()
...
Bug was introduced by commit af138840b3 .
2017-04-02 08:39:29 +02:00
Sébastien Helleu
af138840b3
api: return pointer to string in function string_dyn_free() if argument "free_string" is 0
2017-04-01 12:04:28 +02:00
Sébastien Helleu
f99c866f35
core: add cut of string with max chars displayed in evaluation of expressions
...
The syntax is: ${cutscr:max,suffix,string}.
The string is cut after max chars displayed on screen. If the string is cut,
the optional suffix is added after.
2017-03-27 21:14:51 +02:00
Sébastien Helleu
9a8ec36cbd
core: add cut of string in evaluation of expressions
...
The syntax is: ${cut:max,suffix,string}.
The string is cut after max chars. If the string is cut, the optional suffix is
added after.
2017-03-25 14:19:48 +01:00
Sébastien Helleu
83117f8d2a
core: add ternary operator (condition) in evaluation of expressions
2017-03-25 14:18:19 +01:00
Sébastien Helleu
07d16903f3
api: add dynamic string functions (string_dyn_*)
...
New functions:
- string_dyn_alloc
- string_dyn_copy
- string_dyn_concat
- string_dyn_free
2017-03-25 14:18:19 +01:00
Sébastien Helleu
0d059add9a
core: check that pointers received in arguments are not NULL in "free" functions
...
Functions:
- hdata_free
- infolist_var_free
- infolist_item_free
- infolist_free
- string_shared_free
- gui_window_objects_free
- gui_color_free
- gui_completion_free
- gui_filter_free
- gui_history_buffer_free
- gui_hotlist_free
- gui_key_free
- gui_lines_free
- gui_line_tags_free
- gui_line_free
- gui_window_tree_free
- gui_window_scroll_free
2017-03-25 14:01:50 +01:00
Sébastien Helleu
705d86e684
core: update copyright dates
2017-01-01 11:32:04 +01:00
Simmo Saan
bb22f2486b
api: fix string_expand_home SIGSEGV when HOME environment variable unset
2016-10-20 23:24:50 +03:00
Sébastien Helleu
54841f6294
api: fix return of function string_match() when there are multiple masks in the string (issue #812 )
...
Some tests are added as well to test the multiple masks in the string.
2016-10-02 08:58:19 +02:00
Sébastien Helleu
eb86def400
core: rename function string_iconv_fprintf to string_fprintf
2016-07-09 18:28:03 +02:00
Wojciech Kwolek
a44bcaf080
core: fix the hardcoded separator in string_split_command
2016-05-08 12:14:17 +02:00
Sébastien Helleu
78db8293f6
core: fix typo in a comment
2016-02-18 18:25:56 +01:00
Sébastien Helleu
78aea5df6c
core: fix typo in a comment
2016-01-31 08:35:44 +01:00
Sébastien Helleu
cd23a5fa92
doc: add an example in function string_split (plugin API reference)
2016-01-24 08:03:55 +01:00
Sébastien Helleu
d6af8c312f
core: fix number of arguments returned by string_split
...
When keep_eol is 2 and separators are found at the end of string,
the function returned argc + 1 instead of argc.
2016-01-23 10:32:56 +01:00
Sébastien Helleu
3330724574
core: update copyright dates
2016-01-01 11:09:53 +01:00
Sébastien Helleu
57b6e320d3
core: fix execution of empty command name
...
The strings "/" and "/ " are not considered as valid commands any more.
2015-12-31 19:07:14 +01:00
Sébastien Helleu
41cb1bf635
api: fix handle of invalid escape in function string_convert_escaped_chars()
...
And a new test is now checking that "\" returns "".
2015-08-24 11:05:31 +02:00
Sébastien Helleu
951d1f91a4
api: add function string_hex_dump()
2015-08-22 09:30:08 +02:00
Sébastien Helleu
46a9d17ac3
api: add argument "length" in function utf8_is_valid()
2015-08-18 07:36:48 +02:00
Sébastien Helleu
4ecd8a505f
api: fix type of value returned by functions utf8_prev_char, utf8_next_char and utf8_add_offset
2015-07-04 08:39:55 +02:00
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
b13db0305d
api: fix type of value returned by function strcasestr
2015-07-03 19:45:51 +02:00
Sébastien Helleu
2bd2d74a07
api: add function string_eval_path_home()
2015-06-24 07:54:42 +02:00
Sébastien Helleu
71dd64678c
core: add comments after some #endif
2015-04-30 21:15:30 +02:00
Sébastien Helleu
b2a68af077
core: add options weechat.look.word_chars_{highlight|input} ( closes #55 , task #9459 )
2015-04-11 18:53:44 +02:00
Sébastien Helleu
a020c28ea6
core: update copyright dates
2015-01-01 09:23:23 +01:00
Sébastien Helleu
b8b5cd26bc
core: remove extra spaces in a comment
2014-10-12 12:02:41 +02:00
Sébastien Helleu
08d2b9aaeb
core: check that data is not NULL in function string_iconv_fprintf
2014-09-28 08:20:08 +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
Andrew Potter
62d891aea9
core: callback_free_key shouldn't point to already free'd value
2014-08-11 22:51:20 +02:00
Sébastien Helleu
4faa227a2d
core: check that callback is not NULL in function string_replace_with_callback
2014-08-11 07:47:55 +02:00
Sébastien Helleu
5597c93b64
core: check that regex is not NULL in function string_replace_regex
2014-08-08 07:33:37 +02:00
Sébastien Helleu
e7b604c97e
core: fix example in comment of function string_replace_regex
2014-08-07 07:48:15 +02:00
Sébastien Helleu
cf3e0ccbfd
core: fix result of hash function (in hashtables) on 32-bit systems
2014-08-02 16:53:12 +02:00
Sébastien Helleu
8a93906beb
api: fix function string_decode_base64
...
The result of function was sometimes wrong, for example base64 decoding of
"YWJj" was returning "ab" instead of "abc".
2014-08-02 16:52:17 +02:00
Sébastien Helleu
d046315e8b
api: fix function string_format_size on 32-bit systems
2014-08-02 11:44:15 +02:00
Sébastien Helleu
d2dc05b01e
core: check that from/to arguments are not NULL in base16/64 functions
2014-07-30 07:44:25 +02:00
Sébastien Helleu
3ffbb85cb9
core: check that string is not NULL in function string_input_for_buffer
2014-07-28 08:27:16 +02:00
Sébastien Helleu
12c8cd4988
core: check that string is not NULL in function string_iconv
2014-07-27 08:34:34 +02:00
Sébastien Helleu
0693ffb82b
core: fix compilation warning on GNU/Hurd about unsigned long numbers
2014-07-25 22:23:46 +02:00
Sébastien Helleu
db01880bd1
core: add comments in translations for file size units
2014-07-25 20:40:38 +02:00
Sébastien Helleu
f227e9ec3e
core: add terabyte unit for size displayed
2014-07-25 07:57:48 +02:00
Sébastien Helleu
95011c82e0
core: return only -1, 0 or 1 in string comparison functions
2014-07-05 11:38:44 +02:00
Sébastien Helleu
e0e3f9fdee
core: check that regex is not NULL in function string_regcomp
2014-07-05 10:17:28 +02:00
Sébastien Helleu
afa81c4594
core: check that regex is not NULL in function string_regex_flags
2014-07-05 10:15:29 +02:00