summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb33515)
raw | patch | inline | side by side (parent: fb33515)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 5 May 2006 09:35:58 +0000 (02:35 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 5 May 2006 09:50:11 +0000 (02:50 -0700) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
delta.h | patch | blob | history | |
diff-delta.c | patch | blob | history | |
patch-delta.c | patch | blob | history |
index 9464f3e9b08b959d11305688ce194867a4017817..09b2e1eed5dfc772feb38715f051eff43570d4cb 100644 (file)
--- a/delta.h
+++ b/delta.h
#define DELTA_H
/* handling of delta buffers */
-extern void *diff_delta(void *from_buf, unsigned long from_size,
- void *to_buf, unsigned long to_size,
+extern void *diff_delta(const void *from_buf, unsigned long from_size,
+ const void *to_buf, unsigned long to_size,
unsigned long *delta_size, unsigned long max_size);
extern void *patch_delta(void *src_buf, unsigned long src_size,
- void *delta_buf, unsigned long delta_size,
+ const void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
/* the smallest possible delta size is 4 bytes */
diff --git a/diff-delta.c b/diff-delta.c
index 1188b31cd0f1e2f3a1fc2096a10243a03b439021..5bc22047f8715b0b1e628ab5ba93afa68e2ccc9e 100644 (file)
--- a/diff-delta.c
+++ b/diff-delta.c
/* the maximum size for any opcode */
#define MAX_OP_SIZE COPYOP_SIZE(0xffffffff, 0xffffffff)
-void *diff_delta(void *from_buf, unsigned long from_size,
- void *to_buf, unsigned long to_size,
+void *diff_delta(const void *from_buf, unsigned long from_size,
+ const void *to_buf, unsigned long to_size,
unsigned long *delta_size,
unsigned long max_size)
{
diff --git a/patch-delta.c b/patch-delta.c
index d95f0d9721dd87c0d4aff485e32e0a68623ee5cc..affd4f673d15657306acb74f2446d636a34c4fa5 100644 (file)
--- a/patch-delta.c
+++ b/patch-delta.c
#include "delta.h"
void *patch_delta(void *src_buf, unsigned long src_size,
- void *delta_buf, unsigned long delta_size,
+ const void *delta_buf, unsigned long delta_size,
unsigned long *dst_size)
{
const unsigned char *data, *top;