summaryrefslogtreecommitdiff
path: root/delta.h
diff options
context:
space:
mode:
Diffstat (limited to 'delta.h')
-rw-r--r--delta.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/delta.h b/delta.h
new file mode 100644
index 0000000..8014986
--- /dev/null
+++ b/delta.h
@@ -0,0 +1,29 @@
+
+#ifdef BSDIFF_SIZET
+typedef size_t bsuint;
+typedef ssize_t bsint;
+#else
+typedef unsigned int bsuint;
+typedef int bsint;
+#endif
+
+struct instr {
+ bsuint copyout;
+ bsuint copyin;
+ bsuint copyinoff;
+ bsuint copyoutoff;
+};
+
+void mkdiff(int mode, unsigned char *old, bsuint oldlen, unsigned char *new, bsuint newlen, struct instr **instrp, int *instrlenp, unsigned char **instrblkp, unsigned int *instrblklenp, unsigned char **addblkp, unsigned int *addblklenp, unsigned char **extrablkp, unsigned int *extrablklenp);
+
+/* step support */
+void *mkdiff_step_setup(int mode);
+void mkdiff_step(void *sdata, unsigned char *old, bsuint oldlen, unsigned char *new, bsuint newlen, struct instr *instr, bsuint *scanp, bsuint *lastposp, bsuint *lastscanp);
+void mkdiff_step_freedata(void *sdata);
+void mkdiff_step_free(void *sdata);
+
+
+#define DELTAMODE_SUF 0
+#define DELTAMODE_HASH 1
+
+#define DELTAMODE_NOADDBLK 0x100