libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

character.c (1757B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include "util.h"
      3 
      4 #define FILE_EMOJI    "data/emoji-data.txt"
      5 #define FILE_GRAPHEME "data/GraphemeBreakProperty.txt"
      6 
      7 static const struct property_spec char_break_property[] = {
      8 	{
      9 		.enumname = "OTHER",
     10 		.file     = NULL,
     11 		.ucdname  = NULL,
     12 	},
     13 	{
     14 		.enumname = "CONTROL",
     15 		.file     = FILE_GRAPHEME,
     16 		.ucdname  = "Control",
     17 	},
     18 	{
     19 		.enumname = "CR",
     20 		.file     = FILE_GRAPHEME,
     21 		.ucdname  = "CR",
     22 	},
     23 	{
     24 		.enumname = "EXTEND",
     25 		.file     = FILE_GRAPHEME,
     26 		.ucdname  = "Extend",
     27 	},
     28 	{
     29 		.enumname = "EXTENDED_PICTOGRAPHIC",
     30 		.file     = FILE_EMOJI,
     31 		.ucdname  = "Extended_Pictographic",
     32 	},
     33 	{
     34 		.enumname = "HANGUL_L",
     35 		.file     = FILE_GRAPHEME,
     36 		.ucdname  = "L",
     37 	},
     38 	{
     39 		.enumname = "HANGUL_V",
     40 		.file     = FILE_GRAPHEME,
     41 		.ucdname  = "V",
     42 	},
     43 	{
     44 		.enumname = "HANGUL_T",
     45 		.file     = FILE_GRAPHEME,
     46 		.ucdname  = "T",
     47 	},
     48 	{
     49 		.enumname = "HANGUL_LV",
     50 		.file     = FILE_GRAPHEME,
     51 		.ucdname  = "LV",
     52 	},
     53 	{
     54 		.enumname = "HANGUL_LVT",
     55 		.file     = FILE_GRAPHEME,
     56 		.ucdname  = "LVT",
     57 	},
     58 	{
     59 		.enumname = "LF",
     60 		.file     = FILE_GRAPHEME,
     61 		.ucdname  = "LF",
     62 	},
     63 	{
     64 		.enumname = "PREPEND",
     65 		.file     = FILE_GRAPHEME,
     66 		.ucdname  = "Prepend",
     67 	},
     68 	{
     69 		.enumname = "REGIONAL_INDICATOR",
     70 		.file     = FILE_GRAPHEME,
     71 		.ucdname  = "Regional_Indicator",
     72 	},
     73 	{
     74 		.enumname = "SPACINGMARK",
     75 		.file     = FILE_GRAPHEME,
     76 		.ucdname  = "SpacingMark",
     77 	},
     78 	{
     79 		.enumname = "ZWJ",
     80 		.file     = FILE_GRAPHEME,
     81 		.ucdname  = "ZWJ",
     82 	},
     83 };
     84 
     85 int
     86 main(int argc, char *argv[])
     87 {
     88 	(void)argc;
     89 
     90 	properties_generate_break_property(char_break_property,
     91 	                                   LEN(char_break_property),
     92 	                                   "char", argv[0]);
     93 
     94 	return 0;
     95 }