2020-01-18 08:38:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 08:38:21 +00:00
|
|
|
*/
|
|
|
|
|
2020-08-05 17:35:13 +00:00
|
|
|
#include <LibCore/ArgsParser.h>
|
2022-01-04 03:04:15 +00:00
|
|
|
#include <LibCore/System.h>
|
2019-06-01 10:10:35 +00:00
|
|
|
#include <stdio.h>
|
2020-02-18 09:46:06 +00:00
|
|
|
#include <unistd.h>
|
2019-06-01 10:10:35 +00:00
|
|
|
|
2022-01-04 03:04:15 +00:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
2019-06-01 10:10:35 +00:00
|
|
|
{
|
2022-01-04 03:04:15 +00:00
|
|
|
TRY(Core::System::pledge("stdio"));
|
2020-02-18 09:46:06 +00:00
|
|
|
|
2023-02-28 20:41:43 +00:00
|
|
|
StringView string = "yes"sv;
|
2020-08-05 17:35:13 +00:00
|
|
|
|
|
|
|
Core::ArgsParser args_parser;
|
|
|
|
args_parser.add_positional_argument(string, "String to output (defaults to 'yes')", "string", Core::ArgsParser::Required::No);
|
2022-01-04 03:04:15 +00:00
|
|
|
args_parser.parse(arguments);
|
2020-08-05 17:35:13 +00:00
|
|
|
|
|
|
|
for (;;)
|
2023-02-28 20:41:43 +00:00
|
|
|
outln("{}", string);
|
2019-06-01 10:10:35 +00:00
|
|
|
}
|