summaryrefslogtreecommitdiff
path: root/src/command.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-01-26 13:07:07 +0100
committerAlbert Cervin <albert@acervin.com>2023-01-26 13:07:07 +0100
commite65158a0326108d1fc724ee683b7fa900ef2671a (patch)
tree9bad30b377a326e0d0e3101c4f96228ae7a41673 /src/command.c
parent9a2b138a03e27d0f04101fe6ae3977d79518c513 (diff)
downloaddged-e65158a0326108d1fc724ee683b7fa900ef2671a.tar.gz
dged-e65158a0326108d1fc724ee683b7fa900ef2671a.tar.xz
dged-e65158a0326108d1fc724ee683b7fa900ef2671a.zip
More tests and documentation
Also, split out platform-specific parts and add mocks for tests.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index f8add1b..b2f0c71 100644
--- a/src/command.c
+++ b/src/command.c
@@ -4,6 +4,11 @@
#include <stdlib.h>
+struct hashed_command {
+ uint32_t hash;
+ struct command command;
+};
+
struct commands command_registry_create(uint32_t capacity) {
return (struct commands){
.commands = calloc(capacity, sizeof(struct hashed_command)),