From f5706f9c44cc99bc8e6d1f441e2cb826b1047584 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 19 Dec 2010 11:15:13 +0900 Subject: [PATCH] Make control of expression dumping less of a hassle. --- tools/qfcc/source/function.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/qfcc/source/function.c b/tools/qfcc/source/function.c index 3d4a80f91..6da7dfa83 100644 --- a/tools/qfcc/source/function.c +++ b/tools/qfcc/source/function.c @@ -514,7 +514,10 @@ finish_function (function_t *f) void emit_function (function_t *f, expr_t *e) { - //printf (" %s =\n", f->def->name); +//#define DUMP_EXPR +#ifdef DUMP_EXPR + printf (" %s =\n", f->def->name); +#endif if (f->aux) lineno_base = f->aux->source_line; @@ -526,9 +529,11 @@ emit_function (function_t *f, expr_t *e) current_scope = f->scope; while (e) { - //printf ("%d ", pr.source_line); - //print_expr (e); - //puts(""); +#ifdef DUMP_EXPR + printf ("%d ", pr.source_line); + print_expr (e); + puts(""); +#endif emit_expr (e); e = e->next; @@ -538,7 +543,9 @@ emit_function (function_t *f, expr_t *e) current_scope = pr.scope; reset_tempdefs (); - //puts (""); +#ifdef DUMP_EXPR + puts (""); +#endif } int