Blame


1 6ab857d5 2024-01-23 op /*
2 62cbcdae 2024-02-02 op * Copyright (c) 2022, 2024 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 UTILS_H
18 6ab857d5 2024-01-23 op #define UTILS_H
19 6ab857d5 2024-01-23 op
20 f7db6d13 2024-02-06 op struct imsgev;
21 f7db6d13 2024-02-06 op
22 6ab857d5 2024-01-23 op int mark_nonblock_cloexec(int);
23 6ab857d5 2024-01-23 op
24 6ab857d5 2024-01-23 op int has_suffix(const char *, const char *);
25 6ab857d5 2024-01-23 op int unicode_isspace(uint32_t);
26 6ab857d5 2024-01-23 op int unicode_isgraph(uint32_t);
27 6ab857d5 2024-01-23 op
28 6ab857d5 2024-01-23 op void imsg_event_add(struct imsgev *);
29 6ab857d5 2024-01-23 op int imsg_compose_event(struct imsgev *, uint16_t, uint32_t, pid_t, int, const void *, uint16_t);
30 6ab857d5 2024-01-23 op
31 54764e41 2024-02-02 op int ibuf_borrow_str(struct ibuf *, char **);
32 b148be71 2024-01-31 op
33 6ab857d5 2024-01-23 op void *hash_alloc(size_t, void *);
34 6ab857d5 2024-01-23 op void *hash_calloc(size_t, size_t, void *);
35 6ab857d5 2024-01-23 op void hash_free(void *, void *);
36 6ab857d5 2024-01-23 op
37 6ab857d5 2024-01-23 op #endif /* UTILS_H */