projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove property settings from psppire_data_window and put them into the GtkBuilder...
[pspp]
/
src
/
math
/
coefficient.c
diff --git
a/src/math/coefficient.c
b/src/math/coefficient.c
index f738c783f241fedd1137d3100a372c5664b8341b..b3dccc518733a8a079d50e9c11a8b65cbdbc00dd 100644
(file)
--- a/
src/math/coefficient.c
+++ b/
src/math/coefficient.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005
, 2009, 2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-159,18
+159,16
@@
pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
{
size_t i = 0;
size_t j = 0;
{
size_t i = 0;
size_t j = 0;
- size_t v_idx;
struct pspp_coeff *result = NULL;
if (v != NULL)
{
struct pspp_coeff *result = NULL;
if (v != NULL)
{
- v_idx = var_get_dict_index (v);
while (i < n_coef)
{
if (coefs[i]->v_info != NULL)
{
while (i < n_coef)
{
if (coefs[i]->v_info != NULL)
{
- if (
var_get_dict_index (coefs[i]->v_info->v) == v_idx
)
+ if (
coefs[i]->v_info->v == v
)
{
break;
}
{
break;
}
@@
-185,9
+183,12
@@
pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
*/
if (val != NULL)
{
*/
if (val != NULL)
{
+ int width = var_get_width (v);
+
j = i;
j = i;
- while (j < n_coef && compare_values (pspp_coeff_get_value (coefs[j], v),
- val, v) != 0)
+ while (j < n_coef
+ && value_compare_3way (pspp_coeff_get_value (coefs[j], v),
+ val, width) != 0)
{
j++;
}
{
j++;
}