diff options
author | June McEnroe <june@causal.agency> | 2022-09-11 17:28:19 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-09-11 17:28:19 -0400 |
commit | d043bad63ded27b71bf2762f6c07ca1186058cf2 (patch) | |
tree | 3d1383a083e13a18d5b305bacfd41cc75aa592c6 /chat.h | |
parent | Use tparm, not tiparm (diff) | |
download | catgirl-d043bad63ded27b71bf2762f6c07ca1186058cf2.tar.gz catgirl-d043bad63ded27b71bf2762f6c07ca1186058cf2.zip |
Set pointer to Entry in Cursor
This feels a little redundant but the API makes sense, I think?
Diffstat (limited to '')
-rw-r--r-- | chat.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chat.h b/chat.h index 628d416..c7053c7 100644 --- a/chat.h +++ b/chat.h @@ -403,17 +403,19 @@ struct Entry { struct Cursor { uint gen; struct Node *node; + struct Entry *entry; }; -struct Entry *cacheInsert(bool touch, uint id, const char *key); const struct Entry *cacheGet(uint id, const char *key); +struct Entry *cacheInsert(bool touch, uint id, const char *key); void cacheReplace(bool touch, const char *old, const char *new); +void cacheRemove(uint id, const char *key); +void cacheClear(uint id); 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); +uint cacheNextID(struct Cursor *curs, const char *key); +const char *cacheNextKey(struct Cursor *curs, uint id); void cacheAccept(struct Cursor *curs); void cacheReject(struct Cursor *curs); -void cacheRemove(uint id, const char *key); -void cacheClear(uint id); extern struct Util urlOpenUtil; extern struct Util urlCopyUtil; |