Commit graph

30638 commits

Author SHA1 Message Date
Timothy Flynn 55e0b91d8d LibUnicode: Port GenerateUnicodeNumberFormat to ErrorOr and LibMain 2021-11-23 22:58:05 +01:00
Timothy Flynn 8c5f19f7c8 LibUnicode: Port GenerateUnicodeLocale to ErrorOr and LibMain 2021-11-23 22:58:05 +01:00
Timothy Flynn 88dbf3c348 LibUnicode: Port GenerateUnicodeData to ErrorOr and LibMain
Also store command line arguments as StringViews rather than pointers.
2021-11-23 22:58:05 +01:00
Timothy Flynn 4c4b752ab8 Meta: Allow lagom_tool invocations to specify libraries to link 2021-11-23 22:58:05 +01:00
Timothy Flynn a2ea704d21 Meta: Define LagomMain outside of the BUILD_LAGOM branch
This allows code generators to use LagomMain. Otherwise, during CI, they
are built during the superbuild without BUILD_LAGOM=ON.
2021-11-23 22:58:05 +01:00
Timothy Flynn 1539ed12f1 LibUnicode: Functionalize the Unicode generator CMake commands
Makes it a bit easier to add a new generator.
2021-11-23 22:58:05 +01:00
Timothy Flynn 0e80c1ee6b LibUnicode: Invoke lagom_tool() with SOURCES inline 2021-11-23 22:58:05 +01:00
Pedro Pereira d68196969d Pong: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:56:01 +01:00
Pedro Pereira 3ca2f192af GameOfLife: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:56 +01:00
Pedro Pereira 8d3059c6f5 Solitaire: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:50 +01:00
Pedro Pereira c4e49e1955 Snake: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:44 +01:00
faxe1008 02a7cfaad6 usermod: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008 b49bed5152 userdel: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008 b2e7102194 lsusb: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008 097c1e5335 blockdev: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008 b918e798e6 base64: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008 f47d92af72 arp: Port to LibMain 2021-11-23 22:54:25 +01:00
Pedro Pereira 7d2170246f Hearts: Port to LibMain
Simplified one pledge() and two unveil() by using TRY().
2021-11-23 22:47:34 +01:00
Linus Groh 55dbd19a16 LibJS: Update to_largest_temporal_unit() to allow undefined fallback
This is required for Temporal.Duration.prototype.round(). Subsequently,
this now returns ThrowCompletionOr<Optional<String>>, which brings the
signature in line with that of to_smallest_temporal_unit().
Much nicer! :^)
2021-11-23 21:03:05 +00:00
csb6 d55dfe2418 AK: On macOS host builds, wrap unistd.h with missing extern "C"
During the build process on macOS, multiple versions of <unistd.h> were
being included (Apple's version and GCC's version). It appears that
all other places #include the version from GCC, but in Platform.h the
Apple header was being used. GCC's <unistd.h> is wrapped in
`extern "C"`, while Apple's is not. This causes a conflicting
declaration, so we need to wrap the #include with extern "C".

Issue has been observed on macOS Mojave.

See https://github.com/microsoft/vcpkg/issues/11320 for a similar issue.
2021-11-23 18:48:59 +00:00
Andreas Kling 6386b54746 dmesg: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling e6579e7029 ps: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 120168203e keymap: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 8b5c0e8e71 pmap: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling d8482134b6 LookupServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling ddd99b4594 NotificationServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 70b1312fd4 ConfigServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 9c9cd20dce WebServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 3d126fe921 WidgetGallery: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 24bf74a177 WorkspacePicker: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 51484bec82 Applets: Rename DesktopPicker => WorkspacePicker
This is consistent with the rest of the system.
2021-11-23 15:44:59 +01:00
Andreas Kling 03b6ff2bf0 utmpupdate: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling adc83e5802 Taskbar: Port to LibMain :^)
This opens up using TRY() for syscalls, Core::Object creation, and even
some Vector operations.
2021-11-23 15:44:59 +01:00
Andreas Kling b03f8d18c5 Applets/Network: Port to LibMain :^)
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling 6536198693 TextEditor: Port to LibMain :^)
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling 5a3f5582ba LibCore: Add try_create(...) helper to all Core::Object derived classes
This is like construct(...) but returns ErrorOr<NonnullRefPtr<T>>.
2021-11-23 15:44:59 +01:00
Andreas Kling 16356ca478 LibCore: Add syscall wrappers for read() and write() 2021-11-23 15:44:59 +01:00
Federico Guerinoni 221a32577e LibGUI: Support applying AutocompleteBox suggestions with mouse
Fixes: #8004
2021-11-23 13:43:11 +00:00
Pedro Pereira 9d2e169169 FlappyBug+Spider: Update GUI:Application::construct usage
Update code to use Main:Arguments directly.
2021-11-23 14:15:00 +01:00
Jelle Raaijmakers eb2b0d847e Kernel: Allow writes larger than PAGE_SIZE to AC97 device
Previously, `cat /dev/random > /dev/audio` would crash Serenity. Fix
this by splitting up the written data into `PAGE_SIZE` chunks.
2021-11-23 14:08:14 +01:00
Jelle Raaijmakers 70ca8b24dc Kernel: Add generic channel support to AC97
This factors out some hardcoded PCMOut registers into a new private
class called AC97Channel, which wraps around a channel's registers and
provides some shared functionality.

No functional changes.
2021-11-23 14:08:14 +01:00
Andreas Kling d117c4cccc truncate: Add a basic set of pledge promises 2021-11-23 12:31:21 +01:00
Andreas Kling 9eb7030b55 truncate: Port to LibMain and use LibCore syscall wrappers :^) 2021-11-23 12:27:33 +01:00
Andreas Kling 3db9979e40 LibCore: Add syscall wrapper for stat() 2021-11-23 12:23:54 +01:00
Andreas Kling 4a213869f2 LibCore: Add syscall wrapper for ftruncate() 2021-11-23 12:23:54 +01:00
Andreas Kling 4bf08e4d52 LibCore: Add syscall wrapper for close() 2021-11-23 12:23:54 +01:00
Andreas Kling adb9b86807 LibGfx: Use Core::System::open() in Gfx::Bitmap :^) 2021-11-23 12:23:54 +01:00
Andreas Kling 0ed5f84bd9 LibCore: Use open() wrapper in Core::MappedFile :^) 2021-11-23 12:23:54 +01:00
Andreas Kling 50416c286d LibCore: Add syscall wrapper for open() 2021-11-23 11:59:50 +01:00
Andreas Kling 094fa900a3 LibCore: Use mmap() and munmap() wrappers in Core::MappedFile 2021-11-23 11:51:46 +01:00