aboutsummaryrefslogtreecommitdiff
path: root/win32/lib/crt1.c
diff options
context:
space:
mode:
authorCarlos Montiers <carlos@thefunsouth.com>2014-07-17 01:08:47 -0400
committerCarlos Montiers <carlos@thefunsouth.com>2014-07-17 01:08:47 -0400
commit73a7dd79aff5ca035637b5f9529478f8fcea0532 (patch)
tree0ef2cae13e1652a4a3026d5679befb1c6f20ce3b /win32/lib/crt1.c
parent7c474b4da316a203938b3632ae5a87ad78c86776 (diff)
downloadtinycc-73a7dd79aff5ca035637b5f9529478f8fcea0532.tar.gz
tinycc-73a7dd79aff5ca035637b5f9529478f8fcea0532.tar.bz2
Removed the error message and minor changes.
Diffstat (limited to 'win32/lib/crt1.c')
-rw-r--r--win32/lib/crt1.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/win32/lib/crt1.c b/win32/lib/crt1.c
index bb92ba4..5e80bd3 100644
--- a/win32/lib/crt1.c
+++ b/win32/lib/crt1.c
@@ -20,20 +20,22 @@ int main(int argc, char **argv, char **env);
int _start(void)
{
__TRY__
- int argc; char **argv; char **env; int ret;
+ int argc; char **argv; char **env;
_startupinfo start_info = {0};
_controlfp(0x10000, 0x30000);
__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);
- exit(ret);
+ if (! __getmainargs(&argc, &argv, &env, 0, &start_info))
+ {
+ 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);
}
// =============================================