api: add info "weechat_headless"

v2.8-utf8proc
Matthew Horan 2019-12-13 10:55:30 -05:00 committed by Sébastien Helleu
parent 5ae0485404
commit f966329862
7 changed files with 36 additions and 0 deletions

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | WeeChat Verzeichnis | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | WeeChat "lib" Verzeichnis | -
| weechat | weechat_localedir | "lokales" Verzeichnis von WeeChat | -

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | WeeChat directory | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | WeeChat "lib" directory | -
| weechat | weechat_localedir | WeeChat "locale" directory | -

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | répertoire de WeeChat | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | répertoire "lib" de WeeChat | -
| weechat | weechat_localedir | répertoire "locale" de WeeChat | -

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | directory WeeChat | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | directory "lib" di WeeChat | -
| weechat | weechat_localedir | directory "locale" di WeeChat | -

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | WeeChat ディレクトリ | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | WeeChat "lib" ディレクトリ | -
| weechat | weechat_localedir | WeeChat "locale" ディレクトリ | -

View File

@ -130,6 +130,8 @@
| weechat | weechat_dir | katalog WeeChat | -
| weechat | weechat_headless | 1 if WeeChat is running headless | -
| weechat | weechat_libdir | katalog "lib" WeeChata | -
| weechat | weechat_localedir | katalog "locale" WeeChata | -

View File

@ -315,6 +315,27 @@ plugin_api_info_weechat_upgrading_cb (const void *pointer, void *data,
return strdup (value);
}
/*
* Returns WeeChat info "weechat_headless".
*/
char *
plugin_api_info_weechat_headless_cb (const void *pointer, void *data,
const char *info_name,
const char *arguments)
{
char value[32];
/* make C compiler happy */
(void) pointer;
(void) data;
(void) info_name;
(void) arguments;
snprintf (value, sizeof (value), "%d", weechat_headless);
return strdup (value);
}
/*
* Returns WeeChat info "charset_terminal".
*/
@ -1736,6 +1757,9 @@ plugin_api_info_init ()
hook_info (NULL, "weechat_upgrading",
N_("1 if WeeChat is upgrading (command `/upgrade`)"),
NULL, &plugin_api_info_weechat_upgrading_cb, NULL, NULL);
hook_info (NULL, "weechat_headless",
N_("1 if WeeChat is running headless"),
NULL, &plugin_api_info_weechat_headless_cb, NULL, NULL);
hook_info (NULL, "charset_terminal",
N_("terminal charset"),
NULL, &plugin_api_info_charset_terminal_cb, NULL, NULL);