Commit graph

11 commits

Author SHA1 Message Date
Liav A 7c0540a229 Everywhere: Move global Kernel pattern code to Kernel/Library directory
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow,
UserOrKernelBuffer and ScopedCritical classes being moved to the
Kernel/Library subdirectory.

Also, move the panic and assertions handling code to that directory.
2023-06-04 21:32:34 +02:00
Linus Groh 6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Andreas Kling ae3ffdd521 AK: Make it possible to not using AK classes into the global namespace
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by
default, but can be overridden by build flags.

This is a step towards integrating Jakt and AK types.
2022-11-26 15:51:34 +01:00
Idan Horowitz 3219ce3d61 AK: Return KString instead of String from encode_hex in the Kernel
This let's us propagate allocation errors from this API.
2022-02-16 22:21:37 +01:00
Sam Atkins f590cd1850 AK+Userland: Make AK::decode_hex() return ErrorOr
This lets us propagate the reason why it failed up to the caller. :^)
2022-01-24 22:36:09 +01:00
Andreas Kling 8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Lenny Maiorani d462a56163 AK/Hex: Decode hex digit in constexpr context
Problem:
- Hex digit decoding is not `constexpr`, but can be.

Solution:
- Move the body of the function to the header and decorate with
  `constexpr`.
- Provide tests for run-time and compile-time evaluation.
2021-04-18 22:09:25 +02:00
Idan Horowitz 2ab292f381 AK: Expose the decode_hex_digit helper
This helper is useful on its own for things like uri encoding/decoding,
so this commit exposes it via the AK/Hex header
2021-04-14 13:30:10 +02:00
Ben Wiederhake cc89606ba8 Everywhere: Remove unnecessary headers 3/4
Arbitrarily split up to make git bisect easier.

These unnecessary #include's were found by combining an automated tool (which
determined likely candidates) and some brain power (which decided whether
the #include is also semantically superfluous).
2021-02-08 18:03:57 +01:00
Conrad Pankoff a01d11ac19 AK: Add {encode,decode}_hex similar to {encode,decode}_base64 2020-12-13 11:00:20 +01:00