aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-02-15 23:20:23 +0100
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-02-15 23:20:23 +0100
commitc573d3b7954296d95a0f8a79b8ac2ca261d86a02 (patch)
treec7bc998800ffc625d5c57c8aa17da5edb2ebeefd /main.c
parent0667e9c0a77791b739bcb359b0ed9f33abbc4133 (diff)
downloaddict-c573d3b7954296d95a0f8a79b8ac2ca261d86a02.tar.gz
dict-c573d3b7954296d95a0f8a79b8ac2ca261d86a02.tar.bz2
dict-c573d3b7954296d95a0f8a79b8ac2ca261d86a02.zip
fix: Add better support for utf-8
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.c b/main.c
index f95a465..026b4b5 100644
--- a/main.c
+++ b/main.c
@@ -11,14 +11,15 @@ unsigned int count_lines(FILE* file);
int load_or_save_db(sqlite3 *pInMemory, const char *zFilename, int isSave);
int main() {
-
Data *data = new_data(":memory:");
bootstrap(data);
setlocale(LC_ALL, "");
- initscr();
noecho();
cbreak();
+ nonl();
+ keypad(stdscr, TRUE);
+ initscr();
FILE *f = fopen("dict.txt", "r");
unsigned int lines = count_lines(f);
@@ -43,6 +44,13 @@ int main() {
clear();
refresh();
+
+ TEXT_BOX *box = new_text_box(stdscr, 10);
+ get_char(box);
+
+ clear();
+ refresh();
+
endwin();
free_data(data);