#include <stdlib.h>
#include <string.h>
-
#include "data/settings.h"
#include "language/lexer/include-path.h"
#include "libpspp/argv-parser.h"
#include "output/driver.h"
#include "output/driver-provider.h"
#include "output/msglog.h"
+#include "output/pivot-table.h"
#include "gl/error.h"
#include "gl/localcharset.h"
enum lex_syntax_mode *syntax_mode;
bool *process_statrc;
char **syntax_encoding;
+ char *table_look;
};
enum
OPT_INTERACTIVE,
OPT_SYNTAX_ENCODING,
OPT_NO_STATRC,
+ OPT_TABLE_LOOK,
OPT_HELP,
OPT_VERSION,
N_TERMINAL_OPTIONS
{"interactive", 'i', no_argument, OPT_INTERACTIVE},
{"syntax-encoding", 0, required_argument, OPT_SYNTAX_ENCODING},
{"no-statrc", 'r', no_argument, OPT_NO_STATRC},
+ {"table-look", 0, required_argument, OPT_TABLE_LOOK},
{"help", 'h', no_argument, OPT_HELP},
{"version", 'V', no_argument, OPT_VERSION},
};
-O device={terminal|listing} override device type for previous -o\n\
-e, --error-file=FILE append errors, warnings, and notes to FILE\n\
--no-output disable default output driver\n\
+ --table-look=FILE use output style read from FILE\n\
Supported output formats: %s\n\
\n\
Language options:\n\
*to->process_statrc = false;
break;
+ case OPT_TABLE_LOOK:
+ to->table_look = optarg;
+ break;
+
case OPT_HELP:
usage ();
exit (EXIT_SUCCESS);
msglog_create ("-");
string_map_destroy (&to->options);
+
+ if (to->table_look)
+ {
+ struct pivot_table_look *look;
+ char *s = pivot_table_look_read (to->table_look, &look);
+ if (s)
+ error (1, 0, "%s", s);
+ pivot_table_look_set_default (look);
+ pivot_table_look_unref (look);
+ }
+
free (to);
}