Go to the documentation of this file.
10 #if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION))
11 #define LE_USE_CMEMORY
120 #define LE_GLYPH_MASK 0x0000FFFF
129 #define LE_GLYPH_SHIFT 0
138 #define LE_SUB_FONT_MASK 0x00FF0000
147 #define LE_SUB_FONT_SHIFT 16
156 #define LE_CLIENT_MASK 0xFF000000
165 #define LE_CLIENT_SHIFT 24
174 #define LE_GET_GLYPH(gid) ((gid & LE_GLYPH_MASK) >> LE_GLYPH_SHIFT)
182 #define LE_GET_SUB_FONT(gid) ((gid & LE_SUB_FONT_MASK) >> LE_SUB_FONT_SHIFT)
190 #define LE_GET_CLIENT(gid) ((gid & LE_CLIENT_MASK) >> LE_CLIENT_SHIFT)
199 #define LE_SET_GLYPH(gid, glyph) ((gid & ~LE_GLYPH_MASK) | ((glyph << LE_GLYPH_SHIFT) & LE_GLYPH_MASK))
207 #define LE_SET_SUB_FONT(gid, font) ((gid & ~LE_SUB_FONT_MASK) | ((font << LE_SUB_FONT_SHIFT) & LE_SUB_FONT_MASK))
215 #define LE_SET_CLIENT(gid, client) ((gid & ~LE_CLIENT_MASK) | ((client << LE_CLIENT_SHIFT) & LE_CLIENT_MASK))
232 #ifndef U_HIDE_DEPRECATED_API
273 #ifndef U_HIDE_INTERNAL_API
279 #ifndef LE_ASSERT_BAD_FONT
280 #define LE_ASSERT_BAD_FONT 0
287 #if LE_ASSERT_BAD_FONT
289 #define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x));
291 #define LE_DEBUG_BAD_FONT(x)
300 #define LE_UINT32_MAX 0xFFFFFFFFU
302 #define LE_UINT32_MAX UINT32_MAX
306 #define LE_UINTPTR_MAX LE_UINT32_MAX
308 #define LE_UINTPTR_MAX UINTPTR_MAX
314 #define LE_RANGE_CHECK(type, count, ptrfn) (( (LE_UINTPTR_MAX / sizeof(type)) < (size_t)count ) ? NULL : (ptrfn))
320 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
322 #ifdef LE_USE_CMEMORY
328 #define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
336 #define LE_NEW_ARRAY(type, count) (type *) LE_RANGE_CHECK(type,count,uprv_malloc((count) * sizeof(type)))
344 #define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
352 #define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
365 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
372 #define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
380 #define LE_NEW_ARRAY(type, count) LE_RANGE_CHECK(type,count,(type *) malloc((count) * sizeof(type)))
388 #define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
396 #define LE_DELETE_ARRAY(array) free((void *) (array))
411 #define LE_MAKE_TAG(a, b, c, d) \
412 (((le_uint32)(a) << 24) | \
413 ((le_uint32)(b) << 16) | \
414 ((le_uint32)(c) << 8) | \
651 #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM)
652 #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM)
653 #define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM)
654 #define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM)
655 #define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM)
656 #define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM)
657 #define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM)
658 #define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM)
659 #define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM)
660 #define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM)
661 #define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM)
662 #define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM)
663 #define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM)
664 #define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM)
665 #define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM)
666 #define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM)
667 #define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM)
668 #define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM)
669 #define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM)
670 #define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM)
671 #define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM)
672 #define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM)
673 #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM)
675 #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM)
680 #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG)
718 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))
725 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))