u8-line: Add new u8_line_set_length() function.
[pspp] / src / output / ascii.c
index b076faf25a93ff50bb27c267b66a5d458468c409..756235c5cbf6cae7183e19d4a287ff6566840c7a 100644 (file)
@@ -943,6 +943,19 @@ ascii_test_write (struct output_driver *driver,
 
   a->y = 1;
 }
+
+void
+ascii_test_set_length (struct output_driver *driver, int y, int length)
+{
+  struct ascii_driver *a = ascii_driver_cast (driver);
+
+  if (a->file == NULL && !ascii_open_page (a))
+    return;
+
+  if (y < 0 || y >= a->length)
+    return;
+  u8_line_set_length (&a->lines[y], length);
+}
 \f
 /* ascii_close_page () and support routines. */