From 510285776ecbe1417582b717201221ed3289ac8d Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 24 Nov 2018 01:10:07 -0500 Subject: Add premature serialization to edi --- bin/edi/edi.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bin/edi/edi.h') 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 . */ +#include +#include #include #include @@ -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; -- cgit 1.4.1