Merge branch 'rs/nth-switch-code-simplification'
[git/git.git] / vcs-svn / sliding_window.h
CommitLineData
0009d350
RJ
1#ifndef SLIDING_WINDOW_H
2#define SLIDING_WINDOW_H
9d2f5ddf
JN
3
4#include "strbuf.h"
5
6struct sliding_view {
7 struct line_buffer *file;
8 off_t off;
9 size_t width;
fbdd4f6f 10 off_t max_off; /* -1 means unlimited */
9d2f5ddf
JN
11 struct strbuf buf;
12};
13
fbdd4f6f 14#define SLIDING_VIEW_INIT(input, len) { (input), 0, 0, (len), STRBUF_INIT }
9d2f5ddf 15
55454427 16int move_window(struct sliding_view *view, off_t off, size_t width);
9d2f5ddf
JN
17
18#endif