07a4c1a
To: vim-dev@vim.org
07a4c1a
Subject: Patch 7.2.367
07a4c1a
Fcc: outbox
07a4c1a
From: Bram Moolenaar <Bram@moolenaar.net>
07a4c1a
Mime-Version: 1.0
07a4c1a
Content-Type: text/plain; charset=UTF-8
07a4c1a
Content-Transfer-Encoding: 8bit
07a4c1a
------------
07a4c1a
07a4c1a
Patch 7.2.367
07a4c1a
Problem:    "xxd -r -p" doesn't work as documented.
07a4c1a
Solution:   Skip white space. (James Vega)
07a4c1a
Files:	    src/xxd/xxd.c
07a4c1a
07a4c1a
07a4c1a
*** ../vim-7.2.366/src/xxd/xxd.c	2009-06-16 18:29:37.000000000 +0200
07a4c1a
--- src/xxd/xxd.c	2010-02-17 18:25:11.000000000 +0100
07a4c1a
***************
07a4c1a
*** 231,237 ****
07a4c1a
    fprintf(stderr, "    or\n       %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname);
07a4c1a
    fprintf(stderr, "Options:\n");
07a4c1a
    fprintf(stderr, "    -a          toggle autoskip: A single '*' replaces nul-lines. Default off.\n");
07a4c1a
!   fprintf(stderr, "    -b          binary digit dump (incompatible with -p,-i,-r). Default hex.\n");
07a4c1a
    fprintf(stderr, "    -c cols     format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n");
07a4c1a
    fprintf(stderr, "    -E          show characters in EBCDIC. Default ASCII.\n");
07a4c1a
    fprintf(stderr, "    -g          number of octets per group in normal output. Default 2.\n");
07a4c1a
--- 231,237 ----
07a4c1a
    fprintf(stderr, "    or\n       %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname);
07a4c1a
    fprintf(stderr, "Options:\n");
07a4c1a
    fprintf(stderr, "    -a          toggle autoskip: A single '*' replaces nul-lines. Default off.\n");
07a4c1a
!   fprintf(stderr, "    -b          binary digit dump (incompatible with -ps,-i,-r). Default hex.\n");
07a4c1a
    fprintf(stderr, "    -c cols     format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n");
07a4c1a
    fprintf(stderr, "    -E          show characters in EBCDIC. Default ASCII.\n");
07a4c1a
    fprintf(stderr, "    -g          number of octets per group in normal output. Default 2.\n");
07a4c1a
***************
07a4c1a
*** 276,286 ****
07a4c1a
        if (c == '\r')	/* Doze style input file? */
07a4c1a
  	continue;
07a4c1a
  
07a4c1a
! #if 0	/* this doesn't work when there is normal text after the hex codes in
07a4c1a
! 	   the last line that looks like hex */
07a4c1a
!       if (c == ' ' || c == '\n' || c == '\t')  /* allow multiple spaces */
07a4c1a
  	continue;
07a4c1a
- #endif
07a4c1a
  
07a4c1a
        n3 = n2;
07a4c1a
        n2 = n1;
07a4c1a
--- 276,286 ----
07a4c1a
        if (c == '\r')	/* Doze style input file? */
07a4c1a
  	continue;
07a4c1a
  
07a4c1a
!       /* Allow multiple spaces.  This doesn't work when there is normal text
07a4c1a
!        * after the hex codes in the last line that looks like hex, thus only
07a4c1a
!        * use it for PostScript format. */
07a4c1a
!       if (hextype == HEX_POSTSCRIPT && (c == ' ' || c == '\n' || c == '\t'))
07a4c1a
  	continue;
07a4c1a
  
07a4c1a
        n3 = n2;
07a4c1a
        n2 = n1;
07a4c1a
*** ../vim-7.2.366/src/version.c	2010-02-17 18:20:23.000000000 +0100
07a4c1a
--- src/version.c	2010-02-17 18:26:35.000000000 +0100
07a4c1a
***************
07a4c1a
*** 683,684 ****
07a4c1a
--- 683,686 ----
07a4c1a
  {   /* Add new patch number below this line */
07a4c1a
+ /**/
07a4c1a
+     367,
07a4c1a
  /**/
07a4c1a
07a4c1a
-- 
07a4c1a
hundred-and-one symptoms of being an internet addict:
07a4c1a
248. You sign your letters with your e-mail address instead of your name.
07a4c1a
07a4c1a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
07a4c1a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
07a4c1a
\\\        download, build and distribute -- http://www.A-A-P.org        ///
07a4c1a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///