8bb8671fb0
rephrase the header a little, to not be confusing when a file is copy-pasted.
2025-11-13 22:29:41 +01:00
8d0e825157
rewrite copyright file header to provide more information about where the file is from.
2025-11-13 22:24:09 +01:00
d4fabf437c
reformat the code by enabeling assignment- and declaration alignment.
2025-10-09 12:17:04 +02:00
aa58d931aa
move /src/util/intdef.h to /src/util/types.h
2025-10-09 12:16:06 +02:00
b13de01f24
fix: violating strict aliasing rules in most areas in the new code.
...
Yes, I am aware there are plenty of violations in `conf.c`, but I'll
likely fix/rewrite those when I will use it. Since there are some other
changes I think I'll want to make.
2025-09-10 10:13:26 +02:00
8a5afd6915
write a portable version of endian.h, to replace the system's endian.h.
...
utilising GNU C standard library for some of the functionality, or GNU C
extensions.
2025-09-10 10:13:26 +02:00
0baadfca75
update copyright information in all files
...
the comment was using single-line comments, I prefer multi-line comments
now.
This bothered me for much too long.
2025-08-29 09:36:55 +02:00
2f68574aea
swap order of nbt_proctag and nbt_nexttag
2025-08-26 11:32:26 +02:00
17357d4672
remove unused/unmaintained code.
...
this will likely re-appear in some form or another later on, but
currently I don't see its use.
2025-08-25 12:42:45 +02:00
44d2271972
fix: return values and list processing was too funky with nbt_proctag.
...
- Updated documentation
- Fixed logic so `nbt_proctag` actually returns the next pointer.
2025-08-25 10:57:15 +02:00
6dae1d1600
use a flexible array member for including length with array data
2025-08-24 13:37:33 +02:00
29c8a2b6ea
improve documentation for the nbt_proctag function
2025-08-23 23:19:16 +02:00
3cdee8b40c
add nbt_proctag to nbt.h
...
also changed the `out` parameter from `u8` to `void`, to be more
acurrate that it may point to whatever.
2025-08-23 23:13:27 +02:00
89ceb5263c
put attributes after function declarations
...
super confusing, but the formatter is being annoying otherwise
2025-08-23 23:09:09 +02:00
10a2aca0a5
fix: remove recursive functions and improve (theoretical) performance
...
note that lists are no longer handled here, this will be re-implemented
in a newer commit. The basic functionality for compound/end and other
tags are there, though.
2025-08-18 14:35:05 +02:00
5c57a77ad4
remove types.h, and start using intdef.h
2025-08-08 12:37:31 +02:00
0e00cb2d54
remove non-functional code
2025-08-07 13:23:47 +02:00
c3fc688c35
remove nbt_proc and replace it with nbt_initproc
...
we're moving towards that the user will handle most of the looping and
data feed.
So the use of these functions is no longer intended, becides, they
weren't being maintained whilst the parameters changed, causing the
portion of code to lag behind.
I'd rather rewrite code than have to prune old, unused code.
2025-08-07 13:23:33 +02:00
066e1c0049
remove nbt_isprim function, because it never really served any purpose.'
2025-08-07 13:02:08 +02:00
1052dcaac9
add functions for incrementing to the next tag
2025-08-07 13:01:27 +02:00
4b2404e903
move utility functions upwards to keep the logical order
2025-08-07 13:00:09 +02:00
f3273ed5d0
fix: include my endian.h in nbt.h
2025-07-24 16:29:03 +02:00
58d0dd01e2
move nbt_strlen to nbt.h, and rename to nbt_namelen
2025-07-24 16:29:03 +02:00
4005163d61
fix: use atrb_pure for functions reading global state
2025-07-24 16:29:03 +02:00
1d5df8df0a
apply new formatting rules to the whole project
2025-07-24 16:29:03 +02:00
13e1ceddfc
update nbt_proc function, still inoperable
2025-07-24 16:28:25 +02:00
fd8db02e77
modify the array bytelength function to get the bytelength of a single tag.
2025-07-24 16:28:25 +02:00
501c623f01
rename nbt_prim_tagsize to nbt_primsize, for consistency.
2025-07-23 13:00:53 +02:00
65ee7c5b55
add a function for checking whether a tag is primitive or not
...
mainly for niche uses
2025-07-23 13:00:53 +02:00
9fd920908e
move nbt_prim_tagsize to header, since it's a pretty useful funciton.
2025-07-23 13:00:53 +02:00
13451da2e8
add basic function signature for processing the NBT data
2025-07-15 13:51:23 +02:00
be87ccbe22
explicitly set hexadecimal values in NBT tags
2025-07-15 10:37:10 +02:00
2cb5d03211
write headers for data processing
2025-07-07 15:02:47 +02:00