2021-11-22 14:44:54 +00:00
|
|
|
/*
|
2024-10-04 11:19:50 +00:00
|
|
|
* Copyright (c) 2021, Andreas Kling <andreas@ladybird.org>
|
2022-02-14 17:19:35 +00:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2021-11-22 14:44:54 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Error.h>
|
2022-02-14 17:19:35 +00:00
|
|
|
#include <AK/Span.h>
|
|
|
|
#include <AK/StringView.h>
|
2021-11-22 14:44:54 +00:00
|
|
|
|
|
|
|
namespace Main {
|
|
|
|
|
|
|
|
struct Arguments {
|
|
|
|
int argc {};
|
|
|
|
char** argv {};
|
2021-11-22 21:10:22 +00:00
|
|
|
Span<StringView> strings;
|
2021-11-22 14:44:54 +00:00
|
|
|
};
|
|
|
|
|
2022-03-19 17:06:56 +00:00
|
|
|
int return_code_for_errors();
|
|
|
|
void set_return_code_for_errors(int);
|
|
|
|
|
2021-11-22 14:44:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ErrorOr<int> serenity_main(Main::Arguments);
|