libgrapheme

Freestanding C library for unicode string handling
git clone https://git.sinitax.com/suckless/libgrapheme
Log | Files | Refs | README | LICENSE | sfeed.txt

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)
     11void libgrapheme(const void *) __attribute__((optnone));
     12void libutf8proc(const void *) __attribute__((optnone));
     13#endif
     14#endif
     15
     16uint_least32_t *generate_cp_test_buffer(const struct break_test *, size_t,
     17                                        size_t *);
     18char *generate_utf8_test_buffer(const struct break_test *, size_t, size_t *);
     19
     20void 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 */