From d6fb797b11aa6dd031032faf425be3ce5a69661d Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 6 Aug 2018 14:19:52 -0400 Subject: Use wchar_t strings for all of UI vaswprintf is a nightmare. --- chat.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'chat.h') diff --git a/chat.h b/chat.h index 2c9239c..3d3586c 100644 --- a/chat.h +++ b/chat.h @@ -16,6 +16,7 @@ #define SOURCE_URL "https://code.causal.agency/june/chat" +#include #include #include #include @@ -41,11 +42,15 @@ void uiInit(void); void uiHide(void); void uiDraw(void); void uiRead(void); -void uiTopic(const char *topic); -void uiLog(const char *line); +void uiTopic(const wchar_t *topic); +void uiTopicStr(const char *topic); +void uiLog(const wchar_t *line); -__attribute__((format(printf, 1, 2))) -void uiFmt(const char *format, ...); +//__attribute__((format(printf, 1, 2))) +void uiFmt(const wchar_t *format, ...); void handle(char *line); void input(wchar_t *line); + +wchar_t *wcssep(wchar_t **stringp, const wchar_t *delim); +int vaswprintf(wchar_t **ret, const wchar_t *format, va_list ap); -- cgit 1.4.1