+
+static void
+add_row (struct pivot_table *table, const char *attribute,
+ const char *value)
+{
+ int row = pivot_category_create_leaf (table->dimensions[0]->root,
+ pivot_value_new_text (attribute));
+ if (value)
+ pivot_table_put1 (table, row, pivot_value_new_user_text (value, -1));
+}
+
+static void
+show_system (const struct dataset *ds UNUSED)
+{
+ struct pivot_table *table = pivot_table_create (N_("System Information"));
+ pivot_dimension_create (table, PIVOT_AXIS_ROW, N_("Attribute"));
+
+ add_row (table, N_("Version"), version);
+ add_row (table, N_("Host System"), host_system);
+ add_row (table, N_("Build System"), build_system);
+ add_row (table, N_("Locale Directory"), relocate (locale_dir));
+ add_row (table, N_("Compiler Version"),
+#ifdef __VERSION__
+ __VERSION__
+#else
+ "Unknown"
+#endif
+ );
+ pivot_table_submit (table);
+}