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 | cab57be05c395b18fb726ec2ec64880445caa54a (patch) | |
tree | 40ea82c33b5debdcaf6eeda6b971e59edf6ad69f /bin/edi/edi.h | |
parent | Set default .asm, .h, .sh syntax modes for vim (diff) | |
download | src-cab57be05c395b18fb726ec2ec64880445caa54a.tar.gz src-cab57be05c395b18fb726ec2ec64880445caa54a.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 be7bf681..f335d1bd 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; |