projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Continue work on bug 12859, plus some code cleanup.
[pspp]
/
src
/
weight.c
diff --git
a/src/weight.c
b/src/weight.c
index fd19f8c8978a371ea6f3003dc4a92a6f2eca32f1..212c77d5f4c906afb9831c8d13c03f0dffd186f0 100644
(file)
--- a/
src/weight.c
+++ b/
src/weight.c
@@
-14,13
+14,14
@@
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 <config.h>
-#include
<assert.h>
+#include
"error.h"
#include <stdio.h>
#include "command.h"
#include <stdio.h>
#include "command.h"
+#include "dictionary.h"
#include "error.h"
#include "lexer.h"
#include "str.h"
#include "error.h"
#include "lexer.h"
#include "str.h"
@@
-37,8
+38,6
@@
struct weight_trns
int
cmd_weight (void)
{
int
cmd_weight (void)
{
- lex_match_id ("WEIGHT");
-
if (lex_match_id ("OFF"))
dict_set_weight (default_dict, NULL);
else
if (lex_match_id ("OFF"))
dict_set_weight (default_dict, NULL);
else
@@
-54,7
+53,7
@@
cmd_weight (void)
msg (SE, _("The weighting variable must be numeric."));
return CMD_FAILURE;
}
msg (SE, _("The weighting variable must be numeric."));
return CMD_FAILURE;
}
- if (
v->name[0] == '#'
)
+ if (
dict_class_from_id (v->name) == DC_SCRATCH
)
{
msg (SE, _("The weighting variable may not be scratch."));
return CMD_FAILURE;
{
msg (SE, _("The weighting variable may not be scratch."));
return CMD_FAILURE;