+static struct output_driver *
+ascii_create (const char *file_name, enum settings_output_devices 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_driver_class, file_name, device_type);
+ a->append = parse_boolean (opt (d, o, "append", "false"));
+ a->headers = parse_boolean (opt (d, o, "headers", "false"));
+ a->paginate = parse_boolean (opt (d, o, "paginate", "false"));
+ a->squeeze_blank_lines = parse_boolean (opt (d, o, "squeeze", "true"));
+ a->emphasis = parse_enum (opt (d, o, "emphasis", "none"),
+ "bold", EMPH_BOLD,
+ "underline", EMPH_UNDERLINE,
+ "none", EMPH_NONE,
+ NULL_SENTINEL);
+
+ a->chart_file_name = parse_chart_file_name (opt (d, o, "charts", file_name));
+
+ a->top_margin = parse_int (opt (d, o, "top-margin", "0"), 0, INT_MAX);
+ a->bottom_margin = parse_int (opt (d, o, "bottom-margin", "0"), 0, INT_MAX);
+
+ a->width = parse_page_size (opt (d, o, "width", "79"));
+ paper_length = parse_page_size (opt (d, o, "length", "66"));
+ a->auto_width = a->width < 0;
+ a->auto_length = paper_length < 0;
+ a->length = paper_length - vertical_margins (a);
+
+ for (right = 0; right < 4; right++)
+ for (bottom = 0; bottom < 4; bottom++)
+ for (left = 0; left < 4; left++)
+ for (top = 0; top < 4; top++)
+ {
+ int indx = make_box_index (left, right, top, bottom);
+ const char *default_value;
+ char name[16];