SCCS-vsn: bin/dd/dd.c 5.16
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)dd.c 5.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)dd.c 5.16 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
#endif /* not lint */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "dd.h"
#include "extern.h"
#include "dd.h"
#include "extern.h"
IO in, out; /* input/output state */
STAT st; /* statistics */
IO in, out; /* input/output state */
STAT st; /* statistics */
-void (*cfunc)(); /* conversion function */
+void (*cfunc) __P((void)); /* conversion function */
u_long cpy_cnt; /* # of blocks to copy */
u_int ddflags; /* conversion options */
u_int cbsz; /* conversion block size */
u_long cpy_cnt; /* # of blocks to copy */
u_int ddflags; /* conversion options */
u_int cbsz; /* conversion block size */
if (flags & (C_BLOCK|C_UNBLOCK))
memset(in.dbp, ' ', in.dbsz);
else
if (flags & (C_BLOCK|C_UNBLOCK))
memset(in.dbp, ' ', in.dbsz);
else
- bzero(in.dbp, in.dbsz);
+ memset(in.dbp, 0, in.dbsz);
n = read(in.fd, in.dbp, in.dbsz);
if (n == 0) {
n = read(in.fd, in.dbp, in.dbsz);
if (n == 0) {
/* Reassemble the output block. */
if (out.dbcnt)
/* Reassemble the output block. */
if (out.dbcnt)
- bcopy(out.dbp - out.dbcnt, out.db, out.dbcnt);
+ memmove(out.db, out.dbp - out.dbcnt, out.dbcnt);
out.dbp = out.db + out.dbcnt;
}
out.dbp = out.db + out.dbcnt;
}