Luna/libos/include/os/Main.h

22 lines
689 B
C
Raw Normal View History

/**
* @file Main.h
* @author apio (cloudapio.eu)
* @brief Alternative C++ main function.
*
* @copyright Copyright (c) 2023, the Luna authors.
*
*/
2023-04-13 15:04:59 +00:00
#pragma once
#include <luna/Result.h>
/**
* @brief The main() function for Luna C++ apps. This function is extern as it should be implemented by the user if they
* do not implement the C main() function.
*
* @param argc The argc parameter passed to the regular main() function.
* @param argv The argv parameter passed to the regular main() function.
* @return Result<int> A normal status code, or an errno code, which will be displayed along with an abnormal exit code.
*/
extern Result<int> luna_main(int argc, char** argv);