acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
_c.h
1// From acme/_c.h by camilo on 2022-11-09 02:40 <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5inline bool is_set(const void* p, memsize s)
6{
7
8 return ((::uptr)p >= (::uptr) s);
9
10}
11
12
13inline ::i32 is_set(const void* p) { return ::is_set(p, 65536); }
14
15
16inline bool is_null(const void* p) { return !::is_set(p); }
17
18
19CLASS_DECL_ACME character_count safe_strlen(void* p, character_count n);
20
21
22inline ::i32_bool address_overlaps(const void* pszDst, const void* pszSrc, character_count srclen);
23
24
25
26
27
28
29CLASS_DECL_ACME void* reverse_memchr(const void* l, ::i32 ch, std::size_t l_len);
30CLASS_DECL_ACME void* reverse_memmem(const void* l, std::size_t l_len, const void* s, std::size_t s_len);
31CLASS_DECL_ACME void* reverse_byte_not_in_block(const void* l, std::size_t l_len, const void* s, std::size_t s_len);
32
33//#ifdef _STDIO_H_
34//#define _STDIO_H_
35//#error "already included?!?! WHAT?!?! (Before including acme/exception/_c.h)"
36//#endif
37
38#include "acme/exception/_c.h"
39//#ifdef _STDIO_H_
40//#error "already included?!?! WHAT?!?! (After including acme/exception/_c.h)"
41//#endif
42
43#include "acme/prototype/comparison/_c.h"
44//#ifdef _STDIO_H_
45//#error "already included?!?! WHAT?!?! (After including acme/prototype/comparison/_c.h)"
46//#endif
47
48
49