X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fpspp-output.c;fp=utilities%2Fpspp-output.c;h=b3b4b57fa0fe42d2f9c88cebd462d8773a8bc85b;hb=24e84c14af8ac6dc897344104e756c8820f9a031;hp=256a6e257519d517b17e8a502445387082c8fe8f;hpb=8d41c0b2ee56d26aa3eef334ccce3d7a39c0a697;p=pspp diff --git a/utilities/pspp-output.c b/utilities/pspp-output.c index 256a6e2575..b3b4b57fa0 100644 --- a/utilities/pspp-output.c +++ b/utilities/pspp-output.c @@ -362,6 +362,22 @@ run_get_table_look (int argc UNUSED, char **argv) spv_close (spv); } +static void +run_convert_table_look (int argc UNUSED, char **argv) +{ + struct pivot_table_look *look; + char *err = spv_table_look_read (argv[1], &look); + if (err) + error (1, 0, "%s", err); + + err = spv_table_look_write (argv[2], look); + if (err) + error (1, 0, "%s", err); + + pivot_table_look_uninit (look); + free (look); +} + static void run_dump (int argc UNUSED, char **argv) { @@ -710,6 +726,7 @@ static const struct command commands[] = { "dir", 1, 1, run_directory }, { "convert", 2, 2, run_convert }, { "get-table-look", 2, 2, run_get_table_look }, + { "convert-table-look", 2, 2, run_convert_table_look }, /* Undocumented commands. */ { "dump", 1, 1, run_dump }, @@ -1101,6 +1118,7 @@ The following commands are available:\n\ dir FILE List tables and other items in FILE.\n\ convert SOURCE DEST Convert .spv SOURCE to DEST.\n\ get-table-look SOURCE DEST Copies first selected TableLook into DEST\n\ + convert-table-look SOURCE DEST Copies .tlo or .stt SOURCE into DEST\n\ \n\ Input selection options for \"dir\" and \"convert\":\n\ --select=CLASS... include only some kinds of objects\n\