Fix: define macros for logging levels
[babeltrace.git] / src / plugins / ctf / common / metadata / decoder.c
index cfa8ec17b99871ec1df782f04b27a99ac5f7e53e..a62beebfcd99cce5dacafe88d96883c8492c14b4 100644 (file)
 #include "decoder.h"
 #include "scanner.h"
 #include "logging.h"
+#include "parser-wrap.h"
 
 #define TSDL_MAGIC     0x75d11d57
 
-extern
-int yydebug;
-
 struct ctf_metadata_decoder {
        struct ctf_scanner *scanner;
        GString *text;
@@ -271,9 +269,11 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_append_content(
                }
        }
 
+#if YYDEBUG
        if (BT_LOG_ON_TRACE) {
                yydebug = 1;
        }
+#endif
 
        /* Save the file's position: we'll seek back to append the plain text */
        BT_ASSERT(fp);
@@ -341,7 +341,9 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_append_content(
        }
 
 end:
+#if YYDEBUG
        yydebug = 0;
+#endif
 
        if (fp && close_fp) {
                if (fclose(fp)) {
This page took 0.02363 seconds and 4 git commands to generate.