Mercurial > cpython-lru_cache-weakref
diff Python/pythonmain.c @ 728:76d92ebb4d82 legacy-trunk
Add -v option (verbose) and get rid of finaloutput() function (unused)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 27 Mar 1992 17:21:30 +0000 |
| parents | 891f98357c04 |
| children | 0cd197947d81 |
line wrap: on
line diff
--- a/Python/pythonmain.c Fri Mar 27 17:21:04 1992 +0000 +++ b/Python/pythonmain.c Fri Mar 27 17:21:30 1992 +0000 @@ -42,6 +42,7 @@ extern grammar gram; /* From graminit.c */ int debugging; /* Needed by parser.c */ +int verbose; /* Needed by import.c */ /* Interface to getopt(): */ extern int optind; @@ -60,7 +61,7 @@ initargs(&argc, &argv); /* Defined in config*.c */ - while ((c = getopt(argc, argv, "c:d")) != EOF) { + while ((c = getopt(argc, argv, "c:dv")) != EOF) { if (c == 'c') { /* -c is the last option; following arguments that look like options are left for the @@ -78,6 +79,10 @@ debugging++; break; + case 'v': + verbose++; + break; + /* This space reserved for other options */ default: @@ -157,7 +162,7 @@ { if (filename == NULL) filename = "???"; - if (isatty(fileno(fp))) + if (isatty((int)fileno(fp))) return run_tty_loop(fp, filename); else return run_script(fp, filename); @@ -457,16 +462,7 @@ /*NOTREACHED*/ } -static -finaloutput() -{ #ifdef TRACE_REFS - if (!askyesno("Print left references?")) - return; - printrefs(stderr); -#endif /* TRACE_REFS */ -} - /* Ask a yes/no question */ static int @@ -480,6 +476,7 @@ return 0; return buf[0] == 'y' || buf[0] == 'Y'; } +#endif #ifdef applec /* MPW (also usable for Think C 3.0) */
