|
Karsten Hopp |
c9f4a2 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
c9f4a2 |
Subject: Patch 7.4.652
|
|
Karsten Hopp |
c9f4a2 |
Fcc: outbox
|
|
Karsten Hopp |
c9f4a2 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
c9f4a2 |
Mime-Version: 1.0
|
|
Karsten Hopp |
c9f4a2 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
c9f4a2 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
c9f4a2 |
------------
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
Patch 7.4.652
|
|
Karsten Hopp |
c9f4a2 |
Problem: Xxd lacks a few features.
|
|
Karsten Hopp |
c9f4a2 |
Solution: Use 8 characters for the file position. Add the -e and -o
|
|
Karsten Hopp |
c9f4a2 |
arguments. (Vadim Vygonets)
|
|
Karsten Hopp |
c9f4a2 |
Files: src/xxd/xxd.c, runtime/doc/xxd.1
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
*** ../vim-7.4.651/src/xxd/xxd.c 2013-06-21 18:23:53.000000000 +0200
|
|
Karsten Hopp |
c9f4a2 |
--- src/xxd/xxd.c 2015-03-05 17:45:36.140691416 +0100
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 51,56 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 51,57 ----
|
|
Karsten Hopp |
c9f4a2 |
* 16.05.00 Improved MMS file and merge for VMS by Zoltan Arpadffy
|
|
Karsten Hopp |
c9f4a2 |
* 2011 March Better error handling by Florian Zumbiehl.
|
|
Karsten Hopp |
c9f4a2 |
* 2011 April Formatting by Bram Moolenaar
|
|
Karsten Hopp |
c9f4a2 |
+ * 08.06.2013 Little-endian hexdump (-e) and offset (-o) by Vadim Vygonets.
|
|
Karsten Hopp |
c9f4a2 |
*
|
|
Karsten Hopp |
c9f4a2 |
* (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de)
|
|
Karsten Hopp |
c9f4a2 |
*
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 216,222 ****
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
#define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
|
|
Karsten Hopp |
c9f4a2 |
#define COLS 256 /* change here, if you ever need more columns */
|
|
Karsten Hopp |
c9f4a2 |
! #define LLEN (11 + (9*COLS-1)/1 + COLS + 2)
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
--- 217,223 ----
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
#define TRY_SEEK /* attempt to use lseek, or skip forward by reading */
|
|
Karsten Hopp |
c9f4a2 |
#define COLS 256 /* change here, if you ever need more columns */
|
|
Karsten Hopp |
c9f4a2 |
! #define LLEN (12 + (9*COLS-1) + COLS + 2)
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 225,230 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 226,232 ----
|
|
Karsten Hopp |
c9f4a2 |
#define HEX_POSTSCRIPT 1
|
|
Karsten Hopp |
c9f4a2 |
#define HEX_CINCLUDE 2
|
|
Karsten Hopp |
c9f4a2 |
#define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */
|
|
Karsten Hopp |
c9f4a2 |
+ #define HEX_LITTLEENDIAN 4
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
static char *pname;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 238,247 ****
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n");
|
|
Karsten Hopp |
c9f4a2 |
! fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -h print this summary.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -i output in C include file style.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -l len stop after <len> octets.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -ps output in postscript plain hexdump style.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -r -s off revert with <off> added to file positions found in hexdump.\n");
|
|
Karsten Hopp |
c9f4a2 |
--- 240,251 ----
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n");
|
|
Karsten Hopp |
c9f4a2 |
! fprintf(stderr, " -e little-endian dump (incompatible with -ps,-i,-r).\n");
|
|
Karsten Hopp |
c9f4a2 |
! fprintf(stderr, " -g number of octets per group in normal output. Default 2 (-e: 4).\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -h print this summary.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -i output in C include file style.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -l len stop after <len> octets.\n");
|
|
Karsten Hopp |
c9f4a2 |
+ fprintf(stderr, " -o off add <off> to the displayed file position.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -ps output in postscript plain hexdump style.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.\n");
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, " -r -s off revert with <off> added to file positions found in hexdump.\n");
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 475,481 ****
|
|
Karsten Hopp |
c9f4a2 |
int ebcdic = 0;
|
|
Karsten Hopp |
c9f4a2 |
int octspergrp = -1; /* number of octets grouped in output */
|
|
Karsten Hopp |
c9f4a2 |
int grplen; /* total chars per octet group */
|
|
Karsten Hopp |
c9f4a2 |
! long length = -1, n = 0, seekoff = 0;
|
|
Karsten Hopp |
c9f4a2 |
static char l[LLEN+1]; /* static because it may be too big for stack */
|
|
Karsten Hopp |
c9f4a2 |
char *pp;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
--- 479,485 ----
|
|
Karsten Hopp |
c9f4a2 |
int ebcdic = 0;
|
|
Karsten Hopp |
c9f4a2 |
int octspergrp = -1; /* number of octets grouped in output */
|
|
Karsten Hopp |
c9f4a2 |
int grplen; /* total chars per octet group */
|
|
Karsten Hopp |
c9f4a2 |
! long length = -1, n = 0, seekoff = 0, displayoff = 0;
|
|
Karsten Hopp |
c9f4a2 |
static char l[LLEN+1]; /* static because it may be too big for stack */
|
|
Karsten Hopp |
c9f4a2 |
char *pp;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 503,508 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 507,513 ----
|
|
Karsten Hopp |
c9f4a2 |
pp = argv[1] + (!STRNCMP(argv[1], "--", 2) && argv[1][2]);
|
|
Karsten Hopp |
c9f4a2 |
if (!STRNCMP(pp, "-a", 2)) autoskip = 1 - autoskip;
|
|
Karsten Hopp |
c9f4a2 |
else if (!STRNCMP(pp, "-b", 2)) hextype = HEX_BITS;
|
|
Karsten Hopp |
c9f4a2 |
+ else if (!STRNCMP(pp, "-e", 2)) hextype = HEX_LITTLEENDIAN;
|
|
Karsten Hopp |
c9f4a2 |
else if (!STRNCMP(pp, "-u", 2)) hexx = hexxa + 16;
|
|
Karsten Hopp |
c9f4a2 |
else if (!STRNCMP(pp, "-p", 2)) hextype = HEX_POSTSCRIPT;
|
|
Karsten Hopp |
c9f4a2 |
else if (!STRNCMP(pp, "-i", 2)) hextype = HEX_CINCLUDE;
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 539,544 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 544,562 ----
|
|
Karsten Hopp |
c9f4a2 |
argc--;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
+ else if (!STRNCMP(pp, "-o", 2))
|
|
Karsten Hopp |
c9f4a2 |
+ {
|
|
Karsten Hopp |
c9f4a2 |
+ if (pp[2] && STRNCMP("ffset", pp + 2, 5))
|
|
Karsten Hopp |
c9f4a2 |
+ displayoff = (int)strtol(pp + 2, NULL, 0);
|
|
Karsten Hopp |
c9f4a2 |
+ else
|
|
Karsten Hopp |
c9f4a2 |
+ {
|
|
Karsten Hopp |
c9f4a2 |
+ if (!argv[2])
|
|
Karsten Hopp |
c9f4a2 |
+ exit_with_usage();
|
|
Karsten Hopp |
c9f4a2 |
+ displayoff = (int)strtol(argv[2], NULL, 0);
|
|
Karsten Hopp |
c9f4a2 |
+ argv++;
|
|
Karsten Hopp |
c9f4a2 |
+ argc--;
|
|
Karsten Hopp |
c9f4a2 |
+ }
|
|
Karsten Hopp |
c9f4a2 |
+ }
|
|
Karsten Hopp |
c9f4a2 |
else if (!STRNCMP(pp, "-s", 2))
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
relseek = 0;
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 603,608 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 621,627 ----
|
|
Karsten Hopp |
c9f4a2 |
case HEX_CINCLUDE: cols = 12; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_BITS: cols = 6; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_NORMAL:
|
|
Karsten Hopp |
c9f4a2 |
+ case HEX_LITTLEENDIAN:
|
|
Karsten Hopp |
c9f4a2 |
default: cols = 16; break;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 611,630 ****
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
case HEX_BITS: octspergrp = 1; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_NORMAL: octspergrp = 2; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_POSTSCRIPT:
|
|
Karsten Hopp |
c9f4a2 |
case HEX_CINCLUDE:
|
|
Karsten Hopp |
c9f4a2 |
default: octspergrp = 0; break;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (cols < 1 || ((hextype == HEX_NORMAL || hextype == HEX_BITS)
|
|
Karsten Hopp |
c9f4a2 |
&& (cols > COLS)))
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, "%s: invalid number of columns (max. %d).\n", pname, COLS);
|
|
Karsten Hopp |
c9f4a2 |
exit(1);
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (octspergrp < 1)
|
|
Karsten Hopp |
c9f4a2 |
octspergrp = cols;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
if (argc > 3)
|
|
Karsten Hopp |
c9f4a2 |
exit_with_usage();
|
|
Karsten Hopp |
c9f4a2 |
--- 630,657 ----
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
case HEX_BITS: octspergrp = 1; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_NORMAL: octspergrp = 2; break;
|
|
Karsten Hopp |
c9f4a2 |
+ case HEX_LITTLEENDIAN: octspergrp = 4; break;
|
|
Karsten Hopp |
c9f4a2 |
case HEX_POSTSCRIPT:
|
|
Karsten Hopp |
c9f4a2 |
case HEX_CINCLUDE:
|
|
Karsten Hopp |
c9f4a2 |
default: octspergrp = 0; break;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (cols < 1 || ((hextype == HEX_NORMAL || hextype == HEX_BITS || hextype == HEX_LITTLEENDIAN)
|
|
Karsten Hopp |
c9f4a2 |
&& (cols > COLS)))
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
fprintf(stderr, "%s: invalid number of columns (max. %d).\n", pname, COLS);
|
|
Karsten Hopp |
c9f4a2 |
exit(1);
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (octspergrp < 1 || octspergrp > cols)
|
|
Karsten Hopp |
c9f4a2 |
octspergrp = cols;
|
|
Karsten Hopp |
c9f4a2 |
+ else if (hextype == HEX_LITTLEENDIAN && (octspergrp & (octspergrp-1)))
|
|
Karsten Hopp |
c9f4a2 |
+ {
|
|
Karsten Hopp |
c9f4a2 |
+ fprintf(stderr,
|
|
Karsten Hopp |
c9f4a2 |
+ "%s: number of octets per group must be a power of 2 with -e.\n",
|
|
Karsten Hopp |
c9f4a2 |
+ pname);
|
|
Karsten Hopp |
c9f4a2 |
+ exit(1);
|
|
Karsten Hopp |
c9f4a2 |
+ }
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
if (argc > 3)
|
|
Karsten Hopp |
c9f4a2 |
exit_with_usage();
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 781,789 ****
|
|
Karsten Hopp |
c9f4a2 |
return 0;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! /* hextype: HEX_NORMAL or HEX_BITS */
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (hextype == HEX_NORMAL)
|
|
Karsten Hopp |
c9f4a2 |
grplen = octspergrp + octspergrp + 1; /* chars per octet group */
|
|
Karsten Hopp |
c9f4a2 |
else /* hextype == HEX_BITS */
|
|
Karsten Hopp |
c9f4a2 |
grplen = 8 * octspergrp + 1;
|
|
Karsten Hopp |
c9f4a2 |
--- 808,816 ----
|
|
Karsten Hopp |
c9f4a2 |
return 0;
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! /* hextype: HEX_NORMAL or HEX_BITS or HEX_LITTLEENDIAN */
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! if (hextype != HEX_BITS)
|
|
Karsten Hopp |
c9f4a2 |
grplen = octspergrp + octspergrp + 1; /* chars per octet group */
|
|
Karsten Hopp |
c9f4a2 |
else /* hextype == HEX_BITS */
|
|
Karsten Hopp |
c9f4a2 |
grplen = 8 * octspergrp + 1;
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 793,818 ****
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
if (p == 0)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! sprintf(l, "%07lx: ", n + seekoff);
|
|
Karsten Hopp |
c9f4a2 |
for (c = 9; c < LLEN; l[c++] = ' ');
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
if (hextype == HEX_NORMAL)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (9 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
! l[++c] = hexx[ e & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
else /* hextype == HEX_BITS */
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
int i;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! c = (9 + (grplen * p) / octspergrp) - 1;
|
|
Karsten Hopp |
c9f4a2 |
for (i = 7; i >= 0; i--)
|
|
Karsten Hopp |
c9f4a2 |
l[++c] = (e & (1 << i)) ? '1' : '0';
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
if (ebcdic)
|
|
Karsten Hopp |
c9f4a2 |
e = (e < 64) ? '.' : etoa64[e-64];
|
|
Karsten Hopp |
c9f4a2 |
/* When changing this update definition of LLEN above. */
|
|
Karsten Hopp |
c9f4a2 |
! l[11 + (grplen * cols - 1)/octspergrp + p] =
|
|
Karsten Hopp |
c9f4a2 |
#ifdef __MVS__
|
|
Karsten Hopp |
c9f4a2 |
(e >= 64)
|
|
Karsten Hopp |
c9f4a2 |
#else
|
|
Karsten Hopp |
c9f4a2 |
--- 820,852 ----
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
if (p == 0)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! sprintf(l, "%08lx:",
|
|
Karsten Hopp |
c9f4a2 |
! ((unsigned long)(n + seekoff + displayoff)) & 0xffffffff);
|
|
Karsten Hopp |
c9f4a2 |
for (c = 9; c < LLEN; l[c++] = ' ');
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
if (hextype == HEX_NORMAL)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (10 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
! l[++c] = hexx[ e & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
! }
|
|
Karsten Hopp |
c9f4a2 |
! else if (hextype == HEX_LITTLEENDIAN)
|
|
Karsten Hopp |
c9f4a2 |
! {
|
|
Karsten Hopp |
c9f4a2 |
! int x = p ^ (octspergrp-1);
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (10 + (grplen * x) / octspergrp)] = hexx[(e >> 4) & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
! l[++c] = hexx[ e & 0xf];
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
else /* hextype == HEX_BITS */
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
int i;
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
! c = (10 + (grplen * p) / octspergrp) - 1;
|
|
Karsten Hopp |
c9f4a2 |
for (i = 7; i >= 0; i--)
|
|
Karsten Hopp |
c9f4a2 |
l[++c] = (e & (1 << i)) ? '1' : '0';
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
if (ebcdic)
|
|
Karsten Hopp |
c9f4a2 |
e = (e < 64) ? '.' : etoa64[e-64];
|
|
Karsten Hopp |
c9f4a2 |
/* When changing this update definition of LLEN above. */
|
|
Karsten Hopp |
c9f4a2 |
! l[12 + (grplen * cols - 1)/octspergrp + p] =
|
|
Karsten Hopp |
c9f4a2 |
#ifdef __MVS__
|
|
Karsten Hopp |
c9f4a2 |
(e >= 64)
|
|
Karsten Hopp |
c9f4a2 |
#else
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 824,830 ****
|
|
Karsten Hopp |
c9f4a2 |
n++;
|
|
Karsten Hopp |
c9f4a2 |
if (++p == cols)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
|
|
Karsten Hopp |
c9f4a2 |
xxdline(fpo, l, autoskip ? nonzero : 1);
|
|
Karsten Hopp |
c9f4a2 |
nonzero = 0;
|
|
Karsten Hopp |
c9f4a2 |
p = 0;
|
|
Karsten Hopp |
c9f4a2 |
--- 858,864 ----
|
|
Karsten Hopp |
c9f4a2 |
n++;
|
|
Karsten Hopp |
c9f4a2 |
if (++p == cols)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (12 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
|
|
Karsten Hopp |
c9f4a2 |
xxdline(fpo, l, autoskip ? nonzero : 1);
|
|
Karsten Hopp |
c9f4a2 |
nonzero = 0;
|
|
Karsten Hopp |
c9f4a2 |
p = 0;
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 834,840 ****
|
|
Karsten Hopp |
c9f4a2 |
die(2);
|
|
Karsten Hopp |
c9f4a2 |
if (p)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
|
|
Karsten Hopp |
c9f4a2 |
xxdline(fpo, l, 1);
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
else if (autoskip)
|
|
Karsten Hopp |
c9f4a2 |
--- 868,874 ----
|
|
Karsten Hopp |
c9f4a2 |
die(2);
|
|
Karsten Hopp |
c9f4a2 |
if (p)
|
|
Karsten Hopp |
c9f4a2 |
{
|
|
Karsten Hopp |
c9f4a2 |
! l[c = (12 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0';
|
|
Karsten Hopp |
c9f4a2 |
xxdline(fpo, l, 1);
|
|
Karsten Hopp |
c9f4a2 |
}
|
|
Karsten Hopp |
c9f4a2 |
else if (autoskip)
|
|
Karsten Hopp |
c9f4a2 |
*** ../vim-7.4.651/runtime/doc/xxd.1 2010-05-15 13:04:00.000000000 +0200
|
|
Karsten Hopp |
c9f4a2 |
--- runtime/doc/xxd.1 2015-03-05 17:45:27.064793726 +0100
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 76,81 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 76,91 ----
|
|
Karsten Hopp |
c9f4a2 |
This does not change the hexadecimal representation. The option is
|
|
Karsten Hopp |
c9f4a2 |
meaningless in combinations with \-r, \-p or \-i.
|
|
Karsten Hopp |
c9f4a2 |
.TP
|
|
Karsten Hopp |
c9f4a2 |
+ .IR \-e
|
|
Karsten Hopp |
c9f4a2 |
+ Switch to little-endian hexdump.
|
|
Karsten Hopp |
c9f4a2 |
+ This option treats byte groups as words in little-endian byte order.
|
|
Karsten Hopp |
c9f4a2 |
+ The default grouping of 4 bytes may be changed using
|
|
Karsten Hopp |
c9f4a2 |
+ .RI "" \-g .
|
|
Karsten Hopp |
c9f4a2 |
+ This option only applies to hexdump, leaving the ASCII (or EBCDIC)
|
|
Karsten Hopp |
c9f4a2 |
+ representation unchanged.
|
|
Karsten Hopp |
c9f4a2 |
+ The command line switches
|
|
Karsten Hopp |
c9f4a2 |
+ \-r, \-p, \-i do not work with this mode.
|
|
Karsten Hopp |
c9f4a2 |
+ .TP
|
|
Karsten Hopp |
c9f4a2 |
.IR "\-g bytes " | " \-groupsize bytes"
|
|
Karsten Hopp |
c9f4a2 |
separate the output of every
|
|
Karsten Hopp |
c9f4a2 |
.RI < bytes >
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 84,90 ****
|
|
Karsten Hopp |
c9f4a2 |
.I \-g 0
|
|
Karsten Hopp |
c9f4a2 |
to suppress grouping.
|
|
Karsten Hopp |
c9f4a2 |
.RI < Bytes "> defaults to " 2
|
|
Karsten Hopp |
c9f4a2 |
! in normal mode and \fI1\fP in bits mode.
|
|
Karsten Hopp |
c9f4a2 |
Grouping does not apply to postscript or include style.
|
|
Karsten Hopp |
c9f4a2 |
.TP
|
|
Karsten Hopp |
c9f4a2 |
.IR \-h " | " \-help
|
|
Karsten Hopp |
c9f4a2 |
--- 94,100 ----
|
|
Karsten Hopp |
c9f4a2 |
.I \-g 0
|
|
Karsten Hopp |
c9f4a2 |
to suppress grouping.
|
|
Karsten Hopp |
c9f4a2 |
.RI < Bytes "> defaults to " 2
|
|
Karsten Hopp |
c9f4a2 |
! in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
|
Karsten Hopp |
c9f4a2 |
Grouping does not apply to postscript or include style.
|
|
Karsten Hopp |
c9f4a2 |
.TP
|
|
Karsten Hopp |
c9f4a2 |
.IR \-h " | " \-help
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 99,104 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 109,119 ----
|
|
Karsten Hopp |
c9f4a2 |
.RI < len >
|
|
Karsten Hopp |
c9f4a2 |
octets.
|
|
Karsten Hopp |
c9f4a2 |
.TP
|
|
Karsten Hopp |
c9f4a2 |
+ .I \-o offset
|
|
Karsten Hopp |
c9f4a2 |
+ add
|
|
Karsten Hopp |
c9f4a2 |
+ .RI < offset >
|
|
Karsten Hopp |
c9f4a2 |
+ to the displayed file position.
|
|
Karsten Hopp |
c9f4a2 |
+ .TP
|
|
Karsten Hopp |
c9f4a2 |
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
|
Karsten Hopp |
c9f4a2 |
output in postscript continuous hexdump style. Also known as plain hexdump
|
|
Karsten Hopp |
c9f4a2 |
style.
|
|
Karsten Hopp |
c9f4a2 |
*** ../vim-7.4.651/src/version.c 2015-03-05 17:16:02.620687666 +0100
|
|
Karsten Hopp |
c9f4a2 |
--- src/version.c 2015-03-05 17:41:25.523515077 +0100
|
|
Karsten Hopp |
c9f4a2 |
***************
|
|
Karsten Hopp |
c9f4a2 |
*** 743,744 ****
|
|
Karsten Hopp |
c9f4a2 |
--- 743,746 ----
|
|
Karsten Hopp |
c9f4a2 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
c9f4a2 |
+ /**/
|
|
Karsten Hopp |
c9f4a2 |
+ 652,
|
|
Karsten Hopp |
c9f4a2 |
/**/
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
--
|
|
Karsten Hopp |
c9f4a2 |
FATHER: Make sure the Prince doesn't leave this room until I come and
|
|
Karsten Hopp |
c9f4a2 |
get him.
|
|
Karsten Hopp |
c9f4a2 |
FIRST GUARD: Not ... to leave the room ... even if you come and get him.
|
|
Karsten Hopp |
c9f4a2 |
FATHER: No. Until I come and get him.
|
|
Karsten Hopp |
c9f4a2 |
SECOND GUARD: Hic.
|
|
Karsten Hopp |
c9f4a2 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
c9f4a2 |
|
|
Karsten Hopp |
c9f4a2 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
c9f4a2 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
c9f4a2 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
c9f4a2 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|