Browse Source

replace printf+fflush by dprintf

Jan Klemkow 6 years ago
parent
commit
f428ba1419
1 changed files with 1 additions and 2 deletions
  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);