summaryrefslogtreecommitdiff
path: root/vcs-svn/sliding_window.h
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-26 02:27:48 -0500
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-26 02:27:48 -0500
commite9f3f8b6f4141dae526e9792ba6dede7aa038622 (patch)
treee4d1b8abaaef180f844b1d0f57afbc87e4c4f677 /vcs-svn/sliding_window.h
parentMerge branch 'db/svn-fe-code-purge' into svn-fe (diff)
parentvcs-svn: let deltas use data from preimage (diff)
downloadtgif-e9f3f8b6f4141dae526e9792ba6dede7aa038622.tar.xz
Merge branch 'db/delta-applier' into db/text-delta
* db/delta-applier: vcs-svn: let deltas use data from preimage vcs-svn: let deltas use data from postimage vcs-svn: verify that deltas consume all inline data vcs-svn: implement copyfrom_data delta instruction vcs-svn: read instructions from deltas vcs-svn: read inline data from deltas vcs-svn: read the preimage when applying deltas vcs-svn: parse svndiff0 window header vcs-svn: skeleton of an svn delta parser vcs-svn: make buffer_read_binary API more convenient vcs-svn: learn to maintain a sliding view of a file Makefile: list one vcs-svn/xdiff object or header per line Conflicts: Makefile vcs-svn/LICENSE
Diffstat (limited to 'vcs-svn/sliding_window.h')
-rw-r--r--vcs-svn/sliding_window.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcs-svn/sliding_window.h b/vcs-svn/sliding_window.h
new file mode 100644
index 0000000000..ed0bfdd65c
--- /dev/null
+++ b/vcs-svn/sliding_window.h
@@ -0,0 +1,17 @@
+#ifndef SLIDING_WINDOW_H_
+#define SLIDING_WINDOW_H_
+
+#include "strbuf.h"
+
+struct sliding_view {
+ struct line_buffer *file;
+ off_t off;
+ size_t width;
+ struct strbuf buf;
+};
+
+#define SLIDING_VIEW_INIT(input) { (input), 0, 0, STRBUF_INIT }
+
+extern int move_window(struct sliding_view *view, off_t off, size_t width);
+
+#endif