ladybird/Userland/Utilities/clear.cpp

20 lines
343 B
C++
Raw Normal View History

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <stdio.h>
2020-02-18 12:58:04 +03:00
#include <unistd.h>
int main(int, char**)
{
2020-02-18 12:58:04 +03:00
if (pledge("stdio", nullptr) < 0) {
perror("pledge");
return 1;
}
printf("\033[3J\033[H\033[2J");
fflush(stdout);
return 0;
}