X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-text%2Ftypes.h;h=7d9b5bfb70b8a7da34ad88ff7c3b0566e9f1be44;hp=0670b3d6dffdf182a09c4963f309a9e72213833b;hb=de913cfdf87242ec3ff54c72a318ebb8714e5465;hpb=fd3382e8659903b36971efb933e5770e802b45d5 diff --git a/include/babeltrace/ctf-text/types.h b/include/babeltrace/ctf-text/types.h index 0670b3d6..7d9b5bfb 100644 --- a/include/babeltrace/ctf-text/types.h +++ b/include/babeltrace/ctf-text/types.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -39,6 +39,7 @@ struct ctf_text_stream_pos { int dummy; /* disable output */ int print_names; /* print field names */ int field_nr; + GString *string; /* Current string */ }; static inline @@ -68,4 +69,18 @@ void print_pos_tabs(struct ctf_text_stream_pos *pos) fprintf(pos->fp, "\t"); } +/* + * Check if the field must be printed. + */ +int print_field(struct definition *definition); + +static inline +const char *rem_(const char *str) +{ + if (str[0] == '_') + return &str[1]; + else + return str; +} + #endif /* _BABELTRACE_CTF_TEXT_TYPES_H */