summaryrefslogtreecommitdiff
path: root/src/dged/s8.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-03-07 20:19:26 +0100
committerAlbert Cervin <albert@acervin.com>2024-03-07 20:19:26 +0100
commita13750209b3836a4a6a16a7ba881625f397f160f (patch)
tree86c6ee6af1b44b613c6abc913957dda000c069a7 /src/dged/s8.h
parentf266c624ad197ea6add738df70702dcbf93cb198 (diff)
downloaddged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.gz
dged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.xz
dged-a13750209b3836a4a6a16a7ba881625f397f160f.zip
Implement timers properly
The timers shown with `M-x timers` are now actual timings.
Diffstat (limited to 'src/dged/s8.h')
-rw-r--r--src/dged/s8.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dged/s8.h b/src/dged/s8.h
new file mode 100644
index 0000000..955a642
--- /dev/null
+++ b/src/dged/s8.h
@@ -0,0 +1,18 @@
+#ifndef _S8_H
+#define _S8_H
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#define s8(s) ((struct s8){s, strlen(s)})
+
+struct s8 {
+ char *s;
+ uint32_t l;
+};
+
+bool s8eq(struct s8 s1, struct s8 s2);
+int s8cmp(struct s8 s1, struct s8 s2);
+char *s8tocstr(struct s8 s);
+
+#endif