utf8rewind  1.2.0
Cross-platform library for UTF-8 encoded text
unicodedatabase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2015 Quinten Lansu
3 
4  Permission is hereby granted, free of charge, to any person
5  obtaining a copy of this software and associated documentation
6  files (the "Software"), to deal in the Software without
7  restriction, including without limitation the rights to use,
8  copy, modify, merge, publish, distribute, sublicense, and/or
9  sell copies of the Software, and to permit persons to whom the
10  Software is furnished to do so, subject to the following
11  conditions:
12 
13  The above copyright notice and this permission notice shall be
14  included in all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23  OTHER DEALINGS IN THE SOFTWARE.
24 */
25 
26 #ifndef _UTF8REWIND_UNICODEDATABASE_H_
27 #define _UTF8REWIND_UNICODEDATABASE_H_
28 
36 #include "utf8rewind.h"
37 
38 typedef struct {
39  unicode_t start;
40  unicode_t end;
41  unicode_t count_and_value;
42 } QuickCheckRecord;
43 
44 typedef struct {
45  unicode_t codepoint;
46  size_t offset;
47 } DecompositionRecord;
48 
49 typedef struct {
50  uint64_t key;
51  unicode_t value;
52 } CompositionRecord;
53 
54 extern const size_t UnicodeQuickCheckGeneralCategoryRecordCount;
55 extern const QuickCheckRecord* UnicodeQuickCheckGeneralCategoryRecordPtr;
56 
57 extern const size_t UnicodeQuickCheckCanonicalCombiningClassRecordCount;
58 extern const QuickCheckRecord* UnicodeQuickCheckCanonicalCombiningClassRecordPtr;
59 
60 extern const size_t UnicodeQuickCheckNFCRecordCount;
61 extern const QuickCheckRecord* UnicodeQuickCheckNFCRecordPtr;
62 
63 extern const size_t UnicodeQuickCheckNFDRecordCount;
64 extern const QuickCheckRecord* UnicodeQuickCheckNFDRecordPtr;
65 
66 extern const size_t UnicodeQuickCheckNFKCRecordCount;
67 extern const QuickCheckRecord* UnicodeQuickCheckNFKCRecordPtr;
68 
69 extern const size_t UnicodeQuickCheckNFKDRecordCount;
70 extern const QuickCheckRecord* UnicodeQuickCheckNFKDRecordPtr;
71 
72 extern const size_t UnicodeNFDRecordCount;
73 extern const DecompositionRecord* UnicodeNFDRecordPtr;
74 
75 extern const size_t UnicodeNFKDRecordCount;
76 extern const DecompositionRecord* UnicodeNFKDRecordPtr;
77 
78 extern const size_t UnicodeUppercaseRecordCount;
79 extern const DecompositionRecord* UnicodeUppercaseRecordPtr;
80 
81 extern const size_t UnicodeLowercaseRecordCount;
82 extern const DecompositionRecord* UnicodeLowercaseRecordPtr;
83 
84 extern const size_t UnicodeTitlecaseRecordCount;
85 extern const DecompositionRecord* UnicodeTitlecaseRecordPtr;
86 
87 extern const size_t UnicodeCompositionRecordCount;
88 extern const CompositionRecord* UnicodeCompositionRecordPtr;
89 
90 extern const char* DecompositionData;
91 extern const size_t DecompositionDataLength;
92 
95 #endif /* _UTF8REWIND_UNICODEDATABASE_H_ */
uint32_t unicode_t
Unicode codepoint.
Definition: utf8rewind.h:178
Public interface for UTF-8 functions.