瀏覽代碼

replace printf+fflush by dprintf

Jan Klemkow 6 年之前
父節點
當前提交
f428ba1419
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scroll.c

+ 1 - 2
scroll.c

@@ -167,8 +167,7 @@ scrollup(void)
 	int rows;
 
 	/* move the text in terminal n lines down */
-	printf("\033[%dS", ws.ws_row);
-	fflush(stdout);
+	dprintf(STDOUT_FILENO, "\033[%dS", ws.ws_row);
 
 	/* set cursor position */
 	write(STDOUT_FILENO, "\033[0;0H", 6);