]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added -d option (increments debugging variable); mostly to get rid
authorGuido van Rossum <guido@python.org>
Sun, 19 Jan 1992 16:48:36 +0000 (16:48 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 19 Jan 1992 16:48:36 +0000 (16:48 +0000)
of a compiler warning.

Python/pythonmain.c

index ccf5bcd4c15fd08e593331db3edae07bf0e71319..64e2f1016f2e60351f1cd22453a06a2a3fc832eb 100644 (file)
@@ -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: