From 2004b2cb37c69280fcfa128a0083de4c8c1e8ca4 Mon Sep 17 00:00:00 2001 From: cancel Date: Fri, 14 Dec 2018 05:29:20 +0900 Subject: [PATCH] Temp fix for libncursesw Need to fix up tool script to use ncursesx6-config --- tool | 2 +- tui_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tool b/tool index b74396f..0f3500c 100755 --- a/tool +++ b/tool @@ -254,7 +254,7 @@ build_target() { add cc_flags -D_POSIX_C_SOURCE=200809L ;; esac - add libraries -lmenu -lncurses + add libraries -lmenuw -lncursesw # If we wanted wide chars, use -lncursesw on Linux, and still just # -lncurses on Mac. ;; diff --git a/tui_main.c b/tui_main.c index 64dc412..9bbd6d5 100644 --- a/tui_main.c +++ b/tui_main.c @@ -1725,8 +1725,8 @@ int main(int argc, char** argv) { // Enable UTF-8 by explicitly initializing our locale before initializing // ncurses. Only needed (maybe?) if using libncursesw/wide-chars or UTF-8. // Using it unguarded will mess up box drawing chars in Linux virtual - // consoles. - // setlocale(LC_ALL, ""); + // consoles unless using libncursesw. + setlocale(LC_ALL, ""); // Initialize ncurses initscr(); // Allow ncurses to control newline translation. Fine to use with any modern