Replace numerous instances of xzalloc with XZALLOC
[pspp] / src / output / ascii.c
index ee87fa22e37c3341071239ef1e3c90899ef6036d..a6bcb106d68effd619d93ebdb559cac0dd06f09e 100644 (file)
 #include <uniwidth.h>
 
 #ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#ifdef GWINSZ_IN_SYS_IOCTL
 # include <sys/ioctl.h>
+# include <termios.h>
 #endif
 
 #include "data/file-name.h"
@@ -373,9 +370,7 @@ ascii_create (struct  file_handle *fh, enum settings_output_devices device_type,
 {
   enum { BOX_ASCII, BOX_UNICODE } box;
   struct output_driver *d;
-  struct ascii_driver *a;
-
-  a = xzalloc (sizeof *a);
+  struct ascii_driver *a = XZALLOC (struct ascii_driver);
   d = &a->driver;
   output_driver_init (&a->driver, &ascii_driver_class, fh_get_file_name (fh), device_type);
   a->append = parse_boolean (opt (d, o, "append", "false"));
@@ -648,7 +643,7 @@ ascii_submit (struct output_driver *driver, const struct output_item *item)
       break;
 
     case OUTPUT_ITEM_GROUP:
-      NOT_REACHED ();
+      break;
 
     case OUTPUT_ITEM_PAGE_BREAK:
       break;
@@ -1036,8 +1031,8 @@ ascii_test_write (struct output_driver *driver,
     .underline = underline,
   };
   const struct pivot_value value = {
-    .type = PIVOT_VALUE_TEXT,
     .text = {
+      .type = PIVOT_VALUE_TEXT,
       .local = CONST_CAST (char *, s),
       .c = CONST_CAST (char *, s),
       .id = CONST_CAST (char *, s),