From 197bc3fd5a37062d0b980ef54d673b9c9bb39e4c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 28 Jan 1995 13:02:44 +0000 Subject: [PATCH] (decode_format_string): Use memmove instead of bcopy. [EQUAL_BLOCKS]: Use memcmp, not bcmp. (dump): Use memset, not bzero. --- src/od.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/od.c b/src/od.c index d30ce9a7a9..83b45ebc56 100644 --- a/src/od.c +++ b/src/od.c @@ -932,7 +932,7 @@ decode_format_string (s) * sizeof (struct tspec))); } - bcopy ((char *) &tspec, (char *) &spec[n_specs], sizeof (struct tspec)); + memcpy ((char *) &spec[n_specs], (char *) &tspec, sizeof (struct tspec)); ++n_specs; } @@ -1101,7 +1101,7 @@ write_block (current_offset, n_bytes, prev_block, curr_block) static int first = 1; static int prev_pair_equal = 0; -#define EQUAL_BLOCKS(b1, b2) (bcmp ((b1), (b2), bytes_per_block) == 0) +#define EQUAL_BLOCKS(b1, b2) (memcmp ((b1), (b2), bytes_per_block) == 0) if (abbreviate_duplicate_blocks && !first && n_bytes == bytes_per_block @@ -1438,7 +1438,7 @@ dump () is at least as large as n_bytes_read. */ bytes_to_write = l_c_m * (int) ((n_bytes_read + l_c_m - 1) / l_c_m); - bzero (block[idx] + n_bytes_read, bytes_to_write - n_bytes_read); + memset (block[idx] + n_bytes_read, 0, bytes_to_write - n_bytes_read); write_block (current_offset, bytes_to_write, block[!idx], block[idx]); current_offset += n_bytes_read; -- 2.47.3