+/* Produces a case map from STAGE, which must have been previously created with
+ case_map_stage_create(). The case map maps from the original case index of
+ the variables in STAGE's dictionary to their current case indexes.
+
+ Returns the new case map, or a null pointer if no mapping is required (that
+ is, no variables were deleted or reordered).
+
+ Destroys STAGE. */
+struct case_map *
+case_map_stage_to_case_map (struct case_map_stage *stage)
+{
+ struct case_map *map = case_map_stage_get_case_map (stage);
+ case_map_stage_destroy (stage);
+ return map;
+}
+