===================== --- src/main.c.orig 2007-04-11 17:26:55.000000000 -1000 +++ src/main.c 2007-05-03 13:16:21.000000000 -1000 @@ -473,6 +473,7 @@ mainproc = Scm_SymbolValue(Scm_UserModule(), SCM_SYMBOL(SCM_INTERN("main"))); if (SCM_PROCEDUREP(mainproc)) { +#if 0 int r = Scm_Apply(mainproc, SCM_LIST1(av), &epak); if (r > 0) { ScmObj res = epak.results[0]; @@ -482,6 +483,11 @@ Scm_ReportError(epak.exception); exit_code = 70; /* EX_SOFTWARE, see SRFI-22. */ } +#else + ScmObj r = Scm_ApplyRec(mainproc, SCM_LIST1(av)); + if (SCM_INTP(r)) exit_code = SCM_INT_VALUE(r); + else exit_code = 70; +#endif } } else { /* We're in interactive mode. (use gauche.interactive) */ =====================