diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 535232a35a272781f8b64ee07ac07bf82df5035e
parent d8561bf5886b325a811cc7de9f4046ae519c10c3
Author: Johnathan Jenkins <john@nixheads.co.uk>
Date:   Wed, 14 Dec 2016 22:16:49 -0800

add support to read locale for utf8 chars

Diffstat:
MMakefile | 2+-
Mdiary.c | 1+
Mdiary.h | 1+
3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -4,7 +4,7 @@ PREFIX ?= /usr/local BINDIR ?= $(DESTDIR)$(PREFIX)/bin CC = gcc -CFLAGS = -lncurses -Wall +CFLAGS = -lncursesw -Wall default: $(TARGET) diff --git a/diary.c b/diary.c @@ -256,6 +256,7 @@ void fpath(char* dir, size_t dir_size, struct tm* date, char** rpath, size_t rpa } int main(int argc, char** argv) { + setlocale(LC_ALL, ""); char diary_dir[80]; char* env_var; chtype atrs; diff --git a/diary.h b/diary.h @@ -8,6 +8,7 @@ #include <errno.h> #include <dirent.h> #include <ncurses.h> +#include <locale.h> #define YEAR_RANGE 1 #define CAL_WIDTH 21