summary refs log tree commit diff
path: root/bin/edi/log.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/edi/log.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/edi/log.c b/bin/edi/log.c
index b0bd117e..c91f5fd9 100644
--- a/bin/edi/log.c
+++ b/bin/edi/log.c
@@ -27,26 +27,26 @@ struct Log logAlloc(size_t cap) {
 	struct State *states = malloc(sizeof(*states) * cap);
 	if (!states) err(EX_OSERR, "malloc");
 	states[0] = (struct State) {
-		.table = NULL,
+		.table = TableEmpty,
 		.prev = 0,
 		.next = 0,
 	};
 	return (struct Log) {
 		.cap = cap,
 		.len = 1,
-		.index = 0,
+		.idx = 0,
 		.states = states,
 	};
 }
 
 void logFree(struct Log *log) {
 	for (size_t i = 0; i < log->len; ++i) {
-		free(log->states[i].table);
+		free(log->states[i].table.slices);
 	}
 	free(log->states);
 }
 
-void logPush(struct Log *log, struct Table *table) {
+void logPush(struct Log *log, struct Table table) {
 	if (log->len == log->cap) {
 		log->cap *= 2;
 		log->states = realloc(log->states, sizeof(*log->states) * log->cap);
@@ -55,9 +55,9 @@ void logPush(struct Log *log, struct Table *table) {
 	size_t next = log->len++;
 	log->states[next] = (struct State) {
 		.table = table,
-		.prev = log->index,
+		.prev = log->idx,
 		.next = next,
 	};
-	log->states[log->index].next = next;
-	log->index = next;
+	log->states[log->idx].next = next;
+	log->idx = next;
 }
>June McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe