Age | Commit message (Collapse) | Author |
|
Now that ssize_t is derived from size_t, we have to
|
|
|
|
|
|
|
|
We explicitly disallow floating point numbers during kernel compilation
so we have to #ifdef out those parts here.
|
|
Previously, passing a fragment string ("#section3") to the complete_url
method would result in a URL that looked like
"file:///home/anon/www/#section3" which was obviously incorrect. Now the
result looks like "file:///home/anon/www/afrag.html#section3".
|
|
We shouldn't just drop leading ..-s for relative paths. At the same time,
we should handle paths like
../foo/../../bar
correctly: the first .. after the foo cancels out the foo, but the second
one should get treated as a leading one and not get dropped.
Note that since this path resolution is purely lexical, it's never going to be
completely correct with respect to symlinks and other filesystem magic. Better
don't use it when dealing with files.
|
|
While width-oriented integer types are nicer from the programmer's
perspective, we have to accept that C++ thinks in int/long/long long.
|
|
New method to convert hex string unsigned integer.
|
|
This reverts commit 0a2cab09282edf357647d2f6e61f9b0680492dca.
|
|
This reverts commit 2c823473930121aecbacf0422c8372a0912e581b.
|
|
This reverts commit aff594f1e790feff0cd7dda3e9f0ecd5573c51bf.
|
|
This reverts commit 4361a502255e409f04c9325ef73f3cd10f9cafdb.
|
|
Otherwise Lagom doesn't build on my host machine.
|
|
If these methods get inlined, the compiler is able to statically eliminate most
of the assertions. Alas, it doesn't realize this, and believes inlining them to
be too expensive. So give it a strong hint that it's not the case.
This *decreases* the kernel binary size.
|
|
In order to remove libstdc++ completely, we need to give up on their
implementation of abi::__cxa_demangle. The demangler logic will actually
have to be quite complex, and included in both the kernel and userspace.
A definite fixme for the future, to parse the mangled names into real
deal names.
|
|
This is distintly different from Atomic<T*>, because we want to
atomically access a variable that the atomic object itself does not own.
|
|
This allows operator new and operator delete to be available to anyone
that links -lc (everyone) rather than just people that include
kmalloc.h (almost no one).
|
|
Use the AK version of std::initializer_list in AK::Vector, but only
when in serenity. When building AK for a non-serenity target, the header
<initializer_list> should be always available.
|
|
The two-argument version doesn't need an extra template parameter.
|
|
Just make it hand out a zero-length Utf32View :^)
|
|
|
|
This encodes the incoming UTF-32 sequence as UTF-8.
|
|
This allows you to wrap a { const u32* codepoints, size_t length } in a
simple object.
|
|
|
|
|
|
|
|
|
|
|
|
This was supposed to be the foundation for some kind of pre-kernel
environment, but nobody is working on it right now, so let's move
everything back into the kernel and remove all the confusion.
|
|
|
|
This stopped working quite some time ago due to Clang losing track of
typestates for some reason and everything becoming "unknown".
Since we're primarily using GCC anyway, it doesn't seem worth it to try
and maintain this non-working experiment for a secondary compiler.
Also it doesn't look like the Clang team is actively maintaining this
flag anyway. So good-bye, -Wconsumed. :/
|
|
With 0 initial capacity, we don't allocate an underlying ByteBuffer
for the StringBuilder, which would then lead to a null String() being
returned from to_string().
This patch makes sure we always build a valid String.
|
|
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
StringUtils::equals_ignoring_case() already operates on a StringView&,
so StringView should have the method directly without having to go
through a temporary String (which also has the method).
|
|
As suggested by @awesomekling in a code review and (initially) ignored
by me :^)
Implementation is roughly based on LibJS's trim_string(), but with a fix
for trimming all-whitespace strings.
|
|
It's complaining about "size_t >= 0" checks.
Fixes #2196.
|
|
|
|
|
|
|
|
|
|
We should still accept file:/// in the URL parser. :^)
|
|
|
|
This allows you to release a NonnullOwnPtr<T> into a NonnullOwnPtr<U>
|
|
LogStream::operator<<(const LogStream&, long) was implemented in
AK/LogStream.cpp but the declaration was missing from the header.
|
|
When we switched the Bitmap code to operating 32 bits at a time,
we neglected to look in the trailing remainder bits after the last
full 32-bit word.
This patch fixes that and adds a couple of tests for Bitmap that I
hacked up while tracking down this bug.
I found this bug when noticing that the kernel would OOM while there
were still some pages left in the physical page allocator.
|
|
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
|
|
This allows easy creation of a new string from an existing StringView.
Can be used e.g. for output with printf(..., view.to_string().characters())
instead of writing printf(..., String{view}.characters()).
|
|
|