mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
pro: Convert to serenity_main(..)
This commit is contained in:
parent
74948950bb
commit
d6f1d11aa0
2 changed files with 5 additions and 3 deletions
|
@ -125,7 +125,7 @@ target_link_libraries(pls LibMain)
|
||||||
target_link_libraries(pgrep LibRegex)
|
target_link_libraries(pgrep LibRegex)
|
||||||
target_link_libraries(pls LibCrypt)
|
target_link_libraries(pls LibCrypt)
|
||||||
target_link_libraries(pmap LibMain)
|
target_link_libraries(pmap LibMain)
|
||||||
target_link_libraries(pro LibProtocol)
|
target_link_libraries(pro LibMain LibProtocol)
|
||||||
target_link_libraries(ps LibMain)
|
target_link_libraries(ps LibMain)
|
||||||
target_link_libraries(pwd LibMain)
|
target_link_libraries(pwd LibMain)
|
||||||
target_link_libraries(run-tests LibRegex)
|
target_link_libraries(run-tests LibRegex)
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#include <LibCore/ArgsParser.h>
|
#include <LibCore/ArgsParser.h>
|
||||||
#include <LibCore/EventLoop.h>
|
#include <LibCore/EventLoop.h>
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
|
#include <LibCore/System.h>
|
||||||
|
#include <LibMain/Main.h>
|
||||||
#include <LibProtocol/Request.h>
|
#include <LibProtocol/Request.h>
|
||||||
#include <LibProtocol/RequestClient.h>
|
#include <LibProtocol/RequestClient.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -143,7 +145,7 @@ private:
|
||||||
ByteBuffer m_buffer;
|
ByteBuffer m_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
const char* url_str = nullptr;
|
const char* url_str = nullptr;
|
||||||
bool save_at_provided_name = false;
|
bool save_at_provided_name = false;
|
||||||
|
@ -172,7 +174,7 @@ int main(int argc, char** argv)
|
||||||
return true;
|
return true;
|
||||||
} });
|
} });
|
||||||
args_parser.add_positional_argument(url_str, "URL to download from", "url");
|
args_parser.add_positional_argument(url_str, "URL to download from", "url");
|
||||||
args_parser.parse(argc, argv);
|
args_parser.parse(arguments);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
method = "POST";
|
method = "POST";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue