debug printing: cleanup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Feb 2011 03:34:52 +0000 (22:34 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Feb 2011 03:34:52 +0000 (22:34 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-lexer.l
formats/ctf/metadata/ctf-parser.y

index 5291d2cc442f98682dff200c56c61de399d432ba..56122813c91766d51d61a4d20109f29ab9f20a7d 100644 (file)
@@ -29,8 +29,7 @@ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
        __attribute__((unused));
 static int input (yyscan_t yyscanner) __attribute__((unused));
 
-#define printf_dbg(fmt, args...)       fprintf(stderr, "%s: " fmt, __func__, args)
-#define printf_dbg_noarg(fmt)  fprintf(stderr, "%s: " fmt, __func__)
+#define printf_dbg(fmt, args...)       fprintf(stderr, "%s: " fmt, __func__, ##args)
 
 %}
 
index 38031b007d851cb8082703b556c7ee921c544e03..7847a85d2664c6149ea0b3ecb527f0487fd6af27 100644 (file)
@@ -28,8 +28,7 @@
 #include "ctf-parser.h"
 #include "ctf-ast.h"
 
-#define printf_dbg(fmt, args...)       fprintf(stderr, "%s: " fmt, __func__, args)
-#define printf_dbg_noarg(fmt)  fprintf(stderr, "%s: " fmt, __func__)
+#define printf_dbg(fmt, args...)       fprintf(stderr, "%s: " fmt, __func__, ## args)
 
 int yyparse(struct ctf_scanner *scanner);
 int yylex(union YYSTYPE *yyval, struct ctf_scanner *scanner);
@@ -87,7 +86,7 @@ static void push_scope(struct ctf_scanner *scanner)
 {
        struct ctf_scanner_scope *ns;
 
-       printf_dbg_noarg("push scope\n");
+       printf_dbg("push scope\n");
        ns = malloc(sizeof(struct ctf_scanner_scope));
        init_scope(ns, scanner->cs);
        scanner->cs = ns;
@@ -97,7 +96,7 @@ static void pop_scope(struct ctf_scanner *scanner)
 {
        struct ctf_scanner_scope *os;
 
-       printf_dbg_noarg("pop scope\n");
+       printf_dbg("pop scope\n");
        os = scanner->cs;
        scanner->cs = os->parent;
        finalize_scope(os);
This page took 0.024912 seconds and 4 git commands to generate.