b6659a321d
string: add static NSTR_DEFINE initializer macro
2021-07-18 21:00:07 +02:00
30954cd078
string: add tests
2021-07-16 21:47:18 +02:00
0f3c11110c
string: implement nstrdup
2021-07-16 14:43:26 +02:00
66032c95f2
string: sanitize nstrcmp return value on error
2021-07-16 14:43:02 +02:00
7169a434bf
utf: add utf8_ncheck
2021-07-16 13:59:11 +02:00
6ab34d0893
string: rename _capacity field to _size
2021-07-16 13:35:32 +02:00
f27d00a4a2
utf: fix name ambiguity of utf8_chrsize
2021-07-16 00:12:10 +02:00
aae039ae29
string: nstrcat refactor
2021-07-15 23:14:55 +02:00
2fbbfc61c0
string: use memcpy instead of strncpy in nstrmul
2021-07-15 23:10:57 +02:00
8c591796fb
string: always call strcmp() in nstrcmp()
...
Some people seem to depend on the unstandardized
behavior of some (notably glibc) implementations
of strcmp() where the arithemtic difference
between s1 and s2 is returned, not just any
positive or negative number. This is explicitly
undocumented in libneo as well, but still doing
it won't hurt either.
2021-07-15 23:07:00 +02:00
7d64438f70
string: fix off-by-one error in leftpad
2021-07-15 23:00:17 +02:00
900bce9b8e
string: add nnstr string constructor
2021-07-15 22:58:15 +02:00
c71e36e7c8
error: fix memory leaks and other bugs
...
It was really late when i wrote this okay
2021-07-15 22:50:33 +02:00
b011d5feb5
string: remove unnecessary refcount update
...
Passing the argument to a pure function is
essentially a "borrow", and the caller has had to
make sure the refcount doesn't drop to zero anyway
2021-07-15 14:16:06 +02:00
5aed426864
string: add more utility functions
2021-07-15 01:47:04 +02:00
43da1220ee
error: fix brainfart
2021-07-14 22:58:49 +02:00
b010638dd1
string: add creationg and char access functions
2021-07-14 22:24:07 +02:00
c70068f1b8
utf: fix some more bugs
...
It's beginning to actually work, wow
2021-07-14 22:19:33 +02:00
06d538bc4a
utf: use unsigned types
...
Turns out the people warning about doing signed bitshifts were right
2021-07-14 21:15:07 +02:00
befc18f8ff
add C++ support
...
This is so not a good idea but i'll need it for Catch2
2021-07-14 20:45:22 +02:00
54869dcd6c
utf: use correct format specifier
2021-07-14 16:42:15 +02:00
30a29150c3
implement UTF-8 conversion
...
i have no idea whether this works, the only thing i have is PTSD
2021-07-14 16:30:19 +02:00
ec5ed1e352
error: refactor the whole thing
...
a.k.a. make it more complicated.
2021-07-12 03:06:51 +02:00
7df80d8cd1
add malloc wrapper
2021-07-11 15:06:42 +02:00
4dbc77845a
add error handling system
2021-07-11 02:11:58 +02:00
957f5e2a35
add refcounts
2021-07-11 01:44:59 +02:00
7eed96edcf
remove jemalloc and fall back to libc
...
completely replacing libc while still supporting all POSIX compliant
systems is probably gonna take a little more effort than just one
developer. Which is a bummer, but you gotta work with the cards you're
dealt, i guess.
2021-07-10 20:55:44 +02:00
a73ea804b5
implement generic syscalls
2021-07-09 16:56:23 +02:00
11548e74ba
integrate jemalloc into cmake build
...
well that was painful
2021-07-09 14:07:13 +02:00
673ed9bfb8
initial commit uwu
2021-07-09 00:04:44 +02:00