4c96e62129
doc: use doxygen-awesome theme
2021-07-26 22:58:51 +02:00
e1e401798c
nstr: add nput convenience wrappers
2021-07-26 22:42:16 +02:00
abfccf6b5c
doc: refactor and normalize comments
2021-07-26 22:40:50 +02:00
c3776c0654
doc: add Doxygen support
2021-07-26 16:54:05 +02:00
0a8ee6173e
utf8_check: test return values
2021-07-24 22:34:23 +02:00
824151ac69
add readme
2021-07-23 00:56:43 +02:00
f1add994c3
hashtab: add hashtable API
2021-07-23 00:56:18 +02:00
ac7172c841
nbuf: make clones zero-copy
2021-07-22 14:56:29 +02:00
cf4bd2ea5b
nstr: Make cloning zero-copy
2021-07-22 14:15:25 +02:00
d504786bc7
nstr: add alignment constraint
2021-07-22 13:46:49 +02:00
3040b09669
nstr: avoid double allocation
...
String contents are stored immediately after the
struct _neo_nstr in memory now.
2021-07-22 13:42:14 +02:00
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.
2021-07-22 12:20:53 +02:00
cb09acbc7c
nbuf: add buffer type and utilities
2021-07-21 22:55:05 +02:00
5b1511ca57
toolchain: refactor __restrict c++ compat macro
2021-07-21 22:23:46 +02:00
f99ad6162a
nref: move main init work out of macro
2021-07-21 16:55:19 +02:00
f120bcc02a
types: use bool typedefs from stdbool.h
2021-07-21 16:46:17 +02:00
528be61971
error: remove unused _flags member
2021-07-19 22:36:05 +02:00
d561ff3fa9
nref: put refcount at the end of the test struct
2021-07-19 15:20:09 +02:00
e982ceb517
list: fix remaining macro errors and add tests
2021-07-19 15:19:19 +02:00
cd797b107c
toolchain: don't flag init calls static
...
This will omit them from the final build, obviously
2021-07-19 14:08:23 +02:00
4f027726c6
build: use correct path variables
2021-07-19 13:12:59 +02:00
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.
2021-07-19 13:09:27 +02:00
d033a5df9d
list: fix stupid syntax errors and size bugs
2021-07-19 13:07:34 +02:00
6b8e8a4762
list: add "simple" linked list
2021-07-18 21:10:43 +02:00
b6659a321d
string: add static NSTR_DEFINE initializer macro
2021-07-18 21:00:07 +02:00
0bafd7d9b7
nref: fix compile warnings in test
...
C++ doing C++ things again i guess
2021-07-18 15:13:20 +02:00
f657ed4ea4
nref: include in main header
2021-07-16 22:40:08 +02:00
030ca48d2f
nref: add tests
2021-07-16 22:39:37 +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
a1ac5d8c41
nref: clear pointer if refcount reached 0
2021-07-16 14:12:18 +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
7d0dd2d705
utf: fix documentation error
2021-07-16 00:30:40 +02:00
9b40d46287
utf: add tests for utf8_strlen and utf8_check
2021-07-16 00:25:57 +02:00
f41fc5ad44
test: add tests for utf8_chrsize
2021-07-16 00:12:39 +02:00
f27d00a4a2
utf: fix name ambiguity of utf8_chrsize
2021-07-16 00:12:10 +02:00
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.
2021-07-15 23:54:39 +02:00
3828cfb7c4
utf: add test cases for utf8_from_nchr
2021-07-15 23:49:57 +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
2698409e4c
stddef: define nil to nullptr for C++
2021-07-15 22:51:24 +02:00
49b44ad4bc
string: fix nstreq brainfart
2021-07-15 22:50:53 +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
630530109b
test: add test cases for utf8_to_nchr
2021-07-15 22:49:49 +02:00
aae3b85ce7
test: improve cmake integration
2021-07-15 22:46:26 +02:00