diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/plugin.c | 1 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 7deb32cc6..3366f428b 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -602,6 +602,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv) new_plugin->gettext = &plugin_api_gettext; new_plugin->ngettext = &plugin_api_ngettext; new_plugin->strndup = &string_strndup; + new_plugin->string_cut = &string_cut; new_plugin->string_tolower = &string_tolower; new_plugin->string_toupper = &string_toupper; new_plugin->strcasecmp = &string_strcasecmp; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index b509e952e..5802f2646 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 "20210703-01" +#define WEECHAT_PLUGIN_API_VERSION "20210704-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -285,6 +285,8 @@ struct t_weechat_plugin const char *(*gettext) (const char *string); const char *(*ngettext) (const char *single, const char *plural, int count); char *(*strndup) (const char *string, int length); + char *(*string_cut) (const char *string, int length, int count_suffix, + int screen, const char *cut_suffix); void (*string_tolower) (char *string); void (*string_toupper) (char *string); int (*strcasecmp) (const char *string1, const char *string2); @@ -1192,6 +1194,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); (weechat_plugin->ngettext)(single, plural, number) #define weechat_strndup(__string, __length) \ (weechat_plugin->strndup)(__string, __length) +#define weechat_string_cut(__string, __length, __count_suffix, \ + __screen, __cut_suffix) \ + (weechat_plugin->string_cut)(__string, __length, __count_suffix, \ + __screen, __cut_suffix) #define weechat_string_tolower(__string) \ (weechat_plugin->string_tolower)(__string) #define weechat_string_toupper(__string) \ |