vis: move motion releated functions to corresponding file
[vis.git] / register.h
blob5909c9a419da93c7b53074bfbe4bb66f94851999
1 #ifndef REGISTER_H
2 #define REGISTER_H
4 #include <stddef.h>
5 #include <stdbool.h>
6 #include "buffer.h"
8 /* definition has to match Buffer */
9 typedef struct {
10 char *data; /* NULL if empty */
11 size_t len; /* current length of data */
12 size_t size; /* maximal capacity of the register */
13 bool linewise; /* place register content on a new line when inserting? */
14 } Register;
16 void register_release(Register *reg);
17 bool register_put(Register *reg, Text *txt, Filerange *range);
18 bool register_append(Register *reg, Text *txt, Filerange *range);
20 #endif