malloca-instead-of-local_alloc.patch from patch #6230.
[pspp-builds.git] / src / language / data-io / list.q
index 135dcc4c954ceec0a762f8c5b0e995d0916744b8..0227c72b1ebb414c4b9f51c19364923a4fad0436 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "intprops.h"
 #include "size_max.h"
+#include "xmalloca.h"
+
 #include <data/casegrouper.h>
 #include <data/casereader.h>
 #include <data/dictionary.h>
@@ -462,8 +464,8 @@ write_fallback_headers (struct outp_driver *d)
   int line_number = 0;
 
   const char *Line = _("Line");
-  char *leader = local_alloc (strlen (Line)
-                              + INT_STRLEN_BOUND (line_number) + 1 + 1);
+  char *leader = xmalloca (strlen (Line)
+                           + INT_STRLEN_BOUND (line_number) + 1 + 1);
 
   while (index < cmd.n_variables)
     {
@@ -517,7 +519,7 @@ write_fallback_headers (struct outp_driver *d)
   d->cp_x = 0;
   d->cp_y += d->font_height;
 
-  local_free (leader);
+  freea (leader);
 }
 
 /* There are three possible layouts for the LIST procedure: