projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New implementation of long variable names. Each variable has a
[pspp]
/
src
/
data-list.c
diff --git
a/src/data-list.c
b/src/data-list.c
index 9fc3f9de783c8babc0314cb0ec95d24cf02d0a46..3d730939b3e4a854af4da91bda81639685af530c 100644
(file)
--- a/
src/data-list.c
+++ b/
src/data-list.c
@@
-14,8
+14,8
@@
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 "data-list.h"
#include <config.h>
#include "data-list.h"
@@
-65,7
+65,7
@@
struct dls_var_spec
int fc, lc; /* Column numbers in record. */
/* Free format only. */
int fc, lc; /* Column numbers in record. */
/* Free format only. */
- char name[
9];
/* Name of variable. */
+ char name[
LONG_NAME_LEN + 1];
/* Name of variable. */
};
/* Constants for DATA LIST type. */
};
/* Constants for DATA LIST type. */
@@
-278,8
+278,7
@@
cmd_data_list (void)
add_transformation (&new_pgm->h);
}
else
add_transformation (&new_pgm->h);
}
else
- vfm_source = create_case_source (&data_list_source_class,
- default_dict, dls);
+ vfm_source = create_case_source (&data_list_source_class, dls);
return CMD_SUCCESS;
return CMD_SUCCESS;
@@
-384,7
+383,7
@@
parse_fixed (struct data_list_pgm *dls)
else
{
msg (SE, _("SPSS-like or FORTRAN-like format "
else
{
msg (SE, _("SPSS-like or FORTRAN-like format "
- "specification expected after variable names."));
+
"specification expected after variable names."));
goto fail;
}
goto fail;
}
@@
-842,6
+841,7
@@
parse_free (struct dls_var_spec **first, struct dls_var_spec **last)
if (!parse_DATA_LIST_vars (&name, &name_cnt, PV_NONE))
return 0;
if (!parse_DATA_LIST_vars (&name, &name_cnt, PV_NONE))
return 0;
+
if (lex_match ('('))
{
if (!parse_format_specifier (&input, 0)
if (lex_match ('('))
{
if (!parse_format_specifier (&input, 0)
@@
-874,6
+874,7
@@
parse_free (struct dls_var_spec **first, struct dls_var_spec **last)
struct variable *v;
v = dict_create_var (default_dict, name[i], width);
struct variable *v;
v = dict_create_var (default_dict, name[i], width);
+
if (!v)
{
msg (SE, _("%s is a duplicate variable name."), name[i]);
if (!v)
{
msg (SE, _("%s is a duplicate variable name."), name[i]);
@@
-888,7
+889,7
@@
parse_free (struct dls_var_spec **first, struct dls_var_spec **last)
spec->input = input;
spec->v = v;
spec->fv = v->fv;
spec->input = input;
spec->v = v;
spec->fv = v->fv;
- st
rcpy (spec->name, name[i]
);
+ st
_trim_copy (spec->name, v->name, sizeof spec->name
);
append_var_spec (first, last, spec);
}
for (i = 0; i < name_cnt; i++)
append_var_spec (first, last, spec);
}
for (i = 0; i < name_cnt; i++)