]> Sergey Matveev's repositories - nnn.git/commitdiff
Use libncursesw for internationalization
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 16 Apr 2017 07:35:08 +0000 (13:05 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 16 Apr 2017 07:37:29 +0000 (13:07 +0530)
Update README on dependencies

Makefile
Makefile.generic
README.md
nnn.c

index 7545534b28cd664d9d45fa43c03ba7f0f619645a..54088a7936eb369ea2eeddfab456a9e48cf64643 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/share/man
 
 CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
-LDLIBS = -lcurses
+LDLIBS = -lncursesw
 
 DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
 LOCALCONFIG = config.h
index eed4b45e0e33f89a98d49146e0ff7693560264cd..488675a278f951cb658326d3fc176d25b78d56b7 100644 (file)
@@ -4,7 +4,7 @@ PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/share/man
 
 CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter
-LDLIBS = -lcurses
+LDLIBS = -lncursesw
 
 DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
 LOCALCONFIG = config.h
index e452e323ecb565fd3efe947bc97a3c941ae1f8ab..25117b3e7a97de1786c17a4086d691ffc2120010 100644 (file)
--- a/README.md
+++ b/README.md
@@ -139,7 +139,7 @@ nnn vs. ranger memory usage while viewing a directory with 10,178 files, sorted
 
 ### Installation
 
-nnn needs a curses implementation and standard libc.
+nnn needs libncursesw on Linux (or ncurses on OS X) and standard libc.
 
 - If you are using Homebrew, run:
 
diff --git a/nnn.c b/nnn.c
index e79259191c9cae6d62e911ea5bdaf17b9f968025..e10161ceb48b2454e2f8895c624697bba50f6def 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -477,9 +477,6 @@ initcurses(void)
        keypad(stdscr, TRUE);
        curs_set(FALSE); /* Hide cursor */
        timeout(1000); /* One second */
-
-       /* Set locale */
-       setlocale(LC_ALL, "");
 }
 
 static void
@@ -1674,6 +1671,9 @@ main(int argc, char *argv[])
                exit(1);
        }
 
+       /* Set locale */
+       setlocale(LC_ALL, "");
+
        initcurses();
        browse(ipath, ifilter);
        exitcurses();