Commit Graph

46551 Commits

Author SHA1 Message Date
Steren
4acffe7c18 Meta: Use proper abbreviation for WebAssembly in README
WebAssembly should be abbreviated "Wasm", as called out at https://webassembly.org/
2023-02-06 10:46:34 +01:00
Nico Weber
5ccfd0e49d LibGfx: Fix comment typo in ICC code 2023-02-05 23:20:36 +00:00
Iman Seyed
85feab4095 Kernel: Pass ipv4_packet_size to ipv4.set_length()
Instead of `sizeof(IPv4Packet) + payload_size` expression,
pass `ipv4_packet_size` to `ipv4.set_length()`
2023-02-05 22:14:14 +00:00
MacDue
83a59396c8 Kernel: Fix CPUInfo error propagation fixme
We can now propagate the errors directly from for_each_split_view(),
which I think counts as "Make this nicer" :^)
2023-02-05 19:31:21 +01:00
Andrew Kaster
012aaecccf AK: Always define ak_assertion_failed, even when NDEBUG is false
Just because we may compile serenity with or without NDEBUG doesn't
mean that consuming projects or Ports will share the setting.

Always define the custom assertion function so that we don't have to
keep the same debug settings between all projects.
2023-02-05 09:46:51 -07:00
Mr.UNIX
17965f4d2d Ports/nasm: Update to 2.16.01 2023-02-05 16:43:02 +00:00
Mr.UNIX
9ca21ba1d5 Ports/openssl: Update to 1.1.1s 2023-02-05 16:42:42 +00:00
Mr.UNIX
dfb21177ef Ports/git: Update to 2.39.1 2023-02-05 16:42:12 +00:00
MacDue
ab5bdc598d Revert "SQLServer: Unveil /etc/passwd"
This reverts commit c3bd841d50.
2023-02-05 16:40:51 +01:00
MacDue
808f0c6837 Revert "ConfigServer: Unveil "/etc/passwd""
This reverts commit cd0b7656fa.
2023-02-05 16:40:51 +01:00
MacDue
83f41d1491 SystemServer: Revert back to inheriting environments again
This reverts the SystemServer exec() logic to how it was before
81bd91c, but now with some extra TRY()s. This allows the HOME var
to always be propagated from LoginServer which prevents needing
to unveil() /etc/passwd everywhere.
2023-02-05 16:40:51 +01:00
MacDue
d81a72ed78 AK: Allow propagating errors from StringView::for_each_split_view() 2023-02-05 16:40:51 +01:00
MacDue
b16ec1880c LibC+LibCore: Remove serenity_setenv()
This was called from LibCore and passed raw StringView data that may
not be null terminated, then incorrectly passed those strings to
getenv() and also tried printing them with just the %s format
specifier.
2023-02-05 16:40:51 +01:00
MacDue
eea4dc5bfe LibCore+LibC: Add putenv() wrapper
This is made safe with a special serenity_putenv() function in LibC.
2023-02-05 16:40:51 +01:00
MacDue
f4236e61bf LibCore: Add const qualifier to exec() argument spans 2023-02-05 16:40:51 +01:00
Nico Weber
1668d0da27 LibGfx: Extract a variable in ICC TextDescriptionTagData 2023-02-05 16:39:52 +01:00
Andreas Kling
ed3420dc10 AK: Make WeakPtr<T>::value() return NonnullRefPtr<T>
This API is only used by Jakt to implement weak reference unwrapping.
By making it return a NonnullRefPtr, it can be assigned to anything
that accepts a NonnullRefPtr, unlike the previous T* return type (since
that can also be null).
2023-02-05 15:38:19 +01:00
Karol Kosek
675713ad8e LibSQL: Actually print an error message after failing to launch a server
We were shadowing the 'result' variable, which made an exec error
message along with the search paths never being printed.
2023-02-05 07:13:31 -07:00
Arda Cinar
1ef410eb79 LibGUI: Handle utf-8 search strings in find
Similar to LibVT, we were iterating over needle bytes instead of code
points. This patch allows finding unicode substrings in a text document.
2023-02-05 13:50:38 +01:00
Arda Cinar
25f1e81d62 LibVT: Handle utf-8 search strings in find
Instead of iterating through the needle being searched one byte at a
time (like an ascii string), we calculate its unicode code points first
and then iterate through those.
2023-02-05 13:50:38 +01:00
Samuel Eisenhandler
c5360b1a5f Calculator: Treat constants and pasted numbers as input
Constants and pasted numbers leave Keypad in the External
state which causes subsequent operations to be performed
without an argument.
2023-02-05 08:07:45 +00:00
Aliaksandr Kalenik
f58668031d LibWeb: Respect font-stretch in StyleComputer::compute_font 2023-02-05 08:06:06 +00:00
Aliaksandr Kalenik
1f4106842d LibGfx: Pass font width to FontDatabase::get()
Width need to be passed to `FontDatabase::get()` to resolve font name
unambiguously.
2023-02-05 08:06:06 +00:00
Lucas CHOLLET
79006c03b4 AK: Check the return type in IsCallableWithArguments
Template argument are checked to ensure that the `Out` type is equal or
convertible to the type returned by the invokee.

Compilation now fails on:
`Function<void()> f = []() -> int { return 0; };`

But this is allowed:
`Function<ErrorOr<int>()> f = []() -> int { return 0; };`
2023-02-04 18:47:02 -07:00
Lucas CHOLLET
d9f632fee7 AK: Move the definition of IsCallableWithArguments to Function.h
It will allow us to use definitions from both `StdLibExtraDetails.h` and
`Concepts.h` at the same time.
2023-02-04 18:47:02 -07:00
Lucas CHOLLET
e538fa203e AK: Add the ConvertibleTo concept 2023-02-04 18:47:02 -07:00
Karol Baraniecki
71f5bbab42 LibGUI: Verify NonemptyText InputBox doesn't result in an empty string 2023-02-04 18:46:39 -07:00
Karol Baraniecki
506c26acce LibGUI+Userland: Switch order of parameters for InputBox::show
Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
2023-02-04 18:46:39 -07:00
Karol Baraniecki
8095d9276b Userland: Replace manual checking by using GUI::InputType::NonemptyText
Do this where we were already checking if the input was empty after the
InputBox was submitted. Those places gain interactive input validation.

:^)
2023-02-04 18:46:39 -07:00
Karol Baraniecki
55dbfd24c0 LibGUI: Allow the InputBox to be of NonemptyText type
It seems like a lot (most?) places where InputBoxes are used check if
the retrieved string isn't empty anyway - make this be reflected in
the user interface, by disabling (graying out) the "OK" button when
nothing is entered, so empty input isn't a viable option at all.
2023-02-04 18:46:39 -07:00
Tim Schumacher
47531a42a9 AK: Make LEB128 decoding work with read_value 2023-02-04 18:41:27 -07:00
Tim Schumacher
787f4d639a AK: Port LEB128 to the new AK::Stream 2023-02-04 18:41:27 -07:00
Tim Schumacher
31f59855b4 AK: Don't restore the stream offset when failing to read an LEB128
Pretty much no other read function does this, and getting rid of the
typename template parameter for the stream makes the transition to the
new AK::Stream a bit easier.
2023-02-04 18:41:27 -07:00
Tim Schumacher
371c51f934 AK: Make SeekableStream::truncate() take a size_t
Similar to the return values earlier, a signed value doesn't really make
sense here. Relying on the much more standard `size_t` makes it easier
to use Stream in all contexts.
2023-02-04 18:41:27 -07:00
Karol Kosek
a85c18d3c4 Base: Add .ico file association to Image Viewer and Pixel Paint 2023-02-04 18:02:03 -07:00
Karol Kosek
e7cc426e05 LibGfx: Port ICOLoader to the new AK::Stream 2023-02-04 18:02:03 -07:00
Karol Kosek
492d5d7cb2 LibGfx: Return ErrorOr<> in ICOLoader internal functions 2023-02-04 18:02:03 -07:00
Lucas CHOLLET
3f932081ae HexEditor: Create a function to initialize a HexDocumentFile
This function is made from what composed `set_file()` (which now calls
the new function). It allows to create a `HexDocumentFile` without
calling the hackish `set_file(move(m_file))`.
2023-02-04 17:20:31 -07:00
Lucas CHOLLET
689b3c2c26 HexEditor: Propagate errors from HexDocumentFile::set_title() 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
a2dca2b762 HexEditor: Propagate errors when using "Save" 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
2bba743c24 HexEditor: Propagate errors when using "Save as" 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
3d914247cc HexEditor: Port to Core::Stream 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
b1d8404c92 HexEditor: Use the constructor pattern 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
a621b5f015 HexEditor: Add a default move constructor to HexDocumentFile 2023-02-04 17:20:31 -07:00
nipos
c31b547fae AK: Use constexpr instead of consteval on OpenBSD 2023-02-04 16:11:54 -07:00
kleines Filmröllchen
e5dea00bb1 Base: Add a quote to the fortunes database
t.how.does.it.even.workis /shrug
2023-02-04 16:04:45 -07:00
Karol Kosek
039bb4e22d Utilities: Rename special target binaries only if they exist
Before 6490529ef7, all programs in the
SPECIAL_TARGETS list were built because they didn't have an
EXCLUDE_FROM_ALL property set.

That commit set the property for all targets, but because of this, the
minimal "Required" build configuration no longer built, as CMake failed
to rename every special target. Even the not built ones.

This commit makes the rename action run only if the executable exists,
which makes us build Serenity without the `install` utility, and also
by using the minimal configuration set. :^) :^)
2023-02-04 15:53:07 -07:00
Karol Kosek
bc587b89d8 CMake: Don't require to install glapi.h to system
This failed when a current build configuration hadn't got any program
depending on LibGL.
2023-02-04 15:53:07 -07:00
Karol Kosek
22a99e39d8 Lagom/ConfigureComponents: Run cmake command last
Previously the tool was removing the Root directory after configuring
cmake which was breaking the build, as some cmake rules put some
necessary files there.

Moving the cmake command to be the last one makes it regenerate those
files automatically. :^)
2023-02-04 15:53:07 -07:00
Ollrogge
64b1d4dc8b Documentation: Add formatting section to nvim documenation 2023-02-04 15:47:24 -07:00