/**
* UTF-8 utility functions
*
- * (c) 2010-2016 Steve Bennett <steveb@workware.net.au>
+ * (c) 2010-2019 Steve Bennett <steveb@workware.net.au>
*
- * See LICENCE for licence details.
+ * See utf8.c for licence details.
*/
#ifndef USE_UTF8
#include <ctype.h>
+#define MAX_UTF8_LEN 1
+
/* No utf-8 support. 1 byte = 1 char */
#define utf8_strlen(S, B) ((B) < 0 ? (int)strlen(S) : (B))
#define utf8_strwidth(S, B) utf8_strlen((S), (B))
#define utf8_width(C) 1
#else
+
+#define MAX_UTF8_LEN 4
+
/**
* Converts the given unicode codepoint (0 - 0x1fffff) to utf-8
* and stores the result at 'p'.