-/* Sink: Cases during transposition. */
-static int internal; /* Internal vs. external flipping. */
-static char *sink_old_names; /* Old variable names. */
-static unsigned long sink_cases; /* Number of cases. */
-static struct flip_case *head, *tail; /* internal == 1: Cases. */
-static FILE *sink_file; /* internal == 0: Temporary file. */
-
-/* Source: Cases after transposition. */
-static struct flip_case *src; /* Internal transposition records. */
-static char *src_old_names; /* Old variable names. */
-static unsigned long src_cases; /* Number of cases. */
-static FILE *src_file; /* src == NULL: Temporary file. */
-
-/* Initialize the FLIP stream. */
-static void
-flip_stream_init (void)
+/* Creates a flip sink based on FLIP. */
+static struct case_sink *
+flip_sink_create (struct flip_pgm *flip)