Brace try/except in main() for Watcom

This commit is contained in:
Lassi Kortela 2019-08-21 22:08:21 +03:00
parent 60ff06fb6d
commit c76379e6f5
1 changed files with 14 additions and 12 deletions

View File

@ -42,20 +42,22 @@ static value_t argv_list(int argc, char *argv[])
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
fl_init(512 * 1024); fl_init(512 * 1024);
FL_TRY_EXTERN
{ {
if (fl_load_boot_image()) FL_TRY_EXTERN
return 1; {
if (fl_load_boot_image())
return 1;
(void)fl_applyn(1, symbol_value(symbol("__start")), (void)fl_applyn(1, symbol_value(symbol("__start")),
argv_list(argc, argv)); argv_list(argc, argv));
} }
FL_CATCH_EXTERN FL_CATCH_EXTERN
{ {
ios_puts("fatal error:\n", ios_stderr); ios_puts("fatal error:\n", ios_stderr);
fl_print(ios_stderr, fl_lasterror); fl_print(ios_stderr, fl_lasterror);
ios_putc('\n', ios_stderr); ios_putc('\n', ios_stderr);
return 1; return 1;
}
} }
return 0; return 0;
} }