Mercurial > libunicode
comparison generator/make-unicode/src/utf.h @ 9:d9309daa0d7b
Style
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 19 Oct 2018 13:31:36 +0200 |
parents | f94206b2e05e |
children |
comparison
equal
deleted
inserted
replaced
8:e7a1a3c4f850 | 9:d9309daa0d7b |
---|---|
16 #ifndef _UTFH_ | 16 #ifndef _UTFH_ |
17 #define _UTFH_ 1 | 17 #define _UTFH_ 1 |
18 | 18 |
19 typedef unsigned int Rune; /* Code-point values in Unicode 4.0 are 21 bits wide.*/ | 19 typedef unsigned int Rune; /* Code-point values in Unicode 4.0 are 21 bits wide.*/ |
20 | 20 |
21 enum | 21 enum { |
22 { | 22 UTFmax = 4, /* maximum bytes per rune */ |
23 UTFmax = 4, /* maximum bytes per rune */ | 23 Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ |
24 Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */ | 24 Runeself = 0x80, /* rune and UTF sequences are the same (<) */ |
25 Runeself = 0x80, /* rune and UTF sequences are the same (<) */ | 25 Runeerror = 0xFFFD, /* decoding error in UTF */ |
26 Runeerror = 0xFFFD, /* decoding error in UTF */ | 26 Runemax = 0x10FFFF, /* maximum rune value */ |
27 Runemax = 0x10FFFF, /* maximum rune value */ | |
28 }; | 27 }; |
29 | 28 |
30 #ifdef __cplusplus | 29 #ifdef __cplusplus |
31 extern "C" { | 30 extern "C" { |
32 #endif | 31 #endif |