about summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-07-31 16:28:08 -0400
committerJune McEnroe <june@causal.agency>2022-07-31 18:17:08 -0400
commit93e841b29ea567f8ddc31ce7f104dce5396a71ba (patch)
tree9d844670e8e88af199410f66c7c2e90a91233bcb /chat.h
parentOnly set cache color if not Default (diff)
downloadcatgirl-93e841b29ea567f8ddc31ce7f104dce5396a71ba.tar.gz
catgirl-93e841b29ea567f8ddc31ce7f104dce5396a71ba.zip
Move cache color to an Entry struct
So that more values can be added sensibly.
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/chat.h b/chat.h
index 1bc5f8f..aa2e6ab 100644
--- a/chat.h
+++ b/chat.h
@@ -396,14 +396,16 @@ int bufferReflow(
 	struct Buffer *buffer, int cols, enum Heat thresh, size_t tail
 );
 
+struct Entry {
+	enum Color color;
+};
 struct Cursor {
 	uint gen;
 	struct Node *node;
 };
-void cacheInsert(bool touch, uint id, const char *key);
-void cacheInsertColor(bool touch, uint id, const char *key, enum Color color);
+struct Entry *cacheInsert(bool touch, uint id, const char *key);
+const struct Entry *cacheGet(uint id, const char *key);
 void cacheReplace(bool touch, const char *old, const char *new);
-enum Color cacheColor(uint id, const char *key);
 const char *cacheComplete(struct Cursor *curs, uint id, const char *prefix);
 const char *cacheSearch(struct Cursor *curs, uint id, const char *substr);
 uint cacheID(struct Cursor *curs, const char *key);