+/* Sets the next case to be read by READER to CASE_IDX,
+ which must be less than the number of cases in the casefile.
+ Allowed only for random readers. */
+void
+casereader_seek (struct casereader *reader, unsigned long case_idx)
+{
+ assert (reader != NULL);
+ assert (reader->random);
+ assert (case_idx < reader->cf->case_cnt);
+
+ reader->case_idx = case_idx;
+ if (reader->cf->storage == DISK)
+ seek_and_fill_buffer (reader);
+}
+