Implement blackhole register "_
[vis.git] / register.h
blob1b146888b75d55e5b9bb02aade50c86677abd7a0
1 #ifndef REGISTER_H
2 #define REGISTER_H
4 #include <stddef.h>
5 #include <stdbool.h>
6 #include "buffer.h"
7 #include "text-util.h"
9 typedef struct {
10 Buffer buf;
11 bool linewise; /* place register content on a new line when inserting? */
12 enum {
13 REGISTER_NORMAL,
14 REGISTER_BLACKHOLE,
15 } type;
16 } Register;
18 void register_release(Register *reg);
19 const char *register_get(Register *reg, size_t *len);
20 bool register_put(Register *reg, Text *txt, Filerange *range);
21 bool register_append(Register *reg, Text *txt, Filerange *range);
23 #endif