summary refs log tree commit diff
path: root/bin/edi/edi.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/edi/edi.h12
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;