| 884 | } |
| 885 | |
| 886 | static void disableRawMode(int fd) { |
| 887 | #ifdef _WIN32 |
| 888 | REDIS_NOTUSED(fd); |
| 889 | if (consolemodeIn) { |
| 890 | SetConsoleMode(hIn, consolemodeIn); |
| 891 | consolemodeIn = 0; |
| 892 | } |
| 893 | rawmode = 0; |
| 894 | #else |
| 895 | /* Don't even check the return value as it's too late. */ |
| 896 | if (rawmode && tcsetattr(fd, TCSADRAIN, &orig_termios) != -1) |
| 897 | rawmode = 0; |
| 898 | #endif |
| 899 | } |
| 900 | |
| 901 | /* Use the ESC [6n escape sequence to query the horizontal cursor position |
| 902 | * and return it. On error -1 is returned, on success the position of the |
no outgoing calls
no test coverage detected