comparison src/xxd/xxd.c @ 15695:ac05f8fb4200 v8.1.0855

patch 8.1.0855: cannot build xxd with MSVC 10 commit https://github.com/vim/vim/commit/af703585a34aa30bb5bdf8c05e4be8b3c66f787a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 31 11:00:42 2019 +0100 patch 8.1.0855: cannot build xxd with MSVC 10 Problem: Cannot build xxd with MSVC 10. Solution: Move declaration to start of block.
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Jan 2019 11:15:07 +0100
parents e00983850550
children 2d8fa45b341d
comparison
equal deleted inserted replaced
15694:1a8f97622760 15695:ac05f8fb4200
470 int grplen; /* total chars per octet group */ 470 int grplen; /* total chars per octet group */
471 long length = -1, n = 0, seekoff = 0; 471 long length = -1, n = 0, seekoff = 0;
472 unsigned long displayoff = 0; 472 unsigned long displayoff = 0;
473 static char l[LLEN+1]; /* static because it may be too big for stack */ 473 static char l[LLEN+1]; /* static because it may be too big for stack */
474 char *pp; 474 char *pp;
475 int addrlen = 9;
475 476
476 #ifdef AMIGA 477 #ifdef AMIGA
477 /* This program doesn't work when started from the Workbench */ 478 /* This program doesn't work when started from the Workbench */
478 if (argc == 0) 479 if (argc == 0)
479 exit(1); 480 exit(1);
818 if (hextype != HEX_BITS) 819 if (hextype != HEX_BITS)
819 grplen = octspergrp + octspergrp + 1; /* chars per octet group */ 820 grplen = octspergrp + octspergrp + 1; /* chars per octet group */
820 else /* hextype == HEX_BITS */ 821 else /* hextype == HEX_BITS */
821 grplen = 8 * octspergrp + 1; 822 grplen = 8 * octspergrp + 1;
822 823
823 int addrlen = 9;
824 e = 0; 824 e = 0;
825 while ((length < 0 || n < length) && (e = getc(fp)) != EOF) 825 while ((length < 0 || n < length) && (e = getc(fp)) != EOF)
826 { 826 {
827 if (p == 0) 827 if (p == 0)
828 { 828 {