diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2007-02-13 19:08:53 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2007-02-13 19:08:53 +0000 |
commit | 8c968ee7b98144c43e7453c026892abee5536e0c (patch) | |
tree | 457821fe9b23eb12f33dd640739c2379fbac476f /xdelta1/xdmain.c | |
parent | 990289208d555a760499623e30682d6fe19216e7 (diff) |
Fix parsing error for 0-instruction patch files.
Exit 0 on success for delta_command(). Used to exit 0 or 1 like diff.
Diffstat (limited to 'xdelta1/xdmain.c')
-rw-r--r-- | xdelta1/xdmain.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xdelta1/xdmain.c b/xdelta1/xdmain.c index ca7cdf4..8b6b800 100644 --- a/xdelta1/xdmain.c +++ b/xdelta1/xdmain.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #ifndef WINHACK | 39 | #ifndef WINHACK |
40 | #include <unistd.h> | 40 | #include <unistd.h> |
41 | #include <sys/mman.h> | 41 | #include <sys/mman.h> |
42 | #define O_BINARY 0 | 42 | // #define O_BINARY 0 |
43 | 43 | ||
44 | #else /* WINHACK */ | 44 | #else /* WINHACK */ |
45 | 45 | ||
@@ -260,6 +260,7 @@ help () | |||
260 | xd_error (" -h, --help Print this summary\n"); | 260 | xd_error (" -h, --help Print this summary\n"); |
261 | xd_error (" -n, --noverify Disable automatic MD5 verification\n"); | 261 | xd_error (" -n, --noverify Disable automatic MD5 verification\n"); |
262 | xd_error (" -p, --pristine Disable automatic GZIP decompression\n"); | 262 | xd_error (" -p, --pristine Disable automatic GZIP decompression\n"); |
263 | xd_error (" -q, --quiet Do not print warnings\n"); | ||
263 | xd_error (" -m, --maxmem=SIZE Set the buffer size limit, e.g. 640K, 16M\n"); | 264 | xd_error (" -m, --maxmem=SIZE Set the buffer size limit, e.g. 640K, 16M\n"); |
264 | xd_error (" -[0-9] ZLIB compress level: 0=none, 1=fast, 6=default, 9=best\n"); | 265 | xd_error (" -[0-9] ZLIB compress level: 0=none, 1=fast, 6=default, 9=best\n"); |
265 | xd_error (" -s=BLOCK_SIZE Sets block size (power of 2), minimum match length\n"); | 266 | xd_error (" -s=BLOCK_SIZE Sets block size (power of 2), minimum match length\n"); |
@@ -1527,7 +1528,6 @@ delta_command (gint argc, gchar** argv) | |||
1527 | xd_error ("using block size: %d bytes\n", xdp_blocksize ()); | 1528 | xd_error ("using block size: %d bytes\n", xdp_blocksize ()); |
1528 | } | 1529 | } |
1529 | 1530 | ||
1530 | |||
1531 | if (! (from = open_read_seek_handle (argv[0], &from_is_compressed, TRUE))) | 1531 | if (! (from = open_read_seek_handle (argv[0], &from_is_compressed, TRUE))) |
1532 | return 2; | 1532 | return 2; |
1533 | 1533 | ||
@@ -1647,7 +1647,10 @@ delta_command (gint argc, gchar** argv) | |||
1647 | 1647 | ||
1648 | xdp_generator_free (gen); | 1648 | xdp_generator_free (gen); |
1649 | 1649 | ||
1650 | return control_offset != header_offset; | 1650 | /* Note: prior to 1.1.5: |
1651 | * return control_offset != header_offset; | ||
1652 | */ | ||
1653 | return 0; | ||
1651 | } | 1654 | } |
1652 | 1655 | ||
1653 | static XdeltaPatch* | 1656 | static XdeltaPatch* |