projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
command: Don't allow SORT as an abbreviation for SORT CASES.
[pspp]
/
src
/
language
/
dictionary
/
value-labels.c
diff --git
a/src/language/dictionary/value-labels.c
b/src/language/dictionary/value-labels.c
index 0fdd7a2a362e550d69b90b33a8d42704c2349a90..8c312ab8cee23ebec567ac3e1a8189285aa80e47 100644
(file)
--- a/
src/language/dictionary/value-labels.c
+++ b/
src/language/dictionary/value-labels.c
@@
-121,6
+121,7
@@
get_label (struct lexer *lexer, struct variable **vars, size_t var_cnt)
/* Parse all the labels and add them to the variables. */
do
{
/* Parse all the labels and add them to the variables. */
do
{
+ enum { MAX_LABEL_LEN = 255 };
int width = var_get_width (vars[0]);
union value value;
struct string label;
int width = var_get_width (vars[0]);
union value value;
struct string label;
@@
-142,12
+143,12
@@
get_label (struct lexer *lexer, struct variable **vars, size_t var_cnt)
return 0;
}
return 0;
}
- ds_init_s
tring (&label, lex_tokstr
(lexer));
+ ds_init_s
ubstring (&label, lex_tokss
(lexer));
- if (ds_length (&label) >
60
)
+ if (ds_length (&label) >
MAX_LABEL_LEN
)
{
{
- msg (SW, _("Truncating value label to
60 characters.")
);
- ds_truncate (&label,
60
);
+ msg (SW, _("Truncating value label to
%d bytes."), MAX_LABEL_LEN
);
+ ds_truncate (&label,
MAX_LABEL_LEN
);
}
for (i = 0; i < var_cnt; i++)
}
for (i = 0; i < var_cnt; i++)