mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
hexdump: Flush stdout after '*' (repeat) lines.
The canonical annoying example being: hexdump < /dev/zero | less
This commit is contained in:
parent
7f8f79a5c4
commit
272144ab41
|
@ -274,8 +274,10 @@ get(void)
|
|||
if (vflag != ALL &&
|
||||
valid_save &&
|
||||
bcmp(curp, savp, nread) == 0) {
|
||||
if (vflag != DUP)
|
||||
if (vflag != DUP) {
|
||||
(void)printf("*\n");
|
||||
(void)fflush(stdout);
|
||||
}
|
||||
return((u_char *)NULL);
|
||||
}
|
||||
bzero((char *)curp + nread, need);
|
||||
|
@ -305,8 +307,10 @@ get(void)
|
|||
vflag = WAIT;
|
||||
return(curp);
|
||||
}
|
||||
if (vflag == WAIT)
|
||||
if (vflag == WAIT) {
|
||||
(void)printf("*\n");
|
||||
(void)fflush(stdout);
|
||||
}
|
||||
vflag = DUP;
|
||||
address += blocksize;
|
||||
need = blocksize;
|
||||
|
|
Loading…
Reference in a new issue