Oneway: Use covariance matrix and sweep operator
[pspp] / src / data / caseproto.c
index 1b6827dbc3327847d13e5961ccce224d8c4f1967..9837013acb8bee86cb6d30bf0876a706a05dbc71 100644 (file)
@@ -320,7 +320,7 @@ caseproto_free__ (struct caseproto *proto)
 void
 caseproto_refresh_long_string_cache__ (const struct caseproto *proto_)
 {
-  struct caseproto *proto = (struct caseproto *) proto_;
+  struct caseproto *proto = CONST_CAST (struct caseproto *, proto_);
   size_t n, i;
 
   assert (proto->long_strings == NULL);
@@ -330,7 +330,7 @@ caseproto_refresh_long_string_cache__ (const struct caseproto *proto_)
                                  * sizeof *proto->long_strings);
   n = 0;
   for (i = 0; i < proto->n_widths; i++)
-    if (proto->widths[i] >= MIN_LONG_STRING)
+    if (proto->widths[i] > MAX_SHORT_STRING)
       proto->long_strings[n++] = i;
   assert (n == proto->n_long_strings);
 }
@@ -406,6 +406,6 @@ count_long_strings (const struct caseproto *proto, size_t idx, size_t count)
 
   n = 0;
   for (i = 0; i < count; i++)
-    n += proto->widths[idx + i] >= MIN_LONG_STRING;
+    n += proto->widths[idx + i] > MAX_SHORT_STRING;
   return n;
 }