From 4961fdf75ead42902d13e847356bf8c554d0a9c9 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 3 Feb 2023 16:21:26 -0500 Subject: Flatten cache structs --- chat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chat.h') diff --git a/chat.h b/chat.h index 15c757f..8086c9e 100644 --- a/chat.h +++ b/chat.h @@ -409,12 +409,15 @@ int bufferReflow( ); struct Entry { + uint id; + char *key; enum Color color; uint prefixBits; + struct Entry *prev; + struct Entry *next; }; struct Cursor { uint gen; - struct Node *node; struct Entry *entry; }; const struct Entry *cacheGet(uint id, const char *key); @@ -426,8 +429,7 @@ const char *cacheComplete(struct Cursor *curs, uint id, const char *prefix); const char *cacheSearch(struct Cursor *curs, uint id, const char *substr); 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 cacheTouch(struct Cursor *curs); extern struct Util urlOpenUtil; extern struct Util urlCopyUtil; -- cgit 1.4.1