X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-writer.c;h=fe2c27c8102c71f23852d9d9ada4abd44b78f2b4;hb=f4a8d7e70526f52b3148f386344158f4b6f343ca;hp=89a513d03b6539b6bd6dbd1d2fd588a35b314e67;hpb=aacb81b15f6b8b34def3ef7b76c7d069a64bc5d8;p=pspp-builds.git diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index 89a513d0..fe2c27c8 100644 --- 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; } +/* 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) { @@ -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) - return 0; + return 1; case_idx += v->nv; } - return 1; + return 0; } /* Returns value of X truncated to two least-significant digits. */