Adding the locale, so that unicode characters are shown.
This commit is contained in:
parent
d8d42c42b2
commit
7c4c16e705
@ -1,6 +1,7 @@
|
|||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <locale.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "../lib/card.h"
|
#include "../lib/card.h"
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
char message[] = "Welcome to tty-solitaire.";
|
char message[] = "Welcome to tty-solitaire.";
|
||||||
int row_number, column_number;
|
int row_number, column_number;
|
||||||
|
|
||||||
|
setlocale(LC_ALL, ""); /* supporting unicode characters */
|
||||||
initscr(); /* initialize the terminal in curses mode */
|
initscr(); /* initialize the terminal in curses mode */
|
||||||
raw(); /* disable line buffers */
|
raw(); /* disable line buffers */
|
||||||
noecho(); /* character echo is unnecessary */
|
noecho(); /* character echo is unnecessary */
|
||||||
@ -21,6 +23,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
getch();
|
getch();
|
||||||
|
|
||||||
endwin();
|
endwin();
|
||||||
|
|
||||||
puts("Game finished.");
|
puts("Game finished.");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user