projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(does_dict_need_translation) Fix bug: inverted return value (!).
[pspp-builds.git]
/
src
/
data
/
sys-file-writer.c
diff --git
a/src/data/sys-file-writer.c
b/src/data/sys-file-writer.c
index 89a513d03b6539b6bd6dbd1d2fd588a35b314e67..fe2c27c8102c71f23852d9d9ada4abd44b78f2b4 100644
(file)
--- a/
src/data/sys-file-writer.c
+++ b/
src/data/sys-file-writer.c
@@
-328,6
+328,10
@@
sfm_open_writer (struct file_handle *fh, struct dictionary *d,
goto error;
}
goto error;
}
+/* Returns zero if dictionary D's cases are ordered in the
+ natural manner, with the first variable followed by the
+ second, and so on,
+ nonzero otherwise. */
static int
does_dict_need_translation (const struct dictionary *d)
{
static int
does_dict_need_translation (const struct dictionary *d)
{
@@
-339,10
+343,10
@@
does_dict_need_translation (const struct dictionary *d)
{
struct variable *v = dict_get_var (d, i);
if (v->fv != case_idx)
{
struct variable *v = dict_get_var (d, i);
if (v->fv != case_idx)
- return
0
;
+ return
1
;
case_idx += v->nv;
}
case_idx += v->nv;
}
- return
1
;
+ return
0
;
}
/* Returns value of X truncated to two least-significant digits. */
}
/* Returns value of X truncated to two least-significant digits. */