Replace syntactical keywords in error/warning messages by printf directives.
[pspp] / src / language / stats / rank.c
index 5f5591adb989fdd25b2c57bc7dc3a7239b4f0919..5a849b8cf889cce5b45b5af08dd8d190c5f54a8f 100644 (file)
@@ -318,7 +318,7 @@ parse_into (struct lexer *lexer, struct rank *cmd,
          const char *name = lex_tokcstr (lexer);
 
          if ( var_count >= subcase_get_n_fields (&cmd->sc) )
-            msg (SE, _("Too many variables in INTO clause."));
+            msg (SE, _("Too many variables in %s clause."), "INTO");
          else if ( dict_lookup_var (cmd->dict, name) != NULL )
             msg (SE, _("Variable %s already exists."), name);
           else if (string_set_contains (new_names, name))
@@ -784,8 +784,8 @@ cmd_rank (struct lexer *lexer, struct dataset *ds)
 
       rs = pool_calloc (rank.pool, 1, sizeof *rs);
       rs->rfunc = RANK;
-      rs->dest_names = pool_calloc (rank.pool, 1, sizeof *rs->dest_names);
-      rs->dest_labels = pool_calloc (rank.pool, 1, sizeof *rs->dest_labels);
+      rs->dest_names = pool_calloc (rank.pool, rank.n_vars,
+                                    sizeof *rs->dest_names);
 
       rank.rs = rs;
       rank.n_rs = 1;
@@ -820,7 +820,7 @@ cmd_rank (struct lexer *lexer, struct dataset *ds)
     {
       int v;
 
-      tab_output_text (0, _("Variables Created By RANK"));
+      tab_output_text_format (0, _("Variables Created By %s"), "RANK");
       tab_output_text (0, "");
 
       for (i = 0 ; i <  rank.n_rs ; ++i )