summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/chat.h b/chat.h
index 3668bcd..d53c7fe 100644
--- a/chat.h
+++ b/chat.h
@@ -276,6 +276,23 @@ void uiFormat(
 void uiLoad(const char *name);
 int uiSave(const char *name);
 
+enum { BufferCap = 1024 };
+struct Buffer;
+struct Line {
+	enum Heat heat;
+	time_t time;
+	char *str;
+};
+struct Buffer *bufferAlloc(void);
+void bufferFree(struct Buffer *buffer);
+const struct Line *bufferSoft(const struct Buffer *buffer, size_t i);
+const struct Line *bufferHard(const struct Buffer *buffer, size_t i);
+void bufferPush(
+	struct Buffer *buffer, int cols,
+	enum Heat heat, time_t time, const char *str
+);
+void bufferReflow(struct Buffer *buffer, int cols);
+
 enum Edit {
 	EditHead,
 	EditTail,