diff options
Diffstat (limited to 'src/delta.h')
| -rw-r--r-- | src/delta.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/delta.h b/src/delta.h index b0b8e4183..4ca327992 100644 --- a/src/delta.h +++ b/src/delta.h @@ -46,11 +46,12 @@ extern unsigned long git_delta_sizeof_index(struct git_delta_index *index); * returned and *delta_size is updated with its size. The returned buffer * must be freed by the caller. */ -extern void * -git_delta_create(const struct git_delta_index *index, - const void *buf, unsigned long bufsize, - unsigned long *delta_size, - unsigned long max_delta_size); +extern void *git_delta_create( + const struct git_delta_index *index, + const void *buf, + unsigned long bufsize, + unsigned long *delta_size, + unsigned long max_delta_size); /* * diff_delta: create a delta from source buffer to target buffer @@ -60,15 +61,16 @@ git_delta_create(const struct git_delta_index *index, * pointer to the buffer with the delta data is returned and *delta_size is * updated with its size. The returned buffer must be freed by the caller. */ -GIT_INLINE(void *) -git_delta(const void *src_buf, unsigned long src_bufsize, - const void *trg_buf, unsigned long trg_bufsize, - unsigned long *delta_size, unsigned long max_delta_size) +GIT_INLINE(void *) git_delta( + const void *src_buf, unsigned long src_bufsize, + const void *trg_buf, unsigned long trg_bufsize, + unsigned long *delta_size, + unsigned long max_delta_size) { struct git_delta_index *index = git_delta_create_index(src_buf, src_bufsize); if (index) { - void *delta = git_delta_create(index, trg_buf, trg_bufsize, - delta_size, max_delta_size); + void *delta = git_delta_create( + index, trg_buf, trg_bufsize, delta_size, max_delta_size); git_delta_free_index(index); return delta; } @@ -82,9 +84,10 @@ git_delta(const void *src_buf, unsigned long src_bufsize, * *trg_bufsize is updated with its size. On failure a NULL pointer is * returned. The returned buffer must be freed by the caller. */ -extern void *git_delta_patch(const void *src_buf, unsigned long src_size, - const void *delta_buf, unsigned long delta_size, - unsigned long *dst_size); +extern void *git_delta_patch( + const void *src_buf, unsigned long src_size, + const void *delta_buf, unsigned long delta_size, + unsigned long *dst_size); /* the smallest possible delta size is 4 bytes */ #define GIT_DELTA_SIZE_MIN 4 @@ -93,9 +96,8 @@ extern void *git_delta_patch(const void *src_buf, unsigned long src_size, * This must be called twice on the delta data buffer, first to get the * expected source buffer size, and again to get the target buffer size. */ -GIT_INLINE(unsigned long) -git_delta_get_hdr_size(const unsigned char **datap, - const unsigned char *top) +GIT_INLINE(unsigned long) git_delta_get_hdr_size( + const unsigned char **datap, const unsigned char *top) { const unsigned char *data = *datap; unsigned long cmd, size = 0; |
