48 Commits (main)

Author SHA1 Message Date
anna 026bfd0b39
string: add nstr2i and nstr2u 3 years ago
anna 57b24014dc
string: add nstrtrim 3 years ago
anna 0ecf0be554
utf: ensure neat() is called in utf8_check 3 years ago
anna 9fef6c5a6d
remove double asterisk from license notice 3 years ago
anna e1e401798c
nstr: add nput convenience wrappers 3 years ago
anna abfccf6b5c
doc: refactor and normalize comments 3 years ago
anna c3776c0654
doc: add Doxygen support 3 years ago
anna f1add994c3
hashtab: add hashtable API 3 years ago
anna ac7172c841
nbuf: make clones zero-copy 3 years ago
anna cf4bd2ea5b
nstr: Make cloning zero-copy 3 years ago
anna d504786bc7
nstr: add alignment constraint 3 years ago
anna 3040b09669
nstr: avoid double allocation
String contents are stored immediately after the
struct _neo_nstr in memory now.
3 years ago
anna c797540dbc
string: rename string type to nstr_t
This might annoy a bunch of people, but it kinda
follows the "traditional" C coding style and i
like it more.  Also it reminds you that strings
are absolutely not a primitive data type.
3 years ago
anna cb09acbc7c
nbuf: add buffer type and utilities 3 years ago
anna f99ad6162a
nref: move main init work out of macro 3 years ago
anna 4f027726c6
build: use correct path variables 3 years ago
anna d033a5df9d
list: fix stupid syntax errors and size bugs 3 years ago
anna 6b8e8a4762
list: add "simple" linked list 3 years ago
anna b6659a321d
string: add static NSTR_DEFINE initializer macro 3 years ago
anna 30954cd078
string: add tests 3 years ago
anna 0f3c11110c
string: implement nstrdup 3 years ago
anna 66032c95f2
string: sanitize nstrcmp return value on error 3 years ago
anna 7169a434bf
utf: add utf8_ncheck 3 years ago
anna 6ab34d0893
string: rename _capacity field to _size 3 years ago
anna f27d00a4a2
utf: fix name ambiguity of utf8_chrsize 3 years ago
anna aae039ae29
string: nstrcat refactor 3 years ago
anna 2fbbfc61c0
string: use memcpy instead of strncpy in nstrmul 3 years ago
anna 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.
3 years ago
anna 7d64438f70
string: fix off-by-one error in leftpad 3 years ago
anna 900bce9b8e
string: add nnstr string constructor 3 years ago
anna c71e36e7c8
error: fix memory leaks and other bugs
It was really late when i wrote this okay
3 years ago
anna 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
3 years ago
anna 5aed426864
string: add more utility functions 3 years ago
anna 43da1220ee
error: fix brainfart 3 years ago
anna b010638dd1
string: add creationg and char access functions 3 years ago
anna c70068f1b8
utf: fix some more bugs
It's beginning to actually work, wow
3 years ago
anna 06d538bc4a
utf: use unsigned types
Turns out the people warning about doing signed bitshifts were right
3 years ago
anna befc18f8ff
add C++ support
This is so not a good idea but i'll need it for Catch2
3 years ago
anna 54869dcd6c
utf: use correct format specifier 3 years ago
anna 30a29150c3
implement UTF-8 conversion
i have no idea whether this works, the only thing i have is PTSD
3 years ago
anna ec5ed1e352
error: refactor the whole thing
a.k.a. make it more complicated.
3 years ago
anna 7df80d8cd1
add malloc wrapper 3 years ago
anna 4dbc77845a
add error handling system 3 years ago
anna 957f5e2a35
add refcounts 3 years ago
anna 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.
3 years ago
anna a73ea804b5
implement generic syscalls 3 years ago
anna 11548e74ba
integrate jemalloc into cmake build
well that was painful
3 years ago
anna 673ed9bfb8
initial commit uwu 3 years ago