output: Implement styling for titles and captions.
[pspp] / src / output / table.c
index 44efa3abc34f1fc379356598742212dca7ed6b10..c8dfcbb0f83910802a379d59ba29b341ce824bf0 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "libpspp/cast.h"
 #include "libpspp/compiler.h"
+#include "libpspp/pool.h"
 #include "libpspp/str.h"
 #include "output/table-item.h"
 
@@ -130,12 +131,12 @@ table_set_nr (struct table *table, int nr)
 }
 \f
 struct cell_style *
-cell_style_clone (const struct cell_style *old)
+cell_style_clone (struct pool *pool, const struct cell_style *old)
 {
-  struct cell_style *new = xmalloc (sizeof *new);
+  struct cell_style *new = pool_malloc (pool, sizeof *new);
   *new = *old;
   if (new->font)
-    new->font = strdup (new->font);
+    new->font = pool_strdup (pool, new->font);
   return new;
 }