Commit Graph

178 Commits (1ef7a55e727f6936ee8aee702d8e2daa4c767d52)

Author SHA1 Message Date
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
Sébastien Helleu d936880392 core: add note about result that must be freed in function string_mask_to_regex 2014-07-05 10:13:46 +02:00
Sébastien Helleu e75fef58c4 core: check that "chars" argument is not NULL in function string_strip 2014-07-05 10:05:35 +02:00
Sébastien Helleu 60c7696353 core: check that string is not NULL in function string_convert_escaped_chars 2014-07-05 10:03:15 +02:00
Sébastien Helleu 8fc8cbc129 core: add comment with return value of function string_strcasestr 2014-07-05 09:51:26 +02:00
Sébastien Helleu e702722842 core: check that string is not NULL in function string_strndup 2014-07-04 07:41:20 +02:00
Sébastien Helleu 34723d2acc api: allow wildcard "*" inside the mask in function string_match 2014-04-12 23:07:06 +02:00
Sebastien Helleu 3a6313c4b5 api: add support of nested variables in function string_eval_expression and command /eval (closes #35) 2014-03-20 15:57:46 +01:00
Sebastien Helleu 85abcaedaa Merge branch 'exec' 2014-03-15 12:28:07 +01:00
Sebastien Helleu eb21248ae7 core: fix highlight problem with "(?-i)" and upper case letters in option weechat.look.highlight 2014-03-13 14:14:10 +01:00
Sebastien Helleu cd65198c71 api: add callback in function string_replace_regex 2014-03-13 10:59:58 +01:00
Sebastien Helleu bcf0a94bf4 core: comment unneeded assignment in function string_split_shell (make C static analyzer happy) 2014-02-22 12:50:38 +01:00
Sebastien Helleu 913de0c29b core: fix uninitialized value in function string_decode_base64 2014-02-22 12:46:57 +01:00
Sebastien Helleu 9ce8fc7068 core: fix memory leak and use of invalid pointer in split of string (in case of insufficient memory) 2014-02-22 12:28:19 +01:00
Sebastien Helleu 360f900d92 core: move function string_replace before string_replace_regex 2014-02-15 12:59:05 +01:00
Sebastien Helleu fa2600f496 doc: add function string_split_shell in plugin API reference 2014-02-14 11:15:09 +01:00
Sebastien Helleu 0bfacb5592 core: change text in comment of function string_replace_regex 2014-02-14 10:54:38 +01:00
Sebastien Helleu 7c0d9fe850 core: improve the string_replace_regex function (add reference char, change syntax for match refs)
The reference char is now an argument for the function.
The references are now $0 .. $99 and $+ was added (last match, with
highest number).
The syntax to replace a match with one char is now: $.cN or $.c+
(for example: "$.*3").
2014-02-09 15:14:07 +01:00
Sebastien Helleu a03653273c core: replace "regex_t *" by "void *" in string functions (fix ruby compilation error with autotools) 2014-02-09 12:55:40 +01:00
Sebastien Helleu 6bc7c456d7 core: add argument "num_items" in function string_split_shell 2014-02-09 12:55:40 +01:00
Sebastien Helleu 30942f7f62 trigger: add trigger plugin 2014-02-09 12:55:40 +01:00
Sebastien Helleu 97cede06b5 core: add support of escaped unicode chars in commands /print and "/input insert" 2014-01-24 12:53:23 +01:00
Sebastien Helleu 4da8fcf34d core: add command /print 2014-01-19 23:29:00 +01:00
Sebastien Helleu 31e1b28c90 core: fix typo in /help weechat.look.highlight_regex 2014-01-13 16:09:01 +01:00
Sebastien Helleu 892aa79fb5 core: update copyright dates 2014-01-01 00:14:12 +01:00
Sebastien Helleu 0409faee7f Merge branch 'shared-strings' 2013-09-02 15:24:20 +02:00
Sebastien Helleu cc1523b654 core: add commment in function string_shared_get (returned value must not be changed) 2013-08-17 17:44:10 +02:00
Sebastien Helleu 7e0ae094cc core: add comment with return value of function string_regcomp 2013-08-12 10:51:49 +02:00
Sebastien Helleu c46d7e44f1 core: add support of shared strings in split of strings (add functions string_split_shared and string_free_split_shared) 2013-08-10 18:20:49 +02:00
Sebastien Helleu 49aacc853c core: add shared strings to reduce memory usage
Shared strings are stored in a hashtable with pointer for keys (values are not
used).

The key has a reference count + the string.
The initial reference count is set to 1 and is incremented each time the same
string is asked.

When removing a shared string, the reference count is decremented.
If it becomes 0, then the shared string is removed from the hashtable (and then
the string is really destroyed).
2013-08-10 18:20:49 +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 149c77decd core: fix typos in many comments and some strings 2013-03-17 12:55:20 +01:00
Sebastien Helleu afc1dd4f6b api: fix bug in string_match when mask begins and ends with "*"
The bug was string_match returning 0 (instead of 1) if mask begins and ends with
"*" and if string and mask have same length (except both "*") with same content:

string_match("abc",  "*abc*", 0) == 0  // BUG: it should return 1
string_match("abcd", "*abc*", 0) == 1  // OK
2013-03-11 18:09:33 +01:00
Sebastien Helleu b84f6b5a1b api: fix function string_mask_to_regex: escape all special chars used in regex (bug #38398) 2013-02-26 21:12:25 +01:00
Sebastien Helleu 0ad8866d6b core: fix infinite loop when a regex gives an empty match (bug #38112) 2013-01-18 09:03:57 +01:00
Sebastien Helleu f97598b4aa core: update copyright dates 2013-01-01 13:12:49 +01:00
Nils Görs 67a111f7f2 core: fix detection of command in input: a single command char is considered as a command (API function "string_input_for_bufer") 2012-12-25 10:54:51 +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 efb795c74f core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) 2012-11-18 10:38:30 +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
Sebastien Helleu 496c7d3e18 core: fix expand of path "~" to home of user in function string_expand_home ("~/xxx" was ok, but not "~") 2012-02-25 08:42:00 +01:00
Sebastien Helleu 863a9d37da core: fix compilation warning under Cygwin 2012-02-05 11:25:38 +01:00
Sebastien Helleu 9347bae962 api: replace type "regex_t *" by "void *" in function string_regcomp (fix ruby compilation with autotools) 2012-01-26 18:18:20 +01:00
Sebastien Helleu 5f6df8021b core: add support of flags in regular expressions and highlight options, add irc options to customize/disable default nick highlight (task #11128)
New functions in C plugin API:
- string_regex_flags
- string_regcomp

New irc options:
- irc.look.highlight_server
- irc.look.highlight_channel
- irc.look.highlight_pv

Regex flags are supported in following options/commands:
- option weechat.look.highlight
- option weechat.look.highlight_regex
- options irc.look.highlight_{server|channel|pv}
- option relay.network.allowed_ips
- core command /filter
- irc command /list
- irc command /ignore
- rmodifier command /rmodifier
2012-01-22 13:48:42 +01:00
Sebastien Helleu 47e4a03be6 core: update copyright dates 2012-01-08 18:59:50 +01:00
Simon Kuhnle 07ed065ab7 core: fix compilation under OpenBSD 5.0 (lib utf8 not needed any more) (bug #34727) 2011-11-12 16:57:49 +01:00
Sebastien Helleu 491412b314 api: add new functions strcasecmp_range and strncasecmp_range 2011-11-12 10:37:44 +01:00
Sebastien Helleu dfdf42e27b core: remove unneeded whitespace 2011-10-26 20:37:03 +02:00
Sebastien Helleu c161d704f7 core: use value 2 of keep_eol in function string_split to keep separators at end of string 2011-10-16 20:12:55 +02:00
Sebastien Helleu f843f904bc core: fix bugs with calls to realloc 2011-08-28 15:25:30 +02:00
Sebastien Helleu ebf72c7eda core: use dynamic buffer size for calls to vsnprintf 2011-08-26 09:55:55 +02:00
Sebastien Helleu aa948c76a3 core: remove some compilation warnings under Cygwin 2011-08-18 11:09:46 +02:00
Sebastien Helleu e0781f0390 core: add mouse support (task #5435), free cursor movement, hook_focus, fix bugs with key "^" (bug #32072, bug #21381), fix bugs with bar windows, completion and /buffer
New features and bugs fixed:
- mouse support: new command /mouse, new option weechat.look.mouse, new key context "mouse"
- free movement of cursor: new command /cursor, new key context "cursor"
- new hook_focus (used by cursor and mouse)
- info "cursor_mode"
- bugs fixed with key "^"
- allow plugin name in /buffer name
- fix bugs with bar windows: do not create bar windows for hidden bars
- fix completion bug when two words for completion are equal but with different case
- automatic scroll direction in /bar scroll (x/y is now optional)
2011-07-26 18:50:29 +02:00
Sebastien Helleu d24f6e9e17 Update copyright dates 2011-01-01 18:06:29 +01:00
Sebastien Helleu ce269387a5 Fix infinite loop in API function string_has_highlight_regex if regex is empty 2010-12-09 23:09:49 +01:00
Sebastien Helleu e92079cfe9 Add new option weechat.look.highlight_regex and function string_has_highlight_regex in plugin API (task #10321) 2010-11-25 21:28:14 +01:00
Sebastien Helleu 11b3dd2874 Use type "unsigned long long" for API function string_format_size 2010-11-10 16:34:56 +01:00
Sebastien Helleu ac6b299e8b Remove dead assignments 2010-10-31 18:23:16 +01:00
Sebastien Helleu 712623547f Add new functions in plugin API (hashtable_get_string, hook_info_hashtable, info_get_hashtable), add IRC info_hashtable "irc_parse_message"
Note: tcl >= 8.5 is now required (for tcl plugin).
2010-08-27 15:59:06 +02:00
Sebastien Helleu 6562d676fe Update licenses and copyrights, add missing author names in sources 2010-06-22 19:46:28 +02:00
Sebastien Helleu 4616ca981e Add function "string_expand_home" in plugin API, fix bug with replacement of home in paths 2010-05-02 18:21:58 +02:00
Sebastien Helleu ba115ce113 Replace "joker" by "wildcard" 2010-04-18 23:52:32 +02:00
Sebastien Helleu 31bfcf96c7 Reformat and add comments for description of C sources 2010-04-08 18:15:00 +02:00
Sebastien Helleu b9e65ec63d Fix bug with writing of configuration files when disk is full (bug #29331) 2010-03-26 19:01:25 +01:00
Sebastien Helleu 2801b8437c Reformat multi-line comments 2010-03-19 23:33:14 +01:00
Sebastien Helleu 0543b0ccc7 Add new option weechat.look.command_chars, add functions string_is_command_char and string_input_for_buffer in plugin and script API 2010-03-02 17:34:49 +01:00
Sebastien Helleu ce1b23311c Add function "string_decode_base64" in plugin API 2010-02-16 16:57:22 +01:00
Sebastien Helleu 341551f2f2 Add SASL authentication in IRC plugin (task #8829), add function "string_encode_base64" in plugin API, fix bug with base64 encoding
New options for IRC servers:
- sasl_mechanism (only "plain" for now)
- sasl_username
- sasl_password
2010-02-15 11:51:44 +01:00
Sebastien Helleu eb56a98fc8 Remove evil tabs in sources 2010-01-24 10:47:53 +01:00
Sebastien Helleu 2133eb30ff Update copyright dates 2010-01-03 19:31:55 +01:00
Sebastien Helleu 2f7a5a4147 Rename function string_explode to string_split 2009-06-28 19:49:32 +02:00
Sebastien Helleu 8a783825de Fix completion with non-latin nicks (bug #18993) 2009-05-09 13:03:44 +02:00
Sebastien Helleu e3d2728571 Fix typo: splited/splitted -> split 2009-04-24 17:24:56 +02:00
Sebastien Helleu 9679cd4fbf Fix compilation problem on FreeBSD: replace call to wcscasecmp() by towlower() 2009-04-15 11:33:45 +02:00
Sebastien Helleu 28e5913ad2 Fix text search in buffer with some utf-8 chars (bug #25649) 2009-04-14 14:12:28 +02:00
Sebastien Helleu 30a50c6999 Fix bug with /ignore when mask begins with "|" (bug #26037) 2009-03-28 19:04:14 +01:00
Sebastien Helleu a394ed5d6f Add "replacement" argument for string_remove_color in plugin API 2009-03-18 18:02:48 +01:00
Sebastien Helleu 426ab803cb Test return code of some malloc/strdup 2009-02-23 13:45:30 +01:00