Implemented support for very long strings a la spss v13/v14
[pspp-builds.git] / src / language / expressions / parse.c
index f2bc3254224f258a51a938c879df0b2d03a72051..fdd460824e6b5c9d0435c38d9a97665c8bc7c7b7 100644 (file)
@@ -1222,6 +1222,11 @@ parse_function (struct expression *e)
       msg (SE, _("%s is not yet implemented."), f->prototype);
       goto fail;
     }
+  if ((f->flags & OPF_PERM_ONLY) && temporary != 0) 
+    {
+      msg (SE, _("%s may not appear after TEMPORARY."), f->prototype);
+      goto fail;
+    }
   
   n = expr_allocate_composite (e, f - operations, args, arg_cnt);
   n->composite.min_valid = min_valid != -1 ? min_valid : f->array_min_elems; 
@@ -1417,8 +1422,8 @@ expr_allocate_string_buffer (struct expression *e,
 {
   union any_node *n = pool_alloc (e->expr_pool, sizeof n->string);
   n->type = OP_string;
-  if (length > 255)
-    length = 255;
+  if (length > MAX_STRING)
+    length = MAX_STRING;
   n->string.s = copy_string (e, string, length);
   return n;
 }