// set locale to display UTF-8 correctly in ncurses
setlocale(LC_CTYPE, "");
- // replace stdin with current tty if markdown input was piped
- freopen("/dev/tty", "rw", stdin);
-
// init ncurses
initscr();
if((max_cols > COLS) ||
(max_lines + bar_top + bar_bottom + 2 > LINES)) {
- fprintf(stderr, "Error: Terminal size %ix%i to small. Need at least %ix%i.\n",
+ fprintf(stderr, "Error: Terminal size %ix%i too small. Need at least %ix%i.\n",
COLS, LINES, max_cols, max_lines + bar_top + bar_bottom + 2);
endwin();
return(1);
}
- // replace stdin with current tty if markdown input was piped
- freopen("/dev/tty", "rw", stdin);
-
// disable cursor
curs_set(0);