mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 13:16:36 +02:00
Merge branch 'master' into win32-cmake
This commit is contained in:
commit
6a09c87c98
1 changed files with 4 additions and 5 deletions
9
main.c
9
main.c
|
@ -307,10 +307,10 @@ sexp run_main (int argc, char **argv) {
|
|||
args = SEXP_NULL;
|
||||
env = NULL;
|
||||
|
||||
#ifndef _WIN32
|
||||
/* SRFI 22: invoke `main` procedure by default if the interpreter is invoked */
|
||||
/* as `scheme-r7rs`. */
|
||||
if (strncmp(basename(argv[0]), "scheme-r7rs", strlen("scheme-r7rs")) == 0) {
|
||||
/* SRFI 22: invoke `main` procedure by default if the interpreter is */
|
||||
/* invoked as `scheme-r7rs`. */
|
||||
arg = strrchr(argv[0], '/');
|
||||
if (strncmp((arg == NULL ? argv[0] : arg + 1), "scheme-r7rs", strlen("scheme-r7rs")) == 0) {
|
||||
main_symbol = "main";
|
||||
/* skip option parsing since we can't pass `--` before the name of script */
|
||||
/* to avoid misinterpret the name as options when the interpreter is */
|
||||
|
@ -318,7 +318,6 @@ sexp run_main (int argc, char **argv) {
|
|||
i = 1;
|
||||
goto done_options;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* parse options */
|
||||
for (i=1; i < argc && argv[i][0] == '-'; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue