diff options
author | June McEnroe <june@causal.agency> | 2018-11-24 01:10:07 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-11-24 01:10:07 -0500 |
commit | 510285776ecbe1417582b717201221ed3289ac8d (patch) | |
tree | d30102b1645bdef975c861aa9ae783c0a9b9ce20 /bin/edi/edi.h | |
parent | Set default .asm, .h, .sh syntax modes for vim (diff) | |
download | src-510285776ecbe1417582b717201221ed3289ac8d.tar.gz src-510285776ecbe1417582b717201221ed3289ac8d.zip |
Add premature serialization to edi
Diffstat (limited to 'bin/edi/edi.h')
-rw-r--r-- | bin/edi/edi.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/edi/edi.h b/bin/edi/edi.h index ed03bf21..751b250a 100644 --- a/bin/edi/edi.h +++ b/bin/edi/edi.h @@ -14,6 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdbool.h> +#include <stdio.h> #include <stdlib.h> #include <wchar.h> @@ -75,8 +77,8 @@ struct Log { size_t cap, len; size_t state; struct State { - struct Table table; size_t prev, next; + struct Table table; } *states; }; struct Log logAlloc(size_t cap); @@ -87,6 +89,14 @@ static inline struct Table *logTable(const struct Log *log) { return &log->states[log->state].table; } +struct Edit { + struct Buffer buf; + struct Log log; +}; + +bool storeWrite(FILE *stream, const struct Edit *edit); +bool storeRead(FILE *stream, struct Edit *edit); + struct File { char *path; struct Buffer buf; |