소스 검색

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);