Hand main()'s arguments over to the platform
This commit is contained in:
parent
c3c5668ccd
commit
5d95f8bd54
@ -59,10 +59,12 @@
|
||||
int
|
||||
#if PLATFORM_MAIN_ACCEPTS_ARGS
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
platform_process_args(argc, argv);
|
||||
#else
|
||||
main(void)
|
||||
#endif
|
||||
{
|
||||
#endif
|
||||
platform_init_stage_one();
|
||||
|
||||
clock_init();
|
||||
|
@ -201,6 +201,20 @@ void platform_idle(void);
|
||||
*/
|
||||
void platform_main_loop(void);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \brief Allow the platform to process main's command line arguments
|
||||
*
|
||||
* If the platform wishes main() to accept arguments, then the \os main will
|
||||
* call this function here so that the platform can process/store those
|
||||
* arguments.
|
||||
*
|
||||
* This function will only get called if PLATFORM_MAIN_ACCEPTS_ARGS
|
||||
* is non-zero.
|
||||
*
|
||||
* It is the port developer's responsibility to implement this function.
|
||||
*/
|
||||
void platform_process_args(int argc, char**argv);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#endif /* PLATFORM_H_ */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user