1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

api: add time in info "date" (WeeChat compilation date/time) (closes #1138)

This commit is contained in:
Sébastien Helleu
2018-01-20 08:40:12 +01:00
parent 3a5f97c7a8
commit e9b6d73b0f
23 changed files with 62 additions and 36 deletions
+13
View File
@@ -134,3 +134,16 @@ version_get_compilation_time ()
{
return __TIME__;
}
/*
* Returns date/time of WeeChat compilation.
*
* Example:
* Dec 16 2012 18:10:22
*/
const char *
version_get_compilation_date_time ()
{
return __DATE__ " " __TIME__;
}
+1
View File
@@ -27,5 +27,6 @@ extern const char *version_get_git ();
extern const char *version_get_version_with_git ();
extern const char *version_get_compilation_date ();
extern const char *version_get_compilation_time ();
extern const char *version_get_compilation_date_time ();
#endif /* WEECHAT_VERSION_H */
+2 -2
View File
@@ -388,7 +388,7 @@ plugin_api_info_date_cb (const void *pointer, void *data,
(void) info_name;
(void) arguments;
return version_get_compilation_date ();
return version_get_compilation_date_time ();
}
/*
@@ -1905,7 +1905,7 @@ plugin_api_init ()
"release)"),
NULL, &plugin_api_info_version_git_cb, NULL, NULL);
hook_info (NULL, "date",
N_("WeeChat compilation date"),
N_("WeeChat compilation date/time"),
NULL, &plugin_api_info_date_cb, NULL, NULL);
hook_info (NULL, "pid",
N_("WeeChat PID (process ID)"),