Add an Emacs header line to output files that makes generated .c files
[pspp] / src / expr-opt.c
index e221d4e2e0c0373234079243ad2ca5abbbfd54a8..40358a77e76108159ef41e45467b1e4e0a5260f8 100644 (file)
@@ -18,6 +18,8 @@
    02111-1307, USA. */
 
 #include <config.h>
+#include "expr.h"
+#include "exprP.h"
 #include <assert.h>
 #include <math.h>
 #include <ctype.h>
 #include "approx.h"
 #include "data-in.h"
 #include "error.h"
-#include "expr.h"
-#include "exprP.h"
 #include "julcal/julcal.h"
 #include "misc.h"
+#include "pool.h"
 #include "stats.h"
 #include "str.h"
 #include "var.h"
@@ -834,6 +835,7 @@ evaluate_tree (struct nonterm_node * n)
        f.d = (int) n->arg[3];
        v.f = n0;
 
+        assert ((formats[f.type].cat & FCAT_STRING) == 0);
        data_out (strbuf, &f, &v);
        n = repl_str_con (n, strbuf, f.w);
       }
@@ -884,12 +886,6 @@ evaluate_tree (struct nonterm_node * n)
        }
       rnc (n0);
       break;
-
-#if __CHECKER__
-      /* This case prevents Checker from choking. */
-    case 42000:
-      assert (0);
-#endif
     }
   return n;
 }
@@ -1027,19 +1023,13 @@ dump_expression (union any_node * n, struct expression * expr)
        max_height = height;
     }
 
-  /* ANSI says we have to waste space for one `value' since pointers
-     are not guaranteed to be able to point to a spot *before* a
-     block.  If only all the world were a VAX... */
+  /* We waste space for one `value' since pointers are not
+     guaranteed to be able to point to a spot before a block. */
   max_height++;
 
   e->stack = xmalloc (max_height * sizeof *e->stack);
 
-#if PAGED_STACK
-  e->str_stack = e->type == EX_STRING ? xmalloc (256) : NULL;
-#else
-  e->str_stack = xmalloc (256);
-  e->str_size = 256;
-#endif
+  e->pool = pool_create ();
 }
 
 static void