Values API: split into private and public APIs
[babeltrace.git] / plugins / text / pretty / pretty.c
1 /*
2 * pretty.c
3 *
4 * Babeltrace CTF Text Output Plugin
5 *
6 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 * Copyright 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28 */
29
30 #include <babeltrace/babeltrace.h>
31 #include <babeltrace/values.h>
32 #include <babeltrace/compiler-internal.h>
33 #include <babeltrace/common-internal.h>
34 #include <plugins-common.h>
35 #include <stdio.h>
36 #include <stdbool.h>
37 #include <glib.h>
38 #include <babeltrace/assert-internal.h>
39
40 #include "pretty.h"
41
42 GQuark stream_packet_context_quarks[STREAM_PACKET_CONTEXT_QUARKS_LEN];
43
44 static
45 const char *plugin_options[] = {
46 "color",
47 "path",
48 "no-delta",
49 "clock-cycles",
50 "clock-seconds",
51 "clock-date",
52 "clock-gmt",
53 "verbose",
54 "name-default", /* show/hide */
55 "name-payload",
56 "name-context",
57 "name-scope",
58 "name-header",
59 "field-default", /* show/hide */
60 "field-trace",
61 "field-trace:hostname",
62 "field-trace:domain",
63 "field-trace:procname",
64 "field-trace:vpid",
65 "field-loglevel",
66 "field-emf",
67 "field-callsite",
68 };
69
70 static
71 void destroy_pretty_data(struct pretty_component *pretty)
72 {
73 bt_object_put_ref(pretty->input_iterator);
74
75 if (pretty->string) {
76 (void) g_string_free(pretty->string, TRUE);
77 }
78
79 if (pretty->tmp_string) {
80 (void) g_string_free(pretty->tmp_string, TRUE);
81 }
82
83 if (pretty->out != stdout) {
84 int ret;
85
86 ret = fclose(pretty->out);
87 if (ret) {
88 perror("close output file");
89 }
90 }
91 g_free(pretty->options.output_path);
92 g_free(pretty);
93 }
94
95 static
96 struct pretty_component *create_pretty(void)
97 {
98 struct pretty_component *pretty;
99
100 pretty = g_new0(struct pretty_component, 1);
101 if (!pretty) {
102 goto end;
103 }
104 pretty->string = g_string_new("");
105 if (!pretty->string) {
106 goto error;
107 }
108 pretty->tmp_string = g_string_new("");
109 if (!pretty->tmp_string) {
110 goto error;
111 }
112 end:
113 return pretty;
114
115 error:
116 g_free(pretty);
117 return NULL;
118 }
119
120 BT_HIDDEN
121 void pretty_finalize(struct bt_private_component *component)
122 {
123 void *data = bt_private_component_get_user_data(component);
124
125 destroy_pretty_data(data);
126 }
127
128 static
129 enum bt_component_status handle_notification(struct pretty_component *pretty,
130 struct bt_notification *notification)
131 {
132 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
133
134 BT_ASSERT(pretty);
135
136 switch (bt_notification_get_type(notification)) {
137 case BT_NOTIFICATION_TYPE_PACKET_BEGIN:
138 ret = pretty_print_packet(pretty, notification);
139 break;
140 case BT_NOTIFICATION_TYPE_EVENT:
141 ret = pretty_print_event(pretty, notification);
142 break;
143 case BT_NOTIFICATION_TYPE_INACTIVITY:
144 fprintf(stderr, "Inactivity notification\n");
145 break;
146 default:
147 break;
148 }
149
150 return ret;
151 }
152
153 BT_HIDDEN
154 enum bt_component_status pretty_port_connected(
155 struct bt_private_component *component,
156 struct bt_private_port *self_port,
157 struct bt_port *other_port)
158 {
159 enum bt_component_status status = BT_COMPONENT_STATUS_OK;
160 enum bt_connection_status conn_status;
161 struct bt_private_connection *connection;
162 struct pretty_component *pretty;
163
164 pretty = bt_private_component_get_user_data(component);
165 BT_ASSERT(pretty);
166 BT_ASSERT(!pretty->input_iterator);
167 connection = bt_private_port_get_private_connection(self_port);
168 BT_ASSERT(connection);
169 conn_status = bt_private_connection_create_notification_iterator(
170 connection, &pretty->input_iterator);
171 if (conn_status != BT_CONNECTION_STATUS_OK) {
172 status = BT_COMPONENT_STATUS_ERROR;
173 }
174
175 bt_object_put_ref(connection);
176 return status;
177 }
178
179 BT_HIDDEN
180 enum bt_component_status pretty_consume(struct bt_private_component *component)
181 {
182 enum bt_component_status ret;
183 bt_notification_array notifs;
184 struct bt_notification_iterator *it;
185 struct pretty_component *pretty =
186 bt_private_component_get_user_data(component);
187 enum bt_notification_iterator_status it_ret;
188 uint64_t count = 0;
189 uint64_t i = 0;
190
191 it = pretty->input_iterator;
192 it_ret = bt_private_connection_notification_iterator_next(it, &notifs,
193 &count);
194
195 switch (it_ret) {
196 case BT_NOTIFICATION_ITERATOR_STATUS_END:
197 ret = BT_COMPONENT_STATUS_END;
198 BT_OBJECT_PUT_REF_AND_RESET(pretty->input_iterator);
199 goto end;
200 case BT_NOTIFICATION_ITERATOR_STATUS_AGAIN:
201 ret = BT_COMPONENT_STATUS_AGAIN;
202 goto end;
203 case BT_NOTIFICATION_ITERATOR_STATUS_OK:
204 break;
205 default:
206 ret = BT_COMPONENT_STATUS_ERROR;
207 goto end;
208 }
209
210 BT_ASSERT(it_ret == BT_NOTIFICATION_ITERATOR_STATUS_OK);
211
212 for (i = 0; i < count; i++) {
213 ret = handle_notification(pretty, notifs[i]);
214 if (ret) {
215 goto end;
216 }
217
218 bt_object_put_ref(notifs[i]);
219 }
220
221 end:
222 for (; i < count; i++) {
223 bt_object_put_ref(notifs[i]);
224 }
225
226 return ret;
227 }
228
229 static
230 enum bt_component_status add_params_to_map(
231 struct bt_private_value *plugin_opt_map)
232 {
233 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
234 unsigned int i;
235
236 for (i = 0; i < BT_ARRAY_SIZE(plugin_options); i++) {
237 const char *key = plugin_options[i];
238 enum bt_value_status status;
239
240 status = bt_private_value_map_insert_entry(plugin_opt_map, key,
241 bt_value_null);
242 switch (status) {
243 case BT_VALUE_STATUS_OK:
244 break;
245 default:
246 ret = BT_COMPONENT_STATUS_ERROR;
247 goto end;
248 }
249 }
250 end:
251 return ret;
252 }
253
254 static
255 bt_bool check_param_exists(const char *key, struct bt_value *object, void *data)
256 {
257 struct pretty_component *pretty = data;
258
259 if (!bt_value_map_has_entry(
260 bt_value_borrow_from_private(pretty->plugin_opt_map),
261 key)) {
262 fprintf(pretty->err,
263 "[warning] Parameter \"%s\" unknown to \"text.pretty\" sink component\n", key);
264 }
265 return BT_TRUE;
266 }
267
268 static
269 enum bt_component_status apply_one_string(const char *key,
270 struct bt_value *params,
271 char **option)
272 {
273 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
274 struct bt_value *value = NULL;
275 enum bt_value_status status;
276 const char *str;
277
278 value = bt_value_map_borrow_entry_value(params, key);
279 if (!value) {
280 goto end;
281 }
282 if (bt_value_is_null(value)) {
283 goto end;
284 }
285 status = bt_value_string_get(value, &str);
286 switch (status) {
287 case BT_VALUE_STATUS_OK:
288 break;
289 default:
290 ret = BT_COMPONENT_STATUS_ERROR;
291 goto end;
292 }
293 *option = g_strdup(str);
294 end:
295 return ret;
296 }
297
298 static
299 enum bt_component_status apply_one_bool(const char *key,
300 struct bt_value *params,
301 bool *option,
302 bool *found)
303 {
304 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
305 struct bt_value *value = NULL;
306 enum bt_value_status status;
307 bt_bool bool_val;
308
309 value = bt_value_map_borrow_entry_value(params, key);
310 if (!value) {
311 goto end;
312 }
313 status = bt_value_bool_get(value, &bool_val);
314 switch (status) {
315 case BT_VALUE_STATUS_OK:
316 break;
317 default:
318 ret = BT_COMPONENT_STATUS_ERROR;
319 goto end;
320 }
321 *option = (bool) bool_val;
322 if (found) {
323 *found = true;
324 }
325
326 end:
327 return ret;
328 }
329
330 static
331 void warn_wrong_color_param(struct pretty_component *pretty)
332 {
333 fprintf(pretty->err,
334 "[warning] Accepted values for the \"color\" parameter are:\n \"always\", \"auto\", \"never\"\n");
335 }
336
337 static
338 enum bt_component_status open_output_file(struct pretty_component *pretty)
339 {
340 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
341
342 if (!pretty->options.output_path) {
343 goto end;
344 }
345
346 pretty->out = fopen(pretty->options.output_path, "w");
347 if (!pretty->out) {
348 goto error;
349 }
350
351 goto end;
352
353 error:
354 ret = BT_COMPONENT_STATUS_ERROR;
355 end:
356 return ret;
357 }
358
359 static
360 enum bt_component_status apply_params(struct pretty_component *pretty,
361 struct bt_value *params)
362 {
363 enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
364 enum bt_value_status status;
365 bool value, found;
366 char *str = NULL;
367
368 pretty->plugin_opt_map = bt_private_value_map_create();
369 if (!pretty->plugin_opt_map) {
370 ret = BT_COMPONENT_STATUS_ERROR;
371 goto end;
372 }
373 ret = add_params_to_map(pretty->plugin_opt_map);
374 if (ret != BT_COMPONENT_STATUS_OK) {
375 goto end;
376 }
377 /* Report unknown parameters. */
378 status = bt_value_map_foreach_entry(params, check_param_exists, pretty);
379 switch (status) {
380 case BT_VALUE_STATUS_OK:
381 break;
382 default:
383 ret = BT_COMPONENT_STATUS_ERROR;
384 goto end;
385 }
386 /* Known parameters. */
387 pretty->options.color = PRETTY_COLOR_OPT_AUTO;
388 if (bt_value_map_has_entry(params, "color")) {
389 struct bt_value *color_value;
390 const char *color;
391
392 color_value = bt_value_map_borrow_entry_value(params, "color");
393 if (!color_value) {
394 goto end;
395 }
396
397 status = bt_value_string_get(color_value, &color);
398 if (status) {
399 warn_wrong_color_param(pretty);
400 } else {
401 if (strcmp(color, "never") == 0) {
402 pretty->options.color = PRETTY_COLOR_OPT_NEVER;
403 } else if (strcmp(color, "auto") == 0) {
404 pretty->options.color = PRETTY_COLOR_OPT_AUTO;
405 } else if (strcmp(color, "always") == 0) {
406 pretty->options.color = PRETTY_COLOR_OPT_ALWAYS;
407 } else {
408 warn_wrong_color_param(pretty);
409 }
410 }
411 }
412
413 ret = apply_one_string("path", params, &pretty->options.output_path);
414 if (ret != BT_COMPONENT_STATUS_OK) {
415 goto end;
416 }
417 ret = open_output_file(pretty);
418 if (ret != BT_COMPONENT_STATUS_OK) {
419 goto end;
420 }
421
422 value = false; /* Default. */
423 ret = apply_one_bool("no-delta", params, &value, NULL);
424 if (ret != BT_COMPONENT_STATUS_OK) {
425 goto end;
426 }
427 pretty->options.print_delta_field = !value; /* Reverse logic. */
428
429 value = false; /* Default. */
430 ret = apply_one_bool("clock-cycles", params, &value, NULL);
431 if (ret != BT_COMPONENT_STATUS_OK) {
432 goto end;
433 }
434 pretty->options.print_timestamp_cycles = value;
435
436 value = false; /* Default. */
437 ret = apply_one_bool("clock-seconds", params, &value, NULL);
438 if (ret != BT_COMPONENT_STATUS_OK) {
439 goto end;
440 }
441 pretty->options.clock_seconds = value;
442
443 value = false; /* Default. */
444 ret = apply_one_bool("clock-date", params, &value, NULL);
445 if (ret != BT_COMPONENT_STATUS_OK) {
446 goto end;
447 }
448 pretty->options.clock_date = value;
449
450 value = false; /* Default. */
451 ret = apply_one_bool("clock-gmt", params, &value, NULL);
452 if (ret != BT_COMPONENT_STATUS_OK) {
453 goto end;
454 }
455 pretty->options.clock_gmt = value;
456
457 value = false; /* Default. */
458 ret = apply_one_bool("verbose", params, &value, NULL);
459 if (ret != BT_COMPONENT_STATUS_OK) {
460 goto end;
461 }
462 pretty->options.verbose = value;
463
464 /* Names. */
465 ret = apply_one_string("name-default", params, &str);
466 if (ret != BT_COMPONENT_STATUS_OK) {
467 goto end;
468 }
469 if (!str) {
470 pretty->options.name_default = PRETTY_DEFAULT_UNSET;
471 } else if (!strcmp(str, "show")) {
472 pretty->options.name_default = PRETTY_DEFAULT_SHOW;
473 } else if (!strcmp(str, "hide")) {
474 pretty->options.name_default = PRETTY_DEFAULT_HIDE;
475 } else {
476 ret = BT_COMPONENT_STATUS_ERROR;
477 goto end;
478 }
479 g_free(str);
480 str = NULL;
481
482 switch (pretty->options.name_default) {
483 case PRETTY_DEFAULT_UNSET:
484 pretty->options.print_payload_field_names = true;
485 pretty->options.print_context_field_names = true;
486 pretty->options.print_header_field_names = false;
487 pretty->options.print_scope_field_names = false;
488 break;
489 case PRETTY_DEFAULT_SHOW:
490 pretty->options.print_payload_field_names = true;
491 pretty->options.print_context_field_names = true;
492 pretty->options.print_header_field_names = true;
493 pretty->options.print_scope_field_names = true;
494 break;
495 case PRETTY_DEFAULT_HIDE:
496 pretty->options.print_payload_field_names = false;
497 pretty->options.print_context_field_names = false;
498 pretty->options.print_header_field_names = false;
499 pretty->options.print_scope_field_names = false;
500 break;
501 default:
502 ret = BT_COMPONENT_STATUS_ERROR;
503 goto end;
504 }
505
506 value = false;
507 found = false;
508 ret = apply_one_bool("name-payload", params, &value, &found);
509 if (ret != BT_COMPONENT_STATUS_OK) {
510 goto end;
511 }
512 if (found) {
513 pretty->options.print_payload_field_names = value;
514 }
515
516 value = false;
517 found = false;
518 ret = apply_one_bool("name-context", params, &value, &found);
519 if (ret != BT_COMPONENT_STATUS_OK) {
520 goto end;
521 }
522 if (found) {
523 pretty->options.print_context_field_names = value;
524 }
525
526 value = false;
527 found = false;
528 ret = apply_one_bool("name-header", params, &value, &found);
529 if (ret != BT_COMPONENT_STATUS_OK) {
530 goto end;
531 }
532 if (found) {
533 pretty->options.print_header_field_names = value;
534 }
535
536 value = false;
537 found = false;
538 ret = apply_one_bool("name-scope", params, &value, &found);
539 if (ret != BT_COMPONENT_STATUS_OK) {
540 goto end;
541 }
542 if (found) {
543 pretty->options.print_scope_field_names = value;
544 }
545
546 /* Fields. */
547 ret = apply_one_string("field-default", params, &str);
548 if (ret != BT_COMPONENT_STATUS_OK) {
549 goto end;
550 }
551 if (!str) {
552 pretty->options.field_default = PRETTY_DEFAULT_UNSET;
553 } else if (!strcmp(str, "show")) {
554 pretty->options.field_default = PRETTY_DEFAULT_SHOW;
555 } else if (!strcmp(str, "hide")) {
556 pretty->options.field_default = PRETTY_DEFAULT_HIDE;
557 } else {
558 ret = BT_COMPONENT_STATUS_ERROR;
559 goto end;
560 }
561 g_free(str);
562 str = NULL;
563
564 switch (pretty->options.field_default) {
565 case PRETTY_DEFAULT_UNSET:
566 pretty->options.print_trace_field = false;
567 pretty->options.print_trace_hostname_field = true;
568 pretty->options.print_trace_domain_field = false;
569 pretty->options.print_trace_procname_field = true;
570 pretty->options.print_trace_vpid_field = true;
571 pretty->options.print_loglevel_field = false;
572 pretty->options.print_emf_field = false;
573 pretty->options.print_callsite_field = false;
574 break;
575 case PRETTY_DEFAULT_SHOW:
576 pretty->options.print_trace_field = true;
577 pretty->options.print_trace_hostname_field = true;
578 pretty->options.print_trace_domain_field = true;
579 pretty->options.print_trace_procname_field = true;
580 pretty->options.print_trace_vpid_field = true;
581 pretty->options.print_loglevel_field = true;
582 pretty->options.print_emf_field = true;
583 pretty->options.print_callsite_field = true;
584 break;
585 case PRETTY_DEFAULT_HIDE:
586 pretty->options.print_trace_field = false;
587 pretty->options.print_trace_hostname_field = false;
588 pretty->options.print_trace_domain_field = false;
589 pretty->options.print_trace_procname_field = false;
590 pretty->options.print_trace_vpid_field = false;
591 pretty->options.print_loglevel_field = false;
592 pretty->options.print_emf_field = false;
593 pretty->options.print_callsite_field = false;
594 break;
595 default:
596 ret = BT_COMPONENT_STATUS_ERROR;
597 goto end;
598 }
599
600 value = false;
601 found = false;
602 ret = apply_one_bool("field-trace", params, &value, &found);
603 if (ret != BT_COMPONENT_STATUS_OK) {
604 goto end;
605 }
606 if (found) {
607 pretty->options.print_trace_field = value;
608 }
609
610 value = false;
611 found = false;
612 ret = apply_one_bool("field-trace:hostname", params, &value, &found);
613 if (ret != BT_COMPONENT_STATUS_OK) {
614 goto end;
615 }
616 if (found) {
617 pretty->options.print_trace_hostname_field = value;
618 }
619
620 value = false;
621 found = false;
622 ret = apply_one_bool("field-trace:domain", params, &value, &found);
623 if (ret != BT_COMPONENT_STATUS_OK) {
624 goto end;
625 }
626 if (found) {
627 pretty->options.print_trace_domain_field = value;
628 }
629
630 value = false;
631 found = false;
632 ret = apply_one_bool("field-trace:procname", params, &value, &found);
633 if (ret != BT_COMPONENT_STATUS_OK) {
634 goto end;
635 }
636 if (found) {
637 pretty->options.print_trace_procname_field = value;
638 }
639
640 value = false;
641 found = false;
642 ret = apply_one_bool("field-trace:vpid", params, &value, &found);
643 if (ret != BT_COMPONENT_STATUS_OK) {
644 goto end;
645 }
646 if (found) {
647 pretty->options.print_trace_vpid_field = value;
648 }
649
650 value = false;
651 found = false;
652 ret = apply_one_bool("field-loglevel", params, &value, &found);
653 if (ret != BT_COMPONENT_STATUS_OK) {
654 goto end;
655 }
656 if (found) {
657 pretty->options.print_loglevel_field = value;
658 }
659
660 value = false;
661 found = false;
662 ret = apply_one_bool("field-emf", params, &value, &found);
663 if (ret != BT_COMPONENT_STATUS_OK) {
664 goto end;
665 }
666 if (found) {
667 pretty->options.print_emf_field = value;
668 }
669
670 value = false;
671 found = false;
672 ret = apply_one_bool("field-callsite", params, &value, &found);
673 if (ret != BT_COMPONENT_STATUS_OK) {
674 goto end;
675 }
676 if (found) {
677 pretty->options.print_callsite_field = value;
678 }
679
680 end:
681 bt_object_put_ref(pretty->plugin_opt_map);
682 pretty->plugin_opt_map = NULL;
683 g_free(str);
684 return ret;
685 }
686
687 static
688 void set_use_colors(struct pretty_component *pretty)
689 {
690 switch (pretty->options.color) {
691 case PRETTY_COLOR_OPT_ALWAYS:
692 pretty->use_colors = true;
693 break;
694 case PRETTY_COLOR_OPT_AUTO:
695 pretty->use_colors = pretty->out == stdout &&
696 bt_common_colors_supported();
697 break;
698 case PRETTY_COLOR_OPT_NEVER:
699 pretty->use_colors = false;
700 break;
701 }
702 }
703
704 static
705 void init_stream_packet_context_quarks(void)
706 {
707 stream_packet_context_quarks[Q_TIMESTAMP_BEGIN] =
708 g_quark_from_string("timestamp_begin");
709 stream_packet_context_quarks[Q_TIMESTAMP_BEGIN] =
710 g_quark_from_string("timestamp_begin");
711 stream_packet_context_quarks[Q_TIMESTAMP_END] =
712 g_quark_from_string("timestamp_end");
713 stream_packet_context_quarks[Q_EVENTS_DISCARDED] =
714 g_quark_from_string("events_discarded");
715 stream_packet_context_quarks[Q_CONTENT_SIZE] =
716 g_quark_from_string("content_size");
717 stream_packet_context_quarks[Q_PACKET_SIZE] =
718 g_quark_from_string("packet_size");
719 stream_packet_context_quarks[Q_PACKET_SEQ_NUM] =
720 g_quark_from_string("packet_seq_num");
721 }
722
723 BT_HIDDEN
724 enum bt_component_status pretty_init(
725 struct bt_private_component *component,
726 struct bt_value *params,
727 UNUSED_VAR void *init_method_data)
728 {
729 enum bt_component_status ret;
730 struct pretty_component *pretty = create_pretty();
731
732 if (!pretty) {
733 ret = BT_COMPONENT_STATUS_NOMEM;
734 goto end;
735 }
736
737 ret = bt_private_component_sink_add_input_private_port(component,
738 "in", NULL, NULL);
739 if (ret != BT_COMPONENT_STATUS_OK) {
740 goto end;
741 }
742
743 pretty->out = stdout;
744 pretty->err = stderr;
745
746 pretty->delta_cycles = -1ULL;
747 pretty->last_cycles_timestamp = -1ULL;
748
749 pretty->delta_real_timestamp = -1ULL;
750 pretty->last_real_timestamp = -1ULL;
751
752 ret = apply_params(pretty, params);
753 if (ret != BT_COMPONENT_STATUS_OK) {
754 goto error;
755 }
756
757 set_use_colors(pretty);
758 ret = bt_private_component_set_user_data(component, pretty);
759 if (ret != BT_COMPONENT_STATUS_OK) {
760 goto error;
761 }
762
763 init_stream_packet_context_quarks();
764
765 end:
766 return ret;
767 error:
768 destroy_pretty_data(pretty);
769 return ret;
770 }
This page took 0.046483 seconds and 4 git commands to generate.