Removed the error message and minor changes.
This commit is contained in:
parent
7c474b4da3
commit
73a7dd79af
1 changed files with 11 additions and 9 deletions
|
|
@ -20,20 +20,22 @@ int main(int argc, char **argv, char **env);
|
||||||
int _start(void)
|
int _start(void)
|
||||||
{
|
{
|
||||||
__TRY__
|
__TRY__
|
||||||
int argc; char **argv; char **env; int ret;
|
int argc; char **argv; char **env;
|
||||||
_startupinfo start_info = {0};
|
_startupinfo start_info = {0};
|
||||||
|
|
||||||
_controlfp(0x10000, 0x30000);
|
_controlfp(0x10000, 0x30000);
|
||||||
__set_app_type(__CONSOLE_APP);
|
__set_app_type(__CONSOLE_APP);
|
||||||
if (__getmainargs(&argc, &argv, &env, 0, &start_info)) {
|
|
||||||
// __getmainargs failed because possible few memory on the heap.
|
|
||||||
fprintf(stderr, "Error getting the main args.");
|
|
||||||
// terminate with exit code of 3, similar to abort()
|
|
||||||
ExitProcess(3);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = main(argc, argv, env);
|
if (! __getmainargs(&argc, &argv, &env, 0, &start_info))
|
||||||
exit(ret);
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = main(argc, argv, env);
|
||||||
|
exit(ret);
|
||||||
|
}
|
||||||
|
// __getmainargs failed because possible few memory on the heap.
|
||||||
|
// end with exit code of 3, similar to abort()
|
||||||
|
ExitProcess(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =============================================
|
// =============================================
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue