1#ifndef SLIDING_WINDOW_H
2#define SLIDING_WINDOW_H
34
#include "strbuf.h"
56
struct sliding_view {
7struct line_buffer *file;
8off_t off;
9size_t width;
10off_t max_off; /* -1 means unlimited */
11struct strbuf buf;
12};
1314
#define SLIDING_VIEW_INIT(input, len) { (input), 0, 0, (len), STRBUF_INIT }
1516
extern int move_window(struct sliding_view *view, off_t off, size_t width);
1718
#endif