diff options
author | June McEnroe | 2022-07-31 16:28:08 -0400 |
---|---|---|
committer | June McEnroe | 2022-07-31 18:17:08 -0400 |
commit | 93e841b29ea567f8ddc31ce7f104dce5396a71ba (patch) | |
tree | 9d844670e8e88af199410f66c7c2e90a91233bcb /chat.h | |
parent | be6052e9a933b4b792f65f50ea009bb68a3f5e93 (diff) |
Move cache color to an Entry struct
So that more values can be added sensibly.
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 8 |
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); |