1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 17:23:15 +02:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Sébastien Helleu e050eebb2e api: return input string in function string_iconv_from_internal when current locale is wrong
This fixes a bug when writing configuration files with a wrong locale: now
UTF-8 is kept and written in files instead of string converted using a wrong
charset.
2025-03-02 13:46:21 +01:00
Sébastien Helleu e8a7869722 Version 4.5.3-dev 2025-02-20 23:40:51 +01:00
Sébastien Helleu 3e8f957210 Version 4.5.2 2025-02-20 23:37:24 +01:00
Sébastien Helleu 1110b8b9d5 debian: update changelog 2025-02-20 23:05:45 +01:00
Sébastien Helleu 524528fc34 core: update ChangeLog 2025-02-20 22:55:00 +01:00
LuK1337 34c79971fc core: use <stdbool.h> instead of typedef in ncurses-fake.h
Fixes the following error when building in Fedora rawhide:
error: ‘bool’ cannot be defined via ‘typedef’.

Likely GCC 15 related.
2025-01-26 08:55:36 +01:00
Sébastien Helleu c1ca6c4002 core: add parameter name in signal handler functions 2025-01-26 08:55:34 +01:00
LuK1337 c7af60daaa core: add int arg for all sigaction.sa_handler functions
src/gui/curses/gui-curses-main.c: In function ‘gui_main_loop’:
src/gui/curses/gui-curses-main.c:399:33: error: passing argument 2 of ‘signal_catch’ from incompatible pointer type [-Wincompatible-pointer-types]
  399 |         signal_catch (SIGWINCH, &gui_main_signal_sigwinch);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 void (*)(void)
In file included from src/gui/curses/gui-curses-main.c:38:
src/gui/curses/../../core/core-signal.h:33:46: note: expected ‘void (*)(int)’ but argument is of type ‘void (*)(void)’
   33 | extern void signal_catch (int signum, void (*handler)(int));
      |                                       ~~~~~~~^~~~~~~~~~~~~
2025-01-26 08:55:32 +01:00
Sébastien Helleu 99a3865665 relay/api: bump version in OpenAPI document 2025-01-05 13:44:17 +01:00
Sébastien Helleu b93a24d949 relay/api: fix name of body field "buffer_name" in doc of POST /api/input 2025-01-05 10:36:59 +01:00
Sébastien Helleu 1ee6b6e635 Version 4.5.2-dev 2024-12-23 08:52:56 +01:00
14 changed files with 71 additions and 22 deletions
+12
View File
@@ -1,5 +1,17 @@
# WeeChat ChangeLog # WeeChat ChangeLog
## Version 4.5.3 (under dev)
### Fixed
- core: save configuration files as UTF-8 when the locale is wrong
## Version 4.5.2 (2025-02-20)
### Fixed
- core: fix build with gcc 15 ([#2229](https://github.com/weechat/weechat/issues/2229), [#2230](https://github.com/weechat/weechat/issues/2230))
## Version 4.5.1 (2024-12-23) ## Version 4.5.1 (2024-12-23)
### Fixed ### Fixed
+7
View File
@@ -1,3 +1,10 @@
weechat (4.5.1-1) unstable; urgency=medium
* New upstream release
* Update copyright file (new year)
-- Emmanuel Bouthenot <kolter@debian.org> Mon, 20 Jan 2025 14:39:42 +0000
weechat (4.4.3-1) unstable; urgency=medium weechat (4.4.3-1) unstable; urgency=medium
* New upstream release * New upstream release
+2 -2
View File
@@ -1184,7 +1184,7 @@ Body parameters:
* `buffer_id` (integer, optional): buffer unique identifier (not to be confused * `buffer_id` (integer, optional): buffer unique identifier (not to be confused
with the buffer number, which is different) with the buffer number, which is different)
* `buffer` (string, optional, default: `core.weechat`): buffer name * `buffer_name` (string, optional, default: `core.weechat`): buffer name
* `command` (string, **required**): command or text to send to the buffer * `command` (string, **required**): command or text to send to the buffer
Request example: say "hello!" on channel #weechat: Request example: say "hello!" on channel #weechat:
@@ -1192,7 +1192,7 @@ Request example: say "hello!" on channel #weechat:
[source,shell] [source,shell]
---- ----
curl -L -u 'plain:secret_password' -X POST \ curl -L -u 'plain:secret_password' -X POST \
-d '{"buffer": "irc.libera.#weechat", "command": "hello!"}' \ -d '{"buffer_name": "irc.libera.#weechat", "command": "hello!"}' \
'https://localhost:9000/api/input' 'https://localhost:9000/api/input'
---- ----
+2 -2
View File
@@ -1196,7 +1196,7 @@ Paramètres du corps :
* `buffer_id` (entier, facultatif) : identifiant unique du tampon (à ne pas * `buffer_id` (entier, facultatif) : identifiant unique du tampon (à ne pas
confondre avec le numéro du tampon, qui est différent) confondre avec le numéro du tampon, qui est différent)
* `buffer_name` (chaîne, facultatif) : nom de tampon * `buffer_name` (chaîne, facultatif, par défaut: `core.weechat`) : nom de tampon
* `command` (chaîne, **obligatoire**) : commande ou texte à envoyer au tampon * `command` (chaîne, **obligatoire**) : commande ou texte à envoyer au tampon
Exemple de requête : dire "hello!" sur le canal #weechat : Exemple de requête : dire "hello!" sur le canal #weechat :
@@ -1204,7 +1204,7 @@ Exemple de requête : dire "hello!" sur le canal #weechat :
[source,shell] [source,shell]
---- ----
curl -L -u 'plain:secret_password' -X POST \ curl -L -u 'plain:secret_password' -X POST \
-d '{"buffer": "irc.libera.#weechat", "command": "hello!"}' \ -d '{"buffer_name": "irc.libera.#weechat", "command": "hello!"}' \
'https://localhost:9000/api/input' 'https://localhost:9000/api/input'
---- ----
+4 -1
View File
@@ -228,8 +228,11 @@ debug_dump_cb (const void *pointer, void *data,
*/ */
void void
debug_sigsegv_cb () debug_sigsegv_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
debug_dump (1); debug_dump (1);
unhook_all (); unhook_all ();
gui_main_end (0); gui_main_end (0);
+1 -1
View File
@@ -27,7 +27,7 @@ struct t_gui_window_tree;
extern long long debug_long_callbacks; extern long long debug_long_callbacks;
extern void debug_build_info (); extern void debug_build_info ();
extern void debug_sigsegv_cb (); extern void debug_sigsegv_cb (int signo);
extern void debug_windows_tree (); extern void debug_windows_tree ();
extern void debug_memory (); extern void debug_memory ();
extern void debug_hdata (); extern void debug_hdata ();
+20 -5
View File
@@ -65,8 +65,11 @@ volatile sig_atomic_t signal_sigusr2_count = 0;
*/ */
void void
signal_sighup_cb () signal_sighup_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
signal_sighup_count++; signal_sighup_count++;
} }
@@ -75,8 +78,11 @@ signal_sighup_cb ()
*/ */
void void
signal_sigquit_cb () signal_sigquit_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
signal_sigquit_count++; signal_sigquit_count++;
} }
@@ -85,8 +91,11 @@ signal_sigquit_cb ()
*/ */
void void
signal_sigterm_cb () signal_sigterm_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
signal_sigterm_count++; signal_sigterm_count++;
} }
@@ -95,8 +104,11 @@ signal_sigterm_cb ()
*/ */
void void
signal_sigusr1_cb () signal_sigusr1_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
signal_sigusr1_count++; signal_sigusr1_count++;
} }
@@ -105,8 +117,11 @@ signal_sigusr1_cb ()
*/ */
void void
signal_sigusr2_cb () signal_sigusr2_cb (int signo)
{ {
/* make C compiler happy */
(void) signo;
signal_sigusr2_count++; signal_sigusr2_count++;
} }
+6 -1
View File
@@ -3253,7 +3253,8 @@ string_iconv_to_internal (const char *charset, const char *string)
} }
/* /*
* Converts internal string to terminal charset, for display. * Converts internal string to terminal charset, for display or write of
* configuration files.
* *
* Note: result must be freed after use. * Note: result must be freed after use.
*/ */
@@ -3270,6 +3271,10 @@ string_iconv_from_internal (const char *charset, const char *string)
if (!input) if (!input)
return NULL; return NULL;
/* if the locale is wrong, we keep UTF-8 */
if (!weechat_locale_ok)
return input;
/* /*
* optimized for UTF-8: if charset is NULL => we use term charset => if * optimized for UTF-8: if charset is NULL => we use term charset => if
* this charset is already UTF-8, then no iconv is needed * this charset is already UTF-8, then no iconv is needed
+1
View File
@@ -118,6 +118,7 @@ extern char *weechat_data_dir;
extern char *weechat_state_dir; extern char *weechat_state_dir;
extern char *weechat_cache_dir; extern char *weechat_cache_dir;
extern char *weechat_runtime_dir; extern char *weechat_runtime_dir;
extern int weechat_locale_ok;
extern char *weechat_local_charset; extern char *weechat_local_charset;
extern int weechat_plugin_no_dlclose; extern int weechat_plugin_no_dlclose;
extern int weechat_no_gnutls; extern int weechat_no_gnutls;
+8 -2
View File
@@ -150,8 +150,11 @@ gui_main_get_password (const char **prompt, char *password, int size)
*/ */
void void
gui_main_signal_sigint () gui_main_signal_sigint (int signo)
{ {
/* make C compiler happy */
(void) signo;
weechat_quit = 1; weechat_quit = 1;
} }
@@ -253,8 +256,11 @@ gui_main_init ()
*/ */
void void
gui_main_signal_sigwinch () gui_main_signal_sigwinch (int signo)
{ {
/* make C compiler happy */
(void) signo;
gui_signal_sigwinch_received = 1; gui_signal_sigwinch_received = 1;
} }
+1 -1
View File
@@ -20,6 +20,7 @@
#ifndef WEECHAT_NCURSES_FAKE_H #ifndef WEECHAT_NCURSES_FAKE_H
#define WEECHAT_NCURSES_FAKE_H #define WEECHAT_NCURSES_FAKE_H
#include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#define ERR (-1) #define ERR (-1)
@@ -71,7 +72,6 @@ struct _window
}; };
typedef struct _window WINDOW; typedef struct _window WINDOW;
typedef unsigned char bool;
typedef int attr_t; typedef int attr_t;
typedef unsigned chtype; typedef unsigned chtype;
+3 -3
View File
@@ -994,7 +994,7 @@ error:
* { * {
* "request": "POST /api/input", * "request": "POST /api/input",
* "body": { * "body": {
* "buffer": "irc.libera.#weechat", * "buffer_name": "irc.libera.#weechat",
* "command": "hello!" * "command": "hello!"
* } * }
* } * }
@@ -1002,10 +1002,10 @@ error:
* It is converted to an HTTP request which could have been: * It is converted to an HTTP request which could have been:
* *
* POST /api/input HTTP/1.1 * POST /api/input HTTP/1.1
* Content-Length: 53 * Content-Length: 58
* Content-Type: application/json * Content-Type: application/json
* *
* {"buffer": "irc.libera.#weechat","command": "hello!"} * {"buffer_name": "irc.libera.#weechat","command": "hello!"}
* *
* The JSON can also be an array of requests, for example to fetch all buffers * The JSON can also be an array of requests, for example to fetch all buffers
* data and synchronize at same time: * data and synchronize at same time:
+2 -2
View File
@@ -13,7 +13,7 @@ info:
license: license:
name: CC BY-NC-SA 4.0 name: CC BY-NC-SA 4.0
url: https://creativecommons.org/licenses/by-nc-sa/4.0/ url: https://creativecommons.org/licenses/by-nc-sa/4.0/
version: 0.2.0 version: 0.3.0
externalDocs: externalDocs:
url: https://weechat.org/doc/ url: https://weechat.org/doc/
@@ -991,7 +991,7 @@ components:
format: int64 format: int64
description: Buffer identifier (≥ 0) description: Buffer identifier (≥ 0)
example: 1709932823238637 example: 1709932823238637
buffer: buffer_name:
type: string type: string
description: >- description: >-
Buffer full name Buffer full name
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev") # devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
# #
weechat_stable="4.5.1" weechat_stable="4.5.2"
weechat_devel="4.5.1" weechat_devel="4.5.3-dev"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1) stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2) stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)