mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
api: add function util_parse_time (issue #649)
This commit is contained in:
@@ -695,6 +695,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
|
||||
new_plugin->util_timeval_add = &util_timeval_add;
|
||||
new_plugin->util_get_time_string = &util_get_time_string;
|
||||
new_plugin->util_strftimeval = &util_strftimeval;
|
||||
new_plugin->util_parse_time = &util_parse_time;
|
||||
new_plugin->util_version_number = &util_version_number;
|
||||
|
||||
new_plugin->list_new = &weelist_new;
|
||||
|
||||
@@ -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 "20231226-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20240105-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -439,6 +439,7 @@ struct t_weechat_plugin
|
||||
const char *(*util_get_time_string) (const time_t *date);
|
||||
int (*util_strftimeval) (char *string, int max, const char *format,
|
||||
struct timeval *tv);
|
||||
int (*util_parse_time) (const char *datetime, struct timeval *tv);
|
||||
int (*util_version_number) (const char *version);
|
||||
|
||||
/* sorted lists */
|
||||
@@ -1499,6 +1500,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
|
||||
(weechat_plugin->util_get_time_string)(__date)
|
||||
#define weechat_util_strftimeval(__string, __max, __format, __tv) \
|
||||
(weechat_plugin->util_strftimeval)(__string, __max, __format, __tv)
|
||||
#define weechat_util_parse_time(__datetime, __tv) \
|
||||
(weechat_plugin->util_parse_time)(__datetime, __tv)
|
||||
#define weechat_util_version_number(__version) \
|
||||
(weechat_plugin->util_version_number)(__version)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user