Adopt use of gnulib for portability.
[pspp] / src / rename-vars.c
index 212d7bdfb78c8a3fe3d9dd13a6ccbe320edb3b8d..57af1c01023fafee8e49d06323d8e9f0ad2d43d5 100644 (file)
 
    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., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include <stdlib.h>
-#include <assert.h>
+#include "error.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 "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
@@ -42,8 +46,12 @@ cmd_rename_variables (void)
 
   int i;
 
-  lex_match_id ("RENAME");
-  lex_match_id ("VARIABLES");
+  if (temporary != 0)
+    {
+      msg (SE, _("RENAME VARS may not be used after TEMPORARY.  "
+                 "Temporary transformations will be made permanent."));
+      cancel_temporary (); 
+    }
 
   do
     {