summaryrefslogtreecommitdiff
path: root/emit.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@sourcefrog.net>2000-07-29 18:24:01 +0000
committerMartin Pool <mbp@sourcefrog.net>2000-07-29 18:24:01 +0000
commit7af4a0e7307c02a9f8c0d365314dfed593403e9c (patch)
tree9b74dd30ff33b8bc22613bcc98f4a373ce1dd852 /emit.c
parentb6672dea38dc9d2aff3566963c90859fcfc8e6b3 (diff)
downloadlibrsync-7af4a0e7307c02a9f8c0d365314dfed593403e9c.tar.gz
* Put genuine search encoding back into the nad algorithm, and
further clean up the nad code. Literals are now sent out using a literal buffer integrated with the input mapptr so that data is not copied. Checksums are still calculated from scratch each time rather than by rolling -- this is very slow but simple. * Reshuffle test cases so that they use files generated by hsmapread, rather than the source directory. This makes the tests quicker and more reproducible, hopefully without losing coverage. Further develop the test driver framework. * Add hsdumpsums debugging tool. * Hex strings (eg strong checksums) are broken up by underscores for readability. * Stats now go to the log rather than stdout. * mapptr acts properly when we're skipping/rewinding to data already present in the buffer -- it does a copy if required, but not necessarily real IO.
Diffstat (limited to 'emit.c')
-rw-r--r--emit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/emit.c b/emit.c
index ec3d9f4..448974a 100644
--- a/emit.c
+++ b/emit.c
@@ -146,6 +146,8 @@ _hs_send_literal(hs_write_fn_t write_fn,
size_t amount)
{
int ret;
+
+ assert(amount > 0);
_hs_trace("flush %d bytes of %s data",
(int) amount,
@@ -200,7 +202,8 @@ _hs_emit_signature_cmd(hs_write_fn_t write_fn, void *write_priv,
int
_hs_emit_copy(hs_write_fn_t write_fn, void *write_priv,
- hs_off_t offset, size_t length, hs_stats_t * stats)
+ hs_off_t offset, size_t length,
+ hs_stats_t * stats)
{
int ret;
int len_type, off_type;