Export the babeltrace API in babeltrace.h
[babeltrace.git] / formats / ctf / metadata / ctf-parser-test.c
index b99817e02d4374719e58545d9db9e0c8f16febf0..e84dc1289c168c124c7e6109a47fc795b88b58cb 100644 (file)
 #include <glib.h>
 #include <errno.h>
 #include <endian.h>
+#include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/ctf/metadata.h>
 #include "ctf-scanner.h"
 #include "ctf-parser.h"
 #include "ctf-ast.h"
 
-extern int yydebug;
+int babeltrace_verbose, babeltrace_debug;
 
 int main(int argc, char **argv)
 {
@@ -34,7 +35,8 @@ int main(int argc, char **argv)
        struct ctf_trace *trace;
        int ret = 0;
 
-       yydebug = 1;
+       babeltrace_debug = 1;
+       babeltrace_verbose = 1;
        scanner = ctf_scanner_alloc(stdin);
        if (!scanner) {
                fprintf(stdout, "Error allocating scanner\n");
@@ -58,6 +60,7 @@ int main(int argc, char **argv)
                goto end;
        }
        trace = malloc(sizeof(*trace));
+       memset(trace, 0, sizeof(*trace));
        ret = ctf_visitor_construct_metadata(stdout, 0, &scanner->ast->root,
                        trace, BYTE_ORDER);
        if (ret) {
This page took 0.023855 seconds and 4 git commands to generate.