mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 00:33:13 +02:00
api: add functions string_strcmp and string_strncmp
This commit is contained in:
@@ -607,6 +607,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
|
||||
new_plugin->string_toupper = &string_toupper;
|
||||
new_plugin->string_charcmp = &string_charcmp;
|
||||
new_plugin->string_charcasecmp = &string_charcasecmp;
|
||||
new_plugin->strcmp = &string_strcmp;
|
||||
new_plugin->strncmp = &string_strncmp;
|
||||
new_plugin->strcasecmp = &string_strcasecmp;
|
||||
new_plugin->strcasecmp_range = &string_strcasecmp_range;
|
||||
new_plugin->strncasecmp = &string_strncasecmp;
|
||||
|
||||
@@ -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 "20221224-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20221224-02"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -291,6 +291,8 @@ struct t_weechat_plugin
|
||||
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 (*strcmp) (const char *string1, const char *string2);
|
||||
int (*strncmp) (const char *string1, const char *string2, int max);
|
||||
int (*strcasecmp) (const char *string1, const char *string2);
|
||||
int (*strcasecmp_range) (const char *string1, const char *string2,
|
||||
int range);
|
||||
@@ -1233,6 +1235,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
|
||||
(weechat_plugin->string_charcmp)(__string1, __string2)
|
||||
#define weechat_string_charcasecmp(__string1, __string2) \
|
||||
(weechat_plugin->string_charcasecmp)(__string1, __string2)
|
||||
#define weechat_strcmp(__string1, __string2) \
|
||||
(weechat_plugin->strcmp)(__string1, __string2)
|
||||
#define weechat_strncmp(__string1, __string2, __max) \
|
||||
(weechat_plugin->strncmp)(__string1, __string2, __max)
|
||||
#define weechat_strcasecmp(__string1, __string2) \
|
||||
(weechat_plugin->strcasecmp)(__string1, __string2)
|
||||
#define weechat_strcasecmp_range(__string1, __string2, __range) \
|
||||
|
||||
Reference in New Issue
Block a user