# HG changeset patch # User Bram Moolenaar # Date 1361884447 -3600 # Node ID d356b5ce84ceac41b036136807ebe887208fb6f0 # Parent 59b67ae4abc7756777779766f6ca1b7285cf6c4f updated for version 7.3.835 Problem: "xxd -i" fails on an empty file. Solution: Do output the closing } for an empty file. (partly by Lawrence Woodman) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 835, +/**/ 834, /**/ 833, diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c --- a/src/xxd/xxd.c +++ b/src/xxd/xxd.c @@ -729,9 +729,10 @@ main(argc, argv) if (c == EOF && ferror(fp)) die(2); - if (p) - if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF) - die(3); + if (p && fputs("\n", fpo) == EOF) + die(3); + if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF) + die(3); if (fp != stdin) {