| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.835 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.835 |
| Problem: "xxd -i" fails on an empty file. |
| Solution: Do output the closing } for an empty file. (partly by Lawrence |
| Woodman) |
| Files: src/xxd/xxd.c |
| |
| |
| |
| |
| |
| *** 729,737 **** |
| if (c == EOF && ferror(fp)) |
| die(2); |
| |
| ! if (p) |
| ! if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF) |
| ! die(3); |
| |
| if (fp != stdin) |
| { |
| --- 729,738 ---- |
| if (c == EOF && ferror(fp)) |
| die(2); |
| |
| ! if (p && fputs("\n", fpo) == EOF) |
| ! die(3); |
| ! if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF) |
| ! die(3); |
| |
| if (fp != stdin) |
| { |
| |
| |
| |
| *** 730,731 **** |
| --- 730,733 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 835, |
| /**/ |
| |
| -- |
| For society, it's probably a good thing that engineers value function over |
| appearance. For example, you wouldn't want engineers to build nuclear power |
| plants that only _look_ like they would keep all the radiation inside. |
| (Scott Adams - The Dilbert principle) |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |