summaryrefslogtreecommitdiff
path: root/Userland/Utilities/clear.cpp
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2021-11-27 20:42:37 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-11 15:10:42 -0800
commitd86c84a7007a09c65f74f3b3ab905afbe96cdea4 (patch)
treec0134212d3d90db3553814b36bf7045763ccfb0f /Userland/Utilities/clear.cpp
parent6e066bf1cd27fb6eff48e4586c536f2f6dd8afe7 (diff)
downloadserenity-d86c84a7007a09c65f74f3b3ab905afbe96cdea4.zip
clear: Port to LibMain :^)
Diffstat (limited to 'Userland/Utilities/clear.cpp')
-rw-r--r--Userland/Utilities/clear.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Userland/Utilities/clear.cpp b/Userland/Utilities/clear.cpp
index 377acffb6d..e8fc9fea72 100644
--- a/Userland/Utilities/clear.cpp
+++ b/Userland/Utilities/clear.cpp
@@ -4,15 +4,13 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <LibCore/System.h>
+#include <LibMain/Main.h>
#include <stdio.h>
-#include <unistd.h>
-int main(int, char**)
+ErrorOr<int> serenity_main(Main::Arguments)
{
- if (pledge("stdio", nullptr) < 0) {
- perror("pledge");
- return 1;
- }
+ TRY(Core::System::pledge("stdio", nullptr));
printf("\033[3J\033[H\033[2J");
fflush(stdout);
return 0;