character-prop.c (2051B)
1 /* See LICENSE file for copyright and license details. */ 2 #include <stddef.h> 3 4 #include "util.h" 5 6 #define FILE_EMOJI "data/emoji-data.txt" 7 #define FILE_GRAPHEME "data/GraphemeBreakProperty.txt" 8 9 static struct property segment_property[] = { 10 { 11 .enumname = "CHARACTER_PROP_CONTROL", 12 .identifier = "Control", 13 .fname = FILE_GRAPHEME, 14 }, 15 { 16 .enumname = "CHARACTER_PROP_CR", 17 .identifier = "CR", 18 .fname = FILE_GRAPHEME, 19 }, 20 { 21 .enumname = "CHARACTER_PROP_EXTEND", 22 .identifier = "Extend", 23 .fname = FILE_GRAPHEME, 24 }, 25 { 26 .enumname = "CHARACTER_PROP_EXTENDED_PICTOGRAPHIC", 27 .identifier = "Extended_Pictographic", 28 .fname = FILE_EMOJI, 29 }, 30 { 31 .enumname = "CHARACTER_PROP_HANGUL_L", 32 .identifier = "L", 33 .fname = FILE_GRAPHEME, 34 }, 35 { 36 .enumname = "CHARACTER_PROP_HANGUL_V", 37 .identifier = "V", 38 .fname = FILE_GRAPHEME, 39 }, 40 { 41 .enumname = "CHARACTER_PROP_HANGUL_T", 42 .identifier = "T", 43 .fname = FILE_GRAPHEME, 44 }, 45 { 46 .enumname = "CHARACTER_PROP_HANGUL_LV", 47 .identifier = "LV", 48 .fname = FILE_GRAPHEME, 49 }, 50 { 51 .enumname = "CHARACTER_PROP_HANGUL_LVT", 52 .identifier = "LVT", 53 .fname = FILE_GRAPHEME, 54 }, 55 { 56 .enumname = "CHARACTER_PROP_LF", 57 .identifier = "LF", 58 .fname = FILE_GRAPHEME, 59 }, 60 { 61 .enumname = "CHARACTER_PROP_PREPEND", 62 .identifier = "Prepend", 63 .fname = FILE_GRAPHEME, 64 }, 65 { 66 .enumname = "CHARACTER_PROP_REGIONAL_INDICATOR", 67 .identifier = "Regional_Indicator", 68 .fname = FILE_GRAPHEME, 69 }, 70 { 71 .enumname = "CHARACTER_PROP_SPACINGMARK", 72 .identifier = "SpacingMark", 73 .fname = FILE_GRAPHEME, 74 }, 75 { 76 .enumname = "CHARACTER_PROP_ZWJ", 77 .identifier = "ZWJ", 78 .fname = FILE_GRAPHEME, 79 }, 80 }; 81 82 int 83 main(int argc, char *argv[]) 84 { 85 (void)argc; 86 87 property_list_parse(segment_property, LEN(segment_property)); 88 property_list_print(segment_property, LEN(segment_property), 89 "character_prop", argv[0]); 90 property_list_free(segment_property, LEN(segment_property)); 91 92 return 0; 93 }