~ubuntu-branches/ubuntu/vivid/babeltrace/vivid

« back to all changes in this revision

Viewing changes to formats/ctf/types/enum.c

  • Committer: Package Import Robot
  • Author(s): Jon Bernard, a457ed8
  • Date: 2013-04-02 15:49:18 UTC
  • mfrom: (1.1.8) (0.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130402154918-njndzk94lffxhlmx
Tags: 1.1.0-1
[a457ed8] New upstream version 1.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <stdint.h>
32
32
#include <glib.h>
33
33
 
34
 
int ctf_enum_read(struct stream_pos *ppos, struct definition *definition)
 
34
int ctf_enum_read(struct bt_stream_pos *ppos, struct bt_definition *definition)
35
35
{
36
36
        struct definition_enum *enum_definition =
37
37
                container_of(definition, struct definition_enum, p);
48
48
        if (ret)
49
49
                return ret;
50
50
        if (!integer_declaration->signedness) {
51
 
                qs = enum_uint_to_quark_set(enum_declaration,
 
51
                qs = bt_enum_uint_to_quark_set(enum_declaration,
52
52
                        integer_definition->value._unsigned);
53
53
                if (!qs) {
54
54
                        fprintf(stderr, "[warning] Unknown value %" PRIu64 " in enum.\n",
55
55
                                integer_definition->value._unsigned);
56
56
                }
57
57
        } else {
58
 
                qs = enum_int_to_quark_set(enum_declaration,
 
58
                qs = bt_enum_int_to_quark_set(enum_declaration,
59
59
                        integer_definition->value._signed);
60
60
                if (!qs) {
61
61
                        fprintf(stderr, "[warning] Unknown value %" PRId64 " in enum.\n",
69
69
        return 0;
70
70
}
71
71
 
72
 
int ctf_enum_write(struct stream_pos *pos, struct definition *definition)
 
72
int ctf_enum_write(struct bt_stream_pos *pos, struct bt_definition *definition)
73
73
{
74
74
        struct definition_enum *enum_definition =
75
75
                container_of(definition, struct definition_enum, p);