38#if defined(_MSC_VER) && _MSC_VER < 1800
51#define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0]))
78 int max = (int)(count - 1);;
83 mid = (min + max) / 2;
84 const unsigned char *mid_ptr =
85 (
const unsigned char *)ptr + mid * size;
93 else if (ch > mid_end)
101 }
while (min <= max);
Header file for common definitions in the libunibreak library.
unsigned int utf32_t
Type for UTF-32 data points.
Definition unibreakbase.h:49
__inline const void * ub_bsearch(utf32_t ch, const void *ptr, size_t count, size_t size)
Definition unibreakdef.h:74
utf32_t ub_get_next_char_utf8(const void *sv, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-8 sequence.
Definition unibreakdef.c:50
utf32_t ub_get_next_char_utf32(const void *sv, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-32 sequence.
Definition unibreakdef.c:161
utf32_t(* get_next_char_t)(const void *, size_t, size_t *)
Abstract function interface for ub_get_next_char_utf8, ub_get_next_char_utf16, and ub_get_next_char_u...
Definition unibreakdef.h:67
utf32_t ub_get_next_char_utf16(const void *sv, size_t len, size_t *ip)
Gets the next Unicode character in a UTF-16 sequence.
Definition unibreakdef.c:119