Explorar el Código

replace printf+fflush by dprintf

Jan Klemkow hace 6 años
padre
commit
f428ba1419
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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);