util.h - libgrapheme - unicode string library
(HTM) git clone git://git.suckless.org/libgrapheme
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
util.h (715B)
---
1 /* See LICENSE file for copyright and license details. */
2 #ifndef UTIL_H
3 #define UTIL_H
4
5 #include "../gen/types.h"
6
7 #define LEN(x) (sizeof(x) / sizeof(*(x)))
8
9 #ifdef __has_attribute
10 #if __has_attribute(optnone)
11 void libgrapheme(const void *) __attribute__((optnone));
12 void libutf8proc(const void *) __attribute__((optnone));
13 #endif
14 #endif
15
16 uint_least32_t *generate_cp_test_buffer(const struct break_test *, size_t,
17 size_t *);
18 char *generate_utf8_test_buffer(const struct break_test *, size_t, size_t *);
19
20 void run_benchmark(void (*func)(const void *), const void *, const char *,
21 const char *, const char *, double *, size_t, size_t);
22
23 #endif /* UTIL_H */