summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-06-30 14:33:41 +0000
committerJim Meyering <jim@meyering.net>1994-06-30 14:33:41 +0000
commit1525e2cb3067e42cf1f43dd99e02db3abd17738b (patch)
treef89f1973919a2f137a59c4ad516ec3a73fea16ab /src/dd.c
parent6b1785ed05ee73585fbb8d421ef37a40ef9c709b (diff)
downloadcoreutils-1525e2cb3067e42cf1f43dd99e02db3abd17738b.tar.xz
.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dd.c b/src/dd.c
index 1da5e177f..68f55307e 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -44,8 +44,8 @@
cbs, replacing newline with trailing spaces.
unblock Replace trailing spaces in cbs-sized block
with newline.
- lcase Change uppercase characters to lowercase.
- ucase Change lowercase characters to uppercase.
+ lcase Change upper case characters to lower case.
+ ucase Change lower case characters to upper case.
swab Swap every pair of input bytes.
Unlike the Unix dd, this works when an odd
number of bytes are read.
@@ -541,8 +541,10 @@ copy ()
int nread; /* Bytes read in the current block. */
int exit_status = 0;
- /* Leave an extra byte at the beginning and end of `ibuf' for conv=swab. */
- ibuf = (unsigned char *) xmalloc (input_blocksize + 2) + 1;
+ /* Leave an extra byte at the beginning and end of `ibuf' for conv=swab,
+ but keep the buffer address even. Some peculiar device drivers work
+ only with word-aligned buffers. */
+ ibuf = (unsigned char *) xmalloc (input_blocksize + 4) + 2;
if (conversions_mask & C_TWOBUFS)
obuf = (unsigned char *) xmalloc (output_blocksize);
else
@@ -1107,8 +1109,8 @@ by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
ibm from ASCII to alternated EBCDIC\n\
block pad newline-terminated records with spaces to cbs-size \n\
unblock replace trailing spaces in cbs-size records with newline\n\
- lcase change uppercase to lowercase\n\
- ucase change lowercase to uppercase\n\
+ lcase change upper case to lower case\n\
+ ucase change lower case to upper case\n\
swab swap every pair of input bytes\n\
noerror continue after read errors\n\
sync pad every input block with NULs to ibs-size\n");