summaryrefslogtreecommitdiffstats
path: root/Python/pythonmain.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-19 16:48:36 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-19 16:48:36 (GMT)
commit8401e5678cebd716044825532f1893e7e57a6dd3 (patch)
tree98fe26e9dec971a9385913f5347cce2d9289faed /Python/pythonmain.c
parentacbefefe21c86e918d7efff88e75cf69128f2115 (diff)
downloadcpython-8401e5678cebd716044825532f1893e7e57a6dd3.zip
cpython-8401e5678cebd716044825532f1893e7e57a6dd3.tar.gz
cpython-8401e5678cebd716044825532f1893e7e57a6dd3.tar.bz2
Added -d option (increments debugging variable); mostly to get rid
of a compiler warning.
Diffstat (limited to 'Python/pythonmain.c')
-rw-r--r--Python/pythonmain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index ccf5bcd..64e2f10 100644
--- a/Python/pythonmain.c
+++ b/Python/pythonmain.c
@@ -41,9 +41,7 @@ extern char *getpythonpath();
extern grammar gram; /* From graminit.c */
-#ifdef DEBUG
int debugging; /* Needed by parser.c */
-#endif
/* Interface to getopt(): */
extern int optind;
@@ -62,7 +60,7 @@ main(argc, argv)
initargs(&argc, &argv); /* Defined in config*.c */
- while ((c = getopt(argc, argv, "c:")) != EOF) {
+ while ((c = getopt(argc, argv, "c:d")) != EOF) {
if (c == 'c') {
/* -c is the last option; following arguments
that look like options are left for the
@@ -76,6 +74,10 @@ main(argc, argv)
switch (c) {
+ case 'd':
+ debugging++;
+ break;
+
/* This space reserved for other options */
default: