1 /* 2 * Copyright 2009, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef UNICODE_BLOCKS_H 6 #define UNICODE_BLOCKS_H 7 8 9 #include <UnicodeBlockObjects.h> 10 11 12 struct unicode_block_entry { 13 const char* name; 14 uint32 start; 15 uint32 end; 16 bool private_block; 17 const unicode_block& block; 18 Countunicode_block_entry19 uint32 Count() const { return end + 1 - start; } 20 }; 21 22 extern const unicode_block kNoBlock; 23 extern const struct unicode_block_entry kUnicodeBlocks[]; 24 extern const uint32 kNumUnicodeBlocks; 25 26 int32 BlockForCharacter(const uint32 character); 27 28 #endif // UNICODE_BLOCKS_H 29