summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-10 22:07:43 (GMT)
committerGuido van Rossum <guido@python.org>2001-04-10 22:07:43 (GMT)
commitbceccf5f43b51d166951ea97cff086c8828b745b (patch)
tree051a8711efadb0a2c114debc509946507e65469e /Modules/main.c
parent13aa70679ef504a7517261d5c4a3a27ee9aa30c7 (diff)
downloadcpython-bceccf5f43b51d166951ea97cff086c8828b745b.zip
cpython-bceccf5f43b51d166951ea97cff086c8828b745b.tar.gz
cpython-bceccf5f43b51d166951ea97cff086c8828b745b.tar.bz2
Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/Modules/main.c b/Modules/main.c
index b4566c9..0183647 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -26,10 +26,18 @@
static char **orig_argv;
static int orig_argc;
-/* For my_readline when running under RISCOS */
-#ifdef RISCOS
+/* command line options */
+#define BASE_OPTS "c:diOStuUvxXhVW:"
+
+#ifndef RISCOS
+#define PROGRAM_OPTS BASE_OPTS
+#else /*RISCOS*/
+/* extra option saying that we are running under a special task window
+ frontend; especially my_readline will behave different */
+#define PROGRAM_OPTS BASE_OPTS "w"
+/* corresponding flag */
extern int Py_RISCOSWimpFlag;
-#endif
+#endif /*RISCOS*/
/* Short usage message (with %s for argv0) */
static char *usage_line =
@@ -115,11 +123,7 @@ 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
+ while ((c = _PyOS_GetOpt(argc, argv, PROGRAM_OPTS)) != EOF) {
if (c == 'c') {
/* -c is the last option; following arguments
that look like options are left for the