version 1.4, 1997/01/12 23:43:05 |
version 1.5, 1997/05/29 14:57:31 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <sys/time.h> |
|
#include <sys/mman.h> |
#include <sys/mman.h> |
|
|
#include <err.h> |
#include <err.h> |
|
|
struct stat *sbp; |
struct stat *sbp; |
{ |
{ |
register int ch; |
register int ch; |
struct timeval second; |
|
|
|
switch(style) { |
switch(style) { |
case FBYTES: |
case FBYTES: |
|
|
(void)fflush(stdout); |
(void)fflush(stdout); |
if (!fflag) |
if (!fflag) |
break; |
break; |
/* |
sleep(1); |
* We pause for one second after displaying any data that has |
|
* accumulated since we read the file. Since sleep(3) takes |
|
* eight system calls, use select() instead. |
|
*/ |
|
second.tv_sec = 1; |
|
second.tv_usec = 0; |
|
if (select(0, NULL, NULL, NULL, &second) == -1) |
|
err(1, "select"); |
|
clearerr(fp); |
clearerr(fp); |
} |
} |
} |
} |