diff options
author | Guido van Rossum <guido@python.org> | 2001-03-02 06:18:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-03-02 06:18:03 (GMT) |
commit | 3ed4c15a88c79ae71a01854415a66ca1cd6697c7 (patch) | |
tree | 3028b845ec89685ae85ef6d19b894b069113317e /Modules | |
parent | f0ee4b20a92882c632f5bccf4c33bf22fa33599c (diff) | |
download | cpython-3ed4c15a88c79ae71a01854415a66ca1cd6697c7.zip cpython-3ed4c15a88c79ae71a01854415a66ca1cd6697c7.tar.gz cpython-3ed4c15a88c79ae71a01854415a66ca1cd6697c7.tar.bz2 |
RISCOS changes by dschwertberger.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index bef2574..03dff18 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -26,6 +26,11 @@ static char **orig_argv; static int orig_argc; +/* For my_readline when running under RISCOS */ +#ifdef RISCOS +extern int Py_RISCOSWimpFlag; +#endif + /* Short usage message (with %s for argv0) */ static char *usage_line = "usage: %s [option] ... [-c cmd | file | -] [arg] ...\n"; @@ -98,6 +103,10 @@ Py_Main(int argc, char **argv) orig_argc = argc; /* For Py_GetArgcArgv() */ orig_argv = argv; +#ifdef RISCOS + Py_RISCOSWimpFlag = 0; +#endif + if ((p = getenv("PYTHONINSPECT")) && *p != '\0') inspect = 1; if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') @@ -105,7 +114,11 @@ Py_Main(int argc, char **argv) PySys_ResetWarnOptions(); +#ifdef RISCOS + while ((c = getopt(argc, argv, "c:diOStuUvwxXhV")) != EOF) { +#else while ((c = _PyOS_GetOpt(argc, argv, "c:diOStuUvxXhVW:")) != EOF) { +#endif if (c == 'c') { /* -c is the last option; following arguments that look like options are left for the @@ -150,6 +163,12 @@ Py_Main(int argc, char **argv) Py_VerboseFlag++; break; +#ifdef RISCOS + case 'w': + Py_RISCOSWimpFlag = 1; + break; +#endif + case 'x': skipfirstline = 1; break; @@ -301,6 +320,10 @@ Py_Main(int argc, char **argv) sts = PyRun_AnyFile(stdin, "<stdin>") != 0; Py_Finalize(); +#ifdef RISCOS + if(Py_RISCOSWimpFlag) + fprintf(stderr, "\x0cq\x0c"); /* make frontend quit */ +#endif #ifdef __INSURE__ /* Insure++ is a memory analysis tool that aids in discovering |