From: Alex Smith Date: Mon, 26 May 2008 22:44:00 +0000 (-0400) Subject: Show comments when cdebug is set X-Git-Tag: 0.29~234 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=55a1ccfb2025ada5d6115f5ebb85709f8643754f;p=intercal.git Show comments when cdebug is set --- diff --git a/src/feh2.c b/src/feh2.c index b6771fc..46c0a9f 100644 --- a/src/feh2.c +++ b/src/feh2.c @@ -1727,9 +1727,10 @@ void emit(tuple *tn, FILE *fp) int dim; int generatecfjump=0; /* AIS */ static int pasttryagain=0; /* AIS */ + extern int cdebug; /* grind out label and source dump */ - if (yydebug || compile_only) + if (yydebug || cdebug || compile_only) (void) fprintf(fp, " /* line %03d */\n", tn->ick_lineno); if (tn->label) { @@ -1739,7 +1740,7 @@ void emit(tuple *tn, FILE *fp) /* AIS: start one of ick_ec's labeled blocks. */ (void) fprintf(fp, "ick_labeledblock(%uU,{",tn->label); } - if (yydebug || compile_only) + if (yydebug || cdebug || compile_only) { (void) fprintf(fp, "\t""/* %s */", textlines[tn->ick_lineno]); /* AIS: grind out an expression explanation */ diff --git a/src/perpet.c b/src/perpet.c index 2ff0edc..9cd7696 100644 --- a/src/perpet.c +++ b/src/perpet.c @@ -85,7 +85,7 @@ int variableconstants; /* AIS: Allow anything on the left of an assignment. */ int createsused=0; /* AIS: Allow the use of CREATE. */ int useickec; /* AIS: Link together INTERCAL and C. */ static int nosyslib=0; /* AIS: Don't link syslib under any circumstances. */ -static int cdebug; /* AIS: Pass -g to our C compiler, and leave C code. */ +int cdebug; /* AIS: Pass -g to our C compiler, and leave C code. */ int optdebug; /* AIS: Debug the optimizer. Value is 0, 1, 2, or 3. */ int flowoptimize; /* AIS: Do flow optimizations (in INTERCAL!). */ int coopt; /* AIS: The constant-output optimization. This should