Commit 70da81ec492ab829b58df3c837a9924e119a386b
Make pinfo work if stdin and/or stdout are redirected Fixes https://bugs.debian.org/671306
Author: bas@zoetekouw.net
Author date (UTC): 2017-08-13 21:58
Committer name: bas@zoetekouw.net
Committer date (UTC): 2017-08-13 21:58
Parent(s): 3db98764f7b23b2f642b28925dd69f2ad1cb4ca9
Signing key:
Tree: 2cd48fdbadf29ba5ba330de1f51225a9a6efe4fd
File src/utils.c changed (mode: 100644) (index 7f2f04e..ed71063) |
... |
... |
getstring(char *prompt) |
279 |
279 |
void |
void |
280 |
280 |
init_curses() |
init_curses() |
281 |
281 |
{ |
{ |
282 |
|
initscr(); |
|
|
282 |
|
FILE *f = fopen("/dev/tty", "r+"); |
|
283 |
|
SCREEN *screen = newterm(NULL, f, f); |
|
284 |
|
set_term(screen); |
283 |
285 |
noecho(); |
noecho(); |
284 |
286 |
cbreak(); |
cbreak(); |
285 |
287 |
keypad(stdscr, TRUE); |
keypad(stdscr, TRUE); |