projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix description of "count" in Auxiliary Variable Parameter Record.
[pspp]
/
src
/
rename-vars.c
diff --git
a/src/rename-vars.c
b/src/rename-vars.c
index 4b81f90484c69bd83f6c112705e915dd1093640e..862509093b8d43bb6d2d0ac80747a8f0d1245610 100644
(file)
--- a/
src/rename-vars.c
+++ b/
src/rename-vars.c
@@
-14,20
+14,24
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include <stdlib.h>
#include <config.h>
#include <stdlib.h>
-#include
<assert.h>
+#include
"error.h"
#include "alloc.h"
#include "command.h"
#include "alloc.h"
#include "command.h"
+#include "dictionary.h"
#include "error.h"
#include "hash.h"
#include "lexer.h"
#include "str.h"
#include "var.h"
#include "error.h"
#include "hash.h"
#include "lexer.h"
#include "str.h"
#include "var.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
/* The code for this function is very similar to the code for the
RENAME subcommand of MODIFY VARS. */
int
/* The code for this function is very similar to the code for the
RENAME subcommand of MODIFY VARS. */
int
@@
-35,13
+39,11
@@
cmd_rename_variables (void)
{
struct variable **rename_vars = NULL;
char **rename_new_names = NULL;
{
struct variable **rename_vars = NULL;
char **rename_new_names = NULL;
-
in
t rename_cnt = 0;
+
size_
t rename_cnt = 0;
char *err_name;
int status = CMD_FAILURE;
char *err_name;
int status = CMD_FAILURE;
- int i;
-
if (temporary != 0)
{
msg (SE, _("RENAME VARS may not be used after TEMPORARY. "
if (temporary != 0)
{
msg (SE, _("RENAME VARS may not be used after TEMPORARY. "
@@
-51,8
+53,8
@@
cmd_rename_variables (void)
do
{
do
{
-
in
t prev_nv_1 = rename_cnt;
-
in
t prev_nv_2 = rename_cnt;
+
size_
t prev_nv_1 = rename_cnt;
+
size_
t prev_nv_2 = rename_cnt;
if (!lex_match ('('))
{
if (!lex_match ('('))
{
@@
-71,9
+73,12
@@
cmd_rename_variables (void)
goto lossage;
if (prev_nv_1 != rename_cnt)
{
goto lossage;
if (prev_nv_1 != rename_cnt)
{
+ size_t i;
+
msg (SE, _("Differing number of variables in old name list "
msg (SE, _("Differing number of variables in old name list "
- "(%d) and in new name list (%d)."),
- rename_cnt - prev_nv_2, prev_nv_1 - prev_nv_2);
+ "(%u) and in new name list (%u)."),
+ (unsigned) rename_cnt - prev_nv_2,
+ (unsigned) prev_nv_1 - prev_nv_2);
for (i = 0; i < prev_nv_1; i++)
free (rename_new_names[i]);
free (rename_new_names);
for (i = 0; i < prev_nv_1; i++)
free (rename_new_names[i]);
free (rename_new_names);
@@
-102,6
+107,7
@@
cmd_rename_variables (void)
free (rename_vars);
if (rename_new_names != NULL)
{
free (rename_vars);
if (rename_new_names != NULL)
{
+ size_t i;
for (i = 0; i < rename_cnt; i++)
free (rename_new_names[i]);
free (rename_new_names);
for (i = 0; i < rename_cnt; i++)
free (rename_new_names[i]);
free (rename_new_names);