a11aa7a2d0
libluna: Add a reference-counted immutable string type
2024-09-01 12:40:20 +02:00
0abd9153ae
tools+libluna: Make new and delete weak to avoid conflicts with libstdc++
...
Wasn't causing problems earlier, but when trying to rebuild the toolchain, it failed because of this.
2024-09-01 12:39:55 +02:00
d10cb10404
libluna/SHA: Reuse the m_message buffer to avoid duplicating the data to hash
...
This change is almost insignificant in most cases, but it avoids using 4GB of memory to hash a 2GB file.
2024-07-21 12:52:12 +02:00
5fe0507ab1
libc+libluna: Add endianness-dependent functions and use them in SHA256
2024-07-20 16:26:06 +02:00
e1c287a45b
libluna: Return a new Digest structure instead of a Buffer from SHA256
2024-07-20 16:12:43 +02:00
db2f91b1fb
libluna+apps: Add a SHA256 hash implementation
2024-07-20 15:50:59 +02:00
cdab3dea90
libluna: Assert some unreachable conditions
2024-03-07 23:10:35 +01:00
4dc060e0b3
libluna: Fix String::from_string_view construction for inline strings
...
Before, this method failed to add a null terminator if the source string did not have one, which was possible.
2024-02-11 17:09:37 +01:00
644614cdd8
libluna: Fix memmove when dest > src
...
Really? A crucial component of the libc was broken? No wonder some ports did not work very well...
2024-02-11 17:08:36 +01:00
7ab0c6b72b
libluna: Add assignment operators to Buffer
2023-09-20 07:05:49 +02:00
c524dc8d58
libluna+kernel: Basic ANSI escape sequences
2023-09-02 19:35:42 +02:00
e76a91d5d0
libc+libluna: Move the scanf implementation from libc to libluna
2023-09-02 15:48:58 +02:00
9c912ddc51
libluna: Document Heap.h
2023-08-28 12:20:42 +02:00
419604a4d2
libluna: Document Buffer
2023-08-28 11:10:04 +02:00
97037b06cb
libluna: Document Ignore.h and ImplPOSIX.cpp
2023-08-27 20:50:53 +02:00
6f3ed70363
kernel+libluna: Avoid scrubbing when the memory is going to be overwritten anyway
...
This is the case for objects with constructors and temporary memory which is filled afterwards.
2023-08-27 20:48:33 +02:00
c6d817a0fd
libluna: Document Hash.h
2023-08-26 20:31:16 +02:00
55c362eecf
libluna: Document Format
2023-08-26 12:59:22 +02:00
9fd8b10b3f
libluna: Document CString, CType and DebugLog
2023-08-26 12:43:44 +02:00
516d6bc65e
libluna: Document CircularQueue, CPath and CRC32
2023-08-26 12:33:12 +02:00
0f377e7289
libluna: Fix off-by-one size calculation in Base64::decode_string()
2023-08-24 12:06:01 +02:00
b8ae61b7c7
libluna: Document Bitmap
2023-08-23 13:50:45 +02:00
1449e966ab
libluna: Document Base64.h
2023-08-23 13:34:14 +02:00
e8e05159c1
libluna+kernel: Make CRC32 a class
2023-08-15 19:27:09 +02:00
181b4c151b
tools: Build libstdc++
2023-08-11 18:24:38 +02:00
5ea73197ad
libluna: Add a bunch more errno definitions
2023-08-11 17:59:41 +02:00
159c05c064
libluna: Add max() and min()
2023-08-08 12:39:03 +02:00
b63a8ff245
libluna: Move get_blocks_from_size to a new header and call it ceil_div instead
2023-08-08 11:58:33 +02:00
8d3b3aaf05
libluna: Add a few more network-related errno codes
2023-07-30 11:33:06 +02:00
c1d08b904e
kernel+libluna: Add Buffer::dequeue_data()
2023-07-30 11:33:05 +02:00
6b0bc66fd2
libluna: Add new socket-related errno codes
2023-07-30 11:33:05 +02:00
7f990b161b
libluna: Fix comparison of StringViews without null termination
...
This regressed in de7e58c274, and made value arguments pretty much unusable.
This really needs a test...
2023-07-25 17:25:18 +02:00
9bb3fed611
libluna: Use the right unsigned integer type for wcscmp()'s return type
2023-07-25 17:23:27 +02:00
9ef09cfc88
libc+libluna: Add case-insensitive string comparison functions
2023-07-22 11:58:28 +02:00
4439ef8ec6
sh: Add a system to easily add flexible shell builtins
2023-07-21 20:44:01 +02:00
de7e58c274
StringView: Fix equality operator
2023-07-21 14:26:54 +02:00
15199a2366
libluna+libc: Implement memchr() and strstr()
2023-07-10 15:30:05 +02:00
56f3d26969
kernel+libluna: Fix the CRC32 algorithm and use it to verify the GPT header
2023-07-10 14:54:55 +02:00
bd757d204e
kernel+libos+libluna: Avoid copying and reallocation when creating Strings
...
This is done by reusing the existing buffers in Vector and Buffer instances.
2023-07-02 19:30:25 +02:00
6db0a2649c
libluna: Add a variant of PathParser::join() for relative paths
2023-07-02 16:38:12 +02:00
b4a6e4d56d
libluna/PathParser: Make dirname() and basename() static functions
...
This avoids creating a PathParser to use them, which allocates memory that won't be used.
2023-06-19 11:21:58 +02:00
0b553cadc0
libluna: Do not fault if vstring_format() is called with buf=nullptr
...
Instead, just discard the output and return the number of bytes formatted, as mandated by the C standard.
2023-06-19 10:44:33 +02:00
ae01a31104
kernel: Make sure the stack is 16-byte aligned on program startup
...
This is required by the System V ABI and fixes some movaps-related GPFs in ndisasm.
2023-06-19 10:41:32 +02:00
21cc7e3729
libluna: Rename parse_length() to parse_type() in Format.cpp
2023-06-19 01:00:05 +02:00
a2c081f219
libluna: Allow passing a base to scan_(un)signed_integer()
2023-06-19 00:58:02 +02:00
08997007f2
libluna: Stop checking initialization status on every bitmap method call
...
Since our asserts (expect()) are enabled on release as well, this is kinda expensive.
It's up to the caller, if they receive a null pointer dereference it's
their fault for not initializing their bitmap :)
We do still assert out-of-range indexing and stuff like that.
2023-06-18 19:28:28 +02:00
148c1c7341
libluna: Add the clear_data() method to Vector and use it to optimize Base64::decode
...
This method clears the Vector's data without deallocating the
backing buffer, so that it can be reused without reallocation.
2023-06-18 19:24:26 +02:00
d45e9e2a8c
libluna: Simplify the API for Utf8StateDecoder by splitting it into multiple methods
2023-06-18 18:38:01 +02:00
2f08e0f5b0
libos: Make long value arguments use '=' and make value arguments' values always required
2023-06-17 20:58:54 +02:00
592558d7ad
kernel: Add GUID partition table support
2023-06-17 12:03:37 +02:00