mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
pwd: Convert to serenity_main(..)
This commit is contained in:
parent
a62669ebcf
commit
81c98502f3
Notes:
sideshowbarker
2024-07-17 22:12:28 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/81c98502f3f Pull-request: https://github.com/SerenityOS/serenity/pull/11401
2 changed files with 8 additions and 7 deletions
|
@ -125,6 +125,7 @@ target_link_libraries(pls LibCrypt)
|
|||
target_link_libraries(pmap LibMain)
|
||||
target_link_libraries(pro LibProtocol)
|
||||
target_link_libraries(ps LibMain)
|
||||
target_link_libraries(pwd LibMain)
|
||||
target_link_libraries(run-tests LibRegex)
|
||||
target_link_libraries(shot LibGUI)
|
||||
target_link_libraries(sql LibLine LibSQL LibIPC)
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
int main(int, char**)
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
char* cwd = getcwd(nullptr, 0);
|
||||
puts(cwd);
|
||||
free(cwd);
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
outln(TRY(Core::System::getcwd()));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue