about summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/chat.h b/chat.h
index 15c757f..2a41cf6 100644
--- a/chat.h
+++ b/chat.h
@@ -202,7 +202,6 @@ enum Cap {
 
 extern struct Self {
 	bool debug;
-	bool kiosk;
 	bool restricted;
 	size_t pos;
 	enum Cap caps;
@@ -304,7 +303,7 @@ const char *commandIsPrivmsg(uint id, const char *input);
 const char *commandIsNotice(uint id, const char *input);
 const char *commandIsAction(uint id, const char *input);
 size_t commandWillSplit(uint id, const char *input);
-void commandCache(void);
+void commandCompletion(void);
 
 enum Heat {
 	Ice,
@@ -346,7 +345,7 @@ void inputWait(void);
 void inputUpdate(void);
 bool inputPending(uint id);
 void inputRead(void);
-void inputCache(void);
+void inputCompletion(void);
 int inputSave(FILE *file);
 void inputLoad(FILE *file, size_t version);
 
@@ -408,26 +407,22 @@ int bufferReflow(
 	struct Buffer *buffer, int cols, enum Heat thresh, size_t tail
 );
 
-struct Entry {
-	enum Color color;
-	uint prefixBits;
-};
 struct Cursor {
 	uint gen;
 	struct Node *node;
-	struct Entry *entry;
 };
-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 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 completePush(uint id, const char *str, enum Color color);
+void completePull(uint id, const char *str, enum Color color);
+void completeReplace(const char *old, const char *new);
+void completeRemove(uint id, const char *str);
+enum Color completeColor(uint id, const char *str);
+uint *completeBits(uint id, const char *str);
+const char *completePrefix(struct Cursor *curs, uint id, const char *prefix);
+const char *completeSubstr(struct Cursor *curs, uint id, const char *substr);
+const char *completeEach(struct Cursor *curs, uint id);
+uint completeEachID(struct Cursor *curs, const char *str);
+void completeAccept(struct Cursor *curs);
+void completeReject(struct Cursor *curs);
 
 extern struct Util urlOpenUtil;
 extern struct Util urlCopyUtil;