+static struct output_driver *
+ascii_create (const char *name, enum output_device_type device_type,
+ struct string_map *o)
+{
+ struct output_driver *d;
+ struct ascii_driver *a;
+ int paper_length;
+ int right, bottom, left, top;
+
+ a = xzalloc (sizeof *a);
+ d = &a->driver;
+ output_driver_init (&a->driver, &ascii_class, name, device_type);
+ a->append = parse_boolean (opt (d, o, "append", "false"));
+ a->headers = parse_boolean (opt (d, o, "headers", "true"));
+ a->paginate = parse_boolean (opt (d, o, "paginate", "true"));
+ a->squeeze_blank_lines = parse_boolean (opt (d, o, "squeeze", "false"));
+ a->emphasis = parse_enum (opt (d, o, "emphasis", "bold"),
+ "bold", EMPH_BOLD,
+ "underline", EMPH_UNDERLINE,
+ "none", EMPH_NONE,
+ (char *) NULL);
+ a->tab_width = parse_int (opt (d, o, "tab-width", "0"), 8, INT_MAX);
+
+ if (parse_enum (opt (d, o, "chart-type", "png"),
+ "png", true,
+ "none", false,
+ (char *) NULL))
+ a->chart_file_name = parse_chart_file_name (opt (d, o, "chart-files",
+ "pspp-#.png"));
+ else
+ a->chart_file_name = NULL;