lexer: New function lex_force_int_range().
[pspp] / src / language / stats / factor.c
index f37930aca5b292f4483333e01e9deed60ea4835f..4ec49010c9dcf6fc44a2ca934ef6ec4e942ce644 100644 (file)
@@ -45,7 +45,6 @@
 #include "math/correlation.h"
 #include "math/covariance.h"
 #include "math/moments.h"
-#include "output/chart-item.h"
 #include "output/charts/scree.h"
 #include "output/pivot-table.h"
 
@@ -1315,7 +1314,7 @@ cmd_factor (struct lexer *lexer, struct dataset *ds)
              else if (lex_match_id (lexer, "ITERATE"))
                {
                  if (lex_force_match (lexer, T_LPAREN)
-                       && lex_force_int (lexer))
+                      && lex_force_int_range (lexer, "ITERATE", 0, INT_MAX))
                    {
                      n_iterations = lex_integer (lexer);
                      lex_get (lexer);
@@ -1750,12 +1749,12 @@ show_explained_variance (const struct cmd_factor * factor,
 
   struct pivot_table *table = pivot_table_create (
     N_("Total Variance Explained"));
-  table->omit_empty = true;
 
-  /* xgettext:no-c-format */
   pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Statistics"),
                           N_("Total"), PIVOT_RC_OTHER,
+                          /* xgettext:no-c-format */
                           N_("% of Variance"), PIVOT_RC_PERCENT,
+                         /* xgettext:no-c-format */
                           N_("Cumulative %"), PIVOT_RC_PERCENT);
 
   struct pivot_dimension *phase = pivot_dimension_create (