X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fdictionary%2Frename-variables.c;h=90117ff69ede1ea6a33b1cb7a4aa65761dbe0ba3;hb=16034f6f464c026cc3864dce79e367bfc4c1382d;hp=1d7d7f521bbf4ff229aabedaf2917fb0234c478b;hpb=480a0746507ce73d26f528b56dc3ed80195096e0;p=pspp
diff --git a/src/language/dictionary/rename-variables.c b/src/language/dictionary/rename-variables.c
index 1d7d7f521b..90117ff69e 100644
--- a/src/language/dictionary/rename-variables.c
+++ b/src/language/dictionary/rename-variables.c
@@ -1,20 +1,18 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see . */
#include
@@ -26,11 +24,12 @@
#include
#include
#include
-#include
#include
#include
#include
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@ -75,9 +74,8 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds)
size_t i;
msg (SE, _("Differing number of variables in old name list "
- "(%u) and in new name list (%u)."),
- (unsigned) rename_cnt - prev_nv_2,
- (unsigned) prev_nv_1 - prev_nv_2);
+ "(%zu) and in new name list (%zu)."),
+ rename_cnt - prev_nv_2, prev_nv_1 - prev_nv_2);
for (i = 0; i < prev_nv_1; i++)
free (rename_new_names[i]);
free (rename_new_names);
@@ -94,7 +92,7 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds)
if (!dict_rename_vars (dataset_dict (ds),
rename_vars, rename_new_names, rename_cnt,
- &err_name))
+ &err_name))
{
msg (SE, _("Renaming would duplicate variable name %s."), err_name);
goto lossage;
@@ -104,12 +102,12 @@ cmd_rename_variables (struct lexer *lexer, struct dataset *ds)
lossage:
free (rename_vars);
- if (rename_new_names != NULL)
+ if (rename_new_names != NULL)
{
size_t i;
for (i = 0; i < rename_cnt; i++)
free (rename_new_names[i]);
- free (rename_new_names);
+ free (rename_new_names);
}
return status;
}