projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use moments.c to compute moments
[pspp-builds.git]
/
src
/
language
/
dictionary
/
variable-label.c
diff --git
a/src/language/dictionary/variable-label.c
b/src/language/dictionary/variable-label.c
index 1ae3bc5fbff639e8e53278cdb95d9dde1d910d7e..d56db519c7b6de40a44716084a6aaa7ad1d401ea 100644
(file)
--- a/
src/language/dictionary/variable-label.c
+++ b/
src/language/dictionary/variable-label.c
@@
-1,6
+1,5
@@
/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@
-62,11
+61,7
@@
cmd_variable_labels (struct lexer *lexer, struct dataset *ds)
ds_truncate (&label, 255);
}
for (i = 0; i < nv; i++)
ds_truncate (&label, 255);
}
for (i = 0; i < nv; i++)
- {
- if (v[i]->label)
- free (v[i]->label);
- v[i]->label = ds_xstrdup (&label);
- }
+ var_set_label (v[i], ds_cstr (&label));
ds_destroy (&label);
lex_get (lexer);
ds_destroy (&label);
lex_get (lexer);
@@
-80,11
+75,3
@@
cmd_variable_labels (struct lexer *lexer, struct dataset *ds)
-const char *
-var_to_string(const struct variable *var)
-{
- if ( !var )
- return 0;
-
- return ( var->label ? var->label : var->name);
-}