]> git.lizzy.rs Git - linenoise.git/blobdiff - utf8.h
Use CMake
[linenoise.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index d4fb206bf27747e1c8cd17d9ed2ce5193b46f28b..dd9c94ec7e383ff0617e02322ea4ac92dfacda0e 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -8,14 +8,16 @@ extern "C" {
 /**
  * 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))
@@ -25,6 +27,9 @@ extern "C" {
  #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'.