-void proc_init (void);
-void proc_done (void);
-
-void proc_set_source (struct case_source *);
-bool proc_has_source (void);
-
-void proc_set_sink (struct case_sink *);
-struct casefile *proc_capture_output (void);
-
-bool procedure (bool (*proc_func) (const struct ccase *, void *),
- void *aux);
-bool procedure_with_splits (void (*begin_func) (const struct ccase *, void *),
- bool (*proc_func) (const struct ccase *, void *),
- void (*end_func) (void *),
- void *aux);
-bool multipass_procedure (bool (*proc_func) (const struct casefile *, void *),
- void *aux);
-bool multipass_procedure_with_splits (bool (*) (const struct ccase *,
- const struct casefile *,
- void *),
- void *aux);
-time_t time_of_last_procedure (void);
+struct dictionary ;
+typedef void replace_source_callback (struct casereader *);
+typedef void replace_dictionary_callback (struct dictionary *);
+
+typedef void transformation_change_callback_func (bool non_empty, void *aux);
+
+struct dataset * create_dataset (void);
+
+void destroy_dataset (struct dataset *);
+
+void dataset_add_transform_change_callback (struct dataset *,
+ transformation_change_callback_func *, void *);
+
+void proc_discard_active_file (struct dataset *);
+void proc_set_active_file (struct dataset *,
+ struct casereader *, struct dictionary *);
+bool proc_set_active_file_data (struct dataset *, struct casereader *);
+bool proc_has_active_file (const struct dataset *ds);
+struct casereader *proc_extract_active_file_data (struct dataset *);
+
+void proc_discard_output (struct dataset *ds);
+
+bool proc_execute (struct dataset *ds);
+time_t time_of_last_procedure (struct dataset *ds);
+
+struct casereader *proc_open_filtering (struct dataset *, bool filter);
+struct casereader *proc_open (struct dataset *);
+bool proc_is_open (const struct dataset *);
+bool proc_commit (struct dataset *);
+
+bool dataset_end_of_command (struct dataset *);