|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "ucd/ucd.h" |
|
|
#include "ucd/ucd.h" |
|
|
|
|
|
|
|
|
static int properties_Cc(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Cc(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
if (c >= 0x0009 && c <= 0x000D) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
if (c >= 0x0009 && c <= 0x000D) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
if (c == 0x0085) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
if (c == 0x0085) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Cf(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Cf(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
if (c == 0x00AD) return UCD_PROPERTY_HYPHEN; |
|
|
if (c == 0x00AD) return UCD_PROPERTY_HYPHEN; |
|
|
break; |
|
|
break; |
|
|
case 0x0600: |
|
|
case 0x0600: |
|
|
|
|
|
if (c >= 0x0600 && c <= 0x0605) return UCD_PROPERTY_PREPENDED_CONCATENATION_MARK; |
|
|
if (c == 0x061C) return UCD_PROPERTY_BIDI_CONTROL; |
|
|
if (c == 0x061C) return UCD_PROPERTY_BIDI_CONTROL; |
|
|
|
|
|
if (c == 0x06DD) return UCD_PROPERTY_PREPENDED_CONCATENATION_MARK; |
|
|
|
|
|
break; |
|
|
|
|
|
case 0x0700: |
|
|
|
|
|
if (c == 0x070F) return UCD_PROPERTY_PREPENDED_CONCATENATION_MARK; |
|
|
|
|
|
break; |
|
|
|
|
|
case 0x0800: |
|
|
|
|
|
if (c == 0x08E2) return UCD_PROPERTY_PREPENDED_CONCATENATION_MARK; |
|
|
break; |
|
|
break; |
|
|
case 0x2000: |
|
|
case 0x2000: |
|
|
if (c == 0x200C) return UCD_PROPERTY_JOIN_CONTROL | UCD_PROPERTY_OTHER_GRAPHEME_EXTEND; |
|
|
if (c == 0x200C) return UCD_PROPERTY_JOIN_CONTROL | UCD_PROPERTY_OTHER_GRAPHEME_EXTEND; |
|
|
|
|
|
|
|
|
if (c >= 0x2066 && c <= 0x2069) return UCD_PROPERTY_BIDI_CONTROL; |
|
|
if (c >= 0x2066 && c <= 0x2069) return UCD_PROPERTY_BIDI_CONTROL; |
|
|
if (c >= 0x206A && c <= 0x206F) return UCD_PROPERTY_DEPRECATED; |
|
|
if (c >= 0x206A && c <= 0x206F) return UCD_PROPERTY_DEPRECATED; |
|
|
break; |
|
|
break; |
|
|
|
|
|
case 0x011000: |
|
|
|
|
|
if (c == 0x0110BD) return UCD_PROPERTY_PREPENDED_CONCATENATION_MARK; |
|
|
|
|
|
break; |
|
|
case 0x0E0000: |
|
|
case 0x0E0000: |
|
|
if (c == 0x0E0001) return UCD_PROPERTY_DEPRECATED; |
|
|
|
|
|
|
|
|
if (c == 0x0E0001) return UCD_PROPERTY_DEPRECATED; |
|
|
if (c >= 0x0E0020 && c <= 0x0E007F) return UCD_PROPERTY_OTHER_GRAPHEME_EXTEND; |
|
|
if (c >= 0x0E0020 && c <= 0x0E007F) return UCD_PROPERTY_OTHER_GRAPHEME_EXTEND; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Cn(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Cn(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Ll(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Ll(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Lm(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Lm(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Lo(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Lo(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Lo_ideographic(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Lo_ideographic(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFF0000) |
|
|
switch (c & 0xFFFF0000) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Lu(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Lu(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Mc(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Mc(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Mn(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Mn(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Nd(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Nd(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Nl(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Nl(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_No(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_No(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Pc(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Pc(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Pd(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Pd(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return UCD_PROPERTY_DASH; |
|
|
return UCD_PROPERTY_DASH; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Pe(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Pe(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Pf(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Pf(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Pi(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Pi(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Po(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Po(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Ps(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Ps(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Sc(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Sc(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Sk(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Sk(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Sm(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Sm(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_So(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_So(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
switch (c & 0xFFFFFF00) |
|
|
switch (c & 0xFFFFFF00) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int properties_Zs(codepoint_t c) |
|
|
|
|
|
|
|
|
static ucd_property properties_Zs(codepoint_t c) |
|
|
{ |
|
|
{ |
|
|
if (c == 0x0020) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
if (c == 0x0020) return UCD_PROPERTY_WHITE_SPACE | UCD_PROPERTY_PATTERN_WHITE_SPACE; |
|
|
return UCD_PROPERTY_WHITE_SPACE; |
|
|
return UCD_PROPERTY_WHITE_SPACE; |