+ return (any_reader->klass->get_strings
+ ? any_reader->klass->get_strings (any_reader, pool, labels, ids,
+ values)
+ : 0);
+}
+
+struct casereader *
+any_reader_open_and_decode (struct file_handle *handle,
+ const char *encoding,
+ struct dictionary **dictp,
+ struct any_read_info *info)
+{
+ struct any_reader *any_reader = any_reader_open (handle);
+ return (any_reader
+ ? any_reader_decode (any_reader, encoding, dictp, info)
+ : NULL);
+}
+\f
+struct dataset_reader
+ {
+ struct any_reader any_reader;
+ struct dictionary *dict;
+ struct casereader *reader;
+ };
+
+/* Opens FH, which must have referent type FH_REF_DATASET, and returns a
+ dataset_reader for it, or a null pointer on failure. Stores a copy of the
+ dictionary for the dataset file into *DICT. The caller takes ownership of
+ the casereader and the dictionary. */
+static struct any_reader *
+dataset_reader_open (struct file_handle *fh)
+{
+ struct dataset_reader *reader;
+ struct dataset *ds;