X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fmodify-variables.c;h=afb9089986b95b23babeb63e1e4947a1caed4205;hb=81579d9e9f994fb2908f50af41c3eb033d216e58;hp=6afd321590a7d63f0721c370561e2139c0693ee4;hpb=691c25e36fd1ee722dd35419d6110e3876b99f9c;p=pspp-builds.git diff --git a/src/language/dictionary/modify-variables.c b/src/language/dictionary/modify-variables.c index 6afd3215..afb90899 100644 --- a/src/language/dictionary/modify-variables.c +++ b/src/language/dictionary/modify-variables.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2010, 2011 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 @@ -18,21 +18,21 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "xalloc.h" +#include "data/dictionary.h" +#include "data/procedure.h" +#include "data/variable.h" +#include "language/command.h" +#include "language/lexer/lexer.h" +#include "language/lexer/variable-parser.h" +#include "libpspp/array.h" +#include "libpspp/assertion.h" +#include "libpspp/bit-vector.h" +#include "libpspp/compiler.h" +#include "libpspp/message.h" +#include "libpspp/misc.h" +#include "libpspp/str.h" + +#include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -300,7 +300,7 @@ cmd_modify_vars (struct lexer *lexer, struct dataset *ds) else { if (lex_token (lexer) == T_ID) - msg (SE, _("Unrecognized subcommand name `%s'."), lex_tokid (lexer)); + msg (SE, _("Unrecognized subcommand name `%s'."), lex_tokcstr (lexer)); else msg (SE, _("Subcommand name expected.")); goto done; @@ -368,7 +368,7 @@ compare_variables_given_ordering (const void *a_, const void *b_, struct var_renaming { struct variable *var; - char new_name[VAR_NAME_LEN + 1]; + const char *new_name; }; /* A algo_compare_func that compares new_name members in struct @@ -431,7 +431,7 @@ validate_var_modification (const struct dictionary *d, for (i = 0; i < keep_cnt; i++) { var_renaming[i].var = keep_vars[i]; - strcpy (var_renaming[i].new_name, var_get_name (keep_vars[i])); + var_renaming[i].new_name = var_get_name (keep_vars[i]); } /* Rename variables in var_renaming array. */ @@ -449,7 +449,7 @@ validate_var_modification (const struct dictionary *d, continue; vr = var_renaming + (kv - keep_vars); - strcpy (vr->new_name, vm->new_names[i]); + vr->new_name = vm->new_names[i]; } /* Sort var_renaming array by new names and check for