From ee3daeb30ac2243b50c4a372559a3d58e7786c87 Mon Sep 17 00:00:00 2001 From: Murilo Soares Pereira Date: Tue, 20 Apr 2010 02:10:03 -0300 Subject: [PATCH] Suit symbols work on all terminals now. --- Makefile | 2 +- lib/util.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8649a7e..0dd1afb 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ OBJECTS = ${LIB_DIR}/frame.o \ ${LIB_DIR}/keyboard.o \ ${LIB_DIR}/display.o \ ${LIB_DIR}/game.o -LDFLAGS = -lncurses +LDFLAGS = -lncursesw tty-solitaire: ${OBJECTS} ${CC} ${CFLAGS} ${LDFLAGS} ${SRC} -o ${OUTPUT} ${OBJECTS} diff --git a/lib/util.c b/lib/util.c index e59d492..64c732a 100644 --- a/lib/util.c +++ b/lib/util.c @@ -2,13 +2,13 @@ #include void initialize_curses() { - setlocale(LC_ALL, ""); /* supporting unicode characters */ - initscr(); /* initialize the terminal in curses mode */ - raw(); /* disable line buffers */ - noecho(); /* character echo is unnecessary */ - keypad(stdscr, TRUE); /* enable F and arrow keys */ - start_color(); /* I want colors */ - curs_set(FALSE); /* invisible cursor */ + setlocale(LC_ALL, "en_US.utf-8"); /* supporting unicode characters */ + initscr(); /* initialize the terminal in curses mode */ + raw(); /* disable line buffers */ + noecho(); /* character echo is unnecessary */ + keypad(stdscr, TRUE); /* enable F and arrow keys */ + start_color(); /* I want colors */ + curs_set(FALSE); /* invisible cursor */ assume_default_colors(COLOR_WHITE, COLOR_GREEN); init_pair(1, COLOR_BLACK, COLOR_WHITE);