| @@ -12,37 +12,36 @@ | | | @@ -12,37 +12,36 @@ |
12 | GNU General Public License for more details. | | 12 | GNU General Public License for more details. |
13 | | | 13 | |
14 | You should have received a copy of the GNU General Public License | | 14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software Foundation, | | 15 | along with this program; if not, write to the Free Software Foundation, |
16 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | | 16 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
17 | | | 17 | |
18 | #if HAVE_CONFIG_H | | 18 | #if HAVE_CONFIG_H |
19 | # include <config.h> | | 19 | # include <config.h> |
20 | #endif | | 20 | #endif |
21 | | | 21 | |
22 | /* Specification. */ | | 22 | /* Specification. */ |
23 | #include "uniname.h" | | 23 | #include "uniname.h" |
24 | | | 24 | |
| | | 25 | #include <sys/types.h> |
25 | #include <assert.h> | | 26 | #include <assert.h> |
26 | #include <stdbool.h> | | 27 | #include <stdbool.h> |
27 | #include <stdio.h> | | 28 | #include <stdio.h> |
28 | #include <string.h> | | 29 | #include <string.h> |
29 | | | 30 | |
30 | #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) | | 31 | #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) |
31 | | | 32 | |
32 | | | 33 | |
33 | /* Table of Unicode character names, derived from UnicodeData.txt. */ | | 34 | /* Table of Unicode character names, derived from UnicodeData.txt. */ |
34 | #define uint16_t unsigned short | | | |
35 | #define uint32_t unsigned int | | | |
36 | #include "uninames.h" | | 35 | #include "uninames.h" |
37 | /* It contains: | | 36 | /* It contains: |
38 | static const char unicode_name_words[26496] = ...; | | 37 | static const char unicode_name_words[26496] = ...; |
39 | #define UNICODE_CHARNAME_NUM_WORDS 4725 | | 38 | #define UNICODE_CHARNAME_NUM_WORDS 4725 |
40 | static const struct { uint16_t extra_offset; uint16_t ind_offset; } unicode_name_by_length[26] = ...; | | 39 | static const struct { uint16_t extra_offset; uint16_t ind_offset; } unicode_name_by_length[26] = ...; |
41 | #define UNICODE_CHARNAME_WORD_HANGUL 3030 | | 40 | #define UNICODE_CHARNAME_WORD_HANGUL 3030 |
42 | #define UNICODE_CHARNAME_WORD_SYLLABLE 3891 | | 41 | #define UNICODE_CHARNAME_WORD_SYLLABLE 3891 |
43 | #define UNICODE_CHARNAME_WORD_CJK 367 | | 42 | #define UNICODE_CHARNAME_WORD_CJK 367 |
44 | #define UNICODE_CHARNAME_WORD_COMPATIBILITY 4585 | | 43 | #define UNICODE_CHARNAME_WORD_COMPATIBILITY 4585 |
45 | static const uint16_t unicode_names[53315] = ...; | | 44 | static const uint16_t unicode_names[53315] = ...; |
46 | static const struct { uint16_t code; uint16_t name; } unicode_name_to_code[12886] = ...; | | 45 | static const struct { uint16_t code; uint16_t name; } unicode_name_to_code[12886] = ...; |
47 | static const struct { uint16_t code; uint16_t name; } unicode_code_to_name[12886] = ...; | | 46 | static const struct { uint16_t code; uint16_t name; } unicode_code_to_name[12886] = ...; |
48 | #define UNICODE_CHARNAME_MAX_LENGTH 83 | | 47 | #define UNICODE_CHARNAME_MAX_LENGTH 83 |