summaryrefslogtreecommitdiff
path: root/examples/dte/history.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/dte/history.h
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/dte/history.h')
-rw-r--r--examples/dte/history.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/examples/dte/history.h b/examples/dte/history.h
deleted file mode 100644
index 12073f5..0000000
--- a/examples/dte/history.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef HISTORY_H
-#define HISTORY_H
-
-#include <stdbool.h>
-#include <stddef.h>
-#include "util/hashmap.h"
-#include "util/macros.h"
-
-typedef struct HistoryEntry {
- struct HistoryEntry *next;
- struct HistoryEntry *prev;
- char *text;
-} HistoryEntry;
-
-// This is a HashMap with a doubly-linked list running through the
-// entries, in a way similar to the Java LinkedHashMap class. The
-// HashMap allows duplicates to be found and re-inserted at the end
-// of the list in O(1) time and the doubly-linked entries allow
-// ordered traversal.
-typedef struct {
- char *filename;
- HashMap entries;
- HistoryEntry *first;
- HistoryEntry *last;
- size_t max_entries;
-} History;
-
-void history_add(History *history, const char *text);
-bool history_search_forward(const History *history, const HistoryEntry **pos, const char *text) WARN_UNUSED_RESULT;
-bool history_search_backward(const History *history, const HistoryEntry **pos, const char *text) WARN_UNUSED_RESULT;
-void history_load(History *history, char *filename);
-void history_save(const History *history);
-void history_free(History *history);
-
-#endif