summaryrefslogtreecommitdiff
path: root/src/xxd
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-12-03 20:32:43 +0000
committerBram Moolenaar <Bram@vim.org>2007-12-03 20:32:43 +0000
commite9c3bcda1dac927be5d405e4c58313c83e747538 (patch)
tree6dffc34b66569573f81d5de27486c9a75a94eff0 /src/xxd
parent0a30746d7097fa664b81ba652cf4bac818a3d164 (diff)
downloadvim-git-e9c3bcda1dac927be5d405e4c58313c83e747538.tar.gz
updated for version 7.1-167v7.1.167
Diffstat (limited to 'src/xxd')
-rw-r--r--src/xxd/xxd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index e42b8f74b..b9e42f6a7 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -212,7 +212,7 @@ static void xxdline __P((FILE *, char *, int));
#define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
#define COLS 256 /* change here, if you ever need more columns */
-#define LLEN (9 + (5*COLS-1)/2 + 2 + COLS)
+#define LLEN (11 + (9*COLS-1)/1 + COLS + 2)
char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
@@ -590,7 +590,8 @@ char *argv[];
default: octspergrp = 0; break;
}
- if (cols < 1 || (!hextype && (cols > COLS)))
+ if (cols < 1 || ((hextype == HEX_NORMAL || hextype == HEX_BITS)
+ && (cols > COLS)))
{
fprintf(stderr, "%s: invalid number of columns (max. %d).\n", pname, COLS);
exit(1);
@@ -750,6 +751,7 @@ char *argv[];
}
if (ebcdic)
e = (e < 64) ? '.' : etoa64[e-64];
+ /* When changing this update definition of LLEN above. */
l[11 + (grplen * cols - 1)/octspergrp + p] =
#ifdef __MVS__
(e >= 64)