Kaydet (Commit) 3ed4c15a authored tarafından Guido van Rossum's avatar Guido van Rossum

RISCOS changes by dschwertberger.

üst f0ee4b20
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
static char **orig_argv; static char **orig_argv;
static int orig_argc; 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) */ /* Short usage message (with %s for argv0) */
static char *usage_line = static char *usage_line =
"usage: %s [option] ... [-c cmd | file | -] [arg] ...\n"; "usage: %s [option] ... [-c cmd | file | -] [arg] ...\n";
...@@ -98,6 +103,10 @@ Py_Main(int argc, char **argv) ...@@ -98,6 +103,10 @@ Py_Main(int argc, char **argv)
orig_argc = argc; /* For Py_GetArgcArgv() */ orig_argc = argc; /* For Py_GetArgcArgv() */
orig_argv = argv; orig_argv = argv;
#ifdef RISCOS
Py_RISCOSWimpFlag = 0;
#endif
if ((p = getenv("PYTHONINSPECT")) && *p != '\0') if ((p = getenv("PYTHONINSPECT")) && *p != '\0')
inspect = 1; inspect = 1;
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
...@@ -105,7 +114,11 @@ Py_Main(int argc, char **argv) ...@@ -105,7 +114,11 @@ Py_Main(int argc, char **argv)
PySys_ResetWarnOptions(); PySys_ResetWarnOptions();
#ifdef RISCOS
while ((c = getopt(argc, argv, "c:diOStuUvwxXhV")) != EOF) {
#else
while ((c = _PyOS_GetOpt(argc, argv, "c:diOStuUvxXhVW:")) != EOF) { while ((c = _PyOS_GetOpt(argc, argv, "c:diOStuUvxXhVW:")) != EOF) {
#endif
if (c == 'c') { if (c == 'c') {
/* -c is the last option; following arguments /* -c is the last option; following arguments
that look like options are left for the that look like options are left for the
...@@ -150,6 +163,12 @@ Py_Main(int argc, char **argv) ...@@ -150,6 +163,12 @@ Py_Main(int argc, char **argv)
Py_VerboseFlag++; Py_VerboseFlag++;
break; break;
#ifdef RISCOS
case 'w':
Py_RISCOSWimpFlag = 1;
break;
#endif
case 'x': case 'x':
skipfirstline = 1; skipfirstline = 1;
break; break;
...@@ -301,6 +320,10 @@ Py_Main(int argc, char **argv) ...@@ -301,6 +320,10 @@ Py_Main(int argc, char **argv)
sts = PyRun_AnyFile(stdin, "<stdin>") != 0; sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
Py_Finalize(); Py_Finalize();
#ifdef RISCOS
if(Py_RISCOSWimpFlag)
fprintf(stderr, "\x0cq\x0c"); /* make frontend quit */
#endif
#ifdef __INSURE__ #ifdef __INSURE__
/* Insure++ is a memory analysis tool that aids in discovering /* Insure++ is a memory analysis tool that aids in discovering
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment