提交 5ce3a24d 编写于 作者: A antirez

Linenoise updated to latest version

上级 afd438df
...@@ -279,7 +279,9 @@ static int completeLine(int fd, const char *prompt, char *buf, size_t buflen, si ...@@ -279,7 +279,9 @@ static int completeLine(int fd, const char *prompt, char *buf, size_t buflen, si
} }
void linenoiseClearScreen(void) { void linenoiseClearScreen(void) {
write(STDIN_FILENO,"\x1b[H\x1b[2J",7); if (write(STDIN_FILENO,"\x1b[H\x1b[2J",7) <= 0) {
/* nothing to do, just to avoid warning. */
}
} }
static int linenoisePrompt(int fd, char *buf, size_t buflen, const char *prompt) { static int linenoisePrompt(int fd, char *buf, size_t buflen, const char *prompt) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册