| OLD | NEW |
| 1 #include <stdlib.h> | 1 #include <stdlib.h> |
| 2 #include <stdint.h> | 2 #include <stdint.h> |
| 3 | 3 |
| 4 #include <harfbuzz-external.h> | 4 #include <harfbuzz-external.h> |
| 5 | 5 |
| 6 #include "tables/category-properties.h" | 6 #include "tables/category-properties.h" |
| 7 #include "tables/combining-properties.h" | 7 #include "tables/combining-properties.h" |
| 8 | 8 |
| 9 HB_LineBreakClass | 9 HB_LineBreakClass |
| 10 HB_GetLineBreakClass(HB_UChar32 ch) { | 10 HB_GetLineBreakClass(HB_UChar32 ch) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 static HB_CharCategory | 61 static HB_CharCategory |
| 62 code_point_to_category(HB_UChar32 cp) { | 62 code_point_to_category(HB_UChar32 cp) { |
| 63 const void *vprop = bsearch((void *) (intptr_t) cp, category_properties, | 63 const void *vprop = bsearch((void *) (intptr_t) cp, category_properties, |
| 64 category_properties_count, | 64 category_properties_count, |
| 65 sizeof(struct category_property), | 65 sizeof(struct category_property), |
| 66 category_property_cmp); | 66 category_property_cmp); |
| 67 if (!vprop) | 67 if (!vprop) |
| 68 return HB_NoCategory; | 68 return HB_Other_NotAssigned; |
| 69 | 69 |
| 70 return ((const struct category_property *) vprop)->category; | 70 return ((const struct category_property *) vprop)->category; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void | 73 void |
| 74 HB_GetUnicodeCharProperties(HB_UChar32 ch, | 74 HB_GetUnicodeCharProperties(HB_UChar32 ch, |
| 75 HB_CharCategory *category, | 75 HB_CharCategory *category, |
| 76 int *combiningClass) { | 76 int *combiningClass) { |
| 77 *category = code_point_to_category(ch); | 77 *category = code_point_to_category(ch); |
| 78 *combiningClass = code_point_to_combining_class(ch); | 78 *combiningClass = code_point_to_combining_class(ch); |
| 79 } | 79 } |
| 80 | 80 |
| 81 HB_CharCategory | 81 HB_CharCategory |
| 82 HB_GetUnicodeCharCategory(HB_UChar32 ch) { | 82 HB_GetUnicodeCharCategory(HB_UChar32 ch) { |
| 83 return code_point_to_category(ch); | 83 return code_point_to_category(ch); |
| 84 } | 84 } |
| OLD | NEW |