diff options
author | C. McEnroe | 2020-02-05 00:20:39 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-05 00:20:39 -0500 |
commit | 4cce893eab7403821ff211f64a7df05051fd6f52 (patch) | |
tree | 3499aa89f3a5b59356abcc9c215babe057bff4a4 /chat.h | |
parent | 0df8bd51aa70cfa66951e8f08a6a3dce3fd45dec (diff) |
Add extremely basic editing and message sending
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chat.h b/chat.h index c754357..c8b31c2 100644 --- a/chat.h +++ b/chat.h @@ -20,6 +20,7 @@ #include <string.h> #include <sysexits.h> #include <time.h> +#include <wchar.h> #define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0])) #define BIT(x) x##Bit, x = 1 << x##Bit, x##Bit_ = x##Bit @@ -109,6 +110,7 @@ void ircFormat(const char *format, ...) __attribute__((format(printf, 1, 2))); void handle(struct Message msg); +void command(size_t id, char *input); enum Heat { Cold, Warm, Hot }; void uiInit(void); @@ -122,8 +124,14 @@ void uiFormat( size_t id, enum Heat heat, const time_t *time, const char *format, ... ) __attribute__((format(printf, 4, 5))); -const char *editHead(void); -const char *editTail(void); +enum Edit { + EditKill, + EditInsert, + EditEnter, +}; +void edit(size_t id, enum Edit op, wchar_t ch); +char *editHead(void); +char *editTail(void); static inline enum Color hash(const char *str) { if (*str == '~') str++; |