static bool force;
/* --table-look: TableLook to replace table style for conversion. */
-static struct spv_table_look *table_look;
+static struct pivot_table_look *table_look;
/* Number of warnings issued. */
static size_t n_warnings;
if (!table)
error (1, 0, "%s: no tables found", argv[1]);
- struct spv_table_look *look = spv_table_look_get (table);
- err = spv_table_look_write (argv[2], look);
+ err = spv_table_look_write (argv[2], pivot_table_get_look (table));
if (err)
error (1, 0, "%s", err);
- spv_table_look_destroy (look);
spv_close (spv);
}
c->run (argc, argv);
- spv_table_look_destroy (table_look);
+ if (table_look)
+ {
+ pivot_table_look_uninit (table_look);
+ free (table_look);
+ }
i18n_done ();
return n_warnings ? EXIT_FAILURE : EXIT_SUCCESS;
static void
parse_table_look (const char *arg)
{
- spv_table_look_destroy (table_look);
+ if (table_look)
+ {
+ pivot_table_look_uninit (table_look);
+ free (table_look);
+ }
+
char *error_s = spv_table_look_read (arg, &table_look);
if (error_s)
error (1, 0, "%s", error_s);