summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-02-17 18:28:41 +0100
committerBram Moolenaar <Bram@vim.org>2010-02-17 18:28:41 +0100
commit8a33e74dd2ee6681b887bd14a901601e334a1d16 (patch)
tree8347723ea402b68c0baeae3800ffde44894cddfc
parentbacd9da40eca8c1b3f93f01462cedf346141b824 (diff)
downloadvim-git-8a33e74dd2ee6681b887bd14a901601e334a1d16.tar.gz
updated for version 7.2.367v7.2.367
Problem: "xxd -r -p" doesn't work as documented. Solution: Skip white space. (James Vega)
-rw-r--r--src/version.c2
-rw-r--r--src/xxd/xxd.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/version.c b/src/version.c
index dc9f440ac..3d1455f11 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 367,
+/**/
366,
/**/
365,
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index c558426ad..41f8a2465 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -231,7 +231,7 @@ char *pname;
fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname);
fprintf(stderr, "Options:\n");
fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n");
- fprintf(stderr, " -b binary digit dump (incompatible with -p,-i,-r). Default hex.\n");
+ fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n");
fprintf(stderr, " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n");
fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n");
fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n");
@@ -276,11 +276,11 @@ long base_off;
if (c == '\r') /* Doze style input file? */
continue;
-#if 0 /* this doesn't work when there is normal text after the hex codes in
- the last line that looks like hex */
- if (c == ' ' || c == '\n' || c == '\t') /* allow multiple spaces */
+ /* Allow multiple spaces. This doesn't work when there is normal text
+ * after the hex codes in the last line that looks like hex, thus only
+ * use it for PostScript format. */
+ if (hextype == HEX_POSTSCRIPT && (c == ' ' || c == '\n' || c == '\t'))
continue;
-#endif
n3 = n2;
n2 = n1;