mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-07 18:26:34 +01:00
Add wide char support in toxic (issue #440)
Set current locale, use of get_wch instead of getch for reading, use wctomb and friends to convert back from wchar_t, link with cursesw. Unicode support is only added to chat windows.
This commit is contained in:
3
prompt.c
3
prompt.c
@@ -5,7 +5,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <curses.h>
|
||||
|
||||
#include "../../core/Messenger.h"
|
||||
#include "../../core/network.h"
|
||||
@@ -426,7 +425,7 @@ static void execute(ToxWindow *self, Messenger *m, char *u_cmd)
|
||||
wprintw(self->window, "Invalid command.\n");
|
||||
}
|
||||
|
||||
static void prompt_onKey(ToxWindow *self, Messenger *m, int key)
|
||||
static void prompt_onKey(ToxWindow *self, Messenger *m, wint_t key)
|
||||
{
|
||||
/* Add printable characters to line */
|
||||
if (isprint(key)) {
|
||||
|
||||
Reference in New Issue
Block a user