]> thyrsus.com Git - intercal.git/commitdiff
Show comments when cdebug is set
authorAlex Smith <ais523@bham.ac.uk>
Mon, 26 May 2008 22:44:00 +0000 (18:44 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:34:55 +0000 (20:34 -0400)
src/feh2.c
src/perpet.c

index b6771fcc76d6a8b5c52321bdd1a5e2b75213ac65..46c0a9f19393034eeb2e620841ca5d527b92ab97 100644 (file)
@@ -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 */
index 2ff0edc320996eb8ac6fad635604e3c606b294bc..9cd769616f884bbc6e1aec8180600b1220264f9c 100644 (file)
@@ -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