From 93e841b29ea567f8ddc31ce7f104dce5396a71ba Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 31 Jul 2022 16:28:08 -0400 Subject: Move cache color to an Entry struct So that more values can be added sensibly. --- chat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chat.h') 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); -- cgit 1.4.1