struct name cleanup in preparation for AST + warning removal
[babeltrace.git] / formats / ctf / metadata / ctf-parser.y
index 1f7420ea5d34187b77b76a6c2cc02006ad40865c..fb7e9b7cf5d4a4abf3d29f6fb4ffbe5279436aef 100644 (file)
@@ -1,8 +1,20 @@
 %{
 /*
- * ctf.y
+ * ctf-parser.y
  *
  * Common Trace Format Metadata Grammar.
+ *
+ * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <stdio.h>
@@ -58,31 +70,32 @@ void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src)
        strcpy(lvalp->gs->s, src);
 }
 
-static void init_scope(struct scope *scope, struct scope *parent)
+static void init_scope(struct ctf_scanner_scope *scope,
+                      struct ctf_scanner_scope *parent)
 {
        scope->parent = parent;
        scope->types = g_hash_table_new_full(g_str_hash, g_str_equal,
                                             (GDestroyNotify) free, NULL);
 }
 
-static void finalize_scope(struct scope *scope)
+static void finalize_scope(struct ctf_scanner_scope *scope)
 {
        g_hash_table_destroy(scope->types);
 }
 
 static void push_scope(struct ctf_scanner *scanner)
 {
-       struct scope *ns;
+       struct ctf_scanner_scope *ns;
 
        printf_dbg_noarg("push scope\n");
-       ns = malloc(sizeof(struct scope));
+       ns = malloc(sizeof(struct ctf_scanner_scope));
        init_scope(ns, scanner->cs);
        scanner->cs = ns;
 }
 
 static void pop_scope(struct ctf_scanner *scanner)
 {
-       struct scope *os;
+       struct ctf_scanner_scope *os;
 
        printf_dbg_noarg("pop scope\n");
        os = scanner->cs;
@@ -91,7 +104,7 @@ static void pop_scope(struct ctf_scanner *scanner)
        free(os);
 }
 
-static int lookup_type(struct scope *s, const char *id)
+static int lookup_type(struct ctf_scanner_scope *s, const char *id)
 {
        int ret;
 
@@ -102,7 +115,7 @@ static int lookup_type(struct scope *s, const char *id)
 
 int is_type(struct ctf_scanner *scanner, const char *id)
 {
-       struct scope *it;
+       struct ctf_scanner_scope *it;
        int ret = 0;
 
        for (it = scanner->cs; it != NULL; it = it->parent) {
This page took 0.02547 seconds and 4 git commands to generate.