6 #define LINE_BUFFER_LEN 10000
9 char line_buffer
[LINE_BUFFER_LEN
];
10 struct strbuf blob_buffer
;
13 #define LINE_BUFFER_INIT {"", STRBUF_INIT, NULL}
15 int buffer_init(struct line_buffer
*buf
, const char *filename
);
16 int buffer_deinit(struct line_buffer
*buf
);
17 int buffer_ferror(struct line_buffer
*buf
);
18 int buffer_at_eof(struct line_buffer
*buf
);
19 char *buffer_read_line(struct line_buffer
*buf
);
20 char *buffer_read_string(struct line_buffer
*buf
, uint32_t len
);
21 int buffer_read_char(struct line_buffer
*buf
);
22 void buffer_read_binary(struct strbuf
*sb
, uint32_t len
, struct line_buffer
*f
);
23 void buffer_copy_bytes(struct line_buffer
*buf
, off_t len
);
24 off_t
buffer_skip_bytes(struct line_buffer
*buf
, off_t len
);
25 void buffer_reset(struct line_buffer
*buf
);