X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput%2Foutput-item.c;h=a4328b52e99725be3d9d568db3c31f4adfc8495b;hb=142f8f8814423f76523825f8df060e2fa9d2a2b6;hp=97f51f7604ff4bac4b57912527c95e20fd3f2ee0;hpb=5b1b418cf869237ef5d7987d1dea4a2806b759d8;p=pspp diff --git a/src/output/output-item.c b/src/output/output-item.c index 97f51f7604..a4328b52e9 100644 --- a/src/output/output-item.c +++ b/src/output/output-item.c @@ -360,13 +360,17 @@ output_item_dump (const struct output_item *item, int indentation) break; case OUTPUT_ITEM_TABLE: + printf ("table\n"); pivot_table_dump (item->table, indentation + 1); break; case OUTPUT_ITEM_TEXT: - printf ("text %s \"%s\"\n", - text_item_subtype_to_string (item->text.subtype), - pivot_value_to_string_defaults (item->text.content)); + { + char *s = pivot_value_to_string_defaults (item->text.content); + printf ("text %s \"%s\"\n", + text_item_subtype_to_string (item->text.subtype), s); + free (s); + } break; } } @@ -598,7 +602,7 @@ text_item_create_value (enum text_item_subtype subtype, ex->font_style->typeface = xstrdup ("Monospaced"); } - struct output_item *item = xzalloc (sizeof *item); + struct output_item *item = XZALLOC (struct output_item); *item = (struct output_item) { OUTPUT_ITEM_INITIALIZER (OUTPUT_ITEM_TEXT), .command_name = xstrdup_if_nonnull (output_get_command_name ()),