Continue reforming procedure execution. In this phase, get rid of
[pspp-builds.git] / src / language / expressions / operations.def
index bd5af76c4e68ad6d35e067f59f518d20220b7f73..717bc15ef39fd105175f28e5625f9873522f9855 100644 (file)
@@ -306,7 +306,7 @@ string function CONCAT (string a[n])
   struct fixed_string dst;
   size_t i;
 
-  dst = alloc_string (e, 255);
+  dst = alloc_string (e, MAX_STRING);
   dst.length = 0;
   for (i = 0; i < n; i++)
     {
@@ -314,8 +314,8 @@ string function CONCAT (string a[n])
       size_t copy_len;
 
       copy_len = src->length;
-      if (dst.length + copy_len > 255)
-        copy_len = 255 - dst.length;
+      if (dst.length + copy_len > MAX_STRING)
+        copy_len = MAX_STRING - dst.length;
       memcpy (&dst.string[dst.length], src->string, copy_len);
       dst.length += copy_len;
     }
@@ -440,7 +440,7 @@ string function UPCASE (string s)
 absorb_miss string function LPAD (string s, n)
      expression e;
 {
-  if (n < 0 || n > 255 || (int) n != n)
+  if (n < 0 || n > MAX_STRING || (int) n != n)
     return empty_string;
   else if (s.length >= n)
     return s;
@@ -456,7 +456,7 @@ absorb_miss string function LPAD (string s, n)
 absorb_miss string function LPAD (string s, n, string c)
      expression e;
 {
-  if (n < 0 || n > 255 || (int) n != n || c.length != 1)
+  if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1)
     return empty_string;
   else if (s.length >= n)
     return s;
@@ -472,7 +472,7 @@ absorb_miss string function LPAD (string s, n, string c)
 absorb_miss string function RPAD (string s, n)
      expression e;
 {
-  if (n < 0 || n > 255 || (int) n != n)
+  if (n < 0 || n > MAX_STRING || (int) n != n)
     return empty_string;
   else if (s.length >= n)
     return s;
@@ -488,7 +488,7 @@ absorb_miss string function RPAD (string s, n)
 absorb_miss string function RPAD (string s, n, string c)
      expression e;
 {
-  if (n < 0 || n > 255 || (int) n != n || c.length != 1)
+  if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1)
     return empty_string;
   else if (s.length >= n)
     return s;
@@ -956,7 +956,7 @@ no_opt string operator STR_VAR ()
   return s;
 }
 
-no_opt function LAG (num_var v, pos_int n_before)
+no_opt perm_only function LAG (num_var v, pos_int n_before)
 {
   struct ccase *c = lagged_case (n_before);
   if (c != NULL)
@@ -968,7 +968,7 @@ no_opt function LAG (num_var v, pos_int n_before)
     return SYSMIS;
 }
 
-no_opt function LAG (num_var v)
+no_opt perm_only function LAG (num_var v)
 {
   struct ccase *c = lagged_case (1);
   if (c != NULL)
@@ -980,7 +980,7 @@ no_opt function LAG (num_var v)
     return SYSMIS;
 }
 
-no_opt string function LAG (str_var v, pos_int n_before)
+no_opt perm_only string function LAG (str_var v, pos_int n_before)
      expression e;
 {
   struct ccase *c = lagged_case (n_before);
@@ -990,7 +990,7 @@ no_opt string function LAG (str_var v, pos_int n_before)
     return empty_string;
 }
 
-no_opt string function LAG (str_var v)
+no_opt perm_only string function LAG (str_var v)
      expression e;
 {
   struct ccase *c = lagged_case (1);