MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / disableRawMode

Function disableRawMode

tools/shell/linenoise.cpp:886–899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884}
885
886static 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

Callers 3

linenoisePrintKeyCodesFunction · 0.85
linenoiseRawFunction · 0.85
linenoiseAtExitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected