mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
RISCOS changes by dschwertberger.
This commit is contained in:
parent
f0ee4b20a9
commit
3ed4c15a88
1 changed files with 23 additions and 0 deletions
|
|
@ -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)
|
||||||
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)
|
||||||
|
|
||||||
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)
|
||||||
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)
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue