aboutsummaryrefslogtreecommitdiff
path: root/contrib/less/charset.h
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2006-08-20 15:49:51 +0000
committerXin LI <delphij@FreeBSD.org>2006-08-20 15:49:51 +0000
commit6dcb072b3021f88118ab758d851d01be270f36b2 (patch)
tree66e8cb2705abe3d167ba3a94a60d37c894690ff2 /contrib/less/charset.h
parentba8e3be904c2f0df1a141a80573f97e3fe4930e7 (diff)
downloadsrc-6dcb072b3021f88118ab758d851d01be270f36b2.tar.gz
src-6dcb072b3021f88118ab758d851d01be270f36b2.zip
Import less v394
Notes
Notes: svn path=/vendor/less/dist/; revision=161475
Diffstat (limited to 'contrib/less/charset.h')
-rw-r--r--contrib/less/charset.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/less/charset.h b/contrib/less/charset.h
new file mode 100644
index 000000000000..237a36015cf6
--- /dev/null
+++ b/contrib/less/charset.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2005 Mark Nudelman
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Less License, as specified in the README file.
+ *
+ * For more information about less, or for information on how to
+ * contact the author, see the README file.
+ */
+
+#define IS_ASCII_OCTET(c) (((c) & 0x80) == 0)
+#define IS_UTF8_TRAIL(c) (((c) & 0xC0) == 0x80)
+#define IS_UTF8_LEAD2(c) (((c) & 0xE0) == 0xC0)
+#define IS_UTF8_LEAD3(c) (((c) & 0xF0) == 0xE0)
+#define IS_UTF8_LEAD4(c) (((c) & 0xF8) == 0xF0)
+#define IS_UTF8_LEAD5(c) (((c) & 0xFC) == 0xF8)
+#define IS_UTF8_LEAD6(c) (((c) & 0xFE) == 0xFC)
+#define IS_UTF8_INVALID(c) (((c) & 0xFE) == 0xFE)
+#define IS_UTF8_LEAD(c) (((c) & 0xC0) == 0xC0 && !IS_UTF8_INVALID(c))