pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Value labels


From: Ben Pfaff
Subject: Re: Value labels
Date: Tue, 30 Nov 2010 20:37:21 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

friedrich nietzsche <address@hidden> writes:

> I'm using PSPP 0.7.6. It truncates value labels to 60 chars. However, the dev
> guide says: 
>
>     char label_len;The label's length, in bytes. The documented maximum length
>     varies from 60 to 120 based on SPSS version. PSPP supports value labels up
>     to 255 bytes long. 
>
> Is there a way to write value labels longer than 60 chars?

It looks like the code just hasn't caught up to the
documentation.  Here's a patch.  If no one has objections then
I'll push this out to "master" when Savannah comes back up.

Thanks,

Ben.

--8<--------------------------cut here-------------------------->8--

From: Ben Pfaff <address@hidden>
Date: Tue, 30 Nov 2010 20:36:10 -0800
Subject: [PATCH] VALUE LABELS: Relax limit on value label length from 60 bytes 
to 255.

Requested by friedrich nietzsche <address@hidden>.
---
 src/language/dictionary/value-labels.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/language/dictionary/value-labels.c 
b/src/language/dictionary/value-labels.c
index 1471fc8..68622d9 100644
--- a/src/language/dictionary/value-labels.c
+++ b/src/language/dictionary/value-labels.c
@@ -144,10 +144,10 @@ get_label (struct lexer *lexer, struct variable **vars, 
size_t var_cnt)
 
       ds_init_substring (&label, lex_tokss (lexer));
 
-      if (ds_length (&label) > 60)
+      if (ds_length (&label) > 255)
        {
-         msg (SW, _("Truncating value label to 60 characters."));
-         ds_truncate (&label, 60);
+         msg (SW, _("Truncating value label to 255 bytes."));
+         ds_truncate (&label, 255);
        }
 
       for (i = 0; i < var_cnt; i++)
-- 
1.7.1


-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]