1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-16 08:04:46 +02:00

Compare commits

...

18 Commits

Author SHA1 Message Date
Sébastien Helleu f9c3d0ae0a Version 4.0.7 2023-12-03 19:05:52 +01:00
Sébastien Helleu 83749f491c irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued 2023-11-26 18:56:33 +01:00
Sébastien Helleu d79342dafd tests: add tests on IRC message 337 2023-11-07 21:59:52 +01:00
Sébastien Helleu 999ba00ac6 irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time") 2023-11-07 21:51:55 +01:00
Sébastien Helleu df7a428454 core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached 2023-11-04 17:02:23 +01:00
Sébastien Helleu 1d6eb273c6 relay: close properly connection with the IRC client in case of server disconnection (issue #2038) 2023-11-04 09:07:24 +01:00
Sébastien Helleu ae93fa1fef core: remove incorrect warning when binding keys F10 to F20 (issue #2039) 2023-11-04 08:38:37 +01:00
Sébastien Helleu 7fabd8068f core, plugins: set error to NULL before calling strtol()
This is not strictly necessary, just in case the function strtol() doesn't
update the pointer.
2023-11-01 14:22:32 +01:00
Sébastien Helleu a48dd9d481 core: fix memory leak when config version is invalid or not supported 2023-10-30 23:23:58 +01:00
Sébastien Helleu 2ee71c7699 core: check that buffer is not NULL in function gui_chat_printf_date_tags_internal 2023-10-30 23:23:58 +01:00
Sébastien Helleu c7cf41c357 core: fix use NULL pointer when a config file has no options 2023-10-30 23:23:57 +01:00
Sébastien Helleu 7c21c6b993 logger: remove dead assignment 2023-10-30 23:23:57 +01:00
Sébastien Helleu 563654901c core: fix crash when "config_version" is present in a configuration file without a value 2023-10-30 23:23:57 +01:00
Sébastien Helleu 517c04ae65 core: display an error on startup if environment variable "HOME" is not set 2023-10-30 23:23:57 +01:00
Sébastien Helleu a317d0823a tests: check that environment variable "HOME" is set before using it 2023-10-30 23:07:41 +01:00
Sébastien Helleu a399d3f68c ruby: fix use of NULL variable when displaying exception 2023-10-30 23:07:20 +01:00
Sébastien Helleu b0e4e20205 Version 4.0.7-dev 2023-10-30 23:05:02 +01:00
Sébastien Helleu 5df21f38f3 ci: uninstall php8.1-imagick before build (issue #2009)
When php imagick is installed and when WeeChat is compiled with gcc, there's a
crash when the php plugin is loaded.  Newer versions of gcc should fix the
issue, but as in CI we can't easily use them, uninstalling imagick avoids the
crash.
2023-10-28 09:20:08 +02:00
42 changed files with 215 additions and 35 deletions
+2
View File
@@ -33,6 +33,8 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
sudo apt-get --yes purge php8.1-imagick
sudo -H pip3 install --ignore-installed msgcheck
- name: Check gettext files
+15
View File
@@ -10,6 +10,21 @@ This document lists all the changes for each version. +
For a list of important changes that require manual actions, please look at release notes.
[[v4.0.7]]
== Version 4.0.7 (2023-12-03)
Bug fixes::
* core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached
* core: remove incorrect warning when binding keys kbd:[F10] to kbd:[F20] (issue #2039)
* core: fix memory leak when config version is invalid or not supported
* core: fix crash when "config_version" is present in a configuration file without a value
* core: display an error on startup if environment variable "HOME" is not set
* irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued
* irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time")
* relay: close properly connection with the IRC client in case of server disconnection (issue #2038)
* ruby: fix use of NULL variable when displaying exception
[[v4.0.6]]
== Version 4.0.6 (2023-10-26)
+5
View File
@@ -11,6 +11,11 @@ It is recommended to read it when upgrading to a new stable version. +
For a complete list of changes, please look at ChangeLog.
[[v4.0.7]]
== Version 4.0.7 (2023-12-03)
No release notes.
[[v4.0.6]]
== Version 4.0.6 (2023-10-26)
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4538,6 +4538,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: nemohu vytvořit adresář pro logy (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Proměnná prostředí \"%s\" není definována"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Chyba: domovský adresář (%s) není adresářem\n"
+6 -1
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5709,6 +5709,11 @@ msgstr ""
"Fehler: es kann kein temporäres Heimatverzeichnis angelegt werden (mit "
"Befehl: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Umgebungsvariable \"%s\" ist nicht definiert"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Fehler: \"%s\" ist kein Verzeichnis\n"
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5163,6 +5163,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: imposible crear directorio para registros (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variable \"%s\" no definida"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Error: home (%s) no es un directorio\n"
+5 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-10-30 23:23+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5577,6 +5577,9 @@ msgstr ""
"Erreur : impossible de créer le répertoire de base temporaire (en utilisant "
"le modèle : \"%s\")\n"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Erreur : la variable d'environnement \"HOME\" n'est pas définie\n"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erreur : \"%s\" n'est pas un répertoire\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4080,6 +4080,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s nem sikerült a szervert létrehozni\n"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr " . típus: szám\n"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4800,6 +4800,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: impossibile creare la directory per i log (\"%s\")"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variabili"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Errore: home (%s) non è una directory\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5407,6 +5407,11 @@ msgid ""
msgstr ""
"エラー: 一時的なホームディレクリ (テンプレート: \"%s\") を作成できません\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "環境変数 \"%s\" が定義されていません"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "エラー: ホーム (%s) はディレクトリではありません\n"
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -5850,6 +5850,11 @@ msgstr ""
"Błąd: nie można utworzyć tymczasowego katalogu domowego (używając szablonu: "
"\"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Zmienna środowiskowa \"%s\" nie jest zdefiniowana"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Błąd: „%s” nie jest katalogiem\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5437,6 +5437,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registos (\"%s\")"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "A variável de ambiente \"%s\" não está definida"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: a base (%s) não é um diretório\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4807,6 +4807,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Variáveis"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: (%s) não é um diretório\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4108,6 +4108,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s не могу создать сервер \"%s\"\n"
#, fuzzy
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr " . тип: целочисленный\n"
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s домашний каталог (%s) не является директорией\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5504,6 +5504,11 @@ msgstr ""
"Грешка: не може да се креира привремени почетни директоријум (користећи "
"шаблон: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Није дефинисана променљива окружења „%s”"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Грешка: „%s” није директоријум\n"
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5488,6 +5488,11 @@ msgid ""
msgstr ""
"Hata: Geçici bir ev dizini oluşturulamıyor (kullanılan şablon: \"%s\")\n"
#, fuzzy
#| msgid "Environment variable \"%s\" is not defined"
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr "Ortam değişkeni \"%s\" tanımlanmamış"
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Hata: \"%s\" bir dizin değil\n"
+4 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3730,6 +3730,9 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr ""
msgid "Error: environment variable \"HOME\" is not defined\n"
msgstr ""
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr ""
+1
View File
@@ -146,6 +146,7 @@ hook_process_hashtable (struct t_weechat_plugin *plugin,
ptr_value = hashtable_get (options, "buffer_flush");
if (ptr_value && ptr_value[0])
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0]
&& (number >= 1) && (number <= HOOK_PROCESS_BUFFER_SIZE))
+3
View File
@@ -736,6 +736,7 @@ COMMAND_CALLBACK(buffer)
else
{
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
error = NULL;
(void) strtol (argv[i], &error, 10);
clear_number = (error && !error[0]);
}
@@ -971,6 +972,7 @@ COMMAND_CALLBACK(buffer)
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
if (ptr_buffer)
{
error = NULL;
(void) strtol (argv[i], &error, 10);
if (error && !error[0])
{
@@ -1009,6 +1011,7 @@ COMMAND_CALLBACK(buffer)
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
if (ptr_buffer)
{
error = NULL;
(void) strtol (argv[i], &error, 10);
if (error && !error[0])
{
+12
View File
@@ -3155,6 +3155,10 @@ config_file_parse_version (const char *version)
long number;
char *error;
if (!version)
return -1;
error = NULL;
number = strtoll (version, &error, 10);
if (!error || error[0])
return -1;
@@ -3566,6 +3570,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
filename, line_number,
line);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
else
@@ -3583,6 +3591,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
config_file->version_read,
config_file->version);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
}
+16 -5
View File
@@ -440,6 +440,9 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = NULL;
ptr_home = getenv ("HOME");
if (!ptr_home)
goto error_home;
xdg_config_home = getenv ("XDG_CONFIG_HOME");
xdg_data_home = getenv ("XDG_DATA_HOME");
xdg_cache_home = getenv ("XDG_CACHE_HOME");
@@ -460,7 +463,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*config_dir = strdup (path);
if (!*config_dir)
goto error;
goto error_memory;
/* set data dir: $XDG_DATA_HOME/weechat or $HOME/.local/share/weechat */
if (xdg_data_home && xdg_data_home[0])
@@ -478,7 +481,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*data_dir = strdup (path);
if (!*data_dir)
goto error;
goto error_memory;
/* set cache dir: $XDG_CACHE_HOME/weechat or $HOME/.cache/weechat */
if (xdg_cache_home && xdg_cache_home[0])
@@ -495,7 +498,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*cache_dir = strdup (path);
if (!*cache_dir)
goto error;
goto error_memory;
/* set runtime dir: $XDG_RUNTIME_DIR/weechat or same as cache dir */
if (xdg_runtime_dir && xdg_runtime_dir[0])
@@ -510,10 +513,19 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = strdup (*cache_dir);
}
if (!*runtime_dir)
goto error;
goto error_memory;
return 1;
error_home:
string_fprintf (stderr,
_("Error: environment variable \"HOME\" is not defined\n"));
goto error;
error_memory:
string_fprintf (stderr, _("Error: not enough memory\n"));
goto error;
error:
if (*config_dir)
{
@@ -535,7 +547,6 @@ error:
free (*runtime_dir);
*runtime_dir = NULL;
}
string_fprintf (stderr, _("Error: not enough memory\n"));
return 0;
}
+7 -4
View File
@@ -602,10 +602,13 @@ doc_gen_user_options (const char *path, const char *lang)
free (default_value);
}
string_fprintf (
file,
"// end::%s_options[]\n",
old_config->name);
if (old_config)
{
string_fprintf (
file,
"// end::%s_options[]\n",
old_config->name);
}
arraylist_free (list_options);
+11
View File
@@ -413,6 +413,7 @@ eval_string_cut (const char *text, int screen)
if (!tmp)
return strdup ("");
error = NULL;
number = strtol (tmp, &error, 10);
if (!error || error[0] || (number < 0))
{
@@ -453,6 +454,7 @@ eval_string_repeat (const char *text)
if (!tmp)
return strdup ("");
error = NULL;
number = strtol (tmp, &error, 10);
if (!error || error[0] || (number < 0))
{
@@ -538,6 +540,7 @@ eval_string_split (const char *text)
}
else
{
error = NULL;
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
@@ -578,6 +581,7 @@ eval_string_split (const char *text)
}
else if (strncmp (list_flags[i], "max_items=", 10) == 0)
{
error = NULL;
max_items = strtol (list_flags[i] + 10, &error, 10);
if (!error || error[0] || (max_items < 0))
goto end;
@@ -686,6 +690,7 @@ eval_string_split_shell (const char *text)
}
else
{
error = NULL;
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
@@ -766,6 +771,7 @@ eval_string_regex_group (const char *text, struct t_eval_context *eval_context)
}
else
{
error = NULL;
number = strtol (text, &error, 10);
if (!error || error[0])
number = -1;
@@ -897,6 +903,7 @@ eval_string_base_encode (const char *text)
if (!base)
goto end;
error = NULL;
number = strtol (base, &error, 10);
if (!error || error[0])
goto end;
@@ -946,6 +953,7 @@ eval_string_base_decode (const char *text)
if (!base)
goto end;
error = NULL;
number = strtol (base, &error, 10);
if (!error || error[0])
goto end;
@@ -1087,6 +1095,7 @@ eval_string_random (const char *text)
tmp = string_strndup (text, pos - text);
if (!tmp)
goto error;
error = NULL;
min_number = strtoll (tmp, &error, 10);
if (!error || error[0])
{
@@ -1095,6 +1104,7 @@ eval_string_random (const char *text)
}
free (tmp);
error = NULL;
max_number = strtoll (pos + 1, &error, 10);
if (!error || error[0])
goto error;
@@ -2618,6 +2628,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
ptr_value = hashtable_get (options, "debug");
if (ptr_value && ptr_value[0])
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0] && (number >= 1))
{
+1
View File
@@ -3279,6 +3279,7 @@ string_parse_size (const char *size)
if (!str_number)
goto end;
error = NULL;
number = strtoll (str_number, &error, 10);
if (!error || error[0])
goto end;
+4
View File
@@ -2145,6 +2145,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else if (argument[0] == '-')
{
/* move the unread marker N lines towards the first line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number < 0))
{
@@ -2172,6 +2173,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else if (argument[0] == '+')
{
/* move the unread marker N lines towards the last line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number > 0))
{
@@ -2197,6 +2199,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
else
{
/* move the unread marker N lines from the end towards the first line */
error = NULL;
number = strtol (argument, &error, 10);
if (error && !error[0] && (number > 0))
{
@@ -2885,6 +2888,7 @@ gui_buffer_search_by_number_or_name (const char *string)
ptr_buffer = NULL;
error = NULL;
number = strtol (string, &error, 10);
if (error && !error[0])
{
+4
View File
@@ -597,6 +597,9 @@ gui_chat_printf_date_tags_internal (struct t_gui_buffer *buffer,
char *modifier_data, *string, *new_string, *pos_newline;
struct t_gui_line *new_line;
if (!buffer)
return;
new_line = NULL;
string = NULL;
modifier_data = NULL;
@@ -1076,6 +1079,7 @@ gui_chat_hsignal_quote_line_cb (const void *pointer, void *data,
hashtable_get (hashtable, "_chat_line_date") : NULL;
if (date)
{
error = NULL;
number = strtol (date, &error, 10);
if (error && !error[0])
{
+1 -1
View File
@@ -88,7 +88,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string)
free (buffer->last_history->text);
free (buffer->last_history);
buffer->last_history = ptr_history;
buffer->num_history++;
buffer->num_history--;
}
}
}
+2 -2
View File
@@ -75,8 +75,8 @@ char *gui_key_modifier_list[] =
{ "meta-", "ctrl-", "shift-", NULL };
char *gui_key_alias_list[] =
{ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11",
"f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
{ "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9",
"home", "insert", "delete", "end", "backspace", "pgup", "pgdn",
"up", "down", "right", "left", "tab", "return", "comma", "space", NULL };
+3
View File
@@ -62,6 +62,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
ptr_bar_item_line = weechat_hashtable_get (info, "_bar_item_line");
if (!ptr_bar_item_line)
goto end;
error = NULL;
item_line = strtol (ptr_bar_item_line, &error, 10);
if (!error || error[0])
goto end;
@@ -250,9 +251,11 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal,
return WEECHAT_RC_OK;
ptr_buffer = (struct t_gui_buffer *)value;
error = NULL;
number = strtol (ptr_number, &error, 10);
if (!error || error[0])
return WEECHAT_RC_OK;
error = NULL;
number2 = strtol (ptr_number2, &error, 10);
if (!error || error[0])
return WEECHAT_RC_OK;
+2
View File
@@ -625,6 +625,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-bytes");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_bytes = number;
@@ -633,6 +634,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
ptr_value = (const char *)weechat_hashtable_get (values, "max-lines");
if (ptr_value)
{
error = NULL;
number = strtol (ptr_value, &error, 10);
if (error && !error[0])
server->multiline_max_lines = number;
+3 -1
View File
@@ -341,6 +341,7 @@ irc_protocol_parse_time (const char *time)
pos = strchr (time2, ',');
if (pos)
pos[0] = '\0';
error = NULL;
value = strtol (time2, &error, 10);
if (error && !error[0] && (value >= 0))
time_value = (int)value;
@@ -7843,7 +7844,8 @@ irc_protocol_recv_command (struct t_irc_server *server,
IRCB(331, 1, 0, 331), /* no topic for channel */
IRCB(332, 0, 1, 332), /* topic of channel */
IRCB(333, 1, 0, 333), /* topic info (nick/date) */
IRCB(335, 1, 0, whois_nick_msg), /* is a bot on */
IRCB(335, 1, 0, whois_nick_msg), /* whois (is a bot on) */
IRCB(337, 1, 0, whois_nick_msg), /* whois (is hiding idle time) */
IRCB(338, 1, 0, 338), /* whois (host) */
IRCB(341, 1, 0, 341), /* inviting */
IRCB(343, 1, 0, 330_343), /* is opered as */
+4
View File
@@ -462,6 +462,7 @@ irc_redirect_new_with_commands (struct t_irc_server *server,
if (pos)
{
pos[0] = '\0';
error = NULL;
value = strtol (pos + 1, &error, 10);
if (!error || error[0])
value = -1;
@@ -1309,6 +1310,7 @@ irc_redirect_pattern_hsignal_cb (const void *pointer, void *data,
timeout = 0;
if (str_timeout && str_timeout[0])
{
error = NULL;
number = (int)strtol (str_timeout, &error, 10);
if (error && !error[0])
timeout = number;
@@ -1379,6 +1381,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
count = 1;
if (str_count && str_count[0])
{
error = NULL;
number = (int)strtol (str_count, &error, 10);
if (error && !error[0])
count = number;
@@ -1387,6 +1390,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
timeout = 0;
if (str_timeout && str_timeout[0])
{
error = NULL;
number = (int)strtol (str_timeout, &error, 10);
if (error && !error[0])
timeout = number;
+4 -2
View File
@@ -2818,11 +2818,10 @@ irc_server_outqueue_send (struct t_irc_server *server)
'\r');
if (pos)
pos[0] = '\0';
irc_raw_print (server, IRC_RAW_FLAG_SEND |
((server->outqueue[priority]->modified) ? IRC_RAW_FLAG_MODIFIED : 0),
server->outqueue[priority]->message_after_mod);
if (pos)
pos[0] = '\r';
/* send signal with command that will be sent to server */
(void) irc_server_send_signal (
@@ -2840,6 +2839,9 @@ irc_server_outqueue_send (struct t_irc_server *server)
if (tags_to_send)
free (tags_to_send);
if (pos)
pos[0] = '\r';
/* send command */
irc_server_send (
server, server->outqueue[priority]->message_after_mod,
-1
View File
@@ -261,7 +261,6 @@ logger_backlog_file (struct t_gui_buffer *buffer, const char *filename,
struct t_arraylist *last_lines, *messages;
int i, num_msgs, old_input_multiline;
num_msgs = 0;
last_lines = logger_tail_file (filename, lines);
if (!last_lines)
return;
+7
View File
@@ -616,6 +616,13 @@ relay_irc_signal_irc_disc_cb (const void *pointer, void *data,
if (strcmp ((char *)signal_data, client->protocol_args) == 0)
{
relay_irc_sendf (client,
":%s ERROR :WeeChat: disconnected from server \"%s\"",
RELAY_IRC_DATA(client, address),
client->protocol_args);
relay_irc_sendf (client,
":%s ERROR :Closing Link",
RELAY_IRC_DATA(client, address));
relay_client_set_status (client, RELAY_STATUS_DISCONNECTED);
}
+1
View File
@@ -247,6 +247,7 @@ relay_auth_parse_pbkdf2 (const char *parameters,
}
/* parameter 2: iterations */
error = NULL;
*iterations = (int)strtol (argv[1], &error, 10);
if (!error || error[0])
*iterations = 0;
+1 -1
View File
@@ -287,7 +287,7 @@ weechat_ruby_print_exception (VALUE err)
err_class = StringValuePtr (class_name);
}
if (strcmp (err_class, "SyntaxError") == 0)
if (err_class && (strcmp (err_class, "SyntaxError") == 0))
{
tmp3 = rb_inspect (err);
weechat_printf (NULL,
+1
View File
@@ -63,6 +63,7 @@ xfer_network_convert_integer_to_ipv4 (const char *str_address)
if (!str_address || !str_address[0])
return NULL;
error = NULL;
number = strtoll (str_address, &error, 10);
if (!error || error[0] || (number <= 0) || (number > UINT32_MAX))
return NULL;
+2
View File
@@ -848,6 +848,7 @@ TEST(CoreString, ExpandHome)
int length_home;
home = getenv ("HOME");
CHECK(home);
length_home = strlen (home);
POINTERS_EQUAL(NULL, string_expand_home (NULL));
@@ -872,6 +873,7 @@ TEST(CoreString, EvalPathHome)
struct t_hashtable *extra_vars, *options;
home = getenv ("HOME");
CHECK(home);
length_home = strlen (home);
length_weechat_config_dir = strlen (weechat_config_dir);
+14
View File
@@ -1051,18 +1051,32 @@ TEST(GuiKey, SeemsValid)
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-cb"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-updown"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "@chat:button1"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-test"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-test"));
LONGS_EQUAL(0, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-test"));
/* valid keys */
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "A"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "é"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "/"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f1"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f10"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f11"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f2"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "f20"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-ctrl-a"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-c,b"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "meta-w,meta-up"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-left"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "ctrl-u"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-home"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f1"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f10"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f11"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f2"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_DEFAULT, "shift-f20"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_CURSOR, "@chat:q"));
LONGS_EQUAL(1, gui_key_seems_valid (GUI_KEY_CONTEXT_MOUSE, "@chat:button1"));
}
+10 -1
View File
@@ -3564,7 +3564,8 @@ TEST(IrcProtocolWithServer, 221)
* 319: whois (channels)
* 320: whois (identified user)
* 326: whois (has oper privs)
* 335: is a bot on
* 335: whois (is a bot on)
* 337: whois ((is hiding idle time)
* 378: whois (connecting from)
* 379: whois (using modes)
* 671: whois (secure connection)
@@ -3623,6 +3624,10 @@ TEST(IrcProtocolWithServer, whois_nick_msg)
CHECK_ERROR_PARAMS("335", 0, 2);
RECV(":server 335 alice");
CHECK_ERROR_PARAMS("335", 1, 2);
RECV(":server 337");
CHECK_ERROR_PARAMS("337", 0, 2);
RECV(":server 337 alice");
CHECK_ERROR_PARAMS("337", 1, 2);
RECV(":server 378");
CHECK_ERROR_PARAMS("378", 0, 2);
RECV(":server 378 alice");
@@ -3689,6 +3694,10 @@ TEST(IrcProtocolWithServer, whois_nick_msg)
CHECK_SRV("--", "[bob] is a bot", "irc_335,irc_numeric,log3");
RECV(":server 335 alice bob");
CHECK_SRV("--", "bob", "irc_335,irc_numeric,log3");
RECV(":server 337 alice bob :is hiding their idle time");
CHECK_SRV("--", "[bob] is hiding their idle time", "irc_337,irc_numeric,log3");
RECV(":server 337 alice bob");
CHECK_SRV("--", "bob", "irc_337,irc_numeric,log3");
RECV(":server 378 alice bob");
CHECK_SRV("--", "bob", "irc_378,irc_numeric,log3");
RECV(":server 378 alice bob :connecting from");
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
#
WEECHAT_STABLE="4.0.6"
WEECHAT_DEVEL="4.0.6"
WEECHAT_STABLE="4.0.7"
WEECHAT_DEVEL="4.0.7"
STABLE_MAJOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f1)
STABLE_MINOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f2)