[PATCH] do not use gnuism 'dprintf' in watch.c
Rich Felker
dalias at aerifal.cx
Fri May 19 01:00:46 UTC 2006
no comments..
rich
-------------- next part --------------
Index: coreutils/watch.c
===================================================================
--- coreutils/watch.c (revision 15108)
+++ coreutils/watch.c (working copy)
@@ -86,8 +86,7 @@
while (1) {
time(&t);
- /* Use dprintf to avoid fflush()ing stdout. */
- if (dprintf(1, "\033[H\033[J%-*s%s\n", header_len, header, ctime(&t)) < 0) {
+ if (printf("\033[H\033[J%-*s%s\n", header_len, header, ctime(&t)) < 0 || fflush(stdout) < 0) {
bb_perror_msg_and_die("printf");
}
More information about the busybox
mailing list