Blame


1 6ab857d5 2024-01-23 op /*
2 6ab857d5 2024-01-23 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 6ab857d5 2024-01-23 op *
4 6ab857d5 2024-01-23 op * Permission to use, copy, modify, and distribute this software for any
5 6ab857d5 2024-01-23 op * purpose with or without fee is hereby granted, provided that the above
6 6ab857d5 2024-01-23 op * copyright notice and this permission notice appear in all copies.
7 6ab857d5 2024-01-23 op *
8 6ab857d5 2024-01-23 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 6ab857d5 2024-01-23 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 6ab857d5 2024-01-23 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 6ab857d5 2024-01-23 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 6ab857d5 2024-01-23 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 6ab857d5 2024-01-23 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 6ab857d5 2024-01-23 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 6ab857d5 2024-01-23 op */
16 6ab857d5 2024-01-23 op
17 6ab857d5 2024-01-23 op #ifndef UTF8_H
18 6ab857d5 2024-01-23 op #define UTF8_H
19 6ab857d5 2024-01-23 op
20 6ab857d5 2024-01-23 op #include <stddef.h>
21 6ab857d5 2024-01-23 op #include <stdint.h>
22 6ab857d5 2024-01-23 op
23 6ab857d5 2024-01-23 op /* utf8.c */
24 6ab857d5 2024-01-23 op uint32_t utf8_decode(uint32_t*restrict, uint32_t*restrict, uint8_t);
25 f853ec6f 2024-10-22 op size_t utf8_snwidth(const char*, size_t, int);
26 f853ec6f 2024-10-22 op size_t utf8_swidth(const char*, int);
27 f853ec6f 2024-10-22 op size_t utf8_swidth_between(const char*, const char*, int);
28 6ab857d5 2024-01-23 op int emojied_line(const char *, const char **);
29 6ab857d5 2024-01-23 op
30 6ab857d5 2024-01-23 op /* emoji-matcher.c */
31 6ab857d5 2024-01-23 op int is_emoji(uint32_t);
32 6ab857d5 2024-01-23 op
33 6ab857d5 2024-01-23 op #endif