[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/data ChangeLog value-labels.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src/data ChangeLog value-labels.c |
Date: |
Mon, 26 Jun 2006 05:40:29 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Changes by: Ben Pfaff <blp> 06/06/26 05:40:29
Modified files:
src/data : ChangeLog value-labels.c
Log message:
* value-labels.c (value_to_string): When there's no value label,
format the variable according to its print format, instead of
always effectively using A or F format.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/ChangeLog?cvsroot=pspp&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/value-labels.c?cvsroot=pspp&r1=1.5&r2=1.6
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/ChangeLog,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- ChangeLog 19 Jun 2006 10:16:51 -0000 1.54
+++ ChangeLog 26 Jun 2006 05:40:29 -0000 1.55
@@ -1,3 +1,9 @@
+Sun Jun 25 22:39:32 2006 Ben Pfaff <address@hidden>
+
+ * value-labels.c (value_to_string): When there's no value label,
+ format the variable according to its print format, instead of
+ always effectively using A or F format.
+
Mon Jun 19 18:05:42 WST 2006 John Darrington <address@hidden>
* casefile.c (casefile_get_random_reader): Nasty hack to get around
Index: value-labels.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/value-labels.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- value-labels.c 7 May 2006 02:04:12 -0000 1.5
+++ value-labels.c 26 Jun 2006 05:40:29 -0000 1.6
@@ -547,11 +547,9 @@
s = val_labs_find (var->val_labs, *val);
if (s == NULL)
{
- static char buf[256];
- if (var->width != 0)
- str_copy_buf_trunc (buf, sizeof buf, val->s, var->width);
- else
- snprintf(buf, 100, "%g", val->f);
+ static char buf[MAX_STRING + 1];
+ data_out (buf, &var->print, val);
+ buf[var->print.w] = '\0';
s = buf;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src/data ChangeLog value-labels.c,
Ben Pfaff <=