[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src data/value.c data/value.h language/sta...
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp/src data/value.c data/value.h language/sta... |
Date: |
Thu, 29 May 2008 11:07:28 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: John Darrington <jmd> 08/05/29 11:07:28
Modified files:
src/data : value.c value.h
src/language/stats: ChangeLog examine.q
Log message:
Fixed bugs which manifested themselves as bus errors on solaris.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/value.c?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/value.h?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/ChangeLog?cvsroot=pspp&r1=1.76&r2=1.77
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/examine.q?cvsroot=pspp&r1=1.32&r2=1.33
Patches:
Index: data/value.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/value.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- data/value.c 11 Nov 2007 05:51:42 -0000 1.7
+++ data/value.c 29 May 2008 11:07:28 -0000 1.8
@@ -63,6 +63,20 @@
: hsh_hash_bytes (v->s, MIN (MAX_SHORT_STRING, width)));
}
+
+int
+compare_ptr_values (const union value **v1, const union value **v2, int width)
+{
+ return compare_values (*v1, *v2, width);
+}
+
+unsigned
+hash_ptr_value (const union value **v, int width)
+{
+ return hash_value (*v, width);
+}
+
+
/* Copies SRC to DST, given that they both contain data of the
given WIDTH. */
void
Index: data/value.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/value.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- data/value.h 20 Apr 2008 07:51:09 -0000 1.15
+++ data/value.h 29 May 2008 11:07:28 -0000 1.16
@@ -42,6 +42,10 @@
int compare_values (const union value *, const union value *, int width);
unsigned hash_value (const union value *, int width);
+int compare_ptr_values (const union value **, const union value **, int width);
+unsigned hash_ptr_value (const union value **, int width);
+
+
static inline size_t value_cnt_from_width (int width);
void value_copy (union value *, const union value *, int width);
void value_set_missing (union value *, int width);
Index: language/stats/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/ChangeLog,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- language/stats/ChangeLog 9 Apr 2008 09:12:40 -0000 1.76
+++ language/stats/ChangeLog 29 May 2008 11:07:28 -0000 1.77
@@ -1,3 +1,8 @@
+2008-05-29 John Darrington <address@hidden>
+
+ * examine.q: Fixed bug where incorrect levels of dereferencing
+ were applied to pointers.
+
2008-04-09 John Darrington <address@hidden>
* regression.q: Fix display of degrees of freedom.
Index: language/stats/examine.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/examine.q,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- language/stats/examine.q 14 Feb 2008 12:08:39 -0000 1.32
+++ language/stats/examine.q 29 May 2008 11:07:28 -0000 1.33
@@ -835,17 +835,17 @@
struct hsh_iterator hi1;
struct factor_statistics *fs;
- struct hsh_table *idh0=0;
- struct hsh_table *idh1=0;
- union value *val0;
- union value *val1;
+ struct hsh_table *idh0 = NULL;
+ struct hsh_table *idh1 = NULL;
+ union value **val0;
+ union value **val1;
- idh0 = hsh_create (4, (hsh_compare_func *) compare_values,
- (hsh_hash_func *) hash_value,
+ idh0 = hsh_create (4, (hsh_compare_func *) compare_ptr_values,
+ (hsh_hash_func *) hash_ptr_value,
0,0);
- idh1 = hsh_create (4, (hsh_compare_func *) compare_values,
- (hsh_hash_func *) hash_value,
+ idh1 = hsh_create (4, (hsh_compare_func *) compare_ptr_values,
+ (hsh_hash_func *) hash_ptr_value,
0,0);
@@ -853,8 +853,8 @@
fs != 0 ;
fs = hsh_next (fctr->fstats, &hi))
{
- hsh_insert (idh0, (void *) &fs->id[0]);
- hsh_insert (idh1, (void *) &fs->id[1]);
+ hsh_insert (idh0, &fs->id[0]);
+ hsh_insert (idh1, &fs->id[1]);
}
/* Ensure that the factors combination is complete */
@@ -867,17 +867,17 @@
val1 = hsh_next (idh1, &hi1))
{
struct factor_statistics **ffs;
- union value key[2];
+ union value *key[2];
key[0] = *val0;
key[1] = *val1;
ffs = (struct factor_statistics **)
- hsh_probe (fctr->fstats, (void *) &key );
+ hsh_probe (fctr->fstats, &key );
if ( !*ffs ) {
size_t i;
(*ffs) = create_factor_statistics (n_dependent_vars,
- &key[0], &key[1]);
+ key[0], key[1]);
for ( i = 0 ; i < n_dependent_vars ; ++i )
metrics_precalc ( & (*ffs)->m[i]);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src data/value.c data/value.h language/sta...,
John Darrington <=