diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-24 17:33:22 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-24 17:33:22 +0100 |
commit | a67556907d739bbe6db5110e46d581165fd41c64 (patch) | |
tree | 2f90c27b4685f25235560f6e1c66543a63075bb0 /src/plugins | |
parent | 083032972dc75ffde841ac77dce4d49093c9ead7 (diff) | |
download | weechat-a67556907d739bbe6db5110e46d581165fd41c64.zip |
api: rename char comparison functions "utf8_char*" to "string_char*"
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugin.c | 4 | ||||
-rw-r--r-- | src/plugins/trigger/trigger.c | 2 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index b9b7584fb..6013c20ec 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -605,6 +605,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv) new_plugin->string_cut = &string_cut; new_plugin->string_tolower = &string_tolower; new_plugin->string_toupper = &string_toupper; + new_plugin->string_charcmp = &string_charcmp; + new_plugin->string_charcasecmp = &string_charcasecmp; new_plugin->strcasecmp = &string_strcasecmp; new_plugin->strcasecmp_range = &string_strcasecmp_range; new_plugin->strncasecmp = &string_strncasecmp; @@ -658,8 +660,6 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv) new_plugin->utf8_strlen = &utf8_strlen; new_plugin->utf8_strnlen = &utf8_strnlen; new_plugin->utf8_strlen_screen = &utf8_strlen_screen; - new_plugin->utf8_charcmp = &utf8_charcmp; - new_plugin->utf8_charcasecmp = &utf8_charcasecmp; new_plugin->utf8_char_size_screen = &utf8_char_size_screen; new_plugin->utf8_add_offset = &utf8_add_offset; new_plugin->utf8_real_pos = &utf8_real_pos; diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index 43518c291..7d3895217 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -701,7 +701,7 @@ trigger_regex_split (const char *str_regex, /* search the delimiter (which can be more than one char) */ pos = weechat_utf8_next_char (ptr_regex); - while (pos[0] && (weechat_utf8_charcmp (ptr_regex, pos) == 0)) + while (pos[0] && (weechat_string_charcmp (ptr_regex, pos) == 0)) { pos = weechat_utf8_next_char (pos); } diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 229c3aba8..dc1439d50 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -68,7 +68,7 @@ struct timeval; * please change the date with current one; for a second change at same * date, increment the 01, otherwise please keep 01. */ -#define WEECHAT_PLUGIN_API_VERSION "20221218-01" +#define WEECHAT_PLUGIN_API_VERSION "20221224-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -289,6 +289,8 @@ struct t_weechat_plugin int screen, const char *cut_suffix); char *(*string_tolower) (const char *string); char *(*string_toupper) (const char *string); + int (*string_charcmp) (const char *string1, const char *string2); + int (*string_charcasecmp) (const char *string1, const char *string2); int (*strcasecmp) (const char *string1, const char *string2); int (*strcasecmp_range) (const char *string1, const char *string2, int range); @@ -372,8 +374,6 @@ struct t_weechat_plugin int (*utf8_strlen) (const char *string); int (*utf8_strnlen) (const char *string, int bytes); int (*utf8_strlen_screen) (const char *string); - int (*utf8_charcmp) (const char *string1, const char *string2); - int (*utf8_charcasecmp) (const char *string1, const char *string2); int (*utf8_char_size_screen) (const char *string); const char *(*utf8_add_offset) (const char *string, int offset); int (*utf8_real_pos) (const char *string, int pos); @@ -1229,6 +1229,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); (weechat_plugin->string_tolower)(__string) #define weechat_string_toupper(__string) \ (weechat_plugin->string_toupper)(__string) +#define weechat_string_charcmp(__string1, __string2) \ + (weechat_plugin->string_charcmp)(__string1, __string2) +#define weechat_string_charcasecmp(__string1, __string2) \ + (weechat_plugin->string_charcasecmp)(__string1, __string2) #define weechat_strcasecmp(__string1, __string2) \ (weechat_plugin->strcasecmp)(__string1, __string2) #define weechat_strcasecmp_range(__string1, __string2, __range) \ @@ -1365,10 +1369,6 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); (weechat_plugin->utf8_strnlen)(__string, __bytes) #define weechat_utf8_strlen_screen(__string) \ (weechat_plugin->utf8_strlen_screen)(__string) -#define weechat_utf8_charcmp(__string1, __string2) \ - (weechat_plugin->utf8_charcmp)(__string1, __string2) -#define weechat_utf8_charcasecmp(__string1, __string2) \ - (weechat_plugin->utf8_charcasecmp)(__string1, __string2) #define weechat_utf8_char_size_screen(__string) \ (weechat_plugin->utf8_char_size_screen)(__string) #define weechat_utf8_add_offset(__string, __offset) \ |