Added -d option (increments debugging variable); mostly to get rid
of a compiler warning.
This commit is contained in:
parent
acbefefe21
commit
8401e5678c
|
@ -41,9 +41,7 @@ extern char *getpythonpath();
|
||||||
|
|
||||||
extern grammar gram; /* From graminit.c */
|
extern grammar gram; /* From graminit.c */
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
int debugging; /* Needed by parser.c */
|
int debugging; /* Needed by parser.c */
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Interface to getopt(): */
|
/* Interface to getopt(): */
|
||||||
extern int optind;
|
extern int optind;
|
||||||
|
@ -62,7 +60,7 @@ main(argc, argv)
|
||||||
|
|
||||||
initargs(&argc, &argv); /* Defined in config*.c */
|
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') {
|
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
|
||||||
|
@ -76,6 +74,10 @@ main(argc, argv)
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
debugging++;
|
||||||
|
break;
|
||||||
|
|
||||||
/* This space reserved for other options */
|
/* This space reserved for other options */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue