sfm

Simple file manager
git clone git://git.christosmarg.xyz/sfm.git
Log | Files | Refs | README | LICENSE

commit 78e18c2c46dd720e86255f7e532395072e05dc55
parent 53cea22c0ddeb3efd3ad864c36b41610e92b25da
Author: Christos Margiolis <christos@margiolis.net>
Date:   Sun, 20 Dec 2020 02:45:19 +0200

added unicode support

Diffstat:
Mconfig.mk | 2+-
Msfm.c | 11++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/config.mk b/config.mk @@ -9,7 +9,7 @@ BIN_DIR = ${PREFIX}/bin # includes and libs INCS = -Iinclude -LIBS = -Llib -lncurses # add ncursesw +LIBS = -Llib -lncursesw # flags CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L \ diff --git a/sfm.c b/sfm.c @@ -5,6 +5,7 @@ #include <dirent.h> #include <limits.h> +#include <locale.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -795,16 +796,16 @@ cleanup(void) int main(int argc, char *argv[]) { + win = emalloc(sizeof(Win)); + win->ents = NULL; + win->sel = win->nsel = win->nents = 0; + f_redraw = 1; f_namesort = 1; sortfn = namecmp; + setlocale(LC_ALL, ""); cursesinit(); - - win = emalloc(sizeof(Win)); - win->ents = NULL; - win->sel = win->nsel = win->nents = 0; - sfmrun(); cleanup();