mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
don't call tcgetattr from windows
This commit is contained in:
parent
bbaa3f4afa
commit
739b6c2dab
@ -695,13 +695,13 @@ int interrogate_terminfo(tinfo* ti, int fd, unsigned utf8, unsigned noaltscreen,
|
|||||||
(void)nonewfonts;
|
(void)nonewfonts;
|
||||||
#endif
|
#endif
|
||||||
if(fd >= 0){
|
if(fd >= 0){
|
||||||
|
#ifndef __MINGW64__
|
||||||
if(tcgetattr(fd, &ti->tpreserved)){
|
if(tcgetattr(fd, &ti->tpreserved)){
|
||||||
fprintf(stderr, "Couldn't preserve terminal state for %d (%s)\n", fd, strerror(errno));
|
fprintf(stderr, "Couldn't preserve terminal state for %d (%s)\n", fd, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// enter cbreak mode regardless of user preference until we've performed
|
// enter cbreak mode regardless of user preference until we've performed
|
||||||
// terminal interrogation. at that point, we might restore original mode.
|
// terminal interrogation. at that point, we might restore original mode.
|
||||||
#ifndef __MINGW64__
|
|
||||||
if(cbreak_mode(fd, &ti->tpreserved)){
|
if(cbreak_mode(fd, &ti->tpreserved)){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user