anna
4c96e62129
doc: use doxygen-awesome theme
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
0a8ee6173e
utf8_check: test return values
3 years ago
anna
824151ac69
add readme
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
5b1511ca57
toolchain: refactor __restrict c++ compat macro
3 years ago
anna
f99ad6162a
nref: move main init work out of macro
3 years ago
anna
f120bcc02a
types: use bool typedefs from stdbool.h
3 years ago
anna
528be61971
error: remove unused _flags member
3 years ago
anna
d561ff3fa9
nref: put refcount at the end of the test struct
3 years ago
anna
e982ceb517
list: fix remaining macro errors and add tests
3 years ago
anna
cd797b107c
toolchain: don't flag init calls static
...
This will omit them from the final build, obviously
3 years ago
anna
4f027726c6
build: use correct path variables
3 years ago
anna
080c5e6195
types: make nlen field volatile
...
Compilers might try to be smart and optimize
additional reads from a const field away,
even if the non-const union member was modified.
I do not actually know whether this is the case,
but it won't hurt to declare it volatile anyway.
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
0bafd7d9b7
nref: fix compile warnings in test
...
C++ doing C++ things again i guess
3 years ago
anna
f657ed4ea4
nref: include in main header
3 years ago
anna
030ca48d2f
nref: add tests
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
a1ac5d8c41
nref: clear pointer if refcount reached 0
3 years ago
anna
7169a434bf
utf: add utf8_ncheck
3 years ago
anna
6ab34d0893
string: rename _capacity field to _size
3 years ago
anna
7d0dd2d705
utf: fix documentation error
3 years ago
anna
9b40d46287
utf: add tests for utf8_strlen and utf8_check
3 years ago
anna
f41fc5ad44
test: add tests for utf8_chrsize
3 years ago
anna
f27d00a4a2
utf: fix name ambiguity of utf8_chrsize
3 years ago
anna
460ff1a37b
remove extern "C" wrappers in internal headers
...
Internal headers, i.e. those prefixed with an
underscore, aren't supposed to be included in
external projects anyways and libneo itself is
obviously C only.
3 years ago
anna
3828cfb7c4
utf: add test cases for utf8_from_nchr
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
2698409e4c
stddef: define nil to nullptr for C++
3 years ago
anna
49b44ad4bc
string: fix nstreq brainfart
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
630530109b
test: add test cases for utf8_to_nchr
3 years ago
anna
aae3b85ce7
test: improve cmake integration
3 years ago