summaryrefslogtreecommitdiff
path: root/src/undo.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-02-25 21:37:48 +0100
committerAlbert Cervin <albert@acervin.com>2023-02-25 21:38:59 +0100
commit40db61eb7a2019ced97f09a9687139f35749f4e0 (patch)
tree9291e44eb82721732d04146b5042545e1b9e91f9 /src/undo.h
parent44fd8cde61e3e89e5f83c98900a403e922073727 (diff)
downloaddged-40db61eb7a2019ced97f09a9687139f35749f4e0.tar.gz
dged-40db61eb7a2019ced97f09a9687139f35749f4e0.tar.xz
dged-40db61eb7a2019ced97f09a9687139f35749f4e0.zip
Introduce vec and hashmap
Convenience macros for a hashmap and a growable vector.
Diffstat (limited to 'src/undo.h')
-rw-r--r--src/undo.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/undo.h b/src/undo.h
index 42022c5..1ce3a8a 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -1,3 +1,4 @@
+#include "vec.h"
#include <stdbool.h>
#include <stdint.h>
@@ -40,10 +41,8 @@ struct undo_record {
#define INVALID_TOP -1
struct undo_stack {
- struct undo_record *records;
- uint32_t nrecords;
+ VEC(struct undo_record) records;
uint32_t top;
- uint32_t capacity;
bool undo_in_progress;
};